Files
server/opt/monitoring/grafana/plugins/grafana-pyroscope-app/908.js
2025-12-22 11:03:43 +00:00

3 lines
911 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*! For license information please see 908.js.LICENSE.txt */
(self.webpackChunkgrafana_pyroscope_app=self.webpackChunkgrafana_pyroscope_app||[]).push([[908],{219:(e,t,n)=>{(()=>{"use strict";var t={n:e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};function i(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n);return(t>>>0).toString(16)}t.r(r),t.d(r,{ASSISTANT_PLUGIN_ID:()=>B,ASSISTANT_PLUGIN_TITLE:()=>z,CALLBACK_EXTENSION_POINT:()=>M,ComponentNodeData:()=>S,DashboardNodeData:()=>_,DatasourceNodeData:()=>T,EntityNodeData:()=>k,FolderNodeData:()=>O,LabelNameNodeData:()=>C,LabelValueNodeData:()=>A,OpenAssistantButton:()=>mt,StructuredNodeData:()=>o,closeAssistant:()=>K,createAssistantContextItem:()=>I,getExposeAssistantFunctionsConfig:()=>V,isAssistantAvailable:()=>U,newFunctionNamespace:()=>F,openAssistant:()=>Q,provideComponents:()=>E,providePageContext:()=>g,provideQuestions:()=>P,toggleAssistant:()=>X,useAssistant:()=>Y,usePageComponents:()=>x,usePageContext:()=>y,useProvidePageContext:()=>v,useProvideQuestions:()=>N,useQuestions:()=>j});class a{constructor(e){this.params=e,this.text="",this.id=i(e.id),this.type=e.type}formatForLLM(e){var t,n;return{type:this.type,codeElementIds:e,data:{name:null!==(t=this.params.text)&&void 0!==t?t:"",text:null!==(n=this.params.text)&&void 0!==n?n:""}}}equals(e){return e instanceof a&&this.id===e.id&&this.type===e.type}}class o extends a{constructor(e){super({...e,id:i(JSON.stringify(e.data)),type:"structured"}),this.data=e.data}formatForLLM(e){return{type:this.type,codeElementIds:e,data:this.data}}}const s=n(8531),l=n(5959);var u=t.n(l);const c=[],d="grafana-assistant:page-context-sync",h="grafana-assistant:page-context-update",p="grafana-assistant:page-context-remove",f="grafana-assistant:location-changed";let m=!1;function g(e,t){const n={id:b(),urlPattern:e,context:[...t]};c.push(n),window.dispatchEvent(new CustomEvent(h,{detail:n})),window.dispatchEvent(new CustomEvent(d,{detail:{registry:c}}));const r=e=>{const t=c.findIndex((e=>e.id===n.id));-1!==t&&(c[t].context=[...e],window.dispatchEvent(new CustomEvent(h,{detail:c[t]})))};return r.unregister=()=>{const e=c.findIndex((e=>e.id===n.id));-1!==e&&(c.splice(e,1),window.dispatchEvent(new CustomEvent(p,{detail:{id:n.id}})))},r}function v(e,t=[]){const n=(0,l.useRef)(void 0),r=(0,l.useRef)(t);return r.current=t,(0,l.useEffect)((()=>(n.current=g(e,r.current),()=>{var e;null===(e=n.current)||void 0===e||e.unregister()})),[e]),(0,l.useEffect)((()=>{n.current&&n.current(t)}),[t]),(0,l.useCallback)((e=>{var t;null===(t=n.current)||void 0===t||t.call(n,e)}),[])}function y(e={allowQuestions:!1,allowComponents:!1}){const[t,n]=(0,l.useState)([]),r=(0,s.useLocationService)(),i=(0,l.useRef)("");(0,l.useEffect)((()=>{const e=()=>{const e=function(e,t){if(!e)return[];const n=[];for(const r of t)w(e,r.urlPattern)&&n.push(...r.context);return n}(r.getLocation().pathname,c);n(e)},t=()=>{e()},a=t=>{var n;const i=null===(n=t.detail)||void 0===n?void 0:n.pathname;i&&i===r.getLocation().pathname&&e()},o=r.getLocationObservable().subscribe((t=>{const n=t.pathname;n!==i.current&&(i.current=n,function(e){window.dispatchEvent(new CustomEvent(f,{detail:{pathname:e}}))}(n),e())}));return e(),window.addEventListener(d,t),window.addEventListener(h,t),window.addEventListener(p,t),window.addEventListener(f,a),()=>{o.unsubscribe(),window.removeEventListener(d,t),window.removeEventListener(h,t),window.removeEventListener(p,t),window.removeEventListener(f,a)}}),[r]);let a=t;return e.allowQuestions||(a=a.filter((e=>{var t;return"question"!==(null===(t=e.node.data)||void 0===t?void 0:t.type)}))),e.allowComponents||(a=a.filter((e=>{var t;return"component"!==(null===(t=e.node.data)||void 0===t?void 0:t.type)}))),a}function b(e="page-context"){return`${e}-${Date.now()}-${Math.random().toString(36).slice(2,11)}`}function w(e,t){if(t instanceof RegExp)return t.test(e);if("string"==typeof t){const n=t.replace(/\*\*/g,"\0DOUBLE_STAR\0").replace(/\*/g,"[^/]*").replace(/\u0000DOUBLE_STAR\u0000/g,".*").replace(/\?/g,".");return new RegExp(`^${n}$`).test(e)}return!1}m||(window.addEventListener(d,(e=>{var t;const n=null===(t=e.detail)||void 0===t?void 0:t.registry;if(n){const e=new Set(c.map((e=>e.id))),t=n.filter((t=>!e.has(t.id)));c.push(...t)}})),window.addEventListener(h,(e=>{const t=e.detail;if(t){const e=c.findIndex((e=>e.id===t.id));-1!==e?c[e]=t:c.push(t)}})),window.addEventListener(p,(e=>{var t;const n=null===(t=e.detail)||void 0===t?void 0:t.id;if(n){const e=c.findIndex((e=>e.id===n));-1!==e&&c.splice(e,1)}})),m=!0);class S extends a{constructor(e){const t=e.namespace||"components";super({...e,id:`${t}-${Object.keys(e.components).join("-")}`,type:"component"}),this.components=e.components,this.prompt=e.prompt,this.namespace=t}formatForLLM(e){return{type:this.type,codeElementIds:e,data:{name:`${this.namespace} components`,prompt:this.prompt,namespace:this.namespace}}}}function x(){const e=y({allowComponents:!0,allowQuestions:!1});return(0,l.useMemo)((()=>{const t={};return e.filter((e=>{var t;return null===(t=e.node.data)||void 0===t?void 0:t.components})).forEach((e=>{const n=e.node.data;if(null==n?void 0:n.components){const e=n.namespace||n.name||"components";Object.entries(n.components).forEach((([n,r])=>{t[`${e}_${n}`]=r}))}})),t}),[e])}function E(e,t,n,r=/.*/){return g(r,[I("component",{components:n,prompt:e,namespace:t})])}class _ extends a{constructor(e){super({...e,id:e.dashboardUid,type:"dashboard"}),this.dashboardUid=e.dashboardUid,this.dashboardTitle=e.dashboardTitle,this.folderUid=e.folderUid,this.folderTitle=e.folderTitle,this.text=e.dashboardTitle}formatForLLM(e){return{type:this.type,codeElementIds:e,data:{name:this.dashboardTitle,dashboardUid:this.dashboardUid,dashboardTitle:this.dashboardTitle,folderUid:this.folderUid,folderTitle:this.folderTitle,text:this.text}}}}class O extends a{constructor(e){super({...e,id:e.folderUid,type:"dashboard_folder"}),this.text="",this.folderUid=e.folderUid,this.folderTitle=e.folderTitle,this.text=e.folderTitle}formatForLLM(e){return{type:this.type,codeElementIds:e,data:{name:this.folderTitle,folderUid:this.folderUid,folderTitle:this.folderTitle,text:this.text}}}}class T extends a{constructor(e){super({...e,id:e.datasourceUid,type:"datasource"}),this.datasourceUid=e.datasourceUid,this.datasourceType=e.datasourceType,this.datasourceName=e.datasourceName,this.img=e.img,this.text=e.datasourceName}formatForLLM(e){return{type:this.type,codeElementIds:e,data:{name:this.datasourceName,uid:this.datasourceUid,type:this.datasourceType,text:this.text,img:this.img}}}}class k extends a{constructor(e){var t,n,r;super({id:`${e.type}-${e.name}-${[null===(t=e.scope)||void 0===t?void 0:t.env,null===(n=e.scope)||void 0===n?void 0:n.site,null===(r=e.scope)||void 0===r?void 0:r.namespace].filter(Boolean).join("-")}`,type:"entity",title:e.title,hidden:e.hidden,img:e.img,icon:e.icon,text:e.name}),this.entityType=e.type,this.name=e.name,this.scope=e.scope,this.properties=e.properties,this.text=e.name}formatForLLM(e){return{type:"entity",codeElementIds:e,data:{name:this.name,text:this.text,type:this.entityType,scope:this.scope,properties:this.properties}}}}class C extends a{constructor(e){super({...e,id:`${e.datasourceUid}-${e.labelName}`,type:"label_name"}),this.datasourceUid=e.datasourceUid,this.datasourceType=e.datasourceType,this.datasourceName=e.datasourceName,this.labelName=e.labelName,this.text=e.labelName,this.img=e.img}formatForLLM(e){return{type:this.type,codeElementIds:e,data:{name:this.labelName,datasourceUid:this.datasourceUid,datasourceType:this.datasourceType,datasourceName:this.datasourceName,labelName:this.labelName,img:this.img,text:this.text}}}}class A extends a{constructor(e){super({...e,id:`${e.datasourceUid}-${e.labelName}-${e.labelValue}`,type:"label_value"}),this.datasourceUid=e.datasourceUid,this.datasourceType=e.datasourceType,this.datasourceName=e.datasourceName,this.labelName=e.labelName,this.labelValue=e.labelValue,this.text=e.labelValue,this.img=e.img}formatForLLM(e){return{type:this.type,codeElementIds:e,data:{name:this.labelValue,datasourceUid:this.datasourceUid,datasourceType:this.datasourceType,datasourceName:this.datasourceName,labelName:this.labelName,labelValue:this.labelValue,text:this.text,img:this.img}}}}function D(e){var t,n,r,i,a;const o=(0,s.getDataSourceSrv)().getInstanceSettings(e);return{datasourceType:null!==(t=null==o?void 0:o.type)&&void 0!==t?t:"unknown",datasourceName:null!==(n=null==o?void 0:o.name)&&void 0!==n?n:e,img:null===(a=null===(i=null===(r=null==o?void 0:o.meta)||void 0===r?void 0:r.info)||void 0===i?void 0:i.logos)||void 0===a?void 0:a.small}}const R={datasource:"database",label_name:"database",label_value:"database",dashboard:"dashboard",dashboard_folder:"folder",unknown:"circle-mono",structured:"gf-grid",component:"gf-grid",entity:"asserts"};function I(e,t){var n,r,i;const s=function(e,t){switch(e){case"datasource":return new T({...t,...D(t.datasourceUid)});case"label_name":return new C({...t,...D(t.datasourceUid)});case"label_value":return new A({...t,...D(t.datasourceUid)});case"dashboard":return new _(t);case"dashboard_folder":return new O(t);case"structured":return new o(t);case"component":return new S({...t,hidden:!0});case"entity":return new k(t);case"unknown":return new a(t);default:return console.error(`Unknown context type: ${e}`),new a(t)}}(e,t),l=null!==(n=t.title)&&void 0!==n?n:function(e){var t;return e instanceof o?e.formatForLLM().data.name:null!==(t=e.text)&&void 0!==t?t:"Given Context"}(s),u=null!==(r=t.img)&&void 0!==r?r:function(e){if("img"in e)return e.img}(s);return{node:{id:s.id,name:l,img:u,icon:null!==(i=t.icon)&&void 0!==i?i:R[e],navigable:!1,selectable:!0,data:s},occurrences:[]}}function P(e,t){const n=b("question"),r=e=>e.map(((e,t)=>({node:{id:`question-${n}-${t}`,name:e.prompt,navigable:!1,selectable:!0,icon:"question-circle",data:{type:"question",prompt:e.prompt,context:e.context||[]}},occurrences:[]}))),i=g(e,r(t)),a=e=>{i(r(e))};return a.unregister=i.unregister,a}function N(e,t=[]){const n=(0,l.useMemo)((()=>b("question")),[]),r=e=>e.map(((e,t)=>({node:{id:`question-${n}-${t}`,name:e.prompt,navigable:!1,selectable:!0,icon:"question-circle",data:{type:"question",prompt:e.prompt,context:e.context||[]}},occurrences:[]}))),i=v(e,r(t));return e=>{i(r(e))}}function j(){const e=y({allowQuestions:!0,allowComponents:!1});return L(e)}const L=e=>e.filter((e=>{var t;return"question"===(null===(t=e.node.data)||void 0===t?void 0:t.type)})).map((e=>{var t,n;return{prompt:(null===(t=e.node.data)||void 0===t?void 0:t.prompt)||e.node.name,context:(null===(n=e.node.data)||void 0===n?void 0:n.context)||[]}})),M="grafana-assistant-app/callback/v0-alpha";function F(e,t){return{namespace:e,functions:t}}function V(e){return{title:"callback",targets:[M],fn:()=>e.map((e=>({namespace:e.namespace,functions:e.functions})))}}const $=n(1269),B="grafana-assistant-app",z="Grafana Assistant";function U(){return s.getObservablePluginLinks?(0,s.getObservablePluginLinks)({extensionPointId:"grafana/extension-sidebar/v0-alpha"}).pipe((0,$.map)((e=>e.some((e=>e.pluginId===B&&e.title===z))))):(0,$.of)(!1)}const q=n(7781);class H extends q.BusEventWithPayload{}H.type="open-extension-sidebar";class G extends q.BusEventBase{}G.type="close-extension-sidebar";class W extends q.BusEventWithPayload{}function Q(e){var t,n;(0,s.reportInteraction)("grafana_assistant_app_opened_sidebar",{from:e.origin,prompt:null!==(t=e.prompt)&&void 0!==t?t:""}),function(e,t,n){const r=new H({pluginId:e,componentTitle:t,props:n});(0,s.getAppEvents)().publish(r)}(B,z,{initialPrompt:e.prompt,initialContext:e.context,initialAutoSend:null===(n=e.autoSend)||void 0===n||n,origin:e.origin})}function K(){!function(){const e=new G;(0,s.getAppEvents)().publish(e)}()}function X(e){var t,n;(0,s.reportInteraction)("grafana_assistant_app_toggled_sidebar",{from:e.origin,prompt:null!==(t=e.prompt)&&void 0!==t?t:""}),function(e,t,n){const r=new W({pluginId:e,componentTitle:t,props:n});(0,s.getAppEvents)().publish(r)}(B,z,{initialPrompt:e.prompt,initialContext:e.context,initialAutoSend:null===(n=e.autoSend)||void 0===n||n,origin:e.origin})}function Y(){const[e,t]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{const e=U().subscribe((e=>t(e)));return()=>{e.unsubscribe()}}),[]),{isAvailable:e,openAssistant:e?Q:void 0,closeAssistant:e?K:void 0,toggleAssistant:e?X:void 0}}W.type="toggle-extension-sidebar";const J=n(2007);var Z=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),ee=Math.abs,te=String.fromCharCode,ne=Object.assign;function re(e){return e.trim()}function ie(e,t,n){return e.replace(t,n)}function ae(e,t){return e.indexOf(t)}function oe(e,t){return 0|e.charCodeAt(t)}function se(e,t,n){return e.slice(t,n)}function le(e){return e.length}function ue(e){return e.length}function ce(e,t){return t.push(e),e}var de=1,he=1,pe=0,fe=0,me=0,ge="";function ve(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:de,column:he,length:o,return:""}}function ye(e,t){return ne(ve("",null,null,"",null,null,0),e,{length:-e.length},t)}function be(){return me=fe<pe?oe(ge,fe++):0,he++,10===me&&(he=1,de++),me}function we(){return oe(ge,fe)}function Se(){return fe}function xe(e,t){return se(ge,e,t)}function Ee(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _e(e){return de=he=1,pe=le(ge=e),fe=0,[]}function Oe(e){return ge="",e}function Te(e){return re(xe(fe-1,Ae(91===e?e+2:40===e?e+1:e)))}function ke(e){for(;(me=we())&&me<33;)be();return Ee(e)>2||Ee(me)>3?"":" "}function Ce(e,t){for(;--t&&be()&&!(me<48||me>102||me>57&&me<65||me>70&&me<97););return xe(e,Se()+(t<6&&32==we()&&32==be()))}function Ae(e){for(;be();)switch(me){case e:return fe;case 34:case 39:34!==e&&39!==e&&Ae(me);break;case 40:41===e&&Ae(e);break;case 92:be()}return fe}function De(e,t){for(;be()&&e+me!==57&&(e+me!==84||47!==we()););return"/*"+xe(t,fe-1)+"*"+te(47===e?e:be())}function Re(e){for(;!Ee(we());)be();return xe(e,fe)}var Ie="-ms-",Pe="-moz-",Ne="-webkit-",je="comm",Le="rule",Me="decl",Fe="@keyframes";function Ve(e,t){for(var n="",r=ue(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function $e(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Me:return e.return=e.return||e.value;case je:return"";case Fe:return e.return=e.value+"{"+Ve(e.children,r)+"}";case Le:e.value=e.props.join(",")}return le(n=Ve(e.children,r))?e.return=e.value+"{"+n+"}":""}function Be(e){return Oe(ze("",null,null,null,[""],e=_e(e),0,[0],e))}function ze(e,t,n,r,i,a,o,s,l){for(var u=0,c=0,d=o,h=0,p=0,f=0,m=1,g=1,v=1,y=0,b="",w=i,S=a,x=r,E=b;g;)switch(f=y,y=be()){case 40:if(108!=f&&58==oe(E,d-1)){-1!=ae(E+=ie(Te(y),"&","&\f"),"&\f")&&(v=-1);break}case 34:case 39:case 91:E+=Te(y);break;case 9:case 10:case 13:case 32:E+=ke(f);break;case 92:E+=Ce(Se()-1,7);continue;case 47:switch(we()){case 42:case 47:ce(qe(De(be(),Se()),t,n),l);break;default:E+="/"}break;case 123*m:s[u++]=le(E)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+c:-1==v&&(E=ie(E,/\f/g,"")),p>0&&le(E)-d&&ce(p>32?He(E+";",r,n,d-1):He(ie(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(ce(x=Ue(E,t,n,u,c,i,s,b,w=[],S=[],d),a),123===y)if(0===c)ze(E,t,x,x,w,a,d,s,S);else switch(99===h&&110===oe(E,3)?100:h){case 100:case 108:case 109:case 115:ze(e,x,x,r&&ce(Ue(e,x,x,0,0,i,s,b,i,w=[],d),S),i,S,d,s,r?w:S);break;default:ze(E,x,x,x,[""],S,0,s,S)}}u=c=p=0,m=v=1,b=E="",d=o;break;case 58:d=1+le(E),p=f;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==(me=fe>0?oe(ge,--fe):0,he--,10===me&&(he=1,de--),me))continue;switch(E+=te(y),y*m){case 38:v=c>0?1:(E+="\f",-1);break;case 44:s[u++]=(le(E)-1)*v,v=1;break;case 64:45===we()&&(E+=Te(be())),h=we(),c=d=le(b=E+=Re(Se())),y++;break;case 45:45===f&&2==le(E)&&(m=0)}}return a}function Ue(e,t,n,r,i,a,o,s,l,u,c){for(var d=i-1,h=0===i?a:[""],p=ue(h),f=0,m=0,g=0;f<r;++f)for(var v=0,y=se(e,d+1,d=ee(m=o[f])),b=e;v<p;++v)(b=re(m>0?h[v]+" "+y:ie(y,/&\f/g,h[v])))&&(l[g++]=b);return ve(e,t,n,0===i?Le:s,l,u,c)}function qe(e,t,n){return ve(e,t,n,je,te(me),se(e,2,-2),0)}function He(e,t,n,r){return ve(e,t,n,Me,se(e,0,r),se(e,r+1,-1),r)}var Ge=function(e,t,n){for(var r=0,i=0;r=i,i=we(),38===r&&12===i&&(t[n]=1),!Ee(i);)be();return xe(e,fe)},We=new WeakMap,Qe=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||We.get(n))&&!r){We.set(e,!0);for(var i=[],a=function(e,t){return Oe(function(e,t){var n=-1,r=44;do{switch(Ee(r)){case 0:38===r&&12===we()&&(t[n]=1),e[n]+=Ge(fe-1,t,n);break;case 2:e[n]+=Te(r);break;case 4:if(44===r){e[++n]=58===we()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=te(r)}}while(r=be());return e}(_e(e),t))}(t,i),o=n.props,s=0,l=0;s<a.length;s++)for(var u=0;u<o.length;u++,l++)e.props[l]=i[s]?a[s].replace(/&\f/g,o[u]):o[u]+" "+a[s]}}},Ke=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Xe(e,t){switch(function(e,t){return 45^oe(e,0)?(((t<<2^oe(e,0))<<2^oe(e,1))<<2^oe(e,2))<<2^oe(e,3):0}(e,t)){case 5103:return Ne+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ne+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ne+e+Pe+e+Ie+e+e;case 6828:case 4268:return Ne+e+Ie+e+e;case 6165:return Ne+e+Ie+"flex-"+e+e;case 5187:return Ne+e+ie(e,/(\w+).+(:[^]+)/,Ne+"box-$1$2"+Ie+"flex-$1$2")+e;case 5443:return Ne+e+Ie+"flex-item-"+ie(e,/flex-|-self/,"")+e;case 4675:return Ne+e+Ie+"flex-line-pack"+ie(e,/align-content|flex-|-self/,"")+e;case 5548:return Ne+e+Ie+ie(e,"shrink","negative")+e;case 5292:return Ne+e+Ie+ie(e,"basis","preferred-size")+e;case 6060:return Ne+"box-"+ie(e,"-grow","")+Ne+e+Ie+ie(e,"grow","positive")+e;case 4554:return Ne+ie(e,/([^-])(transform)/g,"$1"+Ne+"$2")+e;case 6187:return ie(ie(ie(e,/(zoom-|grab)/,Ne+"$1"),/(image-set)/,Ne+"$1"),e,"")+e;case 5495:case 3959:return ie(e,/(image-set\([^]*)/,Ne+"$1$`$1");case 4968:return ie(ie(e,/(.+:)(flex-)?(.*)/,Ne+"box-pack:$3"+Ie+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ne+e+e;case 4095:case 3583:case 4068:case 2532:return ie(e,/(.+)-inline(.+)/,Ne+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(le(e)-1-t>6)switch(oe(e,t+1)){case 109:if(45!==oe(e,t+4))break;case 102:return ie(e,/(.+:)(.+)-([^]+)/,"$1"+Ne+"$2-$3$1"+Pe+(108==oe(e,t+3)?"$3":"$2-$3"))+e;case 115:return~ae(e,"stretch")?Xe(ie(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==oe(e,t+1))break;case 6444:switch(oe(e,le(e)-3-(~ae(e,"!important")&&10))){case 107:return ie(e,":",":"+Ne)+e;case 101:return ie(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ne+(45===oe(e,14)?"inline-":"")+"box$3$1"+Ne+"$2$3$1"+Ie+"$2box$3")+e}break;case 5936:switch(oe(e,t+11)){case 114:return Ne+e+Ie+ie(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ne+e+Ie+ie(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ne+e+Ie+ie(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ne+e+Ie+e+e}return e}var Ye=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Me:e.return=Xe(e.value,e.length);break;case Fe:return Ve([ye(e,{value:ie(e.value,"@","@"+Ne)})],r);case Le:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Ve([ye(e,{props:[ie(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Ve([ye(e,{props:[ie(t,/:(plac\w+)/,":"+Ne+"input-$1")]}),ye(e,{props:[ie(t,/:(plac\w+)/,":-moz-$1")]}),ye(e,{props:[ie(t,/:(plac\w+)/,Ie+"input-$1")]})],r)}return""}))}}],Je={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var Ze=/[A-Z]|^ms/g,et=/_EMO_([^_]+?)_([^]*?)_EMO_/g,tt=function(e){return 45===e.charCodeAt(1)},nt=function(e){return null!=e&&"boolean"!=typeof e},rt=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return tt(e)?e:e.replace(Ze,"-$&").toLowerCase()})),it=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(et,(function(e,t,n){return ot={name:t,styles:n,next:ot},t}))}return 1===Je[e]||tt(e)||"number"!=typeof t||0===t?t:t+"px"};function at(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var i=n;if(1===i.anim)return ot={name:i.name,styles:i.styles,next:ot},i.name;var a=n;if(void 0!==a.styles){var o=a.next;if(void 0!==o)for(;void 0!==o;)ot={name:o.name,styles:o.styles,next:ot},o=o.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=at(e,t,n[i])+";";else for(var a in n){var o=n[a];if("object"!=typeof o){var s=o;null!=t&&void 0!==t[s]?r+=a+"{"+t[s]+"}":nt(s)&&(r+=rt(a)+":"+it(a,s)+";")}else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var l=at(e,t,o);switch(a){case"animation":case"animationName":r+=rt(a)+":"+l+";";break;default:r+=a+"{"+l+"}"}}else for(var u=0;u<o.length;u++)nt(o[u])&&(r+=rt(a)+":"+it(a,o[u])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=ot,l=n(e);return ot=s,at(e,t,l)}}var u=n;if(null==t)return u;var c=t[u];return void 0!==c?c:u}var ot,st=/label:\s*([^\s;{]+)\s*(;|$)/g;function lt(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,i="";ot=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,i+=at(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=at(n,t,e[o]),r&&(i+=a[o]);st.lastIndex=0;for(var s,l="";null!==(s=st.exec(i));)l+="-"+s[1];var u=function(e){for(var t,n=0,r=0,i=e.length;i>=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:u,styles:i,next:ot}}function ut(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}function ct(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function dt(e,t,n){var r=[],i=ut(e,r,n);return r.length<2?n:i+t(r)}var ht=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(null!=i){var a=void 0;switch(typeof i){case"boolean":break;case"object":if(Array.isArray(i))a=e(i);else for(var o in a="",i)i[o]&&o&&(a&&(a+=" "),a+=o);break;default:a=i}a&&(n&&(n+=" "),n+=a)}}return n},pt=function(e){var t=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,i,a=e.stylisPlugins||Ye,o={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;s.push(e)}));var l,u,c,d,h=[$e,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(u=[Qe,Ke].concat(a,h),c=ue(u),function(e,t,n,r){for(var i="",a=0;a<c;a++)i+=u[a](e,t,n,r)||"";return i});i=function(e,t,n,r){l=n,Ve(Be(e?e+"{"+t.styles+"}":t.styles),p),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new Z({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:i};return f.sheet.hydrate(s),f}({key:"css"});t.sheet.speedy=function(e){this.isSpeedy=e},t.compat=!0;var n=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=lt(n,t.registered,void 0);return function(e,t){!function(e,t){var n=e.key+"-"+t.name;void 0===e.registered[n]&&(e.registered[n]=t.styles)}(e,t);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var r=t;do{e.insert(t===r?"."+n:"",r,e.sheet,!0),r=r.next}while(void 0!==r)}}(t,i),t.key+"-"+i.name};return{css:n,cx:function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return dt(t.registered,n,ht(r))},injectGlobal:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=lt(n,t.registered);ct(t,i)},keyframes:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=lt(n,t.registered),a="animation-"+i.name;return ct(t,{name:i.name,styles:"@keyframes "+a+"{"+i.styles+"}"}),a},hydrate:function(e){e.forEach((function(e){t.inserted[e]=!0}))},flush:function(){t.registered={},t.inserted={},t.sheet.flush()},sheet:t.sheet,cache:t,getRegisteredStyles:ut.bind(null,t.registered),merge:dt.bind(null,t.registered,n)}}(),ft=(pt.flush,pt.hydrate,pt.cx,pt.merge,pt.getRegisteredStyles,pt.injectGlobal,pt.keyframes,pt.css);function mt(e){const{isAvailable:t,openAssistant:n}=Y();return t&&n?u().createElement(gt,{...e,openAssistant:n}):null}function gt({prompt:e,origin:t,context:n,autoSend:r=!0,title:i="Analyze with Assistant",size:a="sm",iconOnlyButton:o=!1,openAssistant:c}){const d=(0,J.useStyles2)(vt);return(0,l.useEffect)((()=>{(0,s.reportInteraction)("grafana_assistant_app_open_sidebar_button_displayed",{from:t})}),[t]),u().createElement(u().Fragment,null,o?u().createElement(J.IconButton,{name:"ai-sparkle",onClick:()=>c({prompt:e,context:n,autoSend:r,origin:t}),variant:"secondary",size:a,"aria-label":i,className:d.icon,tooltip:i,"data-testid":"assistant-icon-button"}):u().createElement(J.Button,{icon:"ai-sparkle",onClick:()=>c({prompt:e,context:n,autoSend:r,origin:t}),variant:"secondary",fill:"solid",size:a,title:i,"aria-label":i,className:d.button,"data-testid":"assistant-button"},i))}pt.sheet,pt.cache;const vt=e=>{const t=e.colors.secondary.main,n=e.colors.emphasize(t,.05),r=e.colors.background.canvas,i=e.shape.radius.default,a=`max(calc(${i} - 1px), 1px)`,o={content:'""',position:"absolute",inset:0,borderRadius:i,background:"linear-gradient(90deg, rgb(168, 85, 247), rgb(249, 115, 22))",zIndex:-2,pointerEvents:"none"},s=e=>({content:'""',position:"absolute",inset:"1px",borderRadius:a,background:`linear-gradient(${e}, ${e}), ${r}`,zIndex:-1,transition:"none",pointerEvents:"none"});return{button:ft({label:"assistant-button",position:"relative",isolation:"isolate",border:"none",transition:"none !important","&::before":o,"&::after":{...s(t),transition:"none"},"&:hover":{transition:"none !important"},"&:hover::after":{background:`linear-gradient(${n}, ${n}), ${r}`}}),icon:ft({label:"assistant-icon",position:"relative",isolation:"isolate",border:"none",background:"none",padding:e.spacing(.5),"&::before":{...o,transition:"background 0.1s ease"},"&:hover::after":{...s(t),background:`linear-gradient(${n}, ${n}), ${r}`}})}};e.exports=r})()},7945:(e,t,n)=>{"use strict";n.d(t,{Tp:()=>i});const r={RadioButton:{container:"data-testid radio-button"},Breadcrumbs:{breadcrumb:e=>`data-testid ${e} breadcrumb`},TimePicker:{openButton:"data-testid TimePicker Open Button",overlayContent:"data-testid TimePicker Overlay Content",fromField:"data-testid Time Range from field",toField:"data-testid Time Range to field",applyTimeRange:"data-testid TimePicker submit button",copyTimeRange:"data-testid TimePicker copy button",pasteTimeRange:"data-testid TimePicker paste button",calendar:{label:"data-testid Time Range calendar",openButton:"data-testid Open time range calendar",closeButton:"data-testid Close time range Calendar"},absoluteTimeRangeTitle:"data-testid-absolute-time-range-narrow"},DataSourcePermissions:{form:()=>'form[name="addPermission"]',roleType:"Role to add new permission to",rolePicker:"Built-in role picker",permissionLevel:"Permission Level"},DateTimePicker:{input:"data-testid date-time-input"},DataSource:{TestData:{QueryTab:{scenarioSelectContainer:"Test Data Query scenario select container",scenarioSelect:"Test Data Query scenario select",max:"TestData max",min:"TestData min",noise:"TestData noise",seriesCount:"TestData series count",spread:"TestData spread",startValue:"TestData start value",drop:"TestData drop values"}},DataSourceHttpSettings:{urlInput:"data-testid Datasource HTTP settings url"},Jaeger:{traceIDInput:"Trace ID"},Prometheus:{configPage:{connectionSettings:"Data source connection URL",manageAlerts:"prometheus-alerts-manager",scrapeInterval:"data-testid scrape interval",queryTimeout:"data-testid query timeout",defaultEditor:"data-testid default editor",disableMetricLookup:"disable-metric-lookup",prometheusType:"data-testid prometheus type",prometheusVersion:"data-testid prometheus version",cacheLevel:"data-testid cache level",incrementalQuerying:"prometheus-incremental-querying",queryOverlapWindow:"data-testid query overlap window",disableRecordingRules:"disable-recording-rules",customQueryParameters:"data-testid custom query parameters",httpMethod:"data-testid http method",exemplarsAddButton:"data-testid Add exemplar config button",internalLinkSwitch:"data-testid Internal link switch"},queryEditor:{explain:"data-testid prometheus explain switch wrapper",editorToggle:"data-testid QueryEditorModeToggle",options:"data-testid prometheus options",legend:"data-testid prometheus legend wrapper",format:"data-testid prometheus format",step:"prometheus-step",type:"data-testid prometheus type",exemplars:"prometheus-exemplars",builder:{metricSelect:"data-testid metric select",hints:"data-testid prometheus hints",metricsExplorer:"data-testid metrics explorer",queryAdvisor:"data-testid query advisor"},code:{queryField:"data-testid prometheus query field",metricsBrowser:{openButton:"data-testid open metrics browser",selectMetric:"data-testid select a metric",metricList:"data-testid metric list",labelNamesFilter:"data-testid label names filter",labelValuesFilter:"data-testid label values filter",useQuery:"data-testid use query",useAsRateQuery:"data-testid use as rate query",validateSelector:"data-testid validate selector",clear:"data-testid clear"}}},exemplarMarker:"data-testid Exemplar marker",variableQueryEditor:{queryType:"data-testid query type",labelnames:{metricRegex:"data-testid label names metric regex"},labelValues:{labelSelect:"data-testid label values label select"},metricNames:{metricRegex:"data-testid metric names metric regex"},varQueryResult:"data-testid variable query result",seriesQuery:"data-testid prometheus series query",classicQuery:"data-testid prometheus classic query"},annotations:{minStep:"prometheus-annotation-min-step",title:"data-testid prometheus annotation title",tags:"data-testid prometheus annotation tags",text:"data-testid prometheus annotation text",seriesValueAsTimestamp:"data-testid prometheus annotation series value as timestamp"}}},Menu:{MenuComponent:e=>`${e} menu`,MenuGroup:e=>`${e} menu group`,MenuItem:e=>`${e} menu item`,SubMenu:{container:"data-testid SubMenu container",icon:"data-testid SubMenu icon"}},Panels:{Panel:{title:e=>`data-testid Panel header ${e}`,headerItems:e=>`data-testid Panel header item ${e}`,menuItems:e=>`data-testid Panel menu item ${e}`,menu:e=>`data-testid Panel menu ${e}`,containerByTitle:e=>`${e} panel`,headerCornerInfo:e=>`Panel header ${e}`,status:e=>`data-testid Panel status ${e}`,loadingBar:()=>"Panel loading bar",HoverWidget:{container:"data-testid hover-header-container",dragIcon:"data-testid drag-icon"},PanelDataErrorMessage:"data-testid Panel data error message"},Visualization:{Graph:{container:"Graph container",VisualizationTab:{legendSection:"Legend section"},Legend:{legendItemAlias:e=>`gpl alias ${e}`,showLegendSwitch:"gpl show legend"},xAxis:{labels:()=>"div.flot-x-axis > div.flot-tick-label"}},BarGauge:{value:"Bar gauge value",valueV2:"data-testid Bar gauge value"},PieChart:{svgSlice:"data testid Pie Chart Slice"},Text:{container:()=>".markdown-html"},Table:{header:"table header",footer:"table-footer",body:"data-testid table body"}}},VizLegend:{seriesName:e=>`data-testid VizLegend series ${e}`},Drawer:{General:{title:e=>`Drawer title ${e}`,expand:"Drawer expand",contract:"Drawer contract",close:"data-testid Drawer close",rcContentWrapper:()=>".rc-drawer-content-wrapper",subtitle:"data-testid drawer subtitle"}},PanelEditor:{General:{content:"Panel editor content"},OptionsPane:{content:"Panel editor option pane content",select:"Panel editor option pane select",fieldLabel:e=>`${e} field property editor`},DataPane:{content:"Panel editor data pane content"},applyButton:"data-testid Apply changes and go back to dashboard",toggleVizPicker:"data-testid toggle-viz-picker",toggleVizOptions:"data-testid toggle-viz-options",toggleTableView:"toggle-table-view",showZoomField:"Map controls Show zoom control field property editor",showAttributionField:"Map controls Show attribution field property editor",showScaleField:"Map controls Show scale field property editor",showMeasureField:"Map controls Show measure tools field property editor",showDebugField:"Map controls Show debug field property editor",measureButton:"show measure tools"},PanelInspector:{Data:{content:"Panel inspector Data content"},Stats:{content:"Panel inspector Stats content"},Json:{content:"Panel inspector Json content"},Query:{content:"Panel inspector Query content",refreshButton:"Panel inspector Query refresh button",jsonObjectKeys:()=>".json-formatter-key"}},Tab:{title:e=>`Tab ${e}`,active:()=>'[class*="-activeTabStyle"]'},RefreshPicker:{runButton:"RefreshPicker run button",intervalButton:"RefreshPicker interval button",runButtonV2:"data-testid RefreshPicker run button",intervalButtonV2:"data-testid RefreshPicker interval button"},QueryTab:{content:"Query editor tab content",queryInspectorButton:"Query inspector button",queryHistoryButton:"data-testid query-history-button",addQuery:"data-testid query-tab-add-query"},QueryHistory:{queryText:"Query text"},QueryEditorRows:{rows:"Query editor row"},QueryEditorRow:{actionButton:e=>`data-testid ${e}`,title:e=>`Query editor row title ${e}`,container:e=>`Query editor row ${e}`},AlertTab:{content:"data-testid Alert editor tab content"},Alert:{alert:e=>`Alert ${e}`,alertV2:e=>`data-testid Alert ${e}`},TransformTab:{content:"data-testid Transform editor tab content",newTransform:e=>`data-testid New transform ${e}`,transformationEditor:e=>`data-testid Transformation editor ${e}`,transformationEditorDebugger:e=>`data-testid Transformation editor debugger ${e}`},Transforms:{card:e=>`data-testid New transform ${e}`,disableTransformationButton:"data-testid Disable transformation button",Reduce:{modeLabel:"data-testid Transform mode label",calculationsLabel:"data-testid Transform calculations label"},SpatialOperations:{actionLabel:"root Action field property editor",locationLabel:"root Location Mode field property editor",location:{autoOption:"Auto location option",coords:{option:"Coords location option",latitudeFieldLabel:"root Latitude field field property editor",longitudeFieldLabel:"root Longitude field field property editor"},geohash:{option:"Geohash location option",geohashFieldLabel:"root Geohash field field property editor"},lookup:{option:"Lookup location option",lookupFieldLabel:"root Lookup field field property editor",gazetteerFieldLabel:"root Gazetteer field property editor"}}},searchInput:"data-testid search transformations",noTransformationsMessage:"data-testid no transformations message",addTransformationButton:"data-testid add transformation button",removeAllTransformationsButton:"data-testid remove all transformations button"},NavBar:{Configuration:{button:"Configuration"},Toggle:{button:"data-testid Toggle menu"},Reporting:{button:"Reporting"}},NavMenu:{Menu:"data-testid navigation mega-menu",item:"data-testid Nav menu item"},NavToolbar:{container:"data-testid Nav toolbar"},PageToolbar:{container:()=>".page-toolbar",item:e=>`${e}`,itemButton:e=>`data-testid ${e}`},QueryEditorToolbarItem:{button:e=>`QueryEditor toolbar item button ${e}`},BackButton:{backArrow:"data-testid Go Back"},OptionsGroup:{group:e=>e?`Options group ${e}`:"Options group",toggle:e=>e?`Options group ${e} toggle`:"Options group toggle"},PluginVisualization:{item:e=>`Plugin visualization item ${e}`,current:()=>'[class*="-currentVisualizationItem"]'},Select:{option:"Select option",input:()=>'input[id*="time-options-input"]',singleValue:()=>'div[class*="-singleValue"]'},FieldConfigEditor:{content:"Field config editor content"},OverridesConfigEditor:{content:"Field overrides editor content"},FolderPicker:{container:"Folder picker select container",containerV2:"data-testid Folder picker select container",input:"data-testid folder-picker-input"},ReadonlyFolderPicker:{container:"data-testid Readonly folder picker select container"},DataSourcePicker:{container:"data-testid Data source picker select container",input:()=>'input[id="data-source-picker"]',inputV2:"data-testid Select a data source",dataSourceList:"data-testid Data source list dropdown",advancedModal:{dataSourceList:"data-testid Data source list",builtInDataSourceList:"data-testid Built in data source list"}},TimeZonePicker:{container:"Time zone picker select container",containerV2:"data-testid Time zone picker select container"},WeekStartPicker:{container:"Choose starting day of the week",containerV2:"data-testid Choose starting day of the week",placeholder:"Choose starting day of the week"},TraceViewer:{spanBar:"data-testid SpanBar--wrapper"},QueryField:{container:"data-testid Query field"},QueryBuilder:{queryPatterns:"data-testid Query patterns",labelSelect:"data-testid Select label",valueSelect:"data-testid Select value",matchOperatorSelect:"data-testid Select match operator"},ValuePicker:{button:e=>`data-testid Value picker button ${e}`,select:e=>`data-testid Value picker select ${e}`},Search:{section:"Search section",sectionV2:"data-testid Search section",items:"Search items",itemsV2:"data-testid Search items",cards:"data-testid Search cards",collapseFolder:e=>`data-testid Collapse folder ${e}`,expandFolder:e=>`data-testid Expand folder ${e}`,dashboardItem:e=>`${r.Search.dashboardItems} ${e}`,dashboardCard:e=>`data-testid Search card ${e}`,folderHeader:e=>`data-testid Folder header ${e}`,folderContent:e=>`data-testid Folder content ${e}`,dashboardItems:"data-testid Dashboard search item"},DashboardLinks:{container:"data-testid Dashboard link container",dropDown:"data-testid Dashboard link dropdown",link:"data-testid Dashboard link"},LoadingIndicator:{icon:"data-testid Loading indicator"},CallToActionCard:{button:e=>`Call to action button ${e}`,buttonV2:e=>`data-testid Call to action button ${e}`},DataLinksContextMenu:{singleLink:"data-testid Data link"},CodeEditor:{container:"data-testid Code editor container"},DashboardImportPage:{textarea:"data-testid-import-dashboard-textarea",submit:"data-testid-load-dashboard"},ImportDashboardForm:{name:"data-testid-import-dashboard-title",submit:"data-testid-import-dashboard-submit"},PanelAlertTabContent:{content:"data-testid Unified alert editor tab content"},VisualizationPreview:{card:e=>`data-testid suggestion-${e}`},ColorSwatch:{name:"data-testid-colorswatch"},DashboardRow:{title:e=>`data-testid dashboard-row-title-${e}`},UserProfile:{profileSaveButton:"data-testid-user-profile-save",preferencesSaveButton:"data-testid-shared-prefs-save",orgsTable:"data-testid-user-orgs-table",sessionsTable:"data-testid-user-sessions-table",extensionPointTabs:"data-testid-extension-point-tabs",extensionPointTab:e=>`data-testid-extension-point-tab-${e}`},FileUpload:{inputField:"data-testid-file-upload-input-field",fileNameSpan:"data-testid-file-upload-file-name"},DebugOverlay:{wrapper:"debug-overlay"},OrgRolePicker:{input:"Role"},AnalyticsToolbarButton:{button:"Dashboard insights"},Variables:{variableOption:"data-testid variable-option"},Annotations:{annotationsTypeInput:"annotations-type-input",annotationsChoosePanelInput:"choose-panels-input"},Tooltip:{container:"data-testid tooltip"}},i={pages:{Login:{url:"/login",username:"data-testid Username input field",password:"data-testid Password input field",submit:"data-testid Login button",skip:"data-testid Skip change password button"},Home:{url:"/"},DataSource:{name:"data-testid Data source settings page name input field",delete:"Data source settings page Delete button",readOnly:"data-testid Data source settings page read only message",saveAndTest:"data-testid Data source settings page Save and Test button",alert:"data-testid Data source settings page Alert"},DataSources:{url:"/datasources",dataSources:e=>`Data source list item ${e}`},EditDataSource:{url:e=>`/datasources/edit/${e}`,settings:"Datasource settings page basic settings"},AddDataSource:{url:"/datasources/new",dataSourcePlugins:e=>`Data source plugin item ${e}`,dataSourcePluginsV2:e=>`Add new data source ${e}`},ConfirmModal:{delete:"data-testid Confirm Modal Danger Button"},AddDashboard:{url:"/dashboard/new",itemButton:e=>`data-testid ${e}`,addNewPanel:"Add new panel",addNewRow:"Add new row",addNewPanelLibrary:"Add new panel from panel library"},Dashboard:{url:e=>`/d/${e}`,DashNav:{nav:"Dashboard navigation",navV2:"data-testid Dashboard navigation",publicDashboardTag:"data-testid public dashboard tag",shareButton:"data-testid share-button"},SubMenu:{submenu:"Dashboard submenu",submenuItem:"data-testid template variable",submenuItemLabels:e=>`data-testid Dashboard template variables submenu Label ${e}`,submenuItemValueDropDownValueLinkTexts:e=>`data-testid Dashboard template variables Variable Value DropDown value link text ${e}`,submenuItemValueDropDownDropDown:"Variable options",submenuItemValueDropDownOptionTexts:e=>`data-testid Dashboard template variables Variable Value DropDown option text ${e}`,Annotations:{annotationsWrapper:"data-testid annotation-wrapper",annotationLabel:e=>`data-testid Dashboard annotations submenu Label ${e}`,annotationToggle:e=>`data-testid Dashboard annotations submenu Toggle ${e}`}},Settings:{Actions:{close:"data-testid dashboard-settings-close"},General:{deleteDashBoard:"Dashboard settings page delete dashboard button",sectionItems:e=>`Dashboard settings section item ${e}`,saveDashBoard:"Dashboard settings aside actions Save button",saveAsDashBoard:"Dashboard settings aside actions Save As button",timezone:"Time zone picker select container",title:"Tab General"},Annotations:{List:{addAnnotationCTA:r.CallToActionCard.button("Add annotation query"),addAnnotationCTAV2:r.CallToActionCard.buttonV2("Add annotation query"),annotations:"data-testid list-annotations"},Settings:{name:"Annotations settings name input"},NewAnnotation:{panelFilterSelect:"data-testid annotations-panel-filter",showInLabel:"show-in-label",previewInDashboard:"data-testid annotations-preview",delete:"data-testid annotations-delete",apply:"data-testid annotations-apply",enable:"data-testid annotation-enable",hide:"data-testid annotation-hide"}},Variables:{List:{addVariableCTA:r.CallToActionCard.button("Add variable"),addVariableCTAV2:r.CallToActionCard.buttonV2("Add variable"),newButton:"Variable editor New variable button",table:"Variable editor Table",tableRowNameFields:e=>`Variable editor Table Name field ${e}`,tableRowDefinitionFields:e=>`Variable editor Table Definition field ${e}`,tableRowArrowUpButtons:e=>`Variable editor Table ArrowUp button ${e}`,tableRowArrowDownButtons:e=>`Variable editor Table ArrowDown button ${e}`,tableRowDuplicateButtons:e=>`Variable editor Table Duplicate button ${e}`,tableRowRemoveButtons:e=>`Variable editor Table Remove button ${e}`},Edit:{General:{headerLink:"Variable editor Header link",modeLabelNew:"Variable editor Header mode New",modeLabelEdit:"Variable editor Header mode Edit",generalNameInput:"Variable editor Form Name field",generalNameInputV2:"data-testid Variable editor Form Name field",generalTypeSelect:"Variable editor Form Type select",generalTypeSelectV2:"data-testid Variable editor Form Type select",generalLabelInput:"Variable editor Form Label field",generalLabelInputV2:"data-testid Variable editor Form Label field",generalHideSelect:"Variable editor Form Hide select",generalHideSelectV2:"data-testid Variable editor Form Hide select",selectionOptionsMultiSwitch:"data-testid Variable editor Form Multi switch",selectionOptionsIncludeAllSwitch:"data-testid Variable editor Form IncludeAll switch",selectionOptionsCustomAllInput:"data-testid Variable editor Form IncludeAll field",previewOfValuesOption:"data-testid Variable editor Preview of Values option",submitButton:"data-testid Variable editor Run Query button",applyButton:"data-testid Variable editor Apply button"},QueryVariable:{queryOptionsDataSourceSelect:r.DataSourcePicker.inputV2,queryOptionsRefreshSelect:"Variable editor Form Query Refresh select",queryOptionsRefreshSelectV2:"data-testid Variable editor Form Query Refresh select",queryOptionsRegExInput:"Variable editor Form Query RegEx field",queryOptionsRegExInputV2:"data-testid Variable editor Form Query RegEx field",queryOptionsSortSelect:"Variable editor Form Query Sort select",queryOptionsSortSelectV2:"data-testid Variable editor Form Query Sort select",queryOptionsQueryInput:"data-testid Variable editor Form Default Variable Query Editor textarea",valueGroupsTagsEnabledSwitch:"Variable editor Form Query UseTags switch",valueGroupsTagsTagsQueryInput:"Variable editor Form Query TagsQuery field",valueGroupsTagsTagsValuesQueryInput:"Variable editor Form Query TagsValuesQuery field"},ConstantVariable:{constantOptionsQueryInput:"Variable editor Form Constant Query field",constantOptionsQueryInputV2:"data-testid Variable editor Form Constant Query field"},DatasourceVariable:{datasourceSelect:"data-testid datasource variable datasource type"},TextBoxVariable:{textBoxOptionsQueryInput:"Variable editor Form TextBox Query field",textBoxOptionsQueryInputV2:"data-testid Variable editor Form TextBox Query field"},CustomVariable:{customValueInput:"data-testid custom-variable-input"},IntervalVariable:{intervalsValueInput:"data-testid interval variable intervals input",autoEnabledCheckbox:"data-testid interval variable auto value checkbox",stepCountIntervalSelect:"data-testid interval variable step count input",minIntervalInput:"data-testid interval variable mininum interval input"},GroupByVariable:{dataSourceSelect:r.DataSourcePicker.inputV2,infoText:"data-testid group by variable info text",modeToggle:"data-testid group by variable mode toggle"},AdHocFiltersVariable:{datasourceSelect:r.DataSourcePicker.inputV2,infoText:"data-testid ad-hoc filters variable info text"}}}},Annotations:{marker:"data-testid annotation-marker"},Rows:{Repeated:{ConfigSection:{warningMessage:"data-testid Repeated rows warning message"}}}},Dashboards:{url:"/dashboards",dashboards:e=>`Dashboard search item ${e}`},SaveDashboardAsModal:{newName:"Save dashboard title field",save:"Save dashboard button"},SaveDashboardModal:{save:"Dashboard settings Save Dashboard Modal Save button",saveVariables:"Dashboard settings Save Dashboard Modal Save variables checkbox",saveTimerange:"Dashboard settings Save Dashboard Modal Save timerange checkbox"},SharePanelModal:{linkToRenderedImage:"Link to rendered image"},ShareDashboardModal:{PublicDashboard:{Tab:"Tab Public dashboard",WillBePublicCheckbox:"data-testid public dashboard will be public checkbox",LimitedDSCheckbox:"data-testid public dashboard limited datasources checkbox",CostIncreaseCheckbox:"data-testid public dashboard cost may increase checkbox",PauseSwitch:"data-testid public dashboard pause switch",EnableAnnotationsSwitch:"data-testid public dashboard on off switch for annotations",CreateButton:"data-testid public dashboard create button",DeleteButton:"data-testid public dashboard delete button",CopyUrlInput:"data-testid public dashboard copy url input",CopyUrlButton:"data-testid public dashboard copy url button",SettingsDropdown:"data-testid public dashboard settings dropdown",TemplateVariablesWarningAlert:"data-testid public dashboard disabled template variables alert",UnsupportedDataSourcesWarningAlert:"data-testid public dashboard unsupported data sources alert",NoUpsertPermissionsWarningAlert:"data-testid public dashboard no upsert permissions alert",EnableTimeRangeSwitch:"data-testid public dashboard on off switch for time range",EmailSharingConfiguration:{Container:"data-testid email sharing config container",ShareType:"data-testid public dashboard share type",EmailSharingInput:"data-testid public dashboard email sharing input",EmailSharingInviteButton:"data-testid public dashboard email sharing invite button",EmailSharingList:"data-testid public dashboard email sharing list",DeleteEmail:"data-testid public dashboard delete email button",ReshareLink:"data-testid public dashboard reshare link button"}}},PublicDashboard:{page:"public-dashboard-page",NotAvailable:{container:"public-dashboard-not-available",title:"public-dashboard-title",pausedDescription:"public-dashboard-paused-description"}},RequestViewAccess:{form:"request-view-access-form",recipientInput:"request-view-access-recipient-input",submitButton:"request-view-access-submit-button"},PublicDashboardConfirmAccess:{submitButton:"data-testid confirm-access-submit-button"},Explore:{url:"/explore",General:{container:"data-testid Explore",graph:"Explore Graph",table:"Explore Table",scrollView:"data-testid explorer scroll view"}},SoloPanel:{url:e=>`/d-solo/${e}`},PluginsList:{page:"Plugins list page",list:"Plugins list",listItem:"Plugins list item",signatureErrorNotice:"data-testid Unsigned plugins notice"},PluginPage:{page:"Plugin page",signatureInfo:"data-testid Plugin signature info",disabledInfo:"data-testid Plugin disabled info"},PlaylistForm:{name:"Playlist name",interval:"Playlist interval",itemDelete:"data-testid playlist-form-delete-item"},BrowseDashboards:{table:{body:"data-testid browse-dashboards-table",row:e=>`data-testid browse dashboards row ${e}`,checkbox:e=>`data-testid ${e} checkbox`},NewFolderForm:{form:"data-testid new folder form",nameInput:"data-testid new-folder-name-input",createButton:"data-testid new-folder-create-button"}},Search:{url:"/?search=openn",FolderView:{url:"/?search=open&layout=folders"}},PublicDashboards:{ListItem:{linkButton:"public-dashboard-link-button",configButton:"public-dashboard-configuration-button",trashcanButton:"public-dashboard-remove-button",pauseSwitch:"data-testid public dashboard pause switch"}},UserListPage:{tabs:{allUsers:"data-testid all-users-tab",orgUsers:"data-testid org-users-tab",anonUserDevices:"data-testid anon-user-devices-tab",publicDashboardsUsers:"data-testid public-dashboards-users-tab",users:"data-testid users-tab"},org:{url:"/org/users"},admin:{url:"/admin/users"},publicDashboards:{container:"data-testid public-dashboards-users-list"},UserListAdminPage:{container:"data-testid user-list-admin-page"},UsersListPage:{container:"data-testid users-list-page"},UserAnonListPage:{container:"data-testid user-anon-list-page"},UsersListPublicDashboardsPage:{container:"data-testid users-list-public-dashboards-page",DashboardsListModal:{listItem:e=>`data-testid dashboards-list-item-${e}`}}},ProfilePage:{url:"/profile"}},components:r}},4557:(e,t,n)=>{"use strict";n.d(t,{$g:()=>i,OV:()=>r,_G:()=>a,vX:()=>o});const r="user-action-start",i="user-action-end",a="user-action-cancel",o="user-action-halt"},3890:(e,t,n)=>{"use strict";n.d(t,{n:()=>o,x:()=>a});var r=n(2019),i=n(129);const a="Error",o=e=>e.map((e=>(0,r.Gv)(e)?(0,i.xD)(e):String(e))).join(" ")},8981:(e,t,n)=>{"use strict";n.d(t,{Q:()=>v,X:()=>y});var r=n(3116),i=n(4915),a=n(129),o=n(2019),s=n(9607),l=n(7697),u=n(4557);var c=n(3890);let d;function h({internalLogger:e,config:t,metas:n,transports:r,tracesApi:h,actionBuffer:p,getMessage:f}){var m;e.debug("Initializing exceptions API");let g=null;d=null!==(m=t.parseStacktrace)&&void 0!==m?m:d;const v=t=>{e.debug("Changing stacktrace parser"),d=null!=t?t:d},{ignoreErrors:y=[],preserveOriginalError:b}=t;return v(t.parseStacktrace),{changeStacktraceParser:v,getStacktraceParser:()=>d,pushError:(m,{skipDedupe:v,stackFrames:w,type:S,context:x,spanContext:E,timestampOverwriteMs:_,originalError:O}={})=>{if(!function(e,t){const{message:n,name:r,stack:i}=t;return a=e,s=n+" "+r+" "+i,a.some((e=>(0,o.Kg)(e)?s.includes(e):!!s.match(e)));var a,s}(y,null!=O?O:m))try{const y=(0,a.Ti)(Object.assign(Object.assign({},function(e){let t=e.cause;(0,o.bJ)(t)?t=e.cause.toString():null!==t&&((0,o.Gv)(e.cause)||(0,o.cy)(e.cause))?t=(0,a.xD)(e.cause):null!=t&&(t=e.cause.toString());return null==t?{}:{cause:t}}(null!=O?O:m)),null!=x?x:{})),T={meta:n.value,payload:Object.assign(Object.assign({type:S||m.name||c.x,value:m.message,timestamp:_?(0,s.q5)(_):(0,s.mI)(),trace:E?{trace_id:E.traceId,span_id:E.spanId}:h.getTraceContext()},(0,o.Im)(y)?{}:{context:y}),b?{originalError:O}:{}),type:i.f.EXCEPTION};(null==(w=null!=w?w:m.stack?null==d?void 0:d(m).frames:void 0)?void 0:w.length)&&(T.payload.stacktrace={frames:w});const k={type:T.payload.type,value:T.payload.value,stackTrace:T.payload.stacktrace,context:T.payload.context};if(!v&&t.dedupe&&!(0,o.kZ)(g)&&(0,l.b)(k,g))return void e.debug("Skipping error push because it is the same as the last one\n",T.payload);g=k,e.debug("Pushing exception\n",T);const C=f();C&&C.type===u.OV?p.addItem(T):r.execute(T)}catch(t){e.error("Error pushing event",t)}}}}var p=n(5438),f=n(3191);class m{constructor(){this.buffer=[]}addItem(e){this.buffer.push(e)}flushBuffer(e){if((0,o.Tn)(e))for(const t of this.buffer)e(t);this.buffer.length=0}size(){return this.buffer.length}}function g({apiMessageBus:e,transports:t,config:n}){const r=new m,a=n.trackUserActionsExcludeItem;let o;e.subscribe((e=>{if(u.OV!==e.type&&u.vX!==e.type){if(e.type===u.$g){const{id:n,name:s}=e;return r.flushBuffer((e=>{if(function(e,t){return(null==t?void 0:t(e))||e.type===i.f.MEASUREMENT&&"web-vitals"===e.payload.type}(e,a))return void t.execute(e);const r=Object.assign(Object.assign({},e),{payload:Object.assign(Object.assign({},e.payload),{action:{parentId:n,name:s}})});t.execute(r)})),void(o=void 0)}e.type===u._G&&(o=void 0,r.flushBuffer((e=>{t.execute(e)})))}else o=e}));return{actionBuffer:r,getMessage:()=>o}}const v=new r.c;function y(e,t,n,r,c){t.debug("Initializing API");const{actionBuffer:d,getMessage:m}=g({apiMessageBus:v,transports:c,config:n}),y=function(e,t,n,r,a){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,n)=>{t.debug("Initializing OpenTelemetry"),o={trace:e,context:n}},isOTELInitialized:()=>!!o,pushTraces:e=>{try{const n={type:i.f.TRACE,payload:e,meta:r.value};t.debug("Pushing trace\n",n),a.execute(n)}catch(e){t.error("Error pushing trace\n",e)}}}}(0,t,0,r,c),b={unpatchedConsole:e,internalLogger:t,config:n,metas:r,transports:c,tracesApi:y,actionBuffer:d,getMessage:m};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},y),h(b)),function({internalLogger:e,metas:t}){let n,r,i,a;e.debug("Initializing meta API");const s=e=>{r&&t.remove(r),r={user:e},t.add(r)},l=(e,r)=>{var i;const a=null==r?void 0:r.overrides,s=a?{overrides:Object.assign(Object.assign({},null===(i=null==n?void 0:n.session)||void 0===i?void 0:i.overrides),a)}:{};n&&t.remove(n),n={session:Object.assign(Object.assign({},(0,o.Im)(e)?void 0:e),s)},t.add(n)},u=()=>t.value.session,c=()=>t.value.page;return{setUser:s,resetUser:s,setSession:l,resetSession:l,getSession:u,setView:(e,n)=>{var r;if((null==n?void 0:n.overrides)&&l(u(),{overrides:n.overrides}),(null===(r=null==i?void 0:i.view)||void 0===r?void 0:r.name)===(null==e?void 0:e.name))return;const a=i;i={view:e},t.add(i),a&&t.remove(a)},getView:()=>t.value.view,setPage:e=>{var n;const r=(0,o.Kg)(e)?Object.assign(Object.assign({},null!==(n=null==a?void 0:a.page)&&void 0!==n?n:c()),{id:e}):e;a&&t.remove(a),a={page:r},t.add(a)},getPage:c}}(b)),function({internalLogger:e,config:t,metas:n,transports:r,tracesApi:c,actionBuffer:d,getMessage:h}){var m;e.debug("Initializing logs API");let g=null;const v=null!==(m=t.logArgsSerializer)&&void 0!==m?m:f.Z;return{pushLog:(f,{context:m,level:y,skipDedupe:b,spanContext:w,timestampOverwriteMs:S}={})=>{try{const x=(0,a.Ti)(m),E={type:i.f.LOG,payload:{message:v(f),level:null!=y?y:p.Ic,context:(0,o.Im)(x)?void 0:x,timestamp:S?(0,s.q5)(S):(0,s.mI)(),trace:w?{trace_id:w.traceId,span_id:w.spanId}:c.getTraceContext()},meta:n.value},_={message:E.payload.message,level:E.payload.level,context:E.payload.context};if(!b&&t.dedupe&&!(0,o.kZ)(g)&&(0,l.b)(_,g))return void e.debug("Skipping log push because it is the same as the last one\n",E.payload);g=_,e.debug("Pushing log\n",E);const O=h();O&&O.type===u.OV?d.addItem(E):r.execute(E)}catch(t){e.error("Error pushing log\n",t)}}}}(b)),function({internalLogger:e,config:t,metas:n,transports:r,tracesApi:c,actionBuffer:d,getMessage:h}){e.debug("Initializing measurements API");let p=null;return{pushMeasurement:(f,{skipDedupe:m,context:g,spanContext:v,timestampOverwriteMs:y}={})=>{try{const b=(0,a.Ti)(g),w={type:i.f.MEASUREMENT,payload:Object.assign(Object.assign({},f),{trace:v?{trace_id:v.traceId,span_id:v.spanId}:c.getTraceContext(),timestamp:y?(0,s.q5)(y):(0,s.mI)(),context:(0,o.Im)(b)?void 0:b}),meta:n.value},S={type:w.payload.type,values:w.payload.values,context:w.payload.context};if(!m&&t.dedupe&&!(0,o.kZ)(p)&&(0,l.b)(S,p))return void e.debug("Skipping measurement push because it is the same as the last one\n",w.payload);p=S,e.debug("Pushing measurement\n",w);const x=h();x&&x.type===u.OV?d.addItem(w):r.execute(w)}catch(t){e.error("Error pushing measurement\n",t)}}}}(b)),function({internalLogger:e,config:t,metas:n,transports:r,tracesApi:c,actionBuffer:d,getMessage:h}){let p=null;return{pushEvent:(f,m,g,{skipDedupe:v,spanContext:y,timestampOverwriteMs:b,customPayloadTransformer:w=e=>e}={})=>{try{const S=(0,a.Ti)(m),x={meta:n.value,payload:w({name:f,domain:null!=g?g:t.eventDomain,attributes:(0,o.Im)(S)?void 0:S,timestamp:b?(0,s.q5)(b):(0,s.mI)(),trace:y?{trace_id:y.traceId,span_id:y.spanId}:c.getTraceContext()}),type:i.f.EVENT},E={name:x.payload.name,attributes:x.payload.attributes,domain:x.payload.domain};if(!v&&t.dedupe&&!(0,o.kZ)(p)&&(0,l.b)(E,p))return void e.debug("Skipping event push because it is the same as the last one\n",x.payload);p=E,e.debug("Pushing event\n",x);const _=h();_&&_.type===u.OV?d.addItem(x):r.execute(x)}catch(t){e.error("Error pushing event",t)}}}}(b))}},3191:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=e=>e.map((e=>{try{return String(e)}catch(e){return""}})).join(" ")},1717:(e,t,n)=>{"use strict";n.d(t,{y:()=>r});const r="unknown"},9402:(e,t,n)=>{"use strict";n.d(t,{H:()=>a});var r=n(8964),i=n(8578);class a{constructor(){this.unpatchedConsole=i.Z,this.internalLogger=r.vc,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)}}},5004:(e,t,n)=>{"use strict";n.d(t,{J:()=>r});const r="undefined"!=typeof globalThis?globalThis:void 0!==n.g?n.g:"undefined"!=typeof self?self:void 0},8964:(e,t,n)=>{"use strict";n.d(t,{vI:()=>o,vc:()=>a,wK:()=>r});var r,i=n(8203);!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"}(r||(r={}));const a={debug:i.l,error:i.l,info:i.l,prefix:"Faro",warn:i.l},o=r.ERROR},9552:(e,t,n)=>{"use strict";n.d(t,{rI:()=>o,N2:()=>a});var r=n(5004);const i="_faroInternal";function a(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(r.J,i,{configurable:!1,enumerable:!1,writable:!1,value:e}))}function o(){return i in r.J}},259:(e,t,n)=>{"use strict";n.d(t,{P:()=>a,A:()=>o});var r=n(5004);var i=n(9552);let a={};function o(e,t,n,o,s,l,u){return t.debug("Initializing Faro"),a={api:l,config:n,instrumentations:u,internalLogger:t,metas:o,pause:s.pause,transports:s,unpatchedConsole:e,unpause:s.unpause},(0,i.N2)(a),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 r.J)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(r.J,e.config.globalObjectKey,{configurable:!1,writable:!1,value:e})}}(a),a}},4481:(e,t,n)=>{"use strict";n.d(t,{Td:()=>o,Vl:()=>i,ki:()=>a,nT:()=>s,wM:()=>r});const r="view_changed",i="session_start",a="session_resume",o="session_extend",s="service_name_override"},4915:(e,t,n)=>{"use strict";var r;n.d(t,{J:()=>i,f:()=>r}),function(e){e.EXCEPTION="exception",e.LOG="log",e.MEASUREMENT="measurement",e.TRACE="trace",e.EVENT="event"}(r||(r={}));const i={[r.EXCEPTION]:"exceptions",[r.LOG]:"logs",[r.MEASUREMENT]:"measurements",[r.TRACE]:"traces",[r.EVENT]:"events"}},8578:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=Object.assign({},console)},9607:(e,t,n)=>{"use strict";function r(){return Date.now()}function i(){return(new Date).toISOString()}function a(e){return new Date(e).toISOString()}n.d(t,{mI:()=>i,q5:()=>a,x3:()=>r})},7697:(e,t,n)=>{"use strict";n.d(t,{b:()=>i});var r=n(2019);function i(e,t){if(e===t)return!0;if((0,r.Ed)(e,"number")&&isNaN(e))return(0,r.Ed)(t,"number")&&isNaN(t);const n=(0,r.cy)(e),a=(0,r.cy)(t);if(n!==a)return!1;if(n&&a){const n=e.length;if(n!==t.length)return!1;for(let r=n;0!=r--;)if(!i(e[r],t[r]))return!1;return!0}const o=(0,r.Gv)(e),s=(0,r.Gv)(t);if(o!==s)return!1;if(e&&t&&o&&s){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let e of n)if(!r.includes(e))return!1;for(let r of n)if(!i(e[r],t[r]))return!1;return!0}return!1}},2019:(e,t,n)=>{"use strict";function r(e,t){return typeof e===t}function i(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function a(e,t){try{return e instanceof t}catch(e){return!1}}n.d(t,{Ed:()=>r,Et:()=>l,Gv:()=>c,Im:()=>S,Kg:()=>s,Lm:()=>u,T2:()=>y,Tn:()=>d,bJ:()=>v,cy:()=>h,kZ:()=>o,pp:()=>b,sO:()=>p,wX:()=>w,xH:()=>m});const o=e=>r(e,"null"),s=e=>r(e,"string"),l=e=>r(e,"number")&&!isNaN(e)||r(e,"bigint"),u=e=>r(e,"boolean"),c=e=>!o(e)&&r(e,"object"),d=e=>r(e,"function"),h=e=>i(e,"Array"),p=e=>!c(e)&&!d(e),f="undefined"!=typeof Event,m=e=>f&&a(e,Event),g="undefined"!=typeof Error,v=e=>g&&a(e,Error),y=e=>i(e,"ErrorEvent"),b=e=>i(e,"DOMError"),w=e=>i(e,"DOMException");function S(e){return null==e||(h(e)||s(e)?0===e.length:!!c(e)&&0===Object.keys(e).length)}},129:(e,t,n)=>{"use strict";n.d(t,{Ti:()=>a,xD:()=>i});var r=n(2019);function i(e={}){return JSON.stringify(null!=e?e:{},function(){const e=new WeakSet;return function(t,n){if((0,r.Gv)(n)&&null!==n){if(e.has(n))return null;e.add(n)}return n}}())}function a(e={}){const t={};for(const[n,a]of Object.entries(e))t[n]=(0,r.Gv)(a)&&null!==a?i(a):String(a);return t}},5438:(e,t,n)=>{"use strict";var r;n.d(t,{$b:()=>r,HT:()=>a,Ic:()=>i}),function(e){e.TRACE="trace",e.DEBUG="debug",e.INFO="info",e.LOG="log",e.WARN="warn",e.ERROR="error"}(r||(r={}));const i=r.LOG,a=[r.TRACE,r.DEBUG,r.INFO,r.LOG,r.WARN,r.ERROR]},8203:(e,t,n)=>{"use strict";function r(){}n.d(t,{l:()=>r})},3116:(e,t,n)=>{"use strict";n.d(t,{c:()=>r});class r{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 r,t=t=>{e.notify(t),n.unsubscribe()},n=this.subscribe(t),i=e.unsubscribe.bind(e);return this.withUnsubscribeOverride(e,i,t)}takeWhile(e){const t=new r,n=r=>{e(r)?t.notify(r):t.unsubscribe(n)};this.subscribe(n);const i=t.unsubscribe.bind(t);return this.withUnsubscribeOverride(t,i,n)}filter(e){const t=new r,n=n=>{e(n)&&t.notify(n)};this.subscribe(n);const i=t.unsubscribe.bind(t);return this.withUnsubscribeOverride(t,i,n)}merge(...e){const t=new r,n=[];e.forEach((e=>{const r=e.subscribe((e=>{t.notify(e)}));n.push(r)}));const i=t.unsubscribeAll.bind(t);return t.unsubscribe=()=>{n.forEach((e=>e.unsubscribe())),i()},t}withUnsubscribeOverride(e,t,n){return e.unsubscribe=e=>{t(e),this.unsubscribe(n)},e}unsubscribeAll(){this.subscribers=[]}}},152:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});const r="abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789";function i(e=10){return Array.from(Array(e)).map((()=>r[Math.floor(Math.random()*r.length)])).join("")}},1685:(e,t,n)=>{"use strict";n.d(t,{x:()=>r});const r="1.19.0"},7276:(e,t,n)=>{"use strict";n.d(t,{w:()=>Sn});var r=n(9402);class i extends r.H{constructor(){super(...arguments),this.api={},this.transports={}}}var a=n(1685),o=n(259),s=n(9607),l=n(152),u=n(8981),c=n(4557),d=n(3116),h=n(129),p=n(2081);var f=n(2019);function m(e=""){return o.P.transports.transports.flatMap((e=>e.getIgnoreUrls())).some((t=>e&&null!=e.match(t)))}const g="fetch",v="xhr";function y(){const e=new d.c;function t(t){e.notify({type:p.HU,request:t})}function n(t){e.notify({type:p.IU,request:t})}return function({onRequestEnd:e,onRequestStart:t}){const n=window.fetch;window.fetch=function(){var r,i;const a=null!==(o=arguments[0],r=(0,f.Kg)(o)?o:o instanceof URL?o.href:!(0,f.Im)(o)&&(0,f.Tn)(null==o?void 0:o.toString)?o.toString():void 0)&&void 0!==r?r:"";var o;const s=m(a),u=(null!==(i=arguments[1])&&void 0!==i?i:{}).method,c=(0,l.S)();return s||t({url:a,method:u,requestId:c,apiType:g}),n.apply(this,arguments).then((t=>(s||e({url:a,method:u,requestId:c,apiType:g}),t))).catch((t=>{throw s||e({url:a,method:u,requestId:c,apiType:g}),t}))}}({onRequestStart:t,onRequestEnd:n}),function({onRequestStart:e,onRequestEnd:t}){const n=XMLHttpRequest.prototype.open;XMLHttpRequest.prototype.open=function(){const r=arguments[1],i=m(r),a=arguments[0],o=(0,l.S)();this.addEventListener("loadstart",(function(){i||e({url:r,method:a,requestId:o,apiType:v})})),this.addEventListener("load",(function(){i||t({url:r,method:a,requestId:o,apiType:v})})),this.addEventListener("error",(function(){i||t({url:r,method:a,requestId:o,apiType:v})})),this.addEventListener("abort",(function(){i||t({url:r,method:a,requestId:o,apiType:v})})),n.apply(this,arguments)}}({onRequestStart:t,onRequestEnd:n}),e}var b=n(1717),w=n(550);const S="com.grafana.faro.lastNavigationId",x="resource",E=/^00-[a-f0-9]{32}-[a-f0-9]{16}-[0-9]{1,2}$/;function _(e=[]){for(const t of e)if("traceparent"===t.name){if(!E.test(t.description))continue;const[,e,n]=t.description.split("-");if(null!=e&&null!=n)return{traceId:e,spanId:n};break}}function O(e,t={}){for(const[n,r]of Object.entries(t)){const t=e[n];return null!=t&&((0,f.cy)(r)?r.includes(t):t===r)}return!0}function T(e){const{connectEnd:t,connectStart:n,decodedBodySize:r,domainLookupEnd:i,domainLookupStart:a,duration:o,encodedBodySize:s,fetchStart:l,initiatorType:u,name:c,nextHopProtocol:d,redirectEnd:h,redirectStart:p,renderBlockingStatus:f,requestStart:m,responseEnd:g,responseStart:v,responseStatus:y,secureConnectionStart:b,transferSize:w,workerStart:S}=e;return{name:c,duration:C(o),tcpHandshakeTime:C(t-n),dnsLookupTime:C(i-a),tlsNegotiationTime:C(t-b),responseStatus:C(y),redirectTime:C(h-p),requestTime:C(v-m),responseTime:C(g-v),fetchTime:C(g-l),serviceWorkerTime:C(l-S),decodedBodySize:C(r),encodedBodySize:C(s),cacheHitStatus:function(){let e="fullLoad";0===w?r>0&&(e="cache"):null!=y?304===y&&(e="conditionalFetch"):s>0&&w<s&&(e="conditionalFetch");return e}(),renderBlockingStatus:C(f),protocol:d,initiatorType:u,visibilityState:document.visibilityState,ttfb:C(v-m),transferSize:C(w)}}function k(e){const{activationStart:t,domComplete:n,domContentLoadedEventEnd:r,domContentLoadedEventStart:i,domInteractive:a,fetchStart:o,loadEventEnd:s,loadEventStart:l,responseStart:u,type:c}=e,d=function(){var e;if(null!=(null===(e=performance.timing)||void 0===e?void 0:e.domLoading))return performance.timing.domLoading-performance.timeOrigin;return null}();return Object.assign(Object.assign({},T(e)),{pageLoadTime:C(n-o),documentParsingTime:C(d?a-d:null),domProcessingTime:C(n-a),domContentLoadHandlerTime:C(r-i),onLoadTime:C(s-l),ttfb:C(Math.max(u-(null!=t?t:0),0)),type:c})}function C(e){return null==e?b.y:"number"==typeof e?Math.round(e>0?e:0).toString():e.toString()}const A={initiatorType:["xmlhttprequest","fetch"]};var D=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};const R=new d.c;class I extends i{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-performance",this.version=a.x}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)}}((()=>D(this,void 0,void 0,(function*(){const e=this.api.pushEvent,{faroNavigationId:t}=yield function(e){let t;const n=new Promise((e=>{t=e}));return new PerformanceObserver((n=>{var r;const[i]=n.getEntries();if(null==i||m(i.name))return;const a=i.toJSON();let o=_(null==a?void 0:a.serverTiming);const s=null!==(r=(0,w.Gq)(S,w.Uy.session))&&void 0!==r?r:b.y,u=Object.assign(Object.assign({},k(a)),{faroNavigationId:(0,l.S)(),faroPreviousNavigationId:s});(0,w.SO)(S,u.faroNavigationId,w.Uy.session),e("faro.performance.navigation",u,void 0,{spanContext:o,timestampOverwriteMs:performance.timeOrigin+a.startTime}),t(u)})).observe({type:"navigation",buffered:!0}),n}(e);null!=t&&function(e,t,n){const r=o.P.config.trackResources;new PerformanceObserver((i=>{const a=i.getEntries();for(const i of a){if(m(i.name))return;const a=i.toJSON();let s=_(null==a?void 0:a.serverTiming);if(null==r&&O(a,A)||r){const r=Object.assign(Object.assign({},T(a)),{faroNavigationId:e,faroResourceId:(0,l.S)()});o.P.config.trackUserActionsPreview&&(null==n||n.notify({type:x})),t("faro.performance.resource",r,void 0,{spanContext:s,timestampOverwriteMs:performance.timeOrigin+a.startTime})}}})).observe({type:x,buffered:!0})}(t,e,R)})))):this.logDebug("performance observer not supported. Disable performance instrumentation.")}}function P(e){const{api:t,config:n}=e,r=y(),i=function(){const e=new d.c;return new MutationObserver(((t,n)=>{e.notify({type:p.I1})})).observe(document,{attributes:!0,childList:!0,subtree:!0,characterData:!0}),e}(),a=function(){const e=new d.c;return R.subscribe((t=>{t.type===x&&e.notify({type:p.vb})})),e}();let o,h=!1;return function(e){var f;let m;const g=(v=e).type===p.sk&&"string"==typeof v.name;var v;if(m=g?e.name:function(e,t){const n=function(e){const t=e.split("data-")[1],n=null==t?void 0:t.replace(/-(.)/g,((e,t)=>t.toUpperCase()));return null==n?void 0:n.replace(/-/g,"")}(t),r=e.dataset;for(const e in r)if(e===n)return r[e];return}(e.target,null!==(f=n.trackUserActionsDataAttributeName)&&void 0!==f?f:p.jJ),h||null==m)return;h=!0;const y=(0,s.x3)();let b;const w=(0,l.S)();u.Q.notify({type:c.OV,name:m,startTime:y,parentId:w}),o=j(o,(()=>{b=(0,s.x3)(),h=!1,function(e,t){u.Q.notify({type:c._G,name:e,parentId:t})}(m,w)}),100);const S=new Map;let x,E=!1;const _=(new d.c).merge(r,i,a).takeWhile((()=>h)).filter((e=>!!(!E||M(e)&&S.has(e.request.requestId)))).subscribe((n=>{(function(e){return e.type===p.HU})(n)&&S.set(n.request.requestId,n.request),M(n)&&S.delete(n.request.requestId),o=j(o,(()=>{b=(0,s.x3)();const n=Object.assign({api:t,userActionName:m,startTime:y,endTime:b,actionId:w,event:e},g?{attributes:e.attributes}:{}),r=S.size>0;E&&!r&&(clearTimeout(x),E=!1),r?(E=!0,u.Q.notify({type:c.vX,name:m,parentId:w,reason:"pending-requests",haltTime:(0,s.x3)()}),x=j(void 0,(()=>{L(_),N(n),h=!1,E=!1}),1e4)):(L(_),N(n),h=!1,E=!1)}),100)}))}}function N(e){const{api:t,userActionName:n,startTime:r,endTime:i,actionId:a,event:o,attributes:s}=e,l=i-r,d=o.type;u.Q.notify({type:c.$g,name:n,id:a,startTime:r,endTime:i,duration:l,eventType:d}),t.pushEvent(n,Object.assign({userActionStartTime:r.toString(),userActionEndTime:i.toString(),userActionDuration:l.toString(),userActionTrigger:d},(0,h.Ti)(s)),void 0,{timestampOverwriteMs:r,customPayloadTransformer:e=>(e.action={id:a,name:n},e)})}function j(e,t,n){return e&&clearTimeout(e),e=setTimeout((()=>{t()}),n)}function L(e){null==e||e.unsubscribe(),e=void 0}function M(e){return e.type===p.IU}let F;class V extends i{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-user-action",this.version=a.x}initialize(){F=P(o.P),window.addEventListener("pointerdown",F),window.addEventListener("keydown",F)}}const $="DOMError",B="DOMException",z="Non-Error exception captured with keys:",U="?",q=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;var H=n(3890);var G=n(4151),W=n(3867);function Q(e){let t,n,r,i,a=[];if((0,f.T2)(e)&&e.error)t=e.error.message,n=e.error.name,a=(0,G.D)(e.error);else if((r=(0,f.pp)(e))||(0,f.wX)(e)){const{name:i,message:a}=e;n=null!=i?i:r?$:B,t=a?`${n}: ${a}`:n}else(0,f.bJ)(e)?(t=e.message,a=(0,G.D)(e)):((0,f.Gv)(e)||(i=(0,f.xH)(e)))&&(n=i?e.constructor.name:void 0,t=`${z} ${Object.keys(e)}`);return[t,n,a]}function K(e){const[t,n,r,i,a]=e;let o,s,l=[];const u=(0,f.Kg)(t),c=(0,W.S)(n,U,r,i);return a||!u?([o,s,l]=Q(null!=a?a:t),0===l.length&&(l=[c])):u&&([o,s]=function(e){var t,n;const r=e.match(q),i=null!==(t=null==r?void 0:r[1])&&void 0!==t?t:H.x;return[null!==(n=null==r?void 0:r[2])&&void 0!==n?n:e,i]}(t),l=[c]),{value:o,type:s,stackFrames:l}}function X(e,t){return(0,f.bJ)(e[0])?K(e):{value:t(e)}}class Y extends i{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-errors",this.version=a.x}initialize(){var e;this.logDebug("Initializing"),function(e){const t=window.onerror;window.onerror=(...n)=>{try{const{value:t,type:r,stackFrames:i}=K(n),a=n[4];if(t){const n={type:r,stackFrames:i};null!=a&&(n.originalError=a),e.pushError(new Error(t),n)}}finally{null==t||t.apply(window,n)}}}(this.api),e=this.api,window.addEventListener("unhandledrejection",(t=>{var n,r;let i,a,o=t;o.reason?o=t.reason:(null===(n=t.detail)||void 0===n?void 0:n.reason)&&(o=null===(r=t.detail)||void 0===r?void 0:r.reason);let s=[];(0,f.sO)(o)?(i=`Non-Error promise rejection captured with value: ${String(o)}`,a="UnhandledRejection"):[i,a,s]=Q(o),i&&e.pushError(new Error(i),{type:a,stackFrames:s})}))}}var J,Z,ee,te,ne,re=-1,ie=function(e){addEventListener("pageshow",(function(t){t.persisted&&(re=t.timeStamp,e(t))}),!0)},ae=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},oe=function(){var e=ae();return e&&e.activationStart||0},se=function(e,t){var n=ae(),r="navigate";return re>=0?r="back-forward-cache":n&&(document.prerendering||oe()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},le=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},ue=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},ce=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},de=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},he=function(e){var t=!1;return function(){t||(e(),t=!0)}},pe=-1,fe=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},me=function(e){"hidden"===document.visibilityState&&pe>-1&&(pe="visibilitychange"===e.type?e.timeStamp:0,ve())},ge=function(){addEventListener("visibilitychange",me,!0),addEventListener("prerenderingchange",me,!0)},ve=function(){removeEventListener("visibilitychange",me,!0),removeEventListener("prerenderingchange",me,!0)},ye=function(){return pe<0&&(pe=fe(),ge(),ie((function(){setTimeout((function(){pe=fe(),ge()}),0)}))),{get firstHiddenTime(){return pe}}},be=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},we=[1800,3e3],Se=function(e,t){t=t||{},be((function(){var n,r=ye(),i=se("FCP"),a=le("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(a.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-oe(),0),i.entries.push(e),n(!0)))}))}));a&&(n=ue(e,i,we,t.reportAllChanges),ie((function(r){i=se("FCP"),n=ue(e,i,we,t.reportAllChanges),ce((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))},xe=[.1,.25],Ee=0,_e=1/0,Oe=0,Te=function(e){e.forEach((function(e){e.interactionId&&(_e=Math.min(_e,e.interactionId),Oe=Math.max(Oe,e.interactionId),Ee=Oe?(Oe-_e)/7+1:0)}))},ke=function(){"interactionCount"in performance||J||(J=le("event",Te,{type:"event",buffered:!0,durationThreshold:0}))},Ce=[],Ae=new Map,De=0,Re=function(){return(J?Ee:performance.interactionCount||0)-De},Ie=[],Pe=function(e){if(Ie.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Ce[Ce.length-1],n=Ae.get(e.interactionId);if(n||Ce.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Ae.set(r.id,r),Ce.push(r)}Ce.sort((function(e,t){return t.latency-e.latency})),Ce.length>10&&Ce.splice(10).forEach((function(e){return Ae.delete(e.id)}))}}},Ne=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=he(e),"hidden"===document.visibilityState?e():(n=t(e),de(e)),n},je=[200,500],Le=[2500,4e3],Me={},Fe=[800,1800],Ve=function e(t){document.prerendering?be((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},$e={passive:!0,capture:!0},Be=new Date,ze=function(e,t){Z||(Z=t,ee=e,te=new Date,He(removeEventListener),Ue())},Ue=function(){if(ee>=0&&ee<te-Be){var e={entryType:"first-input",name:Z.type,target:Z.target,cancelable:Z.cancelable,startTime:Z.timeStamp,processingStart:Z.timeStamp+ee};ne.forEach((function(t){t(e)})),ne=[]}},qe=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){ze(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,$e),removeEventListener("pointercancel",r,$e)};addEventListener("pointerup",n,$e),addEventListener("pointercancel",r,$e)}(t,e):ze(t,e)}},He=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,qe,$e)}))},Ge=[100,300];class We{constructor(e,t){this.pushMeasurement=e,this.webVitalConfig=t}initialize(){Object.entries(We.mapping).forEach((([e,t])=>{var n;t((t=>{this.pushMeasurement({type:"web-vitals",values:{[e]:t.value}})}),{reportAllChanges:null===(n=this.webVitalConfig)||void 0===n?void 0:n.reportAllChanges})}))}}We.mapping={cls:function(e,t){t=t||{},Se(he((function(){var n,r=se("CLS",0),i=0,a=[],o=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=a[0],n=a[a.length-1];i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e])}})),i>r.value&&(r.value=i,r.entries=a,n())},s=le("layout-shift",o);s&&(n=ue(e,r,xe,t.reportAllChanges),de((function(){o(s.takeRecords()),n(!0)})),ie((function(){i=0,r=se("CLS",0),n=ue(e,r,xe,t.reportAllChanges),ce((function(){return n()}))})),setTimeout(n,0))})))},fcp:Se,fid:function(e,t){t=t||{},be((function(){var n,r=ye(),i=se("FID"),a=function(e){e.startTime<r.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),n(!0))},o=function(e){e.forEach(a)},s=le("first-input",o);n=ue(e,i,Ge,t.reportAllChanges),s&&(de(he((function(){o(s.takeRecords()),s.disconnect()}))),ie((function(){var r;i=se("FID"),n=ue(e,i,Ge,t.reportAllChanges),ne=[],ee=-1,Z=null,He(addEventListener),r=a,ne.push(r),Ue()})))}))},inp:function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},be((function(){var n;ke();var r,i=se("INP"),a=function(e){Ne((function(){e.forEach(Pe);var t,n=(t=Math.min(Ce.length-1,Math.floor(Re()/50)),Ce[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())}))},o=le("event",a,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=ue(e,i,je,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),de((function(){a(o.takeRecords()),r(!0)})),ie((function(){De=0,Ce.length=0,Ae.clear(),i=se("INP"),r=ue(e,i,je,t.reportAllChanges)})))})))},lcp:function(e,t){t=t||{},be((function(){var n,r=ye(),i=se("LCP"),a=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-oe(),0),i.entries=[e],n())}))},o=le("largest-contentful-paint",a);if(o){n=ue(e,i,Le,t.reportAllChanges);var s=he((function(){Me[i.id]||(a(o.takeRecords()),o.disconnect(),Me[i.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return Ne(s)}),!0)})),de(s),ie((function(r){i=se("LCP"),n=ue(e,i,Le,t.reportAllChanges),ce((function(){i.value=performance.now()-r.timeStamp,Me[i.id]=!0,n(!0)}))}))}}))},ttfb:function(e,t){t=t||{};var n=se("TTFB"),r=ue(e,n,Fe,t.reportAllChanges);Ve((function(){var i=ae();i&&(n.value=Math.max(i.responseStart-oe(),0),n.entries=[i],r(!0),ie((function(){n=se("TTFB",0),(r=ue(e,n,Fe,t.reportAllChanges))(!0)})))}))}};var Qe,Ke,Xe,Ye=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Je=function(e){if("loading"===document.readyState)return"loading";var t=Ye();if(t){if(e<t.domInteractive)return"loading";if(0===t.domContentLoadedEventStart||e<t.domContentLoadedEventStart)return"dom-interactive";if(0===t.domComplete||e<t.domComplete)return"dom-content-loaded"}return"complete"},Ze=function(e){var t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},et=function(e,t){var n="";try{for(;e&&9!==e.nodeType;){var r=e,i=r.id?"#"+r.id:Ze(r)+(r.classList&&r.classList.value&&r.classList.value.trim()&&r.classList.value.trim().length?"."+r.classList.value.trim().replace(/\s+/g,"."):"");if(n.length+i.length>(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},tt=-1,nt=function(){return tt},rt=function(e){addEventListener("pageshow",(function(t){t.persisted&&(tt=t.timeStamp,e(t))}),!0)},it=function(){var e=Ye();return e&&e.activationStart||0},at=function(e,t){var n=Ye(),r="navigate";return nt()>=0?r="back-forward-cache":n&&(document.prerendering||it()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},ot=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},st=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},lt=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},ut=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},ct=function(e){var t=!1;return function(){t||(e(),t=!0)}},dt=-1,ht=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},pt=function(e){"hidden"===document.visibilityState&&dt>-1&&(dt="visibilitychange"===e.type?e.timeStamp:0,mt())},ft=function(){addEventListener("visibilitychange",pt,!0),addEventListener("prerenderingchange",pt,!0)},mt=function(){removeEventListener("visibilitychange",pt,!0),removeEventListener("prerenderingchange",pt,!0)},gt=function(){return dt<0&&(dt=ht(),ft(),rt((function(){setTimeout((function(){dt=ht(),ft()}),0)}))),{get firstHiddenTime(){return dt}}},vt=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},yt=[1800,3e3],bt=function(e,t){t=t||{},vt((function(){var n,r=gt(),i=at("FCP"),a=ot("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(a.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-it(),0),i.entries.push(e),n(!0)))}))}));a&&(n=st(e,i,yt,t.reportAllChanges),rt((function(r){i=at("FCP"),n=st(e,i,yt,t.reportAllChanges),lt((function(){i.value=performance.now()-r.timeStamp,n(!0)}))})))}))},wt=[.1,.25],St=0,xt=1/0,Et=0,_t=function(e){e.forEach((function(e){e.interactionId&&(xt=Math.min(xt,e.interactionId),Et=Math.max(Et,e.interactionId),St=Et?(Et-xt)/7+1:0)}))},Ot=[],Tt=new Map,kt=0,Ct=[],At=function(e){if(Ct.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=Ot[Ot.length-1],n=Tt.get(e.interactionId);if(n||Ot.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Tt.set(r.id,r),Ot.push(r)}Ot.sort((function(e,t){return t.latency-e.latency})),Ot.length>10&&Ot.splice(10).forEach((function(e){return Tt.delete(e.id)}))}}},Dt=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=ct(e),"hidden"===document.visibilityState?e():(n=t(e),ut(e)),n},Rt=[200,500],It=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},vt((function(){var n;"interactionCount"in performance||Qe||(Qe=ot("event",_t,{type:"event",buffered:!0,durationThreshold:0}));var r,i=at("INP"),a=function(e){Dt((function(){e.forEach(At);var t,n=(t=Math.min(Ot.length-1,Math.floor(((Qe?St:performance.interactionCount||0)-kt)/50)),Ot[t]);n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())}))},o=ot("event",a,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=st(e,i,Rt,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),ut((function(){a(o.takeRecords()),r(!0)})),rt((function(){kt=0,Ot.length=0,Tt.clear(),i=at("INP"),r=st(e,i,Rt,t.reportAllChanges)})))})))},Pt=[],Nt=[],jt=new WeakMap,Lt=new Map,Mt=-1,Ft=function(e){Pt=Pt.concat(e),Vt()},Vt=function(){Mt<0&&(Mt=Dt($t))},$t=function(){Lt.size>10&&Lt.forEach((function(e,t){Tt.has(t)||Lt.delete(t)}));var e=Ot.map((function(e){return jt.get(e.entries[0])})),t=Nt.length-50;Nt=Nt.filter((function(n,r){return r>=t||e.includes(n)}));for(var n=new Set,r=0;r<Nt.length;r++){var i=Nt[r];Ht(i.startTime,i.processingEnd).forEach((function(e){n.add(e)}))}for(var a=0;a<50;a++){var o=Pt[Pt.length-1-a];if(!o||o.startTime<Xe)break;n.add(o)}Pt=Array.from(n),Mt=-1};Ct.push((function(e){e.interactionId&&e.target&&!Lt.has(e.interactionId)&&Lt.set(e.interactionId,e.target)}),(function(e){var t,n=e.startTime+e.duration;Xe=Math.max(Xe,e.processingEnd);for(var r=Nt.length-1;r>=0;r--){var i=Nt[r];if(Math.abs(n-i.renderTime)<=8){(t=i).startTime=Math.min(e.startTime,t.startTime),t.processingStart=Math.min(e.processingStart,t.processingStart),t.processingEnd=Math.max(e.processingEnd,t.processingEnd),t.entries.push(e);break}}t||(t={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:n,entries:[e]},Nt.push(t)),(e.interactionId||"first-input"===e.entryType)&&jt.set(e,t),Vt()}));var Bt,zt,Ut,qt,Ht=function(e,t){for(var n,r=[],i=0;n=Pt[i];i++)if(!(n.startTime+n.duration<e)){if(n.startTime>t)break;r.push(n)}return r},Gt=[2500,4e3],Wt={},Qt=[800,1800],Kt=function e(t){document.prerendering?vt((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Xt=function(e,t){t=t||{};var n=at("TTFB"),r=st(e,n,Qt,t.reportAllChanges);Kt((function(){var i=Ye();i&&(n.value=Math.max(i.responseStart-it(),0),n.entries=[i],r(!0),rt((function(){n=at("TTFB",0),(r=st(e,n,Qt,t.reportAllChanges))(!0)})))}))},Yt={passive:!0,capture:!0},Jt=new Date,Zt=function(e,t){Bt||(Bt=t,zt=e,Ut=new Date,nn(removeEventListener),en())},en=function(){if(zt>=0&&zt<Ut-Jt){var e={entryType:"first-input",name:Bt.type,target:Bt.target,cancelable:Bt.cancelable,startTime:Bt.timeStamp,processingStart:Bt.timeStamp+zt};qt.forEach((function(t){t(e)})),qt=[]}},tn=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){Zt(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,Yt),removeEventListener("pointercancel",r,Yt)};addEventListener("pointerup",n,Yt),addEventListener("pointercancel",r,Yt)}(t,e):Zt(t,e)}},nn=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,tn,Yt)}))},rn=[100,300],an=function(e,t){!function(e,t){t=t||{},vt((function(){var n,r=gt(),i=at("FID"),a=function(e){e.startTime<r.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),n(!0))},o=function(e){e.forEach(a)},s=ot("first-input",o);n=st(e,i,rn,t.reportAllChanges),s&&(ut(ct((function(){o(s.takeRecords()),s.disconnect()}))),rt((function(){var r;i=at("FID"),n=st(e,i,rn,t.reportAllChanges),qt=[],zt=-1,Bt=null,nn(addEventListener),r=a,qt.push(r),en()})))}))}((function(t){var n=function(e){var t=e.entries[0],n={eventTarget:et(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:Je(t.startTime)};return Object.assign(e,{attribution:n})}(t);e(n)}),t)};const on="load_state",sn="time_to_first_byte";class ln{constructor(e,t){this.corePushMeasurement=e,this.webVitalConfig=t}initialize(){this.measureCLS(),this.measureFCP(),this.measureFID(),this.measureINP(),this.measureLCP(),this.measureTTFB()}measureCLS(){var e;!function(e,t){!function(e,t){t=t||{},bt(ct((function(){var n,r=at("CLS",0),i=0,a=[],o=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=a[0],n=a[a.length-1];i&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,a.push(e)):(i=e.value,a=[e])}})),i>r.value&&(r.value=i,r.entries=a,n())},s=ot("layout-shift",o);s&&(n=st(e,r,wt,t.reportAllChanges),ut((function(){o(s.takeRecords()),n(!0)})),rt((function(){i=0,r=at("CLS",0),n=st(e,r,wt,t.reportAllChanges),lt((function(){return n()}))})),setTimeout(n,0))})))}((function(t){var n=function(e){var t,n={};if(e.entries.length){var r=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(r&&r.sources&&r.sources.length){var i=(t=r.sources).find((function(e){return e.node&&1===e.node.nodeType}))||t[0];i&&(n={largestShiftTarget:et(i.node),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:i,largestShiftEntry:r,loadState:Je(r.startTime)})}}return Object.assign(e,{attribution:n})}(t);e(n)}),t)}((e=>{const{loadState:t,largestShiftValue:n,largestShiftTime:r,largestShiftTarget:i}=e.attribution,a=this.buildInitialValues(e);this.addIfPresent(a,"largest_shift_value",n),this.addIfPresent(a,"largest_shift_time",r);const o=this.buildInitialContext(e);this.addIfPresent(o,on,t),this.addIfPresent(o,"largest_shift_target",i),this.pushMeasurement(a,o)}),{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureFCP(){var e;!function(e,t){bt((function(t){var n=function(e){var t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:Je(nt())};if(e.entries.length){var n=Ye(),r=e.entries[e.entries.length-1];if(n){var i=n.activationStart||0,a=Math.max(0,n.responseStart-i);t={timeToFirstByte:a,firstByteToFCP:e.value-a,loadState:Je(e.entries[0].startTime),navigationEntry:n,fcpEntry:r}}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)}((e=>{const{firstByteToFCP:t,timeToFirstByte:n,loadState:r}=e.attribution,i=this.buildInitialValues(e);this.addIfPresent(i,"first_byte_to_fcp",t),this.addIfPresent(i,sn,n);const a=this.buildInitialContext(e);this.addIfPresent(a,on,r),this.pushMeasurement(i,a)}),{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureFID(){var e;an((e=>{const{eventTime:t,eventTarget:n,eventType:r,loadState:i}=e.attribution,a=this.buildInitialValues(e);this.addIfPresent(a,"event_time",t);const o=this.buildInitialContext(e);this.addIfPresent(o,"event_target",n),this.addIfPresent(o,"event_type",r),this.addIfPresent(o,on,i),this.pushMeasurement(a,o)}),{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureINP(){var e;!function(e,t){Ke||(Ke=ot("long-animation-frame",Ft)),It((function(t){var n=function(e){var t=e.entries[0],n=jt.get(t),r=t.processingStart,i=n.processingEnd,a=n.entries.sort((function(e,t){return e.processingStart-t.processingStart})),o=Ht(t.startTime,i),s=e.entries.find((function(e){return e.target})),l=s&&s.target||Lt.get(t.interactionId),u=[t.startTime+t.duration,i].concat(o.map((function(e){return e.startTime+e.duration}))),c=Math.max.apply(Math,u),d={interactionTarget:et(l),interactionTargetElement:l,interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:c,processedEventEntries:a,longAnimationFrameEntries:o,inputDelay:r-t.startTime,processingDuration:i-r,presentationDelay:Math.max(c-i,0),loadState:Je(t.startTime)};return Object.assign(e,{attribution:d})}(t);e(n)}),t)}((e=>{const{interactionTime:t,presentationDelay:n,inputDelay:r,processingDuration:i,nextPaintTime:a,loadState:o,interactionTarget:s,interactionType:l}=e.attribution,u=this.buildInitialValues(e);this.addIfPresent(u,"interaction_time",t),this.addIfPresent(u,"presentation_delay",n),this.addIfPresent(u,"input_delay",r),this.addIfPresent(u,"processing_duration",i),this.addIfPresent(u,"next_paint_time",a);const c=this.buildInitialContext(e);this.addIfPresent(c,on,o),this.addIfPresent(c,"interaction_target",s),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;!function(e,t){!function(e,t){t=t||{},vt((function(){var n,r=gt(),i=at("LCP"),a=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-it(),0),i.entries=[e],n())}))},o=ot("largest-contentful-paint",a);if(o){n=st(e,i,Gt,t.reportAllChanges);var s=ct((function(){Wt[i.id]||(a(o.takeRecords()),o.disconnect(),Wt[i.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return Dt(s)}),!0)})),ut(s),rt((function(r){i=at("LCP"),n=st(e,i,Gt,t.reportAllChanges),lt((function(){i.value=performance.now()-r.timeStamp,Wt[i.id]=!0,n(!0)}))}))}}))}((function(t){var n=function(e){var t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){var n=Ye();if(n){var r=n.activationStart||0,i=e.entries[e.entries.length-1],a=i.url&&performance.getEntriesByType("resource").filter((function(e){return e.name===i.url}))[0],o=Math.max(0,n.responseStart-r),s=Math.max(o,a?(a.requestStart||a.startTime)-r:0),l=Math.max(s,a?a.responseEnd-r:0),u=Math.max(l,i.startTime-r);t={element:et(i.element),timeToFirstByte:o,resourceLoadDelay:s-o,resourceLoadDuration:l-s,elementRenderDelay:u-l,navigationEntry:n,lcpEntry:i},i.url&&(t.url=i.url),a&&(t.lcpResourceEntry=a)}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)}((e=>{const{elementRenderDelay:t,resourceLoadDelay:n,resourceLoadDuration:r,timeToFirstByte:i,element:a}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"element_render_delay",t),this.addIfPresent(o,"resource_load_delay",n),this.addIfPresent(o,"resource_load_duration",r),this.addIfPresent(o,sn,i);const s=this.buildInitialContext(e);this.addIfPresent(s,"element",a),this.pushMeasurement(o,s)}),{reportAllChanges:null===(e=this.webVitalConfig)||void 0===e?void 0:e.reportAllChanges})}measureTTFB(){var e;!function(e,t){Xt((function(t){var n=function(e){var t={waitingDuration:0,cacheDuration:0,dnsDuration:0,connectionDuration:0,requestDuration:0};if(e.entries.length){var n=e.entries[0],r=n.activationStart||0,i=Math.max((n.workerStart||n.fetchStart)-r,0),a=Math.max(n.domainLookupStart-r,0),o=Math.max(n.connectStart-r,0),s=Math.max(n.connectEnd-r,0);t={waitingDuration:i,cacheDuration:a-i,dnsDuration:o-a,connectionDuration:s-o,requestDuration:e.value-s,navigationEntry:n}}return Object.assign(e,{attribution:t})}(t);e(n)}),t)}((e=>{const{dnsDuration:t,connectionDuration:n,requestDuration:r,waitingDuration:i,cacheDuration:a}=e.attribution,o=this.buildInitialValues(e);this.addIfPresent(o,"dns_duration",t),this.addIfPresent(o,"connection_duration",n),this.addIfPresent(o,"request_duration",r),this.addIfPresent(o,"waiting_duration",i),this.addIfPresent(o,"cache_duration",a);const s=this.buildInitialContext(e);this.pushMeasurement(o,s)}),{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 n=null!==(t=(0,w.Gq)(S,w.Uy.session))&&void 0!==t?t:b.y;return{id:e.id,rating:e.rating,navigation_type:e.navigationType,navigation_entry_id:n}}pushMeasurement(e,t){this.corePushMeasurement({type:"web-vitals",values:e},{context:t})}addIfPresent(e,t,n){n&&(e[t]=n)}}class un extends i{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-web-vitals",this.version=a.x}initialize(){this.logDebug("Initializing");this.intializeWebVitalsInstrumentation().initialize()}intializeWebVitalsInstrumentation(){var e,t,n;return!1===(null===(e=this.config)||void 0===e?void 0:e.trackWebVitalsAttribution)||!1===(null===(n=null===(t=this.config)||void 0===t?void 0:t.webVitalsInstrumentation)||void 0===n?void 0:n.trackAttribution)?new We(this.api.pushMeasurement,this.config.webVitalsInstrumentation):new ln(this.api.pushMeasurement,this.config.webVitalsInstrumentation)}}var cn=n(4481);var dn=n(3881),hn=n(6493),pn=n(4273),fn=n(6854);class mn extends i{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-session",this.version=a.x}sendSessionStartEvent(e){var t,n;const r=e.session;if(r&&r.id!==(null===(t=this.notifiedSession)||void 0===t?void 0:t.id)){if(this.notifiedSession&&this.notifiedSession.id===(null===(n=r.attributes)||void 0===n?void 0:n.previousSession))return this.api.pushEvent(cn.Td,{},void 0,{skipDedupe:!0}),void(this.notifiedSession=r);this.notifiedSession=r,this.api.pushEvent(cn.Vl,{},void 0,{skipDedupe:!0})}}createInitialSession(e,t){var n,r,i,a,u,c;let d,h,p=e.fetchUserSession();if(t.persistent&&t.maxSessionPersistenceTime&&p){const e=(0,s.x3)();p.lastActivity<e-t.maxSessionPersistenceTime&&(pn.G.removeUserSession(),p=null)}if((0,fn.OW)(p)){const e=null==p?void 0:p.sessionId;h=(0,fn.Bc)({sessionId:e,isSampled:p.isSampled||!1,started:null==p?void 0:p.started});const i=null==p?void 0:p.sessionMeta,a=Object.assign(Object.assign({},null===(n=t.session)||void 0===n?void 0:n.overrides),null==i?void 0:i.overrides);h.sessionMeta=Object.assign(Object.assign({},t.session),{id:e,attributes:Object.assign(Object.assign(Object.assign({},null===(r=t.session)||void 0===r?void 0:r.attributes),null==i?void 0:i.attributes),{isSampled:h.isSampled.toString()}),overrides:a}),d=cn.ki}else{const e=null!==(a=null===(i=t.session)||void 0===i?void 0:i.id)&&void 0!==a?a:function(e){var t,n,r,i;return{id:null!==(i=null===(r=null===(n=null===(t=o.P.config)||void 0===t?void 0:t.sessionTracking)||void 0===n?void 0:n.generateSessionId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:(0,l.S)(),attributes:e}}().id;h=(0,fn.Bc)({sessionId:e,isSampled:(0,dn.$)()});const n=null===(u=t.session)||void 0===u?void 0:u.overrides;h.sessionMeta=Object.assign({id:e,attributes:Object.assign({isSampled:h.isSampled.toString()},null===(c=t.session)||void 0===c?void 0:c.attributes)},n?{overrides:n}:{}),d=cn.Vl}return{initialSession:h,lifecycleType:d}}registerBeforeSendHook(e){var t;const{updateSession:n}=new e;null===(t=this.transports)||void 0===t||t.addBeforeSendHooks((e=>{var t,r,i;n();const a=null===(t=e.meta.session)||void 0===t?void 0:t.attributes;if(a&&"true"===(null==a?void 0:a.isSampled)){let t=JSON.parse(JSON.stringify(e));const n=null===(r=t.meta.session)||void 0===r?void 0:r.attributes;return null==n||delete n.isSampled,0===Object.keys(null!=n?n:{}).length&&(null===(i=t.meta.session)||void 0===i||delete i.attributes),t}return null}))}initialize(){this.logDebug("init session instrumentation");const e=this.config.sessionTracking;if(null==e?void 0:e.enabled){const t=(0,hn.R)(e);this.registerBeforeSendHook(t);const{initialSession:n,lifecycleType:r}=this.createInitialSession(t,e);t.storeUserSession(n);const i=n.sessionMeta;this.notifiedSession=i,this.api.setSession(i),r===cn.Vl&&this.api.pushEvent(cn.Vl,{},void 0,{skipDedupe:!0}),r===cn.ki&&this.api.pushEvent(cn.ki,{},void 0,{skipDedupe:!0})}this.metas.addListener(this.sendSessionStartEvent.bind(this))}}class gn extends i{constructor(){super(...arguments),this.name="@grafana/faro-web-sdk:instrumentation-view",this.version=a.x}sendViewChangedEvent(e){var t,n,r,i;const a=e.view;a&&a.name!==(null===(t=this.notifiedView)||void 0===t?void 0:t.name)&&(this.api.pushEvent(cn.wM,{fromView:null!==(r=null===(n=this.notifiedView)||void 0===n?void 0:n.name)&&void 0!==r?r:b.y,toView:null!==(i=a.name)&&void 0!==i?i:b.y},void 0,{skipDedupe:!0}),this.notifiedView=a)}initialize(){this.metas.addListener(this.sendViewChangedEvent.bind(this))}}class vn extends i{constructor(){super(),this.name="@grafana/faro-web-sdk:instrumentation-csp",this.version=a.x}initialize(){document.addEventListener("securitypolicyviolation",this.securitypolicyviolationHandler.bind(this))}destroy(){document.removeEventListener("securitypolicyviolation",this.securitypolicyviolationHandler)}securitypolicyviolationHandler(e){this.api.pushEvent("securitypolicyviolation",(0,h.Ti)(e))}}var yn=n(3191),bn=n(5438);class wn extends i{constructor(e={}){super(),this.options=e,this.name="@grafana/faro-web-sdk:instrumentation-console",this.version=a.x,this.errorSerializer=yn.Z}initialize(){var e,t,n,r;this.options=Object.assign(Object.assign({},this.options),this.config.consoleInstrumentation);const i=(null===(e=this.options)||void 0===e?void 0:e.serializeErrors)||!!(null===(t=this.options)||void 0===t?void 0:t.errorSerializer);this.errorSerializer=i?null!==(r=null===(n=this.options)||void 0===n?void 0:n.errorSerializer)&&void 0!==r?r:H.n:yn.Z,bn.HT.filter((e=>{var t,n;return!(null!==(n=null===(t=this.options)||void 0===t?void 0:t.disabledLevels)&&void 0!==n?n:wn.defaultDisabledLevels).includes(e)})).forEach((e=>{console[e]=(...t)=>{var n,r;try{if(e!==bn.$b.ERROR||(null===(n=this.options)||void 0===n?void 0:n.consoleErrorAsLog))if(e===bn.$b.ERROR&&(null===(r=this.options)||void 0===r?void 0:r.consoleErrorAsLog)){const{value:n,type:r,stackFrames:i}=X(t,this.errorSerializer);this.api.pushLog(n?[wn.consoleErrorPrefix+n]:t,{level:e,context:{value:null!=n?n:"",type:null!=r?r:"",stackFrames:(null==i?void 0:i.length)?(0,H.n)(i):""}})}else this.api.pushLog(t,{level:e});else{const{value:e,type:n,stackFrames:r}=X(t,this.errorSerializer);if(e&&!n&&!r)return void this.api.pushError(new Error(wn.consoleErrorPrefix+e));this.api.pushError(new Error(wn.consoleErrorPrefix+e),{type:n,stackFrames:r})}}catch(e){this.logError(e)}finally{this.unpatchedConsole[e](...t)}}}))}}function Sn(e={}){const t=[new V,new Y,new un,new mn,new gn];return!1!==e.enablePerformanceInstrumentation&&t.unshift(new I),!1!==e.enableContentSecurityPolicyInstrumentation&&t.push(new vn),!1!==e.captureConsole&&t.push(new wn({disabledLevels:e.captureConsoleDisabledLevels})),t}wn.defaultDisabledLevels=[bn.$b.DEBUG,bn.$b.TRACE,bn.$b.LOG],wn.consoleErrorPrefix="console.error: "},9128:(e,t,n)=>{"use strict";n.d(t,{p:()=>X});var r=n(8981);var i=n(8964),a=n(8578),o=n(8203);function s(e=a.Z,t=i.vI){const n=i.vc;return t>i.wK.OFF&&(n.error=t>=i.wK.ERROR?function(...t){e.error(`${n.prefix}\n`,...t)}:o.l,n.warn=t>=i.wK.WARN?function(...t){e.warn(`${n.prefix}\n`,...t)}:o.l,n.info=t>=i.wK.INFO?function(...t){e.info(`${n.prefix}\n`,...t)}:o.l,n.debug=t>=i.wK.VERBOSE?function(...t){e.debug(`${n.prefix}\n`,...t)}:o.l),n}let l=i.vc;function u(e,t){return l=s(e,t.internalLoggerLevel),l}var c=n(2019);var d=n(5004);var h=n(1685);var p=n(9552),f=n(259);class m{constructor(e,t){var n,r;this.signalBuffer=[],this.itemLimit=null!==(n=null==t?void 0:t.itemLimit)&&void 0!==n?n:50,this.sendTimeout=null!==(r=null==t?void 0:t.sendTimeout)&&void 0!==r?r: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 n=JSON.stringify(e.meta);let r=t.get(n);r=void 0===r?[e]:[...r,e],t.set(n,r)})),Array.from(t.values())}flush(){if(this.paused||0===this.signalBuffer.length)return;this.groupItems(this.signalBuffer).forEach(this.sendFn),this.signalBuffer=[]}}var g=n(4915);function v(e,t,n,r){var i;t.debug("Initializing transports");const a=[];let o=n.paused,s=[];const l=e=>{let t=e;for(const e of s){const r=t.map(e).filter(Boolean);if(0===r.length)return[];t=y(r,n)}return t},u=e=>{const n=l(e);if(0!==n.length)for(const e of a)t.debug(`Transporting item using ${e.name}\n`,n),e.isBatched()&&e.send(n)};let c;(null===(i=n.batching)||void 0===i?void 0:i.enabled)&&(c=new m(u,{sendTimeout:n.batching.sendTimeout,itemLimit:n.batching.itemLimit,paused:o}));return{add:(...i)=>{t.debug("Adding transports"),i.forEach((i=>{t.debug(`Adding "${i.name}" transport`);a.some((e=>e===i))?t.warn(`Transport ${i.name} is already added`):(i.unpatchedConsole=e,i.internalLogger=t,i.config=n,i.metas=r,a.push(i))}))},addBeforeSendHooks:(...e)=>{t.debug("Adding beforeSendHooks\n",s),e.forEach((e=>{e&&s.push(e)}))},getBeforeSendHooks:()=>[...s],execute:e=>{var r;o||((null===(r=n.batching)||void 0===r?void 0:r.enabled)&&(null==c||c.addItem(e)),(e=>{var r,i;if((null===(r=n.batching)||void 0===r?void 0:r.enabled)&&a.every((e=>e.isBatched())))return;const[o]=l([e]);if(void 0!==o)for(const e of a)t.debug(`Transporting item using ${e.name}\n`,o),e.isBatched()?(null===(i=n.batching)||void 0===i?void 0:i.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 n=a.indexOf(e);-1!==n?a.splice(n,1):t.warn(`Transport "${e.name}" is not added`)}))},removeBeforeSendHooks:(...e)=>{s.filter((t=>!e.includes(t)))},get transports(){return[...a]},unpause:()=>{t.debug("Unpausing transports"),null==c||c.start(),o=!1}}}function y(e,t){if(t.preserveOriginalError)for(const t of e)t.type===g.f.EXCEPTION&&delete t.payload.originalError;return e}let b=a.Z;function w(e){var t;return b=null!==(t=e.unpatchedConsole)&&void 0!==t?t:b,b}function S(e){const t=w(e),n=u(t,e);if((0,p.rI)()&&!e.isolate)return void n.error('Faro is already registered. Either add instrumentations, transports etc. to the global faro instance or use the "isolate" property');n.debug("Initializing");const i=function(e,t,n){let r=[],i=[];const a=()=>r.reduce(((e,t)=>Object.assign(e,(0,c.Tn)(t)?t():t)),{}),o=()=>{if(i.length){const e=a();i.forEach((t=>t(e)))}};return{add:(...e)=>{t.debug("Adding metas\n",e),r.push(...e),o()},remove:(...e)=>{t.debug("Removing metas\n",e),r=r.filter((t=>!e.includes(t))),o()},addListener:e=>{t.debug("Adding metas listener\n",e),i.push(e)},removeListener:e=>{t.debug("Removing metas listener\n",e),i=i.filter((t=>t!==e))},get value(){return a()}}}(0,n),a=v(t,n,e,i),o=(0,r.X)(t,n,e,i,a),s=function(e,t,n,r,i,a){t.debug("Initializing instrumentations");const o=[];return{add:(...s)=>{t.debug("Adding instrumentations"),s.forEach((s=>{t.debug(`Adding "${s.name}" instrumentation`),o.some((e=>e.name===s.name))?t.warn(`Instrumentation ${s.name} is already added`):(s.unpatchedConsole=e,s.internalLogger=t,s.config=n,s.metas=r,s.transports=i,s.api=a,o.push(s),s.initialize())}))},get instrumentations(){return[...o]},remove:(...e)=>{t.debug("Removing instrumentations"),e.forEach((e=>{var n,r;t.debug(`Removing "${e.name}" instrumentation`);const i=o.reduce(((t,n,r)=>null===t&&n.name===e.name?r:null),null);null!==i?(null===(r=(n=o[i]).destroy)||void 0===r||r.call(n),o.splice(i,1)):t.warn(`Instrumentation "${e.name}" is not added`)}))}}}(t,n,e,i,a,o),l=(0,f.A)(t,n,e,i,a,o,s);return function(e){var t,n;const r={sdk:{version:h.x},app:{bundleId:e.config.app.name&&(i=e.config.app.name,null===d.J||void 0===d.J?void 0:d.J[`__faroBundleId_${i}`])}};var i;const a=null===(t=e.config.sessionTracking)||void 0===t?void 0:t.session;a&&e.api.setSession(a),e.config.app&&(r.app=Object.assign(Object.assign({},e.config.app),r.app)),e.config.user&&(r.user=e.config.user),e.config.view&&(r.view=e.config.view),e.metas.add(r,...null!==(n=e.config.metas)&&void 0!==n?n:[])}(l),function(e){e.transports.add(...e.config.transports),e.transports.addBeforeSendHooks(e.config.beforeSend)}(l),function(e){e.instrumentations.add(...e.config.instrumentations)}(l),l}const x="faro",E={enabled:!0,sendTimeout:250,itemLimit:50};var _=n(3191);const O="browser";var T=n(4151);function k(e){return{frames:(0,T.D)(e)}}var C=n(409),A=n(2081),D=n(6660),R=n(1717);const I=()=>{const e=new D.UAParser,{name:t,version:n}=e.getBrowser(),{name:r,version:i}=e.getOS(),a=e.getUA(),o=navigator.language,s=navigator.userAgent.includes("Mobi"),l=function(){if(!t||!n)return;if("userAgentData"in navigator&&navigator.userAgentData)return navigator.userAgentData.brands;return}();return{browser:{name:null!=t?t:R.y,version:null!=n?n:R.y,os:`${null!=r?r:R.y} ${null!=i?i:R.y}`,userAgent:null!=a?a:R.y,language:null!=o?o:R.y,mobile:s,brands:null!=l?l:R.y,viewportWidth:`${window.innerWidth}`,viewportHeight:`${window.innerHeight}`}}},P=()=>{const e=window.k6;return{k6:Object.assign({isK6Browser:!0},(null==e?void 0:e.testRunId)&&{testRunId:null==e?void 0:e.testRunId})}};let N,j;function L({generatePageId:e,initialPageMeta:t}={}){return()=>{const n=location.href;return(0,c.Tn)(e)&&N!==n&&(N=n,j=e(location)),{page:Object.assign(Object.assign({url:n},j?{id:j}:{}),t)}}}var M=n(9402);class F extends M.H{isBatched(){return!1}getIgnoreUrls(){return[]}}function V(e,t){var n,r;if(void 0===t)return e;if(void 0===e)return{resourceSpans:t};const i=null===(n=e.resourceSpans)||void 0===n?void 0:n[0];if(void 0===i)return e;const a=(null==i?void 0:i.scopeSpans)||[],o=(null===(r=null==t?void 0:t[0])||void 0===r?void 0:r.scopeSpans)||[];return Object.assign(Object.assign({},e),{resourceSpans:[Object.assign(Object.assign({},i),{scopeSpans:[...a,...o]})]})}var $=n(6493),B=n(6854),z=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))},U=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};class q extends F{constructor(e){var t,n,r,i;super(),this.options=e,this.name="@grafana/faro-web-sdk:transport-fetch",this.version=h.x,this.disabledUntil=new Date,this.rateLimitBackoffMs=null!==(t=e.defaultRateLimitBackoffMs)&&void 0!==t?t:5e3,this.getNow=null!==(n=e.getNow)&&void 0!==n?n:()=>Date.now(),this.promiseBuffer=function(e){const{size:t,concurrency:n}=e,r=[];let i=0;const a=()=>{if(i<n&&r.length){const{producer:e,resolve:t,reject:n}=r.shift();i++,e().then((e=>{i--,a(),t(e)}),(e=>{i--,a(),n(e)}))}};return{add:e=>{if(r.length+i>=t)throw new Error("Task buffer full");return new Promise(((t,n)=>{r.push({producer:e,resolve:t,reject:n}),a()}))}}}({size:null!==(r=e.bufferSize)&&void 0!==r?r:30,concurrency:null!==(i=e.concurrency)&&void 0!==i?i:5})}send(e){return z(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 g.f.LOG:case g.f.EVENT:case g.f.EXCEPTION:case g.f.MEASUREMENT:const n=g.J[e.type],r=t[n];t=Object.assign(Object.assign({},t),{[n]:void 0===r?[e.payload]:[...r,e.payload]});break;case g.f.TRACE:t=Object.assign(Object.assign({},t),{traces:V(t.traces,e.payload.resourceSpans)})}})),t}(e)),{url:n,requestOptions:r,apiKey:i}=this.options,a=null!=r?r:{},{headers:s}=a,l=U(a,["headers"]);let u;const c=this.metas.value.session;return null!=c&&(u=c.id),fetch(n,Object.assign({method:"POST",headers:Object.assign(Object.assign(Object.assign({"Content-Type":"application/json"},null!=s?s:{}),i?{"x-api-key":i}:{}),u?{"x-faro-session-id":u}:{}),body:t,keepalive:t.length<=6e4},null!=l?l:{})).then((e=>z(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(o.l),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(),n=e.headers.get("Retry-After");if(n){const e=Number(n);if(!isNaN(e))return new Date(1e3*e+t);const r=Date.parse(n);if(!isNaN(r))return new Date(r)}return new Date(t+this.rateLimitBackoffMs)}extendFaroSession(e,t){const n="Session expired",r=e.sessionTracking;if(null==r?void 0:r.enabled){const{fetchUserSession:e,storeUserSession:i}=(0,$.R)(r);(0,B.vP)({fetchUserSession:e,storeUserSession:i})({forceSessionExtend:!0}),t(`${n} created new session.`)}else t(`${n}.`)}}var H=n(7276),G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function W(e,{trackUserActionsPreview:t}){return e.filter((e=>!("@grafana/faro-web-sdk:instrumentation-user-action"===e.name&&!t)))}function Q(e){var t,n;const{page:r,generatePageId:i}=null!==(t=null==e?void 0:e.pageTracking)&&void 0!==t?t:{},a=[I,L({generatePageId:i,initialPageMeta:r}),...null!==(n=e.metas)&&void 0!==n?n:[]];return(0,c.Gv)(window.k6)?[...a,P]:a}function K({trackGeolocation:e,sessionTracking:t}){var n;const r={};return(0,c.Lm)(e)&&(r.geoLocationTrackingEnabled=e),(0,c.Im)(r)?{}:{session:Object.assign(Object.assign({},null!==(n=null==t?void 0:t.session)&&void 0!==n?n:{}),{overrides:r})}}function X(e){const t=function(e){var t;const n=[],r=s(e.unpatchedConsole,e.internalLoggerLevel);e.transports?((e.url||e.apiKey)&&r.error('if "transports" is defined, "url" and "apiKey" should not be defined'),n.push(...e.transports)):e.url?n.push(new q({url:e.url,apiKey:e.apiKey})):r.error('either "url" or "transports" must be defined');const{dedupe:o=!0,eventDomain:l=O,globalObjectKey:u=x,instrumentations:c=(0,H.w)(),internalLoggerLevel:d=i.vI,isolate:h=!1,logArgsSerializer:p=_.Z,metas:f=Q(e),paused:m=!1,preventGlobalExposure:g=!1,unpatchedConsole:v=a.Z,trackUserActionsPreview:y=!1,trackUserActionsDataAttributeName:b=A.Ij,url:w}=e,S=G(e,["dedupe","eventDomain","globalObjectKey","instrumentations","internalLoggerLevel","isolate","logArgsSerializer","metas","paused","preventGlobalExposure","unpatchedConsole","trackUserActionsPreview","trackUserActionsDataAttributeName","url"]);return Object.assign(Object.assign({},S),{batching:Object.assign(Object.assign({},E),e.batching),dedupe:o,globalObjectKey:u,instrumentations:W(c,e),internalLoggerLevel:d,isolate:h,logArgsSerializer:p,metas:f,parseStacktrace:k,paused:m,preventGlobalExposure:g,transports:n,unpatchedConsole:v,eventDomain:l,ignoreUrls:[...null!==(t=e.ignoreUrls)&&void 0!==t?t:[],...w?[w]:[],/\/collect(?:\/[\w]*)?$/],sessionTracking:Object.assign(Object.assign(Object.assign({},C.Fm),e.sessionTracking),K({trackGeolocation:e.trackGeolocation,sessionTracking:e.sessionTracking})),trackUserActionsPreview:y,trackUserActionsDataAttributeName:b})}(e);if(t)return S(t)}},3867:(e,t,n)=>{"use strict";n.d(t,{S:()=>i});var r=n(8189);function i(e,t,n,i){const a={filename:e||document.location.href,function:t||r.iC};return void 0!==n&&(a.lineno=n),void 0!==i&&(a.colno=i),a}},8189:(e,t,n)=>{"use strict";n.d(t,{HS:()=>g,Lo:()=>p,N9:()=>h,Sy:()=>l,Wf:()=>i,Wo:()=>u,bz:()=>d,cB:()=>s,iC:()=>a,k4:()=>r,ld:()=>m,mZ:()=>v,rD:()=>f,tE:()=>c,xQ:()=>o});const r="\n",i="eval",a="?",o="@",s=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,l=/\((\S*)(?::(\d+))(?::(\d+))\)/,u="eval",c="address at ",d=c.length,h=/^\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,p=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,f=" > eval",m="safari-extension",g="safari-web-extension",v=/Minified React error #\d+;/i},4151:(e,t,n)=>{"use strict";n.d(t,{D:()=>s});var r=n(2019),i=n(3867),a=n(8189);function o(e,t){const n=null==e?void 0:e.includes(a.ld),r=!n&&(null==e?void 0:e.includes(a.HS));return n||r?[(null==e?void 0:e.includes(a.xQ))?e.split(a.xQ)[0]:e,n?`${a.ld}:${t}`:`${a.HS}:${t}`]:[e,t]}function s(e){let t=[];e.stacktrace?t=e.stacktrace.split(a.k4).filter(((e,t)=>t%2==0)):e.stack&&(t=e.stack.split(a.k4));const n=t.reduce(((t,n,s)=>{let l,u,c,d,h;if(l=a.cB.exec(n)){if(u=l[1],c=l[2],d=l[3],h=l[4],null==c?void 0:c.startsWith(a.Wo)){const e=a.Sy.exec(c);e&&(c=e[1],d=e[2],h=e[3])}c=(null==c?void 0:c.startsWith(a.tE))?c.substring(a.bz):c,[u,c]=o(u,c)}else if(l=a.N9.exec(n)){if(u=l[1],c=l[3],d=l[4],h=l[5],c&&c.includes(a.rD)){const e=a.Lo.exec(c);e&&(u=u||a.Wf,c=e[1],d=e[2])}else 0===s&&!h&&(0,r.Et)(e.columnNumber)&&(h=String(e.columnNumber+1));[u,c]=o(u,c)}return(c||u)&&t.push((0,i.S)(c,u,d?Number(d):void 0,h?Number(h):void 0)),t}),[]);return a.mZ.test(e.message)?n.slice(1):n}},4273:(e,t,n)=>{"use strict";n.d(t,{G:()=>u});var r=n(129),i=n(259),a=n(6633),o=n(550),s=n(409),l=n(6854);class u{constructor(){this.updateSession=(0,a.n)((()=>this.updateUserSession()),s.MM),this.updateUserSession=(0,l.vP)({fetchUserSession:u.fetchUserSession,storeUserSession:u.storeUserSession}),this.init()}static removeUserSession(){(0,o.Ai)(s.AQ,u.storageTypeLocal)}static storeUserSession(e){(0,o.SO)(s.AQ,(0,r.xD)(e),u.storageTypeLocal)}static fetchUserSession(){const e=(0,o.Gq)(s.AQ,u.storageTypeLocal);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&this.updateSession()})),i.P.metas.addListener((0,l.h$)({fetchUserSession:u.fetchUserSession,storeUserSession:u.storeUserSession}))}}u.storageTypeLocal=o.Uy.local},6493:(e,t,n)=>{"use strict";n.d(t,{R:()=>d});var r=n(4273),i=n(129),a=n(259),o=n(6633),s=n(550),l=n(409),u=n(6854);class c{constructor(){this.updateSession=(0,o.n)((()=>this.updateUserSession()),l.MM),this.updateUserSession=(0,u.vP)({fetchUserSession:c.fetchUserSession,storeUserSession:c.storeUserSession}),this.init()}static removeUserSession(){(0,s.Ai)(l.AQ,c.storageTypeSession)}static storeUserSession(e){(0,s.SO)(l.AQ,(0,i.xD)(e),c.storageTypeSession)}static fetchUserSession(){const e=(0,s.Gq)(l.AQ,c.storageTypeSession);return e?JSON.parse(e):null}init(){document.addEventListener("visibilitychange",(()=>{"visible"===document.visibilityState&&this.updateSession()})),a.P.metas.addListener((0,u.h$)({fetchUserSession:c.fetchUserSession,storeUserSession:c.storeUserSession}))}}function d(e){return(null==e?void 0:e.persistent)?r.G:c}c.storageTypeSession=s.Uy.session},3881:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(259);function i(){var e,t,n;const i=r.P.config.sessionTracking;let a=null!==(n=null!==(t=null===(e=null==i?void 0:i.sampler)||void 0===e?void 0:e.call(i,{metas:r.P.metas.value}))&&void 0!==t?t:null==i?void 0:i.samplingRate)&&void 0!==n?n:1;if("number"!=typeof a){a=0}return Math.random()<a}},409:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>r,Fm:()=>s,MM:()=>o,Zl:()=>i,gG:()=>a});const r="com.grafana.faro.session",i=144e5,a=9e5,o=1e3,s={enabled:!0,persistent:!1,maxSessionPersistenceTime:a}},6854:(e,t,n)=>{"use strict";n.d(t,{Bc:()=>h,OW:()=>p,h$:()=>g,vP:()=>f});var r=n(9607),i=n(259),a=n(152),o=n(2019),s=n(7697),l=n(4481),u=n(550),c=n(3881),d=n(409);function h({sessionId:e,started:t,lastActivity:n,isSampled:o=!0}={}){var s,l;const u=(0,r.x3)(),c=null===(l=null===(s=i.P.config)||void 0===s?void 0:s.sessionTracking)||void 0===l?void 0:l.generateSessionId;return null==e&&(e="function"==typeof c?c():(0,a.S)()),{sessionId:e,lastActivity:null!=n?n:u,started:null!=t?t:u,isSampled:o}}function p(e){if(null==e)return!1;const t=(0,r.x3)();if(!(t-e.started<d.Zl))return!1;return t-e.lastActivity<d.gG}function f({fetchUserSession:e,storeUserSession:t}){return function({forceSessionExtend:n}={forceSessionExtend:!1}){var a,o,s;if(!e||!t)return;const l=i.P.config.sessionTracking,d=null==l?void 0:l.persistent;if(d&&!u.OE||!d&&!u.Vv)return;const f=e();if(!1===n&&p(f))t(Object.assign(Object.assign({},f),{lastActivity:(0,r.x3)()}));else{let e=m(h({isSampled:(0,c.$)()}),f);t(e),null===(a=i.P.api)||void 0===a||a.setSession(e.sessionMeta),null===(o=null==l?void 0:l.onSessionChange)||void 0===o||o.call(l,null!==(s=null==f?void 0:f.sessionMeta)&&void 0!==s?s:null,e.sessionMeta)}}}function m(e,t){var n,r,a,s,l,u,c;const d=Object.assign(Object.assign({},e),{sessionMeta:{id:e.sessionId,attributes:Object.assign(Object.assign(Object.assign({},null===(r=null===(n=i.P.config.sessionTracking)||void 0===n?void 0:n.session)||void 0===r?void 0:r.attributes),null!==(s=null===(a=i.P.metas.value.session)||void 0===a?void 0:a.attributes)&&void 0!==s?s:{}),{isSampled:e.isSampled.toString()})}}),h=null!==(u=null===(l=i.P.metas.value.session)||void 0===l?void 0:l.overrides)&&void 0!==u?u:null===(c=null==t?void 0:t.sessionMeta)||void 0===c?void 0:c.overrides;(0,o.Im)(h)||(d.sessionMeta.overrides=h);const p=null==t?void 0:t.sessionId;return null!=p&&(d.sessionMeta.attributes.previousSession=p),d}function g({fetchUserSession:e,storeUserSession:t}){return function(n){const r=n.session,a=e();let o=null==r?void 0:r.id;const u=null==r?void 0:r.attributes,d=null==r?void 0:r.overrides,p=null==a?void 0:a.sessionMeta,f=null==p?void 0:p.overrides,g=!!d&&!(0,s.b)(d,f),v=!!u&&!(0,s.b)(u,null==p?void 0:p.attributes);if(!!r&&o!==(null==a?void 0:a.sessionId)||v||g){const e=m(h({sessionId:o,isSampled:(0,c.$)()}),a);t(e),function(e,t={},n={}){var r,a,o;if(!e)return;const s=t.serviceName,u=null!==(o=null!==(r=n.serviceName)&&void 0!==r?r:null===(a=i.P.metas.value.app)||void 0===a?void 0:a.name)&&void 0!==o?o:"";s&&s!==u&&i.P.api.pushEvent(l.nT,{serviceName:s,previousServiceName:u})}(g,d,f),i.P.api.setSession(e.sessionMeta)}}}},2081:(e,t,n)=>{"use strict";n.d(t,{HU:()=>i,I1:()=>o,IU:()=>a,Ij:()=>l,jJ:()=>s,sk:()=>u,vb:()=>r});const r="resource-entry",i="http-request-start",a="http-request-end",o="dom-mutation",s="faroUserActionName",l="data-faro-user-action-name",u="faroApiCall"},6633:(e,t,n)=>{"use strict";function r(e,t){let n,r=!1;const i=()=>{null!=n?(e(...n),n=null,setTimeout(i,t)):r=!1};return(...a)=>{r?n=a:(e(...a),r=!0,setTimeout(i,t))}}n.d(t,{n:()=>r})},550:(e,t,n)=>{"use strict";n.d(t,{Ai:()=>l,Gq:()=>o,OE:()=>u,SO:()=>s,Uy:()=>i,Vv:()=>c});var r=n(259);const i={session:"sessionStorage",local:"localStorage"};function a(e){var t;try{let t;t=window[e];const n="__faro_storage_test__";return t.setItem(n,n),t.removeItem(n),!0}catch(n){return null===(t=r.P.internalLogger)||void 0===t||t.info(`Web storage of type ${e} is not available. Reason: ${n}`),!1}}function o(e,t){return d(t)?window[t].getItem(e):null}function s(e,t,n){if(d(n))try{window[n].setItem(e,t)}catch(e){}}function l(e,t){d(t)&&window[t].removeItem(e)}const u=a(i.local),c=a(i.session);function d(e){return e===i.local?u:e===i.session&&c}},6063:(e,t,n)=>{"use strict";n.d(t,{mN:()=>i,oL:()=>a});n(8531);var r=n(6977);const i="grafana-llm-app",a=`/api/plugins/${i}`;new r.SemVer("0.2.0")},9178:(e,t,n)=>{"use strict";n.d(t,{qA:()=>x,qH:()=>E});var r=n(7781),i=n(8531),a=(n(5959),n(1269)),o=n(5096),s=n(4370);function l(e,t){return(0,o.N)((function(n,r){var i=0;n.subscribe((0,s._)(r,(function(n){return e.call(t,n,i++)&&r.next(n)})))}))}var u=n(7708);function c(e,t){return(0,o.N)(function(e,t,n,r,i){return function(a,o){var l=n,u=t,c=0;a.subscribe((0,s._)(o,(function(t){var n=c++;u=l?e(u,t,n):(l=!0,t),r&&o.next(u)}),i&&function(){l&&o.next(u),o.complete()}))}}(e,t,arguments.length>=2,!0))}var d=n(1693),h=n(3887);const p={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let f;const m=new Uint8Array(16);const g=[];for(let e=0;e<256;++e)g.push((e+256).toString(16).slice(1));function v(e,t=0){return(g[e[t+0]]+g[e[t+1]]+g[e[t+2]]+g[e[t+3]]+"-"+g[e[t+4]]+g[e[t+5]]+"-"+g[e[t+6]]+g[e[t+7]]+"-"+g[e[t+8]]+g[e[t+9]]+"-"+g[e[t+10]]+g[e[t+11]]+g[e[t+12]]+g[e[t+13]]+g[e[t+14]]+g[e[t+15]]).toLowerCase()}const y=function(e,t,n){if(p.randomUUID&&!t&&!e)return p.randomUUID();const r=(e=e||{}).random??e.rng?.()??function(){if(!f){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");f=crypto.getRandomValues.bind(crypto)}return f(m)}();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return v(r)};var b=n(6063);const w="llm/v1/chat/completions";function S(e){return"error"in e}function x(){return(0,a.pipe)((0,a.pipe)(l((e=>"content"in e.choices[0].delta)),(0,u.T)((e=>e.choices[0].delta.content))),c(((e,t)=>e+t),""))}function E(e){const t={scope:r.LiveChannelScope.Plugin,namespace:b.mN,path:w+"/"+y(),data:e};return(0,i.getGrafanaLiveSrv)().getStream(t).pipe(l((e=>(0,r.isLiveChannelMessageEvent)(e)))).pipe(l((e=>!!e.message.choices)),function(e,t,n){var r=(0,d.T)(e)||t||n?{next:e,error:t,complete:n}:e;return r?(0,o.N)((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var i=!0;e.subscribe((0,s._)(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;i=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;i=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;i&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):h.D}((e=>{if(S(e.message))throw new Error(e.message.error)})),(n=e=>!(!S(e.message)&&(e.message.choices&&e.message.choices[0].delta&&"done"in e.message.choices[0].delta&&!0===e.message.choices[0].delta.done||e.message.choices&&"finish_reason"in e.message.choices[0]&&"stop"===e.message.choices[0].finish_reason)),void 0===a&&(a=!1),(0,o.N)((function(e,t){var r=0;e.subscribe((0,s._)(t,(function(e){var i=n(e,r++);(i||a)&&t.next(e),!i&&t.complete()})))}))),(0,u.T)((e=>e.message)));var n,a}},6030:(e,t,n)=>{"use strict";n.d(t,{Sn:()=>a});var r=n(8531),i=n(6063);const a=async()=>{try{if(!(await(0,r.getBackendSrv)().get(`${i.oL}/settings`)).enabled)return!1;const e=(await(0,r.getBackendSrv)().get(`${i.oL}/health`)).details;return e.llmProvider?e.llmProvider.configured&&e.llmProvider.ok:!!e.openAI&&(e.openAI.configured&&e.openAI.ok)}catch(e){return!1}}},404:(e,t,n)=>{const r=Symbol("SemVer ANY");class i{static get ANY(){return r}constructor(e,t){if(t=a(t),e instanceof i){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===r?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?o[s.COMPARATORLOOSE]:o[s.COMPARATOR],n=e.match(t);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new c(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===r||e===r)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 i))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):(!(t=a(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=i;const a=n(9287),{safeRe:o,t:s}=n(978),l=n(6323),u=n(116),c=n(8152),d=n(1451)},1451:(e,t,n)=>{const r=/\s+/g;class i{constructor(e,t){if(t=o(t),e instanceof i)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new i(e.raw,t);if(e instanceof s)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(r," "),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&&y(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(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,n=a.get(t);if(n)return n;const r=this.options.loose,i=r?c[d.HYPHENRANGELOOSE]:c[d.HYPHENRANGE];e=e.replace(i,D(this.options.includePrerelease)),l("hyphen replace",e),e=e.replace(c[d.COMPARATORTRIM],h),l("comparator trim",e),e=e.replace(c[d.TILDETRIM],p),l("tilde trim",e),e=e.replace(c[d.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)));r&&(o=o.filter((e=>(l("loose invalid filter",e,this.options),!!e.match(c[d.COMPARATORLOOSE]))))),l("range list",o);const u=new Map,y=o.map((e=>new s(e,this.options)));for(const e of y){if(v(e))return[e];u.set(e.value,e)}u.size>1&&u.has("")&&u.delete("");const b=[...u.values()];return a.set(t,b),b}intersects(e,t){if(!(e instanceof i))throw new TypeError("a Range is required");return this.set.some((n=>b(n,t)&&e.set.some((e=>b(e,t)&&n.every((n=>e.every((e=>n.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<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=i;const a=new(n(3974)),o=n(9287),s=n(404),l=n(116),u=n(8152),{safeRe:c,t:d,comparatorTrimReplace:h,tildeTrimReplace:p,caretTrimReplace:f}=n(978),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:g}=n(3486),v=e=>"<0.0.0-0"===e.value,y=e=>""===e.value,b=(e,t)=>{let n=!0;const r=e.slice();let i=r.pop();for(;n&&r.length;)n=r.every((e=>i.intersects(e,t))),i=r.pop();return n},w=(e,t)=>(l("comp",e,t),e=_(e,t),l("caret",e),e=x(e,t),l("tildes",e),e=T(e,t),l("xrange",e),e=C(e,t),l("stars",e),e),S=e=>!e||"x"===e.toLowerCase()||"*"===e,x=(e,t)=>e.trim().split(/\s+/).map((e=>E(e,t))).join(" "),E=(e,t)=>{const n=t.loose?c[d.TILDELOOSE]:c[d.TILDE];return e.replace(n,((t,n,r,i,a)=>{let o;return l("tilde",e,t,n,r,i,a),S(n)?o="":S(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:S(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(l("replaceTilde pr",a),o=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,l("tilde return",o),o}))},_=(e,t)=>e.trim().split(/\s+/).map((e=>O(e,t))).join(" "),O=(e,t)=>{l("caret",e,t);const n=t.loose?c[d.CARETLOOSE]:c[d.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,((t,n,i,a,o)=>{let s;return l("caret",e,t,n,i,a,o),S(n)?s="":S(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:S(a)?s="0"===n?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(l("replaceCaret pr",o),s="0"===n?"0"===i?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(l("no pr"),s="0"===n?"0"===i?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),l("caret return",s),s}))},T=(e,t)=>(l("replaceXRanges",e,t),e.split(/\s+/).map((e=>k(e,t))).join(" ")),k=(e,t)=>{e=e.trim();const n=t.loose?c[d.XRANGELOOSE]:c[d.XRANGE];return e.replace(n,((n,r,i,a,o,s)=>{l("xRange",e,n,r,i,a,o,s);const u=S(i),c=u||S(a),d=c||S(o),h=d;return"="===r&&h&&(r=""),s=t.includePrerelease?"-0":"",u?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&h?(c&&(a=0),o=0,">"===r?(r=">=",c?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):"<="===r&&(r="<",c?i=+i+1:a=+a+1),"<"===r&&(s="-0"),n=`${r+i}.${a}.${o}${s}`):c?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),l("xRange return",n),n}))},C=(e,t)=>(l("replaceStars",e,t),e.trim().replace(c[d.STAR],"")),A=(e,t)=>(l("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?d.GTE0PRE:d.GTE0],"")),D=e=>(t,n,r,i,a,o,s,l,u,c,d,h)=>`${n=S(r)?"":S(i)?`>=${r}.0.0${e?"-0":""}`:S(a)?`>=${r}.${i}.0${e?"-0":""}`:o?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=S(u)?"":S(c)?`<${+u+1}.0.0-0`:S(d)?`<${u}.${+c+1}.0-0`:h?`<=${u}.${c}.${d}-${h}`:e?`<${u}.${c}.${+d+1}-0`:`<=${l}`}`.trim(),R=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(l(e[n].semver),e[n].semver!==s.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}},8152:(e,t,n)=>{const r=n(116),{MAX_LENGTH:i,MAX_SAFE_INTEGER:a}=n(3486),{safeRe:o,safeSrc:s,t:l}=n(978),u=n(9287),{compareIdentifiers:c}=n(175);class d{constructor(e,t){if(t=u(t),e instanceof d){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>i)throw new TypeError(`version is longer than ${i} characters`);r("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const n=e.trim().match(t.loose?o[l.LOOSE]:o[l.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<a)return t}return e})):this.prerelease=[],this.build=n[5]?n[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(r("SemVer.compare",this.version,this.options,e),!(e instanceof d)){if("string"==typeof e&&e===this.version)return 0;e=new d(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof d||(e=new d(e,this.options)),c(this.major,e.major)||c(this.minor,e.minor)||c(this.patch,e.patch)}comparePre(e){if(e instanceof d||(e=new d(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 n=this.prerelease[t],i=e.prerelease[t];if(r("prerelease compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return c(n,i)}while(++t)}compareBuild(e){e instanceof d||(e=new d(e,this.options));let t=0;do{const n=this.build[t],i=e.build[t];if(r("build compare",t,n,i),void 0===n&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===n)return-1;if(n!==i)return c(n,i)}while(++t)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=new RegExp(`^${this.options.loose?s[l.PRERELEASELOOSE]:s[l.PRERELEASE]}$`),n=`-${t}`.match(e);if(!n||n[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,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);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(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];!1===n&&(r=[t]),0===c(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}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=d},5466:(e,t,n)=>{const r=n(8948);e.exports=(e,t)=>{const n=r(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null}},6323:(e,t,n)=>{const r=n(957),i=n(6619),a=n(1888),o=n(4333),s=n(4647),l=n(5428);e.exports=(e,t,n,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return r(e,n,u);case"!=":return i(e,n,u);case">":return a(e,n,u);case">=":return o(e,n,u);case"<":return s(e,n,u);case"<=":return l(e,n,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},3494:(e,t,n)=>{const r=n(8152),i=n(8948),{safeRe:a,t:o}=n(978);e.exports=(e,t)=>{if(e instanceof r)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let n=null;if((t=t||{}).rtl){const r=t.includePrerelease?a[o.COERCERTLFULL]:a[o.COERCERTL];let i;for(;(i=r.exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&i.index+i[0].length===n.index+n[0].length||(n=i),r.lastIndex=i.index+i[1].length+i[2].length;r.lastIndex=-1}else n=e.match(t.includePrerelease?a[o.COERCEFULL]:a[o.COERCE]);if(null===n)return null;const s=n[2],l=n[3]||"0",u=n[4]||"0",c=t.includePrerelease&&n[5]?`-${n[5]}`:"",d=t.includePrerelease&&n[6]?`+${n[6]}`:"";return i(`${s}.${l}.${u}${c}${d}`,t)}},9329:(e,t,n)=>{const r=n(8152);e.exports=(e,t,n)=>{const i=new r(e,n),a=new r(t,n);return i.compare(a)||i.compareBuild(a)}},6175:(e,t,n)=>{const r=n(7956);e.exports=(e,t)=>r(e,t,!0)},7956:(e,t,n)=>{const r=n(8152);e.exports=(e,t,n)=>new r(e,n).compare(new r(t,n))},5316:(e,t,n)=>{const r=n(8948);e.exports=(e,t)=>{const n=r(e,null,!0),i=r(t,null,!0),a=n.compare(i);if(0===a)return null;const o=a>0,s=o?n:i,l=o?i:n,u=!!s.prerelease.length;if(!!l.prerelease.length&&!u){if(!l.patch&&!l.minor)return"major";if(0===l.compareMain(s))return l.minor&&!l.patch?"minor":"patch"}const c=u?"pre":"";return n.major!==i.major?c+"major":n.minor!==i.minor?c+"minor":n.patch!==i.patch?c+"patch":"prerelease"}},957:(e,t,n)=>{const r=n(7956);e.exports=(e,t,n)=>0===r(e,t,n)},1888:(e,t,n)=>{const r=n(7956);e.exports=(e,t,n)=>r(e,t,n)>0},4333:(e,t,n)=>{const r=n(7956);e.exports=(e,t,n)=>r(e,t,n)>=0},643:(e,t,n)=>{const r=n(8152);e.exports=(e,t,n,i,a)=>{"string"==typeof n&&(a=i,i=n,n=void 0);try{return new r(e instanceof r?e.version:e,n).inc(t,i,a).version}catch(e){return null}}},4647:(e,t,n)=>{const r=n(7956);e.exports=(e,t,n)=>r(e,t,n)<0},5428:(e,t,n)=>{const r=n(7956);e.exports=(e,t,n)=>r(e,t,n)<=0},6038:(e,t,n)=>{const r=n(8152);e.exports=(e,t)=>new r(e,t).major},9922:(e,t,n)=>{const r=n(8152);e.exports=(e,t)=>new r(e,t).minor},6619:(e,t,n)=>{const r=n(7956);e.exports=(e,t,n)=>0!==r(e,t,n)},8948:(e,t,n)=>{const r=n(8152);e.exports=(e,t,n=!1)=>{if(e instanceof r)return e;try{return new r(e,t)}catch(e){if(!n)return null;throw e}}},2481:(e,t,n)=>{const r=n(8152);e.exports=(e,t)=>new r(e,t).patch},6877:(e,t,n)=>{const r=n(8948);e.exports=(e,t)=>{const n=r(e,t);return n&&n.prerelease.length?n.prerelease:null}},2862:(e,t,n)=>{const r=n(7956);e.exports=(e,t,n)=>r(t,e,n)},5601:(e,t,n)=>{const r=n(9329);e.exports=(e,t)=>e.sort(((e,n)=>r(n,e,t)))},5034:(e,t,n)=>{const r=n(1451);e.exports=(e,t,n)=>{try{t=new r(t,n)}catch(e){return!1}return t.test(e)}},3368:(e,t,n)=>{const r=n(9329);e.exports=(e,t)=>e.sort(((e,n)=>r(e,n,t)))},4109:(e,t,n)=>{const r=n(8948);e.exports=(e,t)=>{const n=r(e,t);return n?n.version:null}},6977:(e,t,n)=>{const r=n(978),i=n(3486),a=n(8152),o=n(175),s=n(8948),l=n(4109),u=n(5466),c=n(643),d=n(5316),h=n(6038),p=n(9922),f=n(2481),m=n(6877),g=n(7956),v=n(2862),y=n(6175),b=n(9329),w=n(3368),S=n(5601),x=n(1888),E=n(4647),_=n(957),O=n(6619),T=n(4333),k=n(5428),C=n(6323),A=n(3494),D=n(404),R=n(1451),I=n(5034),P=n(8427),N=n(2432),j=n(5210),L=n(1505),M=n(6950),F=n(6055),V=n(3519),$=n(9914),B=n(344),z=n(8921),U=n(1428);e.exports={parse:s,valid:l,clean:u,inc:c,diff:d,major:h,minor:p,patch:f,prerelease:m,compare:g,rcompare:v,compareLoose:y,compareBuild:b,sort:w,rsort:S,gt:x,lt:E,eq:_,neq:O,gte:T,lte:k,cmp:C,coerce:A,Comparator:D,Range:R,satisfies:I,toComparators:P,maxSatisfying:N,minSatisfying:j,minVersion:L,validRange:M,outside:F,gtr:V,ltr:$,intersects:B,simplifyRange:z,subset:U,SemVer:a,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:o.compareIdentifiers,rcompareIdentifiers:o.rcompareIdentifiers}},3486:e=>{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}},116:e=>{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},175:e=>{const t=/^[0-9]+$/,n=(e,n)=>{const r=t.test(e),i=t.test(n);return r&&i&&(e=+e,n=+n),e===n?0:r&&!i?-1:i&&!r?1:e<n?-1:1};e.exports={compareIdentifiers:n,rcompareIdentifiers:(e,t)=>n(t,e)}},3974:e=>{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}}},9287:e=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:n},978:(e,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:a}=n(3486),o=n(116),s=(t=e.exports={}).re=[],l=t.safeRe=[],u=t.src=[],c=t.safeSrc=[],d=t.t={};let h=0;const p="[a-zA-Z0-9-]",f=[["\\s",1],["\\d",a],[p,i]],m=(e,t,n)=>{const r=(e=>{for(const[t,n]of f)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),i=h++;o(e,i,t),d[e]=i,u[i]=t,c[i]=r,s[i]=new RegExp(t,n?"g":void 0),l[i]=new RegExp(r,n?"g":void 0)};m("NUMERICIDENTIFIER","0|[1-9]\\d*"),m("NUMERICIDENTIFIERLOOSE","\\d+"),m("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),m("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),m("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),m("PRERELEASEIDENTIFIER",`(?:${u[d.NUMERICIDENTIFIER]}|${u[d.NONNUMERICIDENTIFIER]})`),m("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NUMERICIDENTIFIERLOOSE]}|${u[d.NONNUMERICIDENTIFIER]})`),m("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),m("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),m("BUILDIDENTIFIER",`${p}+`),m("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),m("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),m("FULL",`^${u[d.FULLPLAIN]}$`),m("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),m("LOOSE",`^${u[d.LOOSEPLAIN]}$`),m("GTLT","((?:<|>)?=?)"),m("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),m("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),m("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),m("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),m("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),m("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),m("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),m("COERCE",`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),m("COERCEFULL",u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?`+`(?:${u[d.BUILD]})?(?:$|[^\\d])`),m("COERCERTL",u[d.COERCE],!0),m("COERCERTLFULL",u[d.COERCEFULL],!0),m("LONETILDE","(?:~>?)"),m("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",m("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),m("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),m("LONECARET","(?:\\^)"),m("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",m("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),m("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),m("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),m("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),m("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",m("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),m("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),m("STAR","(<|>)?=?\\s*\\*"),m("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),m("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},3519:(e,t,n)=>{const r=n(6055);e.exports=(e,t,n)=>r(e,t,">",n)},344:(e,t,n)=>{const r=n(1451);e.exports=(e,t,n)=>(e=new r(e,n),t=new r(t,n),e.intersects(t,n))},9914:(e,t,n)=>{const r=n(6055);e.exports=(e,t,n)=>r(e,t,"<",n)},2432:(e,t,n)=>{const r=n(8152),i=n(1451);e.exports=(e,t,n)=>{let a=null,o=null,s=null;try{s=new i(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(a&&-1!==o.compare(e)||(a=e,o=new r(a,n)))})),a}},5210:(e,t,n)=>{const r=n(8152),i=n(1451);e.exports=(e,t,n)=>{let a=null,o=null,s=null;try{s=new i(t,n)}catch(e){return null}return e.forEach((e=>{s.test(e)&&(a&&1!==o.compare(e)||(a=e,o=new r(a,n)))})),a}},1505:(e,t,n)=>{const r=n(8152),i=n(1451),a=n(1888);e.exports=(e,t)=>{e=new i(e,t);let n=new r("0.0.0");if(e.test(n))return n;if(n=new r("0.0.0-0"),e.test(n))return n;n=null;for(let t=0;t<e.set.length;++t){const i=e.set[t];let o=null;i.forEach((e=>{const t=new r(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":o&&!a(t,o)||(o=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!o||n&&!a(n,o)||(n=o)}return n&&e.test(n)?n:null}},6055:(e,t,n)=>{const r=n(8152),i=n(404),{ANY:a}=i,o=n(1451),s=n(5034),l=n(1888),u=n(4647),c=n(5428),d=n(4333);e.exports=(e,t,n,h)=>{let p,f,m,g,v;switch(e=new r(e,h),t=new o(t,h),n){case">":p=l,f=c,m=u,g=">",v=">=";break;case"<":p=u,f=d,m=l,g="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(e,t,h))return!1;for(let n=0;n<t.set.length;++n){const r=t.set[n];let o=null,s=null;if(r.forEach((e=>{e.semver===a&&(e=new i(">=0.0.0")),o=o||e,s=s||e,p(e.semver,o.semver,h)?o=e:m(e.semver,s.semver,h)&&(s=e)})),o.operator===g||o.operator===v)return!1;if((!s.operator||s.operator===g)&&f(e,s.semver))return!1;if(s.operator===v&&m(e,s.semver))return!1}return!0}},8921:(e,t,n)=>{const r=n(5034),i=n(7956);e.exports=(e,t,n)=>{const a=[];let o=null,s=null;const l=e.sort(((e,t)=>i(e,t,n)));for(const e of l){r(e,t,n)?(s=e,o||(o=e)):(s&&a.push([o,s]),s=null,o=null)}o&&a.push([o,null]);const u=[];for(const[e,t]of a)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(" || "),d="string"==typeof t.raw?t.raw:String(t);return c.length<d.length?c:t}},1428:(e,t,n)=>{const r=n(1451),i=n(404),{ANY:a}=i,o=n(5034),s=n(7956),l=[new i(">=0.0.0-0")],u=[new i(">=0.0.0")],c=(e,t,n)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===a){if(1===t.length&&t[0].semver===a)return!0;e=n.includePrerelease?l:u}if(1===t.length&&t[0].semver===a){if(n.includePrerelease)return!0;t=u}const r=new Set;let i,c,p,f,m,g,v;for(const t of e)">"===t.operator||">="===t.operator?i=d(i,t,n):"<"===t.operator||"<="===t.operator?c=h(c,t,n):r.add(t.semver);if(r.size>1)return null;if(i&&c){if(p=s(i.semver,c.semver,n),p>0)return null;if(0===p&&(">="!==i.operator||"<="!==c.operator))return null}for(const e of r){if(i&&!o(e,String(i),n))return null;if(c&&!o(e,String(c),n))return null;for(const r of t)if(!o(e,String(r),n))return!1;return!0}let y=!(!c||n.includePrerelease||!c.semver.prerelease.length)&&c.semver,b=!(!i||n.includePrerelease||!i.semver.prerelease.length)&&i.semver;y&&1===y.prerelease.length&&"<"===c.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(v=v||">"===e.operator||">="===e.operator,g=g||"<"===e.operator||"<="===e.operator,i)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(f=d(i,e,n),f===e&&f!==i)return!1}else if(">="===i.operator&&!o(i.semver,String(e),n))return!1;if(c)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(m=h(c,e,n),m===e&&m!==c)return!1}else if("<="===c.operator&&!o(c.semver,String(e),n))return!1;if(!e.operator&&(c||i)&&0!==p)return!1}return!(i&&g&&!c&&0!==p)&&(!(c&&v&&!i&&0!==p)&&(!b&&!y))},d=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r>0?e:r<0||">"===t.operator&&">="===e.operator?t:e},h=(e,t,n)=>{if(!e)return t;const r=s(e.semver,t.semver,n);return r<0?e:r>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,n={})=>{if(e===t)return!0;e=new r(e,n),t=new r(t,n);let i=!1;e:for(const r of e.set){for(const e of t.set){const t=c(r,e,n);if(i=i||null!==t,t)continue e}if(i)return!1}return!0}},8427:(e,t,n)=>{const r=n(1451);e.exports=(e,t)=>new r(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},6950:(e,t,n)=>{const r=n(1451);e.exports=(e,t)=>{try{return new r(e,t).range||"*"}catch(e){return null}}},9612:(e,t,n)=>{"use strict";n.d(t,{H9:()=>Sr,yP:()=>Ko,mI:()=>ts,d0:()=>Fd,fS:()=>As,UU:()=>de,xK:()=>nc,gF:()=>tc,Es:()=>Lo,vA:()=>Qu,G1:()=>Wu,Bs:()=>ee,So:()=>Te,dt:()=>Vr,WM:()=>Cu,KE:()=>vu,JZ:()=>je,Pj:()=>Bo,n1:()=>gc,Sh:()=>Rt,Eb:()=>ta,Lw:()=>el,Gg:()=>r,Is:()=>Ys,jh:()=>Ct,Go:()=>Vd});var r={};n.r(r),n.d(r,{K2:()=>si});var i={};n.r(i);var a=n(5959),o=n.n(a),s=n(1159),l=n(7781),u=n(8531),c=Object.defineProperty,d=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,f=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,m=(e,t)=>{for(var n in t||(t={}))h.call(t,n)&&f(e,n,t[n]);if(d)for(var n of d(t))p.call(t,n)&&f(e,n,t[n]);return e};function g(e,t){const n=m({},u.locationService.getSearchObject());if(t)for(const e of Object.keys(n))t.includes(e)||delete n[e];return l.urlUtil.renderUrl(l.locationUtil.assureBaseUrl(e),n)}function v(e,t){return o().createElement(e.Component,{model:e,routeProps:t})}var y=Object.defineProperty,b=Object.defineProperties,w=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable,_=(e,t,n)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const O=new Map;var T=n(1269);const k={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let C;const A=new Uint8Array(16);function D(){if(!C&&(C="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!C))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return C(A)}const R=[];for(let e=0;e<256;++e)R.push((e+256).toString(16).slice(1));function I(e,t=0){return R[e[t+0]]+R[e[t+1]]+R[e[t+2]]+R[e[t+3]]+"-"+R[e[t+4]]+R[e[t+5]]+"-"+R[e[t+6]]+R[e[t+7]]+"-"+R[e[t+8]]+R[e[t+9]]+"-"+R[e[t+10]]+R[e[t+11]]+R[e[t+12]]+R[e[t+13]]+R[e[t+14]]+R[e[t+15]]}const P=function(e,t,n){if(k.randomUUID&&!t&&!e)return k.randomUUID();const r=(e=e||{}).random||(e.rng||D)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return I(r)};var N=Object.defineProperty,j=Object.defineProperties,L=Object.getOwnPropertyDescriptors,M=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,$=(e,t,n)=>t in e?N(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const B=o().memo((function(e){var t,n=e,{model:r}=n,i=((e,t)=>{var n={};for(var r in e)F.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&M)for(var r of M(e))t.indexOf(r)<0&&V.call(e,r)&&(n[r]=e[r]);return n})(n,["model"]);const s=null!=(t=r.constructor.Component)?t:z,[l,u]=(0,a.useState)(0);return(0,a.useEffect)((()=>{const e=r.activate();return u((e=>e+1)),e}),[r]),r.isActive?o().createElement(s,(c=((e,t)=>{for(var n in t||(t={}))F.call(t,n)&&$(e,n,t[n]);if(M)for(var n of M(t))V.call(t,n)&&$(e,n,t[n]);return e})({},i),j(c,L({model:r})))):null;var c}));function z(e){return null}class U extends l.BusEventWithPayload{}U.type="scene-object-state-change";class q extends l.BusEventWithPayload{}q.type="scene-object-user-action";var H,G=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};class W{constructor(e){var t,n,r,i;((e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)})(this,H,void 0),r=e,G(t=this,n=H,"write to private field"),i?i.call(t,r):n.set(t,r)}resolve(){return G(e=this,t=H,"read from private field"),n?n.call(e):t.get(e);var e,t,n}}H=new WeakMap;var Q=Object.defineProperty,K=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,J=(e,t,n)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t)=>{for(var n in t||(t={}))X.call(t,n)&&J(e,n,t[n]);if(K)for(var n of K(t))Y.call(t,n)&&J(e,n,t[n]);return e};class ee{constructor(e){this._isActive=!1,this._activationHandlers=[],this._deactivationHandlers=new Map,this._subs=new T.Subscription,this._refCount=0,e.key||(e.key=P()),this._events=new l.EventBusSrv,this._state=Object.freeze(e),this._setParent(this._state)}get state(){return this._state}get isActive(){return this._isActive}get parent(){return this._parent}get variableDependency(){return this._variableDependency}get urlSync(){return this._urlSync}get Component(){return B}_setParent(e){ne(e,(e=>{e._parent&&e._parent!==this&&console.warn("SceneObject already has a parent set that is different from the new parent. You cannot share the same SceneObject instance in multiple scenes or in multiple different places of the same scene graph. Use SceneObject.clone() to duplicate a SceneObject or store a state key reference and use sceneGraph.findObject to locate it.",e,this),e._parent=this}))}subscribeToState(e){return this._events.subscribe(U,(t=>{t.payload.changedObject===this&&e(t.payload.newState,t.payload.prevState)}))}subscribeToEvent(e,t){return this._events.subscribe(e,t)}setState(e){const t=this._state,n=Z(Z({},this._state),e);this._state=Object.freeze(n),this._setParent(e),this._handleActivationOfChangedStateProps(t,n),this.publishEvent(new U({prevState:t,newState:n,partialUpdate:e,changedObject:this}),!0)}_handleActivationOfChangedStateProps(e,t){this.isActive&&(e.$behaviors!==t.$behaviors&&this._handleChangedBehaviors(e.$behaviors,t.$behaviors),e.$data!==t.$data&&this._handleChangedStateActivation(e.$data,t.$data),e.$variables!==t.$variables&&this._handleChangedStateActivation(e.$variables,t.$variables),e.$timeRange!==t.$timeRange&&this._handleChangedStateActivation(e.$timeRange,t.$timeRange))}_handleChangedStateActivation(e,t){if(e){const t=this._deactivationHandlers.get(e);t&&(t(),this._deactivationHandlers.delete(e))}t&&this._deactivationHandlers.set(t,t.activate())}_handleChangedBehaviors(e,t){if(e)for(const n of e)if(!t||!t.includes(n)){const e=this._deactivationHandlers.get(n);e&&(e(),this._deactivationHandlers.delete(n))}if(t)for(const n of t)e&&e.includes(n)||this._activateBehavior(n)}publishEvent(e,t){this._events.publish(e),t&&this.parent&&this.parent.publishEvent(e,t)}getRoot(){return this._parent?this._parent.getRoot():this}_internalActivate(){this._isActive=!0;const{$data:e,$variables:t,$timeRange:n,$behaviors:r}=this.state;if(this._activationHandlers.forEach((e=>{const t=e();t&&this._deactivationHandlers.set(t,t)})),n&&!n.isActive&&this._deactivationHandlers.set(n,n.activate()),t&&!t.isActive&&this._deactivationHandlers.set(t,t.activate()),e&&!e.isActive&&this._deactivationHandlers.set(e,e.activate()),r)for(const e of r)this._activateBehavior(e)}_activateBehavior(e){if(e instanceof ee)this._deactivationHandlers.set(e,e.activate());else if("function"==typeof e){const t=e(this);t&&this._deactivationHandlers.set(e,t)}}activate(){this.isActive||this._internalActivate(),this._refCount++;let e=!1;return()=>{if(this._refCount--,e){throw new Error("SceneObject cancelation handler returned by activate() called a second time")}e=!0,0===this._refCount&&this._internalDeactivate()}}_internalDeactivate(){this._isActive=!1;for(let e of this._deactivationHandlers.values())e();this._deactivationHandlers.clear(),this._events.removeAllListeners(),this._subs.unsubscribe(),this._subs=new T.Subscription}useState(){return te(this)}forceRender(){this.setState({})}clone(e){return function(e,t){const n=ue(e.state,t);return new e.constructor(n)}(this,e)}addActivationHandler(e){this._activationHandlers.push(e)}forEachChild(e){ne(this.state,e)}getRef(){return this._ref||(this._ref=new W(this)),this._ref}}function te(e,t){var n;const[r,i]=(0,a.useState)(e.state),o=e.state,s=null!=(n=null==t?void 0:t.shouldActivateOrKeepAlive)&&n;return(0,a.useEffect)((()=>{let t;s&&(t=e.activate());const n=e.subscribeToState((e=>{i(e)}));return e.state!==o&&i(e.state),()=>{n.unsubscribe(),t&&t()}}),[e,s]),e.state}function ne(e,t){for(const n of Object.values(e))if(n instanceof ee&&t(n),Array.isArray(n))for(const e of n)e instanceof ee&&t(e)}var re=Object.defineProperty,ie=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,se=(e,t,n)=>t in e?re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,le=(e,t)=>{for(var n in t||(t={}))ae.call(t,n)&&se(e,n,t[n]);if(ie)for(var n of ie(t))oe.call(t,n)&&se(e,n,t[n]);return e};function ue(e,t){const n=le({},e);for(const e in n){const t=n[e];if(t instanceof ee&&(n[e]=t.clone()),t instanceof W)throw new Error("Cannot clone a SceneObject with a SceneObjectRef in state");if(Array.isArray(t)){const r=[];for(const e of t)e instanceof ee?r.push(e.clone()):r.push(e);n[e]=r}}return Object.assign(n,t),n}function ce(e,t){let n,r=e;for(;r&&!n;)n=t(r),r=r.parent;return n}class de extends l.DataSourceApi{constructor(e,t){super({name:"RuntimeDataSource-"+e,uid:t,type:e,id:1,readOnly:!0,jsonData:{},access:"direct",meta:{id:e,name:"RuntimeDataSource-"+e,type:l.PluginType.datasource,info:{author:{name:""},description:"",links:[],logos:{large:"",small:""},screenshots:[],updated:"",version:""},module:"",baseUrl:""}})}testDatasource(){return Promise.resolve({})}}const he=new Map;var pe=n(3241);class fe{constructor(){this.index=new Map}getUniqueKey(e,t){const n=this.index.get(e);if(!n)throw new Error("Cannot find any scene object that uses the key '"+e+"'");const r=n.findIndex((e=>e.sceneObject===t));return r>0?`${e}-${r+1}`:e}rebuildIndex(e){this.index.clear(),this.buildIndex(e,0)}buildIndex(e,t){if(e.urlSync)for(const n of e.urlSync.getKeys()){const r=this.index.get(n);r?(r.push({sceneObject:e,depth:t}),r.sort(((e,t)=>e.depth-t.depth))):this.index.set(n,[{sceneObject:e,depth:t}])}e.forEachChild((e=>this.buildIndex(e,t+1)))}}function me(e){const t=new fe;t.rebuildIndex(e);const n={},r=e=>{if(e.urlSync){const r=e.urlSync.getUrlState();for(const[i,a]of Object.entries(r))if(null!=a){const r=t.getUniqueKey(i,e);n[r]=a}}e.forEachChild(r)};return r(e),n}function ge(e,t,n){if(e.urlSync){const r={},i=e.urlSync.getUrlState();for(const a of e.urlSync.getKeys()){const o=n.getUniqueKey(a,e),s=t.getAll(o),l=i[a];ve(s,l)||(s.length>0?Array.isArray(l)?r[a]=s:r[a]=s[0]:r[a]=null)}Object.keys(r).length>0&&e.urlSync.updateFromUrl(r)}e.forEachChild((e=>ge(e,t,n)))}function ve(e,t){return 0===e.length&&null==t||(Array.isArray(t)||1!==(null==e?void 0:e.length)?0===(null==t?void 0:t.length)&&null===e||(0,pe.isEqual)(e,t):t===e[0])}var ye=n(1625);ye.ob.Auto;var be=(e=>(e.NotStarted="NotStarted",e.Loading="Loading",e.Streaming="Streaming",e.Done="Done",e.Error="Error",e))(be||{}),we=Object.defineProperty,Se=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,_e=(e,t,n)=>t in e?we(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const Oe={state:be.Done,series:[],timeRange:(0,l.getDefaultTimeRange)()};class Te{constructor(e,t){this._sceneObject=e,this._keys=t.keys}getKeys(){return"function"==typeof this._keys?this._keys():this._keys}getUrlState(){return this._sceneObject.getUrlState()}updateFromUrl(e){this._sceneObject.updateFromUrl(e)}}const ke=/^\d+[yYmMsSwWhHdD]$/;function Ce(e){if("string"!=typeof e)return null;if(-1!==e.indexOf("now"))return e;if(ke.test(e))return e;if(8===e.length){const t=(0,l.toUtc)(e,"YYYYMMDD");if(t.isValid())return t.toISOString()}else if(15===e.length){const t=(0,l.toUtc)(e,"YYYYMMDDTHHmmss");if(t.isValid())return t.toISOString()}else if(24===e.length){return(0,l.toUtc)(e).toISOString()}const t=parseInt(e,10);return isNaN(t)?null:(0,l.toUtc)(t).toISOString()}function Ae(e,t,n,r,i){const a=i&&"now"===t;return{from:l.dateMath.parse(e,!1,n,r),to:l.dateMath.parse(a?"now-"+i:t,!0,n,r),raw:{from:e,to:t}}}var De=Object.defineProperty,Re=Object.getOwnPropertySymbols,Ie=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,Ne=(e,t,n)=>t in e?De(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class je extends ee{constructor(e={}){var t,n;const r=null!=(t=e.from)?t:"now-6h",i=null!=(n=e.to)?n:"now",a=e.timeZone;super(((e,t)=>{for(var n in t||(t={}))Ie.call(t,n)&&Ne(e,n,t[n]);if(Re)for(var n of Re(t))Pe.call(t,n)&&Ne(e,n,t[n]);return e})({from:r,to:i,timeZone:a,value:Ae(r,i,a||(0,l.getTimeZone)(),e.fiscalYearStartMonth,e.UNSAFE_nowDelay)},e)),this._urlSync=new Te(this,{keys:["from","to","timezone"]}),this.onTimeRangeChange=e=>{const t={},n={};"string"==typeof e.raw.from?(t.from=e.raw.from,n.from=e.raw.from):(t.from=e.raw.from.toISOString(),n.from=e.raw.from.toISOString(!0)),"string"==typeof e.raw.to?(t.to=e.raw.to,n.to=e.raw.to):(t.to=e.raw.to.toISOString(),n.to=e.raw.to.toISOString(!0)),t.value=Ae(n.from,n.to,this.getTimeZone(),this.state.fiscalYearStartMonth,this.state.UNSAFE_nowDelay),t.from===this.state.from&&t.to===this.state.to||this.setState(t)},this.onTimeZoneChange=e=>{this.setState({timeZone:e})},this.onRefresh=()=>{this.setState({value:Ae(this.state.from,this.state.to,this.getTimeZone(),this.state.fiscalYearStartMonth,this.state.UNSAFE_nowDelay)})},this.addActivationHandler(this._onActivate.bind(this))}_onActivate(){if(!this.state.timeZone){const e=this.getTimeZoneSource();e!==this&&this._subs.add(e.subscribeToState(((t,n)=>{void 0!==t.timeZone&&t.timeZone!==n.timeZone&&this.setState({value:Ae(this.state.from,this.state.to,e.getTimeZone(),this.state.fiscalYearStartMonth,this.state.UNSAFE_nowDelay)})})))}return this.state.weekStart&&(0,l.setWeekStart)(this.state.weekStart),()=>{this.state.weekStart&&(0,l.setWeekStart)(u.config.bootData.user.weekStart)}}getTimeZoneSource(){if(!this.parent||!this.parent.parent)return this;const e=ce(this.parent.parent,(e=>{if(e.state.$timeRange&&e.state.$timeRange.state.timeZone)return e.state.$timeRange}));return e||this}getTimeZone(){if(this.state.timeZone)return this.state.timeZone;const e=this.getTimeZoneSource();return e!==this?e.state.timeZone:(0,l.getTimeZone)()}getUrlState(){const e={from:this.state.from,to:this.state.to};return this.state.timeZone&&(e.timezone=this.state.timeZone),e}updateFromUrl(e){var t,n,r;if(!e.to&&!e.from)return;const i={},a=Ce(e.from);a&&(i.from=a);const o=Ce(e.to);o&&(i.to=o),"string"==typeof e.timezone&&(i.timeZone=""!==e.timezone?e.timezone:void 0),i.value=Ae(null!=(t=i.from)?t:this.state.from,null!=(n=i.to)?n:this.state.to,null!=(r=i.timeZone)?r:this.getTimeZone(),this.state.fiscalYearStartMonth,this.state.UNSAFE_nowDelay),this.setState(i)}}const Le=new class extends ee{constructor(e){super(((e,t)=>{for(var n in t||(t={}))xe.call(t,n)&&_e(e,n,t[n]);if(Se)for(var n of Se(t))Ee.call(t,n)&&_e(e,n,t[n]);return e})({data:Oe},e))}getResultsStream(){const e={origin:this,data:this.state.data};return(0,T.of)(e)}},Me=new je;const Fe=new class extends ee{constructor(){super({variables:[]})}getByName(e){}isVariableLoadingOrWaitingToUpdate(e){return!1}};function Ve(e){var t;return null!=(t=ce(e,(e=>e.state.$timeRange)))?t:Me}class $e extends l.BusEventWithPayload{}function Be(e){return"object"==typeof e&&"formatter"in e}$e.type="scene-variable-changed-value";let ze,Ue={};function qe(e){const t=Ue[e];return t||(Ue[e]=(0,pe.property)(e))}class He{constructor(e,t){this.state={name:e,value:t,type:"scopedvar"}}getValue(e){let{value:t}=this.state,n=t.value;return n=e?qe(e)(t.value):t.value,"string"===n||"number"===n||"boolean"===n?n:String(n)}getValueText(){const{value:e}=this.state;return null!=e.text?String(e.text):String(e)}}const Ge=new l.Registry((()=>[{id:ye.$m.Lucene,name:"Lucene",description:"Values are lucene escaped and multi-valued variables generate an OR expression",formatter:e=>{if("string"==typeof e)return We(e);if(Array.isArray(e)){if(0===e.length)return"__empty__";return"("+(0,pe.map)(e,(e=>'"'+We(e)+'"')).join(" OR ")+")"}return We(`${e}`)}},{id:ye.$m.Raw,name:"raw",description:"Keep value as is",formatter:e=>String(e)},{id:ye.$m.Regex,name:"Regex",description:"Values are regex escaped and multi-valued variables generate a (<value>|<value>) expression",formatter:e=>{if("string"==typeof e)return(0,l.escapeRegex)(e);if(Array.isArray(e)){const t=e.map((e=>"string"==typeof e?(0,l.escapeRegex)(e):(0,l.escapeRegex)(String(e))));return 1===t.length?t[0]:"("+t.join("|")+")"}return(0,l.escapeRegex)(`${e}`)}},{id:ye.$m.Pipe,name:"Pipe",description:"Values are separated by | character",formatter:e=>"string"==typeof e?e:Array.isArray(e)?e.join("|"):`${e}`},{id:ye.$m.Distributed,name:"Distributed",description:"Multiple values are formatted like variable=value",formatter:(e,t,n)=>"string"==typeof e?e:Array.isArray(e)?(e=(0,pe.map)(e,((e,t)=>0!==t?n.state.name+"="+e:e))).join(","):`${e}`},{id:ye.$m.CSV,name:"Csv",description:"Comma-separated values",formatter:e=>"string"==typeof e?e:(0,pe.isArray)(e)?e.join(","):String(e)},{id:ye.$m.HTML,name:"HTML",description:"HTML escaping of values",formatter:e=>"string"==typeof e?l.textUtil.escapeHtml(e):(0,pe.isArray)(e)?l.textUtil.escapeHtml(e.join(", ")):l.textUtil.escapeHtml(String(e))},{id:ye.$m.JSON,name:"JSON",description:"JSON stringify value",formatter:e=>"string"==typeof e?e:JSON.stringify(e)},{id:ye.$m.PercentEncode,name:"Percent encode",description:"Useful for URL escaping values",formatter:e=>(0,pe.isArray)(e)?Qe("{"+e.join(",")+"}"):Qe(e)},{id:ye.$m.SingleQuote,name:"Single quote",description:"Single quoted values",formatter:e=>{const t=new RegExp("'","g");if((0,pe.isArray)(e))return(0,pe.map)(e,(e=>`'${(0,pe.replace)(e,t,"\\'")}'`)).join(",");let n="string"==typeof e?e:String(e);return`'${(0,pe.replace)(n,t,"\\'")}'`}},{id:ye.$m.DoubleQuote,name:"Double quote",description:"Double quoted values",formatter:e=>{const t=new RegExp('"',"g");if((0,pe.isArray)(e))return(0,pe.map)(e,(e=>`"${(0,pe.replace)(e,t,'\\"')}"`)).join(",");let n="string"==typeof e?e:String(e);return`"${(0,pe.replace)(n,t,'\\"')}"`}},{id:ye.$m.SQLString,name:"SQL string",description:"SQL string quoting and commas for use in IN statements and other scenarios",formatter:Ze},{id:ye.$m.Date,name:"Date",description:"Format date in different ways",formatter:(e,t)=>{var n;let r=NaN;if("number"==typeof e?r=e:"string"==typeof e&&(r=parseInt(e,10)),isNaN(r))return"NaN";const i=null!=(n=t[0])?n:"iso";switch(i){case"ms":return String(e);case"seconds":return`${Math.round(r/1e3)}`;case"iso":return(0,l.dateTime)(r).toISOString();default:return(t||[]).length>1?(0,l.dateTime)(r).format(t.join(":")):(0,l.dateTime)(r).format(i)}}},{id:ye.$m.Glob,name:"Glob",description:"Format multi-valued variables using glob syntax, example {value1,value2}",formatter:e=>(0,pe.isArray)(e)&&e.length>1?"{"+e.join(",")+"}":String(e)},{id:ye.$m.Text,name:"Text",description:"Format variables in their text representation. Example in multi-variable scenario A + B + C.",formatter:(e,t,n)=>n.getValueText?n.getValueText():String(e)},{id:ye.$m.QueryParam,name:"Query parameter",description:"Format variables as URL parameters. Example in multi-variable scenario A + B + C => var-foo=A&var-foo=B&var-foo=C.",formatter:(e,t,n)=>Array.isArray(e)?e.map((e=>Ye(n.state.name,e))).join("&"):Ye(n.state.name,e)},{id:ye.$m.UriEncode,name:"Percent encode as URI",description:"Useful for URL escaping values, taking into URI syntax characters",formatter:e=>(0,pe.isArray)(e)?Ke("{"+e.join(",")+"}"):Ke(e)}]));function We(e){return!1===isNaN(+e)?e:e.replace(/([\!\*\+\-\=<>\s\&\|\(\)\[\]\{\}\^\~\?\:\\/"])/g,"\\$1")}function Qe(e){return"object"==typeof e&&(e=String(e)),Xe(encodeURIComponent(e))}const Ke=e=>Xe(encodeURI(String(e))),Xe=e=>e.replace(/[!'()*]/g,(e=>"%"+e.charCodeAt(0).toString(16).toUpperCase()));function Ye(e,t){return`var-${e}=${Qe(t)}`}const Je={"'":"''",'"':'\\"'};function Ze(e){const t=new RegExp("'|\"","g");if((0,pe.isArray)(e))return(0,pe.map)(e,(e=>`'${(0,pe.replace)(e,t,(e=>{var t;return null!=(t=Je[e])?t:""}))}'`)).join(",");let n="string"==typeof e?e:String(e);return`'${(0,pe.replace)(n,t,(e=>{var t;return null!=(t=Je[e])?t:""}))}'`}const et="All",tt="$__all",nt="$__auto",rt=/\$(\w+)|\[\[(\w+?)(?::(\w+))?\]\]|\${(\w+)(?:\.([^:^\}]+))?(?::([^\}]+))?}/g,it="__searchFilter";function at(e,t){const n=t.state.$variables;if(!n)return t.parent?at(e,t.parent):null;const r=n.getByName(e);return r||(t.parent?at(e,t.parent):null)}function ot(e,t,n,r,i){return t?(rt.lastIndex=0,t.replace(rt,((t,a,o,s,l,u,c)=>{const d=a||o||l,h=s||c||r,p=function(e,t,n,r){if(n&&n.hasOwnProperty(e)){const t=n[e];if(t)return function(e,t){return ze?(ze.state.name=e,ze.state.value=t):ze=new He(e,t),ze}(e,t)}const i=at(e,r);if(i)return i;const a=kt.get(e);if(a)return new a(e,r,t,n);return null}(d,t,n,e);if(!p)return i&&i.push({match:t,variableName:d,fieldPath:u,format:h,value:t,found:!1}),t;const f=function(e,t,n,r){if(null==n)return"";if(Be(n))return ot(e,n.formatter(r));Array.isArray(n)||"object"!=typeof n||(n=`${n}`);if("function"==typeof r)return r(n,{name:t.state.name,type:t.state.type,multi:t.state.isMulti,includeAll:t.state.includeAll});let i=[];r?(i=r.split(":"),i.length>1?(r=i[0],i=i.slice(1)):i=[]):r=ye.$m.Glob;let a=Ge.getIfExists(r);a||(console.error(`Variable format ${r} not found. Using glob format as fallback.`),a=Ge.get(ye.$m.Glob));return a.formatter(n,i,t)}(e,p,p.getValue(u),h);return i&&i.push({match:t,variableName:d,fieldPath:u,format:h,value:f,found:f!==t}),f}))):null!=t?t:""}function st(e){return void 0!==e.useState}function lt(e){return"enrichDataRequest"in e}function ut(e){return"isDataLayer"in e}function ct(e){var t;return null!=(t=ce(e,(e=>e.state.$data)))?t:Le}function dt(e,t,n,r){if(t(e))return e;let i=null;return e.forEachChild((e=>{if(e===n)return;let r=dt(e,t);r&&(i=r)})),i||(r&&e.parent?dt(e.parent,t,e,!0):null)}function ht(e,t){return dt(e,t,void 0,!0)}new WeakMap;class pt{constructor(e){this._value=e}formatter(){return this._value}}class ft{constructor(e,t){this.state={name:e,type:"time_macro"},this._sceneObject=t}getValue(){const e=Ve(this._sceneObject);return"__from"===this.state.name?e.state.value.from.valueOf():e.state.value.to.valueOf()}getValueText(){const e=Ve(this._sceneObject);return"__from"===this.state.name?(0,l.dateTimeFormat)(e.state.value.from,{timeZone:e.getTimeZone()}):(0,l.dateTimeFormat)(e.state.value.to,{timeZone:e.getTimeZone()})}}class mt{constructor(e,t,n){this.state={name:e,type:"time_macro",match:n},this._sceneObject=t}getValue(){var e;const t=ct(this._sceneObject);if(t){const n=null==(e=t.state.data)?void 0:e.request;return n?"__interval_ms"===this.state.name?n.intervalMs:n.interval:this.state.match}return this.state.match}}function gt(e,t={}){if(e.state.$variables)for(const n of e.state.$variables.state.variables)n.state.skipUrlSync||t[n.state.name]||(t[n.state.name]=n);return e.parent&&gt(e.parent,t),t}var vt=Object.defineProperty,yt=Object.defineProperties,bt=Object.getOwnPropertyDescriptors,wt=Object.getOwnPropertySymbols,St=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,Et=(e,t,n)=>t in e?vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function _t(e,t,n){return new Proxy({},{get:(r,i)=>{return"name"===i?e.name:"displayName"===i?(0,l.getFieldDisplayName)(e,t,n):"labels"===i||"formattedLabels"===i?e.labels?(a=((e,t)=>{for(var n in t||(t={}))St.call(t,n)&&Et(e,n,t[n]);if(wt)for(var n of wt(t))xt.call(t,n)&&Et(e,n,t[n]);return e})({},e.labels),o={__values:Object.values(e.labels).sort().join(", "),toString:()=>(0,l.formatLabels)(e.labels,"",!0)},yt(a,bt(o))):"":void 0;var a,o}})}const Ot=(0,l.getDisplayProcessor)();class Tt{constructor(e){this._urlQueryParams=e}formatter(e){if(!e)return this._urlQueryParams;const t=e.split(":");if("exclude"===t[0]&&t.length>1){const e=new URLSearchParams(this._urlQueryParams);for(const n of t[1].split(","))e.delete(n);return`?${e}`}if("include"===t[0]&&t.length>1){const e=new URLSearchParams(this._urlQueryParams),n=t[1].split(",");for(const t of e.keys())n.includes(t)||e.delete(t);return`?${e}`}return this._urlQueryParams}}const kt=new Map([[l.DataLinkBuiltInVars.includeVars,class{constructor(e,t){this.state={name:e,type:"url_variable"},this._sceneObject=t}getValue(){const e=gt(this._sceneObject),t=Ge.get(ye.$m.QueryParam),n=[];for(const r of Object.keys(e)){const i=e[r],a=i.getValue();a&&(Be(a)?n.push(a.formatter(ye.$m.QueryParam)):n.push(t.formatter(a,[],i)))}return new pt(n.join("&"))}getValueText(){return""}}],[l.DataLinkBuiltInVars.keepTime,class{constructor(e,t){this.state={name:e,type:"url_variable"},this._sceneObject=t}getValue(){var e;const t=null==(e=Ve(this._sceneObject).urlSync)?void 0:e.getUrlState();return new pt(l.urlUtil.toUrlParams(t))}getValueText(){return""}}],["__value",class{constructor(e,t,n,r){this._match=n,this._scopedVars=r,this.state={name:e,type:"__value"}}getValue(e){var t,n;const r=null==(t=this._scopedVars)?void 0:t.__dataContext;if(!r)return this._match;const{frame:i,rowIndex:a,field:o,calculatedValue:s}=r.value;if(s)switch(e){case"numeric":case"raw":return s.numeric;case"time":return"";default:return(0,l.formattedValueToString)(s)}if(null==a)return this._match;if("time"===e){const e=i.fields.find((e=>e.type===l.FieldType.time));return e?e.values.get(a):void 0}if(!o)return this._match;const u=o.values.get(a);if("raw"===e)return u;const c=(null!=(n=o.display)?n:Ot)(u);return"numeric"===e?c.numeric:(0,l.formattedValueToString)(c)}getValueText(){return""}}],["__data",class{constructor(e,t,n,r){this._match=n,this._scopedVars=r,this.state={name:e,type:"__data"}}getValue(e){var t,n;const r=null==(t=this._scopedVars)?void 0:t.__dataContext;if(!r||!e)return this._match;const{frame:i,rowIndex:a}=r.value;if(void 0===a||void 0===e)return this._match;const o={name:i.name,refId:i.refId,fields:(0,l.getFieldDisplayValuesProxy)({frame:i,rowIndex:a})};return null!=(n=qe(e)(o))?n:""}getValueText(){return""}}],["__series",class{constructor(e,t,n,r){this._match=n,this._scopedVars=r,this.state={name:e,type:"__series"}}getValue(e){var t;const n=null==(t=this._scopedVars)?void 0:t.__dataContext;if(!n||!e)return this._match;if("name"!==e)return this._match;const{frame:r,frameIndex:i}=n.value;return(0,l.getFrameDisplayName)(r,i)}getValueText(){return""}}],["__field",class{constructor(e,t,n,r){this._match=n,this._scopedVars=r,this.state={name:e,type:"__field"}}getValue(e){var t,n;const r=null==(t=this._scopedVars)?void 0:t.__dataContext;if(!r||!e)return this._match;if(void 0===e||""===e)return this._match;const{frame:i,field:a,data:o}=r.value,s=_t(a,i,o);return null!=(n=qe(e)(s))?n:""}getValueText(){return""}}],["__url",class{constructor(e,t){this.state={name:e,type:"url_macro"}}getValue(e){var t;const n=u.locationService.getLocation(),r=null!=(t=u.config.appSubUrl)?t:"";switch(null!=e?e:""){case"params":return new Tt(n.search);case"path":return r+n.pathname;default:return r+n.pathname+n.search}}getValueText(){return""}}],["__from",ft],["__to",ft],["__timezone",class{constructor(e,t){this.state={name:e,type:"time_macro"},this._sceneObject=t}getValue(){const e=Ve(this._sceneObject).getTimeZone();return"browser"===e?Intl.DateTimeFormat().resolvedOptions().timeZone:e}getValueText(){return this.getValue()}}],["__user",class{constructor(e,t){this.state={name:e,type:"user_macro"}}getValue(e){const t=u.config.bootData.user;switch(e){case"login":return t.login;case"email":return t.email;default:return String(t.id)}}getValueText(){return""}}],["__org",class{constructor(e,t){this.state={name:e,type:"org_macro"}}getValue(e){const t=u.config.bootData.user;return"name"===e?t.orgName:String(t.orgId)}getValueText(){return""}}],["__interval",mt],["__interval_ms",mt]]);const Ct={getVariables:function(e){var t;return null!=(t=ce(e,(e=>e.state.$variables)))?t:Fe},getData:ct,getTimeRange:Ve,getLayout:function(e){const t=ce(e,(e=>function(e){return"isDraggable"in e}(e)?e:void 0));return t||null},getDataLayers:function(e,t=!1){let n=e,r=[];for(;n;){const e=n.state.$data;if(e){if(ut(e)?r=r.concat(e):e.state.$data&&ut(e.state.$data)&&(r=r.concat(e.state.$data)),t&&r.length>0)break;n=n.parent}else n=n.parent}return r},interpolate:function(e,t,n,r,i){return""===t||null==t?"":ot(e,t,n,r,i)},lookupVariable:at,hasVariableDependencyInLoadingState:function(e){if(!e.variableDependency)return!1;for(const t of e.variableDependency.getNames()){const n=at(t,e);if(!n)continue;if(n.parent.isVariableLoadingOrWaitingToUpdate(n))return!0}return!1},findByKey:function(e,t){const n=ht(e,(e=>e.state.key===t));if(!n)throw new Error("Unable to find scene with key "+t);return n},findByKeyAndType:function(e,t,n){const r=ht(e,(e=>e.state.key===t));if(!r)throw new Error("Unable to find scene with key "+t);if(!(r instanceof n))throw new Error(`Found scene object with key ${t} does not match type ${n.name}`);return r},findObject:ht,findAllObjects:function e(t,n){const r=[];return t.forEachChild((t=>{n(t)&&r.push(t),r.push(...e(t,n))})),r},getAncestor:function(e,t){let n=e;for(;n;){if(n instanceof t)return n;n=n.parent}if(!n)throw new Error("Unable to find parent of type "+t.name);return n},getQueryController:function(e){let t=e;for(;t;){if(t.state.$behaviors)for(const e of t.state.$behaviors)if("isQueryController"in e)return e;t=t.parent}}};async function At(e,t){if(null==e?void 0:e.uid){const t=he.get(e.uid);if(t)return t}return e&&e.query?e:await(0,u.getDataSourceSrv)().get(e,t)}function Dt(e,t,...n){let r=!1;"undefined"!=typeof window&&(r="true"===localStorage.getItem("grafana.debug.scenes"))}class Rt{constructor(e,t){this._sceneObject=e,this._options=t,this._dependencies=new Set,this._isWaitingForVariables=!1,this.scanCount=0,this._statePaths=t.statePaths}hasDependencyOn(e){return this.getNames().has(e)}variableUpdateCompleted(e,t){const n=this.getNames();let r=!1;(n.has(e.state.name)||n.has(l.DataLinkBuiltInVars.includeVars))&&t&&(r=!0),Dt(0,0,e.state.name,this._isWaitingForVariables),this._options.onAnyVariableChanged&&this._options.onAnyVariableChanged(e),this._options.onVariableUpdateCompleted&&(this._isWaitingForVariables||r)&&this._options.onVariableUpdateCompleted(),r&&(this._options.onReferencedVariableValueChanged&&this._options.onReferencedVariableValueChanged(e),this._options.onReferencedVariableValueChanged||this._options.onVariableUpdateCompleted||this._sceneObject.forceRender())}hasDependencyInLoadingState(){return Ct.hasVariableDependencyInLoadingState(this._sceneObject)?(this._isWaitingForVariables=!0,!0):(this._isWaitingForVariables=!1,!1)}getNames(){const e=this._state,t=this._state=this._sceneObject.state;if(!e)return this.scanStateForDependencies(this._state),this._dependencies;if(t!==e)if(this._statePaths){for(const n of this._statePaths)if("*"===n||t[n]!==e[n]){this.scanStateForDependencies(t);break}}else this.scanStateForDependencies(t);return this._dependencies}setVariableNames(e){this._options.variableNames=e,this.scanStateForDependencies(this._state)}setPaths(e){this._statePaths=e}scanStateForDependencies(e){if(this._dependencies.clear(),this.scanCount+=1,this._options.variableNames)for(const e of this._options.variableNames)this._dependencies.add(e);if(this._statePaths)for(const t of this._statePaths){if("*"===t){this.extractVariablesFrom(e);break}{const n=e[t];n&&this.extractVariablesFrom(n)}}}extractVariablesFrom(e){rt.lastIndex=0;const t=("string"!=typeof e?Ur(e):e).matchAll(rt);if(t)for(const e of t){const[,t,n,,r]=e,i=t||n||r;this._dependencies.add(i)}}}class It{constructor(){this._values=new Map}recordCurrentDependencyValuesForSceneObject(e){if(this.clearValues(),e.variableDependency)for(const t of e.variableDependency.getNames()){const n=Ct.lookupVariable(t,e);n&&this._values.set(n.state.name,n.getValue())}}cloneAndRecordCurrentValuesForSceneObject(e){const t=new It;return t.recordCurrentDependencyValuesForSceneObject(e),t}clearValues(){this._values.clear()}hasValues(){return!!this._values}recordCurrentValue(e){this._values.set(e.state.name,e.getValue())}hasRecordedValue(e){return this._values.has(e.state.name)}hasValueChanged(e){if(this._values.has(e.state.name)){if(!zr(this._values.get(e.state.name),e.getValue()))return!0}return!1}hasDependenciesChanged(e){if(!this._values)return!1;if(!e.variableDependency)return!1;for(const t of e.variableDependency.getNames()){const n=Ct.lookupVariable(t,e);if(!n)continue;const r=n.state.name;if(n&&this._values.has(r)){if(!zr(this._values.get(r),n.getValue()))return!0}}return!1}}function Pt(e){return"object"==typeof e&&"getExtraQueries"in e}var Nt=Object.defineProperty,jt=Object.defineProperties,Lt=Object.getOwnPropertyDescriptors,Mt=Object.getOwnPropertySymbols,Ft=Object.prototype.hasOwnProperty,Vt=Object.prototype.propertyIsEnumerable,$t=(e,t,n)=>t in e?Nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const Bt=(e,t)=>(0,T.of)(t),zt=e=>t=>t.pipe((0,T.mergeMap)((([t,...n])=>{const r=n.flatMap((n=>{var r,i;return null!=(i=null==(r=e.get(n.request.requestId))?void 0:r(t,n))?i:(0,T.of)(n)}));return(0,T.forkJoin)([(0,T.of)(t),...r])})),(0,T.map)((([e,...t])=>{var n,r,i;return r=((e,t)=>{for(var n in t||(t={}))Ft.call(t,n)&&$t(e,n,t[n]);if(Mt)for(var n of Mt(t))Vt.call(t,n)&&$t(e,n,t[n]);return e})({},e),i={series:[...e.series,...t.flatMap((e=>e.series))],annotations:[...null!=(n=e.annotations)?n:[],...t.flatMap((e=>{var t;return null!=(t=e.annotations)?t:[]}))]},jt(r,Lt(i))})));var Ut=Object.defineProperty,qt=Object.defineProperties,Ht=Object.getOwnPropertyDescriptors,Gt=Object.getOwnPropertySymbols,Wt=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,Kt=(e,t,n)=>t in e?Ut(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Xt=(e,t)=>{for(var n in t||(t={}))Wt.call(t,n)&&Kt(e,n,t[n]);if(Gt)for(var n of Gt(t))Qt.call(t,n)&&Kt(e,n,t[n]);return e},Yt=(e,t)=>qt(e,Ht(t));function Jt(e){const t=e.getRoot();return lt(t)?t.enrichDataRequest(e):null}let Zt,en=new Set;function tn(e){return t=>{const n=Ct.getQueryController(e.origin);return n?new T.Observable((r=>{e.cancel||(e.cancel=()=>r.complete()),n.queryStarted(e);let i=!1;const a=t.subscribe({next:t=>{i||t.state===be.Loading||(i=!0,n.queryCompleted(e)),r.next(t)},error:e=>r.error(e),complete:()=>{r.complete()}});return()=>{a.unsubscribe(),i||n.queryCompleted(e)}})):t}}const nn=new Set;function rn(e,t){e.setState(t)}class an extends ee{constructor(){super(...arguments),this._urlSync=new on(this)}validateAndUpdate(){return this.getValueOptions({}).pipe((0,T.map)((e=>(this.updateValueGivenNewOptions(e),{}))))}onCancel(){this.setStateHelper({loading:!1});const e=this.parent;null==e||e.cancel(this)}updateValueGivenNewOptions(e){const{value:t,text:n}=this.state,r=this.getStateUpdateGivenNewOptions(e,t,n);this.interceptStateUpdateAfterValidation(r),this.setStateHelper(r),(r.value!==t||r.text!==n||this.hasAllValue())&&this.publishEvent(new $e(this),!0)}getStateUpdateGivenNewOptions(e,t,n){const r={options:e,loading:!1,value:t,text:n};if(0===e.length)return this.state.defaultToAll||this.state.includeAll?(r.value=tt,r.text=et):this.state.isMulti?(r.value=[],r.text=[]):(r.value="",r.text=""),r;if(this.hasAllValue())return this.state.includeAll||(r.value=e[0].value,r.text=e[0].label,this.state.isMulti&&(r.value=[r.value],r.text=[r.text])),r;if(this.state.isMulti){const i=(Array.isArray(t)?t:[t]).filter((t=>e.find((e=>e.value===t)))),a=i.map((t=>e.find((e=>e.value===t)).label));if(0===i.length){const t=this.getDefaultMultiState(e);r.value=t.value,r.text=t.text}else(0,pe.isEqual)(i,t)||(r.value=i),(0,pe.isEqual)(a,n)||(r.text=a);return r}let i=function(e,t,n){let r;for(const i of n){if(i.value===e)return i;i.label===t&&(r=i)}return r}(t,n,e);return i?(r.text=i.label,r.value=i.value):this.state.defaultToAll?(r.value=tt,r.text=et):(r.value=e[0].value,r.text=e[0].label),r}interceptStateUpdateAfterValidation(e){const t=e.value===tt&&this.state.text===et;this.skipNextValidation&&e.value!==this.state.value&&!t&&(e.value=this.state.value,e.text=this.state.text),this.skipNextValidation=!1}getValue(){return this.hasAllValue()?this.state.allValue?new sn(this.state.allValue,this):this.state.options.map((e=>e.value)):this.state.value}getValueText(){return this.hasAllValue()?et:Array.isArray(this.state.text)?this.state.text.join(" + "):String(this.state.text)}hasAllValue(){const e=this.state.value;return e===tt||Array.isArray(e)&&e[0]===tt}getDefaultMultiState(e){return this.state.defaultToAll?{value:[tt],text:[et]}:e.length>0?{value:[e[0].value],text:[e[0].label]}:{value:[],text:[]}}changeValueTo(e,t){if(e!==this.state.value||t!==this.state.text){if(t||(t=Array.isArray(e)?e.map((e=>this.findLabelTextForValue(e))):this.findLabelTextForValue(e)),Array.isArray(e)){if(0===e.length){const n=this.getDefaultMultiState(this.state.options);e=n.value,t=n.text}e[e.length-1]===tt?(e=[tt],t=[et]):e[0]===tt&&e.length>1&&(e.shift(),Array.isArray(t)&&t.shift())}(0,pe.isEqual)(e,this.state.value)&&(0,pe.isEqual)(t,this.state.text)||(this.setStateHelper({value:e,text:t,loading:!1}),this.publishEvent(new $e(this),!0))}}findLabelTextForValue(e){if(e===tt)return et;const t=this.state.options.find((t=>t.value===e));if(t)return t.label;const n=this.state.options.find((t=>t.label===e));return n?n.label:e}setStateHelper(e){rn(this,e)}getOptionsForSelect(){let e=this.state.options;if(this.state.includeAll&&(e=[{value:tt,label:et},...e]),!Array.isArray(this.state.value)){e.find((e=>e.value===this.state.value))||(e=[{value:this.state.value,label:String(this.state.text)},...e])}return e}}class on{constructor(e){this._sceneObject=e}getKey(){return`var-${this._sceneObject.state.name}`}getKeys(){return this._sceneObject.state.skipUrlSync?[]:[this.getKey()]}getUrlState(){if(this._sceneObject.state.skipUrlSync)return{};let e=null,t=this._sceneObject.state.value;return e=Array.isArray(t)?t.map(String):this._sceneObject.state.isMulti?[String(t)]:String(t),{[this.getKey()]:e}}updateFromUrl(e){let t=e[this.getKey()];null!=t&&(this._sceneObject.state.includeAll&&(t=function(e){if((0,pe.isArray)(e)&&e[0]===et)return[tt];if(e===et)return tt;return e}(t)),this._sceneObject.state.allValue&&this._sceneObject.state.allValue===t&&(t=tt),this._sceneObject.isActive||(this._sceneObject.skipNextValidation=!0),this._sceneObject.changeValueTo(t))}}class sn{constructor(e,t){this._value=e,this._variable=t}formatter(e){return e===ye.$m.Text?et:e===ye.$m.PercentEncode?Ge.get(ye.$m.PercentEncode).formatter(this._value,[],this._variable):e===ye.$m.QueryParam?Ge.get(ye.$m.QueryParam).formatter(et,[],this._variable):this._value}}var ln=n(2007);const un={RadioButton:{container:"data-testid radio-button"},Breadcrumbs:{breadcrumb:e=>`data-testid ${e} breadcrumb`},TimePicker:{openButton:"data-testid TimePicker Open Button",overlayContent:"data-testid TimePicker Overlay Content",fromField:"data-testid Time Range from field",toField:"data-testid Time Range to field",applyTimeRange:"data-testid TimePicker submit button",copyTimeRange:"data-testid TimePicker copy button",pasteTimeRange:"data-testid TimePicker paste button",calendar:{label:"data-testid Time Range calendar",openButton:"data-testid Open time range calendar",closeButton:"data-testid Close time range Calendar"},absoluteTimeRangeTitle:"data-testid-absolute-time-range-narrow"},DataSourcePermissions:{form:()=>'form[name="addPermission"]',roleType:"Role to add new permission to",rolePicker:"Built-in role picker",permissionLevel:"Permission Level"},DateTimePicker:{input:"data-testid date-time-input"},DataSource:{TestData:{QueryTab:{scenarioSelectContainer:"Test Data Query scenario select container",scenarioSelect:"Test Data Query scenario select",max:"TestData max",min:"TestData min",noise:"TestData noise",seriesCount:"TestData series count",spread:"TestData spread",startValue:"TestData start value",drop:"TestData drop values"}},DataSourceHttpSettings:{urlInput:"data-testid Datasource HTTP settings url"},Jaeger:{traceIDInput:"Trace ID"},Prometheus:{configPage:{connectionSettings:"Data source connection URL",manageAlerts:"prometheus-alerts-manager",scrapeInterval:"data-testid scrape interval",queryTimeout:"data-testid query timeout",defaultEditor:"data-testid default editor",disableMetricLookup:"disable-metric-lookup",prometheusType:"data-testid prometheus type",prometheusVersion:"data-testid prometheus version",cacheLevel:"data-testid cache level",incrementalQuerying:"prometheus-incremental-querying",queryOverlapWindow:"data-testid query overlap window",disableRecordingRules:"disable-recording-rules",customQueryParameters:"data-testid custom query parameters",httpMethod:"data-testid http method",exemplarsAddButton:"data-testid Add exemplar config button",internalLinkSwitch:"data-testid Internal link switch",codeModeMetricNamesSuggestionLimit:"data-testid code mode metric names suggestion limit"},queryEditor:{explain:"data-testid prometheus explain switch wrapper",editorToggle:"data-testid QueryEditorModeToggle",options:"data-testid prometheus options",legend:"data-testid prometheus legend wrapper",format:"data-testid prometheus format",step:"prometheus-step",type:"data-testid prometheus type",exemplars:"prometheus-exemplars",builder:{metricSelect:"data-testid metric select",hints:"data-testid prometheus hints",metricsExplorer:"data-testid metrics explorer",queryAdvisor:"data-testid query advisor"},code:{queryField:"data-testid prometheus query field",metricsCountInfo:"data-testid metrics count disclaimer",metricsBrowser:{openButton:"data-testid open metrics browser",selectMetric:"data-testid select a metric",seriesLimit:"data-testid series limit",metricList:"data-testid metric list",labelNamesFilter:"data-testid label names filter",labelValuesFilter:"data-testid label values filter",useQuery:"data-testid use query",useAsRateQuery:"data-testid use as rate query",validateSelector:"data-testid validate selector",clear:"data-testid clear"}}},exemplarMarker:"data-testid Exemplar marker",variableQueryEditor:{queryType:"data-testid query type",labelnames:{metricRegex:"data-testid label names metric regex"},labelValues:{labelSelect:"data-testid label values label select"},metricNames:{metricRegex:"data-testid metric names metric regex"},varQueryResult:"data-testid variable query result",seriesQuery:"data-testid prometheus series query",classicQuery:"data-testid prometheus classic query"},annotations:{minStep:"prometheus-annotation-min-step",title:"data-testid prometheus annotation title",tags:"data-testid prometheus annotation tags",text:"data-testid prometheus annotation text",seriesValueAsTimestamp:"data-testid prometheus annotation series value as timestamp"}}},Menu:{MenuComponent:e=>`${e} menu`,MenuGroup:e=>`${e} menu group`,MenuItem:e=>`${e} menu item`,SubMenu:{container:"data-testid SubMenu container",icon:"data-testid SubMenu icon"}},Panels:{Panel:{title:e=>`data-testid Panel header ${e}`,content:"data-testid panel content",headerItems:e=>`data-testid Panel header item ${e}`,menuItems:e=>`data-testid Panel menu item ${e}`,menu:e=>`data-testid Panel menu ${e}`,containerByTitle:e=>`${e} panel`,headerCornerInfo:e=>`Panel header ${e}`,status:e=>`data-testid Panel status ${e}`,loadingBar:()=>"Panel loading bar",HoverWidget:{container:"data-testid hover-header-container",dragIcon:"data-testid drag-icon"},PanelDataErrorMessage:"data-testid Panel data error message"},Visualization:{Graph:{container:"Graph container",VisualizationTab:{legendSection:"Legend section"},Legend:{legendItemAlias:e=>`gpl alias ${e}`,showLegendSwitch:"gpl show legend"},xAxis:{labels:()=>"div.flot-x-axis > div.flot-tick-label"}},BarGauge:{value:"Bar gauge value",valueV2:"data-testid Bar gauge value"},PieChart:{svgSlice:"data testid Pie Chart Slice"},Text:{container:()=>".markdown-html"},Table:{header:"table header",footer:"table-footer",body:"data-testid table body"}}},VizLegend:{seriesName:e=>`data-testid VizLegend series ${e}`},Drawer:{General:{title:e=>`Drawer title ${e}`,expand:"Drawer expand",contract:"Drawer contract",close:"data-testid Drawer close",rcContentWrapper:()=>".rc-drawer-content-wrapper",subtitle:"data-testid drawer subtitle"},DashboardSaveDrawer:{saveButton:"data-testid Save dashboard drawer button",saveAsButton:"data-testid Save as dashboard drawer button",saveAsTitleInput:"Save dashboard title field"}},PanelEditor:{General:{content:"data-testid Panel editor content"},OptionsPane:{content:"data-testid Panel editor option pane content",select:"Panel editor option pane select",fieldLabel:e=>`${e} field property editor`,fieldInput:e=>`data-testid Panel editor option pane field input ${e}`},DataPane:{content:"data-testid Panel editor data pane content"},applyButton:"data-testid Apply changes and go back to dashboard",toggleVizPicker:"data-testid toggle-viz-picker",toggleVizOptions:"data-testid toggle-viz-options",toggleTableView:"data-testid toggle-table-view",showZoomField:"Map controls Show zoom control field property editor",showAttributionField:"Map controls Show attribution field property editor",showScaleField:"Map controls Show scale field property editor",showMeasureField:"Map controls Show measure tools field property editor",showDebugField:"Map controls Show debug field property editor",measureButton:"show measure tools"},PanelInspector:{Data:{content:"Panel inspector Data content"},Stats:{content:"Panel inspector Stats content"},Json:{content:"data-testid Panel inspector Json content"},Query:{content:"Panel inspector Query content",refreshButton:"Panel inspector Query refresh button",jsonObjectKeys:()=>".json-formatter-key"}},Tab:{title:e=>`data-testid Tab ${e}`,active:()=>'[class*="-activeTabStyle"]'},RefreshPicker:{runButton:"RefreshPicker run button",intervalButton:"RefreshPicker interval button",runButtonV2:"data-testid RefreshPicker run button",intervalButtonV2:"data-testid RefreshPicker interval button"},QueryTab:{content:"Query editor tab content",queryInspectorButton:"Query inspector button",queryHistoryButton:"data-testid query-history-button",addQuery:"data-testid query-tab-add-query",queryGroupTopSection:"data-testid query group top section",addExpression:"data-testid query-tab-add-expression"},QueryHistory:{queryText:"Query text"},QueryEditorRows:{rows:"Query editor row"},QueryEditorRow:{actionButton:e=>`data-testid ${e}`,title:e=>`Query editor row title ${e}`,container:e=>`Query editor row ${e}`},AlertTab:{content:"data-testid Alert editor tab content"},AlertRules:{groupToggle:"data-testid group-collapse-toggle",toggle:"data-testid collapse-toggle",expandedContent:"data-testid expanded-content",previewButton:"data-testid alert-rule preview-button",ruleNameField:"data-testid alert-rule name-field",newFolderButton:"data-testid alert-rule new-folder-button",newFolderNameField:"data-testid alert-rule name-folder-name-field",newFolderNameCreateButton:"data-testid alert-rule name-folder-name-create-button",newEvaluationGroupButton:"data-testid alert-rule new-evaluation-group-button",newEvaluationGroupName:"data-testid alert-rule new-evaluation-group-name",newEvaluationGroupInterval:"data-testid alert-rule new-evaluation-group-interval",newEvaluationGroupCreate:"data-testid alert-rule new-evaluation-group-create-button"},Alert:{alert:e=>`Alert ${e}`,alertV2:e=>`data-testid Alert ${e}`},TransformTab:{content:"data-testid Transform editor tab content",newTransform:e=>`data-testid New transform ${e}`,transformationEditor:e=>`data-testid Transformation editor ${e}`,transformationEditorDebugger:e=>`data-testid Transformation editor debugger ${e}`},Transforms:{card:e=>`data-testid New transform ${e}`,disableTransformationButton:"data-testid Disable transformation button",Reduce:{modeLabel:"data-testid Transform mode label",calculationsLabel:"data-testid Transform calculations label"},SpatialOperations:{actionLabel:"root Action field property editor",locationLabel:"root Location Mode field property editor",location:{autoOption:"Auto location option",coords:{option:"Coords location option",latitudeFieldLabel:"root Latitude field field property editor",longitudeFieldLabel:"root Longitude field field property editor"},geohash:{option:"Geohash location option",geohashFieldLabel:"root Geohash field field property editor"},lookup:{option:"Lookup location option",lookupFieldLabel:"root Lookup field field property editor",gazetteerFieldLabel:"root Gazetteer field property editor"}}},searchInput:"data-testid search transformations",noTransformationsMessage:"data-testid no transformations message",addTransformationButton:"data-testid add transformation button",removeAllTransformationsButton:"data-testid remove all transformations button"},NavBar:{Configuration:{button:"Configuration"},Toggle:{button:"data-testid Toggle menu"},Reporting:{button:"Reporting"}},NavMenu:{Menu:"data-testid navigation mega-menu",item:"data-testid Nav menu item"},NavToolbar:{container:"data-testid Nav toolbar",shareDashboard:"data-testid Share dashboard",markAsFavorite:"data-testid Mark as favorite",editDashboard:{editButton:"data-testid Edit dashboard button",saveButton:"data-testid Save dashboard button",exitButton:"data-testid Exit edit mode button",settingsButton:"data-testid Dashboard settings",addRowButton:"data-testid Add row button",addLibraryPanelButton:"data-testid Add a panel from the panel library button",addVisualizationButton:"data-testid Add new visualization menu item",pastePanelButton:"data-testid Paste panel button",discardChangesButton:"data-testid Discard changes button",discardLibraryPanelButton:"data-testid Discard library panel button",unlinkLibraryPanelButton:"data-testid Unlink library panel button",saveLibraryPanelButton:"data-testid Save library panel button",backToDashboardButton:"data-testid Back to dashboard button"}},PageToolbar:{container:()=>".page-toolbar",item:e=>`${e}`,itemButton:e=>`data-testid ${e}`},QueryEditorToolbarItem:{button:e=>`QueryEditor toolbar item button ${e}`},BackButton:{backArrow:"data-testid Go Back"},OptionsGroup:{group:e=>e?`data-testid Options group ${e}`:"data-testid Options group",toggle:e=>e?`data-testid Options group ${e} toggle`:"data-testid Options group toggle"},PluginVisualization:{item:e=>`Plugin visualization item ${e}`,current:()=>'[class*="-currentVisualizationItem"]'},Select:{option:"data-testid Select option",toggleAllOptions:"data-testid toggle all options",input:()=>'input[id*="time-options-input"]',singleValue:()=>'div[class*="-singleValue"]'},FieldConfigEditor:{content:"Field config editor content"},OverridesConfigEditor:{content:"Field overrides editor content"},FolderPicker:{container:"Folder picker select container",containerV2:"data-testid Folder picker select container",input:"data-testid folder-picker-input"},ReadonlyFolderPicker:{container:"data-testid Readonly folder picker select container"},DataSourcePicker:{container:"data-testid Data source picker select container",input:()=>'input[id="data-source-picker"]',inputV2:"data-testid Select a data source",dataSourceList:"data-testid Data source list dropdown",advancedModal:{dataSourceList:"data-testid Data source list",builtInDataSourceList:"data-testid Built in data source list"}},TimeZonePicker:{container:"Time zone picker select container",containerV2:"data-testid Time zone picker select container",changeTimeSettingsButton:"data-testid Time zone picker Change time settings button"},WeekStartPicker:{container:"Choose starting day of the week",containerV2:"data-testid Choose starting day of the week",placeholder:"Choose starting day of the week"},TraceViewer:{spanBar:"data-testid SpanBar--wrapper"},QueryField:{container:"data-testid Query field"},QueryBuilder:{queryPatterns:"data-testid Query patterns",labelSelect:"data-testid Select label",inputSelect:"data-testid Select label-input",valueSelect:"data-testid Select value",matchOperatorSelect:"data-testid Select match operator"},ValuePicker:{button:e=>`data-testid Value picker button ${e}`,select:e=>`data-testid Value picker select ${e}`},Search:{section:"Search section",sectionV2:"data-testid Search section",items:"Search items",itemsV2:"data-testid Search items",cards:"data-testid Search cards",collapseFolder:e=>`data-testid Collapse folder ${e}`,expandFolder:e=>`data-testid Expand folder ${e}`,dashboardItem:e=>`${un.Search.dashboardItems} ${e}`,dashboardCard:e=>`data-testid Search card ${e}`,folderHeader:e=>`data-testid Folder header ${e}`,folderContent:e=>`data-testid Folder content ${e}`,dashboardItems:"data-testid Dashboard search item"},DashboardLinks:{container:"data-testid Dashboard link container",dropDown:"data-testid Dashboard link dropdown",link:"data-testid Dashboard link"},LoadingIndicator:{icon:"data-testid Loading indicator"},CallToActionCard:{button:e=>`Call to action button ${e}`,buttonV2:e=>`data-testid Call to action button ${e}`},DataLinksContextMenu:{singleLink:"data-testid Data link"},CodeEditor:{container:"data-testid Code editor container"},ReactMonacoEditor:{editorLazy:"data-testid ReactMonacoEditor editorLazy"},DashboardImportPage:{textarea:"data-testid-import-dashboard-textarea",submit:"data-testid-load-dashboard"},ImportDashboardForm:{name:"data-testid-import-dashboard-title",submit:"data-testid-import-dashboard-submit"},PanelAlertTabContent:{content:"data-testid Unified alert editor tab content"},VisualizationPreview:{card:e=>`data-testid suggestion-${e}`},ColorSwatch:{name:"data-testid-colorswatch"},DashboardRow:{title:e=>`data-testid dashboard-row-title-${e}`},UserProfile:{profileSaveButton:"data-testid-user-profile-save",preferencesSaveButton:"data-testid-shared-prefs-save",orgsTable:"data-testid-user-orgs-table",sessionsTable:"data-testid-user-sessions-table",extensionPointTabs:"data-testid-extension-point-tabs",extensionPointTab:e=>`data-testid-extension-point-tab-${e}`},FileUpload:{inputField:"data-testid-file-upload-input-field",fileNameSpan:"data-testid-file-upload-file-name"},DebugOverlay:{wrapper:"debug-overlay"},OrgRolePicker:{input:"Role"},AnalyticsToolbarButton:{button:"Dashboard insights"},Variables:{variableOption:"data-testid variable-option",variableLinkWrapper:"data-testid variable-link-wrapper"},Annotations:{annotationsTypeInput:"data-testid annotations-type-input",annotationsChoosePanelInput:"data-testid choose-panels-input",editor:{testButton:"data-testid annotations-test-button",resultContainer:"data-testid annotations-query-result-container"}},Tooltip:{container:"data-testid tooltip"},ReturnToPrevious:{buttonGroup:"data-testid dismissable button group",backButton:"data-testid back",dismissButton:"data-testid dismiss"},SQLQueryEditor:{selectColumn:"data-testid select-column",selectAggregation:"data-testid select-aggregation",selectAlias:"data-testid select-alias",filterConjunction:"data-testid filter-conjunction",filterField:"data-testid filter-field",filterOperator:"data-testid filter-operator",headerTableSelector:"data-testid header-table-selector",headerFilterSwitch:"data-testid header-filter-switch",headerGroupSwitch:"data-testid header-group-switch",headerOrderSwitch:"data-testid header-order-switch",headerPreviewSwitch:"data-testid header-preview-switch"},EntityNotFound:{container:"data-testid entity-not-found"}},cn={pages:{Login:{url:"/login",username:"data-testid Username input field",password:"data-testid Password input field",submit:"data-testid Login button",skip:"data-testid Skip change password button"},Home:{url:"/"},DataSource:{name:"data-testid Data source settings page name input field",delete:"Data source settings page Delete button",readOnly:"data-testid Data source settings page read only message",saveAndTest:"data-testid Data source settings page Save and Test button",alert:"data-testid Data source settings page Alert"},DataSources:{url:"/datasources",dataSources:e=>`Data source list item ${e}`},EditDataSource:{url:e=>`/datasources/edit/${e}`,settings:"Datasource settings page basic settings"},AddDataSource:{url:"/datasources/new",dataSourcePlugins:e=>`Data source plugin item ${e}`,dataSourcePluginsV2:e=>`Add new data source ${e}`},ConfirmModal:{delete:"data-testid Confirm Modal Danger Button"},AddDashboard:{url:"/dashboard/new",itemButton:e=>`data-testid ${e}`,addNewPanel:"data-testid Add new panel",addNewRow:"data-testid Add new row",addNewPanelLibrary:"data-testid Add new panel from panel library"},Dashboard:{url:e=>`/d/${e}`,DashNav:{nav:"Dashboard navigation",navV2:"data-testid Dashboard navigation",publicDashboardTag:"data-testid public dashboard tag",shareButton:"data-testid share-button",scrollContainer:"data-testid Dashboard canvas scroll container",newShareButton:{container:"data-testid new share button",shareLink:"data-testid new share link-button",arrowMenu:"data-testid new share button arrow menu",menu:{container:"data-testid new share button menu",shareInternally:"data-testid new share button share internally",shareExternally:"data-testid new share button share externally",shareSnapshot:"data-testid new share button share snapshot"}},NewExportButton:{container:"data-testid new export button",arrowMenu:"data-testid new export button arrow menu",Menu:{container:"data-testid new export button menu",exportAsJson:"data-testid new export button export as json"}},playlistControls:{prev:"data-testid playlist previous dashboard button",stop:"data-testid playlist stop dashboard button",next:"data-testid playlist next dashboard button"}},Controls:"data-testid dashboard controls",SubMenu:{submenu:"Dashboard submenu",submenuItem:"data-testid template variable",submenuItemLabels:e=>`data-testid Dashboard template variables submenu Label ${e}`,submenuItemValueDropDownValueLinkTexts:e=>`data-testid Dashboard template variables Variable Value DropDown value link text ${e}`,submenuItemValueDropDownDropDown:"Variable options",submenuItemValueDropDownOptionTexts:e=>`data-testid Dashboard template variables Variable Value DropDown option text ${e}`,Annotations:{annotationsWrapper:"data-testid annotation-wrapper",annotationLabel:e=>`data-testid Dashboard annotations submenu Label ${e}`,annotationToggle:e=>`data-testid Dashboard annotations submenu Toggle ${e}`}},Settings:{Actions:{close:"data-testid dashboard-settings-close"},General:{deleteDashBoard:"data-testid Dashboard settings page delete dashboard button",sectionItems:e=>`Dashboard settings section item ${e}`,saveDashBoard:"Dashboard settings aside actions Save button",saveAsDashBoard:"Dashboard settings aside actions Save As button",timezone:"Time zone picker select container",title:"General"},Annotations:{List:{addAnnotationCTA:un.CallToActionCard.button("Add annotation query"),addAnnotationCTAV2:un.CallToActionCard.buttonV2("Add annotation query"),annotations:"data-testid list-annotations"},Settings:{name:"data-testid Annotations settings name input"},NewAnnotation:{panelFilterSelect:"data-testid annotations-panel-filter",showInLabel:"data-testid show-in-label",previewInDashboard:"data-testid annotations-preview",delete:"data-testid annotations-delete",apply:"data-testid annotations-apply",enable:"data-testid annotation-enable",hide:"data-testid annotation-hide"}},Variables:{List:{addVariableCTA:un.CallToActionCard.button("Add variable"),addVariableCTAV2:un.CallToActionCard.buttonV2("Add variable"),newButton:"Variable editor New variable button",table:"Variable editor Table",tableRowNameFields:e=>`Variable editor Table Name field ${e}`,tableRowDefinitionFields:e=>`Variable editor Table Definition field ${e}`,tableRowArrowUpButtons:e=>`Variable editor Table ArrowUp button ${e}`,tableRowArrowDownButtons:e=>`Variable editor Table ArrowDown button ${e}`,tableRowDuplicateButtons:e=>`Variable editor Table Duplicate button ${e}`,tableRowRemoveButtons:e=>`Variable editor Table Remove button ${e}`},Edit:{General:{headerLink:"Variable editor Header link",modeLabelNew:"Variable editor Header mode New",modeLabelEdit:"Variable editor Header mode Edit",generalNameInput:"Variable editor Form Name field",generalNameInputV2:"data-testid Variable editor Form Name field",generalTypeSelect:"Variable editor Form Type select",generalTypeSelectV2:"data-testid Variable editor Form Type select",generalLabelInput:"Variable editor Form Label field",generalLabelInputV2:"data-testid Variable editor Form Label field",generalHideSelect:"Variable editor Form Hide select",generalHideSelectV2:"data-testid Variable editor Form Hide select",selectionOptionsMultiSwitch:"data-testid Variable editor Form Multi switch",selectionOptionsIncludeAllSwitch:"data-testid Variable editor Form IncludeAll switch",selectionOptionsCustomAllInput:"data-testid Variable editor Form IncludeAll field",previewOfValuesOption:"data-testid Variable editor Preview of Values option",submitButton:"data-testid Variable editor Run Query button",applyButton:"data-testid Variable editor Apply button"},QueryVariable:{queryOptionsDataSourceSelect:un.DataSourcePicker.inputV2,queryOptionsRefreshSelect:"Variable editor Form Query Refresh select",queryOptionsRefreshSelectV2:"data-testid Variable editor Form Query Refresh select",queryOptionsRegExInput:"Variable editor Form Query RegEx field",queryOptionsRegExInputV2:"data-testid Variable editor Form Query RegEx field",queryOptionsSortSelect:"Variable editor Form Query Sort select",queryOptionsSortSelectV2:"data-testid Variable editor Form Query Sort select",queryOptionsQueryInput:"data-testid Variable editor Form Default Variable Query Editor textarea",valueGroupsTagsEnabledSwitch:"Variable editor Form Query UseTags switch",valueGroupsTagsTagsQueryInput:"Variable editor Form Query TagsQuery field",valueGroupsTagsTagsValuesQueryInput:"Variable editor Form Query TagsValuesQuery field"},ConstantVariable:{constantOptionsQueryInput:"Variable editor Form Constant Query field",constantOptionsQueryInputV2:"data-testid Variable editor Form Constant Query field"},DatasourceVariable:{datasourceSelect:"data-testid datasource variable datasource type"},TextBoxVariable:{textBoxOptionsQueryInput:"Variable editor Form TextBox Query field",textBoxOptionsQueryInputV2:"data-testid Variable editor Form TextBox Query field"},CustomVariable:{customValueInput:"data-testid custom-variable-input"},IntervalVariable:{intervalsValueInput:"data-testid interval variable intervals input",autoEnabledCheckbox:"data-testid interval variable auto value checkbox",stepCountIntervalSelect:"data-testid interval variable step count input",minIntervalInput:"data-testid interval variable mininum interval input"},GroupByVariable:{dataSourceSelect:un.DataSourcePicker.inputV2,infoText:"data-testid group by variable info text",modeToggle:"data-testid group by variable mode toggle"},AdHocFiltersVariable:{datasourceSelect:un.DataSourcePicker.inputV2,infoText:"data-testid ad-hoc filters variable info text",modeToggle:"data-testid ad-hoc filters variable mode toggle"}}}},Annotations:{marker:"data-testid annotation-marker"},Rows:{Repeated:{ConfigSection:{warningMessage:"data-testid Repeated rows warning message"}}}},Dashboards:{url:"/dashboards",dashboards:e=>`Dashboard search item ${e}`},SaveDashboardAsModal:{newName:"Save dashboard title field",save:"Save dashboard button"},SaveDashboardModal:{save:"Dashboard settings Save Dashboard Modal Save button",saveVariables:"Dashboard settings Save Dashboard Modal Save variables checkbox",saveTimerange:"Dashboard settings Save Dashboard Modal Save timerange checkbox",saveRefresh:"Dashboard settings Save Dashboard Modal Save refresh checkbox"},SharePanelModal:{linkToRenderedImage:"Link to rendered image"},ShareDashboardModal:{PublicDashboard:{WillBePublicCheckbox:"data-testid public dashboard will be public checkbox",LimitedDSCheckbox:"data-testid public dashboard limited datasources checkbox",CostIncreaseCheckbox:"data-testid public dashboard cost may increase checkbox",PauseSwitch:"data-testid public dashboard pause switch",EnableAnnotationsSwitch:"data-testid public dashboard on off switch for annotations",CreateButton:"data-testid public dashboard create button",DeleteButton:"data-testid public dashboard delete button",CopyUrlInput:"data-testid public dashboard copy url input",CopyUrlButton:"data-testid public dashboard copy url button",SettingsDropdown:"data-testid public dashboard settings dropdown",TemplateVariablesWarningAlert:"data-testid public dashboard disabled template variables alert",UnsupportedDataSourcesWarningAlert:"data-testid public dashboard unsupported data sources alert",NoUpsertPermissionsWarningAlert:"data-testid public dashboard no upsert permissions alert",EnableTimeRangeSwitch:"data-testid public dashboard on off switch for time range",EmailSharingConfiguration:{Container:"data-testid email sharing config container",ShareType:"data-testid public dashboard share type",EmailSharingInput:"data-testid public dashboard email sharing input",EmailSharingInviteButton:"data-testid public dashboard email sharing invite button",EmailSharingList:"data-testid public dashboard email sharing list",DeleteEmail:"data-testid public dashboard delete email button",ReshareLink:"data-testid public dashboard reshare link button"}},SnapshotScene:{url:e=>`/dashboard/snapshot/${e}`,PublishSnapshot:"data-testid publish snapshot button",CopyUrlButton:"data-testid snapshot copy url button",CopyUrlInput:"data-testid snapshot copy url input"}},ShareDashboardDrawer:{ShareInternally:{container:"data-testid share internally drawer container",lockTimeRangeSwitch:"data-testid share internally lock time range switch",shortenUrlSwitch:"data-testid share internally shorten url switch",copyUrlButton:"data-testid share internally copy url button"},ShareExternally:{container:"data-testid share externally drawer container",publicAlert:"data-testid public share alert",emailSharingAlert:"data-testid email share alert",shareTypeSelect:"data-testid share externally share type select",Creation:{PublicShare:{createButton:"data-testid public share dashboard create button",cancelButton:"data-testid public share dashboard cancel button"},EmailShare:{createButton:"data-testid email share dashboard create button",cancelButton:"data-testid email share dashboard cancel button"},willBePublicCheckbox:"data-testid share dashboard will be public checkbox"},Configuration:{enableTimeRangeSwitch:"data-testid share externally enable time range switch",enableAnnotationsSwitch:"data-testid share externally enable annotations switch",copyUrlButton:"data-testid share externally copy url button",revokeAccessButton:"data-testid share externally revoke access button",toggleAccessButton:"data-testid share externally pause or resume access button"}},ShareSnapshot:{url:e=>`/dashboard/snapshot/${e}`,container:"data-testid share snapshot drawer container",publishSnapshot:"data-testid share snapshot publish button",copyUrlButton:"data-testid share snapshot copy url button"}},ExportDashboardDrawer:{ExportAsJson:{container:"data-testid export as json drawer container",codeEditor:"data-testid export as json code editor",exportExternallyToggle:"data-testid export as json externally switch",saveToFileButton:"data-testid export as json save to file button",copyToClipboardButton:"data-testid export as json copy to clipboard button",cancelButton:"data-testid export as json cancel button"}},PublicDashboard:{page:"public-dashboard-page",NotAvailable:{container:"public-dashboard-not-available",title:"public-dashboard-title",pausedDescription:"public-dashboard-paused-description"},footer:"public-dashboard-footer"},PublicDashboardScene:{loadingPage:"public-dashboard-scene-loading-page",page:"public-dashboard-scene-page",controls:"public-dashboard-controls"},RequestViewAccess:{form:"request-view-access-form",recipientInput:"request-view-access-recipient-input",submitButton:"request-view-access-submit-button"},PublicDashboardConfirmAccess:{submitButton:"data-testid confirm-access-submit-button"},Explore:{url:"/explore",General:{container:"data-testid Explore",graph:"Explore Graph",table:"Explore Table",scrollView:"data-testid explorer scroll view"},QueryHistory:{container:"data-testid QueryHistory"}},SoloPanel:{url:e=>`/d-solo/${e}`},PluginsList:{page:"Plugins list page",list:"Plugins list",listItem:"Plugins list item",signatureErrorNotice:"data-testid Unsigned plugins notice"},PluginPage:{page:"Plugin page",signatureInfo:"data-testid Plugin signature info",disabledInfo:"data-testid Plugin disabled info"},PlaylistForm:{name:"Playlist name",interval:"Playlist interval",itemDelete:"data-testid playlist-form-delete-item"},BrowseDashboards:{table:{body:"data-testid browse-dashboards-table",row:e=>`data-testid browse dashboards row ${e}`,checkbox:e=>`data-testid ${e} checkbox`},NewFolderForm:{form:"data-testid new folder form",nameInput:"data-testid new-folder-name-input",createButton:"data-testid new-folder-create-button"}},Search:{url:"/?search=openn",FolderView:{url:"/?search=open&layout=folders"}},PublicDashboards:{ListItem:{linkButton:"public-dashboard-link-button",configButton:"public-dashboard-configuration-button",trashcanButton:"public-dashboard-remove-button",pauseSwitch:"data-testid public dashboard pause switch"}},UserListPage:{tabs:{allUsers:"data-testid all-users-tab",orgUsers:"data-testid org-users-tab",anonUserDevices:"data-testid anon-user-devices-tab",publicDashboardsUsers:"data-testid public-dashboards-users-tab",users:"data-testid users-tab"},org:{url:"/org/users"},admin:{url:"/admin/users"},publicDashboards:{container:"data-testid public-dashboards-users-list"},UserListAdminPage:{container:"data-testid user-list-admin-page"},UsersListPage:{container:"data-testid users-list-page"},UserAnonListPage:{container:"data-testid user-anon-list-page"},UsersListPublicDashboardsPage:{container:"data-testid users-list-public-dashboards-page",DashboardsListModal:{listItem:e=>`data-testid dashboards-list-item-${e}`}}},ProfilePage:{url:"/profile"}},components:un};var dn=n(6089);const hn=(e,t)=>e>t?1:e<t?-1:0,pn=1/0,fn=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),mn="eexxaacctt",gn=/\p{P}/gu,vn=["en",{numeric:!0,sensitivity:"base"}],yn=(e,t,n)=>e.replace("A-Z",t).replace("a-z",n),bn={unicode:!1,alpha:null,interSplit:"[^A-Za-z\\d']+",intraSplit:"[a-z][A-Z]",interBound:"[^A-Za-z\\d]",intraBound:"[A-Za-z]\\d|\\d[A-Za-z]|[a-z][A-Z]",interLft:0,interRgt:0,interChars:".",interIns:pn,intraChars:"[a-z\\d']",intraIns:null,intraContr:"'[a-z]{1,2}\\b",intraMode:0,intraSlice:[1,pn],intraSub:null,intraTrn:null,intraDel:null,intraFilt:(e,t,n)=>!0,toUpper:e=>e.toLocaleUpperCase(),toLower:e=>e.toLocaleLowerCase(),compare:null,sort:(e,t,n,r=hn)=>{let{idx:i,chars:a,terms:o,interLft2:s,interLft1:l,start:u,intraIns:c,interIns:d,cases:h}=e;return i.map(((e,t)=>t)).sort(((e,n)=>a[n]-a[e]||c[e]-c[n]||o[n]+s[n]+.5*l[n]-(o[e]+s[e]+.5*l[e])||d[e]-d[n]||u[e]-u[n]||h[n]-h[e]||r(t[i[e]],t[i[n]])))}},wn=(e,t)=>0==t?"":1==t?e+"??":t==pn?e+"*?":e+`{0,${t}}?`,Sn="(?:\\b|_)";function xn(e){e=Object.assign({},bn,e);let{unicode:t,interLft:n,interRgt:r,intraMode:i,intraSlice:a,intraIns:o,intraSub:s,intraTrn:l,intraDel:u,intraContr:c,intraSplit:d,interSplit:h,intraBound:p,interBound:f,intraChars:m,toUpper:g,toLower:v,compare:y}=e;o??=i,s??=i,l??=i,u??=i,y??="undefined"==typeof Intl?hn:new Intl.Collator(...vn).compare;let b=e.letters??e.alpha;if(null!=b){let e=g(b),t=v(b);h=yn(h,e,t),d=yn(d,e,t),f=yn(f,e,t),p=yn(p,e,t),m=yn(m,e,t),c=yn(c,e,t)}let w=t?"u":"";const S='".+?"',x=new RegExp(S,"gi"+w),E=new RegExp(`(?:\\s+|^)-(?:${m}+|${S})`,"gi"+w);let{intraRules:_}=e;null==_&&(_=e=>{let t=bn.intraSlice,n=0,r=0,i=0,c=0;if(/[^\d]/.test(e)){let d=e.length;d<=4?d>=3&&(i=Math.min(l,1),4==d&&(n=Math.min(o,1))):(t=a,n=o,r=s,i=l,c=u)}return{intraSlice:t,intraIns:n,intraSub:r,intraTrn:i,intraDel:c}});let O=!!d,T=new RegExp(d,"g"+w),k=new RegExp(h,"g"+w),C=new RegExp("^"+h+"|"+h+"$","g"+w),A=new RegExp(c,"gi"+w);const D=(e,t=!1)=>{let n=[];e=(e=e.replace(x,(e=>(n.push(e),mn)))).replace(C,""),t||(e=v(e)),O&&(e=e.replace(T,(e=>e[0]+" "+e[1])));let r=0;return e.split(k).filter((e=>""!=e)).map((e=>e===mn?n[r++]:e))},R=/[^\d]+|\d+/g,I=(t,a=0,s=!1)=>{let l=D(t);if(0==l.length)return[];let u,c=Array(l.length).fill("");if(l=l.map(((e,t)=>e.replace(A,(e=>(c[t]=e,""))))),1==i)u=l.map(((e,t)=>{if('"'===e[0])return fn(e.slice(1,-1));let n="";for(let r of e.matchAll(R)){let e=r[0],{intraSlice:i,intraIns:a,intraSub:o,intraTrn:s,intraDel:l}=_(e);if(a+o+s+l==0)n+=e+c[t];else{let[r,u]=i,d=e.slice(0,r),h=e.slice(u),p=e.slice(r,u);1==a&&1==d.length&&d!=p[0]&&(d+="(?!"+d+")");let f=p.length,g=[e];if(o)for(let e=0;e<f;e++)g.push(d+p.slice(0,e)+m+p.slice(e+1)+h);if(s)for(let e=0;e<f-1;e++)p[e]!=p[e+1]&&g.push(d+p.slice(0,e)+p[e+1]+p[e]+p.slice(e+2)+h);if(l)for(let e=0;e<f;e++)g.push(d+p.slice(0,e+1)+"?"+p.slice(e+1)+h);if(a){let e=wn(m,1);for(let t=0;t<f;t++)g.push(d+p.slice(0,t)+e+p.slice(t)+h)}n+="(?:"+g.join("|")+")"+c[t]}}return n}));else{let e=wn(m,o);2==a&&o>0&&(e=")("+e+")("),u=l.map(((t,n)=>'"'===t[0]?fn(t.slice(1,-1)):t.split("").map(((e,t,n)=>(1==o&&0==t&&n.length>1&&e!=n[t+1]&&(e+="(?!"+e+")"),e))).join(e)+c[n]))}let d=2==n?Sn:"",h=2==r?Sn:"",p=h+wn(e.interChars,e.interIns)+d;return a>0?s?u=d+"("+u.join(")"+h+"|"+d+"(")+")"+h:(u="("+u.join(")("+p+")(")+")",u="(.??"+d+")"+u+"("+h+".*)"):(u=u.join(p),u=d+u+h),[new RegExp(u,"i"+w),l,c]},P=(e,t,n)=>{let[r]=I(t);if(null==r)return null;let i=[];if(null!=n)for(let t=0;t<n.length;t++){let a=n[t];r.test(e[a])&&i.push(a)}else for(let t=0;t<e.length;t++)r.test(e[t])&&i.push(t);return i};let N=!!p,j=new RegExp(f,w),L=new RegExp(p,w);const M=(t,i,a)=>{let[o,s,l]=I(a,1),u=D(a,!0),[c]=I(a,2),d=s.length,h=Array(d),p=Array(d);for(let e=0;e<d;e++){let t=s[e],n=u[e],r='"'==t[0]?t.slice(1,-1):t+l[e],i='"'==n[0]?n.slice(1,-1):n+l[e];h[e]=r,p[e]=i}let f=t.length,m=Array(f).fill(0),g={idx:Array(f),start:m.slice(),chars:m.slice(),cases:m.slice(),terms:m.slice(),interIns:m.slice(),intraIns:m.slice(),interLft2:m.slice(),interRgt2:m.slice(),interLft1:m.slice(),interRgt1:m.slice(),ranges:Array(f)},y=1==n||1==r,b=0;for(let a=0;a<t.length;a++){let s=i[t[a]],l=s.match(o),u=l.index+l[1].length,f=u,m=!1,S=0,x=0,E=0,_=0,O=0,T=0,k=0,C=0,A=0,D=[];for(let t=0,i=2;t<d;t++,i+=2){let a=v(l[i]),o=h[t],c=p[t],g=o.length,b=a.length,R=a==o;if(l[i]==c&&k++,!R&&l[i+1].length>=g){let e=v(l[i+1]).indexOf(o);e>-1&&(D.push(f,b,e,g),f+=F(l,i,e,g),a=o,b=g,R=!0,0==t&&(u=f))}if(y||R){let e=f-1,c=f+b,d=!1,h=!1;if(-1==e||j.test(s[e]))R&&S++,d=!0;else{if(2==n){m=!0;break}if(N&&L.test(s[e]+s[e+1]))R&&x++,d=!0;else if(1==n){let e=l[i+1],n=f+b;if(e.length>=g){let r,c=0,h=!1,p=new RegExp(o,"ig"+w);for(;r=p.exec(e);){c=r.index;let e=n+c,t=e-1;if(-1==t||j.test(s[t])){S++,h=!0;break}if(L.test(s[t]+s[e])){x++,h=!0;break}}h&&(d=!0,D.push(f,b,c,g),f+=F(l,i,c,g),a=o,b=g,R=!0,0==t&&(u=f))}if(!d){m=!0;break}}}if(c==s.length||j.test(s[c]))R&&E++,h=!0;else{if(2==r){m=!0;break}if(N&&L.test(s[c-1]+s[c]))R&&_++,h=!0;else if(1==r){m=!0;break}}R&&(O+=g,d&&h&&T++)}if(b>g&&(A+=b-g),t>0&&(C+=l[i-1].length),!e.intraFilt(o,a,f)){m=!0;break}t<d-1&&(f+=b+l[i+1].length)}if(!m){g.idx[b]=t[a],g.interLft2[b]=S,g.interLft1[b]=x,g.interRgt2[b]=E,g.interRgt1[b]=_,g.chars[b]=O,g.terms[b]=T,g.cases[b]=k,g.interIns[b]=C,g.intraIns[b]=A,g.start[b]=u;let e=s.match(c),n=e.index+e[1].length,r=D.length,i=r>0?0:1/0,o=r-4;for(let t=2;t<e.length;){let r=e[t].length;if(i<=o&&D[i]==n){let r=D[i+1],a=D[i+2],o=D[i+3],s=t,l="";for(let t=0;t<r;s++)l+=e[s],t+=e[s].length;e.splice(t,s-t,l),n+=F(e,t,a,o),i+=4}else n+=r,t++}n=e.index+e[1].length;let l=g.ranges[b]=[],d=n,h=n;for(let t=2;t<e.length;t++){let r=e[t].length;n+=r,t%2==0?h=n:r>0&&(l.push(d,h),d=h=n)}h>d&&l.push(d,h),b++}}if(b<t.length)for(let e in g)g[e]=g[e].slice(0,b);return g},F=(e,t,n,r)=>{let i=e[t]+e[t+1].slice(0,n);return e[t-1]+=i,e[t]=e[t+1].slice(n,n+r),e[t+1]=e[t+1].slice(n+r),i.length};return{search:(...t)=>((t,n,r,i=1e3,a)=>{r=r?!0===r?5:r:0;let o=null,s=null,l=[];n=n.replace(E,(e=>{let t=e.trim().slice(1);return t='"'===t[0]?fn(t.slice(1,-1)):t.replace(gn,""),""!=t&&l.push(t),""}));let u,c=D(n);if(l.length>0){if(u=new RegExp(l.join("|"),"i"+w),0==c.length){let e=[];for(let n=0;n<t.length;n++)u.test(t[n])||e.push(n);return[e,null,null]}}else if(0==c.length)return[null,null,null];if(r>0){let e=D(n);if(e.length>1){let n=e.slice().sort(((e,t)=>t.length-e.length));for(let e=0;e<n.length;e++){if(0==a?.length)return[[],null,null];a=P(t,n[e],a)}if(e.length>r)return[a,null,null];o=_n(e).map((e=>e.join(" "))),s=[];let i=new Set;for(let e=0;e<o.length;e++)if(i.size<a.length){let n=a.filter((e=>!i.has(e))),r=P(t,o[e],n);for(let e=0;e<r.length;e++)i.add(r[e]);s.push(r)}else s.push([])}}null==o&&(o=[n],s=[a?.length>0?a:P(t,n)]);let d=null,h=null;if(l.length>0&&(s=s.map((e=>e.filter((e=>!u.test(t[e])))))),s.reduce(((e,t)=>e+t.length),0)<=i){d={},h=[];for(let n=0;n<s.length;n++){let r=s[n];if(null==r||0==r.length)continue;let i=o[n],a=M(r,t,i),l=e.sort(a,t,i,y);if(n>0)for(let e=0;e<l.length;e++)l[e]+=h.length;for(let e in a)d[e]=(d[e]??[]).concat(a[e]);h=h.concat(l)}}return[[].concat(...s),d,h]})(...t),split:D,filter:P,info:M,sort:e.sort}}const En=(()=>{let e={A:"ÁÀÃÂÄĄ",a:"áàãâäą",E:"ÉÈÊËĖ",e:"éèêëę",I:"ÍÌÎÏĮ",i:"íìîïį",O:"ÓÒÔÕÖ",o:"óòôõö",U:"ÚÙÛÜŪŲ",u:"úùûüūų",C:"ÇČĆ",c:"çčć",L:"Ł",l:"ł",N:"ÑŃ",n:"ñń",S:"ŠŚ",s:"šś",Z:"ŻŹ",z:"żź"},t=new Map,n="";for(let r in e)e[r].split("").forEach((e=>{n+=e,t.set(e,r)}));let r=new RegExp(`[${n}]`,"g"),i=e=>t.get(e);return e=>{if("string"==typeof e)return e.replace(r,i);let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n].replace(r,i);return t}})();function _n(e){let t,n,r=(e=e.slice()).length,i=[e.slice()],a=new Array(r).fill(0),o=1;for(;o<r;)a[o]<o?(t=o%2&&a[o],n=e[o],e[o]=e[t],e[t]=n,++a[o],o=1,i.push(e.slice())):(a[o]=0,++o);return i}const On=(e,t)=>t?`<mark>${e}</mark>`:e,Tn=(e,t)=>e+t;function kn(e,t){const n=new xn;let r=e;const i=[],a=1e4;return t&&(r=[{value:tt,label:et},...r]),e=>{if(""===e)return r.length>a?r.slice(0,a):r;if(0===i.length)for(let e=0;e<r.length;e++)i.push(r[e].label);const t=n.filter(i,e),o=[];if(t){for(let e=0;e<t.length;e++)if(o.push(r[t[e]]),o.length>a)return o;return o}return r.length>a?r.slice(0,a):r}}xn.latinize=En,xn.permute=e=>_n([...Array(e.length).keys()]).sort(((e,t)=>{for(let n=0;n<e.length;n++)if(e[n]!=t[n])return e[n]-t[n];return 0})).map((t=>t.map((t=>e[t])))),xn.highlight=function(e,t,n=On,r="",i=Tn){r=i(r,n(e.substring(0,t[0]),!1))??r;for(let a=0;a<t.length;a+=2){let o=t[a],s=t[a+1];r=i(r,n(e.substring(o,s),!0))??r,a<t.length-3&&(r=i(r,n(e.substring(t[a+1],t[a+2]),!1))??r)}return r=i(r,n(e.substring(t[t.length-1]),!1))??r};var Cn=Object.defineProperty,An=Object.defineProperties,Dn=Object.getOwnPropertyDescriptors,Rn=Object.getOwnPropertySymbols,In=Object.prototype.hasOwnProperty,Pn=Object.prototype.propertyIsEnumerable,Nn=(e,t,n)=>t in e?Cn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const jn=()=>!0;function Ln({model:e}){const{value:t,text:n,key:r,options:i,includeAll:s,isReadOnly:l}=e.useState(),[u,c]=(0,a.useState)(""),[d,h]=(0,a.useState)(!1),p=function(e,t){return{value:e,label:null!=t?t:String(e)}}(t,String(n)),f=(0,a.useMemo)((()=>kn(i,s)),[i,s])(u);return o().createElement(ln.Select,{id:r,isValidNewOption:e=>e.trim().length>0,placeholder:"Select value",width:"auto",disabled:l,value:p,inputValue:u,allowCustomValue:!0,virtualized:!0,filterOption:jn,tabSelectsValue:!1,onInputChange:(t,{action:n})=>"input-change"===n?(c(t),e.onSearchChange&&e.onSearchChange(t),t):t,onOpenMenu:()=>{d&&c(String(n))},onCloseMenu:()=>{c("")},options:f,"data-testid":cn.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts(`${t}`),onChange:t=>{e.changeValueTo(t.value,t.label),d!==t.__isNew__&&h(t.__isNew__)}})}function Mn({model:e}){const{value:t,options:n,key:r,maxVisibleValues:i,noValueOnClear:s,includeAll:l,isReadOnly:u}=e.useState(),c=(0,a.useMemo)((()=>(0,pe.isArray)(t)?t:[t]),[t]),[d,h]=(0,a.useState)(c),[p,f]=(0,a.useState)(""),m=(0,a.useMemo)((()=>kn(n,l)),[n,l]);(0,a.useEffect)((()=>{h(c)}),[c]);const g=n.length>0?"Select value":"",v=m(p);return o().createElement(ln.MultiSelect,{id:r,placeholder:g,width:"auto",inputValue:p,disabled:u,value:d,noMultiValueWrap:!0,maxVisibleValues:null!=i?i:5,tabSelectsValue:!1,virtualized:!0,allowCustomValue:!0,options:v,closeMenuOnSelect:!1,components:{Option:Fn},isClearable:!0,hideSelectedOptions:!1,onInputChange:(t,{action:n})=>"input-change"===n?(f(t),e.onSearchChange&&e.onSearchChange(t),t):"input-blur"===n?(f(""),""):p,onBlur:()=>{e.changeValueTo(d)},filterOption:jn,"data-testid":cn.pages.Dashboard.SubMenu.submenuItemValueDropDownValueLinkTexts(`${d}`),onChange:(t,n)=>{"clear"===n.action&&s&&e.changeValueTo([]),h(t.map((e=>e.value)))}})}const Fn=({children:e,data:t,innerProps:n,innerRef:r,isFocused:i,isSelected:a,renderOptionLabel:s})=>{var l;const u=((e,t)=>{var n={};for(var r in e)In.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Rn)for(var r of Rn(e))t.indexOf(r)<0&&Pn.call(e,r)&&(n[r]=e[r]);return n})(n,["onMouseMove","onMouseOver"]),c=(0,ln.useTheme2)(),d=(0,ln.getSelectStyles)(c),h=(0,ln.useStyles2)(Vn);return o().createElement("div",(p=((e,t)=>{for(var n in t||(t={}))In.call(t,n)&&Nn(e,n,t[n]);if(Rn)for(var n of Rn(t))Pn.call(t,n)&&Nn(e,n,t[n]);return e})({ref:r,className:(0,dn.cx)(d.option,i&&d.optionFocused)},u),f={"data-testid":cn.components.Select.option,title:t.title},An(p,Dn(f))),o().createElement("div",{className:h.checkbox},o().createElement(ln.Checkbox,{value:a})),o().createElement("div",{className:d.optionBody,"data-testid":cn.pages.Dashboard.SubMenu.submenuItemValueDropDownOptionTexts(null!=(l=t.label)?l:String(t.value))},o().createElement("span",null,e)));var p,f};Fn.displayName="SelectMenuOptions";const Vn=e=>({checkbox:(0,dn.css)({marginRight:e.spacing(2)})});function $n(e){return e.state.isMulti?o().createElement(Mn,{model:e}):o().createElement(Ln,{model:e})}class Bn{constructor(e){this._sceneObject=e}getKey(){return`var-${this._sceneObject.state.name}`}getKeys(){return this._sceneObject.state.skipUrlSync?[]:[this.getKey()]}getUrlState(){return this._sceneObject.state.skipUrlSync?{}:{[this.getKey()]:zn(this._sceneObject.state.value,this._sceneObject.state.text)}}updateFromUrl(e){let t=e[this.getKey()];if(null!=t){this._sceneObject.isActive||(this._sceneObject.skipNextValidation=!0);const{values:e,texts:r}=(n=t,(n=Array.isArray(n)?n:[n]).reduce(((e,t)=>{const[n,r]=(null!=t?t:"").split(",");return e.values.push(Xr(n)),e.texts.push(Xr(null!=r?r:n)),e}),{values:[],texts:[]}));this._sceneObject.changeValueTo(e,r)}var n}}function zn(e,t){return e=Array.isArray(e)?e:[e],t=Array.isArray(t)?t:[t],e.map(((e,n)=>{if(null==e)return"";e=String(e);let r=t[n];return r=null==r?e:String(r),Yr(e,r)}))}function Un(e){const t=e.getRoot();return"enrichFiltersRequest"in t?t.enrichFiltersRequest(e):null}var qn=Object.defineProperty,Hn=Object.defineProperties,Gn=Object.getOwnPropertyDescriptors,Wn=Object.getOwnPropertySymbols,Qn=Object.prototype.hasOwnProperty,Kn=Object.prototype.propertyIsEnumerable,Xn=(e,t,n)=>t in e?qn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Yn=(e,t)=>{for(var n in t||(t={}))Qn.call(t,n)&&Xn(e,n,t[n]);if(Wn)for(var n of Wn(t))Kn.call(t,n)&&Xn(e,n,t[n]);return e};class Jn extends an{constructor(e){var t;super((t=Yn({isMulti:!0,name:"",value:[],text:[],options:[],datasource:null,baseFilters:[],applyMode:"auto",layout:"horizontal",type:"groupby"},e),Hn(t,Gn({noValueOnClear:!0})))),this.isLazy=!0,this._urlSync=new Bn(this),this._getKeys=async e=>{var t,n,r;const i=await(null==(n=(t=this.state).getTagKeysProvider)?void 0:n.call(t,this,null));if(i&&i.replace)return i.values;if(this.state.defaultOptions)return this.state.defaultOptions.concat(null!=(r=null==i?void 0:i.values)?r:[]);if(!e.getTagKeys)return[];const a=Wr(this),o=this.state.baseFilters||[],s=Ct.getTimeRange(this).state.value;let l=await e.getTagKeys(Yn({filters:o,queries:a,timeRange:s},Un(this)));i&&(l=l.concat(i.values));const u=this.state.tagKeyRegexFilter;return u&&(l=l.filter((e=>e.text.match(u)))),l},this.addActivationHandler((()=>(nn.add(this),()=>nn.delete(this))))}validateAndUpdate(){return this.getValueOptions({}).pipe((0,T.map)((e=>(this._updateValueGivenNewOptions(e),{}))))}_updateValueGivenNewOptions(e){const{value:t,text:n}=this.state,r={options:e,loading:!1,value:null!=t?t:[],text:null!=n?n:[]};this.setState(r)}getValueOptions(e){return this.state.defaultOptions?(0,T.of)(this.state.defaultOptions.map((e=>({label:e.text,value:String(e.value)})))):(this.setState({loading:!0,error:null}),(0,T.from)(At(this.state.datasource,{__sceneObject:{text:"__sceneObject",value:this}})).pipe((0,T.mergeMap)((e=>(0,T.from)(this._getKeys(e)).pipe((0,T.take)(1),(0,T.mergeMap)((e=>{const t=e.map((e=>({label:e.text,value:e.value?String(e.value):e.text})));return(0,T.of)(t)})))))))}getDefaultMultiState(e){return{value:[],text:[]}}}Jn.Component=function({model:e}){const{value:t,text:n,key:r,maxVisibleValues:i,noValueOnClear:s,options:l,includeAll:u}=e.useState(),c=(0,a.useMemo)((()=>{const e=(0,pe.isArray)(t)?t:[t],r=(0,pe.isArray)(n)?n:[n];return e.map(((e,t)=>{var n;return{value:e,label:String(null!=(n=r[t])?n:e)}}))}),[t,n]),[d,h]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1),[m,g]=(0,a.useState)(""),[v,y]=(0,a.useState)(c),b=(0,a.useMemo)((()=>kn(l,u)),[l,u]);(0,a.useEffect)((()=>{y(c)}),[c]);const w=b(m);return o().createElement(ln.MultiSelect,{"data-testid":`GroupBySelect-${r}`,id:r,placeholder:"Select value",width:"auto",inputValue:m,value:v,noMultiValueWrap:!0,maxVisibleValues:null!=i?i:5,tabSelectsValue:!1,virtualized:!0,options:w,filterOption:Zn,closeMenuOnSelect:!1,isOpen:p,isClearable:!0,hideSelectedOptions:!1,isLoading:d,components:{Option:Fn},onInputChange:(t,{action:n})=>"input-change"===n?(g(t),e.onSearchChange&&e.onSearchChange(t),t):"input-blur"===n?(g(""),""):m,onBlur:()=>{e.changeValueTo(v.map((e=>e.value)),v.map((e=>e.label)))},onChange:(t,n)=>{"clear"===n.action&&s&&e.changeValueTo([]),y(t)},onOpenMenu:async()=>{h(!0),await(0,T.lastValueFrom)(e.validateAndUpdate()),h(!1),f(!0)},onCloseMenu:()=>{f(!1)}})};const Zn=()=>!0;function er(e){return o().createElement(ln.Tooltip,{content:"Cancel query"},o().createElement(ln.Icon,{className:"spin-clockwise",name:"sync",size:"xs",role:"button",onMouseDown:t=>{e.onCancel(t)}}))}function tr(e){const t=(0,ln.useStyles2)(nr),n=(0,ln.useTheme2)(),r="vertical"===e.layout,i=Boolean(e.isLoading)?o().createElement("div",{style:{marginLeft:n.spacing(1),marginTop:"-1px"},"aria-label":cn.components.LoadingIndicator.icon},o().createElement(er,{onCancel:t=>{var n;t.preventDefault(),t.stopPropagation(),null==(n=e.onCancel)||n.call(e)}})):null;let a=null;e.error&&(a=o().createElement(ln.Tooltip,{content:e.error,placement:"bottom"},o().createElement(ln.Icon,{className:t.errorIcon,name:"exclamation-triangle"})));let s=null;e.description&&(s=o().createElement(ln.Tooltip,{content:e.description,placement:r?"top":"bottom"},o().createElement(ln.Icon,{className:t.normalIcon,name:"info-circle"})));const l="string"==typeof e.label?cn.pages.Dashboard.SubMenu.submenuItemLabels(e.label):"";let u;return u=r?o().createElement("label",{className:t.verticalLabel,"data-testid":l,htmlFor:e.htmlFor},e.label,s,a,e.icon&&o().createElement(ln.Icon,{name:e.icon,className:t.normalIcon}),i,e.onRemove&&o().createElement(ln.IconButton,{variant:"secondary",size:"xs",name:"times",onClick:e.onRemove,tooltip:"Remove"})):o().createElement("label",{className:t.horizontalLabel,"data-testid":l,htmlFor:e.htmlFor},a,e.icon&&o().createElement(ln.Icon,{name:e.icon,className:t.normalIcon}),e.label,s,i),u}const nr=e=>({horizontalLabel:(0,dn.css)({background:e.isDark?e.colors.background.primary:e.colors.background.secondary,display:"flex",alignItems:"center",padding:e.spacing(0,1),fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.bodySmall.fontSize,height:e.spacing(e.components.height.md),lineHeight:e.spacing(e.components.height.md),borderRadius:e.shape.borderRadius(1),border:`1px solid ${e.components.input.borderColor}`,position:"relative",right:-1,whiteSpace:"nowrap",gap:e.spacing(.5)}),verticalLabel:(0,dn.css)({display:"flex",alignItems:"center",fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.bodySmall.fontSize,lineHeight:e.typography.bodySmall.lineHeight,whiteSpace:"nowrap",marginBottom:e.spacing(.5),gap:e.spacing(1)}),errorIcon:(0,dn.css)({color:e.colors.error.text}),normalIcon:(0,dn.css)({color:e.colors.text.secondary})});function rr(e){var t;return{label:null!=(t=e.label)?t:String(e.value),value:e.value}}function ir(e,t){return""!==e?{value:e,label:t||e}:null}const ar=()=>!0;function or({filter:e,model:t}){var n,r;const i=(0,ln.useStyles2)(sr),[s,l]=(0,a.useState)([]),[u,c]=(0,a.useState)([]),[d,h]=(0,a.useState)(!1),[p,f]=(0,a.useState)(!1),[m,g]=(0,a.useState)(!1),[v,y]=(0,a.useState)(!1),[b,w]=(0,a.useState)(""),[S,x]=(0,a.useState)(!1),E=ir(e.key,e.keyLabel),_=ir(e.value,e.valueLabel),O=(0,a.useMemo)((()=>kn(u.map(rr),void 0)),[u])(b),T=o().createElement(ln.Select,{virtualized:!0,allowCustomValue:!0,isValidNewOption:e=>e.trim().length>0,allowCreateWhileLoading:!0,formatCreateLabel:e=>`Use custom value: ${e}`,disabled:t.state.readOnly,className:(0,dn.cx)(i.value,m?i.widthWhenOpen:void 0),width:"auto",value:_,filterOption:ar,placeholder:"Select value",options:O,inputValue:b,onInputChange:(e,{action:t})=>("input-change"===t&&w(e),e),onChange:n=>{t._updateFilter(e,"value",n),S!==n.__isNew__&&x(n.__isNew__)},isOpen:v&&!p,isLoading:p,autoFocus:""!==e.key&&""===e.value,openMenuOnFocus:!0,onOpenMenu:async()=>{var n;f(!0),y(!0);const r=await t._getValuesFor(e);f(!1),c(r),S&&w(null!=(n=null==_?void 0:_.label)?n:"")},onCloseMenu:()=>{y(!1),w("")}}),k=o().createElement(ln.Select,{key:""+(p?"loading":"loaded"),disabled:t.state.readOnly,className:(0,dn.cx)(i.key,m?i.widthWhenOpen:void 0),width:"auto",value:E,placeholder:"Select label",options:s,onChange:n=>t._updateFilter(e,"key",n),autoFocus:""===e.key,isOpen:m&&!d,isLoading:d,onOpenMenu:async()=>{g(!0),h(!0);const n=await t._getKeys(e.key);h(!1),l(n)},onCloseMenu:()=>{g(!1)},onBlur:()=>{""===e.key&&t._removeFilter(e)},openMenuOnFocus:!0});if("vertical"===t.state.layout){if(e.key){const r=o().createElement(tr,{layout:"vertical",label:null!=(n=e.key)?n:"",onRemove:()=>t._removeFilter(e)});return o().createElement(ln.Field,{label:r,"data-testid":`AdHocFilter-${e.key}`,className:i.field},o().createElement("div",{className:i.wrapper},o().createElement(ln.Select,{className:i.operator,value:e.operator,disabled:t.state.readOnly,options:t._getOperators(),width:"auto",onChange:n=>t._updateFilter(e,"operator",n)}),T))}return o().createElement(ln.Field,{label:"Select label","data-testid":`AdHocFilter-${e.key}`,className:i.field},k)}return o().createElement("div",{className:i.wrapper,"data-testid":`AdHocFilter-${e.key}`},k,o().createElement(ln.Select,{className:i.operator,value:e.operator,disabled:t.state.readOnly,options:t._getOperators(),width:"auto",onChange:n=>t._updateFilter(e,"operator",n)}),T,o().createElement(ln.Button,{variant:"secondary","aria-label":"Remove filter",title:"Remove filter",className:i.removeButton,icon:"times","data-testid":`AdHocFilter-remove-${null!=(r=e.key)?r:""}`,onClick:()=>t._removeFilter(e)}))}const sr=e=>({field:(0,dn.css)({marginBottom:0}),wrapper:(0,dn.css)({display:"flex","> *":{"&:not(:first-child)":{marginLeft:-1},"&:first-child":{borderTopRightRadius:0,borderBottomRightRadius:0},"&:last-child":{borderTopLeftRadius:0,borderBottomLeftRadius:0},"&:not(:first-child):not(:last-child)":{borderRadius:0},position:"relative",zIndex:0,"&:hover":{zIndex:1},"&:focus-within":{zIndex:2}}}),widthWhenOpen:(0,dn.css)({minWidth:e.spacing(16)}),value:(0,dn.css)({flexShrink:1}),key:(0,dn.css)({minWidth:"90px",flexShrink:1}),operator:(0,dn.css)({flexShrink:0}),removeButton:(0,dn.css)({paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5),borderLeft:"none",width:e.spacing(3),marginRight:e.spacing(1),boxSizing:"border-box",position:"relative",left:"1px"})});function lr({model:e,addFilterButtonText:t}){const{_wip:n}=e.useState();return n?o().createElement(or,{filter:n,model:e}):o().createElement(ln.Button,{variant:"secondary",icon:"plus",title:"Add filter","aria-label":"Add filter","data-testid":"AdHocFilter-add",onClick:()=>e._addWip()},t)}class ur{constructor(e){this._variable=e}getKey(){return`var-${this._variable.state.name}`}getKeys(){return[this.getKey()]}getUrlState(){const e=this._variable.state.filters;if(0===e.length)return{[this.getKey()]:[""]};const t=e.filter(Or).map((e=>function(e){return[Yr(e.key,e.keyLabel),e.operator,Yr(e.value,e.valueLabel)]}(e).map(Qr).join("|")));return{[this.getKey()]:t}}updateFromUrl(e){const t=e[this.getKey()];if(null==t)return;const n=function(e){if(Array.isArray(e)){return e.map(cr).filter(dr)}const t=cr(e);return null===t?[]:[t]}(t);this._variable.setState({filters:n})}}function cr(e){if("string"!=typeof e||0===e.length)return null;const[t,n,r,i,a,o]=e.split("|").reduce(((e,t)=>{const[n,r]=t.split(",");return e.push(n,null!=r?r:n),e}),[]).map(Xr);return{key:t,keyLabel:n,operator:r,value:a,valueLabel:o,condition:""}}function dr(e){return null!==e&&"string"==typeof e.key&&"string"==typeof e.value}var hr=Object.defineProperty,pr=Object.defineProperties,fr=Object.getOwnPropertyDescriptors,mr=Object.getOwnPropertySymbols,gr=Object.prototype.hasOwnProperty,vr=Object.prototype.propertyIsEnumerable,yr=(e,t,n)=>t in e?hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,br=(e,t)=>{for(var n in t||(t={}))gr.call(t,n)&&yr(e,n,t[n]);if(mr)for(var n of mr(t))vr.call(t,n)&&yr(e,n,t[n]);return e},wr=(e,t)=>pr(e,fr(t));class Sr extends ee{constructor(e){var t,n;super(br({type:"adhoc",name:null!=(t=e.name)?t:"Filters",filters:[],datasource:null,applyMode:"auto",filterExpression:null!=(n=e.filterExpression)?n:xr(e.expressionBuilder,e.filters)},e)),this._scopedVars={__sceneObject:{value:this}},this._dataSourceSrv=(0,u.getDataSourceSrv)(),this._urlSync=new ur(this),"auto"===this.state.applyMode&&function(e){if(e.addActivationHandler((()=>(en.add(e),()=>en.delete(e)))),Zt)return;const t=(0,u.getTemplateSrv)();(null==t?void 0:t.getAdhocFilters)&&(Zt=t.getAdhocFilters,t.getAdhocFilters=function(e){var n;if(0===en.size)return Zt.call(t);const r=(0,u.getDataSourceSrv)().getInstanceSettings(e);if(!r)return[];for(const e of en.values())if((null==(n=e.state.datasource)?void 0:n.uid)===r.uid)return e.state.filters;return[]}.bind(t))}(this)}setState(e){let t=!1;e.filters&&e.filters!==this.state.filters&&!e.filterExpression&&(e.filterExpression=xr(this.state.expressionBuilder,e.filters),t=e.filterExpression!==this.state.filterExpression),super.setState(e),t&&this.publishEvent(new $e(this),!0)}getValue(){return this.state.filterExpression}_updateFilter(e,t,{value:n,label:r}){if(null==n)return;const{filters:i,_wip:a}=this.state,o=`${t}Label`;if(e===a)return void("value"===t?this.setState({filters:[...i,wr(br({},a),{[t]:n,[o]:r})],_wip:void 0}):this.setState({_wip:wr(br({},e),{[t]:n,[o]:r})}));const s=this.state.filters.map((i=>{if(i===e){const a=wr(br({},i),{[t]:n,[o]:r});return"key"===t&&e[t]!==n&&(a.value="",a.valueLabel=""),a}return i}));this.setState({filters:s})}_removeFilter(e){e!==this.state._wip?this.setState({filters:this.state.filters.filter((t=>t!==e))}):this.setState({_wip:void 0})}async _getKeys(e){var t,n,r;const i=await(null==(n=(t=this.state).getTagKeysProvider)?void 0:n.call(t,this,e));if(i&&i.replace)return i.values.map(_r);if(this.state.defaultKeys)return this.state.defaultKeys.map(_r);const a=await this._dataSourceSrv.get(this.state.datasource,this._scopedVars);if(!a||!a.getTagKeys)return[];const o=this.state.filters.filter((t=>t.key!==e)).concat(null!=(r=this.state.baseFilters)?r:[]),s=Ct.getTimeRange(this).state.value,l=this.state.useQueriesAsFilterForOptions?Wr(this):void 0;let u=await a.getTagKeys(br({filters:o,queries:l,timeRange:s},Un(this)));i&&(u=u.concat(i.values));const c=this.state.tagKeyRegexFilter;return c&&(u=u.filter((e=>e.text.match(c)))),u.map(_r)}async _getValuesFor(e){var t,n,r;const i=await(null==(n=(t=this.state).getTagValuesProvider)?void 0:n.call(t,this,e));if(i&&i.replace)return Tr(i.values);const a=await this._dataSourceSrv.get(this.state.datasource,this._scopedVars);if(!a||!a.getTagValues)return[];const o=this.state.filters.filter((t=>t.key!==e.key)).concat(null!=(r=this.state.baseFilters)?r:[]),s=Ct.getTimeRange(this).state.value,l=this.state.useQueriesAsFilterForOptions?Wr(this):void 0;let u=await a.getTagValues(br({key:e.key,filters:o,timeRange:s,queries:l},Un(this)));return i&&(u=u.concat(i.values)),Tr(u)}_addWip(){this.setState({_wip:{key:"",keyLabel:"",value:"",valueLabel:"",operator:"=",condition:""}})}_getOperators(){return["=","!=","<",">","=~","!~"].map((e=>({label:e,value:e})))}}function xr(e,t){return(null!=e?e:qr)(null!=t?t:[])}Sr.Component=function({model:e}){const{filters:t,readOnly:n,addFilterButtonText:r}=e.useState(),i=(0,ln.useStyles2)(Er);return o().createElement("div",{className:i.wrapper},t.map(((t,n)=>o().createElement(o().Fragment,{key:n},o().createElement(or,{filter:t,model:e})))),!n&&o().createElement(lr,{model:e,key:"'builder",addFilterButtonText:r}))};const Er=e=>({wrapper:(0,dn.css)({display:"flex",flexWrap:"wrap",alignItems:"flex-end",columnGap:e.spacing(2),rowGap:e.spacing(1)}),filterIcon:(0,dn.css)({color:e.colors.text.secondary,paddingRight:e.spacing(.5)})});function _r({text:e,value:t}){return{label:e,value:String(null!=t?t:e)}}function Or(e){return""!==e.key&&""!==e.operator&&""!==e.value}function Tr(e){const t=[],n=new Map;for(const r of e){const e=r.group;if(e){let i=n.get(e);i||(i=[],n.set(e,i),t.push({label:e,options:i})),i.push(_r(r))}else t.push(_r(r))}return t}class kr{constructor(){this._resultsMap=new Map,this._prevLayers=[]}getMergedStream(e){(function(e,t){if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1})(e,this._prevLayers)&&(this._resultsMap=new Map,this._prevLayers=e);const t=e.map((e=>e.getResultsStream())),n=[];for(const t of e)n.push(t.activate());return(0,T.merge)(t).pipe((0,T.mergeAll)(),(0,T.filter)((e=>this._resultsMap.get(e.origin.state.key)!==e)),(0,T.map)((e=>(this._resultsMap.set(e.origin.state.key,e),this._resultsMap.values()))),(0,T.finalize)((()=>{n.forEach((e=>e()))})))}}var Cr=Object.defineProperty,Ar=Object.defineProperties,Dr=Object.getOwnPropertyDescriptors,Rr=Object.getOwnPropertySymbols,Ir=Object.prototype.hasOwnProperty,Pr=Object.prototype.propertyIsEnumerable,Nr=(e,t,n)=>t in e?Cr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jr=(e,t)=>{for(var n in t||(t={}))Ir.call(t,n)&&Nr(e,n,t[n]);if(Rr)for(var n of Rr(t))Pr.call(t,n)&&Nr(e,n,t[n]);return e},Lr=(e,t)=>Ar(e,Dr(t));let Mr=100;function Fr(){return"SQR"+Mr++}class Vr extends ee{constructor(e){super(e),this._dataLayersMerger=new kr,this._variableValueRecorder=new It,this._results=new T.ReplaySubject(1),this._scopedVars={__sceneObject:{value:this,text:"__sceneObject"}},this._variableDependency=new Rt(this,{statePaths:["queries","datasource"],onVariableUpdateCompleted:this.onVariableUpdatesCompleted.bind(this),onAnyVariableChanged:this.onAnyVariableChanged.bind(this)}),this.onDataReceived=e=>{const t=(0,l.preProcessPanelData)(e,this.state.data);this._resultAnnotations=e.annotations;const n=this._combineDataLayers(t);let r=this.state._hasFetchedData;r||t.state===be.Loading||(r=!0),this.setState({data:n,_hasFetchedData:r}),this._results.next({origin:this,data:n})},this.addActivationHandler((()=>this._onActivate()))}getResultsStream(){return this._results}_onActivate(){const e=Ct.getTimeRange(this),t=this.getClosestExtraQueryProviders();for(const e of t)this._subs.add(e.subscribeToState(((t,n)=>{e.shouldRerun(n,t)&&this.runQueries()})));return this.subscribeToTimeRangeChanges(e),this.shouldRunQueriesOnActivate()&&this.runQueries(),this._dataLayersSub||this._handleDataLayers(),()=>this._onDeactivate()}_handleDataLayers(){const e=Ct.getDataLayers(this);0!==e.length&&(this._dataLayersSub=this._dataLayersMerger.getMergedStream(e).subscribe(this._onLayersReceived.bind(this)))}_onLayersReceived(e){var t,n,r,i,a;const o=Ct.getTimeRange(this),{dataLayerFilter:s}=this.state;let u,c=[],d=[];for(const r of e)for(let e of r.data.series)(null==(t=e.meta)?void 0:t.dataTopic)===l.DataTopic.Annotations&&(c=c.concat(e)),(null==(n=e.meta)?void 0:n.dataTopic)===l.DataTopic.AlertStates&&(d=d.concat(e));if((null==s?void 0:s.panelId)&&(c.length>0&&(c=function(e,t){var n;if(!Array.isArray(e)||0===e.length)return e;const r=Array.from({length:e.length},(()=>new Set));let i=0;for(const a of e){for(let e=0;e<a.length;e++){if(r[i].has(e))continue;let o=!0;const s=a.fields.find((e=>"panelId"===e.name)),l=a.fields.find((e=>"source"===e.name));if(l){s&&"dashboard"===l.values[e].type&&(o=s.values[e]===t.panelId);const r=l.values[e].filter;if(r){const e=(null!=(n=r.ids)?n:[]).includes(t.panelId);r.exclude?e&&(o=!1):e||(o=!1)}}o&&r[i].add(e)}i++}const a=[];i=0;for(const t of e){const e=r[i].size,n=[];for(const e of t.fields){const a=[];for(let n=0;n<t.length;n++)r[i].has(n)&&a.push(e.values[n]);n.push(Yt(Xt({},e),{values:a}))}a.push(Yt(Xt({},t),{fields:n,length:e})),i++}return a}(c,s)),d.length>0))for(const e of d){const t=new l.DataFrameView(e);for(const e of t)if(e.panelId===s.panelId){u=e;break}}if(Br(c)&&Br(this._layerAnnotations)&&(0,pe.isEqual)(u,null==(r=this.state.data)?void 0:r.alertState))return;this._layerAnnotations=c;const h=this.state.data?this.state.data:Lr(jr({},Oe),{timeRange:o.state.value});this.setState({data:Lr(jr({},h),{annotations:[...null!=(i=this._resultAnnotations)?i:[],...c],alertState:null!=u?u:null==(a=this.state.data)?void 0:a.alertState})})}onVariableUpdatesCompleted(){this.runQueries()}onAnyVariableChanged(e){this._adhocFiltersVar!==e&&this._groupByVar!==e&&(e instanceof Sr&&this._isRelevantAutoVariable(e)&&this.runQueries(),e instanceof Jn&&this._isRelevantAutoVariable(e)&&this.runQueries())}_isRelevantAutoVariable(e){var t,n;const r=null!=(t=this.state.datasource)?t:$r(this.state.queries);return"auto"===e.state.applyMode&&(null==r?void 0:r.uid)===(null==(n=e.state.datasource)?void 0:n.uid)}shouldRunQueriesOnActivate(){return this._variableValueRecorder.hasDependenciesChanged(this)?(Dt(),!0):!this.state.data||!!this._isDataTimeRangeStale(this.state.data)}_isDataTimeRangeStale(e){const t=Ct.getTimeRange(this).state.value,n=e.timeRange;return(t.from.unix()!==n.from.unix()||t.to.unix()!==n.to.unix())&&(Dt(),!0)}_onDeactivate(){var e;this._querySub&&(this._querySub.unsubscribe(),this._querySub=void 0),this._dataLayersSub&&(this._dataLayersSub.unsubscribe(),this._dataLayersSub=void 0),null==(e=this._timeSub)||e.unsubscribe(),this._timeSub=void 0,this._timeSubRange=void 0,this._adhocFiltersVar=void 0,this._groupByVar=void 0,this._variableValueRecorder.recordCurrentDependencyValuesForSceneObject(this)}setContainerWidth(e){!this._containerWidth&&e>0?(this._containerWidth=e,this.state.maxDataPointsFromWidth&&!this.state.maxDataPoints&&setTimeout((()=>{this.isActive&&!this.state._hasFetchedData&&this.runQueries()}),0)):e>0&&(this._containerWidth=e)}isDataReadyToDisplay(){return Boolean(this.state._hasFetchedData)}subscribeToTimeRangeChanges(e){this._timeSubRange!==e&&(this._timeSub&&this._timeSub.unsubscribe(),this._timeSubRange=e,this._timeSub=e.subscribeToState((()=>{this.runWithTimeRange(e)})))}runQueries(){const e=Ct.getTimeRange(this);this.subscribeToTimeRangeChanges(e),this.runWithTimeRange(e)}getMaxDataPoints(){var e;return this.state.maxDataPoints?this.state.maxDataPoints:this.state.maxDataPointsFromWidth&&null!=(e=this._containerWidth)?e:500}cancelQuery(){var e;null==(e=this._querySub)||e.unsubscribe(),this._dataLayersSub&&(this._dataLayersSub.unsubscribe(),this._dataLayersSub=void 0),this.setState({data:Lr(jr({},this.state.data),{state:be.Done})})}async runWithTimeRange(e){var t,n;if(!this.state.maxDataPoints&&this.state.maxDataPointsFromWidth&&!this._containerWidth)return;if(this._dataLayersSub||this._handleDataLayers(),null==(t=this._querySub)||t.unsubscribe(),this._variableDependency.hasDependencyInLoadingState())return Dt(),void this.setState({data:Lr(jr({},this.state.data),{state:be.Loading})});const{queries:r}=this.state;if(null==r?void 0:r.length)try{const t=null!=(n=this.state.datasource)?n:$r(r),i=await At(t,this._scopedVars);this.findAndSubscribeToAdHocFilters(null==t?void 0:t.uid);const a=(0,u.getRunRequest)(),{primary:o,secondaries:s,processors:l}=this.prepareRequests(e,i);Dt(0,0,this.state.key);let c=a(i,o);if(s.length>0){const e=s.map((e=>a(i,e))),t=zt(l);c=(0,T.forkJoin)([c,...e]).pipe(t)}c=c.pipe(tn({type:"data",request:o,origin:this,cancel:()=>this.cancelQuery()})),this._querySub=c.subscribe(this.onDataReceived)}catch(e){console.error("PanelQueryRunner Error",e),this.onDataReceived(Lr(jr(jr({},Oe),this.state.data),{state:be.Error,errors:[(0,u.toDataQueryError)(e)]}))}else this._setNoDataState()}clone(e){var t;const n=super.clone(e);return this._resultAnnotations&&(n._resultAnnotations=this._resultAnnotations.map((e=>jr({},e)))),this._layerAnnotations&&(n._layerAnnotations=this._layerAnnotations.map((e=>jr({},e)))),n._variableValueRecorder=this._variableValueRecorder.cloneAndRecordCurrentValuesForSceneObject(this),n._containerWidth=this._containerWidth,n._results.next({origin:this,data:null!=(t=this.state.data)?t:Oe}),n}prepareRequests(e,t){var n;const{minInterval:r,queries:i}=this.state;let a=jr({app:"scenes",requestId:Fr(),timezone:e.getTimeZone(),range:e.state.value,interval:"1s",intervalMs:1e3,targets:(0,pe.cloneDeep)(i),maxDataPoints:this.getMaxDataPoints(),scopedVars:this._scopedVars,startTime:Date.now(),liveStreaming:this.state.liveStreaming,rangeRaw:{from:e.state.from,to:e.state.to},cacheTimeout:this.state.cacheTimeout,queryCachingTTL:this.state.queryCachingTTL},Jt(this));this._adhocFiltersVar&&(a.filters=this._adhocFiltersVar.state.filters.filter(Or)),this._groupByVar&&(a.groupByKeys=this._groupByVar.state.value),a.targets=a.targets.map((e=>{var n;return e.datasource&&(e.datasource.uid===t.uid||(null==(n=t.meta)?void 0:n.mixed)||!u.isExpressionReference||(0,u.isExpressionReference)(e.datasource))||(e.datasource=t.getRef()),e}));const o=r||t.interval,s=l.rangeUtil.calculateInterval(e.state.value,a.maxDataPoints,o);a.scopedVars=Object.assign({},a.scopedVars,{__interval:{text:s.interval,value:s.interval},__interval_ms:{text:s.intervalMs.toString(),value:s.intervalMs}}),a.interval=s.interval,a.intervalMs=s.intervalMs;const c=e.state.value;let d=[],h=new Map;for(const e of null!=(n=this.getClosestExtraQueryProviders())?n:[])for(const{req:t,processor:n}of e.getExtraQueries(a)){const e=Fr();d.push(Lr(jr({},t),{requestId:e})),h.set(e,null!=n?n:Bt)}return a.range=c,{primary:a,secondaries:d,processors:h}}_combineDataLayers(e){return this._layerAnnotations&&this._layerAnnotations.length>0&&(e.annotations=(e.annotations||[]).concat(this._layerAnnotations)),this.state.data&&this.state.data.alertState&&(e.alertState=this.state.data.alertState),e}_setNoDataState(){this.state.data!==Oe&&this.setState({data:Oe})}getClosestExtraQueryProviders(){const e=new Map;return this.parent?(ce(this.parent,(t=>(Pt(t)&&!e.has(t.constructor)&&e.set(t.constructor,t),t.forEachChild((t=>{Pt(t)&&!e.has(t.constructor)&&e.set(t.constructor,t)})),null))),Array.from(e.values())):[]}findAndSubscribeToAdHocFilters(e){const t=function(e){var t;for(const n of en.values())if((null==(t=n.state.datasource)?void 0:t.uid)===e)return n}(e);this._adhocFiltersVar!==t&&(this._adhocFiltersVar=t,this._updateExplicitVariableDependencies());const n=function(e){var t;for(const n of nn.values())if((null==(t=n.state.datasource)?void 0:t.uid)===e)return n}(e);this._groupByVar!==n&&(this._groupByVar=n,this._updateExplicitVariableDependencies())}_updateExplicitVariableDependencies(){const e=[];this._adhocFiltersVar&&e.push(this._adhocFiltersVar.state.name),this._groupByVar&&e.push(this._groupByVar.state.name),this._variableDependency.setVariableNames(e)}}function $r(e){var t,n;return null!=(n=null==(t=e.find((e=>null!==e.datasource)))?void 0:t.datasource)?n:void 0}function Br(e){if(!e)return!0;for(let t=0;t<e.length;t++)if(e[t].length>0)return!1;return!0}function zr(e,t){return e===t||(0,pe.isEqual)(e,t)}function Ur(e){try{return JSON.stringify(e,(()=>{const e=new WeakSet;return(t,n)=>{if("object"==typeof n&&null!==n){if(e.has(n))return;e.add(n)}return n}})())}catch(e){console.error(e)}return""}function qr(e){return e.map((e=>function(e){let t="";t="=~"===e.operator||"!~¨"===e.operator?Hr(function(e){return e.replace(Gr,"\\$&")}(e.value)):Hr(e.value);return`${e.key}${e.operator}"${t}"`}(e))).join(",")}function Hr(e){return e.replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/"/g,'\\"')}const Gr=/[*+?()|\\.\[\]{}^$]/g;function Wr(e){const t=function(e){const t={};for(const n of e)n.state.key&&(n.state.key in t||(t[n.state.key]=[]),t[n.state.key].push(n));return Object.values(t).flatMap((e=>{const t=e.filter((e=>e.isActive));return 0===t.length&&1===e.length?e:t}))}(Ct.findAllObjects(e.getRoot(),(e=>e instanceof Vr))).filter((t=>{var n,r;return(null==(n=t.state.datasource)?void 0:n.uid)===(null==(r=e.state.datasource)?void 0:r.uid)}));if(0===t.length)return[];const n=[];return t.forEach((e=>{n.push(...e.state.queries)})),n}function Qr(e){return null==e?"":/\|/g[Symbol.replace](e,"__gfp__")}function Kr(e){return null==e?"":/,/g[Symbol.replace](e,"__gfc__")}function Xr(e){return null==e?"":(e=/__gfp__/g[Symbol.replace](e,"|"),e=/__gfc__/g[Symbol.replace](e,","))}function Yr(e,t){return t&&e!==t?[e,t].map(Kr).join(","):Kr(e)}var Jr=(e=>(e[e.never=0]="never",e[e.onDashboardLoad=1]="onDashboardLoad",e[e.onTimeRangeChanged=2]="onTimeRangeChanged",e))(Jr||{});var Zr=(e=>(e[e.Crosshair=1]="Crosshair",e[e.Off=0]="Off",e[e.Tooltip=2]="Tooltip",e))(Zr||{});var ei=Object.defineProperty,ti=Object.defineProperties,ni=Object.getOwnPropertyDescriptors,ri=Object.getOwnPropertySymbols,ii=Object.prototype.hasOwnProperty,ai=Object.prototype.propertyIsEnumerable,oi=(e,t,n)=>t in e?ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class si extends ee{constructor(e){var t,n;super((t=((e,t)=>{for(var n in t||(t={}))ii.call(t,n)&&oi(e,n,t[n]);if(ri)for(var n of ri(t))ai.call(t,n)&&oi(e,n,t[n]);return e})({},e),n={sync:e.sync||Zr.Off},ti(t,ni(n)))),this.getEventsBus=e=>{if(!this.parent)throw new Error("EnableCursorSync cannot be used as a standalone scene object");return new li(this.parent,e)}}getEventsScope(){if(!this.parent)throw new Error("EnableCursorSync cannot be used as a standalone scene object");return this.state.key}}class li{constructor(e,t){this._source=e,this._eventsOrigin=t}publish(e){e.origin=this,this._eventsOrigin.publishEvent(e,!0)}getStream(e){return new T.Observable((t=>{const n=this._source.subscribeToEvent(e,(e=>{t.next(e)}));return()=>n.unsubscribe()}))}subscribe(e,t){return this.getStream(e).pipe().subscribe(t)}removeAllListeners(){}newScopedBus(e,t){throw new Error("For internal use only")}}var ui=function(){};var ci="undefined"!=typeof window;const di=ci?a.useLayoutEffect:a.useEffect;var hi={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};const pi=ci&&void 0!==window.ResizeObserver?function(){var e=(0,a.useState)(null),t=e[0],n=e[1],r=(0,a.useState)(hi),i=r[0],o=r[1],s=(0,a.useMemo)((function(){return new window.ResizeObserver((function(e){if(e[0]){var t=e[0].contentRect,n=t.x,r=t.y,i=t.width,a=t.height,s=t.top,l=t.left,u=t.bottom,c=t.right;o({x:n,y:r,width:i,height:a,top:s,left:l,bottom:u,right:c})}}))}),[]);return di((function(){if(t)return s.observe(t),function(){s.disconnect()}}),[t]),[n,i]}:function(){return[ui,hi]};function fi(e,t){if(t)return t;let n=e.error?e.error.message:void 0;return e.errors&&(n=e.errors.map((e=>e.message)).join(", ")),n}const mi=(0,dn.css)({position:"relative",width:"100%",height:"100%"}),gi=(0,dn.css)({position:"absolute",width:"100%",height:"100%"}),vi=e=>({ok:(0,dn.css)({color:e.colors.success.text}),pending:(0,dn.css)({color:e.colors.warning.text}),alerting:(0,dn.css)({color:e.colors.error.text})});var yi=Object.defineProperty,bi=Object.defineProperties,wi=Object.getOwnPropertyDescriptors,Si=Object.getOwnPropertySymbols,xi=Object.prototype.hasOwnProperty,Ei=Object.prototype.propertyIsEnumerable,_i=(e,t,n)=>t in e?yi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oi=(e,t)=>{for(var n in t||(t={}))xi.call(t,n)&&_i(e,n,t[n]);if(Si)for(var n of Si(t))Ei.call(t,n)&&_i(e,n,t[n]);return e},Ti=(e,t)=>bi(e,wi(t));const ki="hideSeriesFrom",Ci=(0,l.isSystemOverrideWithRef)(ki);function Ai(e,t=l.ByNamesMatcherMode.exclude,n){return n=null!=n?n:{id:"custom.hideFrom",value:{viz:!0,legend:!1,tooltip:!1}},{__systemRef:ki,matcher:{id:l.FieldMatcherID.byNames,options:{mode:t,names:e,prefix:t===l.ByNamesMatcherMode.exclude?"All except:":void 0,readOnly:!0}},properties:[Ti(Oi({},n),{value:{viz:!0,legend:!1,tooltip:!1}})]}}const Di=(e,t,n=l.ByNamesMatcherMode.exclude)=>{const r=e.properties.find((e=>"custom.hideFrom"===e.id)),i=Ri(e),a=i.findIndex((e=>e===t));return a<0?i.push(t):i.splice(a,1),Ai(i,n,r)},Ri=e=>{var t;const n=null==(t=e.matcher.options)?void 0:t.names;return Array.isArray(n)?[...n]:[]},Ii=(e,t)=>Ri(e).length===Pi(t).length,Pi=(e,t)=>{const n=new Set;for(const r of e)for(const i of r.fields){if(i.type!==l.FieldType.number)continue;const a=(0,l.getFieldDisplayName)(i,r,e);a!==t&&n.add(a)}return Array.from(n)},Ni=(e,t)=>{var n;let r=[];for(const i of e){const e=i.properties.find((e=>"custom.hideFrom"===e.id));if(void 0!==e&&!0===(null==(n=e.value)?void 0:n.legend)){const e=l.fieldMatchers.get(i.matcher.id).get(i.matcher.options);for(const n of t)for(const i of n.fields){if(i.type!==l.FieldType.number)continue;const a=(0,l.getFieldDisplayName)(i,n,t);e(i,n,t)&&r.push(a)}}}return r};var ji=Object.defineProperty,Li=Object.defineProperties,Mi=Object.getOwnPropertyDescriptors,Fi=Object.getOwnPropertySymbols,Vi=Object.prototype.hasOwnProperty,$i=Object.prototype.propertyIsEnumerable,Bi=(e,t,n)=>t in e?ji(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zi=(e,t)=>{for(var n in t||(t={}))Vi.call(t,n)&&Bi(e,n,t[n]);if(Fi)for(var n of Fi(t))$i.call(t,n)&&Bi(e,n,t[n]);return e},Ui=(e,t)=>Li(e,Mi(t));const qi=(e,t)=>({matcher:{id:l.FieldMatcherID.byName,options:e},properties:[Hi(t)]}),Hi=e=>({id:"color",value:{mode:l.FieldColorModeId.Fixed,fixedColor:e}});var Gi=Object.defineProperty,Wi=Object.defineProperties,Qi=Object.getOwnPropertyDescriptors,Ki=Object.getOwnPropertySymbols,Xi=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable,Ji=(e,t,n)=>t in e?Gi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zi=(e,t)=>{for(var n in t||(t={}))Xi.call(t,n)&&Ji(e,n,t[n]);if(Ki)for(var n of Ki(t))Yi.call(t,n)&&Ji(e,n,t[n]);return e},ea=(e,t)=>Wi(e,Qi(t));class ta extends ee{constructor(e){var t;super(Zi({options:{},fieldConfig:{defaults:{},overrides:[]},title:"Title",pluginId:"timeseries"},e)),this._variableDependency=new Rt(this,{statePaths:["title","options","fieldConfig"]}),this._structureRev=0,this.onTimeRangeChange=e=>{Ct.getTimeRange(this).onTimeRangeChange({raw:{from:(0,l.toUtc)(e.from),to:(0,l.toUtc)(e.to)},from:(0,l.toUtc)(e.from),to:(0,l.toUtc)(e.to)})},this.getTimeRange=e=>{const t=Ct.findObject(this,(e=>e instanceof ra)),n=Ct.getTimeRange(this);if(t instanceof ra&&t.isEnabled)return Ae(n.state.from,n.state.to,n.getTimeZone(),n.state.fiscalYearStartMonth,n.state.UNSAFE_nowDelay);const r=this.getPlugin();return r&&!r.meta.skipDataQuery&&e&&e.timeRange?e.timeRange:n.state.value},this.onTitleChange=e=>{this.setState({title:e})},this.onDescriptionChange=e=>{this.setState({description:e})},this.onDisplayModeChange=e=>{this.setState({displayMode:e})},this.onOptionsChange=(e,t=!1)=>{const{fieldConfig:n,options:r}=this.state,i=t?e:(0,pe.mergeWith)((0,pe.cloneDeep)(r),e,((e,t)=>{if((0,pe.isArray)(t))return t})),a=(0,l.getPanelOptionsWithDefaults)({plugin:this._plugin,currentOptions:i,currentFieldConfig:n,isAfterPluginChange:!1});this.setState({options:a.options})},this.onFieldConfigChange=(e,t)=>{const{fieldConfig:n,options:r}=this.state,i=t?e:(0,pe.merge)((0,pe.cloneDeep)(n),e),a=(0,l.getPanelOptionsWithDefaults)({plugin:this._plugin,currentOptions:r,currentFieldConfig:i,isAfterPluginChange:!1});this._dataWithFieldConfig=void 0,this.setState({fieldConfig:a.fieldConfig})},this.interpolate=(e,t,n)=>Ct.interpolate(this,e,t,n),this.getDescription=()=>{this.publishEvent(new q({origin:this,interaction:"panel-description-shown"}),!0);const{description:e}=this.state;if(e){const t=this.interpolate(e);return(0,l.renderMarkdown)(t)}return""},this.onCancelQuery=()=>{var e;this.publishEvent(new q({origin:this,interaction:"panel-cancel-query-clicked"}),!0);const t=Ct.getData(this);null==(e=t.cancelQuery)||e.call(t)},this.onStatusMessageClick=()=>{this.publishEvent(new q({origin:this,interaction:"panel-status-message-clicked"}),!0)},this._onSeriesColorChange=(e,t)=>{this.onFieldConfigChange(((e,t,n)=>{const{overrides:r}=n,i=n.overrides.findIndex((t=>t.matcher.id===l.FieldMatcherID.byName&&t.matcher.options===e));if(i<0)return Ui(zi({},n),{overrides:[...n.overrides,qi(e,t)]});const a=Array.from(r),o=a[i],s=o.properties.findIndex((e=>"color"===e.id));if(s<0)return a[i]=Ui(zi({},o),{properties:[...o.properties,Hi(t)]}),Ui(zi({},n),{overrides:a});const u=Array.from(o.properties);return u[s]=Hi(t),a[i]=Ui(zi({},o),{properties:u}),Ui(zi({},n),{overrides:a})})(e,t,this.state.fieldConfig))},this._onSeriesVisibilityChange=(e,t)=>{this._dataWithFieldConfig&&this.onFieldConfigChange(function(e,t,n,r){const{overrides:i}=n,a=e,o=i.findIndex(Ci);if(o<0){if(t===ln.SeriesVisibilityChangeMode.ToggleSelection){const e=Ai([a,...Ni(i,r)]);return Ti(Oi({},n),{overrides:[...n.overrides,e]})}const e=Ai(Pi(r,a));return Ti(Oi({},n),{overrides:[...n.overrides,e]})}const s=Array.from(i),[l]=s.splice(o,1);if(t===ln.SeriesVisibilityChangeMode.ToggleSelection){let e=Ri(l);const t=Ni(s,r);if(t.length>0&&(e=e.filter((e=>t.indexOf(e)<0))),e[0]===a&&1===e.length)return Ti(Oi({},n),{overrides:s});const i=Ai([a,...t]);return Ti(Oi({},n),{overrides:[...s,i]})}const u=Di(l,a);return Ii(u,r)?Ti(Oi({},n),{overrides:s}):Ti(Oi({},n),{overrides:[...s,u]})}(e,t,this.state.fieldConfig,this._dataWithFieldConfig.series),!0)},this._onInstanceStateChange=e=>{this._panelContext&&(this._panelContext=ea(Zi({},this._panelContext),{instanceState:e})),this.setState({_pluginInstanceState:e})},this._onToggleLegendSort=e=>{const t=this.state.options.legend;if(!t)return;let n=t.sortDesc,r=t.sortBy;e!==r&&(n=void 0),!1===n?(r=void 0,n=void 0):(n=!n,r=e),this.onOptionsChange(ea(Zi({},this.state.options),{legend:ea(Zi({},t),{sortBy:r,sortDesc:n})}),!0)},this.addActivationHandler((()=>{this._onActivate()})),null==(t=e.menu)||t.addActivationHandler((()=>{this.publishEvent(new q({origin:this,interaction:"panel-menu-shown"}),!0)}))}_onActivate(){this._plugin||this._loadPlugin(this.state.pluginId)}async _loadPlugin(e){const t=function(e){var t;const{getPanelPluginFromCache:n}=(0,u.getPluginImportUtils)();return null!=(t=n(e))?t:O.get(e)}(e);if(t)this._pluginLoaded(t);else{const{importPanelPlugin:t}=(0,u.getPluginImportUtils)();try{const n=await t(e);this._pluginLoaded(n)}catch(t){this._pluginLoaded(function(e){const t=new l.PanelPlugin((()=>null));return t.meta={id:e,name:e,sort:100,type:l.PluginType.panel,module:"",baseUrl:"",info:{author:{name:""},description:"",links:[],logos:{large:"",small:"public/img/grafana_icon.svg"},screenshots:[],updated:"",version:""}},t}(e)),t instanceof Error&&this.setState({_pluginLoadError:t.message})}}}getLegacyPanelId(){const e=parseInt(this.state.key.replace("panel-",""),10);return isNaN(e)?0:e}async _pluginLoaded(e){const{options:t,fieldConfig:n,title:r,pluginVersion:i,_UNSAFE_customMigrationHandler:a}=this.state,o={title:r,options:t,fieldConfig:n,id:this.getLegacyPanelId(),type:e.meta.id,pluginVersion:i},s=this._getPluginVersion(e);null==a||a(o,e),e.onPanelMigration&&s!==this.state.pluginVersion&&(o.options=await e.onPanelMigration(o));const u=(0,l.getPanelOptionsWithDefaults)({plugin:e,currentOptions:o.options,currentFieldConfig:o.fieldConfig,isAfterPluginChange:!1});if(this._plugin=e,this.setState({options:u.options,fieldConfig:u.fieldConfig,pluginVersion:s}),e.meta.skipDataQuery){const e=Ct.getTimeRange(this);this._subs.add(e.subscribeToState((()=>this.forceRender())))}}_getPluginVersion(e){return e&&e.meta.info.version?e.meta.info.version:u.config.buildInfo.version}getPlugin(){return this._plugin}getPanelContext(){return null!=this._panelContext||(this._panelContext=this.buildPanelContext()),this._panelContext}clearFieldConfigCache(){this._dataWithFieldConfig=void 0}applyFieldConfig(e){var t,n,r,i;const a=this._plugin;if(!a||a.meta.skipDataQuery||!e)return Oe;if(this._prevData===e&&this._dataWithFieldConfig)return this._dataWithFieldConfig;const o=a.dataSupport||{alertStates:!1,annotations:!1},s=a.fieldConfigRegistry,c=null!=(n=null==(t=this._dataWithFieldConfig)?void 0:t.series)?n:[],d=(0,l.applyFieldOverrides)({data:e.series,fieldConfig:this.state.fieldConfig,fieldConfigRegistry:s,replaceVariables:this.interpolate,theme:u.config.theme2,timeZone:null==(r=e.request)?void 0:r.timezone});return(0,l.compareArrayValues)(d,c,l.compareDataFrameStructures)||this._structureRev++,this._dataWithFieldConfig=ea(Zi({},e),{structureRev:this._structureRev,series:d}),this._dataWithFieldConfig.annotations&&(this._dataWithFieldConfig.annotations=(0,l.applyFieldOverrides)({data:this._dataWithFieldConfig.annotations,fieldConfig:{defaults:{},overrides:[]},fieldConfigRegistry:s,replaceVariables:this.interpolate,theme:u.config.theme2,timeZone:null==(i=e.request)?void 0:i.timezone})),o.alertStates||(this._dataWithFieldConfig.alertState=void 0),o.annotations||(this._dataWithFieldConfig.annotations=void 0),this._prevData=e,this._dataWithFieldConfig}buildPanelContext(){const e=(t=this,Ct.findObject(t,(e=>e instanceof si)));var t;const n={eventsScope:e?e.getEventsScope():"__global_",eventBus:e?e.getEventsBus(this):(0,u.getAppEvents)(),app:l.CoreApp.Unknown,sync:()=>e?e.state.sync:l.DashboardCursorSync.Off,onSeriesColorChange:this._onSeriesColorChange,onToggleSeriesVisibility:this._onSeriesVisibilityChange,onToggleLegendSort:this._onToggleLegendSort,onInstanceStateChange:this._onInstanceStateChange};return this.state.extendPanelContext&&this.state.extendPanelContext(this,n),n}}ta.Component=function({model:e}){var t;const{title:n,options:r,fieldConfig:i,_pluginLoadError:s,displayMode:c,hoverHeader:d,hoverHeaderOffset:h,menu:p,headerActions:f,titleItems:m,description:g}=e.useState(),[v,{width:y,height:b}]=pi(),w=(0,a.useMemo)((()=>(0,u.getAppEvents)()),[]),S=(0,a.useCallback)((()=>w.publish(new l.SetPanelAttentionEvent({panelId:e.state.key}))),[e.state.key,w]),x=(0,a.useMemo)((()=>(0,pe.debounce)(S,100)),[S]),E=e.getPlugin(),{dragClass:_,dragClassCancel:O}=function(e){var t,n;const r=Ct.getLayout(e),i=null==r?void 0:r.isDraggable();if(!r||!i||function(e,t){let n=e.parent;for(;n&&n!==t;){if("isDraggable"in n.state&&!1===n.state.isDraggable)return!0;n=n.parent}return!1}(e,r))return{dragClass:"",dragClassCancel:""};return{dragClass:null==(t=r.getDragClass)?void 0:t.call(r),dragClassCancel:null==(n=null==r?void 0:r.getDragClassCancel)?void 0:n.call(r)}}(e),T=Ct.getData(e),k=T.useState(),C=e.applyFieldConfig(k.data),A=Ct.getTimeRange(e).getTimeZone(),D=e.getTimeRange(C),R=e.interpolate(n,void 0,"text"),I=(0,ln.useStyles2)(vi);if(!E)return o().createElement("div",null,"Loading plugin panel...");if(!E.panel)return o().createElement("div",null,"Panel plugin has no panel component");const P=E.panel;T&&T.setContainerWidth&&T.setContainerWidth(Math.round(y));let N,j,L=[];m&&(Array.isArray(m)?L=L.concat(m.map((e=>o().createElement(e.Component,{model:e,key:`${e.state.key}`})))):st(m)?L.push(o().createElement(m.Component,{model:m})):L.push(m)),e.state.$timeRange&&L.push(o().createElement(e.state.$timeRange.Component,{model:e.state.$timeRange,key:e.state.key})),C.alertState&&L.push(o().createElement(ln.Tooltip,{content:null!=(t=C.alertState.state)?t:"unknown",key:`alert-states-icon-${e.state.key}`},o().createElement(ln.PanelChrome.TitleItem,{className:(0,dn.cx)({[I.ok]:C.alertState.state===l.AlertState.OK,[I.pending]:C.alertState.state===l.AlertState.Pending,[I.alerting]:C.alertState.state===l.AlertState.Alerting})},o().createElement(ln.Icon,{name:"alerting"===C.alertState.state?"heart-break":"heart",className:"panel-alert-icon",size:"md"})))),p&&(N=o().createElement(p.Component,{model:p})),f&&(j=Array.isArray(f)?o().createElement(o().Fragment,null,f.map((e=>o().createElement(e.Component,{model:e,key:`${e.state.key}`})))):st(f)?o().createElement(f.Component,{model:f}):f);const M=C,F=!T.isDataReadyToDisplay||T.isDataReadyToDisplay(),V=e.getPanelContext(),$=e.getLegacyPanelId();return o().createElement("div",{className:mi},o().createElement("div",{ref:v,className:gi,"data-viz-panel-key":e.state.key},y>0&&b>0&&o().createElement(ln.PanelChrome,{title:R,description:(null==g?void 0:g.trim())?e.getDescription:void 0,loadingState:M.state,statusMessage:fi(M,s),statusMessageOnClick:e.onStatusMessageClick,width:y,height:b,displayMode:c,hoverHeader:d,hoverHeaderOffset:h,titleItems:L,dragClass:_,actions:j,dragClassCancel:O,padding:E.noPadding?"none":"md",menu:N,onCancelQuery:e.onCancelQuery,onFocus:S,onMouseMove:x},((t,a)=>o().createElement(o().Fragment,null,o().createElement(ln.ErrorBoundaryAlert,{dependencies:[E,M]},o().createElement(l.PluginContextProvider,{meta:E.meta},o().createElement(ln.PanelContextProvider,{value:V},F&&o().createElement(P,{id:$,data:M,title:n,timeRange:D,timeZone:A,options:r,fieldConfig:i,transparent:!1,width:t,height:a,renderCounter:0,replaceVariables:e.interpolate,onOptionsChange:e.onOptionsChange,onFieldConfigChange:e.onFieldConfigChange,onChangeTimeRange:e.onTimeRangeChange,eventBus:w})))))))))};const na=class extends ee{constructor({enabled:e=!1}){super({enabled:e}),this.timerId=void 0,this._activationHandler=()=>(this.state.enabled&&this.enable(),()=>{window.clearInterval(this.timerId),this.timerId=void 0}),this.addActivationHandler(this._activationHandler)}enable(){window.clearInterval(this.timerId),this.timerId=void 0,this.timerId=window.setInterval((()=>{const e=Ct.findAllObjects(this.getRoot(),(e=>e instanceof ta));for(const t of e)t.forceRender()}),na.REFRESH_RATE),this.setState({enabled:!0})}disable(){window.clearInterval(this.timerId),this.timerId=void 0,this.setState({enabled:!1})}get isEnabled(){return this.state.enabled}};let ra=na;function ia(e){if("string"==typeof e)return e;if(e){if(e instanceof Error)return e.message;if((0,u.isFetchError)(e)){if(e.data&&e.data.message)return e.data.message;if(e.statusText)return e.statusText}else if(e.hasOwnProperty("message"))return e.message}return JSON.stringify(e)}ra.REFRESH_RATE=100;var aa=Object.defineProperty,oa=Object.getOwnPropertySymbols,sa=Object.prototype.hasOwnProperty,la=Object.prototype.propertyIsEnumerable,ua=(e,t,n)=>t in e?aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class ca extends ee{constructor(e,t=[]){super(((e,t)=>{for(var n in t||(t={}))sa.call(t,n)&&ua(e,n,t[n]);if(oa)for(var n of oa(t))la.call(t,n)&&ua(e,n,t[n]);return e})({isEnabled:!0},e)),this._results=new T.ReplaySubject(1),this.isDataLayer=!0,this._variableValueRecorder=new It,this._variableDependency=new Rt(this,{onVariableUpdateCompleted:this.onVariableUpdateCompleted.bind(this)}),this._variableDependency.setPaths(t),this.addActivationHandler((()=>this.onActivate()))}onActivate(){return this.state.isEnabled&&this.onEnable(),this.shouldRunLayerOnActivate()&&this.runLayer(),this.subscribeToState(((e,t)=>{!e.isEnabled&&this.querySub&&(this.querySub.unsubscribe(),this.querySub=void 0,this.onDisable(),this._results.next({origin:this,data:Oe}),this.setStateHelper({data:Oe})),e.isEnabled&&!t.isEnabled&&(this.onEnable(),this.runLayer())})),()=>{this.onDeactivate()}}onDeactivate(){this.querySub&&(this.querySub.unsubscribe(),this.querySub=void 0),this.onDisable(),this._variableValueRecorder.recordCurrentDependencyValuesForSceneObject(this)}onVariableUpdateCompleted(){this.runLayer()}cancelQuery(){this.querySub&&(this.querySub.unsubscribe(),this.querySub=void 0,this.publishResults(Oe))}publishResults(e){this.state.isEnabled&&(this._results.next({origin:this,data:e}),this.setStateHelper({data:e}))}getResultsStream(){return this._results}shouldRunLayerOnActivate(){return this._variableValueRecorder.hasDependenciesChanged(this)?(Dt(),!0):!this.state.data}setStateHelper(e){rn(this,e)}}function da({layer:e}){var t,n;const r=`data-layer-${e.state.key}`,{data:i,isEnabled:a}=e.useState(),s=Boolean(i&&i.state===be.Loading);return o().createElement("div",{className:ha},o().createElement(tr,{htmlFor:r,isLoading:s,onCancel:()=>{var t;return null==(t=e.cancelQuery)?void 0:t.call(e)},label:e.state.name,description:e.state.description,error:null==(n=null==(t=e.state.data)?void 0:t.errors)?void 0:n[0].message}),o().createElement(ln.InlineSwitch,{id:r,value:a,onChange:()=>e.setState({isEnabled:!a})}))}(class extends ee{constructor(){super({})}}).Component=function({model:e}){const t=Ct.getDataLayers(e,!0);if(0===t.length)return null;return o().createElement(o().Fragment,null,t.map((e=>o().createElement(e.Component,{model:e,key:e.state.key}))))};const ha=(0,dn.css)({display:"flex"});var pa=n(7708),fa=n(4120),ma=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},ga=n(1693);var va=n(8353),ya=n(3449),ba="function"==typeof Symbol&&Symbol.observable||"@@observable",wa=n(3887);function Sa(e){return 0===e.length?wa.D:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var xa=n(2236),Ea=n(3004),_a=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,i=this,a=(r=e)&&r instanceof va.vU||function(e){return e&&(0,ga.T)(e.next)&&(0,ga.T)(e.error)&&(0,ga.T)(e.complete)}(r)&&(0,ya.Uv)(r)?e:new va.Ms(e,t,n);return(0,Ea.Y)((function(){var e=i,t=e.operator,n=e.source;a.add(t?t.call(a,n):n?i._subscribe(a):i._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=Oa(t))((function(t,r){var i=new va.Ms({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[ba]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Sa(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=Oa(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function Oa(e){var t;return null!==(t=null!=e?e:xa.$.Promise)&&void 0!==t?t:Promise}var Ta="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";var ka=n(6712);function Ca(e){if(e instanceof _a)return e;if(null!=e){if(function(e){return(0,ga.T)(e[ba])}(e))return a=e,new _a((function(e){var t=a[ba]();if((0,ga.T)(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(ma(e))return i=e,new _a((function(e){for(var t=0;t<i.length&&!e.closed;t++)e.next(i[t]);e.complete()}));if(r=e,(0,ga.T)(null==r?void 0:r.then))return n=e,new _a((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,ka.m)}));if(function(e){return Symbol.asyncIterator&&(0,ga.T)(null==e?void 0:e[Symbol.asyncIterator])}(e))return Aa(e);if(function(e){return(0,ga.T)(null==e?void 0:e[Ta])}(e))return t=e,new _a((function(e){var n,r;try{for(var i=(0,fa.Ju)(t),a=i.next();!a.done;a=i.next()){var o=a.value;if(e.next(o),e.closed)return}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}e.complete()}));if(function(e){return(0,ga.T)(null==e?void 0:e.getReader)}(e))return Aa(function(e){return(0,fa.AQ)(this,arguments,(function(){var t,n,r;return(0,fa.YH)(this,(function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,(0,fa.N3)(t.read())];case 3:return n=i.sent(),r=n.value,n.done?[4,(0,fa.N3)(void 0)]:[3,5];case 4:return[2,i.sent()];case 5:return[4,(0,fa.N3)(r)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}(e))}var t,n,r,i,a;throw function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}(e)}function Aa(e){return new _a((function(t){(function(e,t){var n,r,i,a;return(0,fa.sH)(this,void 0,void 0,(function(){var o,s;return(0,fa.YH)(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,6,11]),n=(0,fa.xN)(e),l.label=1;case 1:return[4,n.next()];case 2:if((r=l.sent()).done)return[3,4];if(o=r.value,t.next(o),t.closed)return[2];l.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return s=l.sent(),i={error:s},[3,11];case 6:return l.trys.push([6,,9,10]),r&&!r.done&&(a=n.return)?[4,a.call(n)]:[3,8];case 7:l.sent(),l.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}var Da=n(5096);var Ra=n(4370);function Ia(e,t,n){return void 0===n&&(n=1/0),(0,ga.T)(t)?Ia((function(n,r){return(0,pa.T)((function(e,i){return t(n,e,r,i)}))(Ca(e(n,r)))}),n):("number"==typeof t&&(n=t),(0,Da.N)((function(t,r){return function(e,t,n,r,i,a,o,s){var l=[],u=0,c=0,d=!1,h=function(){!d||l.length||u||t.complete()},p=function(e){return u<r?f(e):l.push(e)},f=function(e){a&&t.next(e),u++;var s=!1;Ca(n(e,c++)).subscribe((0,Ra._)(t,(function(e){null==i||i(e),a?p(e):t.next(e)}),(function(){s=!0}),void 0,(function(){if(s)try{u--;for(var e=function(){var e=l.shift();o?function(e,t,n,r,i){void 0===r&&(r=0),void 0===i&&(i=!1);var a=t.schedule((function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()}),r);e.add(a)}(t,o,(function(){return f(e)})):f(e)};l.length&&u<r;)e();h()}catch(e){t.error(e)}})))};return e.subscribe((0,Ra._)(t,p,(function(){d=!0,h()}))),function(){null==s||s()}}(t,r,e,n)})))}var Pa=Object.defineProperty,Na=Object.defineProperties,ja=Object.getOwnPropertyDescriptors,La=Object.getOwnPropertySymbols,Ma=Object.prototype.hasOwnProperty,Fa=Object.prototype.propertyIsEnumerable,Va=(e,t,n)=>t in e?Pa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const $a={prepareAnnotation:e=>{if((0,pe.isString)(null==e?void 0:e.query)){const n=e,{query:r}=n,i=((e,t)=>{var n={};for(var r in e)Ma.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&La)for(var r of La(e))t.indexOf(r)<0&&Fa.call(e,r)&&(n[r]=e[r]);return n})(n,["query"]);return t=((e,t)=>{for(var n in t||(t={}))Ma.call(t,n)&&Va(e,n,t[n]);if(La)for(var n of La(t))Fa.call(t,n)&&Va(e,n,t[n]);return e})({},i),Na(t,ja({target:{refId:"annotation_query",query:r},mappings:{}}))}var t;return e},prepareQuery:e=>e.target,processEvents:(e,t)=>function(e,t){return(0,T.of)(e).pipe((e=>e.pipe(Ia((e=>{if(!(null==e?void 0:e.length))return(0,T.of)(void 0);if(1===e.length)return(0,T.of)(e[0]);const t={interpolate:e=>e};return(0,T.of)(e).pipe(l.standardTransformers.mergeTransformer.operator({},t),(0,pa.T)((e=>e[0])))})))),(0,pa.T)((e=>{if(!(null==e?void 0:e.length))return[];let n=!1,r=!1;const i={};for(const t of e.fields){i[(0,l.getFieldDisplayName)(t,e).toLowerCase()]=t}t||(t={});const a=[];for(const o of za){const s=t[o.key]||{};if(s.source===l.AnnotationEventFieldSource.Skip)continue;const u={key:o.key,split:o.split};if(s.source===l.AnnotationEventFieldSource.Text)u.text=s.value;else{const t=(s.value||o.key).toLowerCase();u.field=i[t],!u.field&&o.field&&(u.field=o.field(e))}(u.field||u.text)&&(a.push(u),"time"===u.key?n=!0:"text"===u.key&&(r=!0))}if(!n||!r)return console.error("Cannot process annotation fields. No time or text present."),[];const o=[];for(let t=0;t<e.length;t++){const e={type:"default",color:"red"};for(const n of a){let r;if(n.text)r=n.text;else if(n.field&&(r=n.field.values.get(t),void 0!==r&&n.regex)){const e=n.regex.exec(r);e&&(r=e[1]?e[1]:e[0])}null!=r&&(n.split&&"string"==typeof r&&(r=r.split(",")),e[n.key]=r)}o.push(e)}return o})))}(t,e.mappings)};const Ba=[{key:"time",field:e=>e.fields.find((e=>e.type===l.FieldType.time)),placeholder:"time, or the first time field"},{key:"timeEnd",help:"When this field is defined, the annotation will be treated as a range"},{key:"title"},{key:"text",field:e=>e.fields.find((e=>e.type===l.FieldType.string)),placeholder:"text, or the first text field"},{key:"tags",split:",",help:"The results will be split on comma (,)"},{key:"id"}],za=[...u.config.publicDashboardAccessToken?[{key:"color"},{key:"isRegion"},{key:"source"}]:[],...Ba,{key:"userId"},{key:"login"},{key:"email"},{key:"prevState"},{key:"newState"},{key:"data"},{key:"panelId"},{key:"alertId"},{key:"dashboardId"},{key:"dashboardUID"}];const Ua=["prometheus","loki","elasticsearch","grafana-opensearch-datasource"];var qa=Object.defineProperty,Ha=Object.defineProperties,Ga=Object.getOwnPropertyDescriptors,Wa=Object.getOwnPropertySymbols,Qa=Object.prototype.hasOwnProperty,Ka=Object.prototype.propertyIsEnumerable,Xa=(e,t,n)=>t in e?qa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ya=(e,t)=>{for(var n in t||(t={}))Qa.call(t,n)&&Xa(e,n,t[n]);if(Wa)for(var n of Wa(t))Ka.call(t,n)&&Xa(e,n,t[n]);return e},Ja=(e,t)=>Ha(e,Ga(t));let Za=100;function eo(e,t,n,r){var i;if(e.annotationQuery&&function(e){const{type:t}=e;return!e.annotations||Ua.includes(t)}(e))return console.warn("Using deprecated annotationQuery method, please upgrade your datasource"),(0,T.from)(e.annotationQuery({range:t.state.value,rangeRaw:t.state.value.raw,annotation:n,dashboard:{}})).pipe((0,pa.T)((e=>({state:be.Done,events:e}))));const a=Ya(Ya({},$a),e.annotations),o=Ya(Ya({},null==(i=a.getDefaultQuery)?void 0:i.call(a)),n),s=a.prepareAnnotation(o);if(!s)return(0,T.of)({state:be.Done,events:[]});const c=a.prepareQuery(s);if(!c)return(0,T.of)({state:be.Done,events:[]});const d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,h=l.rangeUtil.calculateInterval(t.state.value,d,e.interval),p={__interval:{text:h.interval,value:h.interval},__interval_ms:{text:h.intervalMs.toString(),value:h.intervalMs},__annotation:{text:s.name,value:s},__sceneObject:{text:"__sceneObject",value:r}},f=Ya(Ja(Ya({startTime:Date.now(),requestId:"AQ"+Za++,range:t.state.value,maxDataPoints:d,scopedVars:p},h),{app:l.CoreApp.Dashboard,timezone:t.getTimeZone(),targets:[Ja(Ya({},c),{refId:"Anno"})]}),Jt(r));return(0,u.getRunRequest)()(e,f).pipe(Ia((e=>{const t=(null==e?void 0:e.series.length)?e.series:e.annotations;return(null==t?void 0:t.length)?(t.forEach((e=>{var t;(null==(t=e.meta)?void 0:t.dataTopic)||(e.meta=Ja(Ya({},e.meta||{}),{dataTopic:l.DataTopic.Annotations}))})),a.processEvents(s,t).pipe((0,pa.T)((t=>({state:e.state,events:t||[]}))))):(0,T.of)({state:e.state,events:[]})})))}var to=Object.defineProperty,no=Object.getOwnPropertySymbols,ro=Object.prototype.hasOwnProperty,io=Object.prototype.propertyIsEnumerable,ao=(e,t,n)=>t in e?to(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function oo(e,t){e.snapshotData&&delete(e=(0,pe.cloneDeep)(e)).snapshotData;return t.map((t=>{var n;const r=((e,t)=>{for(var n in t||(t={}))ro.call(t,n)&&ao(e,n,t[n]);if(no)for(var n of no(t))io.call(t,n)&&ao(e,n,t[n]);return e})({},t);switch(r.source=e,r.color=u.config.theme2.visualization.getColorByName(e.iconColor),r.type=e.name,r.isRegion=Boolean(r.timeEnd&&r.time!==r.timeEnd),null==(n=r.newState)?void 0:n.toLowerCase()){case"pending":r.color="yellow";break;case"alerting":r.color="red";break;case"ok":case"normal":r.color="green";break;case"no_data":case"nodata":r.color="gray"}return r}))}function so(e){return"panel-alert"===e.eventType}var lo=Object.defineProperty,uo=Object.defineProperties,co=Object.getOwnPropertyDescriptors,ho=Object.getOwnPropertySymbols,po=Object.prototype.hasOwnProperty,fo=Object.prototype.propertyIsEnumerable,mo=(e,t,n)=>t in e?lo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,go=(e,t)=>{for(var n in t||(t={}))po.call(t,n)&&mo(e,n,t[n]);if(ho)for(var n of ho(t))fo.call(t,n)&&mo(e,n,t[n]);return e},vo=(e,t)=>uo(e,co(t));(class extends ca{constructor(e){super(go({isEnabled:!0},e),["query"]),this._scopedVars={__sceneObject:{value:this,text:"__sceneObject"}}}onEnable(){const e=Ct.getTimeRange(this);this._timeRangeSub=e.subscribeToState((()=>{this.runWithTimeRange(e)}))}onDisable(){var e;null==(e=this._timeRangeSub)||e.unsubscribe()}runLayer(){Dt();const e=Ct.getTimeRange(this);this.runWithTimeRange(e)}async runWithTimeRange(e){const{query:t}=this.state;if(this.querySub&&this.querySub.unsubscribe(),this._variableDependency.hasDependencyInLoadingState())Dt();else try{let n=eo(await this.resolveDataSource(t),e,t,this).pipe(tn({type:"annotations",origin:this,cancel:()=>this.cancelQuery()}),(0,T.map)((e=>this.processEvents(t,e))));this.querySub=n.subscribe((e=>{this.publishResults(e)}))}catch(e){this.publishResults(vo(go({},Oe),{state:be.Error,errors:[{message:ia(e)}]})),console.error("AnnotationsDataLayer error",e)}}async resolveDataSource(e){return await At(e.datasource||void 0,this._scopedVars)}processEvents(e,t){let n=oo(e,t.events||[]);n=function(e){let t=[];const n=(0,pe.partition)(e,"id"),r=(0,pe.groupBy)(n[0],"id");return t=(0,pe.map)(r,(e=>e.length>1&&!(0,pe.every)(e,so)?(0,pe.find)(e,(e=>"panel-alert"!==e.eventType)):(0,pe.head)(e))),t=(0,pe.concat)(t,n[1]),t}(n);const r=vo(go({},Oe),{state:t.state}),i=(0,l.arrayToDataFrame)(n);return i.meta=vo(go({},i.meta),{dataTopic:l.DataTopic.Annotations}),r.series=[i],r}}).Component=function({model:e}){const{isHidden:t}=e.useState();if(t)return null;return o().createElement(da,{layer:e})};Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var yo=Object.defineProperty,bo=Object.defineProperties,wo=Object.getOwnPropertyDescriptors,So=Object.getOwnPropertySymbols,xo=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable,_o=(e,t,n)=>t in e?yo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class Oo extends ee{constructor(){super(...arguments),this.isDataLayer=!0,this._results=new T.ReplaySubject(1),this._dataLayersMerger=new kr}subscribeToAllLayers(e){e.length>0?this.querySub=this._dataLayersMerger.getMergedStream(e).subscribe(this._onLayerUpdateReceived.bind(this)):(this._results.next({origin:this,data:Oe}),this.setStateHelper({data:Oe}))}_onLayerUpdateReceived(e){var t;let n=[];for(const r of e)(null==(t=r.data)?void 0:t.series)&&(n=n.concat(r.data.series));const r=(i=((e,t)=>{for(var n in t||(t={}))xo.call(t,n)&&_o(e,n,t[n]);if(So)for(var n of So(t))Eo.call(t,n)&&_o(e,n,t[n]);return e})({},Oe),bo(i,wo({series:n})));var i;this._results.next({origin:this,data:r}),this.setStateHelper({data:r})}getResultsStream(){return this._results}cancelQuery(){var e;null==(e=this.querySub)||e.unsubscribe()}setStateHelper(e){rn(this,e)}}class To extends Oo{constructor(e){var t,n;super({name:null!=(t=e.name)?t:"Data layers",layers:null!=(n=e.layers)?n:[]}),this.addActivationHandler((()=>this._onActivate()))}_onActivate(){return this._subs.add(this.subscribeToState(((e,t)=>{var n;e.layers!==t.layers&&(null==(n=this.querySub)||n.unsubscribe(),this.subscribeToAllLayers(e.layers))}))),this.subscribeToAllLayers(this.state.layers),()=>{var e;null==(e=this.querySub)||e.unsubscribe()}}}To.Component=({model:e})=>{const{layers:t}=e.useState();return o().createElement(o().Fragment,null,t.map((e=>o().createElement(e.Component,{model:e,key:e.state.key}))))};var ko=Object.defineProperty,Co=Object.defineProperties,Ao=Object.getOwnPropertyDescriptors,Do=Object.getOwnPropertySymbols,Ro=Object.prototype.hasOwnProperty,Io=Object.prototype.propertyIsEnumerable,Po=(e,t,n)=>t in e?ko(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,No=(e,t)=>{for(var n in t||(t={}))Ro.call(t,n)&&Po(e,n,t[n]);if(Do)for(var n of Do(t))Io.call(t,n)&&Po(e,n,t[n]);return e},jo=(e,t)=>Co(e,Ao(t));class Lo extends ee{constructor(e){super(e),this._results=new T.ReplaySubject(1),this._variableDependency=new Rt(this,{statePaths:["transformations"],onReferencedVariableValueChanged:()=>this.reprocessTransformations()}),this.addActivationHandler((()=>this.activationHandler()))}activationHandler(){const e=this.getSourceData();return this._subs.add(e.subscribeToState((e=>this.transform(e.data)))),e.state.data&&this.transform(e.state.data),()=>{this._transformSub&&this._transformSub.unsubscribe()}}getSourceData(){if(this.state.$data){if(this.state.$data instanceof To)throw new Error("SceneDataLayerSet can not be used as data provider for SceneDataTransformer.");return this.state.$data}if(!this.parent||!this.parent.parent)throw new Error("SceneDataTransformer must either have $data set on it or have a parent.parent with $data");return Ct.getData(this.parent.parent)}setContainerWidth(e){this.state.$data&&this.state.$data.setContainerWidth&&this.state.$data.setContainerWidth(e)}isDataReadyToDisplay(){const e=this.getSourceData();return!e.isDataReadyToDisplay||e.isDataReadyToDisplay()}reprocessTransformations(){this.transform(this.getSourceData().state.data,!0)}cancelQuery(){var e,t;null==(t=(e=this.getSourceData()).cancelQuery)||t.call(e)}getResultsStream(){return this._results}clone(e){const t=super.clone(e);return this._prevDataFromSource&&(t._prevDataFromSource=this._prevDataFromSource),t}haveAlreadyTransformedData(e){if(!this._prevDataFromSource)return!1;if(e===this._prevDataFromSource)return!0;const{series:t,annotations:n}=this._prevDataFromSource;return e.series===t&&e.annotations===n&&(this.state.data&&e.state!==this.state.data.state&&this.setState({data:jo(No({},this.state.data),{state:e.state})}),!0)}transform(e,t=!1){var n;if(0===this.state.transformations.length||!e)return this._prevDataFromSource=e,this.setState({data:e}),void(e&&this._results.next({origin:this,data:e}));if(!t&&this.haveAlreadyTransformedData(e))return;const r=this.state.transformations.filter((e=>!("options"in e)&&!("topic"in e)||(null==e.topic||e.topic===l.DataTopic.Series))).map((e=>"operator"in e?e.operator:e)),i=this.state.transformations.filter((e=>("options"in e||"topic"in e)&&e.topic===l.DataTopic.Annotations)).map((e=>"operator"in e?e.operator:e));this._transformSub&&this._transformSub.unsubscribe();const a={interpolate:t=>{var n;return Ct.interpolate(this,t,null==(n=e.request)?void 0:n.scopedVars)}};let o=[(0,l.transformDataFrame)(r,e.series,a)];e.annotations&&e.annotations.length>0&&i.length>0&&o.push((0,l.transformDataFrame)(i,null!=(n=e.annotations)?n:[])),this._transformSub=(0,T.forkJoin)(o).pipe((0,T.map)((t=>{const n=t[0],r=t[1];return jo(No({},e),{series:n,annotations:null!=r?r:e.annotations})})),(0,T.catchError)((t=>{var n;console.error("Error transforming data: ",t);const r=(null==(n=this.getSourceData().state.data)?void 0:n.errors)||[],i=(0,u.toDataQueryError)(t);i.message=`Error transforming data: ${i.message}`;const a=jo(No({},e),{state:l.LoadingState.Error,errors:[...r,i]});return(0,T.of)(a)}))).subscribe((t=>{this.setState({data:t}),this._results.next({origin:this,data:t}),this._prevDataFromSource=e}))}}function Mo({variable:e,layout:t,showAlways:n,hideLabel:r}){return te(e,{shouldActivateOrKeepAlive:!0}).hide!==l.VariableHide.hideVariable||n?"vertical"===t?o().createElement("div",{className:$o,"data-testid":cn.pages.Dashboard.SubMenu.submenuItem},o().createElement(Fo,{variable:e,layout:t,hideLabel:r}),o().createElement(e.Component,{model:e})):o().createElement("div",{className:Vo,"data-testid":cn.pages.Dashboard.SubMenu.submenuItem},o().createElement(Fo,{variable:e,hideLabel:r}),o().createElement(e.Component,{model:e})):null}function Fo({variable:e,layout:t,hideLabel:n}){var r,i;const{state:a}=e;if(e.state.hide===l.VariableHide.hideLabel||n)return null;const s=`var-${a.key}`,u=null!=(r=a.label)?r:a.name;return o().createElement(tr,{htmlFor:s,isLoading:a.loading,onCancel:()=>{var t;return null==(t=e.onCancel)?void 0:t.call(e)},label:u,error:a.error,layout:t,description:null!=(i=a.description)?i:void 0})}(class extends ee{}).Component=function({model:e}){const t=Ct.getVariables(e).useState();return o().createElement(o().Fragment,null,t.variables.map((t=>o().createElement(Mo,{key:t.state.key,variable:t,layout:e.state.layout}))))};const Vo=(0,dn.css)({display:"flex"}),$o=(0,dn.css)({display:"flex",flexDirection:"column"});(class extends ee{}).Component=function({model:e}){const t=Ct.lookupVariable(e.state.variableName,e);if(!t)return null;return o().createElement(Mo,{key:t.state.key,variable:t,layout:e.state.layout,showAlways:!0})};class Bo extends ee{constructor(e){super(e),this._variablesThatHaveChanged=new Set,this._variablesToUpdate=new Set,this._updating=new Map,this._variableValueRecorder=new It,this._variableDependency=new Uo(this._handleParentVariableUpdatesCompleted.bind(this)),this._onActivate=()=>{const e=Ct.getTimeRange(this);this._subs.add(this.subscribeToEvent($e,(e=>this._handleVariableValueChanged(e.payload)))),this._subs.add(e.subscribeToState((()=>{this._refreshTimeRangeBasedVariables()}))),this._subs.add(this.subscribeToState(this._onStateChanged)),this._checkForVariablesThatChangedWhileInactive();for(const e of this.state.variables)this._variableNeedsUpdate(e)&&this._variablesToUpdate.add(e);return this._updateNextBatch(),this._onDeactivate},this._onDeactivate=()=>{var e;for(const t of this._updating.values())null==(e=t.subscription)||e.unsubscribe();for(const e of this.state.variables)this._variablesToUpdate.has(e)||this._updating.has(e)||this._variableValueRecorder.recordCurrentValue(e);this._variablesToUpdate.clear(),this._updating.clear()},this._onStateChanged=(e,t)=>{const n=this._variablesToUpdate.size;for(const n of t.variables)if(!e.variables.includes(n)){const e=this._updating.get(n);(null==e?void 0:e.subscription)&&e.subscription.unsubscribe(),this._updating.delete(n),this._variablesToUpdate.delete(n)}for(const n of e.variables)t.variables.includes(n)||this._variableNeedsUpdate(n)&&this._variablesToUpdate.add(n);0===n&&this._variablesToUpdate.size>0&&this._updateNextBatch()},this.addActivationHandler(this._onActivate)}getByName(e){return this.state.variables.find((t=>t.state.name===e))}_refreshTimeRangeBasedVariables(){for(const e of this.state.variables)"refresh"in e.state&&e.state.refresh===l.VariableRefresh.onTimeRangeChanged&&this._variablesToUpdate.add(e);this._updateNextBatch()}_checkForVariablesThatChangedWhileInactive(){if(this._variableValueRecorder.hasValues())for(const e of this.state.variables)this._variableValueRecorder.hasValueChanged(e)&&(zo(e,"Changed while in-active"),this._addDependentVariablesToUpdateQueue(e))}_variableNeedsUpdate(e){return!e.isLazy&&(!!e.validateAndUpdate&&(!this._variableValueRecorder.hasRecordedValue(e)||(zo(e,"Skipping updateAndValidate current value valid"),!1)))}_updateNextBatch(){for(const e of this._variablesToUpdate){if(!e.validateAndUpdate)throw new Error("Variable added to variablesToUpdate but does not have validateAndUpdate");if(this._updating.has(e))continue;if(Ct.hasVariableDependencyInLoadingState(e))continue;const t={variable:e};this._updating.set(e,t),zo(e,"updateAndValidate started"),t.subscription=e.validateAndUpdate().subscribe({next:()=>this._validateAndUpdateCompleted(e),complete:()=>this._validateAndUpdateCompleted(e),error:t=>this._handleVariableError(e,t)})}}_validateAndUpdateCompleted(e){var t;if(!this._updating.has(e))return;const n=this._updating.get(e);null==(t=null==n?void 0:n.subscription)||t.unsubscribe(),this._updating.delete(e),this._variablesToUpdate.delete(e),zo(e,"updateAndValidate completed"),this._notifyDependentSceneObjects(e),this._updateNextBatch()}cancel(e){var t;const n=this._updating.get(e);null==(t=null==n?void 0:n.subscription)||t.unsubscribe(),this._updating.delete(e),this._variablesToUpdate.delete(e)}_handleVariableError(e,t){var n;const r=this._updating.get(e);null==(n=null==r?void 0:r.subscription)||n.unsubscribe(),this._updating.delete(e),this._variablesToUpdate.delete(e),e.setState({loading:!1,error:t.message}),console.error("SceneVariableSet updateAndValidate error",t),zo(e,"updateAndValidate error",t)}_handleVariableValueChanged(e){this._variablesThatHaveChanged.add(e),this._addDependentVariablesToUpdateQueue(e),this._updating.has(e)||(this._updateNextBatch(),this._notifyDependentSceneObjects(e))}_handleParentVariableUpdatesCompleted(e,t){t&&this._addDependentVariablesToUpdateQueue(e),this._variablesToUpdate.size>0&&0===this._updating.size&&this._updateNextBatch()}_addDependentVariablesToUpdateQueue(e){for(const t of this.state.variables)t.variableDependency&&t.variableDependency.hasDependencyOn(e.state.name)&&(zo(t,"Added to update queue, dependant variable value changed"),this._updating.has(t)&&t.onCancel&&t.onCancel(),this._variablesToUpdate.add(t))}_notifyDependentSceneObjects(e){this.parent&&(this._traverseSceneAndNotify(this.parent,e,this._variablesThatHaveChanged.has(e)),this._variablesThatHaveChanged.delete(e))}_traverseSceneAndNotify(e,t,n){if(this!==e&&e.isActive){if(e.state.$variables&&e.state.$variables!==this){if(e.state.$variables.getByName(t.state.name))return}e.variableDependency&&e.variableDependency.variableUpdateCompleted(t,n),e.forEachChild((e=>this._traverseSceneAndNotify(e,t,n)))}}isVariableLoadingOrWaitingToUpdate(e){return!(!e.isAncestorLoading||!e.isAncestorLoading())||(!(!this._variablesToUpdate.has(e)&&!this._updating.has(e))||Ct.hasVariableDependencyInLoadingState(e))}}function zo(e,t,n){Dt(0,e.state.name)}class Uo{constructor(e){this._variableUpdatesCompleted=e,this._emptySet=new Set}getNames(){return this._emptySet}hasDependencyOn(e){return!1}variableUpdateCompleted(e,t){this._variableUpdatesCompleted(e,t)}}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var qo=Object.defineProperty,Ho=Object.getOwnPropertySymbols,Go=Object.prototype.hasOwnProperty,Wo=Object.prototype.propertyIsEnumerable,Qo=(e,t,n)=>t in e?qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class Ko extends an{constructor(e){super(((e,t)=>{for(var n in t||(t={}))Go.call(t,n)&&Qo(e,n,t[n]);if(Ho)for(var n of Ho(t))Wo.call(t,n)&&Qo(e,n,t[n]);return e})({type:"custom",query:"",value:"",text:"",options:[],name:""},e)),this._variableDependency=new Rt(this,{statePaths:["query"]})}getValueOptions(e){var t;const n=(null!=(t=Ct.interpolate(this,this.state.query).match(/(?:\\,|[^,])+/g))?t:[]).map((e=>{var t;e=e.replace(/\\,/g,",");const n=null!=(t=/^(.+)\s:\s(.+)$/g.exec(e))?t:[];if(3===n.length){const[,e,t]=n;return{label:e.trim(),value:t.trim()}}return{label:e.trim(),value:e.trim()}}));return(0,T.of)(n)}}Ko.Component=({model:e})=>$n(e);var Xo=Object.defineProperty,Yo=Object.getOwnPropertySymbols,Jo=Object.prototype.hasOwnProperty,Zo=Object.prototype.propertyIsEnumerable,es=(e,t,n)=>t in e?Xo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class ts extends an{constructor(e){super(((e,t)=>{for(var n in t||(t={}))Jo.call(t,n)&&es(e,n,t[n]);if(Yo)for(var n of Yo(t))Zo.call(t,n)&&es(e,n,t[n]);return e})({type:"datasource",value:"",text:"",options:[],name:"",regex:"",pluginId:""},e)),this._variableDependency=new Rt(this,{statePaths:["regex"]})}getValueOptions(e){if(!this.state.pluginId)return(0,T.of)([]);const t=(0,u.getDataSourceSrv)().getList({metrics:!0,variables:!1,pluginId:this.state.pluginId});let n;if(this.state.regex){const e=Ct.interpolate(this,this.state.regex,void 0,"regex");n=(0,l.stringToJsRegex)(e)}const r=[];for(let e=0;e<t.length;e++){const i=t[e];ns(i,n)&&r.push({label:i.name,value:i.uid}),this.state.defaultOptionEnabled&&rs(i,n)&&r.push({label:"default",value:"default"})}return 0===r.length?this.setState({error:"No data sources found"}):this.state.error&&this.setState({error:null}),(0,T.of)(r)}}function ns(e,t){return!t||t.exec(e.name)}function rs(e,t){return!!e.isDefault&&(!t||t.exec("default"))}ts.Component=({model:e})=>$n(e);const is=e=>Boolean(e.metricFindQuery)&&!Boolean(e.variables),as=e=>{if(!e.variables)return!1;if(e.variables.getType()!==l.VariableSupportType.Standard)return!1;const t=e.variables;return"toDataQuery"in t&&Boolean(t.toDataQuery)},os=e=>{if(!e.variables)return!1;if(e.variables.getType()!==l.VariableSupportType.Custom)return!1;const t=e.variables;return"query"in t&&"editor"in t&&Boolean(t.query)&&Boolean(t.editor)};var ss=Object.defineProperty,ls=Object.defineProperties,us=Object.getOwnPropertyDescriptors,cs=Object.getOwnPropertySymbols,ds=Object.prototype.hasOwnProperty,hs=Object.prototype.propertyIsEnumerable,ps=(e,t,n)=>t in e?ss(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fs=(e,t)=>{for(var n in t||(t={}))ds.call(t,n)&&ps(e,n,t[n]);if(cs)for(var n of cs(t))hs.call(t,n)&&ps(e,n,t[n]);return e},ms=(e,t)=>ls(e,us(t));class gs{constructor(e,t=(0,u.getRunRequest)()){this.datasource=e,this._runRequest=t}getTarget(e){if(as(this.datasource))return this.datasource.variables.toDataQuery(function(e){var t;const n=null!=(t=e.state.query)?t:"";if("string"==typeof n)return{query:n,refId:`variable-${e.state.name}`};if(null==n.refId)return ms(fs({},n),{refId:`variable-${e.state.name}`});return e.state.query}(e));throw new Error("Couldn't create a target with supplied arguments.")}runRequest(e,t){return as(this.datasource)?this.datasource.variables.query?this._runRequest(this.datasource,t,this.datasource.variables.query.bind(this.datasource.variables)):this._runRequest(this.datasource,t):bs()}}class vs{constructor(e){this.datasource=e}getTarget(e){if(is(this.datasource))return e.state.query;throw new Error("Couldn't create a target with supplied arguments.")}runRequest({variable:e,searchFilter:t},n){return is(this.datasource)?(0,T.from)(this.datasource.metricFindQuery(e.state.query,ms(fs({},n),{variable:{name:e.state.name,type:e.state.type},searchFilter:t}))).pipe((0,T.mergeMap)((e=>{if(!e||!e.length)return bs();const t=e;return(0,T.of)({series:t,state:l.LoadingState.Done,timeRange:n.range})}))):bs()}}class ys{constructor(e,t=(0,u.getRunRequest)()){this.datasource=e,this._runRequest=t}getTarget(e){if(os(this.datasource))return e.state.query;throw new Error("Couldn't create a target with supplied arguments.")}runRequest(e,t){return os(this.datasource)?this.datasource.variables.query?this._runRequest(this.datasource,t,this.datasource.variables.query.bind(this.datasource.variables)):this._runRequest(this.datasource,t):bs()}}function bs(){return(0,T.of)({state:l.LoadingState.Done,series:[],timeRange:(0,l.getDefaultTimeRange)()})}let ws=function(e){if(as(e))return new gs(e,(0,u.getRunRequest)());if(is(e))return new vs(e);if(os(e))return new ys(e);throw new Error(`Couldn't create a query runner for datasource ${e.type}`)};const Ss=(e,t)=>{const n=[];let r=null;t.lastIndex=0;do{r=t.exec(e),r&&n.push(r)}while(t.global&&r&&""!==r[0]&&void 0!==r[0]);return n},xs=(e,t)=>{if(t===l.VariableSort.disabled)return e;const n=e=>{if(!e.text)return-1;const t=e.text.match(/.*?(\d+).*/);return!t||t.length<2?-1:parseInt(t[1],10)},r=e=>e.sort(((e,t)=>e.text?t.text?e.text.localeCompare(t.text,void 0,{numeric:!0}):1:-1));switch(t){case l.VariableSort.alphabeticalAsc:e=(0,pe.sortBy)(e,"label");break;case l.VariableSort.alphabeticalDesc:e=(0,pe.sortBy)(e,"label").reverse();break;case l.VariableSort.numericalAsc:e=(0,pe.sortBy)(e,n);break;case l.VariableSort.numericalDesc:e=(e=(0,pe.sortBy)(e,n)).reverse();break;case l.VariableSort.alphabeticalCaseInsensitiveAsc:e=(0,pe.sortBy)(e,(e=>(0,pe.toLower)(e.label)));break;case l.VariableSort.alphabeticalCaseInsensitiveDesc:e=(e=(0,pe.sortBy)(e,(e=>(0,pe.toLower)(e.label)))).reverse();break;case l.VariableSort.naturalAsc||7:e=r(e);break;case l.VariableSort.naturalDesc||8:e=(e=r(e)).reverse()}return e};function Es(){return e=>e.pipe((0,T.map)((e=>{const t=e.series;if(!t||!t.length)return[];if(function(e){if(!e)return!1;if(!e.length)return!0;const t=e[0];if((0,l.isDataFrame)(t))return!1;for(const e in t){if(!t.hasOwnProperty(e))continue;if(null!==t[e]&&"string"!=typeof t[e]&&"number"!=typeof t[e])continue;const n=e.toLowerCase();if("text"===n||"value"===n)return!0}return!1}(t))return t;if(0===t[0].fields.length)return[];const n=(0,l.getProcessedDataFrames)(t),r=[];let i=-1,a=-1,o=-1,s=-1;for(const e of n)for(let n=0;n<e.fields.length;n++){const r=e.fields[n],u=(0,l.getFieldDisplayName)(r,e,t).toLowerCase();r.type===l.FieldType.string&&-1===o&&(o=n),"text"===u&&r.type===l.FieldType.string&&-1===a&&(a=n),"value"===u&&r.type===l.FieldType.string&&-1===i&&(i=n),"expandable"!==u||r.type!==l.FieldType.boolean&&r.type!==l.FieldType.number||-1!==s||(s=n)}if(-1===o)throw new Error("Couldn't find any field of type string in the results.");for(const e of t)for(let t=0;t<e.length;t++){const n=-1!==s?e.fields[s].values.get(t):void 0,l=e.fields[o].values.get(t),u=-1!==a?e.fields[a].values.get(t):null,c=-1!==i?e.fields[i].values.get(t):null;-1!==i||-1!==a?-1!==i||-1===a?-1===i||-1!==a?r.push({text:u,value:c,expandable:n}):r.push({text:c,value:c,expandable:n}):r.push({text:u,value:u,expandable:n}):r.push({text:l,value:l,expandable:n})}return r})))}var _s=Object.defineProperty,Os=Object.getOwnPropertySymbols,Ts=Object.prototype.hasOwnProperty,ks=Object.prototype.propertyIsEnumerable,Cs=(e,t,n)=>t in e?_s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class As extends an{constructor(e){super(((e,t)=>{for(var n in t||(t={}))Ts.call(t,n)&&Cs(e,n,t[n]);if(Os)for(var n of Os(t))ks.call(t,n)&&Cs(e,n,t[n]);return e})({type:"query",name:"",value:"",text:"",options:[],datasource:null,regex:"",query:{refId:"A"},refresh:l.VariableRefresh.onDashboardLoad,sort:l.VariableSort.disabled},e)),this._variableDependency=new Rt(this,{statePaths:["regex","query","datasource"]}),this.onSearchChange=e=>{Ur(this.state.query).indexOf(it)>-1&&this._updateOptionsBasedOnSearchFilter(e)},this._updateOptionsBasedOnSearchFilter=(0,pe.debounce)((async e=>{const t=await(0,T.lastValueFrom)(this.getValueOptions({searchFilter:e}));this.setState({options:t,loading:!1})}),400)}getValueOptions(e){return this.state.query?(this.setState({loading:!0,error:null}),(0,T.from)(At(this.state.datasource,{__sceneObject:{text:"__sceneObject",value:this}})).pipe((0,T.mergeMap)((t=>{const n=ws(t),r=n.getTarget(this),i=this.getRequest(r,e.searchFilter);return n.runRequest({variable:this,searchFilter:e.searchFilter},i).pipe(tn({type:"variable",request:i,origin:this}),(0,T.filter)((e=>e.state===l.LoadingState.Done||e.state===l.LoadingState.Error)),(0,T.take)(1),(0,T.mergeMap)((e=>e.state===l.LoadingState.Error?(0,T.throwError)((()=>e.error)):(0,T.of)(e))),Es(),(0,T.mergeMap)((e=>{let t="";return this.state.regex&&(t=Ct.interpolate(this,this.state.regex,void 0,"regex")),(0,T.of)(((e,t,n)=>{var r,i,a,o,s,u;let c,d=[];e&&(c=(0,l.stringToJsRegex)(e));for(let e=0;e<n.length;e++){const t=n[e];let l=void 0===t.text||null===t.text?t.value:t.text,h=void 0===t.value||null===t.value?t.text:t.value;if((0,pe.isNumber)(h)&&(h=h.toString()),(0,pe.isNumber)(l)&&(l=l.toString()),c){const e=Ss(h,c);if(!e.length)continue;const t=e.find((e=>e.groups&&e.groups.value)),n=e.find((e=>e.groups&&e.groups.text)),p=e.find((e=>e.length>1)),f=e.length>1&&p;if(t||n)h=null!=(a=null==(r=null==t?void 0:t.groups)?void 0:r.value)?a:null==(i=null==n?void 0:n.groups)?void 0:i.text,l=null!=(u=null==(o=null==n?void 0:n.groups)?void 0:o.text)?u:null==(s=null==t?void 0:t.groups)?void 0:s.value;else{if(f){for(let t=0;t<e.length;t++){const n=e[t];d.push({label:n[1],value:n[1]})}continue}p&&(l=p[1],h=p[1])}}d.push({label:l,value:h})}return d=(0,pe.uniqBy)(d,"value"),xs(d,t)})(t,this.state.sort,e))})),(0,T.catchError)((e=>e.cancelled?(0,T.of)([]):(0,T.throwError)((()=>e)))))})))):(0,T.of)([])}getRequest(e,t){const n={__sceneObject:{text:"__sceneObject",value:this}};t&&(n.__searchFilter={value:t,text:t});const r=Ct.getTimeRange(this).state.value;return{app:l.CoreApp.Dashboard,requestId:P(),timezone:"",range:r,interval:"",intervalMs:0,targets:[e],scopedVars:n,startTime:Date.now()}}}function Ds(e,t){const n=["A","B","C","D","E","F","G","H"],r=[];if(t>5)return[];for(const i of n){const n=`${e}${i}`;r.push({name:n,children:Ds(n,t+1)})}return r}function Rs(e,t,n){if(n>=t.length)return e;if("*"===t[n])return e;const r=t[n];let i=[],a=[r];r.startsWith("{")&&(a=r.replace(/\{|\}/g,"").split(","));for(const r of e)for(const e of a)if(-1!==e.indexOf("*")){const a=e.replace("*","");new RegExp(`^${a}.*`,"gi").test(r.name)&&(i=i.concat(Rs([r],t,n+1)))}else r.name===e&&(i=i.concat(Rs(r.children,t,n+1)));return i}function Is(e){if(0===e.indexOf("value"))return[{name:e,children:[]}];return Rs(Ds("",0),e.split("."),0)}As.Component=({model:e})=>$n(e);var Ps=Object.defineProperty,Ns=Object.getOwnPropertySymbols,js=Object.prototype.hasOwnProperty,Ls=Object.prototype.propertyIsEnumerable,Ms=(e,t,n)=>t in e?Ps(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function Fs({model:e}){const{value:t,key:n,loading:r}=e.useState(),i=(0,a.useCallback)((t=>{e.setValue(t.currentTarget.value)}),[e]),s=(0,a.useCallback)((t=>{"Enter"===t.key&&e.setValue(t.currentTarget.value)}),[e]);return o().createElement(ln.AutoSizeInput,{id:n,placeholder:"Enter value",minWidth:15,defaultValue:t,loading:r,onBlur:i,onKeyDown:s})}(class extends an{constructor(e,t=!1){super(((e,t)=>{for(var n in t||(t={}))js.call(t,n)&&Ms(e,n,t[n]);if(Ns)for(var n of Ns(t))Ls.call(t,n)&&Ms(e,n,t[n]);return e})({type:"custom",name:"Test",value:"Value",text:"Text",query:"Query",options:[],refresh:l.VariableRefresh.onDashboardLoad},e)),this.completeUpdate=new T.Subject,this.isGettingValues=!0,this.getValueOptionsCount=0,this.isLazy=!1,this._variableDependency=new Rt(this,{statePaths:["query"]}),this.isLazy=t}getValueOptions(e){const{delayMs:t}=this.state;this.getValueOptionsCount+=1;const n=Ct.getQueryController(this);return new T.Observable((e=>{const r={type:"variable",origin:this,cancel:()=>e.complete()};if(n&&n.queryStarted(r),this.setState({loading:!0}),this.state.throwError)throw new Error(this.state.throwError);const i=Ct.interpolate(this,this.state.query),a=this.getOptions(i),o=this.completeUpdate.subscribe({next:()=>{this.setState({issuedQuery:i,options:a,loading:!1}),e.next(a),e.complete()}});let s;return t?s=window.setTimeout((()=>this.signalUpdateCompleted()),t):0===t&&this.signalUpdateCompleted(),this.isGettingValues=!0,()=>{o.unsubscribe(),window.clearTimeout(s),this.isGettingValues=!1,this.state.loading&&this.setState({loading:!1}),n&&n.queryCompleted(r)}}))}cancel(){const e=ce(this,(e=>e instanceof Bo?e:void 0));null==e||e.cancel(this)}getOptions(e){return this.state.optionsToReturn?this.state.optionsToReturn:Is(e).map((e=>({label:e.name,value:e.name})))}signalUpdateCompleted(){this.completeUpdate.next(1)}}).Component=({model:e})=>$n(e);var Vs=Object.defineProperty,$s=Object.getOwnPropertySymbols,Bs=Object.prototype.hasOwnProperty,zs=Object.prototype.propertyIsEnumerable,Us=(e,t,n)=>t in e?Vs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;(class extends ee{constructor(e){super(((e,t)=>{for(var n in t||(t={}))Bs.call(t,n)&&Us(e,n,t[n]);if($s)for(var n of $s(t))zs.call(t,n)&&Us(e,n,t[n]);return e})({type:"textbox",value:"",name:""},e)),this._urlSync=new Te(this,{keys:()=>[this.getKey()]})}getValue(){return this.state.value}setValue(e){e!==this.state.value&&(this.setState({value:e}),this.publishEvent(new $e(this),!0))}getKey(){return`var-${this.state.name}`}getUrlState(){return{[this.getKey()]:this.state.value}}updateFromUrl(e){const t={},n=e[this.getKey()];"string"==typeof n&&(t.value=n),this.setState(t)}}).Component=({model:e})=>o().createElement(Fs,{model:e});Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var qs=Object.defineProperty,Hs=Object.getOwnPropertySymbols,Gs=Object.prototype.hasOwnProperty,Ws=Object.prototype.propertyIsEnumerable,Qs=(e,t,n)=>t in e?qs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;(class extends ee{constructor(e){super(((e,t)=>{for(var n in t||(t={}))Gs.call(t,n)&&Qs(e,n,t[n]);if(Hs)for(var n of Hs(t))Ws.call(t,n)&&Qs(e,n,t[n]);return e})({type:"interval",value:"",intervals:["1m","10m","30m","1h","6h","12h","1d","7d","14d","30d"],name:"",autoStepCount:30,autoMinInterval:"10s",autoEnabled:!1,refresh:Jr.onTimeRangeChanged},e)),this._onChange=e=>{this.setState({value:e.value}),this.publishEvent(new $e(this),!0)},this._urlSync=new Te(this,{keys:()=>[this.getKey()]})}getKey(){return`var-${this.state.name}`}getUrlState(){return{[this.getKey()]:this.state.value}}updateFromUrl(e){const t={},n=e[this.getKey()];"string"==typeof n&&(n.startsWith("$__auto_interval_")?t.value=nt:t.value=n),this.setState(t)}getOptionsForSelect(){const{value:e,intervals:t,autoEnabled:n}=this.state;let r=t.map((e=>({value:e,label:e})));return n&&(r=[{value:nt,label:"Auto"},...r]),e&&!r.some((t=>t.value===e))&&r.push({value:e,label:e}),r}getValue(){const{value:e,autoStepCount:t,autoMinInterval:n}=this.state;return e===nt?this.getAutoRefreshInteval(t,n):e}getAutoRefreshInteval(e,t){const n=Ct.getTimeRange(this).state.value;return l.rangeUtil.calculateInterval(n,e,t).interval}validateAndUpdate(){const{value:e,intervals:t}=this.state;let n=!1;if(e===nt)n=!0;else if(!e&&t.length>0){const e=t[0];this.setState({value:e}),n=!0}return n&&this.publishEvent(new $e(this),!0),(0,T.of)({})}}).Component=({model:e})=>{const{key:t,value:n}=e.useState();return o().createElement(ln.Select,{id:t,placeholder:"Select value",width:"auto",value:n,tabSelectsValue:!1,options:e.getOptionsForSelect(),onChange:e._onChange})};class Ks{constructor(){this._urlKeyMapper=new fe,this._stateSub=null,this._locationSub=null,this._ignoreNextLocationUpdate=!1,this._onLocationUpdate=e=>{if(this._ignoreNextLocationUpdate)return void(this._ignoreNextLocationUpdate=!1);if(this._lastPath!==e.pathname)return;const t=new URLSearchParams(e.search);this._urlKeyMapper.rebuildIndex(this._sceneRoot),ge(this._sceneRoot,t,this._urlKeyMapper),this._lastPath=e.pathname},this._onStateChanged=({payload:e})=>{const t=e.changedObject;if(t.urlSync){const e=t.urlSync.getUrlState(),n=u.locationService.getSearch(),r={};this._urlKeyMapper.rebuildIndex(this._sceneRoot);for(const[i,a]of Object.entries(e)){const e=this._urlKeyMapper.getUniqueKey(i,t);ve(n.getAll(e),a)||(r[e]=a)}Object.keys(r).length>0&&(this._ignoreNextLocationUpdate=!0,u.locationService.partial(r,!0))}}}initSync(e){this._locationSub||(Dt(),this._locationSub=u.locationService.getHistory().listen(this._onLocationUpdate)),this._stateSub&&(Dt(0,0,this._sceneRoot.state.key),this._stateSub.unsubscribe()),this._sceneRoot=e,this._lastPath=u.locationService.getLocation().pathname,this._stateSub=e.subscribeToEvent(U,this._onStateChanged),this.syncFrom(this._sceneRoot)}cleanUp(e){this._sceneRoot===e&&(Dt(),this._locationSub&&(this._locationSub(),Dt(),this._locationSub=null),this._stateSub&&(this._stateSub.unsubscribe(),this._stateSub=null,Dt(0,0,(this._sceneRoot.state.key,e.state.key))))}syncFrom(e){const t=u.locationService.getSearch();this._urlKeyMapper.rebuildIndex(this._sceneRoot),ge(e,t,this._urlKeyMapper)}getUrlState(e){return me(e)}}let Xs;function Ys(){return Xs||(Xs=new Ks),Xs}class Js extends ee{constructor(e){super(e),this.addActivationHandler((()=>{const e=function(e){const t=window.__grafanaSceneContext;return Dt(),window.__grafanaSceneContext=e,()=>{window.__grafanaSceneContext===e&&(Dt(),window.__grafanaSceneContext=t)}}(this);return()=>{e(),Ys().cleanUp(this)}}))}initUrlSync(){Ys().initSync(this)}}Js.Component=function({model:e}){const{body:t,controls:n}=e.useState(),r=(0,ln.useStyles2)(Zs);return o().createElement("div",{className:r.container},n&&o().createElement("div",{className:r.controls},n.map((e=>o().createElement(e.Component,{key:e.state.key,model:e})))),o().createElement("div",{className:r.body},o().createElement(t.Component,{model:t})))};const Zs=e=>({container:(0,dn.css)({flexGrow:1,display:"flex",gap:e.spacing(2),minHeight:"100%",flexDirection:"column"}),body:(0,dn.css)({flexGrow:1,display:"flex",gap:e.spacing(1)}),controls:(0,dn.css)({display:"flex",gap:e.spacing(2),alignItems:"flex-end",flexWrap:"wrap"})});class el extends ee{addItem(e){this.setState({items:this.state.items?[...this.state.items,e]:[e]})}setItems(e){this.setState({items:e})}}el.Component=function({model:e}){const{items:t=[]}=e.useState(),n=o().useRef(null);(0,a.useEffect)((()=>{n.current&&n.current.focus()}),[]);const r=e=>e.map((e=>{switch(e.type){case"divider":return o().createElement(ln.Menu.Divider,{key:e.text});case"group":return o().createElement(ln.Menu.Group,{key:e.text,label:e.text},e.subMenu?r(e.subMenu):void 0);default:return o().createElement(ln.Menu.Item,{key:e.text,label:e.text,icon:e.iconClassName,childItems:e.subMenu?r(e.subMenu):void 0,url:e.href,onClick:e.onClick,shortcut:e.shortcut,testId:cn.components.Panels.Panel.menuItems(e.text)})}}));return o().createElement(ln.Menu,{ref:n},r(t))};function tl(e){return e instanceof fu}(class extends ee{}).Component=function({model:e}){const{body:t}=e.useState(),n=e.parent;if(n&&(r=n,!(r instanceof iu))&&!tl(n))throw new Error("SceneGridItem must be a child of SceneGridLayout or SceneGridRow");var r;if(!t)return null;return o().createElement(t.Component,{model:t})};var nl=n(2548),rl=n.n(nl),il=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),al=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ol=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},sl=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},ll=void 0;ll="undefined"!=typeof window?window:"undefined"!=typeof self?self:n.g;var ul=null,cl=null,dl=ll.clearTimeout,hl=ll.setTimeout,pl=ll.cancelAnimationFrame||ll.mozCancelAnimationFrame||ll.webkitCancelAnimationFrame,fl=ll.requestAnimationFrame||ll.mozRequestAnimationFrame||ll.webkitRequestAnimationFrame;function ml(e){var t=void 0,n=void 0,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,l="undefined"!=typeof document&&document.attachEvent;if(!l){o=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},a=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;o(this),this.__resizeRAF__&&ul(this.__resizeRAF__),this.__resizeRAF__=cl((function(){a(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))}};var u=!1,c="";r="animationstart";var d="Webkit Moz O ms".split(" "),h="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),p=document.createElement("fakeelement");if(void 0!==p.style.animationName&&(u=!0),!1===u)for(var f=0;f<d.length;f++)if(void 0!==p.style[d[f]+"AnimationName"]){c="-"+d[f].toLowerCase()+"-",r=h[f],u=!0;break}t="@"+c+"keyframes "+(n="resizeanim")+" { from { opacity: 0; } to { opacity: 0; } } ",i=c+"animation: 1ms "+n+"; "}return{addResizeListener:function(a,u){if(l)a.attachEvent("onresize",u);else{if(!a.__resizeTriggers__){var c=a.ownerDocument,d=ll.getComputedStyle(a);d&&"static"===d.position&&(a.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){var r=(t||"")+".resize-triggers { "+(i||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',a=n.head||n.getElementsByTagName("head")[0],o=n.createElement("style");o.id="detectElementResize",o.type="text/css",null!=e&&o.setAttribute("nonce",e),o.styleSheet?o.styleSheet.cssText=r:o.appendChild(n.createTextNode(r)),a.appendChild(o)}}(c),a.__resizeLast__={},a.__resizeListeners__=[],(a.__resizeTriggers__=c.createElement("div")).className="resize-triggers";var h=c.createElement("div");h.className="expand-trigger",h.appendChild(c.createElement("div"));var p=c.createElement("div");p.className="contract-trigger",a.__resizeTriggers__.appendChild(h),a.__resizeTriggers__.appendChild(p),a.appendChild(a.__resizeTriggers__),o(a),a.addEventListener("scroll",s,!0),r&&(a.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&o(a)},a.__resizeTriggers__.addEventListener(r,a.__resizeTriggers__.__animationListener__))}a.__resizeListeners__.push(u)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}null==pl||null==fl?(ul=dl,cl=function(e){return hl(e,20)}):(ul=function(e){var t=sl(e,2),n=t[0],r=t[1];pl(n),dl(r)},cl=function(e){var t=fl((function(){dl(n),e()})),n=hl((function(){pl(t),e()}),20);return[t,n]});var gl=function(e){function t(){var e,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var i=arguments.length,a=Array(i),o=0;o<i;o++)a[o]=arguments[o];return n=r=ol(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(a))),r.state={height:r.props.defaultHeight||0,width:r.props.defaultWidth||0},r._onResize=function(){var e=r.props,t=e.disableHeight,n=e.disableWidth,i=e.onResize;if(r._parentNode){var a=r._parentNode.offsetHeight||0,o=r._parentNode.offsetWidth||0,s=window.getComputedStyle(r._parentNode)||{},l=parseInt(s.paddingLeft,10)||0,u=parseInt(s.paddingRight,10)||0,c=parseInt(s.paddingTop,10)||0,d=parseInt(s.paddingBottom,10)||0,h=a-c-d,p=o-l-u;(!t&&r.state.height!==h||!n&&r.state.width!==p)&&(r.setState({height:a-c-d,width:o-l-u}),i({height:a,width:o}))}},r._setRef=function(e){r._autoSizer=e},ol(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),il(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._detectElementResize=ml(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.disableHeight,i=e.disableWidth,o=e.style,s=this.state,l=s.height,u=s.width,c={overflow:"visible"},d={},h=!1;return r||(0===l&&(h=!0),c.height=0,d.height=l),i||(0===u&&(h=!0),c.width=0,d.width=u),(0,a.createElement)("div",{className:n,ref:this._setRef,style:al({},c,o)},!h&&t(d))}}]),t}(a.PureComponent);gl.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}};const vl=gl;const yl=function(e){(0,a.useEffect)(e,[])};var bl=Object.defineProperty,wl=Object.getOwnPropertySymbols,Sl=Object.prototype.hasOwnProperty,xl=Object.prototype.propertyIsEnumerable,El=(e,t,n)=>t in e?bl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function _l(){const e=(0,a.useRef)(void 0);return null!=e.current||(e.current=(0,pe.uniqueId)()),e.current}const Ol=o().forwardRef(((e,t)=>{var n=e,{children:r,onLoad:i,onChange:s}=n,l=((e,t)=>{var n={};for(var r in e)Sl.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&wl)for(var r of wl(e))t.indexOf(r)<0&&xl.call(e,r)&&(n[r]=e[r]);return n})(n,["children","onLoad","onChange"]);const u=_l(),[c,d]=(0,a.useState)(!1),[h,p]=(0,a.useState)(!1),f=(0,a.useRef)(null);return(0,a.useImperativeHandle)(t,(()=>f.current)),yl((()=>{Ol.addCallback(u,(e=>{!c&&e.isIntersecting&&(d(!0),null==i||i()),p(e.isIntersecting),null==s||s(e.isIntersecting)}));const e=f.current;return e&&Ol.observer.observe(e),()=>{delete Ol.callbacks[u],e&&Ol.observer.unobserve(e),0===Object.keys(Ol.callbacks).length&&Ol.observer.disconnect()}})),o().createElement("div",((e,t)=>{for(var n in t||(t={}))Sl.call(t,n)&&El(e,n,t[n]);if(wl)for(var n of wl(t))xl.call(t,n)&&El(e,n,t[n]);return e})({id:u,ref:f},l),c&&("function"==typeof r?r({isInView:h}):r))}));Ol.displayName="LazyLoader",Ol.callbacks={},Ol.addCallback=(e,t)=>Ol.callbacks[e]=t,Ol.observer=new IntersectionObserver((e=>{for(const t of e)Ol.callbacks[t.target.id](t)}),{rootMargin:"100px"});var Tl=Object.defineProperty,kl=Object.defineProperties,Cl=Object.getOwnPropertyDescriptors,Al=Object.getOwnPropertySymbols,Dl=Object.prototype.hasOwnProperty,Rl=Object.prototype.propertyIsEnumerable,Il=(e,t,n)=>t in e?Tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pl=(e,t)=>{for(var n in t||(t={}))Dl.call(t,n)&&Il(e,n,t[n]);if(Al)for(var n of Al(t))Rl.call(t,n)&&Il(e,n,t[n]);return e},Nl=(e,t)=>kl(e,Cl(t)),jl=(e,t)=>{var n={};for(var r in e)Dl.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Al)for(var r of Al(e))t.indexOf(r)<0&&Rl.call(e,r)&&(n[r]=e[r]);return n};const Ll=o().forwardRef(((e,t)=>{var n;const r=e,{grid:i,layoutItem:a,index:s,totalCount:l,isLazy:u,style:c,onLoad:d,onChange:h,children:p}=r,f=jl(r,["grid","layoutItem","index","totalCount","isLazy","style","onLoad","onChange","children"]),m=i.getSceneLayoutChild(a.i),g=null==(n=m.getClassName)?void 0:n.call(m),v=o().createElement(m.Component,{model:m,key:m.state.key});return u?o().createElement(Ol,Nl(Pl({},f),{key:m.state.key,"data-griditem-key":m.state.key,className:(0,dn.cx)(g,e.className),style:c,ref:t}),v,p):o().createElement("div",Nl(Pl({},f),{ref:t,key:m.state.key,"data-griditem-key":m.state.key,className:(0,dn.cx)(g,e.className),style:c}),v,p)}));function Ml(e,t,n){e.current?t?e.current.classList.add("react-grid-layout--enable-move-animations"):e.current.classList.remove("react-grid-layout--enable-move-animations"):n||setTimeout((()=>Ml(e,t,!0)),50)}Ll.displayName="GridItemWrapper";const Fl=o().forwardRef(((e,t)=>{var n=jl(e,["handleAxis"]);const r=(0,ln.useStyles2)(Vl);return o().createElement("div",Nl(Pl({ref:t},n),{className:`${r} scene-resize-handle`}),o().createElement("svg",{width:"16px",height:"16px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o().createElement("path",{d:"M21 15L15 21M21 8L8 21",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))}));function Vl(e){return(0,dn.css)({position:"absolute",bottom:0,right:0,zIndex:999,padding:e.spacing(1.5,0,0,1.5),color:e.colors.border.strong,cursor:"se-resize","&:hover":{color:e.colors.text.link},svg:{display:"block"},".react-resizable-hide &":{display:"none"}})}Fl.displayName="ResizeHandle";var $l=Object.defineProperty,Bl=Object.defineProperties,zl=Object.getOwnPropertyDescriptors,Ul=Object.getOwnPropertySymbols,ql=Object.prototype.hasOwnProperty,Hl=Object.prototype.propertyIsEnumerable,Gl=(e,t,n)=>t in e?$l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;function Wl(e,t){const n=t-32,r=Math.max(...e.map((e=>e.h+e.y)))/Math.floor(n/38);return e.map((e=>{return t=((e,t)=>{for(var n in t||(t={}))ql.call(t,n)&&Gl(e,n,t[n]);if(Ul)for(var n of Ul(t))Hl.call(t,n)&&Gl(e,n,t[n]);return e})({},e),n={y:Math.round(e.y/r)||0,h:Math.round(e.h/r)||1},Bl(t,zl(n));var t,n}))}var Ql=Object.defineProperty,Kl=Object.defineProperties,Xl=Object.getOwnPropertyDescriptors,Yl=Object.getOwnPropertySymbols,Jl=Object.prototype.hasOwnProperty,Zl=Object.prototype.propertyIsEnumerable,eu=(e,t,n)=>t in e?Ql(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tu=(e,t)=>{for(var n in t||(t={}))Jl.call(t,n)&&eu(e,n,t[n]);if(Yl)for(var n of Yl(t))Zl.call(t,n)&&eu(e,n,t[n]);return e},nu=(e,t)=>Kl(e,Xl(t));const ru=class extends ee{constructor(e){super(nu(tu({},e),{children:au(e.children)})),this._skipOnLayoutChange=!1,this._oldLayout=[],this._loadOldLayout=!1,this.onLayoutChange=e=>{if(this._skipOnLayoutChange)this._skipOnLayoutChange=!1;else{this._loadOldLayout&&(e=[...this._oldLayout],this._loadOldLayout=!1);for(const r of e){const e=this.getSceneLayoutChild(r.i),i={x:r.x,y:r.y,width:r.w,height:r.h};t=e.state,n=i,(t.x!==n.x||t.y!==n.y||t.width!==n.width||t.height!==n.height)&&e.setState(tu({},i))}var t,n;this.setState({children:au(this.state.children)})}},this.onResizeStop=(e,t,n)=>{this.getSceneLayoutChild(n.i).setState({width:n.w,height:n.h})},this.onDragStart=e=>{this._oldLayout=[...e]},this.onDragStop=(e,t,n)=>{const r=this.getSceneLayoutChild(n.i);e=ou(e);for(let t=0;t<e.length;t++){const n=e[t],r=this.getSceneLayoutChild(n.i),i=r.state;(null==i?void 0:i.x)===n.x&&(null==i?void 0:i.y)===n.y||r.setState({x:n.x,y:n.y})}const i=e.findIndex((e=>e.i===n.i));let a=this.findGridItemSceneParent(e,i-1),o=this.state.children;r instanceof fu&&a instanceof fu&&(this.isRowDropValid(e,n,i)||(this._loadOldLayout=!0),a=this),a!==r.parent&&(o=this.moveChildTo(r,a)),this.setState({children:au(o)}),this._skipOnLayoutChange=!0}}isDraggable(){var e;return null!=(e=this.state.isDraggable)&&e}getDragClass(){return`grid-drag-handle-${this.state.key}`}getDragClassCancel(){return"grid-drag-cancel"}toggleRow(e){var t,n;if(!e.state.isCollapsed)return e.setState({isCollapsed:!0}),void this.setState({});const r=e.state.children;if(0===r.length)return e.setState({isCollapsed:!1}),void this.setState({});const i=e.state.y,a=(null!=(t=r[0].state.y)?t:i)-(i+1);let o=i;for(const e of r){const t=tu({},e.state);t.y=null!=(n=t.y)?n:i,t.y-=a,t.y!==e.state.y&&e.setState(t),o=Math.max(o,Number(t.y)+Number(t.height))}const s=o-i-1;for(const t of this.state.children)if(t.state.y>i&&this.pushChildDown(t,s),tl(t)&&t!==e)for(const e of t.state.children)e.state.y>i&&this.pushChildDown(e,s);e.setState({isCollapsed:!1}),this.setState({})}getSceneLayoutChild(e){for(const t of this.state.children){if(t.state.key===e)return t;if(t instanceof fu)for(const n of t.state.children)if(n.state.key===e)return n}throw new Error("Scene layout child not found for GridItem")}pushChildDown(e,t){e.setState({y:e.state.y+t})}findGridItemSceneParent(e,t){for(let n=t;n>=0;n--){const t=e[n],r=this.getSceneLayoutChild(t.i);if(r instanceof fu)return r.state.isCollapsed?this:r}return this}isRowDropValid(e,t,n){if(e[e.length-1].i===t.i)return!0;const r=this.getSceneLayoutChild(e[n+1].i);return r instanceof fu||r.parent instanceof ru}moveChildTo(e,t){const n=e.parent;let r=this.state.children;const i=e.clone({key:e.state.key});if(n instanceof fu){const a=n.clone();if(a.setState({children:a.state.children.filter((t=>t.state.key!==e.state.key))}),r=r.map((e=>e===n?a:e)),t instanceof fu){const e=t.clone();e.setState({children:[...e.state.children,i]}),r=r.map((n=>n===t?e:n))}else r=[...r,i]}else if(!(t instanceof ru)){r=r.filter((t=>t.state.key!==e.state.key));const n=t.clone();n.setState({children:[...n.state.children,i]}),r=r.map((e=>e===t?n:e))}return r}toGridCell(e){var t,n;const r=e.state;let i=null!=(t=r.x)?t:0,a=null!=(n=r.y)?n:0;const o=Number.isInteger(Number(r.width))?Number(r.width):4,s=Number.isInteger(Number(r.height))?Number(r.height):4;let l=e.state.isDraggable,u=e.state.isResizable;return e instanceof fu&&(l=!!e.state.isCollapsed,u=!1),{i:e.state.key,x:i,y:a,h:s,w:o,isResizable:u,isDraggable:l}}buildGridLayout(e,t){let n=[];for(const e of this.state.children)if(n.push(this.toGridCell(e)),e instanceof fu&&!e.state.isCollapsed)for(const t of e.state.children)n.push(this.toGridCell(t));return n=ou(n),this.state.UNSAFE_fitPanels&&(n=Wl(n,t)),e<768?(this._skipOnLayoutChange=!0,n.map((e=>nu(tu({},e),{w:24})))):(this._skipOnLayoutChange=!1,n)}};let iu=ru;function au(e){return e.forEach((e=>{e instanceof fu&&e.setState({children:au(e.state.children)})})),[...e].sort(((e,t)=>e.state.y-t.state.y||e.state.x-t.state.x))}function ou(e){return[...e].sort(((e,t)=>e.y-t.y||e.x-t.x))}iu.Component=function({model:e}){const{children:t,isLazy:n,isDraggable:r,isResizable:i}=e.useState(),s=(0,a.useRef)(null);return(0,a.useEffect)((()=>{Ml(s,!!r)}),[r]),function(e){if(e.some((e=>void 0===e.state.height||void 0===e.state.width||void 0===e.state.x||void 0===e.state.y)))throw new Error("All children must have a size specified")}(t),o().createElement(vl,null,(({width:t,height:a})=>{if(0===t)return null;const l=e.buildGridLayout(t,a);return o().createElement("div",{ref:s,style:{width:`${t}px`,height:"100%",position:"relative",zIndex:1},className:"react-grid-layout"},o().createElement(rl(),{width:t,isDraggable:r&&t>768,isResizable:null!=i&&i,containerPadding:[0,0],useCSSTransforms:!0,margin:[8,8],cols:24,rowHeight:30,draggableHandle:`.grid-drag-handle-${e.state.key}`,draggableCancel:".grid-drag-cancel",layout:l,onDragStart:e.onDragStart,onDragStop:e.onDragStop,onResizeStop:e.onResizeStop,onLayoutChange:e.onLayoutChange,isBounded:!1,resizeHandle:o().createElement(Fl,null)},l.map(((t,r)=>o().createElement(Ll,{key:t.i,grid:e,layoutItem:t,index:r,isLazy:n,totalCount:l.length})))))}))};var su=Object.defineProperty,lu=Object.defineProperties,uu=Object.getOwnPropertyDescriptors,cu=Object.getOwnPropertySymbols,du=Object.prototype.hasOwnProperty,hu=Object.prototype.propertyIsEnumerable,pu=(e,t,n)=>t in e?su(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class fu extends ee{constructor(e){var t;super((t=((e,t)=>{for(var n in t||(t={}))du.call(t,n)&&pu(e,n,t[n]);if(cu)for(var n of cu(t))hu.call(t,n)&&pu(e,n,t[n]);return e})({children:e.children||[],isCollapsible:e.isCollapsible||!0,title:e.title||""},e),lu(t,uu({x:0,height:1,width:24})))),this.onCollapseToggle=()=>{this.state.isCollapsible&&this.getGridLayout().toggleRow(this)}}getGridLayout(){const e=this.parent;if(!(e&&e instanceof iu))throw new Error("SceneGridRow must be a child of SceneGridLayout");return e}getUrlState(){return{rowc:this.state.isCollapsed?"1":"0"}}updateFromUrl(e){null!=e.rowc&&e.rowc!==this.getUrlState().rowc&&this.onCollapseToggle()}}fu.Component=function({model:e}){const t=(0,ln.useStyles2)(mu),{isCollapsible:n,isCollapsed:r,title:i,actions:a,children:s}=e.useState(),l=e.getGridLayout(),u=l.getDragClass(),c=l.isDraggable(),d=s?s.length:0,h=1===d?"panel":"panels";return o().createElement("div",{className:(0,dn.cx)(t.row,r&&t.rowCollapsed)},o().createElement("div",{className:t.rowTitleAndActionsGroup},o().createElement("button",{onClick:e.onCollapseToggle,className:t.rowTitleButton,"aria-label":r?"Expand row":"Collapse row","data-testid":cn.components.DashboardRow.title(Ct.interpolate(e,i,void 0,"text"))},n&&o().createElement(ln.Icon,{name:r?"angle-right":"angle-down"}),o().createElement("span",{className:t.rowTitle,role:"heading"},Ct.interpolate(e,i,void 0,"text"))),o().createElement("span",{className:(0,dn.cx)(t.panelCount,r&&t.panelCountCollapsed)},"(",d," ",h,")"),a&&o().createElement("div",{className:t.rowActions},o().createElement(a.Component,{model:a}))),c&&r&&o().createElement("div",{className:(0,dn.cx)(t.dragHandle,u)},o().createElement(ln.Icon,{name:"draggabledots"})))};const mu=e=>({row:(0,dn.css)({width:"100%",height:"30px",display:"flex",justifyContent:"space-between",gap:e.spacing(1)}),rowTitleButton:(0,dn.css)({display:"flex",alignItems:"center",cursor:"pointer",background:"transparent",border:"none",gap:e.spacing(1)}),rowCollapsed:(0,dn.css)({borderBottom:`1px solid ${e.colors.border.weak}`}),rowTitle:(0,dn.css)({fontSize:e.typography.h5.fontSize,fontWeight:e.typography.fontWeightMedium}),collapsedInfo:(0,dn.css)({fontSize:e.typography.bodySmall.fontSize,color:e.colors.text.secondary,display:"flex",alignItems:"center",flexGrow:1}),rowTitleAndActionsGroup:(0,dn.css)({display:"flex","&:hover, &:focus-within":{"& > div":{opacity:1}}}),rowActions:(0,dn.css)({display:"flex",opacity:0,transition:"200ms opacity ease-in 200ms","&:hover, &:focus-within":{opacity:1}}),dragHandle:(0,dn.css)({display:"flex",padding:e.spacing(0,1),alignItems:"center",justifyContent:"flex-end",cursor:"move",color:e.colors.text.secondary,"&:hover":{color:e.colors.text.primary}}),panelCount:(0,dn.css)({paddingLeft:e.spacing(2),color:e.colors.text.secondary,fontStyle:"italic",fontSize:e.typography.size.sm,fontWeight:"normal",display:"none",lineHeight:"30px"}),panelCountCollapsed:(0,dn.css)({display:"inline-block"})});(class extends ee{constructor(){super(...arguments),this.onToggle=()=>{this.setState({isCollapsed:!this.state.isCollapsed})},this.onRemove=()=>{const e=this.parent;"body"in e.state&&e.setState({body:void 0})}}}).Component=function({model:e}){const{title:t,isCollapsed:n,canCollapse:r,canRemove:i,body:a,controls:s}=e.useState(),l=(0,ln.useStyles2)(mu),u=(0,ln.useStyles2)(gu),c=(null!=s?s:[]).map((e=>o().createElement(e.Component,{key:e.state.key,model:e})));i&&c.push(o().createElement(ln.ToolbarButton,{icon:"times",variant:"default",onClick:e.onRemove,key:"remove-button","aria-label":"Remove scene"}));return o().createElement("div",{className:u.wrapper},o().createElement("div",{className:(0,dn.cx)(u.row,n&&u.rowCollapsed)},o().createElement("button",{onClick:e.onToggle,className:l.rowTitleButton,"aria-label":n?"Expand scene":"Collapse scene"},r&&o().createElement(ln.Icon,{name:n?"angle-right":"angle-down"}),o().createElement("span",{className:l.rowTitle,role:"heading"},Ct.interpolate(e,t,void 0,"text"))),o().createElement("div",{className:u.actions},c)),!n&&o().createElement(a.Component,{model:a}))};const gu=e=>({wrapper:(0,dn.css)({display:"flex",flexDirection:"column",flexGrow:1,gap:e.spacing(1)}),row:(0,dn.css)({width:"100%",display:"flex",justifyContent:"space-between",gap:e.spacing(1)}),rowCollapsed:(0,dn.css)({borderBottom:`1px solid ${e.colors.border.weak}`,paddingBottom:e.spacing(1)}),actions:(0,dn.css)({display:"flex",alignItems:"center",gap:e.spacing(1),justifyContent:"flex-end",flexGrow:1})});(class extends ee{constructor(){super(...arguments),this._variableDependency=new Rt(this,{statePaths:["text"]})}}).Component=({model:e})=>{const{text:t,fontSize:n=20,align:r="left",key:i,spacing:a}=e.useState(),s=(0,ln.useTheme2)(),l=(0,dn.css)({fontSize:n,display:"flex",flexGrow:1,alignItems:"center",padding:a?s.spacing(a,0):void 0,justifyContent:r});return o().createElement("div",{className:l,"data-testid":i},Ct.interpolate(e,t))};(class extends ee{}).Component=({model:e})=>{const t=e.useState();return o().createElement(ln.ToolbarButton,{onClick:t.onClick,icon:t.icon})};(class extends ee{}).Component=({model:e})=>{const t=e.useState();return o().createElement("div",{style:{display:"flex"}},t.label&&o().createElement(tr,{label:t.label}),o().createElement(ln.Input,{defaultValue:t.value,width:8,onBlur:t=>{e.state.onChange(parseInt(t.currentTarget.value,10))}}))};class vu extends ee{constructor(){super(...arguments),this.onZoom=()=>{const e=Ct.getTimeRange(this),t=function(e,t){const n=e.to.valueOf()-e.from.valueOf(),r=e.to.valueOf()-n/2,i=0===n?3e4:n*t,a=r+i/2,o=r-i/2;return{from:(0,l.toUtc)(o),to:(0,l.toUtc)(a),raw:{from:(0,l.toUtc)(o),to:(0,l.toUtc)(a)}}}(e.state.value,2);e.onTimeRangeChange(t)},this.onChangeFiscalYearStartMonth=e=>{Ct.getTimeRange(this).setState({fiscalYearStartMonth:e})},this.onMoveBackward=()=>{const e=Ct.getTimeRange(this),{state:{value:t}}=e;e.onTimeRangeChange(bu(yu.Backward,t,Date.now()))},this.onMoveForward=()=>{const e=Ct.getTimeRange(this),{state:{value:t}}=e;e.onTimeRangeChange(bu(yu.Forward,t,Date.now()))}}}vu.Component=function({model:e}){const{hidePicker:t,isOnCanvas:n}=e.useState(),r=Ct.getTimeRange(e),i=r.getTimeZone(),a=r.useState();if(t)return null;return o().createElement(ln.TimeRangePicker,{isOnCanvas:null==n||n,value:a.value,onChange:r.onTimeRangeChange,timeZone:i,fiscalYearStartMonth:a.fiscalYearStartMonth,onMoveBackward:e.onMoveBackward,onMoveForward:e.onMoveForward,onZoom:e.onZoom,onChangeTimeZone:r.onTimeZoneChange,onChangeFiscalYearStartMonth:e.onChangeFiscalYearStartMonth})};var yu=(e=>(e[e.Backward=0]="Backward",e[e.Forward=1]="Forward",e))(yu||{});function bu(e,t,n){const r=t.to.valueOf(),i=t.from.valueOf(),a=(r-i)/2;let o,s;0===e?(o=i-a,s=r-a):(o=i+a,s=r+a,s>n&&r<n&&(s=n,o=i));const u=(0,l.toUtc)(o),c=(0,l.toUtc)(s);return{from:u,to:c,raw:{from:u,to:c}}}var wu=Object.defineProperty,Su=Object.defineProperties,xu=Object.getOwnPropertyDescriptors,Eu=Object.getOwnPropertySymbols,_u=Object.prototype.hasOwnProperty,Ou=Object.prototype.propertyIsEnumerable,Tu=(e,t,n)=>t in e?wu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const ku=["5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"];class Cu extends ee{constructor(e){var t,n,r,i,a;super((i=((e,t)=>{for(var n in t||(t={}))_u.call(t,n)&&Tu(e,n,t[n]);if(Eu)for(var n of Eu(t))Ou.call(t,n)&&Tu(e,n,t[n]);return e})({refresh:""},e),a={autoValue:void 0,autoEnabled:null==(t=e.autoEnabled)||t,autoMinInterval:null!=(n=e.autoMinInterval)?n:u.config.minRefreshInterval,intervals:null!=(r=e.intervals)?r:ku},Su(i,xu(a)))),this._urlSync=new Te(this,{keys:["refresh"]}),this.onRefresh=()=>{const e=Ct.getQueryController(this);if(null==e?void 0:e.state.isRunning)return void e.cancelAll();const t=Ct.getTimeRange(this);this._intervalTimer&&clearInterval(this._intervalTimer),t.onRefresh(),this.setupIntervalTimer()},this.onIntervalChanged=e=>{this.setState({refresh:e}),this.setupIntervalTimer()},this.setupAutoTimeRangeListener=()=>Ct.getTimeRange(this).subscribeToState(((e,t)=>{e.from===t.from&&e.to===t.to||this.setupIntervalTimer()})),this.calculateAutoRefreshInterval=()=>{var e;const t=Ct.getTimeRange(this),n=null!=(e=null==window?void 0:window.innerWidth)?e:2e3;return l.rangeUtil.calculateInterval(t.state.value,n,this.state.autoMinInterval)},this.setupIntervalTimer=()=>{var e;const t=Ct.getTimeRange(this),{refresh:n,intervals:r}=this.state;if((this._intervalTimer||""===n)&&clearInterval(this._intervalTimer),""===n)return;if(n!==ln.RefreshPicker.autoOption.value&&r&&!r.includes(n))return;let i;if(null==(e=this._autoTimeRangeListener)||e.unsubscribe(),n===ln.RefreshPicker.autoOption.value){const e=this.calculateAutoRefreshInterval();i=e.intervalMs,this._autoTimeRangeListener=this.setupAutoTimeRangeListener(),e.interval!==this.state.autoValue&&this.setState({autoValue:e.interval})}else i=l.rangeUtil.intervalToMs(n);this._intervalTimer=setInterval((()=>{t.onRefresh()}),i)},this.addActivationHandler((()=>(this.setupIntervalTimer(),()=>{var e;this._intervalTimer&&clearInterval(this._intervalTimer),null==(e=this._autoTimeRangeListener)||e.unsubscribe()})))}getUrlState(){return{refresh:""!==this.state.refresh?this.state.refresh:void 0}}updateFromUrl(e){const t=e.refresh;"string"==typeof t?this.setState({refresh:t}):null==t&&this.setState({refresh:""})}}Cu.Component=function({model:e}){var t;const{refresh:n,intervals:r,autoEnabled:i,autoValue:a,isOnCanvas:s,primary:l,withText:u}=e.useState(),c=function(e){const t=Ct.getQueryController(e);if(!t)return!1;return t.useState().isRunning}(e);let d,h,p=n===(null==(t=ln.RefreshPicker.autoOption)?void 0:t.value)?a:u?"Refresh":void 0;c&&(d="Cancel all queries",u&&(p="Cancel"));u&&(h="96px");return o().createElement(ln.RefreshPicker,{showAutoInterval:i,value:n,intervals:r,tooltip:d,width:h,text:p,onRefresh:e.onRefresh,primary:l,onIntervalChanged:e.onIntervalChanged,isLoading:c,isOnCanvas:null==s||s})};const Au=e=>`${e}-compare`;var Du=Object.defineProperty,Ru=Object.defineProperties,Iu=Object.getOwnPropertyDescriptors,Pu=Object.getOwnPropertySymbols,Nu=Object.prototype.hasOwnProperty,ju=Object.prototype.propertyIsEnumerable,Lu=(e,t,n)=>t in e?Du(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Mu=(e,t)=>{for(var n in t||(t={}))Nu.call(t,n)&&Lu(e,n,t[n]);if(Pu)for(var n of Pu(t))ju.call(t,n)&&Lu(e,n,t[n]);return e},Fu=(e,t)=>Ru(e,Iu(t));const Vu="__previousPeriod",$u="__noPeriod",Bu={label:"Previous period",value:Vu},zu={label:"No comparison",value:$u},Uu=[{label:"Day before",value:"24h"},{label:"Week before",value:"1w"},{label:"Month before",value:"1M"}];(class extends ee{constructor(e){super(Mu({compareOptions:Uu},e)),this._urlSync=new Te(this,{keys:["compareWith"]}),this._onActivate=()=>{const e=Ct.getTimeRange(this);this.setState({compareOptions:this.getCompareOptions(e.state.value)}),this._subs.add(e.subscribeToState((e=>{const t=this.getCompareOptions(e.value),n={compareOptions:t};Boolean(this.state.compareWith)&&!t.find((({value:e})=>e===this.state.compareWith))&&(n.compareWith=Vu),this.setState(n)})))},this.getCompareOptions=e=>{const t=Math.ceil(e.to.diff(e.from)),n=Uu.findIndex((({value:e})=>l.rangeUtil.intervalToMs(e)>=t));return[zu,Bu,...Uu.slice(n).map((({label:e,value:t})=>({label:e,value:t})))]},this.onCompareWithChanged=e=>{e===$u?this.onClearCompare():this.setState({compareWith:e})},this.onClearCompare=()=>{this.setState({compareWith:void 0})},this.addActivationHandler(this._onActivate)}getExtraQueries(e){const t=[],n=this.getCompareTimeRange(e.range);if(!n)return t;const r=e.targets.filter((e=>!1!==e.timeRangeCompare));return r.length&&t.push({req:Fu(Mu({},e),{targets:r,range:n}),processor:qu}),t}shouldRerun(e,t){return e.compareWith!==t.compareWith}getCompareTimeRange(e){let t,n;if(this.state.compareWith){if(this.state.compareWith===Vu){const r=e.to.diff(e.from);t=(0,l.dateTime)(e.from).subtract(r),n=(0,l.dateTime)(e.to).subtract(r)}else t=(0,l.dateTime)(e.from).subtract(l.rangeUtil.intervalToMs(this.state.compareWith)),n=(0,l.dateTime)(e.to).subtract(l.rangeUtil.intervalToMs(this.state.compareWith));return{from:t,to:n,raw:{from:t,to:n}}}}getUrlState(){return{compareWith:this.state.compareWith}}updateFromUrl(e){if(!e.compareWith)return;const t=Ce(e.compareWith);if(t){this.getCompareOptions(Ct.getTimeRange(this).state.value).find((({value:e})=>e===t))?this.setState({compareWith:t}):this.setState({compareWith:"__previousPeriod"})}}}).Component=function({model:e}){var t;const n=(0,ln.useStyles2)(Hu),{compareWith:r,compareOptions:i}=e.useState(),[a,s]=o().useState(r),l=null!=(t=i.find((({value:e})=>e===a)))?t:Bu,u=i.find((({value:e})=>e===r)),c=Boolean(u),d=()=>{c?(s(r),e.onClearCompare()):c||e.onCompareWithChanged(l.value)};return o().createElement(ln.ButtonGroup,null,o().createElement(ln.ToolbarButton,{variant:"canvas",tooltip:"Enable time frame comparison",onClick:e=>{e.stopPropagation(),e.preventDefault(),d()}},o().createElement(ln.Checkbox,{label:" ",value:c,onClick:d}),"Comparison"),c?o().createElement(ln.ButtonSelect,{variant:"canvas",value:u,options:i,onChange:t=>{e.onCompareWithChanged(t.value)}}):o().createElement(ln.ToolbarButton,{className:n.previewButton,disabled:!0,variant:"canvas",isOpen:!1},l.label))};const qu=(e,t)=>{const n=t.timeRange.from.diff(e.timeRange.from);return t.series.forEach((e=>{e.refId=Au(e.refId||""),e.meta=Fu(Mu({},e.meta),{timeCompare:{diffMs:n,isTimeShiftQuery:!0}}),e.fields.forEach((e=>(e.type===l.FieldType.time&&(e.values=e.values.map((e=>n<0?e-n:e+n))),e.config=Fu(Mu({},e.config),{color:{mode:"fixed",fixedColor:u.config.theme.palette.gray60}}),e)))})),(0,T.of)(t)};function Hu(e){return{previewButton:(0,dn.css)({"&:disabled":{border:`1px solid ${e.colors.secondary.border}`,color:e.colors.text.disabled,opacity:1}})}}(class extends ee{constructor(e){super(e),this.addActivationHandler((()=>{const e=Ct.getData(this);this._subs.add(e.subscribeToState((e=>{var t;(null==(t=e.data)?void 0:t.state)===l.LoadingState.Done&&this.performRepeat(e.data)}))),e.state.data&&this.performRepeat(e.state.data)}))}performRepeat(e){const t=[];for(let n=0;n<e.series.length;n++){const r=this.state.getLayoutChild(e,e.series[n],n);t.push(r)}this.state.body.setState({children:t})}}).Component=({model:e})=>{const{body:t}=e.useState();return o().createElement(t.Component,{model:t})};(class extends ee{constructor(e){super(e),this._variableDependency=new Rt(this,{variableNames:[this.state.variableName],onVariableUpdateCompleted:()=>this.performRepeat()}),this.addActivationHandler((()=>this.performRepeat()))}performRepeat(){if(this._variableDependency.hasDependencyInLoadingState())return;const e=Ct.lookupVariable(this.state.variableName,this);if(!(e instanceof an))return void console.error("SceneByVariableRepeater: variable is not a MultiValueVariable");const t=function(e){const{value:t,text:n,options:r}=e.state;if(e.hasAllValue())return r;if(Array.isArray(t)&&Array.isArray(n))return t.map(((e,t)=>({value:e,label:n[t]})));return[{value:t,label:n}]}(e),n=[];for(const e of t){const t=this.state.getLayoutChild(e);n.push(t)}this.state.body.setState({children:n})}}).Component=({model:e})=>{const{body:t}=e.useState();return o().createElement(t.Component,{model:t})};const Gu=class extends ee{constructor(){super({})}get Component(){return Gu.Component}};Gu.Component=e=>o().createElement("div",{style:{flexGrow:1}});class Wu extends ee{toggleDirection(){this.setState({direction:"row"===this.state.direction?"column":"row"})}isDraggable(){return!1}}Wu.Component=function({model:e,parentState:t}){const{children:n,isHidden:r}=e.useState(),i=function(e,t){return(0,a.useMemo)((()=>{var n,r,i,a,o,s,l,c,d,h;const{direction:p="row",wrap:f}=e,m=u.config.theme2,g={};return t?Ku(g,e,t):(g.display="flex",g.flexGrow=1,g.minWidth=e.minWidth,g.minHeight=e.minHeight),g.flexDirection=p,g.gap="8px",g.flexWrap=f||"nowrap",g.alignContent="baseline",g.minWidth=g.minWidth||0,g.minHeight=g.minHeight||0,g[m.breakpoints.down("md")]={flexDirection:null!=(r=null==(n=e.md)?void 0:n.direction)?r:"column",maxWidth:null!=(a=null==(i=e.md)?void 0:i.maxWidth)?a:"unset",maxHeight:null!=(s=null==(o=e.md)?void 0:o.maxHeight)?s:"unset",height:null!=(c=null==(l=e.md)?void 0:l.height)?c:"unset",width:null!=(h=null==(d=e.md)?void 0:d.width)?h:"unset"},(0,dn.css)(g)}),[t,e])}(e.state,t);if(r)return null;return o().createElement("div",{className:i},n.map((t=>{const n=t.Component;return o().createElement(n,{key:t.state.key,model:t,parentState:e.state})})))};class Qu extends ee{}function Ku(e,t,n){var r,i,a;const o=null!=(r=n.direction)?r:"row",{xSizing:s="fill",ySizing:l="fill"}=t;return e.display="flex",e.position="relative",e.flexDirection=o,"column"===o?(t.height?e.height=t.height:e.flexGrow="fill"===l?1:0,t.width?e.width=t.width:e.alignSelf="fill"===s?"stretch":"flex-start"):(t.height?e.height=t.height:e.alignSelf="fill"===l?"stretch":"flex-start",t.width?e.width=t.width:e.flexGrow="fill"===s?1:0),e.minWidth=t.minWidth,e.maxWidth=t.maxWidth,e.maxHeight=t.maxHeight,e.minHeight=null!=(i=t.minHeight)?i:n.minHeight,e.height=null!=(a=t.height)?a:n.height,e}Qu.Component=function({model:e,parentState:t}){if(!t)throw new Error("SceneFlexItem must be a child of SceneFlexLayout");const{body:n,isHidden:r}=e.useState(),i=function(e,t){return(0,a.useMemo)((()=>{var n,r,i,a,o,s,l,c,d,h;const p=u.config.theme2,f=Ku({},e,t);return f[p.breakpoints.down("md")]={maxWidth:null!=(r=null==(n=e.md)?void 0:n.maxWidth)?r:"unset",maxHeight:null!=(a=null==(i=e.md)?void 0:i.maxHeight)?a:"unset",height:null!=(l=null==(o=e.md)?void 0:o.height)?l:null==(s=t.md)?void 0:s.height,width:null!=(h=null==(c=e.md)?void 0:c.width)?h:null==(d=t.md)?void 0:d.width},(0,dn.css)(f)}),[e,t])}(e.state,t);if(!n||r)return null;return o().createElement("div",{className:i},o().createElement(n.Component,{model:n}))};var Xu=Object.defineProperty,Yu=Object.getOwnPropertySymbols,Ju=Object.prototype.hasOwnProperty,Zu=Object.prototype.propertyIsEnumerable,ec=(e,t,n)=>t in e?Xu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class tc extends ee{constructor(e){var t,n;super(((e,t)=>{for(var n in t||(t={}))Ju.call(t,n)&&ec(e,n,t[n]);if(Yu)for(var n of Yu(t))Zu.call(t,n)&&ec(e,n,t[n]);return e})({rowGap:1,columnGap:1,templateColumns:"repeat(auto-fit, minmax(400px, 1fr))",autoRows:null!=(t=e.autoRows)?t:"320px",children:null!=(n=e.children)?n:[]},e))}isDraggable(){return!1}}tc.Component=function({model:e}){const{children:t,isHidden:n,isLazy:r}=e.useState(),i=(s=e.state,(0,a.useMemo)((()=>{var e,t,n,r,i,a,o,l,c,d,h;const p={},f=u.config.theme2;return p.display="grid",p.gridTemplateColumns=s.templateColumns,p.gridTemplateRows=s.templateRows||"unset",p.gridAutoRows=s.autoRows||"unset",p.rowGap=f.spacing(null!=(e=s.rowGap)?e:1),p.columnGap=f.spacing(null!=(t=s.columnGap)?t:1),p.justifyItems=s.justifyItems||"unset",p.alignItems=s.alignItems||"unset",p.justifyContent=s.justifyContent||"unset",p.flexGrow=1,s.md&&(p[f.breakpoints.down("md")]={gridTemplateRows:null==(n=s.md)?void 0:n.templateRows,gridTemplateColumns:null==(r=s.md)?void 0:r.templateColumns,rowGap:s.md.rowGap?f.spacing(null!=(a=null==(i=s.md)?void 0:i.rowGap)?a:1):void 0,columnGap:s.md.columnGap?f.spacing(null!=(l=null==(o=s.md)?void 0:o.rowGap)?l:1):void 0,justifyItems:null==(c=s.md)?void 0:c.justifyItems,alignItems:null==(d=s.md)?void 0:d.alignItems,justifyContent:null==(h=s.md)?void 0:h.justifyContent}),(0,dn.css)(p)}),[s]));var s;if(n)return null;return o().createElement("div",{className:i},t.map((t=>{const n=t.Component;return r?o().createElement(Ol,{key:t.state.key,className:i},o().createElement(n,{key:t.state.key,model:t,parentState:e.state})):o().createElement(n,{key:t.state.key,model:t,parentState:e.state})})))};class nc extends ee{}nc.Component=function({model:e,parentState:t}){if(!t)throw new Error("SceneCSSGridItem must be a child of SceneCSSGridLayout");const{body:n,isHidden:r}=e.useState(),i=(s=e.state,(0,a.useMemo)((()=>{const e={};return e.gridColumn=s.gridColumn||"unset",e.gridRow=s.gridRow||"unset",e.position="relative",(0,dn.css)(e)}),[s]));var s;if(!n||r)return null;return o().createElement("div",{className:i},o().createElement(n.Component,{model:n}))};var rc=Object.defineProperty,ic=Object.getOwnPropertySymbols,ac=Object.prototype.hasOwnProperty,oc=Object.prototype.propertyIsEnumerable,sc=(e,t,n)=>t in e?rc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,lc=(e,t)=>{for(var n in t||(t={}))ac.call(t,n)&&sc(e,n,t[n]);if(ic)for(var n of ic(t))oc.call(t,n)&&sc(e,n,t[n]);return e};const uc=.3,cc=new Set(["ArrowUp","ArrowDown"]),dc=new Set(["ArrowLeft","ArrowRight"]),hc={row:{dim:"width",axis:"clientX",min:"minWidth",max:"maxWidth"},column:{dim:"height",axis:"clientY",min:"minHeight",max:"maxHeight"}};function pc({direction:e="row",handleSize:t=32,initialSize:n="auto",primaryPaneStyles:r,secondaryPaneStyles:i,onDragFinished:s,children:l}){const u=o().Children.toArray(l),c=(0,a.useRef)(null),d=(0,a.useRef)(null),h=(0,a.useRef)(null),p=(0,a.useRef)(null),f=(0,a.useRef)(null),m=(0,a.useRef)("1fr"),g=(0,a.useRef)(void 0),v=(0,a.useRef)(void 0),y=hc[e].dim,b=hc[e].axis,w=hc[e].min,S=hc[e].max;!function(e,t,n=0,r){const i=(0,pe.throttle)(t,n);(0,a.useLayoutEffect)((()=>{if(!e)return;const t=new ResizeObserver(i);return t.observe(e,{box:"device-pixel-content-box"}),()=>t.disconnect()}),r)}(p.current,(e=>{for(const t of e){if(!t.target.isSameNode(p.current))return;const e=d.current.getBoundingClientRect()[y],n=mc(d.current);c.current.ariaValueNow=`${(0,pe.clamp)((e-n[w])/(n[S]-n[w])*100,0,100)}`}}),500,[S,w,e,y]);const x=(0,a.useRef)(null),E=(0,a.useCallback)((e=>{m.current=d.current.getBoundingClientRect()[y],f.current=p.current.getBoundingClientRect()[y],x.current=e[b],c.current.setPointerCapture(e.pointerId),g.current=mc(d.current),v.current=void 0}),[y,b]),_=(0,a.useCallback)((e=>{if(null!==x.current&&"1fr"!==m.current){const n=e[b]-x.current,r=g.current,i=(0,pe.clamp)(m.current+n,r[w],r[S]),a=i/(f.current-t);d.current.style.flexGrow=`${a}`,h.current.style.flexGrow=""+(1-a);const o=(0,pe.clamp)((i-r[w])/(r[S]-r[w])*100,0,100);c.current.ariaValueNow=`${o}`}}),[t,b,w,S]),O=(0,a.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),c.current.releasePointerCapture(e.pointerId),x.current=null,null==s||s(parseFloat(d.current.style.flexGrow))}),[s]),T=(0,a.useRef)(new Set),k=(0,a.useRef)(null),C=(0,a.useCallback)((n=>{var r;if(0===T.current.size)return void(k.current=null);if("1fr"===m.current)return;const i=(n-(null!=(r=k.current)?r:n))*uc;let a=0;"row"===e?(T.current.has("ArrowLeft")&&(a-=i),T.current.has("ArrowRight")&&(a+=i)):(T.current.has("ArrowUp")&&(a-=i),T.current.has("ArrowDown")&&(a+=i));const o=g.current,s=d.current.getBoundingClientRect()[y],l=(0,pe.clamp)(s+a,o[w],o[S]),u=l/(f.current-t);d.current.style.flexGrow=`${u}`,h.current.style.flexGrow=""+(1-u);const p=(l-o[w])/(o[S]-o[w])*100;c.current.ariaValueNow=`${(0,pe.clamp)(p,0,100)}`,k.current=n,window.requestAnimationFrame(C)}),[e,t,w,S,y]),A=(0,a.useCallback)((n=>{if("Enter"===n.key)return void(void 0===v.current?(v.current=d.current.style.flexGrow,d.current.style.flexGrow="0",h.current.style.flexGrow="1"):(d.current.style.flexGrow=v.current,h.current.style.flexGrow=""+(1-parseFloat(v.current)),v.current=void 0));if("Home"===n.key){g.current=mc(d.current),f.current=p.current.getBoundingClientRect()[y];const e=g.current[w]/(f.current-t);return d.current.style.flexGrow=`${e}`,h.current.style.flexGrow=""+(1-e),void(c.current.ariaValueNow="0")}if("End"===n.key){g.current=mc(d.current),f.current=p.current.getBoundingClientRect()[y];const e=g.current[S]/(f.current-t);return d.current.style.flexGrow=`${e}`,h.current.style.flexGrow=""+(1-e),void(c.current.ariaValueNow="100")}if(!("column"===e&&cc.has(n.key)||"row"===e&&dc.has(n.key))||T.current.has(n.key))return;v.current=void 0,n.preventDefault(),n.stopPropagation(),m.current=d.current.getBoundingClientRect()[y],f.current=p.current.getBoundingClientRect()[y],g.current=mc(d.current);if(!T.current.has(n.key)){const e=0===T.current.size;T.current.add(n.key),e&&window.requestAnimationFrame(C)}}),[e,C,t,S,y,w]),D=(0,a.useCallback)((t=>{"row"===e&&!dc.has(t.key)||"column"===e&&!cc.has(t.key)||(T.current.delete(t.key),null==s||s(parseFloat(d.current.style.flexGrow)))}),[e,s]),R=(0,a.useCallback)((()=>{d.current.style.flexGrow="0.5",h.current.style.flexGrow="0.5";const e=mc(d.current);g.current=e,m.current=d.current.getBoundingClientRect()[y],c.current.ariaValueNow=""+(m.current-e[w])/(e[S]-e[w])*100}),[S,y,w]),I=(0,a.useCallback)((()=>{T.current.size>0&&(T.current.clear(),x.current=null,null==s||s(parseFloat(d.current.style.flexGrow)))}),[s]),P=(0,ln.useStyles2)(fc),N=_l(),j=2===u.length?"visible":"hidden";return o().createElement("div",{ref:p,className:P.container,style:{flexDirection:e}},o().createElement("div",{ref:d,className:P.panel,style:lc({flexGrow:"auto"===n?.5:(0,pe.clamp)(n,0,1),[w]:"min-content"},r),id:`start-panel-${N}`},u[0]),u[1]&&o().createElement(o().Fragment,null,o().createElement("div",{ref:c,style:{[y]:`${t}px`},className:(0,dn.cx)(P.handle,{[P.handleHorizontal]:"column"===e}),onPointerUp:O,onPointerDown:E,onPointerMove:_,onKeyDown:A,onKeyUp:D,onDoubleClick:R,onBlur:I,role:"separator","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":50,"aria-controls":`start-panel-${N}`,"aria-label":"Pane resize widget",tabIndex:0}),o().createElement("div",{ref:h,className:P.panel,style:lc({flexGrow:"auto"===n?.5:(0,pe.clamp)(1-n,0,1),[w]:"min-content",visibility:`${j}`},i),id:`end-panel-${N}`},u[1])))}function fc(e){return{handle:(0,dn.css)({cursor:"col-resize",position:"relative",flexShrink:0,userSelect:"none","&::before":{content:'""',position:"absolute",backgroundColor:e.colors.primary.main,left:"50%",transform:"translate(-50%)",top:0,height:"100%",width:"1px",opacity:0,transition:"opacity ease-in-out 0.2s"},"&::after":{content:'""',width:"4px",borderRadius:"4px",backgroundColor:e.colors.border.weak,transition:"background-color ease-in-out 0.2s",height:"50%",top:"calc(50% - (50%) / 2)",transform:"translateX(-50%)",position:"absolute",left:"50%"},"&:hover, &:focus-visible":{outline:"none","&::before":{opacity:1},"&::after":{backgroundColor:e.colors.primary.main}}}),handleHorizontal:(0,dn.css)({cursor:"row-resize","&::before":{left:"inherit",transform:"translateY(-50%)",top:"50%",height:"1px",width:"100%"},"&::after":{width:"50%",height:"4px",top:"50%",transform:"translateY(-50%)",left:"calc(50% - (50%) / 2)"}}),container:(0,dn.css)({display:"flex",width:"100%",flexGrow:1,overflow:"hidden"}),panel:(0,dn.css)({display:"flex",position:"relative",flexBasis:0})}}function mc(e){if(null===e)return;const t=document.body.style.overflow,n=e.style.width,r=e.style.height,i=e.style.flexGrow;document.body.style.overflow="hidden",e.style.flexGrow="0";const{width:a,height:o}=e.getBoundingClientRect();e.style.flexGrow="100";const{width:s,height:l}=e.getBoundingClientRect();return document.body.style.overflow=t,e.style.width=n,e.style.height=r,e.style.flexGrow=i,{minWidth:a,maxWidth:s,minHeight:o,maxHeight:l}}class gc extends ee{toggleDirection(){this.setState({direction:"row"===this.state.direction?"column":"row"})}isDraggable(){return!1}}gc.Component=function({model:e}){const{primary:t,secondary:n,direction:r,isHidden:i,initialSize:a,primaryPaneStyles:s,secondaryPaneStyles:l}=e.useState();if(i)return null;const u=t.Component,c=null==n?void 0:n.Component;let d=n?a:1;return o().createElement(pc,{direction:r,initialSize:null!=d?d:.5,primaryPaneStyles:s,secondaryPaneStyles:l},o().createElement(u,{key:t.state.key,model:t,parentState:e.state}),c&&n&&o().createElement(c,{key:n.state.key,model:n,parentState:e.state}))};var vc=n(8398);new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);try{window.__reactRouterVersion="6"}catch(e){}new Map;a.startTransition,vc.flushSync,a.useId;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;var yc,bc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(yc||(yc={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(bc||(bc={}));(class extends ee{enrichDataRequest(){return{app:this.state.name||"app"}}}).Component=({model:e})=>{const{pages:t}=e.useState();return o().createElement(i.Switch,null,t.map((e=>o().createElement(s.Route,{key:e.state.url,exact:!1,path:e.state.url,render:t=>v(e,t)}))))};var wc=Object.defineProperty,Sc=Object.getOwnPropertySymbols,xc=Object.prototype.hasOwnProperty,Ec=Object.prototype.propertyIsEnumerable,_c=(e,t,n)=>t in e?wc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class Oc extends ee{}function Tc({node:e}){const t=e.useState(),n=(0,ln.useStyles2)(kc);return o().createElement("div",{className:n.container},Object.keys(t).map((r=>o().createElement("div",{className:n.row,key:r},o().createElement("div",{className:n.keyName},r),o().createElement("div",{className:n.value},function(e,t,n){if(null===t)return"null";switch(typeof t){case"number":return o().createElement(ln.Input,{type:"number",defaultValue:t,onBlur:t=>n.setState({[e]:t.currentTarget.valueAsNumber})});case"string":return o().createElement(ln.Input,{type:"text",defaultValue:t,onBlur:t=>n.setState({[e]:t.currentTarget.value})});case"object":return st(t)?t.constructor.name:(0,pe.isPlainObject)(t)||(0,pe.isArray)(t)?o().createElement(ln.JSONFormatter,{json:t,open:0}):String(t);default:return typeof t}}(r,t[r],e))))))}function kc(e){return{container:(0,dn.css)({flexGrow:1,display:"flex",gap:e.spacing(.5),flexDirection:"column"}),row:(0,dn.css)({display:"flex",gap:e.spacing(2)}),keyName:(0,dn.css)({display:"flex",flexGrow:"0",width:120,alignItems:"center",height:e.spacing(e.components.height.md)}),value:(0,dn.css)({flexGrow:1,minHeight:e.spacing(e.components.height.md),display:"flex",alignItems:"center"})}}function Cc({node:e,selectedObject:t,onSelect:n}){const r=(0,ln.useStyles2)(Ac),i=[],a=e===t;return e.forEachChild((e=>{i.push(o().createElement(Cc,{node:e,key:e.state.key,selectedObject:t,onSelect:n}))})),o().createElement("div",{className:r.container},o().createElement("div",{className:(0,dn.cx)(r.name,a&&r.selected),onClick:()=>n(e)},e.constructor.name),o().createElement("div",{className:r.children},i))}function Ac(e){return{container:(0,dn.css)({flexGrow:1,display:"flex",gap:e.spacing(.5),flexDirection:"column"}),name:(0,dn.css)({flexGrow:1,display:"flex",gap:e.spacing(1),fontSize:e.typography.bodySmall.fontSize,cursor:"pointer",padding:e.spacing(0,1),borderRadius:e.shape.borderRadius(2),position:"relative","&:hover":{background:e.colors.background.secondary}}),selected:(0,dn.css)({"&::before":{display:"block",content:"' '",position:"absolute",left:0,width:4,bottom:2,top:2,borderRadius:e.shape.radius.default,backgroundImage:e.colors.gradients.brandVertical}}),children:(0,dn.css)({flexGrow:1,display:"flex",flexDirection:"column",paddingLeft:e.spacing(1)})}}function Dc({scene:e}){const t=(0,ln.useStyles2)(Rc),[n,r]=(0,a.useState)(!1),[i,s]=(0,a.useState)();return o().createElement(o().Fragment,null,o().createElement(ln.ToolbarButton,{variant:"canvas",icon:"bug",onClick:()=>r(!0)}),n&&o().createElement(ln.Drawer,{title:"Scene debugger",onClose:()=>r(!1),size:"lg"},o().createElement("div",{className:t.panes},o().createElement("div",{className:t.pane1},o().createElement("div",{className:t.paneHeading},"Scene graph"),o().createElement(ln.CustomScrollbar,{autoHeightMin:"100%"},o().createElement("div",{className:t.treeWrapper},o().createElement(Cc,{node:e,selectedObject:i,onSelect:s})))),o().createElement("div",{className:t.pane2},o().createElement("div",{className:t.paneHeading},"Object details"),i&&o().createElement(Tc,{node:i})))))}function Rc(e){return{panes:(0,dn.css)({flexGrow:1,display:"flex",height:"100%",flexDirection:"row",marginTop:e.spacing(-2)}),pane1:(0,dn.css)({flexGrow:0,display:"flex",height:"100%",flexDirection:"column",borderRight:`1px solid ${e.colors.border.weak}`}),pane2:(0,dn.css)({flexGrow:1,display:"flex",minHeight:"100%",flexDirection:"column",paddingLeft:e.spacing(2)}),treeWrapper:(0,dn.css)({paddingRight:e.spacing(2),height:"100%",marginLeft:e.spacing(-1)}),paneHeading:(0,dn.css)({padding:e.spacing(1,0),fontWeight:e.typography.fontWeightMedium})}}function Ic({page:e,routeProps:t}){const n=function(e){if(e.parent instanceof jc)return e.parent;return e}(e),r=n.useState(),i=function(){const e=(0,s.useLocation)();return(0,u.locationSearchToObject)(e.search||"")}(),l=e.getScene(t.match),c=r.initializedScene===l;if((0,a.useLayoutEffect)((()=>{c||n.initializeScene(l)}),[l,n,c]),(0,a.useEffect)((()=>()=>n.setState({initializedScene:void 0})),[n]),!c)return null;const d={text:r.title,img:r.titleImg,icon:r.titleIcon,url:g(r.url,r.preserveUrlKeys),hideFromBreadcrumbs:r.hideFromBreadcrumbs,parentItem:Pc(r.getParentPage?r.getParentPage():n.parent)};r.tabs&&(d.children=r.tabs.map((t=>({text:t.state.title,icon:t.state.titleIcon,tabSuffix:t.state.tabSuffix,active:e===t,url:g(t.state.url,t.state.preserveUrlKeys),parentItem:d}))));let h=[];return r.controls&&(h=r.controls.map((e=>o().createElement(e.Component,{model:e,key:e.state.key})))),i["scene-debugger"]&&h.push(o().createElement(Dc,{scene:n,key:"scene-debugger"})),o().createElement(u.PluginPage,{pageNav:d,actions:h,renderTitle:r.renderTitle,subTitle:r.subTitle},o().createElement(l.Component,{model:l}))}function Pc(e,t){if(e instanceof jc)return{text:e.state.title,url:g(e.state.url,e.state.preserveUrlKeys),hideFromBreadcrumbs:e.state.hideFromBreadcrumbs,parentItem:Pc(e.state.getParentPage?e.state.getParentPage():e.parent)}}function Nc({drilldown:e,parent:t,routeProps:n}){return v(t.getDrilldownPage(e,n.match),n)}Oc.Component=({model:e})=>{const{component:t,props:n,reactNode:r}=e.useState();return t?o().createElement(t,((e,t)=>{for(var n in t||(t={}))xc.call(t,n)&&_c(e,n,t[n]);if(Sc)for(var n of Sc(t))Ec.call(t,n)&&_c(e,n,t[n]);return e})({},n)):r||null};class jc extends ee{constructor(e){super(e),this._sceneCache=new Map,this._drilldownCache=new Map,this.addActivationHandler((()=>()=>Ys().cleanUp(this)))}initializeScene(e){this.setState({initializedScene:e}),Ys().initSync(this)}getScene(e){let t=this._sceneCache.get(e.url);if(t)return t;if(!this.state.getScene)throw new Error("Missing getScene on SceneAppPage "+this.state.title);return t=this.state.getScene(e),this._sceneCache.set(e.url,t),t}getDrilldownPage(e,t){let n=this._drilldownCache.get(t.url);return n||(n=e.getPage(t,this),this._drilldownCache.set(t.url,n),n)}enrichDataRequest(e){if(this.state.getParentPage)return this.state.getParentPage().enrichDataRequest(e);if(!this.parent)return null;const t=this.getRoot();return lt(t)?t.enrichDataRequest(e):null}}jc.Component=function({model:e,routeProps:t}){var n,r;const{tabs:a,drilldowns:l}=e.useState(),u=[];if(a&&a.length>0)for(let t=0;t<a.length;t++){const i=a[t];if(0===t&&u.push(o().createElement(s.Route,{exact:!0,key:e.state.url,path:null!=(n=e.state.routePath)?n:e.state.url,render:e=>v(i,e)})),u.push(o().createElement(s.Route,{exact:!0,key:i.state.url,path:null!=(r=i.state.routePath)?r:i.state.url,render:e=>v(i,e)})),i.state.drilldowns)for(const e of i.state.drilldowns)u.push(o().createElement(s.Route,{exact:!1,key:e.routePath,path:e.routePath,render:t=>o().createElement(Nc,{drilldown:e,parent:i,routeProps:t})}))}if(l)for(const t of l)u.push(o().createElement(s.Route,{key:t.routePath,exact:!1,path:t.routePath,render:n=>o().createElement(Nc,{drilldown:t,parent:e,routeProps:n})}));if(!a&&function(e,t){if(!t.isExact)return!1;if(t.url===e.state.url)return!0;if(e.parent instanceof jc&&e.parent.state.tabs[0]===e&&e.parent.state.url===t.url)return!0;return!1}(e,t.match))return o().createElement(Ic,{page:e,routeProps:t});return u.push(function(e,t){return o().createElement(s.Route,{key:"fallback route",render:n=>{var r,i,a;const s=null!=(a=null==(i=(r=e.state).getFallbackPage)?void 0:i.call(r))?a:new jc({url:"",title:"Not found",subTitle:"The url did not match any page",getScene:()=>new Js({body:new Wu({direction:"column",children:[new Qu({body:new Oc({component:()=>o().createElement("div",{"data-testid":"default-fallback-content"},"If you found your way here using a link then there might be a bug in this application.")})})]})})});return o().createElement(Ic,{page:s,routeProps:t})}})}(e,t)),o().createElement(i.Switch,null,u)};var Lc=(e=>(e.Always="always",e.Auto="auto",e.Never="never",e))(Lc||{}),Mc=(e=>(e.Hue="hue",e.None="none",e.Opacity="opacity",e.Scheme="scheme",e))(Mc||{}),Fc=(e=>(e.None="none",e.Normal="normal",e.Percent="percent",e))(Fc||{}),Vc=(e=>(e.Auto="auto",e.Horizontal="horizontal",e.Vertical="vertical",e))(Vc||{}),$c=(e=>(e.Background="background",e.BackgroundSolid="background_solid",e.None="none",e.Value="value",e))($c||{}),Bc=(e=>(e.Area="area",e.Line="line",e.None="none",e))(Bc||{}),zc=(e=>(e.Auto="auto",e.Center="center",e))(zc||{}),Uc=(e=>(e.Auto="auto",e.Name="name",e.None="none",e.Value="value",e.ValueAndName="value_and_name",e))(Uc||{}),qc=(e=>(e.Inverted="inverted",e.SameAsValue="same_as_value",e.Standard="standard",e))(qc||{}),Hc=(e=>(e.Multi="multi",e.None="none",e.Single="single",e))(Hc||{}),Gc=(e=>(e.Basic="basic",e.Gradient="gradient",e.Lcd="lcd",e))(Gc||{}),Wc=(e=>(e.Color="color",e.Hidden="hidden",e.Text="text",e))(Wc||{}),Qc=(e=>(e.Auto="auto",e.Hidden="hidden",e.Left="left",e.Top="top",e))(Qc||{}),Kc=(e=>(e.Auto="auto",e.Manual="manual",e))(Kc||{}),Xc=(e=>(e.Auto="auto",e.Lg="lg",e.Md="md",e.Sm="sm",e))(Xc||{});const Yc={barRadius:0,barWidth:.97,fullHighlight:!1,groupWidth:.7,orientation:Vc.Auto,showValue:Lc.Auto,stacking:Fc.None,xTickLabelRotation:0,xTickLabelSpacing:0},Jc={fillOpacity:80,gradientMode:Mc.None,lineWidth:1},Zc={displayMode:Gc.Gradient,maxVizHeight:300,minVizHeight:16,minVizWidth:8,namePlacement:Qc.Auto,showUnfilled:!0,sizing:Kc.Auto,valueMode:Wc.Color},ed={selectedSeries:0},td={minVizHeight:75,minVizWidth:75,showThresholdLabels:!1,showThresholdMarkers:!0,sizing:Kc.Auto},nd={layers:[]};const rd={calculate:!1,cellGap:1,cellValues:{},color:{scheme:"Oranges",fill:"dark-orange",reverse:!1,exponent:.5,steps:64},exemplars:{color:"rgba(255,0,255,0.7)"},filterValues:{le:1e-9},legend:{show:!0},selectionMode:"x",showValue:Lc.Auto,tooltip:{mode:Hc.Single,yHistogram:!1,showColorScale:!1}},id={bucketCount:30,bucketOffset:0},ad={fillOpacity:80,gradientMode:Mc.None,lineWidth:1},od={showImage:!0};const sd={displayLabels:[]},ld={colorMode:$c.Value,graphMode:Bc.Area,justifyMode:zc.Auto,percentChangeColorMode:qc.Standard,showPercentChange:!1,textMode:Uc.Auto,wideLayout:!0},ud={alignValue:"left",mergeValues:!0,perPage:20,rowHeight:.9,showValue:Lc.Auto},cd={fillOpacity:70,lineWidth:0},dd={colWidth:.9,perPage:20,rowHeight:.9,showValue:Lc.Auto},hd={fillOpacity:70,lineWidth:1},pd={cellHeight:Xc.Sm,footer:{show:!1,countRows:!1,reducer:[]},frameIndex:0,showHeader:!0,showTypeIcons:!1,sortBy:[]};const fd={content:"# Title\n\nFor markdown syntax help: [commonmark.org/help](https://commonmark.org/help/)",mode:"markdown"};const md={fillOpacity:50,show:"points"},gd={series:[]};class vd{constructor(){this._overrides=[]}overrideColor(e){return this._overrides[this._overrides.length-1].properties.push({id:"color",value:e}),this}overrideDecimals(e){return this._overrides[this._overrides.length-1].properties.push({id:"decimals",value:e}),this}overrideDisplayName(e){return this._overrides[this._overrides.length-1].properties.push({id:"displayName",value:e}),this}overrideFilterable(e){return this._overrides[this._overrides.length-1].properties.push({id:"filterable",value:e}),this}overrideLinks(e){return this._overrides[this._overrides.length-1].properties.push({id:"links",value:e}),this}overrideMappings(e){return this._overrides[this._overrides.length-1].properties.push({id:"mappings",value:e}),this}overrideMax(e){return this._overrides[this._overrides.length-1].properties.push({id:"max",value:e}),this}overrideMin(e){return this._overrides[this._overrides.length-1].properties.push({id:"min",value:e}),this}overrideNoValue(e){return this._overrides[this._overrides.length-1].properties.push({id:"noValue",value:e}),this}overrideThresholds(e){return this._overrides[this._overrides.length-1].properties.push({id:"thresholds",value:e}),this}overrideUnit(e){return this._overrides[this._overrides.length-1].properties.push({id:"unit",value:e}),this}}class yd extends vd{match(e){return this._overrides.push({matcher:e,properties:[]}),this}matchFieldsWithName(e){return this._overrides.push({matcher:{id:l.FieldMatcherID.byName,options:e},properties:[]}),this}matchFieldsWithNameByRegex(e){return this._overrides.push({matcher:{id:l.FieldMatcherID.byRegexp,options:e},properties:[]}),this}matchFieldsByType(e){return this._overrides.push({matcher:{id:l.FieldMatcherID.byType,options:e},properties:[]}),this}matchFieldsByQuery(e){return this._overrides.push({matcher:{id:l.FieldMatcherID.byFrameRefID,options:e},properties:[]}),this}matchFieldsByValue(e){return this._overrides.push({matcher:{id:l.FieldMatcherID.byValue,options:e},properties:[]}),this}matchComparisonQuery(e){return this.matchFieldsByQuery(Au(e))}overrideCustomFieldConfig(e,t){const n=`custom.${String(e)}`;return this._overrides[this._overrides.length-1].properties.push({id:n,value:t}),this}build(){return this._overrides}}var bd=Object.defineProperty,wd=Object.defineProperties,Sd=Object.getOwnPropertyDescriptors,xd=Object.getOwnPropertySymbols,Ed=Object.prototype.hasOwnProperty,_d=Object.prototype.propertyIsEnumerable,Od=(e,t,n)=>t in e?bd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Td=(e,t)=>{for(var n in t||(t={}))Ed.call(t,n)&&Od(e,n,t[n]);if(xd)for(var n of xd(t))_d.call(t,n)&&Od(e,n,t[n]);return e},kd=(e,t)=>wd(e,Sd(t));class Cd{constructor(e){this.defaultFieldConfig=e,this._fieldConfig={defaults:{},overrides:[]},this._overridesBuilder=new yd,this.setDefaults()}setDefaults(){const e={defaults:{custom:this.defaultFieldConfig?(0,pe.cloneDeep)(this.defaultFieldConfig()):{}},overrides:[]};this._fieldConfig=e}setColor(e){return this.setFieldConfigDefaults("color",e)}setDecimals(e){return this.setFieldConfigDefaults("decimals",e)}setDisplayName(e){return this.setFieldConfigDefaults("displayName",e)}setFilterable(e){return this.setFieldConfigDefaults("filterable",e)}setLinks(e){return this.setFieldConfigDefaults("links",e)}setMappings(e){return this.setFieldConfigDefaults("mappings",e)}setMax(e){return this.setFieldConfigDefaults("max",e)}setMin(e){return this.setFieldConfigDefaults("min",e)}setNoValue(e){return this.setFieldConfigDefaults("noValue",e)}setThresholds(e){return this.setFieldConfigDefaults("thresholds",e)}setUnit(e){return this.setFieldConfigDefaults("unit",e)}setCustomFieldConfig(e,t){return this._fieldConfig.defaults=kd(Td({},this._fieldConfig.defaults),{custom:(0,pe.merge)(this._fieldConfig.defaults.custom,{[e]:t})}),this}setOverrides(e){return e(this._overridesBuilder),this}setFieldConfigDefaults(e,t){return this._fieldConfig.defaults=kd(Td({},this._fieldConfig.defaults),{[e]:t}),this}build(){return{defaults:this._fieldConfig.defaults,overrides:this._overridesBuilder.build()}}}class Ad{constructor(e){this.defaultOptions=e,this._options={},this.setDefaults()}setDefaults(){this._options=this.defaultOptions?(0,pe.cloneDeep)(this.defaultOptions()):{}}setOption(e,t){return this._options=(0,pe.merge)(this._options,{[e]:t}),this}build(){return this._options}}var Dd=Object.defineProperty,Rd=Object.defineProperties,Id=Object.getOwnPropertyDescriptors,Pd=Object.getOwnPropertySymbols,Nd=Object.prototype.hasOwnProperty,jd=Object.prototype.propertyIsEnumerable,Ld=(e,t,n)=>t in e?Dd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;class Md{constructor(e,t,n,r){this._state={},this._state.title="",this._state.description="",this._state.displayMode="default",this._state.hoverHeader=!1,this._state.pluginId=e,this._state.pluginVersion=t,this._fieldConfigBuilder=new Cd(r),this._panelOptionsBuilder=new Ad(n)}setTitle(e){return this._state.title=e,this}setDescription(e){return this._state.description=e,this}setDisplayMode(e){return this._state.displayMode=e,this}setHoverHeader(e){return this._state.hoverHeader=e,this}setMenu(e){return this._state.menu=e,this}setHeaderActions(e){return this._state.headerActions=e,this}setColor(e){return this._fieldConfigBuilder.setColor(e),this}setDecimals(e){return this._fieldConfigBuilder.setDecimals(e),this}setDisplayName(e){return this._fieldConfigBuilder.setDisplayName(e),this}setFilterable(e){return this._fieldConfigBuilder.setFilterable(e),this}setLinks(e){return this._fieldConfigBuilder.setLinks(e),this}setMappings(e){return this._fieldConfigBuilder.setMappings(e),this}setMax(e){return this._fieldConfigBuilder.setMax(e),this}setMin(e){return this._fieldConfigBuilder.setMin(e),this}setNoValue(e){return this._fieldConfigBuilder.setNoValue(e),this}setThresholds(e){return this._fieldConfigBuilder.setThresholds(e),this}setUnit(e){return this._fieldConfigBuilder.setUnit(e),this}setCustomFieldConfig(e,t){return this._fieldConfigBuilder.setCustomFieldConfig(e,t),this}setOverrides(e){return this._fieldConfigBuilder.setOverrides(e),this}setOption(e,t){return this._panelOptionsBuilder.setOption(e,t),this}setData(e){return this._state.$data=e,this}setTimeRange(e){return this._state.$timeRange=e,this}setVariables(e){return this._state.$variables=e,this}setBehaviors(e){return this._state.$behaviors=e,this}build(){const e=new ta((t=((e,t)=>{for(var n in t||(t={}))Nd.call(t,n)&&Ld(e,n,t[n]);if(Pd)for(var n of Pd(t))jd.call(t,n)&&Ld(e,n,t[n]);return e})({},this._state),n={options:this._panelOptionsBuilder.build(),fieldConfig:this._fieldConfigBuilder.build()},Rd(t,Id(n))));var t,n;return e}}const Fd={barchart:()=>new Md("barchart","10.0.0",(()=>Yc),(()=>Jc)),bargauge:()=>new Md("bargauge","10.0.0",(()=>Zc)),datagrid:()=>new Md("datagrid","10.0.0",(()=>ed)),flamegraph:()=>new Md("flamegraph","10.0.0"),gauge:()=>new Md("gauge","10.0.0",(()=>td)),geomap:()=>new Md("geomap","10.0.0",(()=>nd)),heatmap:()=>new Md("heatmap","10.0.0",(()=>rd)),histogram:()=>new Md("histogram","10.0.0",(()=>id),(()=>ad)),logs:()=>new Md("logs","10.0.0"),news:()=>new Md("news","10.0.0",(()=>od)),nodegraph:()=>new Md("nodeGraph","10.0.0"),piechart:()=>new Md("piechart","10.0.0",(()=>sd)),stat:()=>new Md("stat","10.0.0",(()=>ld)),statetimeline:()=>new Md("state-timeline","10.0.0",(()=>ud),(()=>cd)),statushistory:()=>new Md("status-history","10.0.0",(()=>dd),(()=>hd)),table:()=>new Md("table","10.0.0",(()=>pd)),text:()=>new Md("text","10.0.0",(()=>fd)),timeseries:()=>new Md("timeseries","10.0.0"),trend:()=>new Md("trend","10.0.0"),traces:()=>new Md("traces","10.0.0"),xychart:()=>new Md("xychart","10.0.0",(()=>gd),(()=>md))};const Vd={getUrlWithAppState:g,registerRuntimePanelPlugin:function({pluginId:e,plugin:t}){if(O.has(e))throw new Error(`A runtime panel plugin with id ${e} has already been registered`);var n;t.meta=(n=((e,t)=>{for(var n in t||(t={}))x.call(t,n)&&_(e,n,t[n]);if(S)for(var n of S(t))E.call(t,n)&&_(e,n,t[n]);return e})({},t.meta),b(n,w({id:e,name:e,module:"runtime plugin",baseUrl:"runtime plugin",info:{author:{name:"Runtime plugin "+e},description:"",links:[],logos:{large:"",small:""},screenshots:[],updated:"",version:""}}))),O.set(e,t)},registerRuntimeDataSource:function({dataSource:e}){if(he.has(e.uid))throw new Error(`A runtime data source with uid ${e.uid} has already been registered`);he.set(e.uid,e)},registerVariableMacro:function(e,t){if(kt.get(e))throw new Error(`Macro already registered ${e}`);return kt.set(e,t),()=>{kt.delete(e)}},cloneSceneObjectState:ue,syncStateFromSearchParams:function(e,t){const n=new fe;n.rebuildIndex(e),ge(e,t,n)},getUrlState:me,renderPrometheusLabelFilters:qr,isAdHocVariable:function(e){return"adhoc"===e.state.type},isConstantVariable:function(e){return"constant"===e.state.type},isCustomVariable:function(e){return"custom"===e.state.type},isDataSourceVariable:function(e){return"datasource"===e.state.type},isIntervalVariable:function(e){return"interval"===e.state.type},isQueryVariable:function(e){return"query"===e.state.type},isTextBoxVariable:function(e){return"textbox"===e.state.type},isGroupByVariable:function(e){return"groupby"===e.state.type}}},6233:e=>{"use strict";e.exports=function(e,t){var n=new Array(arguments.length-1),r=0,i=2,a=!0;for(;i<arguments.length;)n[r++]=arguments[i++];return new Promise((function(i,o){n[r]=function(e){if(a)if(a=!1,e)o(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];i.apply(null,t)}};try{e.apply(t||null,n)}catch(e){a&&(a=!1,o(e))}}))}},1979:(e,t)=>{"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=new Array(64),i=new Array(123),a=0;a<64;)i[r[a]=a<26?a+65:a<52?a+71:a<62?a-4:a-59|43]=a++;n.encode=function(e,t,n){for(var i,a=null,o=[],s=0,l=0;t<n;){var u=e[t++];switch(l){case 0:o[s++]=r[u>>2],i=(3&u)<<4,l=1;break;case 1:o[s++]=r[i|u>>4],i=(15&u)<<2,l=2;break;case 2:o[s++]=r[i|u>>6],o[s++]=r[63&u],l=0}s>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,o)),s=0)}return l&&(o[s++]=r[i],o[s++]=61,1===l&&(o[s++]=61)),a?(s&&a.push(String.fromCharCode.apply(String,o.slice(0,s))),a.join("")):String.fromCharCode.apply(String,o.slice(0,s))};var o="invalid encoding";n.decode=function(e,t,n){for(var r,a=n,s=0,l=0;l<e.length;){var u=e.charCodeAt(l++);if(61===u&&s>1)break;if(void 0===(u=i[u]))throw Error(o);switch(s){case 0:r=u,s=1;break;case 1:t[n++]=r<<2|(48&u)>>4,r=u,s=2;break;case 2:t[n++]=(15&r)<<4|(60&u)>>2,r=u,s=3;break;case 3:t[n++]=(3&r)<<6|u,s=0}}if(1===s)throw Error(o);return n-a},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},7669:e=>{"use strict";function t(e,n){"string"==typeof e&&(n=e,e=void 0);var r=[];function i(e){if("string"!=typeof e){var n=a();if(t.verbose,n="return "+n,e){for(var o=Object.keys(e),s=new Array(o.length+1),l=new Array(o.length),u=0;u<o.length;)s[u]=o[u],l[u]=e[o[u++]];return s[u]=n,Function.apply(null,s).apply(null,l)}return Function(n)()}for(var c=new Array(arguments.length-1),d=0;d<c.length;)c[d]=arguments[++d];if(d=0,e=e.replace(/%([%dfijs])/g,(function(e,t){var n=c[d++];switch(t){case"d":case"f":return String(Number(n));case"i":return String(Math.floor(n));case"j":return JSON.stringify(n);case"s":return String(n)}return"%"})),d!==c.length)throw Error("parameter count mismatch");return r.push(e),i}function a(t){return"function "+(t||n||"")+"("+(e&&e.join(",")||"")+"){\n "+r.join("\n ")+"\n}"}return i.toString=a,i}e.exports=t,t.verbose=!1},3474:e=>{"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}},9240:(e,t,n)=>{"use strict";e.exports=a;var r=n(6233),i=n(1925)("fs");function a(e,t,n){return"function"==typeof t?(n=t,t={}):t||(t={}),n?!t.xhr&&i&&i.readFile?i.readFile(e,(function(r,i){return r&&"undefined"!=typeof XMLHttpRequest?a.xhr(e,t,n):r?n(r):n(null,t.binary?i:i.toString("utf8"))})):a.xhr(e,t,n):r(a,this,e,t)}a.xhr=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){if(4===r.readyState){if(0!==r.status&&200!==r.status)return n(Error("status "+r.status));if(t.binary){var e=r.response;if(!e){e=[];for(var i=0;i<r.responseText.length;++i)e.push(255&r.responseText.charCodeAt(i))}return n(null,"undefined"!=typeof Uint8Array?new Uint8Array(e):e)}return n(null,r.responseText)}},t.binary&&("overrideMimeType"in r&&r.overrideMimeType("text/plain; charset=x-user-defined"),r.responseType="arraybuffer"),r.open("GET",e),r.send()}},5750:e=>{"use strict";function t(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function i(e,r,i){t[0]=e,r[i]=n[0],r[i+1]=n[1],r[i+2]=n[2],r[i+3]=n[3]}function a(e,r,i){t[0]=e,r[i]=n[3],r[i+1]=n[2],r[i+2]=n[1],r[i+3]=n[0]}function o(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function s(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?i:a,e.writeFloatBE=r?a:i,e.readFloatLE=r?o:s,e.readFloatBE=r?s:o}():function(){function t(e,t,n,r){var i=t<0?1:0;if(i&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((i<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((i<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var a=Math.floor(Math.log(t)/Math.LN2);e((i<<31|a+127<<23|8388607&Math.round(t*Math.pow(2,-a)*8388608))>>>0,n,r)}}function o(e,t,n){var r=e(t,n),i=2*(r>>31)+1,a=r>>>23&255,o=8388607&r;return 255===a?o?NaN:i*(1/0):0===a?1401298464324817e-60*i*o:i*Math.pow(2,a-150)*(o+8388608)}e.writeFloatLE=t.bind(null,n),e.writeFloatBE=t.bind(null,r),e.readFloatLE=o.bind(null,i),e.readFloatBE=o.bind(null,a)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function i(e,r,i){t[0]=e,r[i]=n[0],r[i+1]=n[1],r[i+2]=n[2],r[i+3]=n[3],r[i+4]=n[4],r[i+5]=n[5],r[i+6]=n[6],r[i+7]=n[7]}function a(e,r,i){t[0]=e,r[i]=n[7],r[i+1]=n[6],r[i+2]=n[5],r[i+3]=n[4],r[i+4]=n[3],r[i+5]=n[2],r[i+6]=n[1],r[i+7]=n[0]}function o(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function s(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?i:a,e.writeDoubleBE=r?a:i,e.readDoubleLE=r?o:s,e.readDoubleBE=r?s:o}():function(){function t(e,t,n,r,i,a){var o=r<0?1:0;if(o&&(r=-r),0===r)e(0,i,a+t),e(1/r>0?0:2147483648,i,a+n);else if(isNaN(r))e(0,i,a+t),e(2146959360,i,a+n);else if(r>17976931348623157e292)e(0,i,a+t),e((o<<31|2146435072)>>>0,i,a+n);else{var s;if(r<22250738585072014e-324)e((s=r/5e-324)>>>0,i,a+t),e((o<<31|s/4294967296)>>>0,i,a+n);else{var l=Math.floor(Math.log(r)/Math.LN2);1024===l&&(l=1023),e(4503599627370496*(s=r*Math.pow(2,-l))>>>0,i,a+t),e((o<<31|l+1023<<20|1048576*s&1048575)>>>0,i,a+n)}}}function o(e,t,n,r,i){var a=e(r,i+t),o=e(r,i+n),s=2*(o>>31)+1,l=o>>>20&2047,u=4294967296*(1048575&o)+a;return 2047===l?u?NaN:s*(1/0):0===l?5e-324*s*u:s*Math.pow(2,l-1075)*(u+4503599627370496)}e.writeDoubleLE=t.bind(null,n,0,4),e.writeDoubleBE=t.bind(null,r,4,0),e.readDoubleLE=o.bind(null,i,0,4),e.readDoubleBE=o.bind(null,a,4,0)}(),e}function n(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function r(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function i(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function a(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}e.exports=t(t)},1925:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},2459:(e,t)=>{"use strict";var n=t,r=n.isAbsolute=function(e){return/^(?:\/|\w+:)/.test(e)},i=n.normalize=function(e){var t=(e=e.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),n=r(e),i="";n&&(i=t.shift()+"/");for(var a=0;a<t.length;)".."===t[a]?a>0&&".."!==t[a-1]?t.splice(--a,2):n?t.splice(a,1):++a:"."===t[a]?t.splice(a,1):++a;return i+t.join("/")};n.resolve=function(e,t,n){return n||(t=i(t)),r(t)?t:(n||(e=i(e)),(e=e.replace(/(?:\/|^)[^/]+$/,"")).length?i(e+"/"+t):t)}},4226:e=>{"use strict";e.exports=function(e,t,n){var r=n||8192,i=r>>>1,a=null,o=r;return function(n){if(n<1||n>i)return e(n);o+n>r&&(a=e(r),o=0);var s=t.call(a,o,o+=n);return 7&o&&(o=1+(7|o)),s}}},2971:(e,t)=>{"use strict";var n=t;n.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},n.read=function(e,t,n){if(n-t<1)return"";for(var r,i=null,a=[],o=0;t<n;)(r=e[t++])<128?a[o++]=r:r>191&&r<224?a[o++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,a[o++]=55296+(r>>10),a[o++]=56320+(1023&r)):a[o++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],o>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),o=0);return i?(o&&i.push(String.fromCharCode.apply(String,a.slice(0,o))),i.join("")):String.fromCharCode.apply(String,a.slice(0,o))},n.write=function(e,t,n){for(var r,i,a=n,o=0;o<e.length;++o)(r=e.charCodeAt(o))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(i=e.charCodeAt(o+1)))?(r=65536+((1023&r)<<10)+(1023&i),++o,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-a}},7951:(e,t,n)=>{const r=n(2880),i={};for(const e of Object.keys(r))i[r[e]]=e;const a={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=a;for(const e of Object.keys(a)){if(!("channels"in a[e]))throw new Error("missing channels property: "+e);if(!("labels"in a[e]))throw new Error("missing channel labels property: "+e);if(a[e].labels.length!==a[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],"channels",{value:t}),Object.defineProperty(a[e],"labels",{value:n})}a.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i;let s,l;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(60*s,360),s<0&&(s+=360);const u=(i+a)/2;return l=a===i?0:u<=.5?o/(a+i):o/(2-a-i),[s,100*l,100*u]},a.rgb.hsv=function(e){let t,n,r,i,a;const o=e[0]/255,s=e[1]/255,l=e[2]/255,u=Math.max(o,s,l),c=u-Math.min(o,s,l),d=function(e){return(u-e)/6/c+.5};return 0===c?(i=0,a=0):(a=c/u,t=d(o),n=d(s),r=d(l),o===u?i=r-n:s===u?i=1/3+t-r:l===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[360*i,100*a,100*u]},a.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=a.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,100*o,100*r]},a.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r);return[100*((1-t-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},a.rgb.keyword=function(e){const t=i[e];if(t)return t;let n,a=1/0;for(const t of Object.keys(r)){const i=r[t],l=(s=i,((o=e)[0]-s[0])**2+(o[1]-s[1])**2+(o[2]-s[2])**2);l<a&&(a=l,n=t)}var o,s;return n},a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){const t=a.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*r-16,500*(n-r),200*(r-i)]},a.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,a,o;if(0===n)return o=255*r,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;const s=2*r-i,l=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(i-s)*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,l[e]=255*o;return l},a.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a;return[t,100*(0===r?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),l=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,l,o];case 1:return[s,r,o];case 2:return[o,r,l];case 3:return[o,s,r];case 4:return[l,o,r];case 5:return[r,o,s]}},a.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let a,o;o=(2-n)*r;const s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a=a||0,o/=2,[t,100*a,100*o]},a.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let a;i>1&&(n/=i,r/=i);const o=Math.floor(6*t),s=1-r;a=6*t-o,1&o&&(a=1-a);const l=n+a*(s-n);let u,c,d;switch(o){default:case 6:case 0:u=s,c=l,d=n;break;case 1:u=l,c=s,d=n;break;case 2:u=n,c=s,d=l;break;case 3:u=n,c=l,d=s;break;case 4:u=l,c=n,d=s;break;case 5:u=s,c=n,d=l}return[255*u,255*c,255*d]},a.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},a.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,a,o;return i=3.2406*t+-1.5372*n+-.4986*r,a=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]},a.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},a.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const i=n**3,a=t**3,o=r**3;return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},a.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360);return[t,Math.sqrt(n*n+r*r),i]},a.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},a.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=null===t?a.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===o&&(s+=60),s},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},a.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},a.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a;let s,l;return s=o<1?a/(1-o):0,l=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,l/=6,l%=1,[360*l,100*o,100*s]},a.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},a.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const i=[0,0,0],a=t%1*6,o=a%1,s=1-o;let l=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-n)*r,[255*(n*i[0]+l),255*(n*i[1]+l),255*(n*i[2]+l)]},a.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=function(e){return[0,0,e[0]]},a.gray.hsv=a.gray.hsl,a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},8666:(e,t,n)=>{const r=n(7951),i=n(1247),a={};Object.keys(r).forEach((e=>{a[e]={},Object.defineProperty(a[e],"channels",{value:r[e].channels}),Object.defineProperty(a[e],"labels",{value:r[e].labels});const t=i(e);Object.keys(t).forEach((n=>{const r=t[n];a[e][n]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(r),a[e][n].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=a},1247:(e,t,n)=>{const r=n(7951);function i(e){const t=function(){const e={},t=Object.keys(r);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){const e=n.pop(),i=Object.keys(r[e]);for(let r=i.length,a=0;a<r;a++){const r=i[a],o=t[r];-1===o.distance&&(o.distance=t[e].distance+1,o.parent=e,n.unshift(r))}}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){const n=[t[e].parent,e];let i=r[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),i=a(r[t[o].parent][o],i),o=t[o].parent;return i.conversion=n,i}e.exports=function(e){const t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){const e=r[i];null!==t[e].parent&&(n[e]=o(e,t))}return n}},2880:e=>{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},6250:(e,t,n)=>{var r=n(2880),i=n(6852),a=Object.hasOwnProperty,o=Object.create(null);for(var s in r)a.call(r,s)&&(o[r[s]]=s);var l=e.exports={to:{},get:{}};function u(e,t,n){return Math.min(Math.max(t,e),n)}function c(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}l.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case"hsl":t=l.get.hsl(e),n="hsl";break;case"hwb":t=l.get.hwb(e),n="hwb";break;default:t=l.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},l.get.rgb=function(e){if(!e)return null;var t,n,i,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=t[2],t=t[1],n=0;n<3;n++){var s=2*n;o[n]=parseInt(t.slice(s,s+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:a.call(r,t[1])?((o=r[t[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=u(o[n],0,255);return o[3]=u(o[3],0,1),o},l.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,u(parseFloat(t[2]),0,100),u(parseFloat(t[3]),0,100),u(isNaN(n)?1:n,0,1)]}return null},l.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,u(parseFloat(t[2]),0,100),u(parseFloat(t[3]),0,100),u(isNaN(n)?1:n,0,1)]}return null},l.to.hex=function(){var e=i(arguments);return"#"+c(e[0])+c(e[1])+c(e[2])+(e[3]<1?c(Math.round(255*e[3])):"")},l.to.rgb=function(){var e=i(arguments);return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},l.to.rgb.percent=function(){var e=i(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"},l.to.hsl=function(){var e=i(arguments);return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},l.to.hwb=function(){var e=i(arguments),t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},l.to.keyword=function(e){return o[e.slice(0,3)]}},4308:(e,t,n)=>{const r=n(6250),i=n(8666),a=["keyword","gray","hex"],o={};for(const e of Object.keys(i))o[[...i[e].labels].sort().join("")]=e;const s={};function l(e,t){if(!(this instanceof l))return new l(e,t);if(t&&t in a&&(t=null),t&&!(t in i))throw new Error("Unknown model: "+t);let n,u;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof l)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=r.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,u=i[this.model].channels,this.color=t.value.slice(0,u),this.valpha="number"==typeof t.value[u]?t.value[u]:1}else if(e.length>0){this.model=t||"rgb",u=i[this.model].channels;const n=Array.prototype.slice.call(e,0,u);this.color=h(n,u),this.valpha="number"==typeof e[u]?e[u]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;const t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);const r=t.sort().join("");if(!(r in o))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=o[r];const{labels:a}=i[this.model],s=[];for(n=0;n<a.length;n++)s.push(e[a[n]]);this.color=h(s)}if(s[this.model])for(u=i[this.model].channels,n=0;n<u;n++){const e=s[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}l.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in r.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const n=1===t.valpha?t.color:[...t.color,this.valpha];return r.to[t.model](n)},percentString(e){const t=this.rgb().round("number"==typeof e?e:1),n=1===t.valpha?t.color:[...t.color,this.valpha];return r.to.rgb.percent(n)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=i[this.model],{labels:n}=i[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return 1!==this.valpha&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,1!==this.valpha&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,1!==this.valpha&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new l([...this.color.map(u(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new l([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:c("rgb",0,d(255)),green:c("rgb",1,d(255)),blue:c("rgb",2,d(255)),hue:c(["hsl","hsv","hsl","hwb","hcg"],0,(e=>(e%360+360)%360)),saturationl:c("hsl",1,d(100)),lightness:c("hsl",2,d(100)),saturationv:c("hsv",1,d(100)),value:c("hsv",2,d(100)),chroma:c("hcg",1,d(100)),gray:c("hcg",2,d(100)),white:c("hwb",1,d(100)),wblack:c("hwb",2,d(100)),cyan:c("cmyk",0,d(100)),magenta:c("cmyk",1,d(100)),yellow:c("cmyk",2,d(100)),black:c("cmyk",3,d(100)),x:c("xyz",0,d(95.047)),y:c("xyz",1,d(100)),z:c("xyz",2,d(108.833)),l:c("lab",0,d(100)),a:c("lab",1),b:c("lab",2),keyword(e){return void 0!==e?new l(e):i[this.model].keyword(this.color)},hex(e){return void 0!==e?new l(e):r.to.hex(this.rgb().round().color)},hexa(e){if(void 0!==e)return new l(e);const t=this.rgb().round().color;let n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),r.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return l.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),i=void 0===t?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o==-1?a:(a+o)/(1+a*o))+1)/2,u=1-s;return l.rgb(s*n.red()+u*r.red(),s*n.green()+u*r.green(),s*n.blue()+u*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const e of Object.keys(i)){if(a.includes(e))continue;const{channels:t}=i[e];l.prototype[e]=function(...t){return this.model===e?new l(this):t.length>0?new l(t,e):new l([...(n=i[this.model][e].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],e);var n},l[e]=function(...n){let r=n[0];return"number"==typeof r&&(r=h(n,t)),new l(r,e)}}function u(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function c(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(s[r]||(s[r]=[]))[t]=n;return e=e[0],function(r){let i;return void 0!==r?(n&&(r=n(r)),i=this[e](),i.color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function h(e,t){for(let n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}e.exports=l},2249:function(e,t,n){var r,i,a;i=[],void 0===(a="function"==typeof(r=function(){"use strict";function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function r(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function i(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,t,n){var s=o.URL||o.webkitURL,l=document.createElement("a");t=t||e.name||"download",l.download=t,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?a(l):i(l.href)?r(e,t,n):a(l,l.target="_blank")):(l.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(l.href)}),4e4),setTimeout((function(){a(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,o),n);else if(i(e))r(e,n,o);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){a(s)}))}}:function(e,t,n,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return r(e,t,n);var a="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||a&&l||s)&&"undefined"!=typeof FileReader){var c=new FileReader;c.onloadend=function(){var e=c.result;e=u?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},c.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,h=d.createObjectURL(e);i?i.location=h:location.href=h,i=null,setTimeout((function(){d.revokeObjectURL(h)}),4e4)}});o.saveAs=l.saveAs=l,e.exports=l})?r.apply(t,i):r)||(e.exports=a)},7842:(e,t,n)=>{e=n.nmd(e);var r="__lodash_hash_undefined__",i=1,a=2,o=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",c="[object Boolean]",d="[object Date]",h="[object Error]",p="[object Function]",f="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Null]",y="[object Object]",b="[object Promise]",w="[object Proxy]",S="[object RegExp]",x="[object Set]",E="[object String]",_="[object Symbol]",O="[object Undefined]",T="[object WeakMap]",k="[object ArrayBuffer]",C="[object DataView]",A=/^\[object .+?Constructor\]$/,D=/^(?:0|[1-9]\d*)$/,R={};R["[object Float32Array]"]=R["[object Float64Array]"]=R["[object Int8Array]"]=R["[object Int16Array]"]=R["[object Int32Array]"]=R["[object Uint8Array]"]=R["[object Uint8ClampedArray]"]=R["[object Uint16Array]"]=R["[object Uint32Array]"]=!0,R[s]=R[l]=R[k]=R[c]=R[C]=R[d]=R[h]=R[p]=R[m]=R[g]=R[y]=R[S]=R[x]=R[E]=R[T]=!1;var I="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,P="object"==typeof self&&self&&self.Object===Object&&self,N=I||P||Function("return this")(),j=t&&!t.nodeType&&t,L=j&&e&&!e.nodeType&&e,M=L&&L.exports===j,F=M&&I.process,V=function(){try{return F&&F.binding&&F.binding("util")}catch(e){}}(),$=V&&V.isTypedArray;function B(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function z(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function U(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var q,H,G,W=Array.prototype,Q=Function.prototype,K=Object.prototype,X=N["__core-js_shared__"],Y=Q.toString,J=K.hasOwnProperty,Z=(q=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+q:"",ee=K.toString,te=RegExp("^"+Y.call(J).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=M?N.Buffer:void 0,re=N.Symbol,ie=N.Uint8Array,ae=K.propertyIsEnumerable,oe=W.splice,se=re?re.toStringTag:void 0,le=Object.getOwnPropertySymbols,ue=ne?ne.isBuffer:void 0,ce=(H=Object.keys,G=Object,function(e){return H(G(e))}),de=Ve(N,"DataView"),he=Ve(N,"Map"),pe=Ve(N,"Promise"),fe=Ve(N,"Set"),me=Ve(N,"WeakMap"),ge=Ve(Object,"create"),ve=Ue(de),ye=Ue(he),be=Ue(pe),we=Ue(fe),Se=Ue(me),xe=re?re.prototype:void 0,Ee=xe?xe.valueOf:void 0;function _e(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Te(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ke(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Te;++t<n;)this.add(e[t])}function Ce(e){var t=this.__data__=new Oe(e);this.size=t.size}function Ae(e,t){var n=Ge(e),r=!n&&He(e),i=!n&&!r&&We(e),a=!n&&!r&&!i&&Je(e),o=n||r||i||a,s=o?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],l=s.length;for(var u in e)!t&&!J.call(e,u)||o&&("length"==u||i&&("offset"==u||"parent"==u)||a&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ze(u,l))||s.push(u);return s}function De(e,t){for(var n=e.length;n--;)if(qe(e[n][0],t))return n;return-1}function Re(e){return null==e?void 0===e?O:v:se&&se in Object(e)?function(e){var t=J.call(e,se),n=e[se];try{e[se]=void 0;var r=!0}catch(e){}var i=ee.call(e);r&&(t?e[se]=n:delete e[se]);return i}(e):function(e){return ee.call(e)}(e)}function Ie(e){return Ye(e)&&Re(e)==s}function Pe(e,t,n,r,o){return e===t||(null==e||null==t||!Ye(e)&&!Ye(t)?e!=e&&t!=t:function(e,t,n,r,o,u){var p=Ge(e),f=Ge(t),v=p?l:Be(e),b=f?l:Be(t),w=(v=v==s?y:v)==y,O=(b=b==s?y:b)==y,T=v==b;if(T&&We(e)){if(!We(t))return!1;p=!0,w=!1}if(T&&!w)return u||(u=new Ce),p||Je(e)?Le(e,t,n,r,o,u):function(e,t,n,r,o,s,l){switch(n){case C:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!s(new ie(e),new ie(t)));case c:case d:case g:return qe(+e,+t);case h:return e.name==t.name&&e.message==t.message;case S:case E:return e==t+"";case m:var u=z;case x:var p=r&i;if(u||(u=U),e.size!=t.size&&!p)return!1;var f=l.get(e);if(f)return f==t;r|=a,l.set(e,t);var v=Le(u(e),u(t),r,o,s,l);return l.delete(e),v;case _:if(Ee)return Ee.call(e)==Ee.call(t)}return!1}(e,t,v,n,r,o,u);if(!(n&i)){var A=w&&J.call(e,"__wrapped__"),D=O&&J.call(t,"__wrapped__");if(A||D){var R=A?e.value():e,I=D?t.value():t;return u||(u=new Ce),o(R,I,n,r,u)}}if(!T)return!1;return u||(u=new Ce),function(e,t,n,r,a,o){var s=n&i,l=Me(e),u=l.length,c=Me(t),d=c.length;if(u!=d&&!s)return!1;var h=u;for(;h--;){var p=l[h];if(!(s?p in t:J.call(t,p)))return!1}var f=o.get(e);if(f&&o.get(t))return f==t;var m=!0;o.set(e,t),o.set(t,e);var g=s;for(;++h<u;){var v=e[p=l[h]],y=t[p];if(r)var b=s?r(y,v,p,t,e,o):r(v,y,p,e,t,o);if(!(void 0===b?v===y||a(v,y,n,r,o):b)){m=!1;break}g||(g="constructor"==p)}if(m&&!g){var w=e.constructor,S=t.constructor;w==S||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof S&&S instanceof S||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,r,o,u)}(e,t,n,r,Pe,o))}function Ne(e){return!(!Xe(e)||function(e){return!!Z&&Z in e}(e))&&(Qe(e)?te:A).test(Ue(e))}function je(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||K,t!==r)return ce(e);var t,n,r,i=[];for(var a in Object(e))J.call(e,a)&&"constructor"!=a&&i.push(a);return i}function Le(e,t,n,r,o,s){var l=n&i,u=e.length,c=t.length;if(u!=c&&!(l&&c>u))return!1;var d=s.get(e);if(d&&s.get(t))return d==t;var h=-1,p=!0,f=n&a?new ke:void 0;for(s.set(e,t),s.set(t,e);++h<u;){var m=e[h],g=t[h];if(r)var v=l?r(g,m,h,t,e,s):r(m,g,h,e,t,s);if(void 0!==v){if(v)continue;p=!1;break}if(f){if(!B(t,(function(e,t){if(i=t,!f.has(i)&&(m===e||o(m,e,n,r,s)))return f.push(t);var i}))){p=!1;break}}else if(m!==g&&!o(m,g,n,r,s)){p=!1;break}}return s.delete(e),s.delete(t),p}function Me(e){return function(e,t,n){var r=t(e);return Ge(e)?r:function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}(r,n(e))}(e,Ze,$e)}function Fe(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ve(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ne(n)?n:void 0}_e.prototype.clear=function(){this.__data__=ge?ge(null):{},this.size=0},_e.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},_e.prototype.get=function(e){var t=this.__data__;if(ge){var n=t[e];return n===r?void 0:n}return J.call(t,e)?t[e]:void 0},_e.prototype.has=function(e){var t=this.__data__;return ge?void 0!==t[e]:J.call(t,e)},_e.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ge&&void 0===t?r:t,this},Oe.prototype.clear=function(){this.__data__=[],this.size=0},Oe.prototype.delete=function(e){var t=this.__data__,n=De(t,e);return!(n<0)&&(n==t.length-1?t.pop():oe.call(t,n,1),--this.size,!0)},Oe.prototype.get=function(e){var t=this.__data__,n=De(t,e);return n<0?void 0:t[n][1]},Oe.prototype.has=function(e){return De(this.__data__,e)>-1},Oe.prototype.set=function(e,t){var n=this.__data__,r=De(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Te.prototype.clear=function(){this.size=0,this.__data__={hash:new _e,map:new(he||Oe),string:new _e}},Te.prototype.delete=function(e){var t=Fe(this,e).delete(e);return this.size-=t?1:0,t},Te.prototype.get=function(e){return Fe(this,e).get(e)},Te.prototype.has=function(e){return Fe(this,e).has(e)},Te.prototype.set=function(e,t){var n=Fe(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ke.prototype.add=ke.prototype.push=function(e){return this.__data__.set(e,r),this},ke.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.clear=function(){this.__data__=new Oe,this.size=0},Ce.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ce.prototype.get=function(e){return this.__data__.get(e)},Ce.prototype.has=function(e){return this.__data__.has(e)},Ce.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Oe){var r=n.__data__;if(!he||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Te(r)}return n.set(e,t),this.size=n.size,this};var $e=le?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}(le(e),(function(t){return ae.call(e,t)})))}:function(){return[]},Be=Re;function ze(e,t){return!!(t=null==t?o:t)&&("number"==typeof e||D.test(e))&&e>-1&&e%1==0&&e<t}function Ue(e){if(null!=e){try{return Y.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function qe(e,t){return e===t||e!=e&&t!=t}(de&&Be(new de(new ArrayBuffer(1)))!=C||he&&Be(new he)!=m||pe&&Be(pe.resolve())!=b||fe&&Be(new fe)!=x||me&&Be(new me)!=T)&&(Be=function(e){var t=Re(e),n=t==y?e.constructor:void 0,r=n?Ue(n):"";if(r)switch(r){case ve:return C;case ye:return m;case be:return b;case we:return x;case Se:return T}return t});var He=Ie(function(){return arguments}())?Ie:function(e){return Ye(e)&&J.call(e,"callee")&&!ae.call(e,"callee")},Ge=Array.isArray;var We=ue||function(){return!1};function Qe(e){if(!Xe(e))return!1;var t=Re(e);return t==p||t==f||t==u||t==w}function Ke(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function Xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ye(e){return null!=e&&"object"==typeof e}var Je=$?function(e){return function(t){return e(t)}}($):function(e){return Ye(e)&&Ke(e.length)&&!!R[Re(e)]};function Ze(e){return null!=(t=e)&&Ke(t.length)&&!Qe(t)?Ae(e):je(e);var t}e.exports=function(e,t){return Pe(e,t)}},1664:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l<arguments.length;l++){for(var u in a=Object(arguments[l]))n.call(a,u)&&(s[u]=a[u]);if(t){o=t(a);for(var c=0;c<o.length;c++)r.call(a,o[c])&&(s[o[c]]=a[o[c]])}}return s}},362:(e,t,n)=>{"use strict";var r=n(6441);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},2688:(e,t,n)=>{e.exports=n(362)()},6441:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},585:(e,t,n)=>{"use strict";e.exports=n(5481)},3804:(e,t,n)=>{"use strict";var r=t,i=n(2775),a=n(6866);function o(e,t,n,r){var a=!1;if(t.resolvedType)if(t.resolvedType instanceof i){e("switch(d%s){",r);for(var o=t.resolvedType.values,s=Object.keys(o),l=0;l<s.length;++l)o[s[l]]!==t.typeDefault||a||(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',r,r,r),t.repeated||e("break"),a=!0),e("case%j:",s[l])("case %i:",o[s[l]])("m%s=%j",r,o[s[l]])("break");e("}")}else e('if(typeof d%s!=="object")',r)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,n,r);else{var u=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":u=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,u)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,u?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r)}}return e}function s(e,t,n,r){if(t.resolvedType)t.resolvedType instanceof i?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",r,n,r,r,n,r,r):e("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var a=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":a=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,a?"true":"",r);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:e("d%s=m%s",r,r)}}return e}r.fromObject=function(e){var t=e.fieldsArray,n=a.codegen(["d"],e.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!t.length)return n("return new this.ctor");n("var m=new this.ctor");for(var r=0;r<t.length;++r){var s=t[r].resolve(),l=a.safeProp(s.name);s.map?(n("if(d%s){",l)('if(typeof d%s!=="object")',l)("throw TypeError(%j)",s.fullName+": object expected")("m%s={}",l)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",l),o(n,s,r,l+"[ks[i]]")("}")("}")):s.repeated?(n("if(d%s){",l)("if(!Array.isArray(d%s))",l)("throw TypeError(%j)",s.fullName+": array expected")("m%s=[]",l)("for(var i=0;i<d%s.length;++i){",l),o(n,s,r,l+"[i]")("}")("}")):(s.resolvedType instanceof i||n("if(d%s!=null){",l),o(n,s,r,l),s.resolvedType instanceof i||n("}"))}return n("return m")},r.toObject=function(e){var t=e.fieldsArray.slice().sort(a.compareFieldsById);if(!t.length)return a.codegen()("return {}");for(var n=a.codegen(["m","o"],e.name+"$toObject")("if(!o)")("o={}")("var d={}"),r=[],o=[],l=[],u=0;u<t.length;++u)t[u].partOf||(t[u].resolve().repeated?r:t[u].map?o:l).push(t[u]);if(r.length){for(n("if(o.arrays||o.defaults){"),u=0;u<r.length;++u)n("d%s=[]",a.safeProp(r[u].name));n("}")}if(o.length){for(n("if(o.objects||o.defaults){"),u=0;u<o.length;++u)n("d%s={}",a.safeProp(o[u].name));n("}")}if(l.length){for(n("if(o.defaults){"),u=0;u<l.length;++u){var c=l[u],d=a.safeProp(c.name);if(c.resolvedType instanceof i)n("d%s=o.enums===String?%j:%j",d,c.resolvedType.valuesById[c.typeDefault],c.typeDefault);else if(c.long)n("if(util.Long){")("var n=new util.Long(%i,%i,%j)",c.typeDefault.low,c.typeDefault.high,c.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",d)("}else")("d%s=o.longs===String?%j:%i",d,c.typeDefault.toString(),c.typeDefault.toNumber());else if(c.bytes){var h="["+Array.prototype.slice.call(c.typeDefault).join(",")+"]";n("if(o.bytes===String)d%s=%j",d,String.fromCharCode.apply(String,c.typeDefault))("else{")("d%s=%s",d,h)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",d,d)("}")}else n("d%s=%j",d,c.typeDefault)}n("}")}var p=!1;for(u=0;u<t.length;++u){c=t[u];var f=e._fieldsArray.indexOf(c);d=a.safeProp(c.name);c.map?(p||(p=!0,n("var ks2")),n("if(m%s&&(ks2=Object.keys(m%s)).length){",d,d)("d%s={}",d)("for(var j=0;j<ks2.length;++j){"),s(n,c,f,d+"[ks2[j]]")("}")):c.repeated?(n("if(m%s&&m%s.length){",d,d)("d%s=[]",d)("for(var j=0;j<m%s.length;++j){",d),s(n,c,f,d+"[j]")("}")):(n("if(m%s!=null&&m.hasOwnProperty(%j)){",d,c.name),s(n,c,f,d),c.partOf&&n("if(o.oneofs)")("d%s=%j",a.safeProp(c.partOf.name),c.name)),n("}")}return n("return d")}},9980:(e,t,n)=>{"use strict";e.exports=function(e){var t=a.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter((function(e){return e.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break");t("switch(t>>>3){");for(var n=0;n<e.fieldsArray.length;++n){var s=e._fieldsArray[n].resolve(),l=s.resolvedType instanceof r?"int32":s.type,u="m"+a.safeProp(s.name);t("case %i: {",s.id),s.map?(t("if(%s===util.emptyObject)",u)("%s={}",u)("var c2 = r.uint32()+r.pos"),void 0!==i.defaults[s.keyType]?t("k=%j",i.defaults[s.keyType]):t("k=null"),void 0!==i.defaults[l]?t("value=%j",i.defaults[l]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",s.keyType)("case 2:"),void 0===i.basic[l]?t("value=types[%i].decode(r,r.uint32())",n):t("value=r.%s()",l),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==i.long[s.keyType]?t('%s[typeof k==="object"?util.longToHash(k):k]=value',u):t("%s[k]=value",u)):s.repeated?(t("if(!(%s&&%s.length))",u,u)("%s=[]",u),void 0!==i.packed[l]&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",u,l)("}else"),void 0===i.basic[l]?t(s.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",u,n):t("%s.push(r.%s())",u,l)):void 0===i.basic[l]?t(s.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",u,n):t("%s=r.%s()",u,l),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),n=0;n<e._fieldsArray.length;++n){var c=e._fieldsArray[n];c.required&&t("if(!m.hasOwnProperty(%j))",c.name)("throw util.ProtocolError(%j,{instance:m})",o(c))}return t("return m")};var r=n(2775),i=n(1517),a=n(6866);function o(e){return"missing required '"+e.name+"'"}},8852:(e,t,n)=>{"use strict";e.exports=function(e){for(var t,n=a.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),s=e.fieldsArray.slice().sort(a.compareFieldsById),l=0;l<s.length;++l){var u=s[l].resolve(),c=e._fieldsArray.indexOf(u),d=u.resolvedType instanceof r?"int32":u.type,h=i.basic[d];t="m"+a.safeProp(u.name),u.map?(n("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",t,u.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",t)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(u.id<<3|2)>>>0,8|i.mapKey[u.keyType],u.keyType),void 0===h?n("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",c,t):n(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|h,d,t),n("}")("}")):u.repeated?(n("if(%s!=null&&%s.length){",t,t),u.packed&&void 0!==i.packed[d]?n("w.uint32(%i).fork()",(u.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",t)("w.%s(%s[i])",d,t)("w.ldelim()"):(n("for(var i=0;i<%s.length;++i)",t),void 0===h?o(n,u,c,t+"[i]"):n("w.uint32(%i).%s(%s[i])",(u.id<<3|h)>>>0,d,t)),n("}")):(u.optional&&n("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",t,u.name),void 0===h?o(n,u,c,t):n("w.uint32(%i).%s(%s)",(u.id<<3|h)>>>0,d,t))}return n("return w")};var r=n(2775),i=n(1517),a=n(6866);function o(e,t,n,r){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(t.id<<3|2)>>>0)}},2775:(e,t,n)=>{"use strict";e.exports=o;var r=n(4349);((o.prototype=Object.create(r.prototype)).constructor=o).className="Enum";var i=n(2815),a=n(6866);function o(e,t,n,i,a,o){if(r.call(this,e,n),t&&"object"!=typeof t)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=i,this.comments=a||{},this.valuesOptions=o,this.reserved=void 0,t)for(var s=Object.keys(t),l=0;l<s.length;++l)"number"==typeof t[s[l]]&&(this.valuesById[this.values[s[l]]=t[s[l]]]=s[l])}o.fromJSON=function(e,t){var n=new o(e,t.values,t.options,t.comment,t.comments);return n.reserved=t.reserved,n},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",t?this.comment:void 0,"comments",t?this.comments:void 0])},o.prototype.add=function(e,t,n,r){if(!a.isString(e))throw TypeError("name must be a string");if(!a.isInteger(t))throw TypeError("id must be an integer");if(void 0!==this.values[e])throw Error("duplicate name '"+e+"' in "+this);if(this.isReservedId(t))throw Error("id "+t+" is reserved in "+this);if(this.isReservedName(e))throw Error("name '"+e+"' is reserved in "+this);if(void 0!==this.valuesById[t]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+t+" in "+this);this.values[e]=t}else this.valuesById[this.values[e]=t]=e;return r&&(void 0===this.valuesOptions&&(this.valuesOptions={}),this.valuesOptions[e]=r||null),this.comments[e]=n||null,this},o.prototype.remove=function(e){if(!a.isString(e))throw TypeError("name must be a string");var t=this.values[e];if(null==t)throw Error("name '"+e+"' does not exist in "+this);return delete this.valuesById[t],delete this.values[e],delete this.comments[e],this.valuesOptions&&delete this.valuesOptions[e],this},o.prototype.isReservedId=function(e){return i.isReservedId(this.reserved,e)},o.prototype.isReservedName=function(e){return i.isReservedName(this.reserved,e)}},3796:(e,t,n)=>{"use strict";e.exports=u;var r=n(4349);((u.prototype=Object.create(r.prototype)).constructor=u).className="Field";var i,a=n(2775),o=n(1517),s=n(6866),l=/^required|optional|repeated$/;function u(e,t,n,i,a,u,c){if(s.isObject(i)?(c=a,u=i,i=a=void 0):s.isObject(a)&&(c=u,u=a,a=void 0),r.call(this,e,u),!s.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!s.isString(n))throw TypeError("type must be a string");if(void 0!==i&&!l.test(i=i.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==a&&!s.isString(a))throw TypeError("extend must be a string");"proto3_optional"===i&&(i="optional"),this.rule=i&&"optional"!==i?i:void 0,this.type=n,this.id=t,this.extend=a||void 0,this.required="required"===i,this.optional=!this.required,this.repeated="repeated"===i,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!s.Long&&void 0!==o.long[n],this.bytes="bytes"===n,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=c}u.fromJSON=function(e,t){return new u(e,t.id,t.type,t.rule,t.extend,t.options,t.comment)},Object.defineProperty(u.prototype,"packed",{get:function(){return null===this._packed&&(this._packed=!1!==this.getOption("packed")),this._packed}}),u.prototype.setOption=function(e,t,n){return"packed"===e&&(this._packed=null),r.prototype.setOption.call(this,e,t,n)},u.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return s.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},u.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=o.defaults[this.type])?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof i?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof a&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof a)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=s.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var e;s.base64.test(this.typeDefault)?s.base64.decode(this.typeDefault,e=s.newBuffer(s.base64.length(this.typeDefault)),0):s.utf8.write(this.typeDefault,e=s.newBuffer(s.utf8.length(this.typeDefault)),0),this.typeDefault=e}return this.map?this.defaultValue=s.emptyObject:this.repeated?this.defaultValue=s.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof i&&(this.parent.ctor.prototype[this.name]=this.defaultValue),r.prototype.resolve.call(this)},u.d=function(e,t,n,r){return"function"==typeof t?t=s.decorateType(t).name:t&&"object"==typeof t&&(t=s.decorateEnum(t).name),function(i,a){s.decorateType(i.constructor).add(new u(a,e,t,n,{default:r}))}},u._configure=function(e){i=e}},5481:(e,t,n)=>{"use strict";var r=e.exports=n(7134);r.build="light",r.load=function(e,t,n){return"function"==typeof t?(n=t,t=new r.Root):t||(t=new r.Root),t.load(e,n)},r.loadSync=function(e,t){return t||(t=new r.Root),t.loadSync(e)},r.encoder=n(8852),r.decoder=n(9980),r.verifier=n(3040),r.converter=n(3804),r.ReflectionObject=n(4349),r.Namespace=n(2815),r.Root=n(8038),r.Enum=n(2775),r.Type=n(6),r.Field=n(3796),r.OneOf=n(8957),r.MapField=n(9504),r.Service=n(6467),r.Method=n(3055),r.Message=n(9e3),r.wrappers=n(6942),r.types=n(1517),r.util=n(6866),r.ReflectionObject._configure(r.Root),r.Namespace._configure(r.Type,r.Service,r.Enum),r.Root._configure(r.Type),r.Field._configure(r.Type)},7134:(e,t,n)=>{"use strict";var r=t;function i(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=n(4301),r.BufferWriter=n(8422),r.Reader=n(1137),r.BufferReader=n(4010),r.util=n(5382),r.rpc=n(9691),r.roots=n(381),r.configure=i,i()},9504:(e,t,n)=>{"use strict";e.exports=o;var r=n(3796);((o.prototype=Object.create(r.prototype)).constructor=o).className="MapField";var i=n(1517),a=n(6866);function o(e,t,n,i,o,s){if(r.call(this,e,t,i,void 0,void 0,o,s),!a.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}o.fromJSON=function(e,t){return new o(e,t.id,t.keyType,t.type,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",t?this.comment:void 0])},o.prototype.resolve=function(){if(this.resolved)return this;if(void 0===i.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return r.prototype.resolve.call(this)},o.d=function(e,t,n){return"function"==typeof n?n=a.decorateType(n).name:n&&"object"==typeof n&&(n=a.decorateEnum(n).name),function(r,i){a.decorateType(r.constructor).add(new o(i,e,t,n))}}},9e3:(e,t,n)=>{"use strict";e.exports=i;var r=n(5382);function i(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)this[t[n]]=e[t[n]]}i.create=function(e){return this.$type.create(e)},i.encode=function(e,t){return this.$type.encode(e,t)},i.encodeDelimited=function(e,t){return this.$type.encodeDelimited(e,t)},i.decode=function(e){return this.$type.decode(e)},i.decodeDelimited=function(e){return this.$type.decodeDelimited(e)},i.verify=function(e){return this.$type.verify(e)},i.fromObject=function(e){return this.$type.fromObject(e)},i.toObject=function(e,t){return this.$type.toObject(e,t)},i.prototype.toJSON=function(){return this.$type.toObject(this,r.toJSONOptions)}},3055:(e,t,n)=>{"use strict";e.exports=a;var r=n(4349);((a.prototype=Object.create(r.prototype)).constructor=a).className="Method";var i=n(6866);function a(e,t,n,a,o,s,l,u,c){if(i.isObject(o)?(l=o,o=s=void 0):i.isObject(s)&&(l=s,s=void 0),void 0!==t&&!i.isString(t))throw TypeError("type must be a string");if(!i.isString(n))throw TypeError("requestType must be a string");if(!i.isString(a))throw TypeError("responseType must be a string");r.call(this,e,l),this.type=t||"rpc",this.requestType=n,this.requestStream=!!o||void 0,this.responseType=a,this.responseStream=!!s||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=u,this.parsedOptions=c}a.fromJSON=function(e,t){return new a(e,t.type,t.requestType,t.responseType,t.requestStream,t.responseStream,t.options,t.comment,t.parsedOptions)},a.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return i.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",t?this.comment:void 0,"parsedOptions",this.parsedOptions])},a.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),r.prototype.resolve.call(this))}},2815:(e,t,n)=>{"use strict";e.exports=d;var r=n(4349);((d.prototype=Object.create(r.prototype)).constructor=d).className="Namespace";var i,a,o,s=n(3796),l=n(6866),u=n(8957);function c(e,t){if(e&&e.length){for(var n={},r=0;r<e.length;++r)n[e[r].name]=e[r].toJSON(t);return n}}function d(e,t){r.call(this,e,t),this.nested=void 0,this._nestedArray=null}function h(e){return e._nestedArray=null,e}d.fromJSON=function(e,t){return new d(e,t.options).addJSON(t.nested)},d.arrayToJSON=c,d.isReservedId=function(e,t){if(e)for(var n=0;n<e.length;++n)if("string"!=typeof e[n]&&e[n][0]<=t&&e[n][1]>t)return!0;return!1},d.isReservedName=function(e,t){if(e)for(var n=0;n<e.length;++n)if(e[n]===t)return!0;return!1},Object.defineProperty(d.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=l.toArray(this.nested))}}),d.prototype.toJSON=function(e){return l.toObject(["options",this.options,"nested",c(this.nestedArray,e)])},d.prototype.addJSON=function(e){if(e)for(var t,n=Object.keys(e),r=0;r<n.length;++r)t=e[n[r]],this.add((void 0!==t.fields?i.fromJSON:void 0!==t.values?o.fromJSON:void 0!==t.methods?a.fromJSON:void 0!==t.id?s.fromJSON:d.fromJSON)(n[r],t));return this},d.prototype.get=function(e){return this.nested&&this.nested[e]||null},d.prototype.getEnum=function(e){if(this.nested&&this.nested[e]instanceof o)return this.nested[e].values;throw Error("no such enum: "+e)},d.prototype.add=function(e){if(!(e instanceof s&&void 0!==e.extend||e instanceof i||e instanceof u||e instanceof o||e instanceof a||e instanceof d))throw TypeError("object must be a valid nested object");if(this.nested){var t=this.get(e.name);if(t){if(!(t instanceof d&&e instanceof d)||t instanceof i||t instanceof a)throw Error("duplicate name '"+e.name+"' in "+this);for(var n=t.nestedArray,r=0;r<n.length;++r)e.add(n[r]);this.remove(t),this.nested||(this.nested={}),e.setOptions(t.options,!0)}}else this.nested={};return this.nested[e.name]=e,e.onAdd(this),h(this)},d.prototype.remove=function(e){if(!(e instanceof r))throw TypeError("object must be a ReflectionObject");if(e.parent!==this)throw Error(e+" is not a member of "+this);return delete this.nested[e.name],Object.keys(this.nested).length||(this.nested=void 0),e.onRemove(this),h(this)},d.prototype.define=function(e,t){if(l.isString(e))e=e.split(".");else if(!Array.isArray(e))throw TypeError("illegal path");if(e&&e.length&&""===e[0])throw Error("path must be relative");for(var n=this;e.length>0;){var r=e.shift();if(n.nested&&n.nested[r]){if(!((n=n.nested[r])instanceof d))throw Error("path conflicts with non-namespace objects")}else n.add(n=new d(r))}return t&&n.addJSON(t),n},d.prototype.resolveAll=function(){for(var e=this.nestedArray,t=0;t<e.length;)e[t]instanceof d?e[t++].resolveAll():e[t++].resolve();return this.resolve()},d.prototype.lookup=function(e,t,n){if("boolean"==typeof t?(n=t,t=void 0):t&&!Array.isArray(t)&&(t=[t]),l.isString(e)&&e.length){if("."===e)return this.root;e=e.split(".")}else if(!e.length)return this;if(""===e[0])return this.root.lookup(e.slice(1),t);var r=this.get(e[0]);if(r){if(1===e.length){if(!t||t.indexOf(r.constructor)>-1)return r}else if(r instanceof d&&(r=r.lookup(e.slice(1),t,!0)))return r}else for(var i=0;i<this.nestedArray.length;++i)if(this._nestedArray[i]instanceof d&&(r=this._nestedArray[i].lookup(e,t,!0)))return r;return null===this.parent||n?null:this.parent.lookup(e,t)},d.prototype.lookupType=function(e){var t=this.lookup(e,[i]);if(!t)throw Error("no such type: "+e);return t},d.prototype.lookupEnum=function(e){var t=this.lookup(e,[o]);if(!t)throw Error("no such Enum '"+e+"' in "+this);return t},d.prototype.lookupTypeOrEnum=function(e){var t=this.lookup(e,[i,o]);if(!t)throw Error("no such Type or Enum '"+e+"' in "+this);return t},d.prototype.lookupService=function(e){var t=this.lookup(e,[a]);if(!t)throw Error("no such Service '"+e+"' in "+this);return t},d._configure=function(e,t,n){i=e,a=t,o=n}},4349:(e,t,n)=>{"use strict";e.exports=a,a.className="ReflectionObject";var r,i=n(6866);function a(e,t){if(!i.isString(e))throw TypeError("name must be a string");if(t&&!i.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(a.prototype,{root:{get:function(){for(var e=this;null!==e.parent;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}}),a.prototype.toJSON=function(){throw Error()},a.prototype.onAdd=function(e){this.parent&&this.parent!==e&&this.parent.remove(this),this.parent=e,this.resolved=!1;var t=e.root;t instanceof r&&t._handleAdd(this)},a.prototype.onRemove=function(e){var t=e.root;t instanceof r&&t._handleRemove(this),this.parent=null,this.resolved=!1},a.prototype.resolve=function(){return this.resolved||this.root instanceof r&&(this.resolved=!0),this},a.prototype.getOption=function(e){if(this.options)return this.options[e]},a.prototype.setOption=function(e,t,n){return n&&this.options&&void 0!==this.options[e]||((this.options||(this.options={}))[e]=t),this},a.prototype.setParsedOption=function(e,t,n){this.parsedOptions||(this.parsedOptions=[]);var r=this.parsedOptions;if(n){var a=r.find((function(t){return Object.prototype.hasOwnProperty.call(t,e)}));if(a){var o=a[e];i.setProperty(o,n,t)}else(a={})[e]=i.setProperty({},n,t),r.push(a)}else{var s={};s[e]=t,r.push(s)}return this},a.prototype.setOptions=function(e,t){if(e)for(var n=Object.keys(e),r=0;r<n.length;++r)this.setOption(n[r],e[n[r]],t);return this},a.prototype.toString=function(){var e=this.constructor.className,t=this.fullName;return t.length?e+" "+t:e},a._configure=function(e){r=e}},8957:(e,t,n)=>{"use strict";e.exports=o;var r=n(4349);((o.prototype=Object.create(r.prototype)).constructor=o).className="OneOf";var i=n(3796),a=n(6866);function o(e,t,n,i){if(Array.isArray(t)||(n=t,t=void 0),r.call(this,e,n),void 0!==t&&!Array.isArray(t))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=i}function s(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}o.fromJSON=function(e,t){return new o(e,t.oneof,t.options,t.comment)},o.prototype.toJSON=function(e){var t=!!e&&Boolean(e.keepComments);return a.toObject(["options",this.options,"oneof",this.oneof,"comment",t?this.comment:void 0])},o.prototype.add=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");return e.parent&&e.parent!==this.parent&&e.parent.remove(e),this.oneof.push(e.name),this.fieldsArray.push(e),e.partOf=this,s(this),this},o.prototype.remove=function(e){if(!(e instanceof i))throw TypeError("field must be a Field");var t=this.fieldsArray.indexOf(e);if(t<0)throw Error(e+" is not a member of "+this);return this.fieldsArray.splice(t,1),(t=this.oneof.indexOf(e.name))>-1&&this.oneof.splice(t,1),e.partOf=null,this},o.prototype.onAdd=function(e){r.prototype.onAdd.call(this,e);for(var t=0;t<this.oneof.length;++t){var n=e.get(this.oneof[t]);n&&!n.partOf&&(n.partOf=this,this.fieldsArray.push(n))}s(this)},o.prototype.onRemove=function(e){for(var t,n=0;n<this.fieldsArray.length;++n)(t=this.fieldsArray[n]).parent&&t.parent.remove(t);r.prototype.onRemove.call(this,e)},o.d=function(){for(var e=new Array(arguments.length),t=0;t<arguments.length;)e[t]=arguments[t++];return function(t,n){a.decorateType(t.constructor).add(new o(n,e)),Object.defineProperty(t,n,{get:a.oneOfGetter(e),set:a.oneOfSetter(e)})}}},1137:(e,t,n)=>{"use strict";e.exports=l;var r,i=n(5382),a=i.LongBits,o=i.utf8;function s(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function l(e){this.buf=e,this.pos=0,this.len=e.length}var u,c="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new l(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new l(e);throw Error("illegal buffer")},d=function(){return i.Buffer?function(e){return(l.create=function(e){return i.Buffer.isBuffer(e)?new r(e):c(e)})(e)}:c};function h(){var e=new a(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw s(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw s(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function p(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw s(this,8);return new a(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}l.create=d(),l.prototype._slice=i.Array.prototype.subarray||i.Array.prototype.slice,l.prototype.uint32=(u=4294967295,function(){if(u=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return u;if(u=(u|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return u;if((this.pos+=5)>this.len)throw this.pos=this.len,s(this,10);return u}),l.prototype.int32=function(){return 0|this.uint32()},l.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},l.prototype.bool=function(){return 0!==this.uint32()},l.prototype.fixed32=function(){if(this.pos+4>this.len)throw s(this,4);return p(this.buf,this.pos+=4)},l.prototype.sfixed32=function(){if(this.pos+4>this.len)throw s(this,4);return 0|p(this.buf,this.pos+=4)},l.prototype.float=function(){if(this.pos+4>this.len)throw s(this,4);var e=i.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},l.prototype.double=function(){if(this.pos+8>this.len)throw s(this,4);var e=i.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},l.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw s(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(t,n);if(t===n){var r=i.Buffer;return r?r.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,t,n)},l.prototype.string=function(){var e=this.bytes();return o.read(e,0,e.length)},l.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw s(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw s(this)}while(128&this.buf[this.pos++]);return this},l.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},l._configure=function(e){r=e,l.create=d(),r._configure();var t=i.Long?"toLong":"toNumber";i.merge(l.prototype,{int64:function(){return h.call(this)[t](!1)},uint64:function(){return h.call(this)[t](!0)},sint64:function(){return h.call(this).zzDecode()[t](!1)},fixed64:function(){return f.call(this)[t](!0)},sfixed64:function(){return f.call(this)[t](!1)}})}},4010:(e,t,n)=>{"use strict";e.exports=a;var r=n(1137);(a.prototype=Object.create(r.prototype)).constructor=a;var i=n(5382);function a(e){r.call(this,e)}a._configure=function(){i.Buffer&&(a.prototype._slice=i.Buffer.prototype.slice)},a.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},a._configure()},8038:(e,t,n)=>{"use strict";e.exports=d;var r=n(2815);((d.prototype=Object.create(r.prototype)).constructor=d).className="Root";var i,a,o,s=n(3796),l=n(2775),u=n(8957),c=n(6866);function d(e){r.call(this,"",e),this.deferred=[],this.files=[]}function h(){}d.fromJSON=function(e,t){return t||(t=new d),e.options&&t.setOptions(e.options),t.addJSON(e.nested)},d.prototype.resolvePath=c.path.resolve,d.prototype.fetch=c.fetch,d.prototype.load=function e(t,n,r){"function"==typeof n&&(r=n,n=void 0);var i=this;if(!r)return c.asPromise(e,i,t,n);var s=r===h;function l(e,t){if(r){if(s)throw e;var n=r;r=null,n(e,t)}}function u(e){var t=e.lastIndexOf("google/protobuf/");if(t>-1){var n=e.substring(t);if(n in o)return n}return null}function d(e,t){try{if(c.isString(t)&&"{"===t.charAt(0)&&(t=JSON.parse(t)),c.isString(t)){a.filename=e;var r,o=a(t,i,n),d=0;if(o.imports)for(;d<o.imports.length;++d)(r=u(o.imports[d])||i.resolvePath(e,o.imports[d]))&&p(r);if(o.weakImports)for(d=0;d<o.weakImports.length;++d)(r=u(o.weakImports[d])||i.resolvePath(e,o.weakImports[d]))&&p(r,!0)}else i.setOptions(t.options).addJSON(t.nested)}catch(e){l(e)}s||f||l(null,i)}function p(e,t){if(e=u(e)||e,!(i.files.indexOf(e)>-1))if(i.files.push(e),e in o)s?d(e,o[e]):(++f,setTimeout((function(){--f,d(e,o[e])})));else if(s){var n;try{n=c.fs.readFileSync(e).toString("utf8")}catch(e){return void(t||l(e))}d(e,n)}else++f,i.fetch(e,(function(n,a){--f,r&&(n?t?f||l(null,i):l(n):d(e,a))}))}var f=0;c.isString(t)&&(t=[t]);for(var m,g=0;g<t.length;++g)(m=i.resolvePath("",t[g]))&&p(m);if(s)return i;f||l(null,i)},d.prototype.loadSync=function(e,t){if(!c.isNode)throw Error("not supported");return this.load(e,t,h)},d.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(e){return"'extend "+e.extend+"' in "+e.parent.fullName})).join(", "));return r.prototype.resolveAll.call(this)};var p=/^[A-Z]/;function f(e,t){var n=t.parent.lookup(t.extend);if(n){var r=new s(t.fullName,t.id,t.type,t.rule,void 0,t.options);return n.get(r.name)||(r.declaringField=t,t.extensionField=r,n.add(r)),!0}return!1}d.prototype._handleAdd=function(e){if(e instanceof s)void 0===e.extend||e.extensionField||f(0,e)||this.deferred.push(e);else if(e instanceof l)p.test(e.name)&&(e.parent[e.name]=e.values);else if(!(e instanceof u)){if(e instanceof i)for(var t=0;t<this.deferred.length;)f(0,this.deferred[t])?this.deferred.splice(t,1):++t;for(var n=0;n<e.nestedArray.length;++n)this._handleAdd(e._nestedArray[n]);p.test(e.name)&&(e.parent[e.name]=e)}},d.prototype._handleRemove=function(e){if(e instanceof s){if(void 0!==e.extend)if(e.extensionField)e.extensionField.parent.remove(e.extensionField),e.extensionField=null;else{var t=this.deferred.indexOf(e);t>-1&&this.deferred.splice(t,1)}}else if(e instanceof l)p.test(e.name)&&delete e.parent[e.name];else if(e instanceof r){for(var n=0;n<e.nestedArray.length;++n)this._handleRemove(e._nestedArray[n]);p.test(e.name)&&delete e.parent[e.name]}},d._configure=function(e,t,n){i=e,a=t,o=n}},381:e=>{"use strict";e.exports={}},9691:(e,t,n)=>{"use strict";t.Service=n(4447)},4447:(e,t,n)=>{"use strict";e.exports=i;var r=n(5382);function i(e,t,n){if("function"!=typeof e)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=Boolean(t),this.responseDelimited=Boolean(n)}(i.prototype=Object.create(r.EventEmitter.prototype)).constructor=i,i.prototype.rpcCall=function e(t,n,i,a,o){if(!a)throw TypeError("request must be specified");var s=this;if(!o)return r.asPromise(e,s,t,n,i,a);if(s.rpcImpl)try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](a).finish(),(function(e,n){if(e)return s.emit("error",e,t),o(e);if(null!==n){if(!(n instanceof i))try{n=i[s.responseDelimited?"decodeDelimited":"decode"](n)}catch(e){return s.emit("error",e,t),o(e)}return s.emit("data",n,t),o(null,n)}s.end(!0)}))}catch(e){return s.emit("error",e,t),void setTimeout((function(){o(e)}),0)}else setTimeout((function(){o(Error("already ended"))}),0)},i.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},6467:(e,t,n)=>{"use strict";e.exports=s;var r=n(2815);((s.prototype=Object.create(r.prototype)).constructor=s).className="Service";var i=n(3055),a=n(6866),o=n(9691);function s(e,t){r.call(this,e,t),this.methods={},this._methodsArray=null}function l(e){return e._methodsArray=null,e}s.fromJSON=function(e,t){var n=new s(e,t.options);if(t.methods)for(var r=Object.keys(t.methods),a=0;a<r.length;++a)n.add(i.fromJSON(r[a],t.methods[r[a]]));return t.nested&&n.addJSON(t.nested),n.comment=t.comment,n},s.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return a.toObject(["options",t&&t.options||void 0,"methods",r.arrayToJSON(this.methodsArray,e)||{},"nested",t&&t.nested||void 0,"comment",n?this.comment:void 0])},Object.defineProperty(s.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=a.toArray(this.methods))}}),s.prototype.get=function(e){return this.methods[e]||r.prototype.get.call(this,e)},s.prototype.resolveAll=function(){for(var e=this.methodsArray,t=0;t<e.length;++t)e[t].resolve();return r.prototype.resolve.call(this)},s.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);return e instanceof i?(this.methods[e.name]=e,e.parent=this,l(this)):r.prototype.add.call(this,e)},s.prototype.remove=function(e){if(e instanceof i){if(this.methods[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.methods[e.name],e.parent=null,l(this)}return r.prototype.remove.call(this,e)},s.prototype.create=function(e,t,n){for(var r,i=new o.Service(e,t,n),s=0;s<this.methodsArray.length;++s){var l=a.lcFirst((r=this._methodsArray[s]).resolve().name).replace(/[^$\w_]/g,"");i[l]=a.codegen(["r","c"],a.isReserved(l)?l+"_":l)("return this.rpcCall(m,q,s,r,c)")({m:r,q:r.resolvedRequestType.ctor,s:r.resolvedResponseType.ctor})}return i}},6:(e,t,n)=>{"use strict";e.exports=y;var r=n(2815);((y.prototype=Object.create(r.prototype)).constructor=y).className="Type";var i=n(2775),a=n(8957),o=n(3796),s=n(9504),l=n(6467),u=n(9e3),c=n(1137),d=n(4301),h=n(6866),p=n(8852),f=n(9980),m=n(3040),g=n(3804),v=n(6942);function y(e,t){r.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}function b(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Object.defineProperties(y.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var n=this.fields[e[t]],r=n.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=n}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=h.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=h.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=y.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof u||((e.prototype=new u).constructor=e,h.merge(e.prototype,t)),e.$type=e.prototype.$type=this,h.merge(e,u,!0),this._ctor=e;for(var n=0;n<this.fieldsArray.length;++n)this._fieldsArray[n].resolve();var r={};for(n=0;n<this.oneofsArray.length;++n)r[this._oneofsArray[n].resolve().name]={get:h.oneOfGetter(this._oneofsArray[n].oneof),set:h.oneOfSetter(this._oneofsArray[n].oneof)};n&&Object.defineProperties(e.prototype,r)}}}),y.generateConstructor=function(e){for(var t,n=h.codegen(["p"],e.name),r=0;r<e.fieldsArray.length;++r)(t=e._fieldsArray[r]).map?n("this%s={}",h.safeProp(t.name)):t.repeated&&n("this%s=[]",h.safeProp(t.name));return n("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},y.fromJSON=function(e,t){var n=new y(e,t.options);n.extensions=t.extensions,n.reserved=t.reserved;for(var u=Object.keys(t.fields),c=0;c<u.length;++c)n.add((void 0!==t.fields[u[c]].keyType?s.fromJSON:o.fromJSON)(u[c],t.fields[u[c]]));if(t.oneofs)for(u=Object.keys(t.oneofs),c=0;c<u.length;++c)n.add(a.fromJSON(u[c],t.oneofs[u[c]]));if(t.nested)for(u=Object.keys(t.nested),c=0;c<u.length;++c){var d=t.nested[u[c]];n.add((void 0!==d.id?o.fromJSON:void 0!==d.fields?y.fromJSON:void 0!==d.values?i.fromJSON:void 0!==d.methods?l.fromJSON:r.fromJSON)(u[c],d))}return t.extensions&&t.extensions.length&&(n.extensions=t.extensions),t.reserved&&t.reserved.length&&(n.reserved=t.reserved),t.group&&(n.group=!0),t.comment&&(n.comment=t.comment),n},y.prototype.toJSON=function(e){var t=r.prototype.toJSON.call(this,e),n=!!e&&Boolean(e.keepComments);return h.toObject(["options",t&&t.options||void 0,"oneofs",r.arrayToJSON(this.oneofsArray,e),"fields",r.arrayToJSON(this.fieldsArray.filter((function(e){return!e.declaringField})),e)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",t&&t.nested||void 0,"comment",n?this.comment:void 0])},y.prototype.resolveAll=function(){for(var e=this.fieldsArray,t=0;t<e.length;)e[t++].resolve();var n=this.oneofsArray;for(t=0;t<n.length;)n[t++].resolve();return r.prototype.resolveAll.call(this)},y.prototype.get=function(e){return this.fields[e]||this.oneofs&&this.oneofs[e]||this.nested&&this.nested[e]||null},y.prototype.add=function(e){if(this.get(e.name))throw Error("duplicate name '"+e.name+"' in "+this);if(e instanceof o&&void 0===e.extend){if(this._fieldsById?this._fieldsById[e.id]:this.fieldsById[e.id])throw Error("duplicate id "+e.id+" in "+this);if(this.isReservedId(e.id))throw Error("id "+e.id+" is reserved in "+this);if(this.isReservedName(e.name))throw Error("name '"+e.name+"' is reserved in "+this);return e.parent&&e.parent.remove(e),this.fields[e.name]=e,e.message=this,e.onAdd(this),b(this)}return e instanceof a?(this.oneofs||(this.oneofs={}),this.oneofs[e.name]=e,e.onAdd(this),b(this)):r.prototype.add.call(this,e)},y.prototype.remove=function(e){if(e instanceof o&&void 0===e.extend){if(!this.fields||this.fields[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.fields[e.name],e.parent=null,e.onRemove(this),b(this)}if(e instanceof a){if(!this.oneofs||this.oneofs[e.name]!==e)throw Error(e+" is not a member of "+this);return delete this.oneofs[e.name],e.parent=null,e.onRemove(this),b(this)}return r.prototype.remove.call(this,e)},y.prototype.isReservedId=function(e){return r.isReservedId(this.reserved,e)},y.prototype.isReservedName=function(e){return r.isReservedName(this.reserved,e)},y.prototype.create=function(e){return new this.ctor(e)},y.prototype.setup=function(){for(var e=this.fullName,t=[],n=0;n<this.fieldsArray.length;++n)t.push(this._fieldsArray[n].resolve().resolvedType);this.encode=p(this)({Writer:d,types:t,util:h}),this.decode=f(this)({Reader:c,types:t,util:h}),this.verify=m(this)({types:t,util:h}),this.fromObject=g.fromObject(this)({types:t,util:h}),this.toObject=g.toObject(this)({types:t,util:h});var r=v[e];if(r){var i=Object.create(this);i.fromObject=this.fromObject,this.fromObject=r.fromObject.bind(i),i.toObject=this.toObject,this.toObject=r.toObject.bind(i)}return this},y.prototype.encode=function(e,t){return this.setup().encode(e,t)},y.prototype.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},y.prototype.decode=function(e,t){return this.setup().decode(e,t)},y.prototype.decodeDelimited=function(e){return e instanceof c||(e=c.create(e)),this.decode(e,e.uint32())},y.prototype.verify=function(e){return this.setup().verify(e)},y.prototype.fromObject=function(e){return this.setup().fromObject(e)},y.prototype.toObject=function(e,t){return this.setup().toObject(e,t)},y.d=function(e){return function(t){h.decorateType(t,e)}}},1517:(e,t,n)=>{"use strict";var r=t,i=n(6866),a=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function o(e,t){var n=0,r={};for(t|=0;n<e.length;)r[a[n+t]]=e[n++];return r}r.basic=o([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),r.defaults=o([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",i.emptyArray,null]),r.long=o([0,0,0,1,1],7),r.mapKey=o([0,0,0,5,5,0,0,0,1,1,0,2],2),r.packed=o([1,5,0,0,0,5,5,0,0,0,1,1,0])},6866:(e,t,n)=>{"use strict";var r,i,a=e.exports=n(5382),o=n(381);a.codegen=n(7669),a.fetch=n(9240),a.path=n(2459),a.fs=a.inquire("fs"),a.toArray=function(e){if(e){for(var t=Object.keys(e),n=new Array(t.length),r=0;r<t.length;)n[r]=e[t[r++]];return n}return[]},a.toObject=function(e){for(var t={},n=0;n<e.length;){var r=e[n++],i=e[n++];void 0!==i&&(t[r]=i)}return t};var s=/\\/g,l=/"/g;a.isReserved=function(e){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(e)},a.safeProp=function(e){return!/^[$\w_]+$/.test(e)||a.isReserved(e)?'["'+e.replace(s,"\\\\").replace(l,'\\"')+'"]':"."+e},a.ucFirst=function(e){return e.charAt(0).toUpperCase()+e.substring(1)};var u=/_([a-z])/g;a.camelCase=function(e){return e.substring(0,1)+e.substring(1).replace(u,(function(e,t){return t.toUpperCase()}))},a.compareFieldsById=function(e,t){return e.id-t.id},a.decorateType=function(e,t){if(e.$type)return t&&e.$type.name!==t&&(a.decorateRoot.remove(e.$type),e.$type.name=t,a.decorateRoot.add(e.$type)),e.$type;r||(r=n(6));var i=new r(t||e.name);return a.decorateRoot.add(i),i.ctor=e,Object.defineProperty(e,"$type",{value:i,enumerable:!1}),Object.defineProperty(e.prototype,"$type",{value:i,enumerable:!1}),i};var c=0;a.decorateEnum=function(e){if(e.$type)return e.$type;i||(i=n(2775));var t=new i("Enum"+c++,e);return a.decorateRoot.add(t),Object.defineProperty(e,"$type",{value:t,enumerable:!1}),t},a.setProperty=function(e,t,n){if("object"!=typeof e)throw TypeError("dst must be an object");if(!t)throw TypeError("path must be specified");return function e(t,n,r){var i=n.shift();if("__proto__"===i||"prototype"===i)return t;if(n.length>0)t[i]=e(t[i]||{},n,r);else{var a=t[i];a&&(r=[].concat(a).concat(r)),t[i]=r}return t}(e,t=t.split("."),n)},Object.defineProperty(a,"decorateRoot",{get:function(){return o.decorated||(o.decorated=new(n(8038)))}})},5003:(e,t,n)=>{"use strict";e.exports=i;var r=n(5382);function i(e,t){this.lo=e>>>0,this.hi=t>>>0}var a=i.zero=new i(0,0);a.toNumber=function(){return 0},a.zzEncode=a.zzDecode=function(){return this},a.length=function(){return 1};var o=i.zeroHash="\0\0\0\0\0\0\0\0";i.fromNumber=function(e){if(0===e)return a;var t=e<0;t&&(e=-e);var n=e>>>0,r=(e-n)/4294967296>>>0;return t&&(r=~r>>>0,n=~n>>>0,++n>4294967295&&(n=0,++r>4294967295&&(r=0))),new i(n,r)},i.from=function(e){if("number"==typeof e)return i.fromNumber(e);if(r.isString(e)){if(!r.Long)return i.fromNumber(parseInt(e,10));e=r.Long.fromString(e)}return e.low||e.high?new i(e.low>>>0,e.high>>>0):a},i.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},i.prototype.toLong=function(e){return r.Long?new r.Long(0|this.lo,0|this.hi,Boolean(e)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(e)}};var s=String.prototype.charCodeAt;i.fromHash=function(e){return e===o?a:new i((s.call(e,0)|s.call(e,1)<<8|s.call(e,2)<<16|s.call(e,3)<<24)>>>0,(s.call(e,4)|s.call(e,5)<<8|s.call(e,6)<<16|s.call(e,7)<<24)>>>0)},i.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},i.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},i.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},i.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10}},5382:function(e,t,n){"use strict";var r=t;function i(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;++i)void 0!==e[r[i]]&&n||(e[r[i]]=t[r[i]]);return e}function a(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&i(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}r.asPromise=n(6233),r.base64=n(1979),r.EventEmitter=n(3474),r.float=n(5750),r.inquire=n(1925),r.utf8=n(2971),r.pool=n(4226),r.LongBits=n(5003),r.isNode=Boolean(void 0!==n.g&&n.g&&n.g.process&&n.g.process.versions&&n.g.process.versions.node),r.global=r.isNode&&n.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,r.emptyArray=Object.freeze?Object.freeze([]):[],r.emptyObject=Object.freeze?Object.freeze({}):{},r.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},r.isString=function(e){return"string"==typeof e||e instanceof String},r.isObject=function(e){return e&&"object"==typeof e},r.isset=r.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},r.Buffer=function(){try{var e=r.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(e){return"number"==typeof e?r.Buffer?r._Buffer_allocUnsafe(e):new r.Array(e):r.Buffer?r._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},r.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(e){return e?r.LongBits.from(e).toHash():r.LongBits.zeroHash},r.longFromHash=function(e,t){var n=r.LongBits.fromHash(e);return r.Long?r.Long.fromBits(n.lo,n.hi,t):n.toNumber(Boolean(t))},r.merge=i,r.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},r.newError=a,r.ProtocolError=a("ProtocolError"),r.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},r.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},r.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},r._configure=function(){var e=r.Buffer;e?(r._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},r._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):r._Buffer_from=r._Buffer_allocUnsafe=null}},3040:(e,t,n)=>{"use strict";e.exports=function(e){var t=i.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),n=e.oneofsArray,r={};n.length&&t("var p={}");for(var l=0;l<e.fieldsArray.length;++l){var u=e._fieldsArray[l].resolve(),c="m"+i.safeProp(u.name);if(u.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",c,u.name),u.map)t("if(!util.isObject(%s))",c)("return%j",a(u,"object"))("var k=Object.keys(%s)",c)("for(var i=0;i<k.length;++i){"),s(t,u,"k[i]"),o(t,u,l,c+"[k[i]]")("}");else if(u.repeated)t("if(!Array.isArray(%s))",c)("return%j",a(u,"array"))("for(var i=0;i<%s.length;++i){",c),o(t,u,l,c+"[i]")("}");else{if(u.partOf){var d=i.safeProp(u.partOf.name);1===r[u.partOf.name]&&t("if(p%s===1)",d)("return%j",u.partOf.name+": multiple values"),r[u.partOf.name]=1,t("p%s=1",d)}o(t,u,l,c)}u.optional&&t("}")}return t("return null")};var r=n(2775),i=n(6866);function a(e,t){return e.name+": "+t+(e.repeated&&"array"!==t?"[]":e.map&&"object"!==t?"{k:"+e.keyType+"}":"")+" expected"}function o(e,t,n,i){if(t.resolvedType)if(t.resolvedType instanceof r){e("switch(%s){",i)("default:")("return%j",a(t,"enum value"));for(var o=Object.keys(t.resolvedType.values),s=0;s<o.length;++s)e("case %i:",t.resolvedType.values[o[s]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",n,i)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",i)("return%j",a(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",i,i,i,i)("return%j",a(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',i)("return%j",a(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',i)("return%j",a(t,"boolean"));break;case"string":e("if(!util.isString(%s))",i)("return%j",a(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',i,i,i)("return%j",a(t,"buffer"))}return e}function s(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",n)("return%j",a(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",n)("return%j",a(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",n)("return%j",a(t,"boolean key"))}return e}},6942:(e,t,n)=>{"use strict";var r=t,i=n(9e3);r[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),n=this.lookup(t);if(n){var r="."===e["@type"].charAt(0)?e["@type"].slice(1):e["@type"];return-1===r.indexOf("/")&&(r="/"+r),this.create({type_url:r,value:n.encode(n.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var n="",r="";if(t&&t.json&&e.type_url&&e.value){r=e.type_url.substring(e.type_url.lastIndexOf("/")+1),n=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var a=this.lookup(r);a&&(e=a.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof i){var o=e.$type.toObject(e,t);return""===n&&(n="type.googleapis.com/"),r=n+("."===e.$type.fullName[0]?e.$type.fullName.slice(1):e.$type.fullName),o["@type"]=r,o}return this.toObject(e,t)}}},4301:(e,t,n)=>{"use strict";e.exports=d;var r,i=n(5382),a=i.LongBits,o=i.base64,s=i.utf8;function l(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function u(){}function c(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function d(){this.len=0,this.head=new l(u,0,0),this.tail=this.head,this.states=null}var h=function(){return i.Buffer?function(){return(d.create=function(){return new r})()}:function(){return new d}};function p(e,t,n){t[n]=255&e}function f(e,t){this.len=e,this.next=void 0,this.val=t}function m(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function g(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}d.create=h(),d.alloc=function(e){return new i.Array(e)},i.Array!==Array&&(d.alloc=i.pool(d.alloc,i.Array.prototype.subarray)),d.prototype._push=function(e,t,n){return this.tail=this.tail.next=new l(e,t,n),this.len+=t,this},f.prototype=Object.create(l.prototype),f.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},d.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new f((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},d.prototype.int32=function(e){return e<0?this._push(m,10,a.fromNumber(e)):this.uint32(e)},d.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},d.prototype.uint64=function(e){var t=a.from(e);return this._push(m,t.length(),t)},d.prototype.int64=d.prototype.uint64,d.prototype.sint64=function(e){var t=a.from(e).zzEncode();return this._push(m,t.length(),t)},d.prototype.bool=function(e){return this._push(p,1,e?1:0)},d.prototype.fixed32=function(e){return this._push(g,4,e>>>0)},d.prototype.sfixed32=d.prototype.fixed32,d.prototype.fixed64=function(e){var t=a.from(e);return this._push(g,4,t.lo)._push(g,4,t.hi)},d.prototype.sfixed64=d.prototype.fixed64,d.prototype.float=function(e){return this._push(i.float.writeFloatLE,4,e)},d.prototype.double=function(e){return this._push(i.float.writeDoubleLE,8,e)};var v=i.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};d.prototype.bytes=function(e){var t=e.length>>>0;if(!t)return this._push(p,1,0);if(i.isString(e)){var n=d.alloc(t=o.length(e));o.decode(e,n,0),e=n}return this.uint32(t)._push(v,t,e)},d.prototype.string=function(e){var t=s.length(e);return t?this.uint32(t)._push(s.write,t,e):this._push(p,1,0)},d.prototype.fork=function(){return this.states=new c(this),this.head=this.tail=new l(u,0,0),this.len=0,this},d.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new l(u,0,0),this.len=0),this},d.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},d.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},d._configure=function(e){r=e,d.create=h(),r._configure()}},8422:(e,t,n)=>{"use strict";e.exports=a;var r=n(4301);(a.prototype=Object.create(r.prototype)).constructor=a;var i=n(5382);function a(){r.call(this)}function o(e,t,n){e.length<40?i.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}a._configure=function(){a.alloc=i._Buffer_allocUnsafe,a.writeBytesBuffer=i.Buffer&&i.Buffer.prototype instanceof Uint8Array&&"set"===i.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},a.prototype.bytes=function(e){i.isString(e)&&(e=i._Buffer_from(e,"base64"));var t=e.length>>>0;return this.uint32(t),t&&this._push(a.writeBytesBuffer,t,e),this},a.prototype.string=function(e){var t=i.Buffer.byteLength(e);return this.uint32(t),t&&this._push(o,t,e),this},a._configure()},9111:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(5959)),i=h(n(2688)),a=h(n(8398)),o=h(n(8262)),s=n(2837),l=n(402),u=n(6732),c=h(n(1060)),d=h(n(7988));function h(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f.apply(this,arguments)}function m(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class g extends r.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),m(this,"onDragStart",((e,t)=>{(0,d.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,l.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})})),m(this,"onDrag",((e,t)=>{if(!this.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",t);const n=(0,l.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[i,a]=(0,l.getBoundPosition)(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)})),m(this,"onDragStop",((e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,l.createDraggableData)(this,t)))return!1;(0,d.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)})),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var e,t;return null!==(e=null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current)&&void 0!==e?e:a.default.findDOMNode(this)}render(){const{axis:e,bounds:t,children:n,defaultPosition:i,defaultClassName:a,defaultClassNameDragging:u,defaultClassNameDragged:d,position:h,positionOffset:p,scale:m,...g}=this.props;let v={},y=null;const b=!Boolean(h)||this.state.dragging,w=h||i,S={x:(0,l.canDragX)(this)&&b?this.state.x:w.x,y:(0,l.canDragY)(this)&&b?this.state.y:w.y};this.state.isElementSVG?y=(0,s.createSVGTransform)(S,p):v=(0,s.createCSSTransform)(S,p);const x=(0,o.default)(n.props.className||"",a,{[u]:this.state.dragging,[d]:this.state.dragged});return r.createElement(c.default,f({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),r.cloneElement(r.Children.only(n),{className:x,style:{...n.props.style,...v},transform:y}))}}t.default=g,m(g,"displayName","Draggable"),m(g,"propTypes",{...c.default.propTypes,axis:i.default.oneOf(["both","x","y","none"]),bounds:i.default.oneOfType([i.default.shape({left:i.default.number,right:i.default.number,top:i.default.number,bottom:i.default.number}),i.default.string,i.default.oneOf([!1])]),defaultClassName:i.default.string,defaultClassNameDragging:i.default.string,defaultClassNameDragged:i.default.string,defaultPosition:i.default.shape({x:i.default.number,y:i.default.number}),positionOffset:i.default.shape({x:i.default.oneOfType([i.default.number,i.default.string]),y:i.default.oneOfType([i.default.number,i.default.string])}),position:i.default.shape({x:i.default.number,y:i.default.number}),className:u.dontSetMe,style:u.dontSetMe,transform:u.dontSetMe}),m(g,"defaultProps",{...c.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})},1060:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(5959)),i=c(n(2688)),a=c(n(8398)),o=n(2837),s=n(402),l=n(6732),u=c(n(7988));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p={start:"touchstart",move:"touchmove",stop:"touchend"},f={start:"mousedown",move:"mousemove",stop:"mouseup"};let m=f;class g extends r.Component{constructor(){super(...arguments),h(this,"dragging",!1),h(this,"lastX",NaN),h(this,"lastY",NaN),h(this,"touchIdentifier",null),h(this,"mounted",!1),h(this,"handleDragStart",(e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,o.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,o.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"===e.type&&e.preventDefault();const r=(0,o.getTouchIdentifier)(e);this.touchIdentifier=r;const i=(0,s.getControlPosition)(e,r,this);if(null==i)return;const{x:a,y:l}=i,c=(0,s.createCoreData)(this,a,l);(0,u.default)("DraggableCore: handleDragStart: %j",c),(0,u.default)("calling",this.props.onStart);!1!==this.props.onStart(e,c)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,o.addUserSelectStyles)(n),this.dragging=!0,this.lastX=a,this.lastY=l,(0,o.addEvent)(n,m.move,this.handleDrag),(0,o.addEvent)(n,m.stop,this.handleDragStop))})),h(this,"handleDrag",(e=>{const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,s.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const i=(0,s.createCoreData)(this,n,r);(0,u.default)("DraggableCore: handleDrag: %j",i);if(!1!==this.props.onDrag(e,i)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}})),h(this,"handleDragStop",(e=>{if(!this.dragging)return;const t=(0,s.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,s.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const i=(0,s.createCoreData)(this,n,r);if(!1===this.props.onStop(e,i)||!1===this.mounted)return!1;const a=this.findDOMNode();a&&this.props.enableUserSelectHack&&(0,o.removeUserSelectStyles)(a.ownerDocument),(0,u.default)("DraggableCore: handleDragStop: %j",i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&((0,u.default)("DraggableCore: Removing handlers"),(0,o.removeEvent)(a.ownerDocument,m.move,this.handleDrag),(0,o.removeEvent)(a.ownerDocument,m.stop,this.handleDragStop))})),h(this,"onMouseDown",(e=>(m=f,this.handleDragStart(e)))),h(this,"onMouseUp",(e=>(m=f,this.handleDragStop(e)))),h(this,"onTouchStart",(e=>(m=p,this.handleDragStart(e)))),h(this,"onTouchEnd",(e=>(m=p,this.handleDragStop(e))))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,o.addEvent)(e,p.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,o.removeEvent)(t,f.move,this.handleDrag),(0,o.removeEvent)(t,p.move,this.handleDrag),(0,o.removeEvent)(t,f.stop,this.handleDragStop),(0,o.removeEvent)(t,p.stop,this.handleDragStop),(0,o.removeEvent)(e,p.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,o.removeUserSelectStyles)(t)}}findDOMNode(){var e,t;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(t=t.nodeRef)||void 0===t?void 0:t.current:a.default.findDOMNode(this)}render(){return r.cloneElement(r.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}t.default=g,h(g,"displayName","DraggableCore"),h(g,"propTypes",{allowAnyClick:i.default.bool,children:i.default.node.isRequired,disabled:i.default.bool,enableUserSelectHack:i.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:i.default.arrayOf(i.default.number),handle:i.default.string,cancel:i.default.string,nodeRef:i.default.object,onStart:i.default.func,onDrag:i.default.func,onStop:i.default.func,onMouseDown:i.default.func,scale:i.default.number,className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),h(g,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},8230:(e,t,n)=>{"use strict";const{default:r,DraggableCore:i}=n(9111);e.exports=r,e.exports.default=r,e.exports.DraggableCore=i},2837:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addClassName=u,t.addEvent=function(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,i):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&u(e.body,"react-draggable-transparent-selection")},t.createCSSTransform=function(e,t){const n=l(e,t,"px");return{[(0,i.browserPrefixToKey)("transform",i.default)]:n}},t.createSVGTransform=function(e,t){return l(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,r.findInArray)(e.targetTouches,(e=>t===e.identifier))||e.changedTouches&&(0,r.findInArray)(e.changedTouches,(e=>t===e.identifier))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.getTranslation=l,t.innerHeight=function(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,r.int)(n.paddingTop),t-=(0,r.int)(n.paddingBottom),t},t.innerWidth=function(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,r.int)(n.paddingLeft),t-=(0,r.int)(n.paddingRight),t},t.matchesSelector=s,t.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(s(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),i=(e.clientX+t.scrollLeft-r.left)/n,a=(e.clientY+t.scrollTop-r.top)/n;return{x:i,y:a}},t.outerHeight=function(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,r.int)(n.borderTopWidth),t+=(0,r.int)(n.borderBottomWidth),t},t.outerWidth=function(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,r.int)(n.borderLeftWidth),t+=(0,r.int)(n.borderRightWidth),t},t.removeClassName=c,t.removeEvent=function(e,t,n,r){if(!e)return;const i={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&c(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}};var r=n(6732),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=a(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}r.default=e,n&&n.set(e,r);return r}(n(7350));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(a=function(e){return e?n:t})(e)}let o="";function s(e,t){return o||(o=(0,r.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,r.isFunction)(e[t])}))),!!(0,r.isFunction)(e[o])&&e[o](t)}function l(e,t,n){let{x:r,y:i}=e,a="translate(".concat(r).concat(n,",").concat(i).concat(n,")");if(t){const e="".concat("string"==typeof t.x?t.x:t.x+n),r="".concat("string"==typeof t.y?t.y:t.y+n);a="translate(".concat(e,", ").concat(r,")")+a}return a}function u(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function c(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}},7350:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.browserPrefixToKey=i,t.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},t.default=void 0,t.getPrefix=r;const n=["Moz","Webkit","O","ms"];function r(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const r=null===(e=window.document)||void 0===e||null===(e=e.documentElement)||void 0===e?void 0:e.style;if(!r)return"";if(t in r)return"";for(let e=0;e<n.length;e++)if(i(t,n[e])in r)return n[e];return""}function i(e,t){return t?"".concat(t).concat(function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}t.default=r()},7988:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){0}},402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},t.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},t.createCoreData=function(e,t,n){const i=!(0,r.isNum)(e.lastX),o=a(e);return i?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:o,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}},t.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},t.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:o}=e.props;o="string"==typeof o?o:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(o);const s=a(e);if("string"==typeof o){const{ownerDocument:e}=s,t=e.defaultView;let n;if(n="parent"===o?s.parentNode:e.querySelector(o),!(n instanceof t.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');const a=n,l=t.getComputedStyle(s),u=t.getComputedStyle(a);o={left:-s.offsetLeft+(0,r.int)(u.paddingLeft)+(0,r.int)(l.marginLeft),top:-s.offsetTop+(0,r.int)(u.paddingTop)+(0,r.int)(l.marginTop),right:(0,i.innerWidth)(a)-(0,i.outerWidth)(s)-s.offsetLeft+(0,r.int)(u.paddingRight)-(0,r.int)(l.marginRight),bottom:(0,i.innerHeight)(a)-(0,i.outerHeight)(s)-s.offsetTop+(0,r.int)(u.paddingBottom)-(0,r.int)(l.marginBottom)}}(0,r.isNum)(o.right)&&(t=Math.min(t,o.right));(0,r.isNum)(o.bottom)&&(n=Math.min(n,o.bottom));(0,r.isNum)(o.left)&&(t=Math.max(t,o.left));(0,r.isNum)(o.top)&&(n=Math.max(n,o.top));return[t,n]},t.getControlPosition=function(e,t,n){const r="number"==typeof t?(0,i.getTouch)(e,t):null;if("number"==typeof t&&!r)return null;const o=a(n),s=n.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,i.offsetXYFromParent)(r||e,s,n.props.scale)},t.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],i=Math.round(n/e[1])*e[1];return[r,i]};var r=n(6732),i=n(2837);function a(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}},6732:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},t.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},t.int=function(e){return parseInt(e,10)},t.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},t.isNum=function(e){return"number"==typeof e&&!isNaN(e)}},8262:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function i(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}n.r(t),n.d(t,{clsx:()=>i,default:()=>a});const a=i},7383:e=>{var t="undefined"!=typeof Element,n="function"==typeof Map,r="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function a(e,o){if(e===o)return!0;if(e&&o&&"object"==typeof e&&"object"==typeof o){if(e.constructor!==o.constructor)return!1;var s,l,u,c;if(Array.isArray(e)){if((s=e.length)!=o.length)return!1;for(l=s;0!=l--;)if(!a(e[l],o[l]))return!1;return!0}if(n&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(c=e.entries();!(l=c.next()).done;)if(!o.has(l.value[0]))return!1;for(c=e.entries();!(l=c.next()).done;)if(!a(l.value[1],o.get(l.value[0])))return!1;return!0}if(r&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(c=e.entries();!(l=c.next()).done;)if(!o.has(l.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if((s=e.length)!=o.length)return!1;for(l=s;0!=l--;)if(e[l]!==o[l])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&"function"==typeof e.valueOf&&"function"==typeof o.valueOf)return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&"function"==typeof e.toString&&"function"==typeof o.toString)return e.toString()===o.toString();if((s=(u=Object.keys(e)).length)!==Object.keys(o).length)return!1;for(l=s;0!=l--;)if(!Object.prototype.hasOwnProperty.call(o,u[l]))return!1;if(t&&e instanceof Element)return!1;for(l=s;0!=l--;)if(("_owner"!==u[l]&&"__v"!==u[l]&&"__o"!==u[l]||!e.$$typeof)&&!a(e[u[l]],o[u[l]]))return!1;return!0}return e!=e&&o!=o}e.exports=function(e,t){try{return a(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},8100:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=h(n(5959)),a=h(n(2688)),o=n(8230),s=n(936),l=n(414),u=n(906),c=n(7222),d=h(n(7256));function h(e){return e&&e.__esModule?e:{default:e}}function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=b(e);if(t){var a=b(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return y(e)}(this,n)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(c,e);var t,n,r,a=v(c);function c(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w(y(e=a.call.apply(a,[this].concat(n))),"state",{resizing:null,dragging:null,className:""}),w(y(e),"elementRef",i.default.createRef()),w(y(e),"onDragStart",(function(t,n){var r=n.node,i=e.props,a=i.onDragStart,o=i.transformScale;if(a){var s={top:0,left:0},l=r.offsetParent;if(l){var c=l.getBoundingClientRect(),d=r.getBoundingClientRect(),h=d.left/o,p=c.left/o,f=d.top/o,m=c.top/o;s.left=h-p+l.scrollLeft,s.top=f-m+l.scrollTop,e.setState({dragging:s});var g=(0,u.calcXY)(e.getPositionParams(),s.top,s.left,e.props.w,e.props.h),v=g.x,b=g.y;return a.call(y(e),e.props.i,v,b,{e:t,node:r,newPosition:s})}}})),w(y(e),"onDrag",(function(t,n){var r=n.node,i=n.deltaX,a=n.deltaY,o=e.props.onDrag;if(o){if(!e.state.dragging)throw new Error("onDrag called before onDragStart.");var s=e.state.dragging.top+a,l=e.state.dragging.left+i,c=e.props,d=c.isBounded,h=c.i,p=c.w,f=c.h,m=c.containerWidth,g=e.getPositionParams();if(d){var v=r.offsetParent;if(v){var b=e.props,w=b.margin,S=b.rowHeight,x=v.clientHeight-(0,u.calcGridItemWHPx)(f,S,w[1]);s=(0,u.clamp)(s,0,x);var E=(0,u.calcGridColWidth)(g),_=m-(0,u.calcGridItemWHPx)(p,E,w[0]);l=(0,u.clamp)(l,0,_)}}var O={top:s,left:l};e.setState({dragging:O});var T=(0,u.calcXY)(g,s,l,p,f),k=T.x,C=T.y;return o.call(y(e),h,k,C,{e:t,node:r,newPosition:O})}})),w(y(e),"onDragStop",(function(t,n){var r=n.node,i=e.props.onDragStop;if(i){if(!e.state.dragging)throw new Error("onDragEnd called before onDragStart.");var a=e.props,o=a.w,s=a.h,l=a.i,c=e.state.dragging,d=c.left,h=c.top,p={top:h,left:d};e.setState({dragging:null});var f=(0,u.calcXY)(e.getPositionParams(),h,d,o,s),m=f.x,g=f.y;return i.call(y(e),l,m,g,{e:t,node:r,newPosition:p})}})),w(y(e),"onResizeStop",(function(t,n){e.onResizeHandler(t,n,"onResizeStop")})),w(y(e),"onResizeStart",(function(t,n){e.onResizeHandler(t,n,"onResizeStart")})),w(y(e),"onResize",(function(t,n){e.onResizeHandler(t,n,"onResize")})),e}return t=c,n=[{key:"shouldComponentUpdate",value:function(e,t){if(this.props.children!==e.children)return!0;if(this.props.droppingPosition!==e.droppingPosition)return!0;var n=(0,u.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,u.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,l.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}},{key:"componentDidMount",value:function(){this.moveDroppingItem({})}},{key:"componentDidUpdate",value:function(e){this.moveDroppingItem(e)}},{key:"moveDroppingItem",value:function(e){var t=this.props.droppingPosition;if(t){var n=this.elementRef.current;if(n){var r=e.droppingPosition||{left:0,top:0},i=this.state.dragging,a=i&&t.left!==r.left||t.top!==r.top;if(i){if(a){var o=t.left-i.left,s=t.top-i.top;this.onDrag(t.e,{node:n,deltaX:o,deltaY:s})}}else this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top})}}}},{key:"getPositionParams",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}},{key:"createStyle",value:function(e){var t,n=this.props,r=n.usePercentages,i=n.containerWidth;return n.useCSSTransforms?t=(0,l.setTransform)(e):(t=(0,l.setTopLeft)(e),r&&(t.left=(0,l.perc)(e.left/i),t.width=(0,l.perc)(e.width/i))),t}},{key:"mixinDraggable",value:function(e,t){return i.default.createElement(o.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}},{key:"mixinResizable",value:function(e,t,n){var r=this.props,a=r.cols,o=r.x,l=r.minW,c=r.minH,d=r.maxW,h=r.maxH,p=r.transformScale,f=r.resizeHandles,m=r.resizeHandle,g=this.getPositionParams(),v=(0,u.calcGridItemPosition)(g,0,0,a-o,0).width,y=(0,u.calcGridItemPosition)(g,0,0,l,c),b=(0,u.calcGridItemPosition)(g,0,0,d,h),w=[y.width,y.height],S=[Math.min(b.width,v),Math.min(b.height,1/0)];return i.default.createElement(s.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:w,maxConstraints:S,onResizeStop:this.onResizeStop,onResizeStart:this.onResizeStart,onResize:this.onResize,transformScale:p,resizeHandles:f,handle:m},e)}},{key:"onResizeHandler",value:function(e,t,n){var r=t.node,i=t.size,a=this.props[n];if(a){var o=this.props,s=o.cols,l=o.x,c=o.y,d=o.i,h=o.maxH,p=o.minH,f=this.props,m=f.minW,g=f.maxW,v=(0,u.calcWH)(this.getPositionParams(),i.width,i.height,l,c),y=v.w,b=v.h;m=Math.max(m,1),g=Math.min(g,s-l),y=(0,u.clamp)(y,m,g),b=(0,u.clamp)(b,p,h),this.setState({resizing:"onResizeStop"===n?null:i}),a.call(this,d,y,b,{e,node:r,size:i})}}},{key:"render",value:function(){var e=this.props,t=e.x,n=e.y,r=e.w,a=e.h,o=e.isDraggable,s=e.isResizable,l=e.droppingPosition,c=e.useCSSTransforms,h=(0,u.calcGridItemPosition)(this.getPositionParams(),t,n,r,a,this.state),p=i.default.Children.only(this.props.children),m=i.default.cloneElement(p,{ref:this.elementRef,className:(0,d.default)("react-grid-item",p.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":o,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(l),cssTransforms:c}),style:f(f(f({},this.props.style),p.props.style),this.createStyle(h))});return m=this.mixinResizable(m,h,s),m=this.mixinDraggable(m,o)}}],n&&m(t.prototype,n),r&&m(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(i.default.Component);t.default=S,w(S,"propTypes",{children:a.default.element,cols:a.default.number.isRequired,containerWidth:a.default.number.isRequired,rowHeight:a.default.number.isRequired,margin:a.default.array.isRequired,maxRows:a.default.number.isRequired,containerPadding:a.default.array.isRequired,x:a.default.number.isRequired,y:a.default.number.isRequired,w:a.default.number.isRequired,h:a.default.number.isRequired,minW:function(e,t){var n=e[t];return"number"!=typeof n?new Error("minWidth not Number"):n>e.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):n<e.w||n<e.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(e,t){var n=e[t];return"number"!=typeof n?new Error("minHeight not Number"):n>e.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n<e.h||n<e.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:a.default.string.isRequired,resizeHandles:c.resizeHandleAxesType,resizeHandle:c.resizeHandleType,onDragStop:a.default.func,onDragStart:a.default.func,onDrag:a.default.func,onResizeStop:a.default.func,onResizeStart:a.default.func,onResize:a.default.func,isDraggable:a.default.bool.isRequired,isResizable:a.default.bool.isRequired,isBounded:a.default.bool.isRequired,static:a.default.bool,useCSSTransforms:a.default.bool.isRequired,transformScale:a.default.number,className:a.default.string,handle:a.default.string,cancel:a.default.string,droppingPosition:a.default.shape({e:a.default.object.isRequired,left:a.default.number.isRequired,top:a.default.number.isRequired})}),w(S,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1})},9482:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}i.default=e,n&&n.set(e,i);return i}(n(5959)),a=d(n(7842)),o=d(n(7256)),s=n(414),l=n(906),u=d(n(8100)),c=d(n(7222));function d(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function p(e){return function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,t){return w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},w(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=E(e);if(t){var a=E(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return x(e)}(this,n)}}function x(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var O="react-grid-layout",T=!1;try{T=/firefox/i.test(navigator.userAgent)}catch(e){}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(d,e);var t,n,r,c=S(d);function d(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return _(x(e=c.call.apply(c,[this].concat(n))),"state",{activeDrag:null,layout:(0,s.synchronizeLayoutWithChildren)(e.props.layout,e.props.children,e.props.cols,(0,s.compactType)(e.props),e.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,droppingDOMNode:null,children:[]}),_(x(e),"dragEnterCounter",0),_(x(e),"onDragStart",(function(t,n,r,i){var a=i.e,o=i.node,l=e.state.layout,u=(0,s.getLayoutItem)(l,t);if(u)return e.setState({oldDragItem:(0,s.cloneLayoutItem)(u),oldLayout:l}),e.props.onDragStart(l,u,u,null,a,o)})),_(x(e),"onDrag",(function(t,n,r,i){var a=i.e,o=i.node,l=e.state.oldDragItem,u=e.state.layout,c=e.props,d=c.cols,h=c.allowOverlap,p=c.preventCollision,f=(0,s.getLayoutItem)(u,t);if(f){var m={w:f.w,h:f.h,x:f.x,y:f.y,placeholder:!0,i:t};u=(0,s.moveElement)(u,f,n,r,!0,p,(0,s.compactType)(e.props),d,h),e.props.onDrag(u,l,f,m,a,o),e.setState({layout:h?u:(0,s.compact)(u,(0,s.compactType)(e.props),d),activeDrag:m})}})),_(x(e),"onDragStop",(function(t,n,r,i){var a=i.e,o=i.node;if(e.state.activeDrag){var l=e.state.oldDragItem,u=e.state.layout,c=e.props,d=c.cols,h=c.preventCollision,p=c.allowOverlap,f=(0,s.getLayoutItem)(u,t);if(f){u=(0,s.moveElement)(u,f,n,r,!0,h,(0,s.compactType)(e.props),d,p),e.props.onDragStop(u,l,f,null,a,o);var m=p?u:(0,s.compact)(u,(0,s.compactType)(e.props),d),g=e.state.oldLayout;e.setState({activeDrag:null,layout:m,oldDragItem:null,oldLayout:null}),e.onLayoutMaybeChanged(m,g)}}})),_(x(e),"onResizeStart",(function(t,n,r,i){var a=i.e,o=i.node,l=e.state.layout,u=(0,s.getLayoutItem)(l,t);u&&(e.setState({oldResizeItem:(0,s.cloneLayoutItem)(u),oldLayout:e.state.layout}),e.props.onResizeStart(l,u,u,null,a,o))})),_(x(e),"onResize",(function(t,n,r,i){var a=i.e,o=i.node,l=e.state,u=l.layout,c=l.oldResizeItem,d=e.props,h=d.cols,p=d.preventCollision,f=d.allowOverlap,v=(0,s.withLayoutItem)(u,t,(function(e){var t;if(p&&!f){var i=(0,s.getAllCollisions)(u,m(m({},e),{},{w:n,h:r})).filter((function(t){return t.i!==e.i}));if(t=i.length>0){var a=1/0,o=1/0;i.forEach((function(t){t.x>e.x&&(a=Math.min(a,t.x)),t.y>e.y&&(o=Math.min(o,t.y))})),Number.isFinite(a)&&(e.w=a-e.x),Number.isFinite(o)&&(e.h=o-e.y)}}return t||(e.w=n,e.h=r),e})),y=g(v,2),b=y[0],w=y[1];if(w){var S={w:w.w,h:w.h,x:w.x,y:w.y,static:!0,i:t};e.props.onResize(b,c,w,S,a,o),e.setState({layout:f?b:(0,s.compact)(b,(0,s.compactType)(e.props),h),activeDrag:S})}})),_(x(e),"onResizeStop",(function(t,n,r,i){var a=i.e,o=i.node,l=e.state,u=l.layout,c=l.oldResizeItem,d=e.props,h=d.cols,p=d.allowOverlap,f=(0,s.getLayoutItem)(u,t);e.props.onResizeStop(u,c,f,null,a,o);var m=p?u:(0,s.compact)(u,(0,s.compactType)(e.props),h),g=e.state.oldLayout;e.setState({activeDrag:null,layout:m,oldResizeItem:null,oldLayout:null}),e.onLayoutMaybeChanged(m,g)})),_(x(e),"onDragOver",(function(t){var n;if(t.preventDefault(),t.stopPropagation(),T&&(null===(n=t.nativeEvent.target)||void 0===n||!n.classList.contains(O)))return!1;var r=e.props,a=r.droppingItem,o=r.onDropDragOver,s=r.margin,u=r.cols,c=r.rowHeight,d=r.maxRows,h=r.width,f=r.containerPadding,g=r.transformScale,v=null==o?void 0:o(t);if(!1===v)return e.state.droppingDOMNode&&e.removeDroppingPlaceholder(),!1;var y=m(m({},a),v),b=e.state.layout,w=t.nativeEvent,S=w.layerX,x=w.layerY,E={left:S/g,top:x/g,e:t};if(e.state.droppingDOMNode){if(e.state.droppingPosition){var _=e.state.droppingPosition,k=_.left,C=_.top;(k!=S||C!=x)&&e.setState({droppingPosition:E})}}else{var A={cols:u,margin:s,maxRows:d,rowHeight:c,containerWidth:h,containerPadding:f||s},D=(0,l.calcXY)(A,x,S,y.w,y.h);e.setState({droppingDOMNode:i.createElement("div",{key:y.i}),droppingPosition:E,layout:[].concat(p(b),[m(m({},y),{},{x:D.x,y:D.y,static:!1,isDraggable:!0})])})}})),_(x(e),"removeDroppingPlaceholder",(function(){var t=e.props,n=t.droppingItem,r=t.cols,i=e.state.layout,a=(0,s.compact)(i.filter((function(e){return e.i!==n.i})),(0,s.compactType)(e.props),r);e.setState({layout:a,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})})),_(x(e),"onDragLeave",(function(t){t.preventDefault(),t.stopPropagation(),e.dragEnterCounter--,0===e.dragEnterCounter&&e.removeDroppingPlaceholder()})),_(x(e),"onDragEnter",(function(t){t.preventDefault(),t.stopPropagation(),e.dragEnterCounter++})),_(x(e),"onDrop",(function(t){t.preventDefault(),t.stopPropagation();var n=e.props.droppingItem,r=e.state.layout,i=r.find((function(e){return e.i===n.i}));e.dragEnterCounter=0,e.removeDroppingPlaceholder(),e.props.onDrop(r,i,t)})),e}return t=d,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n;return t.activeDrag?null:((0,a.default)(e.layout,t.propsLayout)&&e.compactType===t.compactType?(0,s.childrenEqual)(e.children,t.children)||(n=t.layout):n=e.layout,n?{layout:(0,s.synchronizeLayoutWithChildren)(n,e.children,e.cols,(0,s.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}:null)}}],(n=[{key:"componentDidMount",value:function(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}},{key:"shouldComponentUpdate",value:function(e,t){return this.props.children!==e.children||!(0,s.fastRGLPropsEqual)(this.props,e,a.default)||this.state.activeDrag!==t.activeDrag||this.state.mounted!==t.mounted||this.state.droppingPosition!==t.droppingPosition}},{key:"componentDidUpdate",value:function(e,t){if(!this.state.activeDrag){var n=this.state.layout,r=t.layout;this.onLayoutMaybeChanged(n,r)}}},{key:"containerHeight",value:function(){if(this.props.autoSize){var e=(0,s.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}}},{key:"onLayoutMaybeChanged",value:function(e,t){t||(t=this.state.layout),(0,a.default)(t,e)||this.props.onLayoutChange(e)}},{key:"placeholder",value:function(){var e=this.state.activeDrag;if(!e)return null;var t=this.props,n=t.width,r=t.cols,a=t.margin,o=t.containerPadding,s=t.rowHeight,l=t.maxRows,c=t.useCSSTransforms,d=t.transformScale;return i.createElement(u.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:"react-grid-placeholder",containerWidth:n,cols:r,margin:a,containerPadding:o||a,maxRows:l,rowHeight:s,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:c,transformScale:d},i.createElement("div",null))}},{key:"processGridItem",value:function(e,t){if(e&&e.key){var n=(0,s.getLayoutItem)(this.state.layout,String(e.key));if(!n)return null;var r=this.props,a=r.width,o=r.cols,l=r.margin,c=r.containerPadding,d=r.rowHeight,h=r.maxRows,p=r.isDraggable,f=r.isResizable,m=r.isBounded,g=r.useCSSTransforms,v=r.transformScale,y=r.draggableCancel,b=r.draggableHandle,w=r.resizeHandles,S=r.resizeHandle,x=this.state,E=x.mounted,_=x.droppingPosition,O="boolean"==typeof n.isDraggable?n.isDraggable:!n.static&&p,T="boolean"==typeof n.isResizable?n.isResizable:!n.static&&f,k=n.resizeHandles||w,C=O&&m&&!1!==n.isBounded;return i.createElement(u.default,{containerWidth:a,cols:o,margin:l,containerPadding:c||l,maxRows:h,rowHeight:d,cancel:y,handle:b,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:O,isResizable:T,isBounded:C,useCSSTransforms:g&&E,usePercentages:!E,transformScale:v,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:t?_:void 0,resizeHandles:k,resizeHandle:S},e)}}},{key:"render",value:function(){var e=this,t=this.props,n=t.className,r=t.style,a=t.isDroppable,l=t.innerRef,u=(0,o.default)(O,n),c=m({height:this.containerHeight()},r);return i.createElement("div",{ref:l,className:u,style:c,onDrop:a?this.onDrop:s.noop,onDragLeave:a?this.onDragLeave:s.noop,onDragEnter:a?this.onDragEnter:s.noop,onDragOver:a?this.onDragOver:s.noop},i.Children.map(this.props.children,(function(t){return e.processGridItem(t)})),a&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}])&&b(t.prototype,n),r&&b(t,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.Component);t.default=k,_(k,"displayName","ReactGridLayout"),_(k,"propTypes",c.default),_(k,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:s.noop,onDragStart:s.noop,onDrag:s.noop,onDragStop:s.noop,onResizeStart:s.noop,onResize:s.noop,onResizeStop:s.noop,onDrop:s.noop,onDropDragOver:s.noop})},7222:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resizeHandleType=t.resizeHandleAxesType=t.default=void 0;var r=a(n(2688)),i=a(n(5959));function a(e){return e&&e.__esModule?e:{default:e}}var o=r.default.arrayOf(r.default.oneOf(["s","w","e","n","sw","nw","se","ne"]));t.resizeHandleAxesType=o;var s=r.default.oneOfType([r.default.node,r.default.func]);t.resizeHandleType=s;var l={className:r.default.string,style:r.default.object,width:r.default.number,autoSize:r.default.bool,cols:r.default.number,draggableCancel:r.default.string,draggableHandle:r.default.string,verticalCompact:function(e){e.verticalCompact,0},compactType:r.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&n(414).validateLayout(t,"layout")},margin:r.default.arrayOf(r.default.number),containerPadding:r.default.arrayOf(r.default.number),rowHeight:r.default.number,maxRows:r.default.number,isBounded:r.default.bool,isDraggable:r.default.bool,isResizable:r.default.bool,allowOverlap:r.default.bool,preventCollision:r.default.bool,useCSSTransforms:r.default.bool,transformScale:r.default.number,isDroppable:r.default.bool,resizeHandles:o,resizeHandle:s,onLayoutChange:r.default.func,onDragStart:r.default.func,onDrag:r.default.func,onDragStop:r.default.func,onResizeStart:r.default.func,onResize:r.default.func,onResizeStop:r.default.func,onDrop:r.default.func,droppingItem:r.default.shape({i:r.default.string.isRequired,w:r.default.number.isRequired,h:r.default.number.isRequired}),children:function(e,t){var n=e[t],r={};i.default.Children.forEach(n,(function(e){if(null!=(null==e?void 0:e.key)){if(r[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');r[e.key]=!0}}))},innerRef:r.default.any};t.default=l},4636:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}t.default=void 0;var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}i.default=e,n&&n.set(e,i);return i}(n(5959)),a=d(n(2688)),o=d(n(7842)),s=n(414),l=n(544),u=d(n(9482)),c=["breakpoint","breakpoints","cols","layouts","margin","containerPadding","onBreakpointChange","onLayoutChange","onWidthChange"];function d(e){return e&&e.__esModule?e:{default:e}}function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function p(){return p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p.apply(this,arguments)}function f(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},y(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=S(e);if(t){var a=S(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return w(e)}(this,n)}}function w(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){return Object.prototype.toString.call(e)};function _(e,t){return null==e?null:Array.isArray(e)?e:e[t]}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(d,e);var t,n,r,a=b(d);function d(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return x(w(e=a.call.apply(a,[this].concat(n))),"state",e.generateInitialState()),x(w(e),"onLayoutChange",(function(t){e.props.onLayoutChange(t,g(g({},e.props.layouts),{},x({},e.state.breakpoint,t)))})),e}return t=d,r=[{key:"getDerivedStateFromProps",value:function(e,t){if(!(0,o.default)(e.layouts,t.layouts)){var n=t.breakpoint,r=t.cols;return{layout:(0,l.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}}],(n=[{key:"generateInitialState",value:function(){var e=this.props,t=e.width,n=e.breakpoints,r=e.layouts,i=e.cols,a=(0,l.getBreakpointFromWidth)(n,t),o=(0,l.getColsFromBreakpoint)(a,i),s=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,l.findOrGenerateResponsiveLayout)(r,n,a,a,o,s),breakpoint:a,cols:o}}},{key:"componentDidUpdate",value:function(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,o.default)(this.props.breakpoints,e.breakpoints)&&(0,o.default)(this.props.cols,e.cols)||this.onWidthChange(e)}},{key:"onWidthChange",value:function(e){var t=this.props,n=t.breakpoints,r=t.cols,i=t.layouts,a=t.compactType,o=this.props.breakpoint||(0,l.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),u=this.state.breakpoint,c=(0,l.getColsFromBreakpoint)(o,r),d=g({},i);if(u!==o||e.breakpoints!==n||e.cols!==r){u in d||(d[u]=(0,s.cloneLayout)(this.state.layout));var h=(0,l.findOrGenerateResponsiveLayout)(d,n,o,u,c,a);h=(0,s.synchronizeLayoutWithChildren)(h,this.props.children,c,a,this.props.allowOverlap),d[o]=h,this.props.onLayoutChange(h,d),this.props.onBreakpointChange(o,c),this.setState({breakpoint:o,layout:h,cols:c})}var p=_(this.props.margin,o),f=_(this.props.containerPadding,o);this.props.onWidthChange(this.props.width,p,c,f)}},{key:"render",value:function(){var e=this.props,t=(e.breakpoint,e.breakpoints,e.cols,e.layouts,e.margin),n=e.containerPadding,r=(e.onBreakpointChange,e.onLayoutChange,e.onWidthChange,f(e,c));return i.createElement(u.default,p({},r,{margin:_(t,this.state.breakpoint),containerPadding:_(n,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}])&&v(t.prototype,n),r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.Component);t.default=O,x(O,"propTypes",{breakpoint:a.default.string,breakpoints:a.default.object,allowOverlap:a.default.bool,cols:a.default.object,margin:a.default.oneOfType([a.default.array,a.default.object]),containerPadding:a.default.oneOfType([a.default.array,a.default.object]),layouts:function(e,t){if("[object Object]"!==E(e[t]))throw new Error("Layout property must be an object. Received: "+E(e[t]));Object.keys(e[t]).forEach((function(t){if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,s.validateLayout)(e.layouts[t],"layouts."+t)}))},width:a.default.number.isRequired,onBreakpointChange:a.default.func,onLayoutChange:a.default.func,onWidthChange:a.default.func}),x(O,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:s.noop,onLayoutChange:s.noop,onWidthChange:s.noop})},906:(e,t)=>{"use strict";function n(e){var t=e.margin,n=e.containerPadding,r=e.containerWidth,i=e.cols;return(r-t[0]*(i-1)-2*n[0])/i}function r(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function i(e,t,n){return Math.max(Math.min(e,n),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.calcGridColWidth=n,t.calcGridItemPosition=function(e,t,i,a,o,s){var l=e.margin,u=e.containerPadding,c=e.rowHeight,d=n(e),h={};s&&s.resizing?(h.width=Math.round(s.resizing.width),h.height=Math.round(s.resizing.height)):(h.width=r(a,d,l[0]),h.height=r(o,c,l[1]));s&&s.dragging?(h.top=Math.round(s.dragging.top),h.left=Math.round(s.dragging.left)):(h.top=Math.round((c+l[1])*i+u[1]),h.left=Math.round((d+l[0])*t+u[0]));return h},t.calcGridItemWHPx=r,t.calcWH=function(e,t,r,a,o){var s=e.margin,l=e.maxRows,u=e.cols,c=e.rowHeight,d=n(e),h=Math.round((t+s[0])/(d+s[0])),p=Math.round((r+s[1])/(c+s[1]));return h=i(h,0,u-a),p=i(p,0,l-o),{w:h,h:p}},t.calcXY=function(e,t,r,a,o){var s=e.margin,l=e.cols,u=e.rowHeight,c=e.maxRows,d=n(e),h=Math.round((r-s[0])/(d+s[0])),p=Math.round((t-s[1])/(u+s[1]));return h=i(h,0,l-a),p=i(p,0,c-o),{x:h,y:p}},t.clamp=i},6805:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}t.default=function(e){var t;return t=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(u,t);var n,a,l=(n=u,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(n);if(a){var i=f(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return p(e)}(this,e)});function u(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(p(e=l.call.apply(l,[this].concat(n))),"state",{width:1280}),m(p(e),"elementRef",i.createRef()),m(p(e),"mounted",!1),m(p(e),"onWindowResize",(function(){if(e.mounted){var t=e.elementRef.current;t instanceof HTMLElement&&t.offsetWidth&&e.setState({width:t.offsetWidth})}})),e}return function(e,t,n){t&&d(e.prototype,t);n&&d(e,n);Object.defineProperty(e,"prototype",{writable:!1})}(u,[{key:"componentDidMount",value:function(){this.mounted=!0,window.addEventListener("resize",this.onWindowResize),this.onWindowResize()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,window.removeEventListener("resize",this.onWindowResize)}},{key:"render",value:function(){var t=this.props,n=t.measureBeforeMount,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,s);return n&&!this.mounted?i.createElement("div",{className:(0,o.default)(this.props.className,g),style:this.props.style,ref:this.elementRef}):i.createElement(e,c({innerRef:this.elementRef},r,this.state))}}]),u}(i.Component),m(t,"defaultProps",{measureBeforeMount:!1}),m(t,"propTypes",{measureBeforeMount:a.default.bool}),t};var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var i={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var s=a?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(i,o,s):i[o]=e[o]}i.default=e,n&&n.set(e,i);return i}(n(5959)),a=l(n(2688)),o=l(n(7256)),s=["measureBeforeMount"];function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g="react-grid-layout"},7434:e=>{e.exports=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)}},544:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findOrGenerateResponsiveLayout=function(e,t,n,a,o,s){if(e[n])return(0,r.cloneLayout)(e[n]);for(var l=e[a],u=i(t),c=u.slice(u.indexOf(n)),d=0,h=c.length;d<h;d++){var p=c[d];if(e[p]){l=e[p];break}}return l=(0,r.cloneLayout)(l||[]),(0,r.compact)((0,r.correctBounds)(l,{cols:o}),s,o)},t.getBreakpointFromWidth=function(e,t){for(var n=i(e),r=n[0],a=1,o=n.length;a<o;a++){var s=n[a];t>e[s]&&(r=s)}return r},t.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},t.sortBreakpoints=i;var r=n(414);function i(e){return Object.keys(e).sort((function(t,n){return e[t]-e[n]}))}},414:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bottom=d,t.childrenEqual=function(e,t){return(0,r.default)(i.default.Children.map(e,(function(e){return null==e?void 0:e.key})),i.default.Children.map(t,(function(e){return null==e?void 0:e.key})))},t.cloneLayout=h,t.cloneLayoutItem=f,t.collides=g,t.compact=v,t.compactItem=w,t.compactType=function(e){var t=e||{},n=t.verticalCompact,r=t.compactType;return!1===n?null:r},t.correctBounds=S,t.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},t.fastRGLPropsEqual=void 0,t.getAllCollisions=_,t.getFirstCollision=E,t.getLayoutItem=x,t.getStatics=O,t.modifyLayout=p,t.moveElement=T,t.moveElementAwayFromCollision=k,t.noop=void 0,t.perc=function(e){return 100*e+"%"},t.setTopLeft=function(e){var t=e.top,n=e.left,r=e.width,i=e.height;return{top:"".concat(t,"px"),left:"".concat(n,"px"),width:"".concat(r,"px"),height:"".concat(i,"px"),position:"absolute"}},t.setTransform=function(e){var t=e.top,n=e.left,r=e.width,i=e.height,a="translate(".concat(n,"px,").concat(t,"px)");return{transform:a,WebkitTransform:a,MozTransform:a,msTransform:a,OTransform:a,width:"".concat(r,"px"),height:"".concat(i,"px"),position:"absolute"}},t.sortLayoutItems=C,t.sortLayoutItemsByColRow=D,t.sortLayoutItemsByRowCol=A,t.synchronizeLayoutWithChildren=function(e,t,n,r,a){e=e||[];var o=[];i.default.Children.forEach(t,(function(t){if(null!=(null==t?void 0:t.key)){var n=x(e,String(t.key));if(n)o.push(f(n));else{!u&&t.props._grid&&console.warn("`_grid` properties on children have been deprecated as of React 15.2. Please use `data-grid` or add your properties directly to the `layout`.");var r=t.props["data-grid"]||t.props._grid;r?(u||R([r],"ReactGridLayout.children"),o.push(f(s(s({},r),{},{i:t.key})))):o.push(f({w:1,h:1,x:0,y:d(o),i:String(t.key)}))}}}));var l=S(o,{cols:n});return a?l:v(l,r,n)},t.validateLayout=R,t.withLayoutItem=function(e,t,n){var r=x(e,t);return r?(r=n(f(r)),[e=p(e,r),r]):[e,null]};var r=a(n(7842)),i=a(n(5959));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=!0,c=!1;function d(e){for(var t,n=0,r=0,i=e.length;r<i;r++)(t=e[r].y+e[r].h)>n&&(n=t);return n}function h(e){for(var t=Array(e.length),n=0,r=e.length;n<r;n++)t[n]=f(e[n]);return t}function p(e,t){for(var n=Array(e.length),r=0,i=e.length;r<i;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function f(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}var m=n(7434);function g(e,t){return e.i!==t.i&&(!(e.x+e.w<=t.x)&&(!(e.x>=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function v(e,t,n){for(var r=O(e),i=C(e,t),a=Array(e.length),o=0,s=i.length;o<s;o++){var l=f(i[o]);l.static||(l=w(r,l,t,n,i),r.push(l)),a[e.indexOf(i[o])]=l,l.moved=!1}return a}t.fastRGLPropsEqual=m;var y={x:"w",y:"h"};function b(e,t,n,r){var i=y[r];t[r]+=1;for(var a=e.map((function(e){return e.i})).indexOf(t.i)+1;a<e.length;a++){var o=e[a];if(!o.static){if(o.y>t.y+t.h)break;g(t,o)&&b(e,o,n+t[i],r)}}t[r]=n}function w(e,t,n,r,i){var a,o="horizontal"===n;if("vertical"===n)for(t.y=Math.min(d(e),t.y);t.y>0&&!E(e,t);)t.y--;else if(o)for(;t.x>0&&!E(e,t);)t.x--;for(;a=E(e,t);)o?b(i,t,a.x+a.w,"x"):b(i,t,a.y+a.h,"y"),o&&t.x+t.w>r&&(t.x=r-t.w,t.y++);return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function S(e,t){for(var n=O(e),r=0,i=e.length;r<i;r++){var a=e[r];if(a.x+a.w>t.cols&&(a.x=t.cols-a.w),a.x<0&&(a.x=0,a.w=t.cols),a.static)for(;E(n,a);)a.y++;else n.push(a)}return e}function x(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function E(e,t){for(var n=0,r=e.length;n<r;n++)if(g(e[n],t))return e[n]}function _(e,t){return e.filter((function(e){return g(e,t)}))}function O(e){return e.filter((function(e){return e.static}))}function T(e,t,n,r,i,a,o,s,l){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;I("Moving element ".concat(t.i," to [").concat(String(n),",").concat(String(r),"] from [").concat(t.x,",").concat(t.y,"]"));var u=t.x,c=t.y;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;var d=C(e,o);("vertical"===o&&"number"==typeof r?c>=r:"horizontal"===o&&"number"==typeof n&&u>=n)&&(d=d.reverse());var p=_(d,t),f=p.length>0;if(f&&l)return h(e);if(f&&a)return I("Collision prevented on ".concat(t.i,", reverting.")),t.x=u,t.y=c,t.moved=!1,e;for(var m=0,g=p.length;m<g;m++){var v=p[m];I("Resolving collision between ".concat(t.i," at [").concat(t.x,",").concat(t.y,"] and ").concat(v.i," at [").concat(v.x,",").concat(v.y,"]")),v.moved||(e=v.static?k(e,v,t,i,o,s):k(e,t,v,i,o,s))}return e}function k(e,t,n,r,i,a){var o="horizontal"===i,s="horizontal"!==i,l=t.static;if(r){r=!1;var u={x:o?Math.max(t.x-n.w,0):n.x,y:s?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"};if(!E(e,u))return I("Doing reverse collision on ".concat(n.i," up to [").concat(u.x,",").concat(u.y,"].")),T(e,n,o?u.x:void 0,s?u.y:void 0,r,l,i,a)}return T(e,n,o?n.x+1:void 0,s?n.y+1:void 0,r,l,i,a)}function C(e,t){return"horizontal"===t?D(e):"vertical"===t?A(e):e}function A(e){return e.slice(0).sort((function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function D(e){return e.slice(0).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout",n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(var r=0,i=e.length;r<i;r++)for(var a=e[r],o=0;o<n.length;o++)if("number"!=typeof a[n[o]])throw new Error("ReactGridLayout: "+t+"["+r+"]."+n[o]+" must be a number!")}function I(){var e;c&&(e=console).log.apply(e,arguments)}t.noop=function(){}},2548:(e,t,n)=>{e.exports=n(9482).default,e.exports.utils=n(414),e.exports.Responsive=n(4636).default,e.exports.Responsive.utils=n(544),e.exports.WidthProvider=n(6805).default},7256:(e,t,n)=>{"use strict";function r(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r(e[t]))&&(i&&(i+=" "),i+=n);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function i(){for(var e,t,n=0,i="";n<arguments.length;)(e=arguments[n++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}n.r(t),n.d(t,{clsx:()=>i,default:()=>a});const a=i},9814:(e,t,n)=>{"use strict";n.d(t,{m:()=>fe});var r,i,a,o,s=n(2688),l=n.n(s),u=n(9406),c=n.n(u),d=n(7383),h=n.n(d),p=n(5959),f=n.n(p),m=n(1664),g=n.n(m),v="bodyAttributes",y="htmlAttributes",b="titleAttributes",w={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},S=(Object.keys(w).map((function(e){return w[e]})),"charset"),x="cssText",E="href",_="http-equiv",O="innerHTML",T="itemprop",k="name",C="property",A="rel",D="src",R="target",I={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},P="defaultTitle",N="defer",j="encodeSpecialCharacters",L="onChangeClientState",M="titleTemplate",F=Object.keys(I).reduce((function(e,t){return e[I[t]]=t,e}),{}),V=[w.NOSCRIPT,w.SCRIPT,w.STYLE],$="data-react-helmet",B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),U=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},H=function(e){return!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},G=function(e){var t=Y(e,w.TITLE),n=Y(e,M);if(n&&t)return n.replace(/%s/g,(function(){return Array.isArray(t)?t.join(""):t}));var r=Y(e,P);return t||r||void 0},W=function(e){return Y(e,L)||function(){}},Q=function(e,t){return t.filter((function(t){return void 0!==t[e]})).map((function(t){return t[e]})).reduce((function(e,t){return U({},e,t)}),{})},K=function(e,t){return t.filter((function(e){return void 0!==e[w.BASE]})).map((function(e){return e[w.BASE]})).reverse().reduce((function(t,n){if(!t.length)for(var r=Object.keys(n),i=0;i<r.length;i++){var a=r[i].toLowerCase();if(-1!==e.indexOf(a)&&n[a])return t.concat(n)}return t}),[])},X=function(e,t,n){var r={};return n.filter((function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&ne("Helmet: "+e+' should be of type "Array". Instead found type "'+B(t[e])+'"'),!1)})).map((function(t){return t[e]})).reverse().reduce((function(e,n){var i={};n.filter((function(e){for(var n=void 0,a=Object.keys(e),o=0;o<a.length;o++){var s=a[o],l=s.toLowerCase();-1===t.indexOf(l)||n===A&&"canonical"===e[n].toLowerCase()||l===A&&"stylesheet"===e[l].toLowerCase()||(n=l),-1===t.indexOf(s)||s!==O&&s!==x&&s!==T||(n=s)}if(!n||!e[n])return!1;var u=e[n].toLowerCase();return r[n]||(r[n]={}),i[n]||(i[n]={}),!r[n][u]&&(i[n][u]=!0,!0)})).reverse().forEach((function(t){return e.push(t)}));for(var a=Object.keys(i),o=0;o<a.length;o++){var s=a[o],l=g()({},r[s],i[s]);r[s]=l}return e}),[]).reverse()},Y=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},J=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout((function(){J(e)}),0)}),Z=function(e){return clearTimeout(e)},ee="undefined"!=typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||J:n.g.requestAnimationFrame||J,te="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||Z:n.g.cancelAnimationFrame||Z,ne=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},re=null,ie=function(e,t){var n=e.baseTag,r=e.bodyAttributes,i=e.htmlAttributes,a=e.linkTags,o=e.metaTags,s=e.noscriptTags,l=e.onChangeClientState,u=e.scriptTags,c=e.styleTags,d=e.title,h=e.titleAttributes;se(w.BODY,r),se(w.HTML,i),oe(d,h);var p={baseTag:le(w.BASE,n),linkTags:le(w.LINK,a),metaTags:le(w.META,o),noscriptTags:le(w.NOSCRIPT,s),scriptTags:le(w.SCRIPT,u),styleTags:le(w.STYLE,c)},f={},m={};Object.keys(p).forEach((function(e){var t=p[e],n=t.newTags,r=t.oldTags;n.length&&(f[e]=n),r.length&&(m[e]=p[e].oldTags)})),t&&t(),l(e,f,m)},ae=function(e){return Array.isArray(e)?e.join(""):e},oe=function(e,t){void 0!==e&&document.title!==e&&(document.title=ae(e)),se(w.TITLE,t)},se=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute($),i=r?r.split(","):[],a=[].concat(i),o=Object.keys(t),s=0;s<o.length;s++){var l=o[s],u=t[l]||"";n.getAttribute(l)!==u&&n.setAttribute(l,u),-1===i.indexOf(l)&&i.push(l);var c=a.indexOf(l);-1!==c&&a.splice(c,1)}for(var d=a.length-1;d>=0;d--)n.removeAttribute(a[d]);i.length===a.length?n.removeAttribute($):n.getAttribute($)!==o.join(",")&&n.setAttribute($,o.join(","))}},le=function(e,t){var n=document.head||document.querySelector(w.HEAD),r=n.querySelectorAll(e+"["+$+"]"),i=Array.prototype.slice.call(r),a=[],o=void 0;return t&&t.length&&t.forEach((function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===O)n.innerHTML=t.innerHTML;else if(r===x)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var s=void 0===t[r]?"":t[r];n.setAttribute(r,s)}n.setAttribute($,"true"),i.some((function(e,t){return o=t,n.isEqualNode(e)}))?i.splice(o,1):a.push(n)})),i.forEach((function(e){return e.parentNode.removeChild(e)})),a.forEach((function(e){return n.appendChild(e)})),{oldTags:i,newTags:a}},ue=function(e){return Object.keys(e).reduce((function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r}),"")},ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[I[n]||n]=e[n],t}),t)},de=function(e,t,n){switch(e){case w.TITLE:return{toComponent:function(){return e=t.title,n=t.titleAttributes,(r={key:e})[$]=!0,i=ce(n,r),[f().createElement(w.TITLE,i,e)];var e,n,r,i},toString:function(){return function(e,t,n,r){var i=ue(n),a=ae(t);return i?"<"+e+" "+$+'="true" '+i+">"+H(a,r)+"</"+e+">":"<"+e+" "+$+'="true">'+H(a,r)+"</"+e+">"}(e,t.title,t.titleAttributes,n)}};case v:case y:return{toComponent:function(){return ce(t)},toString:function(){return ue(t)}};default:return{toComponent:function(){return function(e,t){return t.map((function(t,n){var r,i=((r={key:n})[$]=!0,r);return Object.keys(t).forEach((function(e){var n=I[e]||e;if(n===O||n===x){var r=t.innerHTML||t.cssText;i.dangerouslySetInnerHTML={__html:r}}else i[n]=t[e]})),f().createElement(e,i)}))}(e,t)},toString:function(){return function(e,t,n){return t.reduce((function(t,r){var i=Object.keys(r).filter((function(e){return!(e===O||e===x)})).reduce((function(e,t){var i=void 0===r[t]?t:t+'="'+H(r[t],n)+'"';return e?e+" "+i:i}),""),a=r.innerHTML||r.cssText||"",o=-1===V.indexOf(e);return t+"<"+e+" "+$+'="true" '+i+(o?"/>":">"+a+"</"+e+">")}),"")}(e,t,n)}}}},he=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,i=e.htmlAttributes,a=e.linkTags,o=e.metaTags,s=e.noscriptTags,l=e.scriptTags,u=e.styleTags,c=e.title,d=void 0===c?"":c,h=e.titleAttributes;return{base:de(w.BASE,t,r),bodyAttributes:de(v,n,r),htmlAttributes:de(y,i,r),link:de(w.LINK,a,r),meta:de(w.META,o,r),noscript:de(w.NOSCRIPT,s,r),script:de(w.SCRIPT,l,r),style:de(w.STYLE,u,r),title:de(w.TITLE,{title:d,titleAttributes:h},r)}},pe=c()((function(e){return{baseTag:K([E,R],e),bodyAttributes:Q(v,e),defer:Y(e,N),encode:Y(e,j),htmlAttributes:Q(y,e),linkTags:X(w.LINK,[A,E],e),metaTags:X(w.META,[k,S,_,C,T],e),noscriptTags:X(w.NOSCRIPT,[O],e),onChangeClientState:W(e),scriptTags:X(w.SCRIPT,[D,O],e),styleTags:X(w.STYLE,[x],e),title:G(e),titleAttributes:Q(b,e)}}),(function(e){re&&te(re),e.defer?re=ee((function(){ie(e,(function(){re=null}))})):(ie(e),re=null)}),he)((function(){return null})),fe=(i=pe,o=a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.shouldComponentUpdate=function(e){return!h()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case w.SCRIPT:case w.NOSCRIPT:return{innerHTML:t};case w.STYLE:return{cssText:t}}throw new Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,i=e.newChildProps,a=e.nestedChildren;return U({},r,((t={})[n.type]=[].concat(r[n.type]||[],[U({},i,this.mapNestedChildrenToProps(n,a))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,i=e.newProps,a=e.newChildProps,o=e.nestedChildren;switch(r.type){case w.TITLE:return U({},i,((t={})[r.type]=o,t.titleAttributes=U({},a),t));case w.BODY:return U({},i,{bodyAttributes:U({},a)});case w.HTML:return U({},i,{htmlAttributes:U({},a)})}return U({},i,((n={})[r.type]=U({},a),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=U({},t);return Object.keys(e).forEach((function(t){var r;n=U({},n,((r={})[t]=e[t],r))})),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return f().Children.forEach(e,(function(e){if(e&&e.props){var i=e.props,a=i.children,o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce((function(t,n){return t[F[n]||n]=e[n],t}),t)}(q(i,["children"]));switch(n.warnOnInvalidChildren(e,a),e.type){case w.LINK:case w.META:case w.NOSCRIPT:case w.SCRIPT:case w.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:o,nestedChildren:a});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:o,nestedChildren:a})}}})),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=q(e,["children"]),r=U({},n);return t&&(r=this.mapChildrenToProps(t,r)),f().createElement(i,r)},z(t,null,[{key:"canUseDOM",set:function(e){i.canUseDOM=e}}]),t}(f().Component),a.propTypes={base:l().object,bodyAttributes:l().object,children:l().oneOfType([l().arrayOf(l().node),l().node]),defaultTitle:l().string,defer:l().bool,encodeSpecialCharacters:l().bool,htmlAttributes:l().object,link:l().arrayOf(l().object),meta:l().arrayOf(l().object),noscript:l().arrayOf(l().object),onChangeClientState:l().func,script:l().arrayOf(l().object),style:l().arrayOf(l().object),title:l().string,titleAttributes:l().object,titleTemplate:l().string},a.defaultProps={defer:!0,encodeSpecialCharacters:!0},a.peek=i.peek,a.rewind=function(){var e=i.rewind();return e||(e=he({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},o);fe.renderStatic=fe.rewind},1794:(e,t,n)=>{"use strict";t.__esModule=!0,t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=l(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(5959)),i=n(8230),a=n(9954),o=n(6333),s=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(l=function(e){return e?n:t})(e)}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function h(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}var f=function(e){var t,n;function o(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).handleRefs={},t.lastHandleRect=null,t.slack=null,t}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,p(t,n);var l=o.prototype;return l.componentWillUnmount=function(){this.resetData()},l.resetData=function(){this.lastHandleRect=this.slack=null},l.runConstraints=function(e,t){var n=this.props,r=n.minConstraints,i=n.maxConstraints,a=n.lockAspectRatio;if(!r&&!i&&!a)return[e,t];if(a){var o=this.props.width/this.props.height,s=e-this.props.width,l=t-this.props.height;Math.abs(s)>Math.abs(l*o)?t=e/o:e=t*o}var u=e,c=t,d=this.slack||[0,0],h=d[0],p=d[1];return e+=h,t+=p,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[h+(u-e),p+(c-t)],[e,t]},l.resizeHandler=function(e,t){var n=this;return function(r,i){var a=i.node,o=i.deltaX,s=i.deltaY;"onResizeStart"===e&&n.resetData();var l=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==t&&"s"!==t,u=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==t&&"w"!==t;if(l||u){var c=t[0],d=t[t.length-1],h=a.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===d)o+=h.left-n.lastHandleRect.left;if("n"===c)s+=h.top-n.lastHandleRect.top}n.lastHandleRect=h,"w"===d&&(o=-o),"n"===c&&(s=-s);var p=n.props.width+(l?o/n.props.transformScale:0),f=n.props.height+(u?s/n.props.transformScale:0),m=n.runConstraints(p,f);p=m[0],f=m[1];var g=p!==n.props.width||f!==n.props.height,v="function"==typeof n.props[e]?n.props[e]:null;v&&!("onResize"===e&&!g)&&(null==r.persist||r.persist(),v(r,{node:a,size:{width:p,height:f},handle:t})),"onResizeStop"===e&&n.resetData()}}},l.renderResizeHandle=function(e,t){var n=this.props.handle;if(!n)return r.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+e,ref:t});if("function"==typeof n)return n(e,t);var i=d({ref:t},"string"==typeof n.type?{}:{handleAxis:e});return r.cloneElement(n,i)},l.render=function(){var e=this,t=this.props,n=t.children,o=t.className,l=t.draggableOpts,c=(t.width,t.height,t.handle,t.handleSize,t.lockAspectRatio,t.axis,t.minConstraints,t.maxConstraints,t.onResize,t.onResizeStop,t.onResizeStart,t.resizeHandles),h=(t.transformScale,function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,s));return(0,a.cloneElement)(n,d(d({},h),{},{className:(o?o+" ":"")+"react-resizable",children:[].concat(n.props.children,c.map((function(t){var n,a=null!=(n=e.handleRefs[t])?n:e.handleRefs[t]=r.createRef();return r.createElement(i.DraggableCore,u({},l,{nodeRef:a,key:"resizableHandle-"+t,onStop:e.resizeHandler("onResizeStop",t),onStart:e.resizeHandler("onResizeStart",t),onDrag:e.resizeHandler("onResize",t)}),e.renderResizeHandle(t,a))})))}))},o}(r.Component);t.default=f,f.propTypes=o.resizableProps,f.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}},6609:(e,t,n)=>{"use strict";t.default=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=i?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,n&&n.set(e,r);return r}(n(5959)),i=l(n(2688)),a=l(n(1794)),o=n(6333),s=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var m=function(e){var t,n;function i(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))||this).state={width:t.props.width,height:t.props.height,propsWidth:t.props.width,propsHeight:t.props.height},t.onResize=function(e,n){var r=n.size;t.props.onResize?(null==e.persist||e.persist(),t.setState(r,(function(){return t.props.onResize&&t.props.onResize(e,n)}))):t.setState(r)},t}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,f(t,n),i.getDerivedStateFromProps=function(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null},i.prototype.render=function(){var e=this.props,t=e.handle,n=e.handleSize,i=(e.onResize,e.onResizeStart),o=e.onResizeStop,l=e.draggableOpts,u=e.minConstraints,d=e.maxConstraints,p=e.lockAspectRatio,f=e.axis,m=(e.width,e.height,e.resizeHandles),g=e.style,v=e.transformScale,y=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,s);return r.createElement(a.default,{axis:f,draggableOpts:l,handle:t,handleSize:n,height:this.state.height,lockAspectRatio:p,maxConstraints:d,minConstraints:u,onResizeStart:i,onResize:this.onResize,onResizeStop:o,resizeHandles:m,transformScale:v,width:this.state.width},r.createElement("div",c({},y,{style:h(h({},g),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},i}(r.Component);t.default=m,m.propTypes=h(h({},o.resizableProps),{},{children:i.default.element})},6333:(e,t,n)=>{"use strict";t.__esModule=!0,t.resizableProps=void 0;var r,i=(r=n(2688))&&r.__esModule?r:{default:r};n(8230);var a={axis:i.default.oneOf(["both","x","y","none"]),className:i.default.string,children:i.default.element.isRequired,draggableOpts:i.default.shape({allowAnyClick:i.default.bool,cancel:i.default.string,children:i.default.node,disabled:i.default.bool,enableUserSelectHack:i.default.bool,offsetParent:i.default.node,grid:i.default.arrayOf(i.default.number),handle:i.default.string,nodeRef:i.default.object,onStart:i.default.func,onDrag:i.default.func,onStop:i.default.func,onMouseDown:i.default.func,scale:i.default.number}),height:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,a=t[0];return"both"===a.axis||"y"===a.axis?(r=i.default.number).isRequired.apply(r,t):i.default.number.apply(i.default,t)},handle:i.default.oneOfType([i.default.node,i.default.func]),handleSize:i.default.arrayOf(i.default.number),lockAspectRatio:i.default.bool,maxConstraints:i.default.arrayOf(i.default.number),minConstraints:i.default.arrayOf(i.default.number),onResizeStop:i.default.func,onResizeStart:i.default.func,onResize:i.default.func,resizeHandles:i.default.arrayOf(i.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:i.default.number,width:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,a=t[0];return"both"===a.axis||"x"===a.axis?(r=i.default.number).isRequired.apply(r,t):i.default.number.apply(i.default,t)}};t.resizableProps=a},9954:(e,t,n)=>{"use strict";t.__esModule=!0,t.cloneElement=function(e,t){t.style&&e.props.style&&(t.style=o(o({},e.props.style),t.style));t.className&&e.props.className&&(t.className=e.props.className+" "+t.className);return i.default.cloneElement(e,t)};var r,i=(r=n(5959))&&r.__esModule?r:{default:r};function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},936:(e,t,n)=>{"use strict";e.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},e.exports.Resizable=n(1794).default,e.exports.ResizableBox=n(6609).default},9406:(e,t,n)=>{"use strict";var r,i=n(5959),a=(r=i)&&"object"==typeof r&&"default"in r?r.default:r;function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var l,u=[];function c(){l=e(u.map((function(e){return e.props}))),d.canUseDOM?t(l):n&&(l=n(l))}var d=function(e){var t,n;function i(){return e.apply(this,arguments)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.peek=function(){return l},i.rewind=function(){if(i.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=l;return l=void 0,u=[],e};var o=i.prototype;return o.UNSAFE_componentWillMount=function(){u.push(this),c()},o.componentDidUpdate=function(){c()},o.componentWillUnmount=function(){var e=u.indexOf(this);u.splice(e,1),c()},o.render=function(){return a.createElement(r,this.props)},i}(i.PureComponent);return o(d,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")"),o(d,"canUseDOM",s),d}}},2871:(e,t,n)=>{"use strict";n.d(t,{Bd:()=>i,lQ:()=>r});var r=function(){};var i="undefined"!=typeof window},9105:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5959),i=n(2871);const a=function(e,t,n){if(!i.Bd)return[t,i.lQ,i.lQ];if(!e)throw new Error("useLocalStorage key may not be falsy");var a=n?n.raw?function(e){return e}:n.deserializer:JSON.parse,o=(0,r.useRef)((function(e){try{var r=n?n.raw?String:n.serializer:JSON.stringify,i=localStorage.getItem(e);return null!==i?a(i):(t&&localStorage.setItem(e,r(t)),t)}catch(e){return t}})),s=(0,r.useState)((function(){return o.current(e)})),l=s[0],u=s[1];(0,r.useLayoutEffect)((function(){return u(o.current(e))}),[e]);var c=(0,r.useCallback)((function(t){try{var r="function"==typeof t?t(l):t;if(void 0===r)return;var i=void 0;i=n?n.raw?"string"==typeof r?r:JSON.stringify(r):n.serializer?n.serializer(r):JSON.stringify(r):JSON.stringify(r),localStorage.setItem(e,i),u(a(i))}catch(e){}}),[e,u]),d=(0,r.useCallback)((function(){try{localStorage.removeItem(e),u(void 0)}catch(e){}}),[e,u]);return[l,c,d]}},3518:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(5959);const i=function(e){(0,r.useEffect)(e,[])};const a=function(e){i((function(){e()}))}},2192:(e,t,n)=>{"use strict";var r=n(5959),i=Symbol.for("react.element"),a=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,a={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,r)&&!l.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:i,type:e,key:u,ref:c,props:a,_owner:s.current}}t.Fragment=a,t.jsx=u,t.jsxs=u},2540:(e,t,n)=>{"use strict";e.exports=n(2192)},8353:(e,t,n)=>{"use strict";n.d(t,{Ms:()=>v,vU:()=>p});var r=n(4120),i=n(1693),a=n(3449),o=n(2236),s=n(6712);function l(){}var u=c("C",void 0,void 0);function c(e,t,n){return{kind:e,value:t,error:n}}var d=n(2332),h=n(3004),p=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,(0,a.Uv)(t)&&t.add(n)):n.destination=w,n}return(0,r.C6)(t,e),t.create=function(e,t,n){return new v(e,t,n)},t.prototype.next=function(e){this.isStopped?b(function(e){return c("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?b(function(e){return c("E",void 0,e)}(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?b(u,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(a.yU),f=Function.prototype.bind;function m(e,t){return f.call(e,t)}var g=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){y(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){y(e)}else y(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){y(e)}},e}(),v=function(e){function t(t,n,r){var a,s,l=e.call(this)||this;(0,i.T)(t)||!t?a={next:null!=t?t:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:l&&o.$.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return l.unsubscribe()},a={next:t.next&&m(t.next,s),error:t.error&&m(t.error,s),complete:t.complete&&m(t.complete,s)}):a=t;return l.destination=new g(a),l}return(0,r.C6)(t,e),t}(p);function y(e){o.$.useDeprecatedSynchronousErrorHandling?(0,h.l)(e):(0,s.m)(e)}function b(e,t){var n=o.$.onStoppedNotification;n&&d.f.setTimeout((function(){return n(e,t)}))}var w={closed:!0,next:l,error:function(e){throw e},complete:l}},3449:(e,t,n)=>{"use strict";n.d(t,{yU:()=>l,Uv:()=>u});var r=n(4120),i=n(1693);var a,o=((a=function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}((function(e){Error.call(e),e.stack=(new Error).stack}))).prototype=Object.create(Error.prototype),a.prototype.constructor=a,a);function s(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var l=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,n,a,s;if(!this.closed){this.closed=!0;var l=this._parentage;if(l)if(this._parentage=null,Array.isArray(l))try{for(var u=(0,r.Ju)(l),d=u.next();!d.done;d=u.next()){d.value.remove(this)}}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}else l.remove(this);var h=this.initialTeardown;if((0,i.T)(h))try{h()}catch(e){s=e instanceof o?e.errors:[e]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var f=(0,r.Ju)(p),m=f.next();!m.done;m=f.next()){var g=m.value;try{c(g)}catch(e){s=null!=s?s:[],e instanceof o?s=(0,r.fX)((0,r.fX)([],(0,r.zs)(s)),(0,r.zs)(e.errors)):s.push(e)}}}catch(e){n={error:e}}finally{try{m&&!m.done&&(a=f.return)&&a.call(f)}finally{if(n)throw n.error}}}if(s)throw new o(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)c(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&s(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&s(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();l.EMPTY;function u(e){return e instanceof l||e&&"closed"in e&&(0,i.T)(e.remove)&&(0,i.T)(e.add)&&(0,i.T)(e.unsubscribe)}function c(e){(0,i.T)(e)?e():e.unsubscribe()}},2236:(e,t,n)=>{"use strict";n.d(t,{$:()=>r});var r={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},4370:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var r=n(4120);function i(e,t,n,r,i){return new a(e,t,n,r,i)}var a=function(e){function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return(0,r.C6)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(n(8353).vU)},7708:(e,t,n)=>{"use strict";n.d(t,{T:()=>a});var r=n(5096),i=n(4370);function a(e,t){return(0,r.N)((function(n,r){var a=0;n.subscribe((0,i._)(r,(function(n){r.next(e.call(t,n,a++))})))}))}},2332:(e,t,n)=>{"use strict";n.d(t,{f:()=>i});var r=n(4120),i={setTimeout:function(e,t){for(var n=[],a=2;a<arguments.length;a++)n[a-2]=arguments[a];var o=i.delegate;return(null==o?void 0:o.setTimeout)?o.setTimeout.apply(o,(0,r.fX)([e,t],(0,r.zs)(n))):setTimeout.apply(void 0,(0,r.fX)([e,t],(0,r.zs)(n)))},clearTimeout:function(e){var t=i.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0}},3004:(e,t,n)=>{"use strict";n.d(t,{Y:()=>a,l:()=>o});var r=n(2236),i=null;function a(e){if(r.$.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var n=i,a=n.errorThrown,o=n.error;if(i=null,a)throw o}}else e()}function o(e){r.$.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},3887:(e,t,n)=>{"use strict";function r(e){return e}n.d(t,{D:()=>r})},1693:(e,t,n)=>{"use strict";function r(e){return"function"==typeof e}n.d(t,{T:()=>r})},5096:(e,t,n)=>{"use strict";n.d(t,{N:()=>i});var r=n(1693);function i(e){return function(t){if(function(e){return(0,r.T)(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},6712:(e,t,n)=>{"use strict";n.d(t,{m:()=>a});var r=n(2236),i=n(2332);function a(e){i.f.setTimeout((function(){var t=r.$.onUnhandledError;if(!t)throw e;t(e)}))}},6852:(e,t,n)=>{"use strict";var r=n(8036),i=Array.prototype.concat,a=Array.prototype.slice,o=e.exports=function(e){for(var t=[],n=0,o=e.length;n<o;n++){var s=e[n];r(s)?t=i.call(t,a.call(s)):t.push(s)}return t};o.wrap=function(e){return function(){return e(o(arguments))}}},8036:e=>{e.exports=function(e){return!(!e||"string"==typeof e)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&"String"!==e.constructor.name))}},6660:function(e,t,n){var r;!function(i,a){"use strict";var o="function",s="undefined",l="object",u="string",c="major",d="model",h="name",p="type",f="vendor",m="version",g="architecture",v="console",y="mobile",b="tablet",w="smarttv",S="wearable",x="embedded",E="Amazon",_="Apple",O="ASUS",T="BlackBerry",k="Browser",C="Chrome",A="Firefox",D="Google",R="Huawei",I="LG",P="Microsoft",N="Motorola",j="Opera",L="Samsung",M="Sharp",F="Sony",V="Xiaomi",$="Zebra",B="Facebook",z="Chromium OS",U="Mac OS",q=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},H=function(e,t){return typeof e===u&&-1!==G(t).indexOf(G(e))},G=function(e){return e.toLowerCase()},W=function(e,t){if(typeof e===u)return e=e.replace(/^\s\s*/,""),typeof t===s?e:e.substring(0,500)},Q=function(e,t){for(var n,r,i,s,u,c,d=0;d<t.length&&!u;){var h=t[d],p=t[d+1];for(n=r=0;n<h.length&&!u&&h[n];)if(u=h[n++].exec(e))for(i=0;i<p.length;i++)c=u[++r],typeof(s=p[i])===l&&s.length>0?2===s.length?typeof s[1]==o?this[s[0]]=s[1].call(this,c):this[s[0]]=s[1]:3===s.length?typeof s[1]!==o||s[1].exec&&s[1].test?this[s[0]]=c?c.replace(s[1],s[2]):a:this[s[0]]=c?s[1].call(this,c,s[2]):a:4===s.length&&(this[s[0]]=c?s[3].call(this,c.replace(s[1],s[2])):a):this[s]=c||a;d+=2}},K=function(e,t){for(var n in t)if(typeof t[n]===l&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(H(t[n][r],e))return"?"===n?a:n}else if(H(t[n],e))return"?"===n?a:n;return e},X={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[m,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[m,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,m],[/opios[\/ ]+([\w\.]+)/i],[m,[h,j+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[m,[h,j+" GX"]],[/\bopr\/([\w\.]+)/i],[m,[h,j]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[m,[h,"Baidu"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[\/ ]?([\w\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,m],[/\bddg\/([\w\.]+)/i],[m,[h,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[m,[h,"UC"+k]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[m,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[m,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[m,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[m,[h,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[m,[h,"Smart Lenovo "+k]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+k],m],[/\bfocus\/([\w\.]+)/i],[m,[h,A+" Focus"]],[/\bopt\/([\w\.]+)/i],[m,[h,j+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[m,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[m,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[m,[h,j+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[m,[h,"MIUI "+k]],[/fxios\/([-\w\.]+)/i],[m,[h,A]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360 "+k]],[/(oculus|sailfish|huawei|vivo)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1 "+k],m],[/samsungbrowser\/([\w\.]+)/i],[m,[h,L+" Internet"]],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],m],[/metasr[\/ ]?([\d\.]+)/i],[m,[h,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[h,"Sogou Mobile"],m],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345Explorer)[\/ ]?([\w\.]+)/i],[h,m],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,B],m],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[h,m],[/\bgsa\/([\w\.]+) .*safari\//i],[m,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[m,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[m,[h,C+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,C+" WebView"],m],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[m,[h,"Android "+k]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,m],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[m,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[m,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[m,K,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[h,m],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],m],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[m,[h,A+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[h,m],[/(cobalt)\/([\w\.]+)/i],[h,[m,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,G]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",G]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,G]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[d,[f,L],[p,b]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[d,[f,L],[p,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[d,[f,_],[p,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[d,[f,_],[p,b]],[/(macintosh);/i],[d,[f,_]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[d,[f,M],[p,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[d,[f,R],[p,b]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[d,[f,R],[p,y]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[d,/_/g," "],[f,V],[p,y]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[d,/_/g," "],[f,V],[p,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[d,[f,"OPPO"],[p,y]],[/\b(opd2\d{3}a?) bui/i],[d,[f,"OPPO"],[p,b]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[d,[f,"Vivo"],[p,y]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[d,[f,"Realme"],[p,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[d,[f,N],[p,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[d,[f,N],[p,b]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[d,[f,I],[p,b]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[d,[f,I],[p,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[d,[f,"Lenovo"],[p,b]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[d,/_/g," "],[f,"Nokia"],[p,y]],[/(pixel c)\b/i],[d,[f,D],[p,b]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[d,[f,D],[p,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[d,[f,F],[p,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[d,"Xperia Tablet"],[f,F],[p,b]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[d,[f,"OnePlus"],[p,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[d,[f,E],[p,b]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[d,/(.+)/g,"Fire Phone $1"],[f,E],[p,y]],[/(playbook);[-\w\),; ]+(rim)/i],[d,f,[p,b]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[d,[f,T],[p,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[d,[f,O],[p,b]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[d,[f,O],[p,y]],[/(nexus 9)/i],[d,[f,"HTC"],[p,b]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[f,[d,/_/g," "],[p,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[d,[f,"Acer"],[p,b]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[d,[f,"Meizu"],[p,y]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[d,[f,"Ulefone"],[p,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[f,d,[p,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[f,d,[p,b]],[/(surface duo)/i],[d,[f,P],[p,b]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[d,[f,"Fairphone"],[p,y]],[/(u304aa)/i],[d,[f,"AT&T"],[p,y]],[/\bsie-(\w*)/i],[d,[f,"Siemens"],[p,y]],[/\b(rct\w+) b/i],[d,[f,"RCA"],[p,b]],[/\b(venue[\d ]{2,7}) b/i],[d,[f,"Dell"],[p,b]],[/\b(q(?:mv|ta)\w+) b/i],[d,[f,"Verizon"],[p,b]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[d,[f,"Barnes & Noble"],[p,b]],[/\b(tm\d{3}\w+) b/i],[d,[f,"NuVision"],[p,b]],[/\b(k88) b/i],[d,[f,"ZTE"],[p,b]],[/\b(nx\d{3}j) b/i],[d,[f,"ZTE"],[p,y]],[/\b(gen\d{3}) b.+49h/i],[d,[f,"Swiss"],[p,y]],[/\b(zur\d{3}) b/i],[d,[f,"Swiss"],[p,b]],[/\b((zeki)?tb.*\b) b/i],[d,[f,"Zeki"],[p,b]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[f,"Dragon Touch"],d,[p,b]],[/\b(ns-?\w{0,9}) b/i],[d,[f,"Insignia"],[p,b]],[/\b((nxa|next)-?\w{0,9}) b/i],[d,[f,"NextBook"],[p,b]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[f,"Voice"],d,[p,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[f,"LvTel"],d,[p,y]],[/\b(ph-1) /i],[d,[f,"Essential"],[p,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[d,[f,"Envizen"],[p,b]],[/\b(trio[-\w\. ]+) b/i],[d,[f,"MachSpeed"],[p,b]],[/\btu_(1491) b/i],[d,[f,"Rotor"],[p,b]],[/(shield[\w ]+) b/i],[d,[f,"Nvidia"],[p,b]],[/(sprint) (\w+)/i],[f,d,[p,y]],[/(kin\.[onetw]{3})/i],[[d,/\./g," "],[f,P],[p,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[d,[f,$],[p,b]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[d,[f,$],[p,y]],[/smart-tv.+(samsung)/i],[f,[p,w]],[/hbbtv.+maple;(\d+)/i],[[d,/^/,"SmartTV"],[f,L],[p,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[f,I],[p,w]],[/(apple) ?tv/i],[f,[d,_+" TV"],[p,w]],[/crkey/i],[[d,C+"cast"],[f,D],[p,w]],[/droid.+aft(\w+)( bui|\))/i],[d,[f,E],[p,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[d,[f,M],[p,w]],[/(bravia[\w ]+)( bui|\))/i],[d,[f,F],[p,w]],[/(mitv-\w{5}) bui/i],[d,[f,V],[p,w]],[/Hbbtv.*(technisat) (.*);/i],[f,d,[p,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[f,W],[d,W],[p,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[f,d,[p,v]],[/droid.+; (shield) bui/i],[d,[f,"Nvidia"],[p,v]],[/(playstation [345portablevi]+)/i],[d,[f,F],[p,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[d,[f,P],[p,v]],[/((pebble))app/i],[f,d,[p,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[d,[f,_],[p,S]],[/droid.+; (glass) \d/i],[d,[f,D],[p,S]],[/droid.+; (wt63?0{2,3})\)/i],[d,[f,$],[p,S]],[/(quest( \d| pro)?)/i],[d,[f,B],[p,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[f,[p,x]],[/(aeobc)\b/i],[d,[f,E],[p,x]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[d,[p,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[d,[p,b]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,b]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,y]],[/(android[-\w\. ]{0,9});.+buil/i],[d,[f,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[m,[h,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[m,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,m],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[m,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,m],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[h,[m,K,X]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[m,K,X],[h,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[m,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,U],[m,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[m,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,m],[/\(bb(10);/i],[m,[h,T]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[m,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[m,[h,A+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[m,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[m,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[m,[h,C+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,z],m],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,m],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],m],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,m]]},J=function(e,t){if(typeof e===l&&(t=e,e=a),!(this instanceof J))return new J(e,t).getResult();var n=typeof i!==s&&i.navigator?i.navigator:a,r=e||(n&&n.userAgent?n.userAgent:""),v=n&&n.userAgentData?n.userAgentData:a,w=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(Y,t):Y,S=n&&n.userAgent==r;return this.getBrowser=function(){var e,t={};return t[h]=a,t[m]=a,Q.call(t,r,w.browser),t[c]=typeof(e=t[m])===u?e.replace(/[^\d\.]/g,"").split(".")[0]:a,S&&n&&n.brave&&typeof n.brave.isBrave==o&&(t[h]="Brave"),t},this.getCPU=function(){var e={};return e[g]=a,Q.call(e,r,w.cpu),e},this.getDevice=function(){var e={};return e[f]=a,e[d]=a,e[p]=a,Q.call(e,r,w.device),S&&!e[p]&&v&&v.mobile&&(e[p]=y),S&&"Macintosh"==e[d]&&n&&typeof n.standalone!==s&&n.maxTouchPoints&&n.maxTouchPoints>2&&(e[d]="iPad",e[p]=b),e},this.getEngine=function(){var e={};return e[h]=a,e[m]=a,Q.call(e,r,w.engine),e},this.getOS=function(){var e={};return e[h]=a,e[m]=a,Q.call(e,r,w.os),S&&!e[h]&&v&&v.platform&&"Unknown"!=v.platform&&(e[h]=v.platform.replace(/chrome os/i,z).replace(/macos/i,U)),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 r},this.setUA=function(e){return r=typeof e===u&&e.length>500?W(e,500):e,this},this.setUA(r),this};J.VERSION="1.0.38",J.BROWSER=q([h,m,c]),J.CPU=q([g]),J.DEVICE=q([d,f,p,v,y,w,b,S,x]),J.ENGINE=J.OS=q([h,m]),typeof t!==s?(e.exports&&(t=e.exports=J),t.UAParser=J):n.amdO?(r=function(){return J}.call(t,n,t,e))===a||(e.exports=r):typeof i!==s&&(i.UAParser=J);var Z=typeof i!==s&&(i.jQuery||i.Zepto);if(Z&&!Z.ua){var ee=new J;Z.ua=ee.getResult(),Z.ua.get=function(){return ee.getUA()},Z.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var n in t)Z.ua[n]=t[n]}}}("object"==typeof window?window:this)},5244:(e,t,n)=>{"use strict";n.d(t,{Py:()=>l,gY:()=>u,pz:()=>s,sk:()=>c});var r=n(2551),i=n(5968),a=n(4648);function o(e){var t;return(t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}})[i.s7]=function(){return this},t}function s(e,t,n,r){var a,s=(0,i.Xd)(e.src),u=null===(a=null==t?void 0:t.options.services)||void 0===a?void 0:a[s.type],c=e.data?(0,i.A9)(e.data,n,r):void 0,d=u?l(u,e.id,c):o(e.id);return d.meta=e,d}function l(e,t,n){var r=o(t);if(r.deferred=!0,(0,i.Ai)(e)){var s=r.state=(0,a.G)(void 0,(function(){return(n?e.withContext(n):e).initialState}));r.getSnapshot=function(){return s}}return r}function u(e){return function(e){try{return"function"==typeof e.send}catch(e){return!1}}(e)&&"id"in e}function c(e){var t;return(0,r.Cl)(((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}})[i.s7]=function(){return this},t),e)}},1015:(e,t,n)=>{"use strict";n.d(t,{O:()=>w});var r=n(2551),i=n(5968),a=n(7768),o=n(6590),s=n(5846),l=n(5184),u=n(8204),c=n(6099),d=n(5244);function h(e){if("string"==typeof e){var t={type:e,toString:function(){return e}};return t}return e}function p(e){return(0,r.Cl)((0,r.Cl)({type:o.lA},e),{toJSON:function(){e.onDone,e.onError;var t=(0,r.Tt)(e,["onDone","onError"]);return(0,r.Cl)((0,r.Cl)({},t),{type:o.lA,src:h(e.src)})}})}var f="",m="*",g={},v=function(e){return"#"===e[0]},y=function(){function e(t,n,a,o){void 0===a&&(a="context"in t?t.context:void 0);var d,h=this;this.config=t,this._context=a,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=null==o?void 0:o.parent,this.key=this.config.key||(null==o?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:u.AD),this.id=this.config.id||(0,r.fX)([this.machine.key],(0,r.zs)(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(d=this.config.schema)&&void 0!==d?d:{},this.description=this.config.description,l.p||(0,i.R8)(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?(0,i.LG)(this.config.states,(function(t,n){var i,a=new e(t,{},void 0,{parent:h,key:n});return Object.assign(h.idMap,(0,r.Cl)(((i={})[a.id]=a,i),a.idMap)),a})):g;var m=0;!function e(t){var n,i;t.order=m++;try{for(var a=(0,r.Ju)((0,c.rz)(t)),o=a.next();!o.done;o=a.next()){e(o.value)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(e){return e.event===f})):f in this.config.on),this.strict=!!this.config.strict,this.onEntry=(0,i.$r)(this.config.entry||this.config.onEntry).map((function(e){return(0,s.Hf)(e)})),this.onExit=(0,i.$r)(this.config.exit||this.config.onExit).map((function(e){return(0,s.Hf)(e)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=(0,i.$r)(this.config.invoke).map((function(e,t){var n,a;if((0,i.Ai)(e)){var o=(0,i.cv)(h.id,t);return h.machine.options.services=(0,r.Cl)(((n={})[o]=e,n),h.machine.options.services),p({src:o,id:o})}if((0,i.Kg)(e.src)){o=e.id||(0,i.cv)(h.id,t);return p((0,r.Cl)((0,r.Cl)({},e),{id:o,src:e.src}))}if((0,i.Ai)(e.src)||(0,i.Tn)(e.src)){o=e.id||(0,i.cv)(h.id,t);return h.machine.options.services=(0,r.Cl)(((a={})[o]=e.src,a),h.machine.options.services),p((0,r.Cl)((0,r.Cl)({id:o},e),{src:o}))}var s=e.src;return p((0,r.Cl)((0,r.Cl)({id:(0,i.cv)(h.id,t)},e),{src:s}))})),this.activities=(0,i.$r)(this.config.activities).concat(this.invoke).map((function(e){return(0,s._4)(e)})),this.transition=this.transition.bind(this),this.tags=(0,i.$r)(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||(0,c.Ki)(this).forEach((function(e){return e.on}))},e.prototype.withConfig=function(t,n){var i=this.options,a=i.actions,o=i.activities,s=i.guards,l=i.services,u=i.delays;return new e(this.config,{actions:(0,r.Cl)((0,r.Cl)({},a),t.actions),activities:(0,r.Cl)((0,r.Cl)({},o),t.activities),guards:(0,r.Cl)((0,r.Cl)({},s),t.guards),services:(0,r.Cl)((0,r.Cl)({},l),t.services),delays:(0,r.Cl)((0,r.Cl)({},u),t.delays)},null!=n?n:this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return(0,i.Tn)(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:(0,i.LG)(this.states,(function(e){return e.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var e=this.transitions;return this.__cache.on=e.reduce((function(e,t){return e[t.eventType]=e[t.eventType]||[],e[t.eventType].push(t),e}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(e){if(this.__cache.candidates[e])return this.__cache.candidates[e];var t=e===f,n=this.transitions.filter((function(n){var r=n.eventType===e;return t?r:r||n.eventType===m}));return this.__cache.candidates[e]=n,n},e.prototype.getDelayedTransitions=function(){var e=this,t=this.config.after;if(!t)return[];var n=function(t,n){var r=(0,i.Tn)(t)?"".concat(e.id,":delay[").concat(n,"]"):t,a=(0,s.Pl)(r,e.id);return e.onEntry.push((0,s.tN)(a,{delay:t})),e.onExit.push((0,s.ZT)(a)),a};return((0,i.cy)(t)?t.map((function(e,t){var i=n(e.delay,t);return(0,r.Cl)((0,r.Cl)({},e),{event:i})})):(0,i.Bq)(Object.keys(t).map((function(e,a){var o=t[e],s=(0,i.Kg)(o)?{target:o}:o,l=isNaN(+e)?e:+e,u=n(l,a);return(0,i.$r)(s).map((function(e){return(0,r.Cl)((0,r.Cl)({},e),{event:u,delay:l})}))})))).map((function(t){var n=t.delay;return(0,r.Cl)((0,r.Cl)({},e.formatTransition(t)),{delay:n})}))},e.prototype.getStateNodes=function(e){var t,n=this;if(!e)return[];var o=e instanceof a.Uw?e.value:(0,i.at)(e,this.delimiter);if((0,i.Kg)(o)){var s=this.getStateNode(o).initial;return void 0!==s?this.getStateNodes(((t={})[o]=s,t)):[this,this.states[o]]}var l=Object.keys(o),u=[this];return u.push.apply(u,(0,r.fX)([],(0,r.zs)((0,i.Bq)(l.map((function(e){return n.getStateNode(e).getStateNodes(o[e])})))),!1)),u},e.prototype.handles=function(e){var t=(0,i.vd)(e);return this.events.includes(t)},e.prototype.resolveState=function(e){var t=e instanceof a.Uw?e:a.Uw.create(e),n=Array.from((0,c.D0)([],this.getStateNodes(t.value)));return new a.Uw((0,r.Cl)((0,r.Cl)({},t),{value:this.resolve(t.value),configuration:n,done:(0,c.BJ)(n,this),tags:(0,c.iU)(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(e,t,n){var r=this.getStateNode(e).next(t,n);return r&&r.transitions.length?r:this.next(t,n)},e.prototype.transitionCompoundNode=function(e,t,n){var r=Object.keys(e),i=this.getStateNode(r[0])._transition(e[r[0]],t,n);return i&&i.transitions.length?i:this.next(t,n)},e.prototype.transitionParallelNode=function(e,t,n){var a,o,s={};try{for(var l=(0,r.Ju)(Object.keys(e)),u=l.next();!u.done;u=l.next()){var c=u.value,d=e[c];if(d){var h=this.getStateNode(c)._transition(d,t,n);h&&(s[c]=h)}}}catch(e){a={error:e}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(a)throw a.error}}var p=Object.keys(s).map((function(e){return s[e]})),f=(0,i.Bq)(p.map((function(e){return e.transitions})));if(!p.some((function(e){return e.transitions.length>0})))return this.next(t,n);var m=(0,i.Bq)(Object.keys(s).map((function(e){return s[e].configuration})));return{transitions:f,exitSet:(0,i.Bq)(p.map((function(e){return e.exitSet}))),configuration:m,source:t,actions:(0,i.Bq)(Object.keys(s).map((function(e){return s[e].actions})))}},e.prototype._transition=function(e,t,n){return(0,i.Kg)(e)?this.transitionLeafNode(e,t,n):1===Object.keys(e).length?this.transitionCompoundNode(e,t,n):this.transitionParallelNode(e,t,n)},e.prototype.getTransitionData=function(e,t){return this._transition(e.value,e,(0,i.ft)(t))},e.prototype.next=function(e,t){var n,a,o,s=this,l=t.name,u=[],c=[];try{for(var d=(0,r.Ju)(this.getCandidates(l)),h=d.next();!h.done;h=d.next()){var p=h.value,f=p.cond,m=p.in,g=e.context,y=!m||((0,i.Kg)(m)&&v(m)?e.matches((0,i.at)(this.getStateNodeById(m).path,this.delimiter)):(0,i.HK)((0,i.at)(m,this.delimiter),(0,i.Ae)(this.path.slice(0,-2))(e.value))),b=!1;try{b=!f||(0,i.re)(this.machine,f,g,t,e)}catch(e){throw new Error("Unable to evaluate guard '".concat(f.name||f.type,"' in transition for event '").concat(l,"' in state node '").concat(this.id,"':\n").concat(e.message))}if(b&&y){void 0!==p.target&&(c=p.target),u.push.apply(u,(0,r.fX)([],(0,r.zs)(p.actions),!1)),o=p;break}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(a=d.return)&&a.call(d)}finally{if(n)throw n.error}}if(o){if(!c.length)return{transitions:[o],exitSet:[],configuration:e.value?[this]:[],source:e,actions:u};var w=(0,i.Bq)(c.map((function(t){return s.getRelativeStateNodes(t,e.historyValue)})));return{transitions:[o],exitSet:!!o.internal?[]:(0,i.Bq)(c.map((function(e){return s.getPotentiallyReenteringNodes(e)}))),configuration:w,source:e,actions:u}}},e.prototype.getPotentiallyReenteringNodes=function(e){if(this.order<e.order)return[this];for(var t=[],n=this,r=e;n&&n!==r;)t.push(n),n=n.parent;return n!==r?[]:(t.push(r),t)},e.prototype.getActions=function(e,t,n,a,o,l,u){var d,h,p,f,m=this,g=l?(0,c.D0)([],this.getStateNodes(l.value)):[],v=new Set;try{for(var y=(0,r.Ju)(Array.from(e).sort((function(e,t){return e.order-t.order}))),b=y.next();!b.done;b=y.next()){var w=b.value;(!(0,c.zy)(g,w)||(0,c.zy)(n.exitSet,w)||w.parent&&v.has(w.parent))&&v.add(w)}}catch(e){d={error:e}}finally{try{b&&!b.done&&(h=y.return)&&h.call(y)}finally{if(d)throw d.error}}try{for(var S=(0,r.Ju)(g),x=S.next();!x.done;x=S.next()){w=x.value;(0,c.zy)(e,w)&&!(0,c.zy)(n.exitSet,w.parent)||n.exitSet.push(w)}}catch(e){p={error:e}}finally{try{x&&!x.done&&(f=S.return)&&f.call(S)}finally{if(p)throw p.error}}n.exitSet.sort((function(e,t){return t.order-e.order}));var E=Array.from(v).sort((function(e,t){return e.order-t.order})),_=new Set(n.exitSet),O=(0,i.Bq)(E.map((function(e){var t=[];if("final"!==e.type)return t;var r=e.parent;if(!r.parent)return t;t.push((0,s.Vw)(e.id,e.doneData),(0,s.Vw)(r.id,e.doneData?(0,i.A9)(e.doneData,a,o):void 0));var l=r.parent;return"parallel"===l.type&&(0,c.i0)(l).every((function(e){return(0,c.BJ)(n.configuration,e)}))&&t.push((0,s.Vw)(l.id)),t}))),T=E.map((function(e){var t=e.onEntry,n=e.activities.map((function(e){return(0,s.ni)(e)}));return{type:"entry",actions:(0,s.Um)(u?(0,r.fX)((0,r.fX)([],(0,r.zs)(t),!1),(0,r.zs)(n),!1):(0,r.fX)((0,r.fX)([],(0,r.zs)(n),!1),(0,r.zs)(t),!1),m.machine.options.actions)}})).concat({type:"state_done",actions:O.map((function(e){return(0,s.xl)(e)}))}),k=Array.from(_).map((function(e){return{type:"exit",actions:(0,s.Um)((0,r.fX)((0,r.fX)([],(0,r.zs)(e.onExit),!1),(0,r.zs)(e.activities.map((function(e){return(0,s.ds)(e)}))),!1),m.machine.options.actions)}})).concat({type:"transition",actions:(0,s.Um)(n.actions,this.machine.options.actions)}).concat(T);if(t){var C=(0,s.Um)((0,i.Bq)((0,r.fX)([],(0,r.zs)(e),!1).sort((function(e,t){return t.order-e.order})).map((function(e){return e.onExit}))),this.machine.options.actions).filter((function(e){return!(0,i.Gx)(e)}));return k.concat({type:"stop",actions:C})}return k},e.prototype.transition=function(e,t,n,o){void 0===e&&(e=this.initialState);var s,u=(0,i.ft)(t);if(e instanceof a.Uw)s=void 0===n?e:this.resolveState(a.Uw.from(e,n));else{var d=(0,i.Kg)(e)?this.resolve((0,i.zr)(this.getResolvedPath(e))):this.resolve(e),h=null!=n?n:this.machine.context;s=this.resolveState(a.Uw.from(d,h))}if(!l.p&&u.name===m)throw new Error("An event cannot have the wildcard type ('".concat(m,"')"));if(this.strict&&!this.events.includes(u.name)&&!(0,i.M7)(u.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(u.name,"'"));var p=this._transition(s.value,s,u)||{transitions:[],configuration:[],exitSet:[],source:s,actions:[]},f=(0,c.D0)([],this.getStateNodes(s.value)),g=p.configuration.length?(0,c.D0)(f,p.configuration):f;return p.configuration=(0,r.fX)([],(0,r.zs)(g),!1),this.resolveTransition(p,s,s.context,o,u)},e.prototype.resolveRaisedTransition=function(e,t,n,i){var a,o=e.actions;return(e=this.transition(e,t,void 0,i))._event=n,e.event=n.data,(a=e.actions).unshift.apply(a,(0,r.fX)([],(0,r.zs)(o),!1)),e},e.prototype.resolveTransition=function(e,t,n,l,u){var h,p,m,g,v=this;void 0===u&&(u=s.zp);var y=e.configuration,b=!t||e.transitions.length>0,w=b?e.configuration:t?t.configuration:[],S=(0,c.BJ)(w,this),x=b?(0,c._W)(this.machine,y):void 0,E=t?t.historyValue?t.historyValue:e.source?this.machine.historyValue(t.value):void 0:void 0,_=this.getActions(new Set(w),S,e,n,u,t,l),O=t?(0,r.Cl)({},t.activities):{};try{for(var T=(0,r.Ju)(_),k=T.next();!k.done;k=T.next()){var C=k.value;try{for(var A=(m=void 0,(0,r.Ju)(C.actions)),D=A.next();!D.done;D=A.next()){var R=D.value;R.type===o.ni?O[R.activity.id||R.activity.type]=R:R.type===o.ds&&(O[R.activity.id||R.activity.type]=!1)}}catch(e){m={error:e}}finally{try{D&&!D.done&&(g=A.return)&&g.call(A)}finally{if(m)throw m.error}}}}catch(e){h={error:e}}finally{try{k&&!k.done&&(p=T.return)&&p.call(T)}finally{if(h)throw h.error}}var I=(0,r.zs)((0,s.AS)(this,t,n,u,_,l,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),P=I[0],N=I[1],j=(0,r.zs)((0,i.jB)(P,i.Gx),2),L=j[0],M=j[1],F=P.filter((function(e){var t;return e.type===o.ni&&(null===(t=e.activity)||void 0===t?void 0:t.type)===o.lA})),V=F.reduce((function(e,t){return e[t.activity.id]=(0,d.pz)(t.activity,v.machine,N,u),e}),t?(0,r.Cl)({},t.children):{}),$=new a.Uw({value:x||t.value,context:N,_event:u,_sessionid:t?t._sessionid:null,historyValue:x?E?(0,i.BY)(E,x):void 0:t?t.historyValue:void 0,history:!x||e.source?t:void 0,actions:x?M:[],activities:x?O:t?t.activities:{},events:[],configuration:w,transitions:e.transitions,children:V,done:S,tags:(0,c.iU)(w),machine:this}),B=n!==N;$.changed=u.name===o.yo||B;var z=$.history;z&&delete z.history;var U=!S&&(this._transient||y.some((function(e){return e._transient})));if(!(b||U&&u.name!==f))return $;var q=$;if(!S)for(U&&(q=this.resolveRaisedTransition(q,{type:o.kx},u,l));L.length;){var H=L.shift();q=this.resolveRaisedTransition(q,H._event,u,l)}var G=q.changed||(z?!!q.actions.length||B||typeof z.value!=typeof q.value||!(0,a.iE)(q.value,z.value):void 0);return q.changed=G,q.history=z,q},e.prototype.getStateNode=function(e){if(v(e))return this.machine.getStateNodeById(e);if(!this.states)throw new Error("Unable to retrieve child state '".concat(e,"' from '").concat(this.id,"'; no child states exist."));var t=this.states[e];if(!t)throw new Error("Child state '".concat(e,"' does not exist on '").concat(this.id,"'"));return t},e.prototype.getStateNodeById=function(e){var t=v(e)?e.slice(1):e;if(t===this.id)return this;var n=this.machine.idMap[t];if(!n)throw new Error("Child state node '#".concat(t,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(e){if("string"==typeof e&&v(e))try{return this.getStateNodeById(e.slice(1))}catch(e){}for(var t=(0,i._J)(e,this.delimiter).slice(),n=this;t.length;){var r=t.shift();if(!r.length)break;n=n.getStateNode(r)}return n},e.prototype.resolve=function(e){var t,n=this;if(!e)return this.initialStateValue||g;switch(this.type){case"parallel":return(0,i.LG)(this.initialStateValue,(function(t,r){return t?n.getStateNode(r).resolve(e[r]||t):g}));case"compound":if((0,i.Kg)(e)){var r=this.getStateNode(e);return"parallel"===r.type||"compound"===r.type?((t={})[e]=r.initialStateValue,t):e}return Object.keys(e).length?(0,i.LG)(e,(function(e,t){return e?n.getStateNode(t).resolve(e):g})):this.initialStateValue||{};default:return e||g}},e.prototype.getResolvedPath=function(e){if(v(e)){var t=this.machine.idMap[e.slice(1)];if(!t)throw new Error("Unable to find state node '".concat(e,"'"));return t.path}return(0,i._J)(e,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var e,t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)t=(0,i.rp)(this.states,(function(e){return e.initialStateValue||g}),(function(e){return!("history"===e.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));t=(0,c.d2)(this.states[this.initial])?this.initial:((e={})[this.initial]=this.states[this.initial].initialStateValue,e)}else t={};return this.__cache.initialStateValue=t,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(e,t){this._init();var n=this.getStateNodes(e);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,null!=t?t:this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this.initialStateValue;if(!e)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var e;if("history"===this.type){var t=this.config;e=(0,i.Kg)(t.target)&&v(t.target)?(0,i.zr)(this.machine.getStateNodeById(t.target).path.slice(this.path.length-1)):t.target}return e},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(e,t,n){return void 0===n&&(n=!0),n?"history"===e.type?e.resolveHistory(t):e.initialStateNodes:[e]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var e=this;if((0,c.d2)(this))return[this];if("compound"===this.type&&!this.initial)return l.p||(0,i.R8)(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var t=(0,i.bm)(this.initialStateValue);return(0,i.Bq)(t.map((function(t){return e.getFromRelativePath(t)})))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(e){if(!e.length)return[this];var t=(0,r.zs)(e),n=t[0],i=t.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var a=this.getStateNode(n);if("history"===a.type)return a.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(i)},e.prototype.historyValue=function(e){if(Object.keys(this.states).length)return{current:e||this.initialStateValue,states:(0,i.rp)(this.states,(function(t,n){if(!e)return t.historyValue();var r=(0,i.Kg)(e)?void 0:e[n];return t.historyValue(r||t.initialStateValue)}),(function(e){return!e.history}))}},e.prototype.resolveHistory=function(e){var t=this;if("history"!==this.type)return[this];var n=this.parent;if(!e){var r=this.target;return r?(0,i.Bq)((0,i.bm)(r).map((function(e){return n.getFromRelativePath(e)}))):n.initialStateNodes}var a=(0,i.VQ)(n.path,"states")(e).current;return(0,i.Kg)(a)?[n.getStateNode(a)]:(0,i.Bq)((0,i.bm)(a).map((function(e){return"deep"===t.history?n.getFromRelativePath(e):[n.states[e[0]]]})))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var e=this,t=(0,i.Bq)(Object.keys(this.states).map((function(t){return e.states[t].stateIds})));return[this.id].concat(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var e,t,n,i;if(this.__cache.events)return this.__cache.events;var a=this.states,o=new Set(this.ownEvents);if(a)try{for(var s=(0,r.Ju)(Object.keys(a)),l=s.next();!l.done;l=s.next()){var u=a[l.value];if(u.states)try{for(var c=(n=void 0,(0,r.Ju)(u.events)),d=c.next();!d.done;d=c.next()){var h=d.value;o.add("".concat(h))}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var e=new Set(this.transitions.filter((function(e){return!(!e.target&&!e.actions.length&&e.internal)})).map((function(e){return e.eventType})));return Array.from(e)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(e){var t=this;if(void 0!==e)return e.map((function(e){if(!(0,i.Kg)(e))return e;var n=e[0]===t.delimiter;if(n&&!t.parent)return t.getStateNodeByPath(e.slice(1));var r=n?t.key+e:e;if(!t.parent)return t.getStateNodeByPath(r);try{return t.parent.getStateNodeByPath(r)}catch(e){throw new Error("Invalid transition definition for state node '".concat(t.id,"':\n").concat(e.message))}}))},e.prototype.formatTransition=function(e){var t=this,n=(0,i.R_)(e.target),a="internal"in e?e.internal:!n||n.some((function(e){return(0,i.Kg)(e)&&e[0]===t.delimiter})),o=this.machine.options.guards,l=this.resolveTarget(n),u=(0,r.Cl)((0,r.Cl)({},e),{actions:(0,s.Um)((0,i.$r)(e.actions)),cond:(0,i.Z8)(e.cond,o),target:l,source:this,internal:a,eventType:e.event,toJSON:function(){return(0,r.Cl)((0,r.Cl)({},u),{target:u.target?u.target.map((function(e){return"#".concat(e.id)})):void 0,source:"#".concat(t.id)})}});return u},e.prototype.formatTransitions=function(){var e,t,n,a=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var o=this.config.on,u=m,c=o[u],d=void 0===c?[]:c,h=(0,r.Tt)(o,["*"]);n=(0,i.Bq)(Object.keys(h).map((function(e){l.p||e!==f||(0,i.R8)(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(a.id,'".'));var t=(0,i.oc)(e,h[e]);return l.p||function(e,t,n){var r=n.slice(0,-1).some((function(e){return!("cond"in e)&&!("in"in e)&&((0,i.Kg)(e.target)||(0,i.Ai)(e.target))})),a=t===f?"the transient event":"event '".concat(t,"'");(0,i.R8)(!r,"One or more transitions for ".concat(a," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")}(a,e,t),t})).concat((0,i.oc)(m,d)))}else n=[];var p=this.config.always?(0,i.oc)("",this.config.always):[],g=this.config.onDone?(0,i.oc)(String((0,s.Vw)(this.id)),this.config.onDone):[];l.p||(0,i.R8)(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var v=(0,i.Bq)(this.invoke.map((function(e){var t=[];return e.onDone&&t.push.apply(t,(0,r.fX)([],(0,r.zs)((0,i.oc)(String((0,s.tS)(e.id)),e.onDone)),!1)),e.onError&&t.push.apply(t,(0,r.fX)([],(0,r.zs)((0,i.oc)(String((0,s.z3)(e.id)),e.onError)),!1)),t}))),y=this.after,b=(0,i.Bq)((0,r.fX)((0,r.fX)((0,r.fX)((0,r.fX)([],(0,r.zs)(g),!1),(0,r.zs)(v),!1),(0,r.zs)(n),!1),(0,r.zs)(p),!1).map((function(e){return(0,i.$r)(e).map((function(e){return a.formatTransition(e)}))})));try{for(var w=(0,r.Ju)(y),S=w.next();!S.done;S=w.next()){var x=S.value;b.push(x)}}catch(t){e={error:t}}finally{try{S&&!S.done&&(t=w.return)&&t.call(w)}finally{if(e)throw e.error}}return b},e}(),b=!1;function w(e,t){return l.p||"predictableActionArguments"in e||b||(b=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new y(e,t)}},7768:(e,t,n)=>{"use strict";n.d(t,{OS:()=>c,Sv:()=>d,Uw:()=>h,iE:()=>u});var r=n(2551),i=n(8204),a=n(5968),o=n(6099),s=n(5846),l=n(5184);function u(e,t){if(e===t)return!0;if(void 0===e||void 0===t)return!1;if((0,a.Kg)(e)||(0,a.Kg)(t))return e===t;var n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((function(n){return u(e[n],t[n])}))}function c(e){return"object"==typeof e&&null!==e&&("value"in e&&"_event"in e)}function d(e,t){var n=e.exec;return(0,r.Cl)((0,r.Cl)({},e),{exec:void 0!==n?function(){return n(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0})}var h=function(){function e(e){var t,n=this;this.actions=[],this.activities=i.xP,this.meta={},this.events=[],this.value=e.value,this.context=e.context,this._event=e._event,this._sessionid=e._sessionid,this.event=this._event.data,this.historyValue=e.historyValue,this.history=e.history,this.actions=e.actions||[],this.activities=e.activities||i.xP,this.meta=(0,o.IQ)(e.configuration),this.events=e.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=e.configuration,this.transitions=e.transitions,this.children=e.children,this.done=!!e.done,this.tags=null!==(t=Array.isArray(e.tags)?new Set(e.tags):e.tags)&&void 0!==t?t:new Set,this.machine=e.machine,Object.defineProperty(this,"nextEvents",{get:function(){return(0,o.Xh)(n.configuration)}})}return e.from=function(t,n){return t instanceof e?t.context!==n?new e({value:t.value,context:n,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t:new e({value:t,context:n,_event:s.zp,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,n){if(t instanceof e){if(!t.actions.length)return t;var r=s.zp;return new e({value:t.value,context:n,_event:r,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,n)},e.prototype.toStrings=function(e,t){var n=this;if(void 0===e&&(e=this.value),void 0===t&&(t="."),(0,a.Kg)(e))return[e];var i=Object.keys(e);return i.concat.apply(i,(0,r.fX)([],(0,r.zs)(i.map((function(r){return n.toStrings(e[r],t).map((function(e){return r+t+e}))}))),!1))},e.prototype.toJSON=function(){var e=this;e.configuration,e.transitions;var t=e.tags;e.machine;var n=(0,r.Tt)(e,["configuration","transitions","tags","machine"]);return(0,r.Cl)((0,r.Cl)({},n),{tags:Array.from(t)})},e.prototype.matches=function(e){return(0,a.HK)(e,this.value)},e.prototype.hasTag=function(e){return this.tags.has(e)},e.prototype.can=function(e){var t;l.p&&(0,a.R8)(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=null===(t=this.machine)||void 0===t?void 0:t.getTransitionData(this,e);return!!(null==n?void 0:n.transitions.length)&&n.transitions.some((function(e){return void 0!==e.target||e.actions.length}))},e}()},2551:(e,t,n)=>{"use strict";n.d(t,{Cl:()=>r,Ju:()=>a,Tt:()=>i,fX:()=>s,zs:()=>o});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};function i(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function s(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}},6590:(e,t,n)=>{"use strict";n.d(t,{LM:()=>y,O$:()=>f,Rm:()=>d,Sw:()=>v,Ts:()=>h,ZT:()=>l,ds:()=>a,kp:()=>c,kx:()=>u,lA:()=>p,ni:()=>i,tN:()=>s,xl:()=>o,yo:()=>g,z3:()=>m});var r=n(5468),i=r.Q.Start,a=r.Q.Stop,o=r.Q.Raise,s=r.Q.Send,l=r.Q.Cancel,u=r.Q.NullEvent,c=r.Q.Assign,d=(r.Q.After,r.Q.DoneState,r.Q.Log),h=r.Q.Init,p=r.Q.Invoke,f=(r.Q.ErrorExecution,r.Q.ErrorPlatform),m=r.Q.ErrorCustom,g=r.Q.Update,v=r.Q.Choose,y=r.Q.Pure},5846:(e,t,n)=>{"use strict";n.d(t,{AS:()=>O,H7:()=>u,Hf:()=>c,Pl:()=>w,Um:()=>d,Vw:()=>S,ZT:()=>g,_4:()=>h,ds:()=>y,kp:()=>b,ni:()=>v,tN:()=>f,tS:()=>x,xl:()=>p,z3:()=>E,zp:()=>l});var r=n(2551),i=n(5468),a=n(6590),o=n(5968),s=n(5184),l=(0,o.ft)({type:a.Ts});function u(e,t){return t&&t[e]||void 0}function c(e,t){var n;if((0,o.Kg)(e)||"number"==typeof e){var i=u(e,t);n=(0,o.Tn)(i)?{type:e,exec:i}:i||{type:e,exec:void 0}}else if((0,o.Tn)(e))n={type:e.name||e.toString(),exec:e};else{i=u(e.type,t);if((0,o.Tn)(i))n=(0,r.Cl)((0,r.Cl)({},e),{exec:i});else if(i){var a=i.type||e.type;n=(0,r.Cl)((0,r.Cl)((0,r.Cl)({},i),e),{type:a})}else n=e}return n}var d=function(e,t){return e?((0,o.cy)(e)?e:[e]).map((function(e){return c(e,t)})):[]};function h(e){var t=c(e);return(0,r.Cl)((0,r.Cl)({id:(0,o.Kg)(e)?e:t.id},t),{type:t.type})}function p(e,t){return{type:a.xl,event:"function"==typeof e?e:(0,o.jK)(e),delay:t?t.delay:void 0,id:null==t?void 0:t.id}}function f(e,t){return{to:t?t.to:void 0,type:a.tN,event:(0,o.Tn)(e)?e:(0,o.jK)(e),delay:t?t.delay:void 0,id:t&&void 0!==t.id?t.id:(0,o.Tn)(e)?e.name:(0,o.vd)(e)}}var m=function(e,t,n){return(0,r.Cl)((0,r.Cl)({},e),{value:(0,o.Kg)(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},g=function(e){return{type:a.ZT,sendId:e}};function v(e){var t=h(e);return{type:i.Q.Start,activity:t,exec:void 0}}function y(e){var t=(0,o.Tn)(e)?e:h(e);return{type:i.Q.Stop,activity:t,exec:void 0}}var b=function(e){return{type:a.kp,assignment:e}};function w(e,t){var n=t?"#".concat(t):"";return"".concat(i.Q.After,"(").concat(e,")").concat(n)}function S(e,t){var n="".concat(i.Q.DoneState,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function x(e,t){var n="".concat(i.Q.DoneInvoke,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}function E(e,t){var n="".concat(i.Q.ErrorPlatform,".").concat(e),r={type:n,data:t,toString:function(){return n}};return r}var _=function(e){var t,n,i=[];try{for(var o=(0,r.Ju)(e),s=o.next();!s.done;s=o.next())for(var l=s.value,u=0;u<l.actions.length;)l.actions[u].type!==a.kp?u++:(i.push(l.actions[u]),l.actions.splice(u,1))}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i};function O(e,t,n,l,u,h,p){void 0===p&&(p=!1);var f=p?[]:_(u),g=f.length?(0,o.r_)(n,l,f,t):n,v=p?[n]:void 0,y=[];function b(u,f){var b;switch(f.type){case a.xl:var w=function(e,t,n,i){var s,l={_event:n},u=(0,o.ft)((0,o.Tn)(e.event)?e.event(t,n.data,l):e.event);if((0,o.Kg)(e.delay)){var c=i&&i[e.delay];s=(0,o.Tn)(c)?c(t,n.data,l):c}else s=(0,o.Tn)(e.delay)?e.delay(t,n.data,l):e.delay;return(0,r.Cl)((0,r.Cl)({},e),{type:a.xl,_event:u,delay:s})}(f,g,l,e.options.delays);return h&&"number"==typeof w.delay&&h(w,g,l),w;case a.tN:var S=function(e,t,n,i){var a,s={_event:n},l=(0,o.ft)((0,o.Tn)(e.event)?e.event(t,n.data,s):e.event);if((0,o.Kg)(e.delay)){var u=i&&i[e.delay];a=(0,o.Tn)(u)?u(t,n.data,s):u}else a=(0,o.Tn)(e.delay)?e.delay(t,n.data,s):e.delay;var c=(0,o.Tn)(e.to)?e.to(t,n.data,s):e.to;return(0,r.Cl)((0,r.Cl)({},e),{to:c,_event:l,event:l.data,delay:a})}(f,g,l,e.options.delays);if(!s.p){var x=f.delay;(0,o.R8)(!(0,o.Kg)(x)||"number"==typeof S.delay,"No delay reference for delay expression '".concat(x,"' was found on machine '").concat(e.id,"'"))}return h&&S.to!==i.i.Internal&&("entry"===u?y.push(S):h(S,g,l)),S;case a.Rm:var E=m(f,g,l);return null==h||h(E,g,l),E;case a.Sw:if(!(C=null===(b=f.conds.find((function(n){var r=(0,o.Z8)(n.cond,e.options.guards);return!r||(0,o.re)(e,r,g,l,h?void 0:t)})))||void 0===b?void 0:b.actions))return[];var _=(0,r.zs)(O(e,t,g,l,[{type:u,actions:d((0,o.$r)(C),e.options.actions)}],h,p),2),T=_[0],k=_[1];return g=k,null==v||v.push(g),T;case a.LM:var C;if(!(C=f.get(g,l.data)))return[];var A=(0,r.zs)(O(e,t,g,l,[{type:u,actions:d((0,o.$r)(C),e.options.actions)}],h,p),2),D=A[0],R=A[1];return g=R,null==v||v.push(g),D;case a.ds:E=function(e,t,n){var r=(0,o.Tn)(e.activity)?e.activity(t,n.data):e.activity,a="string"==typeof r?{id:r}:r;return{type:i.Q.Stop,activity:a}}(f,g,l);return null==h||h(E,n,l),E;case a.kp:g=(0,o.r_)(g,l,[f],h?void 0:t),null==v||v.push(g);break;default:var I=c(f,e.options.actions),P=I.exec;if(h)h(I,g,l);else if(P&&v){var N=v.length-1,j=(0,r.Cl)((0,r.Cl)({},I),{exec:function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];P.apply(void 0,(0,r.fX)([v[N]],(0,r.zs)(t),!1))}});I=j}return I}}return[(0,o.Bq)(u.map((function(e){var t,n,i=[];try{for(var a=(0,r.Ju)(e.actions),o=a.next();!o.done;o=a.next()){var s=o.value,u=b(e.type,s);u&&(i=i.concat(u))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return y.forEach((function(e){h(e,g,l)})),y.length=0,i}))),g]}},8204:(e,t,n)=>{"use strict";n.d(t,{$D:()=>o,AD:()=>r,hS:()=>a,xP:()=>i});var r=".",i={},a="xstate.guard",o=""},5184:(e,t,n)=>{"use strict";n.d(t,{p:()=>r});var r=!0},9221:(e,t,n)=>{"use strict";n.d(t,{kp:()=>r});var r=n(5846).kp},7268:(e,t,n)=>{"use strict";n.d(t,{U4:()=>T});var r=n(2551),i=n(5468),a=n(7768),o=n(6590),s=n(5846),l=n(5184),u=n(5968),c={deferEvents:!1},d=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=(0,r.Cl)((0,r.Cl)({},c),e)}return e.prototype.initialize=function(e){if(this.initialized=!0,e){if(!this.options.deferEvents)return void this.schedule(e);this.process(e)}this.flushEvents()},e.prototype.schedule=function(e){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(e),this.flushEvents()}else this.queue.push(e)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var e=this.queue.shift();e;)this.process(e),e=this.queue.shift()},e.prototype.process=function(e){this.processingEvent=!0;try{e()}catch(e){throw this.clear(),e}finally{this.processingEvent=!1}},e}(),h=n(5244),p=new Map,f=0,m=function(){return"x:".concat(f++)},g=function(e,t){return p.set(e,t),e},v=function(e){return p.get(e)},y=function(e){p.delete(e)};function b(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:void(l.p||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues"))}function w(e){if(b()){var t=function(){var e=b();if(e&&"__xstate__"in e)return e.__xstate__}();t&&t.register(e)}}var S=n(4648);function x(e,t){void 0===t&&(t={});var n=e.initialState,r=new Set,i=[],a=!1,o=(0,h.sk)({id:t.id,send:function(t){i.push(t),function(){if(!a){for(a=!0;i.length>0;){var t=i.shift();n=e.transition(n,t,s),r.forEach((function(e){return e.next(n)}))}a=!1}}()},getSnapshot:function(){return n},subscribe:function(e,t,i){var a=(0,u.WV)(e,t,i);return r.add(a),a.next(n),{unsubscribe:function(){r.delete(a)}}}}),s={parent:t.parent,self:o,id:t.id||"anonymous",observers:r};return n=e.start?e.start(s):n,o}var E,_={sync:!1,autoForward:!1};!function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(E||(E={}));var O=function(){function e(t,n){void 0===n&&(n=e.defaultOptions);var a=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=E.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(e,t){if((0,u.cy)(e))return a.batch(e),a.state;var n=(0,u.ft)((0,u.jK)(e,t));if(a.status===E.Stopped)return l.p||(0,u.R8)(!1,'Event "'.concat(n.name,'" was sent to stopped service "').concat(a.machine.id,'". This service has already reached its final state, and will not transition.\nEvent: ').concat(JSON.stringify(n.data))),a.state;if(a.status!==E.Running&&!a.options.deferEvents)throw new Error('Event "'.concat(n.name,'" was sent to uninitialized service "').concat(a.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: ').concat(JSON.stringify(n.data)));return a.scheduler.schedule((function(){a.forward(n);var e=a._nextState(n);a.update(e,n)})),a._state},this.sendTo=function(e,t,n){var c=a.parent&&(t===i.i.Parent||a.parent.id===t),d=c?a.parent:(0,u.Kg)(t)?t===i.i.Internal?a:a.children.get(t)||v(t):(0,u._3)(t)?t:void 0;if(d)if("machine"in d){if(a.status!==E.Stopped||a.parent!==d||a.state.done){var h=(0,r.Cl)((0,r.Cl)({},e),{name:e.name===o.z3?"".concat((0,s.z3)(a.id)):e.name,origin:a.sessionId});!n&&a.machine.config.predictableActionArguments?a._outgoingQueue.push([d,h]):d.send(h)}}else!n&&a.machine.config.predictableActionArguments?a._outgoingQueue.push([d,e.data]):d.send(e.data);else{if(!c)throw new Error("Unable to send event to child '".concat(t,"' from service '").concat(a.id,"'."));l.p||(0,u.R8)(!1,"Service '".concat(a.id,"' has no parent: unable to send event ").concat(e.type))}},this._exec=function(e,t,n,r){void 0===r&&(r=a.machine.options.actions);var c=e.exec||(0,s.H7)(e.type,r),d=(0,u.Tn)(c)?c:c?c.exec:e.exec;if(d)try{return d(t,n.data,a.machine.config.predictableActionArguments?{action:e,_event:n}:{action:e,state:a.state,_event:n})}catch(e){throw a.parent&&a.parent.send({type:"xstate.error",data:e}),e}switch(e.type){case o.xl:var h=e;a.defer(h);break;case o.tN:var p=e;if("number"==typeof p.delay)return void a.defer(p);p.to?a.sendTo(p._event,p.to,n===s.zp):a.send(p._event);break;case o.ZT:a.cancel(e.sendId);break;case o.ni:if(a.status!==E.Running)return;var f=e.activity;if(!a.machine.config.predictableActionArguments&&!a.state.activities[f.id||f.type])break;if(f.type===i.Q.Invoke){var m=(0,u.Xd)(f.src),g=a.machine.options.services?a.machine.options.services[m.type]:void 0,v=f.id,y=f.data;l.p||(0,u.R8)(!("forward"in f),"`forward` property is deprecated (found in invocation of '".concat(f.src,"' in in machine '").concat(a.machine.id,"'). ")+"Please use `autoForward` instead.");var b="autoForward"in f?f.autoForward:!!f.forward;if(!g)return void(l.p||(0,u.R8)(!1,"No service found for invocation '".concat(f.src,"' in machine '").concat(a.machine.id,"'.")));var w=y?(0,u.A9)(y,t,n):void 0;if("string"==typeof g)return;var S=(0,u.Tn)(g)?g(t,n.data,{data:w,src:m,meta:f.meta}):g;if(!S)return;var x=void 0;(0,u.Ai)(S)&&(S=w?S.withContext(w):S,x={autoForward:b}),a.spawn(S,v,x)}else a.spawnActivity(f);break;case o.ds:a.stopChild(e.activity.id);break;case o.Rm:var _=e,O=_.label,T=_.value;O?a.logger(O,T):a.logger(T);break;default:l.p||(0,u.R8)(!1,"No implementation found for action type '".concat(e.type,"'"))}};var c=(0,r.Cl)((0,r.Cl)({},e.defaultOptions),n),h=c.clock,p=c.logger,f=c.parent,g=c.id,y=void 0!==g?g:t.id;this.id=y,this.logger=p,this.clock=h,this.parent=f,this.options=c,this.scheduler=new d({deferEvents:this.options.deferEvents}),this.sessionId=m()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var e=this;return this._initialState?this._initialState:(0,S.G)(this,(function(){return e._initialState=e.machine.initialState,e._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return l.p||(0,u.R8)(this.status!==E.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(e,t){var n,i;try{for(var a=(0,r.Ju)(e.actions),o=a.next();!o.done;o=a.next()){var s=o.value;this.exec(s,e,t)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype.update=function(e,t){var n,i,a,o,l,c,d,h,p=this;if(e._sessionid=this.sessionId,this._state=e,this.machine.config.predictableActionArguments&&t!==s.zp||!this.options.execute)for(var f=void 0;f=this._outgoingQueue.shift();)f[0].send(f[1]);else this.execute(this.state);if(this.children.forEach((function(e){p.state.children[e.id]=e})),this.devTools&&this.devTools.send(t.data,e),e.event)try{for(var m=(0,r.Ju)(this.eventListeners),g=m.next();!g.done;g=m.next()){(0,g.value)(e.event)}}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}try{for(var v=(0,r.Ju)(this.listeners),b=v.next();!b.done;b=v.next()){(0,b.value)(e,e.event)}}catch(e){a={error:e}}finally{try{b&&!b.done&&(o=v.return)&&o.call(v)}finally{if(a)throw a.error}}try{for(var w=(0,r.Ju)(this.contextListeners),S=w.next();!S.done;S=w.next()){(0,S.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(e){l={error:e}}finally{try{S&&!S.done&&(c=w.return)&&c.call(w)}finally{if(l)throw l.error}}if(this.state.done){var x=e.configuration.find((function(e){return"final"===e.type&&e.parent===p.machine})),E=x&&x.doneData?(0,u.A9)(x.doneData,e.context,t):void 0;this._doneEvent=(0,s.tS)(this.id,E);try{for(var _=(0,r.Ju)(this.doneListeners),O=_.next();!O.done;O=_.next()){(0,O.value)(this._doneEvent)}}catch(e){d={error:e}}finally{try{O&&!O.done&&(h=_.return)&&h.call(_)}finally{if(d)throw d.error}}this._stop(),this._stopChildren(),y(this.sessionId)}},e.prototype.onTransition=function(e){return this.listeners.add(e),this.status===E.Running&&e(this.state,this.state.event),this},e.prototype.subscribe=function(e,t,n){var r=this,i=(0,u.WV)(e,t,n);this.listeners.add(i.next),this.status!==E.NotStarted&&i.next(this.state);var a=function(){r.doneListeners.delete(a),r.stopListeners.delete(a),i.complete()};return this.status===E.Stopped?i.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){r.listeners.delete(i.next),r.doneListeners.delete(a),r.stopListeners.delete(a)}}},e.prototype.onEvent=function(e){return this.eventListeners.add(e),this},e.prototype.onSend=function(e){return this.sendListeners.add(e),this},e.prototype.onChange=function(e){return this.contextListeners.add(e),this},e.prototype.onStop=function(e){return this.stopListeners.add(e),this},e.prototype.onDone=function(e){return this.status===E.Stopped&&this._doneEvent?e(this._doneEvent):this.doneListeners.add(e),this},e.prototype.off=function(e){return this.listeners.delete(e),this.eventListeners.delete(e),this.sendListeners.delete(e),this.stopListeners.delete(e),this.doneListeners.delete(e),this.contextListeners.delete(e),this},e.prototype.start=function(e){var t=this;if(this.status===E.Running)return this;this.machine._init(),g(this.sessionId,this),this.initialized=!0,this.status=E.Running;var n=void 0===e?this.initialState:(0,S.G)(this,(function(){return(0,a.OS)(e)?t.machine.resolveState(e):t.machine.resolveState(a.Uw.from(e,t.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){t.update(n,s.zp)})),this},e.prototype._stopChildren=function(){this.children.forEach((function(e){(0,u.Tn)(e.stop)&&e.stop()})),this.children.clear()},e.prototype._stop=function(){var e,t,n,i,a,o,s,l,u,c;try{for(var h=(0,r.Ju)(this.listeners),p=h.next();!p.done;p=h.next()){var f=p.value;this.listeners.delete(f)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}try{for(var m=(0,r.Ju)(this.stopListeners),g=m.next();!g.done;g=m.next()){(f=g.value)(),this.stopListeners.delete(f)}}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}try{for(var v=(0,r.Ju)(this.contextListeners),y=v.next();!y.done;y=v.next()){f=y.value;this.contextListeners.delete(f)}}catch(e){a={error:e}}finally{try{y&&!y.done&&(o=v.return)&&o.call(v)}finally{if(a)throw a.error}}try{for(var b=(0,r.Ju)(this.doneListeners),w=b.next();!w.done;w=b.next()){f=w.value;this.doneListeners.delete(f)}}catch(e){s={error:e}}finally{try{w&&!w.done&&(l=b.return)&&l.call(b)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=E.Stopped,this._initialState=void 0;try{for(var S=(0,r.Ju)(Object.keys(this.delayedEventsMap)),x=S.next();!x.done;x=S.next()){var _=x.value;this.clock.clearTimeout(this.delayedEventsMap[_])}}catch(e){u={error:e}}finally{try{x&&!x.done&&(c=S.return)&&c.call(S)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new d({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var e=this,t=this.scheduler;return this._stop(),t.schedule((function(){var t;if(!(null===(t=e._state)||void 0===t?void 0:t.done)){var n=(0,u.ft)({type:"xstate.stop"}),i=(0,S.G)(e,(function(){var t=(0,u.Bq)((0,r.fX)([],(0,r.zs)(e.state.configuration),!1).sort((function(e,t){return t.order-e.order})).map((function(t){return(0,s.Um)(t.onExit,e.machine.options.actions)}))),i=(0,r.zs)((0,s.AS)(e.machine,e.state,e.state.context,n,[{type:"exit",actions:t}],e.machine.config.predictableActionArguments?e._exec:void 0,e.machine.config.predictableActionArguments||e.machine.config.preserveActionOrder),2),o=i[0],l=i[1],c=new a.Uw({value:e.state.value,context:l,_event:n,_sessionid:e.sessionId,historyValue:void 0,history:e.state,actions:o.filter((function(e){return!(0,u.Gx)(e)})),activities:{},events:[],configuration:[],transitions:[],children:{},done:e.state.done,tags:e.state.tags,machine:e.machine});return c.changed=!0,c}));e.update(i,n),e._stopChildren(),y(e.sessionId)}})),this},e.prototype.batch=function(e){var t=this;if(this.status===E.NotStarted&&this.options.deferEvents)l.p||(0,u.R8)(!1,"".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'" and are deferred. Make sure .start() is called for this service.\nEvent: ').concat(JSON.stringify(event)));else if(this.status!==E.Running)throw new Error("".concat(e.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(e.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule((function(){var i,o,s=t.state,l=!1,c=[],d=function(e){var i=(0,u.ft)(e);t.forward(i),s=(0,S.G)(t,(function(){return t.machine.transition(s,i,void 0,n||void 0)})),c.push.apply(c,(0,r.fX)([],(0,r.zs)(t.machine.config.predictableActionArguments?s.actions:s.actions.map((function(e){return(0,a.Sv)(e,s)}))),!1)),l=l||!!s.changed};try{for(var h=(0,r.Ju)(e),p=h.next();!p.done;p=h.next()){d(p.value)}}catch(e){i={error:e}}finally{try{p&&!p.done&&(o=h.return)&&o.call(h)}finally{if(i)throw i.error}}s.changed=l,s.actions=c,t.update(s,(0,u.ft)(e[e.length-1]))}))}},e.prototype.sender=function(e){return this.send.bind(this,e)},e.prototype._nextState=function(e,t){var n=this;void 0===t&&(t=!!this.machine.config.predictableActionArguments&&this._exec);var r=(0,u.ft)(e);if(0===r.name.indexOf(o.O$)&&!this.state.nextEvents.some((function(e){return 0===e.indexOf(o.O$)})))throw r.data.data;return(0,S.G)(this,(function(){return n.machine.transition(n.state,r,void 0,t||void 0)}))},e.prototype.nextState=function(e){return this._nextState(e,!1)},e.prototype.forward=function(e){var t,n;try{for(var i=(0,r.Ju)(this.forwardTo),a=i.next();!a.done;a=i.next()){var o=a.value,s=this.children.get(o);if(!s)throw new Error("Unable to forward event '".concat(e,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(o,"'."));s.send(e)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},e.prototype.defer=function(e){var t=this,n=this.clock.setTimeout((function(){"to"in e&&e.to?t.sendTo(e._event,e.to,!0):t.send(e._event)}),e.delay);e.id&&(this.delayedEventsMap[e.id]=n)},e.prototype.cancel=function(e){this.clock.clearTimeout(this.delayedEventsMap[e]),delete this.delayedEventsMap[e]},e.prototype.exec=function(e,t,n){void 0===n&&(n=this.machine.options.actions),this._exec(e,t.context,t._event,n)},e.prototype.removeChild=function(e){var t;this.children.delete(e),this.forwardTo.delete(e),null===(t=this.state)||void 0===t||delete t.children[e]},e.prototype.stopChild=function(e){var t=this.children.get(e);t&&(this.removeChild(e),(0,u.Tn)(t.stop)&&t.stop())},e.prototype.spawn=function(e,t,n){if(this.status!==E.Running)return(0,h.Py)(e,t);if((0,u.$X)(e))return this.spawnPromise(Promise.resolve(e),t);if((0,u.Tn)(e))return this.spawnCallback(e,t);if((0,h.gY)(e))return this.spawnActor(e,t);if((0,u.AT)(e))return this.spawnObservable(e,t);if((0,u.Ai)(e))return this.spawnMachine(e,(0,r.Cl)((0,r.Cl)({},n),{id:t}));if((0,u.lx)(e))return this.spawnBehavior(e,t);throw new Error('Unable to spawn entity "'.concat(t,'" of type "').concat(typeof e,'".'))},e.prototype.spawnMachine=function(t,n){var i=this;void 0===n&&(n={});var a=new e(t,(0,r.Cl)((0,r.Cl)({},this.options),{parent:this,id:n.id||t.id})),s=(0,r.Cl)((0,r.Cl)({},_),n);s.sync&&a.onTransition((function(e){i.send(o.yo,{state:e,id:a.id})}));var l=a;return this.children.set(a.id,l),s.autoForward&&this.forwardTo.add(a.id),a.onDone((function(e){i.removeChild(a.id),i.send((0,u.ft)(e,{origin:a.id}))})).start(),l},e.prototype.spawnBehavior=function(e,t){var n=x(e,{id:t,parent:this});return this.children.set(t,n),n},e.prototype.spawnPromise=function(e,t){var n,r,i=this,a=!1;e.then((function(e){a||(r=e,i.removeChild(t),i.send((0,u.ft)((0,s.tS)(t,e),{origin:t})))}),(function(e){if(!a){i.removeChild(t);var n=(0,s.z3)(t,e);try{i.send((0,u.ft)(n,{origin:t}))}catch(r){(0,u.En)(e,r,t),i.devTools&&i.devTools.send(n,i.state),i.machine.strict&&i.stop()}}}));var o=((n={id:t,send:function(){},subscribe:function(t,n,r){var i=(0,u.WV)(t,n,r),a=!1;return e.then((function(e){a||(i.next(e),a||i.complete())}),(function(e){a||i.error(e)})),{unsubscribe:function(){return a=!0}}},stop:function(){a=!0},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[u.s7]=function(){return this},n);return this.children.set(t,o),o},e.prototype.spawnCallback=function(e,t){var n,r,i,a=this,o=!1,l=new Set,c=new Set;try{i=e((function(e){r=e,c.forEach((function(t){return t(e)})),o||a.send((0,u.ft)(e,{origin:t}))}),(function(e){l.add(e)}))}catch(e){this.send((0,s.z3)(t,e))}if((0,u.$X)(i))return this.spawnPromise(i,t);var d=((n={id:t,send:function(e){return l.forEach((function(t){return t(e)}))},subscribe:function(e){var t=(0,u.WV)(e);return c.add(t.next),{unsubscribe:function(){c.delete(t.next)}}},stop:function(){o=!0,(0,u.Tn)(i)&&i()},toJSON:function(){return{id:t}},getSnapshot:function(){return r}})[u.s7]=function(){return this},n);return this.children.set(t,d),d},e.prototype.spawnObservable=function(e,t){var n,r,i=this,a=e.subscribe((function(e){r=e,i.send((0,u.ft)(e,{origin:t}))}),(function(e){i.removeChild(t),i.send((0,u.ft)((0,s.z3)(t,e),{origin:t}))}),(function(){i.removeChild(t),i.send((0,u.ft)((0,s.tS)(t),{origin:t}))})),o=((n={id:t,send:function(){},subscribe:function(t,n,r){return e.subscribe(t,n,r)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return r},toJSON:function(){return{id:t}}})[u.s7]=function(){return this},n);return this.children.set(t,o),o},e.prototype.spawnActor=function(e,t){return this.children.set(t,e),e},e.prototype.spawnActivity=function(e){var t=this.machine.options&&this.machine.options.activities?this.machine.options.activities[e.type]:void 0;if(t){var n=t(this.state.context,e);this.spawnEffect(e.id,n)}else l.p||(0,u.R8)(!1,"No implementation found for activity '".concat(e.type,"'"))},e.prototype.spawnEffect=function(e,t){var n;this.children.set(e,((n={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:t||void 0,getSnapshot:function(){},toJSON:function(){return{id:e}}})[u.s7]=function(){return this},n))},e.prototype.attachDev=function(){var e=b();if(this.options.devTools&&e){if(e.__REDUX_DEVTOOLS_EXTENSION__){var t="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect((0,r.Cl)((0,r.Cl)({name:this.id,autoPause:!0,stateSanitizer:function(e){return{value:e.value,context:e.context,actions:e.actions}}},t),{features:(0,r.Cl)({jump:!1,skip:!1},t?t.features:void 0)}),this.machine),this.devTools.init(this.state)}w(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[u.s7]=function(){return this},e.prototype.getSnapshot=function(){return this.status===E.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(e,t){return setTimeout(e,t)},clearTimeout:function(e){return clearTimeout(e)}},logger:console.log.bind(console),devTools:!1},e.interpret=T,e}();function T(e,t){return new O(e,t)}},4648:(e,t,n)=>{"use strict";n.d(t,{G:()=>i});var r=[],i=function(e,t){r.push(e);var n=t(e);return r.pop(),n}},6099:(e,t,n)=>{"use strict";n.d(t,{BJ:()=>m,D0:()=>u,IQ:()=>g,Ki:()=>l,Xh:()=>f,_W:()=>h,d2:()=>a,i0:()=>s,iU:()=>v,rz:()=>o,zy:()=>p});var r=n(2551),i=n(5968),a=function(e){return"atomic"===e.type||"final"===e.type};function o(e){return Object.keys(e.states).map((function(t){return e.states[t]}))}function s(e){return o(e).filter((function(e){return"history"!==e.type}))}function l(e){var t=[e];return a(e)?t:t.concat((0,i.Bq)(s(e).map(l)))}function u(e,t){var n,i,a,o,l,u,c,h,p=d(new Set(e)),f=new Set(t);try{for(var m=(0,r.Ju)(f),g=m.next();!g.done;g=m.next())for(var v=(T=g.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}catch(e){n={error:e}}finally{try{g&&!g.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}var y=d(f);try{for(var b=(0,r.Ju)(f),w=b.next();!w.done;w=b.next()){if("compound"!==(T=w.value).type||y.get(T)&&y.get(T).length){if("parallel"===T.type)try{for(var S=(l=void 0,(0,r.Ju)(s(T))),x=S.next();!x.done;x=S.next()){var E=x.value;f.has(E)||(f.add(E),p.get(E)?p.get(E).forEach((function(e){return f.add(e)})):E.initialStateNodes.forEach((function(e){return f.add(e)})))}}catch(e){l={error:e}}finally{try{x&&!x.done&&(u=S.return)&&u.call(S)}finally{if(l)throw l.error}}}else p.get(T)?p.get(T).forEach((function(e){return f.add(e)})):T.initialStateNodes.forEach((function(e){return f.add(e)}))}}catch(e){a={error:e}}finally{try{w&&!w.done&&(o=b.return)&&o.call(b)}finally{if(a)throw a.error}}try{for(var _=(0,r.Ju)(f),O=_.next();!O.done;O=_.next()){var T;for(v=(T=O.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}}catch(e){c={error:e}}finally{try{O&&!O.done&&(h=_.return)&&h.call(_)}finally{if(c)throw c.error}}return f}function c(e,t){var n=t.get(e);if(!n)return{};if("compound"===e.type){var r=n[0];if(!r)return{};if(a(r))return r.key}var i={};return n.forEach((function(e){i[e.key]=c(e,t)})),i}function d(e){var t,n,i=new Map;try{for(var a=(0,r.Ju)(e),o=a.next();!o.done;o=a.next()){var s=o.value;i.has(s)||i.set(s,[]),s.parent&&(i.has(s.parent)||i.set(s.parent,[]),i.get(s.parent).push(s))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i}function h(e,t){return c(e,d(u([e],t)))}function p(e,t){return Array.isArray(e)?e.some((function(e){return e===t})):e instanceof Set&&e.has(t)}function f(e){return(0,r.fX)([],(0,r.zs)(new Set((0,i.Bq)((0,r.fX)([],(0,r.zs)(e.map((function(e){return e.ownEvents}))),!1)))),!1)}function m(e,t){return"compound"===t.type?s(t).some((function(t){return"final"===t.type&&p(e,t)})):"parallel"===t.type&&s(t).every((function(t){return m(e,t)}))}function g(e){return void 0===e&&(e=[]),e.reduce((function(e,t){return void 0!==t.meta&&(e[t.id]=t.meta),e}),{})}function v(e){return new Set((0,i.Bq)(e.map((function(e){return e.tags}))))}},5468:(e,t,n)=>{"use strict";var r,i;n.d(t,{Q:()=>r,i:()=>i}),function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"}(r||(r={})),function(e){e.Parent="#_parent",e.Internal="#_internal"}(i||(i={}))},5968:(e,t,n)=>{"use strict";n.d(t,{$X:()=>_,$r:()=>S,A9:()=>x,AT:()=>j,Ae:()=>g,Ai:()=>M,BY:()=>C,Bq:()=>b,En:()=>U,Gx:()=>Q,HK:()=>u,Kg:()=>P,LG:()=>f,M7:()=>E,R8:()=>D,R_:()=>z,Tn:()=>I,VQ:()=>v,WV:()=>G,Xd:()=>H,Z8:()=>N,_3:()=>F,_J:()=>d,at:()=>h,bm:()=>y,cv:()=>W,cy:()=>R,ft:()=>$,jB:()=>T,jK:()=>V,lx:()=>O,oc:()=>B,r_:()=>A,re:()=>q,rp:()=>m,s7:()=>L,vd:()=>c,zr:()=>p});var r,i=n(2551),a=n(5468),o=n(6590),s=n(8204),l=n(5184);function u(e,t,n){void 0===n&&(n=s.AD);var r=h(e,n),i=h(t,n);return P(i)?!!P(r)&&i===r:P(r)?r in i:Object.keys(r).every((function(e){return e in i&&u(r[e],i[e])}))}function c(e){try{return P(e)||"number"==typeof e?"".concat(e):e.type}catch(e){throw new Error("Events must be strings or objects with a string event.type property.")}}function d(e,t){try{return R(e)?e:e.toString().split(t)}catch(t){throw new Error("'".concat(e,"' is not a valid state path."))}}function h(e,t){return"object"==typeof(n=e)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?e.value:R(e)?p(e):"string"!=typeof e?e:p(d(e,t));var n}function p(e){if(1===e.length)return e[0];for(var t={},n=t,r=0;r<e.length-1;r++)r===e.length-2?n[e[r]]=e[r+1]:(n[e[r]]={},n=n[e[r]]);return t}function f(e,t){for(var n={},r=Object.keys(e),i=0;i<r.length;i++){var a=r[i];n[a]=t(e[a],a,e,i)}return n}function m(e,t,n){var r,a,o={};try{for(var s=(0,i.Ju)(Object.keys(e)),l=s.next();!l.done;l=s.next()){var u=l.value,c=e[u];n(c)&&(o[u]=t(c,u,e))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(r)throw r.error}}return o}var g=function(e){return function(t){var n,r,a=t;try{for(var o=(0,i.Ju)(e),s=o.next();!s.done;s=o.next()){a=a[s.value]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a}};function v(e,t){return function(n){var r,a,o=n;try{for(var s=(0,i.Ju)(e),l=s.next();!l.done;l=s.next()){var u=l.value;o=o[t][u]}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(r)throw r.error}}return o}}function y(e){return e?P(e)?[[e]]:b(Object.keys(e).map((function(t){var n=e[t];return"string"==typeof n||n&&Object.keys(n).length?y(e[t]).map((function(e){return[t].concat(e)})):[[t]]}))):[[]]}function b(e){var t;return(t=[]).concat.apply(t,(0,i.fX)([],(0,i.zs)(e),!1))}function w(e){return R(e)?e:[e]}function S(e){return void 0===e?[]:w(e)}function x(e,t,n){var r,a;if(I(e))return e(t,n.data);var o={};try{for(var s=(0,i.Ju)(Object.keys(e)),l=s.next();!l.done;l=s.next()){var u=l.value,c=e[u];I(c)?o[u]=c(t,n.data):o[u]=c}}catch(e){r={error:e}}finally{try{l&&!l.done&&(a=s.return)&&a.call(s)}finally{if(r)throw r.error}}return o}function E(e){return/^(done|error)\./.test(e)}function _(e){return e instanceof Promise||!(null===e||!I(e)&&"object"!=typeof e||!I(e.then))}function O(e){return null!==e&&"object"==typeof e&&"transition"in e&&"function"==typeof e.transition}function T(e,t){var n,r,a=(0,i.zs)([[],[]],2),o=a[0],s=a[1];try{for(var l=(0,i.Ju)(e),u=l.next();!u.done;u=l.next()){var c=u.value;t(c)?o.push(c):s.push(c)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return[o,s]}function k(e,t){return f(e.states,(function(e,n){if(e){var r=(P(t)?void 0:t[n])||(e?e.current:void 0);if(r)return{current:r,states:k(e,r)}}}))}function C(e,t){return{current:t,states:k(e,t)}}function A(e,t,n,r){l.p||D(!!e,"Attempting to update undefined context");var a=e?n.reduce((function(e,n){var a,o,s=n.assignment,l={state:r,action:n,_event:t},u={};if(I(s))u=s(e,t.data,l);else try{for(var c=(0,i.Ju)(Object.keys(s)),d=c.next();!d.done;d=c.next()){var h=d.value,p=s[h];u[h]=I(p)?p(e,t.data,l):p}}catch(e){a={error:e}}finally{try{d&&!d.done&&(o=c.return)&&o.call(c)}finally{if(a)throw a.error}}return Object.assign({},e,u)}),e):e;return a}var D=function(){};function R(e){return Array.isArray(e)}function I(e){return"function"==typeof e}function P(e){return"string"==typeof e}function N(e,t){if(e)return P(e)?{type:s.hS,name:e,predicate:t?t[e]:void 0}:I(e)?{type:s.hS,name:e.name,predicate:e}:e}function j(e){try{return"subscribe"in e&&I(e.subscribe)}catch(e){return!1}}l.p||(D=function(e,t){var n=e instanceof Error?e:void 0;if((n||!e)&&void 0!==console){var r=["Warning: ".concat(t)];n&&r.push(n),console.warn.apply(console,r)}});var L=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();(r={})[L]=function(){return this},r[Symbol.observable]=function(){return this};function M(e){return!!e&&"__xstatenode"in e}function F(e){return!!e&&"function"==typeof e.send}function V(e,t){return P(e)||"number"==typeof e?(0,i.Cl)({type:e},t):e}function $(e,t){if(!P(e)&&"$$type"in e&&"scxml"===e.$$type)return e;var n=V(e);return(0,i.Cl)({name:n.type,data:n,$$type:"scxml",type:"external"},t)}function B(e,t){return w(t).map((function(t){return void 0===t||"string"==typeof t||M(t)?{target:t,event:e}:(0,i.Cl)((0,i.Cl)({},t),{event:e})}))}function z(e){if(void 0!==e&&e!==s.$D)return S(e)}function U(e,t,n){if(!l.p){var r=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(n,"', error was '").concat(e,"'.").concat(r));else{var i=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(n,"'. ")+"Original error: '".concat(e,"'. ").concat(r," Current error is '").concat(t,"'.").concat(i))}}}function q(e,t,n,r,i){var a=e.options.guards,o={state:i,cond:t,_event:r};if(t.type===s.hS)return((null==a?void 0:a[t.name])||t.predicate)(n,r.data,o);var l=null==a?void 0:a[t.type];if(!l)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return l(n,r.data,o)}function H(e){return"string"==typeof e?{type:e}:e}function G(e,t,n){var r=function(){},i="object"==typeof e,a=i?e:null;return{next:((i?e.next:e)||r).bind(a),error:((i?e.error:t)||r).bind(a),complete:((i?e.complete:n)||r).bind(a)}}function W(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Q(e){return(e.type===o.xl||e.type===o.tN&&e.to===a.i.Internal)&&"number"!=typeof e.delay}},411:(e,t,n)=>{"use strict";function r(e){const t=function(){if(!o){o=[];const e=s("std");for(let t=0;t<e.length;t++)o[e[t].charCodeAt(0)]=t;o["-".charCodeAt(0)]=e.indexOf("+"),o["_".charCodeAt(0)]=e.indexOf("/")}return o}();let n=3*e.length/4;"="==e[e.length-2]?n-=2:"="==e[e.length-1]&&(n-=1);let r,i=new Uint8Array(n),a=0,l=0,u=0;for(let n=0;n<e.length;n++){if(r=t[e.charCodeAt(n)],void 0===r)switch(e[n]){case"=":l=0;case"\n":case"\r":case"\t":case" ":continue;default:throw Error("invalid base64 string")}switch(l){case 0:u=r,l=1;break;case 1:i[a++]=u<<2|(48&r)>>4,u=r,l=2;break;case 2:i[a++]=(15&u)<<4|(60&r)>>2,u=r,l=3;break;case 3:i[a++]=(3&u)<<6|r,l=0}}if(1==l)throw Error("invalid base64 string");return i.subarray(0,a)}let i,a,o;function s(e){return i||(i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),a=i.slice(0,-2).concat("-","_")),"url"==e?a:i}function l(e){let t=!1;const n=[];for(let r=0;r<e.length;r++){let i=e.charAt(r);switch(i){case"_":t=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":n.push(i),t=!1;break;default:t&&(t=!1,i=i.toUpperCase()),n.push(i)}}return n.join("")}n.d(t,{w:()=>bt});const u=new Set(["constructor","toString","toJSON","valueOf"]);function c(e){return u.has(e)?e+"$":e}var d=n(9228);function h(e){for(const t of e.field)(0,d.b1)(t,"jsonName")||(t.jsonName=l(t.name));e.nestedType.forEach(h)}var p=n(6592),f=n(8302);function m(e,t){switch(e){case p.L.STRING:return t;case p.L.BYTES:{const n=function(e){const t=[],n={tail:e,c:"",next(){return 0!=this.tail.length&&(this.c=this.tail[0],this.tail=this.tail.substring(1),!0)},take(e){if(this.tail.length>=e){const t=this.tail.substring(0,e);return this.tail=this.tail.substring(e),t}return!1}};for(;n.next();)if("\\"===n.c){if(n.next())switch(n.c){case"\\":t.push(n.c.charCodeAt(0));break;case"b":t.push(8);break;case"f":t.push(12);break;case"n":t.push(10);break;case"r":t.push(13);break;case"t":t.push(9);break;case"v":t.push(11);break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":{const e=n.c,r=n.take(2);if(!1===r)return!1;const i=parseInt(e+r,8);if(isNaN(i))return!1;t.push(i);break}case"x":{const e=n.c,r=n.take(2);if(!1===r)return!1;const i=parseInt(e+r,16);if(isNaN(i))return!1;t.push(i);break}case"u":{const e=n.c,r=n.take(4);if(!1===r)return!1;const i=parseInt(e+r,16);if(isNaN(i))return!1;const a=new Uint8Array(4);new DataView(a.buffer).setInt32(0,i,!0),t.push(a[0],a[1],a[2],a[3]);break}case"U":{const e=n.c,r=n.take(8);if(!1===r)return!1;const i=f.M.uEnc(e+r),a=new Uint8Array(8),o=new DataView(a.buffer);o.setInt32(0,i.lo,!0),o.setInt32(4,i.hi,!0),t.push(a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);break}}}else t.push(n.c.charCodeAt(0));return new Uint8Array(t)}(t);if(!1===n)throw new Error(`cannot parse ${p.L[e]} default value: ${t}`);return n}case p.L.INT64:case p.L.SFIXED64:case p.L.SINT64:return f.M.parse(t);case p.L.UINT64:case p.L.FIXED64:return f.M.uParse(t);case p.L.DOUBLE:case p.L.FLOAT:switch(t){case"inf":return Number.POSITIVE_INFINITY;case"-inf":return Number.NEGATIVE_INFINITY;case"nan":return Number.NaN;default:return parseFloat(t)}case p.L.BOOL:return"true"===t;case p.L.INT32:case p.L.UINT32:case p.L.SINT32:case p.L.FIXED32:case p.L.SFIXED32:return parseInt(t,10)}}function*g(e){switch(e.kind){case"file":for(const t of e.messages)yield t,yield*g(t);yield*e.enums,yield*e.services,yield*e.extensions;break;case"message":for(const t of e.nestedMessages)yield t,yield*g(t);yield*e.nestedEnums,yield*e.nestedExtensions}}function v(...e){const t=y();if(!e.length)return t;if("$typeName"in e[0]&&"google.protobuf.FileDescriptorSet"==e[0].$typeName){for(const n of e[0].file)M(n,t);return t}if("$typeName"in e[0]){const r=e[0],i=e[1],a=new Set;function o(e){const n=[];for(const r of e.dependency){if(null!=t.getFile(r))continue;if(a.has(r))continue;const o=i(r);if(!o)throw new Error(`Unable to resolve ${r}, imported by ${e.name}`);"kind"in o?t.addFile(o,!1,!0):(a.add(o.name),n.push(o))}return n.concat(...n.map(o))}for(const s of[r,...o(r)].reverse())M(s,t)}else for(const l of e)for(const u of l.files)t.addFile(u);return t}function y(){const e=new Map,t=new Map,n=new Map;return{kind:"registry",types:e,extendees:t,[Symbol.iterator]:()=>e.values(),get files(){return n.values()},addFile(e,t,r){if(n.set(e.proto.name,e),!t)for(const t of g(e))this.add(t);if(r)for(const n of e.dependencies)this.addFile(n,t,r)},add(n){if("extension"==n.kind){let e=t.get(n.extendee.typeName);e||t.set(n.extendee.typeName,e=new Map),e.set(n.number,n)}e.set(n.typeName,n)},get:t=>e.get(t),getFile:e=>n.get(e),getMessage(t){const n=e.get(t);return"message"==(null==n?void 0:n.kind)?n:void 0},getEnum(t){const n=e.get(t);return"enum"==(null==n?void 0:n.kind)?n:void 0},getExtension(t){const n=e.get(t);return"extension"==(null==n?void 0:n.kind)?n:void 0},getExtensionFor(e,n){var r;return null===(r=t.get(e.typeName))||void 0===r?void 0:r.get(n)},getService(t){const n=e.get(t);return"service"==(null==n?void 0:n.kind)?n:void 0}}}const b=998,w=999,S=9,x=10,E=11,_=12,O=14,T=3,k=2,C=1,A=0,D=1,R=2,I=3,P=1,N=2,j=1,L={998:{fieldPresence:1,enumType:2,repeatedFieldEncoding:2,utf8Validation:3,messageEncoding:1,jsonFormat:2},999:{fieldPresence:2,enumType:1,repeatedFieldEncoding:1,utf8Validation:2,messageEncoding:1,jsonFormat:1},1e3:{fieldPresence:1,enumType:1,repeatedFieldEncoding:1,utf8Validation:2,messageEncoding:1,jsonFormat:1}};function M(e,t){var n,r;const i={kind:"file",proto:e,deprecated:null!==(r=null===(n=e.options)||void 0===n?void 0:n.deprecated)&&void 0!==r&&r,edition:H(e),name:e.name.replace(/\.proto$/,""),dependencies:G(e,t),enums:[],messages:[],extensions:[],services:[],toString:()=>`file ${e.name}`},a=new Map,o={get:e=>a.get(e),add(e){var t;Z(!0===(null===(t=e.proto.options)||void 0===t?void 0:t.mapEntry)),a.set(e.typeName,e)}};for(const n of e.enumType)$(n,i,void 0,t);for(const n of e.messageType)B(n,i,void 0,t,o);for(const n of e.service)z(n,i,t);F(i,t);for(const e of a.values())V(e,t,o);for(const e of i.messages)V(e,t,o),F(e,t);t.addFile(i,!0)}function F(e,t){switch(e.kind){case"file":for(const n of e.proto.extension){const r=q(n,e,t);e.extensions.push(r),t.add(r)}break;case"message":for(const n of e.proto.extension){const r=q(n,e,t);e.nestedExtensions.push(r),t.add(r)}for(const n of e.nestedMessages)F(n,t)}}function V(e,t,n){const r=e.proto.oneofDecl.map((t=>function(e,t){return{kind:"oneof",proto:e,deprecated:!1,parent:t,fields:[],name:e.name,localName:c(l(e.name)),toString(){return`oneof ${t.typeName}.${this.name}`}}}(t,e))),i=new Set;for(const a of e.proto.field){const o=K(a,r),s=q(a,e,t,o,n);e.fields.push(s),e.field[s.localName]=s,void 0===o?e.members.push(s):(o.fields.push(s),i.has(o)||(i.add(o),e.members.push(o)))}for(const t of r.filter((e=>i.has(e))))e.oneofs.push(t);for(const r of e.nestedMessages)V(r,t,n)}function $(e,t,n,r){var i,a,o;const s=function(e,t){const n=(r=e,(r.substring(0,1)+r.substring(1).replace(/[A-Z]/g,(e=>"_"+e))).toLowerCase()+"_");var r;for(const e of t){if(!e.name.toLowerCase().startsWith(n))return;const t=e.name.substring(n.length);if(0==t.length)return;if(/^\d/.test(t))return}return n}(e.name,e.value),l={kind:"enum",proto:e,deprecated:null!==(a=null===(i=e.options)||void 0===i?void 0:i.deprecated)&&void 0!==a&&a,file:t,parent:n,open:!0,name:e.name,typeName:W(e,n,t),value:{},values:[],sharedPrefix:s,toString(){return`enum ${this.typeName}`}};l.open=function(e){var t;return j==J("enumType",{proto:e.proto,parent:null!==(t=e.parent)&&void 0!==t?t:e.file})}(l),r.add(l),e.value.forEach((e=>{var t,n;const r=e.name;l.values.push(l.value[e.number]={kind:"enum_value",proto:e,deprecated:null!==(n=null===(t=e.options)||void 0===t?void 0:t.deprecated)&&void 0!==n&&n,parent:l,name:r,localName:c(null==s?r:r.substring(s.length)),number:e.number,toString:()=>`enum value ${l.typeName}.${r}`})})),(null!==(o=null==n?void 0:n.nestedEnums)&&void 0!==o?o:t.enums).push(l)}function B(e,t,n,r,i){var a,o,s,l;const u={kind:"message",proto:e,deprecated:null!==(o=null===(a=e.options)||void 0===a?void 0:a.deprecated)&&void 0!==o&&o,file:t,parent:n,name:e.name,typeName:W(e,n,t),fields:[],field:{},oneofs:[],members:[],nestedEnums:[],nestedMessages:[],nestedExtensions:[],toString(){return`message ${this.typeName}`}};!0===(null===(s=e.options)||void 0===s?void 0:s.mapEntry)?i.add(u):((null!==(l=null==n?void 0:n.nestedMessages)&&void 0!==l?l:t.messages).push(u),r.add(u));for(const n of e.enumType)$(n,t,u,r);for(const n of e.nestedType)B(n,t,u,r,i)}function z(e,t,n){var r,i;const a={kind:"service",proto:e,deprecated:null!==(i=null===(r=e.options)||void 0===r?void 0:r.deprecated)&&void 0!==i&&i,file:t,name:e.name,typeName:W(e,void 0,t),methods:[],method:{},toString(){return`service ${this.typeName}`}};t.services.push(a),n.add(a);for(const t of e.method){const e=U(t,a,n);a.methods.push(e),a.method[e.localName]=e}}function U(e,t,n){var r,i,a,o;let s;s=e.clientStreaming&&e.serverStreaming?"bidi_streaming":e.clientStreaming?"client_streaming":e.serverStreaming?"server_streaming":"unary";const l=n.getMessage(Q(e.inputType)),u=n.getMessage(Q(e.outputType));Z(l,`invalid MethodDescriptorProto: input_type ${e.inputType} not found`),Z(u,`invalid MethodDescriptorProto: output_type ${e.inputType} not found`);const d=e.name;return{kind:"rpc",proto:e,deprecated:null!==(i=null===(r=e.options)||void 0===r?void 0:r.deprecated)&&void 0!==i&&i,parent:t,name:d,localName:c(d.length?c(d[0].toLowerCase()+d.substring(1)):d),methodKind:s,input:l,output:u,idempotency:null!==(o=null===(a=e.options)||void 0===a?void 0:a.idempotencyLevel)&&void 0!==o?o:A,toString:()=>`rpc ${t.typeName}.${d}`}}function q(e,t,n,r,i){var a,o,s;const u=void 0===i,h={kind:"field",proto:e,deprecated:null!==(o=null===(a=e.options)||void 0===a?void 0:a.deprecated)&&void 0!==o&&o,name:e.name,number:e.number,scalar:void 0,message:void 0,enum:void 0,presence:X(e,r,u,t),listKind:void 0,mapKind:void 0,mapKey:void 0,delimitedEncoding:void 0,packed:void 0,longAsString:!1,getDefaultValue:void 0};if(u){const r="file"==t.kind?t:t.file,i="file"==t.kind?void 0:t,a=W(e,i,r);h.kind="extension",h.file=r,h.parent=i,h.oneof=void 0,h.typeName=a,h.jsonName=`[${a}]`,h.toString=()=>`extension ${a}`;const o=n.getMessage(Q(e.extendee));Z(o,`invalid FieldDescriptorProto: extendee ${e.extendee} not found`),h.extendee=o}else{const n=t;Z("message"==n.kind),h.parent=n,h.oneof=r,h.localName=r?l(e.name):c(l(e.name)),h.jsonName=e.jsonName,h.toString=()=>`field ${n.typeName}.${e.name}`}const f=e.label,g=e.type,v=null===(s=e.options)||void 0===s?void 0:s.jstype;if(f===T){const r=g==E?null==i?void 0:i.get(Q(e.typeName)):void 0;if(r){h.fieldKind="map";const{key:e,value:t}=function(e){const t=e.fields.find((e=>1===e.number)),n=e.fields.find((e=>2===e.number));return Z(t&&"scalar"==t.fieldKind&&t.scalar!=p.L.BYTES&&t.scalar!=p.L.FLOAT&&t.scalar!=p.L.DOUBLE&&n&&"list"!=n.fieldKind&&"map"!=n.fieldKind),{key:t,value:n}}(r);return h.mapKey=e.scalar,h.mapKind=t.fieldKind,h.message=t.message,h.delimitedEncoding=!1,h.enum=t.enum,h.scalar=t.scalar,h}switch(h.fieldKind="list",g){case E:case x:h.listKind="message",h.message=n.getMessage(Q(e.typeName)),Z(h.message),h.delimitedEncoding=Y(e,t);break;case O:h.listKind="enum",h.enum=n.getEnum(Q(e.typeName)),Z(h.enum);break;default:h.listKind="scalar",h.scalar=g,h.longAsString=v==C}return h.packed=function(e,t){if(e.label!=T)return!1;switch(e.type){case S:case _:case x:case E:return!1}const n=e.options;if(n&&(0,d.b1)(n,"packed"))return n.packed;return P==J("repeatedFieldEncoding",{proto:e,parent:t})}(e,t),h}switch(g){case E:case x:h.fieldKind="message",h.message=n.getMessage(Q(e.typeName)),Z(h.message,`invalid FieldDescriptorProto: type_name ${e.typeName} not found`),h.delimitedEncoding=Y(e,t),h.getDefaultValue=()=>{};break;case O:{const t=n.getEnum(Q(e.typeName));Z(void 0!==t,`invalid FieldDescriptorProto: type_name ${e.typeName} not found`),h.fieldKind="enum",h.enum=n.getEnum(Q(e.typeName)),h.getDefaultValue=()=>(0,d.b1)(e,"defaultValue")?function(e,t){const n=e.values.find((e=>e.name===t));if(!n)throw new Error(`cannot parse ${e} default value: ${t}`);return n.number}(t,e.defaultValue):void 0;break}default:h.fieldKind="scalar",h.scalar=g,h.longAsString=v==C,h.getDefaultValue=()=>(0,d.b1)(e,"defaultValue")?m(g,e.defaultValue):void 0}return h}function H(e){switch(e.syntax){case"":case"proto2":return b;case"proto3":return w;case"editions":if(e.edition in L)return e.edition;throw new Error(`${e.name}: unsupported edition`);default:throw new Error(`${e.name}: unsupported syntax "${e.syntax}"`)}}function G(e,t){return e.dependency.map((n=>{const r=t.getFile(n);if(!r)throw new Error(`Cannot find ${n}, imported by ${e.name}`);return r}))}function W(e,t,n){let r;return r=t?`${t.typeName}.${e.name}`:n.proto.package.length>0?`${n.proto.package}.${e.name}`:`${e.name}`,r}function Q(e){return e.startsWith(".")?e.substring(1):e}function K(e,t){if(!(0,d.b1)(e,"oneofIndex"))return;if(e.proto3Optional)return;const n=t[e.oneofIndex];return Z(n,`invalid FieldDescriptorProto: oneof #${e.oneofIndex} for field #${e.number} not found`),n}function X(e,t,n,r){return e.label==k?I:e.label==T?R:t||e.proto3Optional||e.type==E||n?D:J("fieldPresence",{proto:e,parent:r})}function Y(e,t){return e.type==x||N==J("messageEncoding",{proto:e,parent:t})}function J(e,t){var n,r;const i=null===(n=t.proto.options)||void 0===n?void 0:n.features;if(i){const t=i[e];if(0!=t)return t}if("kind"in t){if("message"==t.kind)return J(e,null!==(r=t.parent)&&void 0!==r?r:t.file);const n=L[t.edition];if(!n)throw new Error(`feature default for edition ${t.edition} not found`);return n[e]}return J(e,t.parent)}function Z(e,t){if(!e)throw new Error(t)}function ee(e){const t=function(e){const t=Object.create({syntax:"",edition:0});return Object.assign(t,Object.assign(Object.assign({$typeName:"google.protobuf.FileDescriptorProto",dependency:[],publicDependency:[],weakDependency:[],service:[],extension:[]},e),{messageType:e.messageType.map(te),enumType:e.enumType.map(ie)}))}(e);t.messageType.forEach(h);return v(t,(()=>{})).getFile(t.name)}function te(e){var t,n,r,i,a,o,s,l;return{$typeName:"google.protobuf.DescriptorProto",name:e.name,field:null!==(n=null===(t=e.field)||void 0===t?void 0:t.map(ne))&&void 0!==n?n:[],extension:[],nestedType:null!==(i=null===(r=e.nestedType)||void 0===r?void 0:r.map(te))&&void 0!==i?i:[],enumType:null!==(o=null===(a=e.enumType)||void 0===a?void 0:a.map(ie))&&void 0!==o?o:[],extensionRange:null!==(l=null===(s=e.extensionRange)||void 0===s?void 0:s.map((e=>Object.assign({$typeName:"google.protobuf.DescriptorProto.ExtensionRange"},e))))&&void 0!==l?l:[],oneofDecl:[],reservedRange:[],reservedName:[]}}function ne(e){const t=Object.create({label:1,typeName:"",extendee:"",defaultValue:"",oneofIndex:0,jsonName:"",proto3Optional:!1});return Object.assign(t,Object.assign(Object.assign({$typeName:"google.protobuf.FieldDescriptorProto"},e),{options:e.options?re(e.options):void 0}))}function re(e){var t,n,r;const i=Object.create({ctype:0,packed:!1,jstype:0,lazy:!1,unverifiedLazy:!1,deprecated:!1,weak:!1,debugRedact:!1,retention:0});return Object.assign(i,Object.assign(Object.assign({$typeName:"google.protobuf.FieldOptions"},e),{targets:null!==(t=e.targets)&&void 0!==t?t:[],editionDefaults:null!==(r=null===(n=e.editionDefaults)||void 0===n?void 0:n.map((e=>Object.assign({$typeName:"google.protobuf.FieldOptions.EditionDefault"},e))))&&void 0!==r?r:[],uninterpretedOption:[]}))}function ie(e){return{$typeName:"google.protobuf.EnumDescriptorProto",name:e.name,reservedName:[],reservedRange:[],value:e.value.map((e=>Object.assign({$typeName:"google.protobuf.EnumValueDescriptorProto"},e)))}}var ae=n(1298);const oe=ee({name:"google/protobuf/descriptor.proto",package:"google.protobuf",messageType:[{name:"FileDescriptorSet",field:[{name:"file",number:1,type:11,label:3,typeName:".google.protobuf.FileDescriptorProto"}]},{name:"FileDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"package",number:2,type:9,label:1},{name:"dependency",number:3,type:9,label:3},{name:"public_dependency",number:10,type:5,label:3},{name:"weak_dependency",number:11,type:5,label:3},{name:"message_type",number:4,type:11,label:3,typeName:".google.protobuf.DescriptorProto"},{name:"enum_type",number:5,type:11,label:3,typeName:".google.protobuf.EnumDescriptorProto"},{name:"service",number:6,type:11,label:3,typeName:".google.protobuf.ServiceDescriptorProto"},{name:"extension",number:7,type:11,label:3,typeName:".google.protobuf.FieldDescriptorProto"},{name:"options",number:8,type:11,label:1,typeName:".google.protobuf.FileOptions"},{name:"source_code_info",number:9,type:11,label:1,typeName:".google.protobuf.SourceCodeInfo"},{name:"syntax",number:12,type:9,label:1},{name:"edition",number:14,type:14,label:1,typeName:".google.protobuf.Edition"}]},{name:"DescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"field",number:2,type:11,label:3,typeName:".google.protobuf.FieldDescriptorProto"},{name:"extension",number:6,type:11,label:3,typeName:".google.protobuf.FieldDescriptorProto"},{name:"nested_type",number:3,type:11,label:3,typeName:".google.protobuf.DescriptorProto"},{name:"enum_type",number:4,type:11,label:3,typeName:".google.protobuf.EnumDescriptorProto"},{name:"extension_range",number:5,type:11,label:3,typeName:".google.protobuf.DescriptorProto.ExtensionRange"},{name:"oneof_decl",number:8,type:11,label:3,typeName:".google.protobuf.OneofDescriptorProto"},{name:"options",number:7,type:11,label:1,typeName:".google.protobuf.MessageOptions"},{name:"reserved_range",number:9,type:11,label:3,typeName:".google.protobuf.DescriptorProto.ReservedRange"},{name:"reserved_name",number:10,type:9,label:3}],nestedType:[{name:"ExtensionRange",field:[{name:"start",number:1,type:5,label:1},{name:"end",number:2,type:5,label:1},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.ExtensionRangeOptions"}]},{name:"ReservedRange",field:[{name:"start",number:1,type:5,label:1},{name:"end",number:2,type:5,label:1}]}]},{name:"ExtensionRangeOptions",field:[{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"},{name:"declaration",number:2,type:11,label:3,typeName:".google.protobuf.ExtensionRangeOptions.Declaration",options:{retention:2}},{name:"features",number:50,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"verification",number:3,type:14,label:1,typeName:".google.protobuf.ExtensionRangeOptions.VerificationState",defaultValue:"UNVERIFIED",options:{retention:2}}],nestedType:[{name:"Declaration",field:[{name:"number",number:1,type:5,label:1},{name:"full_name",number:2,type:9,label:1},{name:"type",number:3,type:9,label:1},{name:"reserved",number:5,type:8,label:1},{name:"repeated",number:6,type:8,label:1}]}],enumType:[{name:"VerificationState",value:[{name:"DECLARATION",number:0},{name:"UNVERIFIED",number:1}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"FieldDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"number",number:3,type:5,label:1},{name:"label",number:4,type:14,label:1,typeName:".google.protobuf.FieldDescriptorProto.Label"},{name:"type",number:5,type:14,label:1,typeName:".google.protobuf.FieldDescriptorProto.Type"},{name:"type_name",number:6,type:9,label:1},{name:"extendee",number:2,type:9,label:1},{name:"default_value",number:7,type:9,label:1},{name:"oneof_index",number:9,type:5,label:1},{name:"json_name",number:10,type:9,label:1},{name:"options",number:8,type:11,label:1,typeName:".google.protobuf.FieldOptions"},{name:"proto3_optional",number:17,type:8,label:1}],enumType:[{name:"Type",value:[{name:"TYPE_DOUBLE",number:1},{name:"TYPE_FLOAT",number:2},{name:"TYPE_INT64",number:3},{name:"TYPE_UINT64",number:4},{name:"TYPE_INT32",number:5},{name:"TYPE_FIXED64",number:6},{name:"TYPE_FIXED32",number:7},{name:"TYPE_BOOL",number:8},{name:"TYPE_STRING",number:9},{name:"TYPE_GROUP",number:10},{name:"TYPE_MESSAGE",number:11},{name:"TYPE_BYTES",number:12},{name:"TYPE_UINT32",number:13},{name:"TYPE_ENUM",number:14},{name:"TYPE_SFIXED32",number:15},{name:"TYPE_SFIXED64",number:16},{name:"TYPE_SINT32",number:17},{name:"TYPE_SINT64",number:18}]},{name:"Label",value:[{name:"LABEL_OPTIONAL",number:1},{name:"LABEL_REPEATED",number:3},{name:"LABEL_REQUIRED",number:2}]}]},{name:"OneofDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"options",number:2,type:11,label:1,typeName:".google.protobuf.OneofOptions"}]},{name:"EnumDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"value",number:2,type:11,label:3,typeName:".google.protobuf.EnumValueDescriptorProto"},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.EnumOptions"},{name:"reserved_range",number:4,type:11,label:3,typeName:".google.protobuf.EnumDescriptorProto.EnumReservedRange"},{name:"reserved_name",number:5,type:9,label:3}],nestedType:[{name:"EnumReservedRange",field:[{name:"start",number:1,type:5,label:1},{name:"end",number:2,type:5,label:1}]}]},{name:"EnumValueDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"number",number:2,type:5,label:1},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.EnumValueOptions"}]},{name:"ServiceDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"method",number:2,type:11,label:3,typeName:".google.protobuf.MethodDescriptorProto"},{name:"options",number:3,type:11,label:1,typeName:".google.protobuf.ServiceOptions"}]},{name:"MethodDescriptorProto",field:[{name:"name",number:1,type:9,label:1},{name:"input_type",number:2,type:9,label:1},{name:"output_type",number:3,type:9,label:1},{name:"options",number:4,type:11,label:1,typeName:".google.protobuf.MethodOptions"},{name:"client_streaming",number:5,type:8,label:1,defaultValue:"false"},{name:"server_streaming",number:6,type:8,label:1,defaultValue:"false"}]},{name:"FileOptions",field:[{name:"java_package",number:1,type:9,label:1},{name:"java_outer_classname",number:8,type:9,label:1},{name:"java_multiple_files",number:10,type:8,label:1,defaultValue:"false"},{name:"java_generate_equals_and_hash",number:20,type:8,label:1,options:{deprecated:!0}},{name:"java_string_check_utf8",number:27,type:8,label:1,defaultValue:"false"},{name:"optimize_for",number:9,type:14,label:1,typeName:".google.protobuf.FileOptions.OptimizeMode",defaultValue:"SPEED"},{name:"go_package",number:11,type:9,label:1},{name:"cc_generic_services",number:16,type:8,label:1,defaultValue:"false"},{name:"java_generic_services",number:17,type:8,label:1,defaultValue:"false"},{name:"py_generic_services",number:18,type:8,label:1,defaultValue:"false"},{name:"deprecated",number:23,type:8,label:1,defaultValue:"false"},{name:"cc_enable_arenas",number:31,type:8,label:1,defaultValue:"true"},{name:"objc_class_prefix",number:36,type:9,label:1},{name:"csharp_namespace",number:37,type:9,label:1},{name:"swift_prefix",number:39,type:9,label:1},{name:"php_class_prefix",number:40,type:9,label:1},{name:"php_namespace",number:41,type:9,label:1},{name:"php_metadata_namespace",number:44,type:9,label:1},{name:"ruby_package",number:45,type:9,label:1},{name:"features",number:50,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],enumType:[{name:"OptimizeMode",value:[{name:"SPEED",number:1},{name:"CODE_SIZE",number:2},{name:"LITE_RUNTIME",number:3}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"MessageOptions",field:[{name:"message_set_wire_format",number:1,type:8,label:1,defaultValue:"false"},{name:"no_standard_descriptor_accessor",number:2,type:8,label:1,defaultValue:"false"},{name:"deprecated",number:3,type:8,label:1,defaultValue:"false"},{name:"map_entry",number:7,type:8,label:1},{name:"deprecated_legacy_json_field_conflicts",number:11,type:8,label:1,options:{deprecated:!0}},{name:"features",number:12,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"FieldOptions",field:[{name:"ctype",number:1,type:14,label:1,typeName:".google.protobuf.FieldOptions.CType",defaultValue:"STRING"},{name:"packed",number:2,type:8,label:1},{name:"jstype",number:6,type:14,label:1,typeName:".google.protobuf.FieldOptions.JSType",defaultValue:"JS_NORMAL"},{name:"lazy",number:5,type:8,label:1,defaultValue:"false"},{name:"unverified_lazy",number:15,type:8,label:1,defaultValue:"false"},{name:"deprecated",number:3,type:8,label:1,defaultValue:"false"},{name:"weak",number:10,type:8,label:1,defaultValue:"false"},{name:"debug_redact",number:16,type:8,label:1,defaultValue:"false"},{name:"retention",number:17,type:14,label:1,typeName:".google.protobuf.FieldOptions.OptionRetention"},{name:"targets",number:19,type:14,label:3,typeName:".google.protobuf.FieldOptions.OptionTargetType"},{name:"edition_defaults",number:20,type:11,label:3,typeName:".google.protobuf.FieldOptions.EditionDefault"},{name:"features",number:21,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"feature_support",number:22,type:11,label:1,typeName:".google.protobuf.FieldOptions.FeatureSupport"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],nestedType:[{name:"EditionDefault",field:[{name:"edition",number:3,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"value",number:2,type:9,label:1}]},{name:"FeatureSupport",field:[{name:"edition_introduced",number:1,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"edition_deprecated",number:2,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"deprecation_warning",number:3,type:9,label:1},{name:"edition_removed",number:4,type:14,label:1,typeName:".google.protobuf.Edition"}]}],enumType:[{name:"CType",value:[{name:"STRING",number:0},{name:"CORD",number:1},{name:"STRING_PIECE",number:2}]},{name:"JSType",value:[{name:"JS_NORMAL",number:0},{name:"JS_STRING",number:1},{name:"JS_NUMBER",number:2}]},{name:"OptionRetention",value:[{name:"RETENTION_UNKNOWN",number:0},{name:"RETENTION_RUNTIME",number:1},{name:"RETENTION_SOURCE",number:2}]},{name:"OptionTargetType",value:[{name:"TARGET_TYPE_UNKNOWN",number:0},{name:"TARGET_TYPE_FILE",number:1},{name:"TARGET_TYPE_EXTENSION_RANGE",number:2},{name:"TARGET_TYPE_MESSAGE",number:3},{name:"TARGET_TYPE_FIELD",number:4},{name:"TARGET_TYPE_ONEOF",number:5},{name:"TARGET_TYPE_ENUM",number:6},{name:"TARGET_TYPE_ENUM_ENTRY",number:7},{name:"TARGET_TYPE_SERVICE",number:8},{name:"TARGET_TYPE_METHOD",number:9}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"OneofOptions",field:[{name:"features",number:1,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"EnumOptions",field:[{name:"allow_alias",number:2,type:8,label:1},{name:"deprecated",number:3,type:8,label:1,defaultValue:"false"},{name:"deprecated_legacy_json_field_conflicts",number:6,type:8,label:1,options:{deprecated:!0}},{name:"features",number:7,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"EnumValueOptions",field:[{name:"deprecated",number:1,type:8,label:1,defaultValue:"false"},{name:"features",number:2,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"debug_redact",number:3,type:8,label:1,defaultValue:"false"},{name:"feature_support",number:4,type:11,label:1,typeName:".google.protobuf.FieldOptions.FeatureSupport"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"ServiceOptions",field:[{name:"features",number:34,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"deprecated",number:33,type:8,label:1,defaultValue:"false"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],extensionRange:[{start:1e3,end:536870912}]},{name:"MethodOptions",field:[{name:"deprecated",number:33,type:8,label:1,defaultValue:"false"},{name:"idempotency_level",number:34,type:14,label:1,typeName:".google.protobuf.MethodOptions.IdempotencyLevel",defaultValue:"IDEMPOTENCY_UNKNOWN"},{name:"features",number:35,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"uninterpreted_option",number:999,type:11,label:3,typeName:".google.protobuf.UninterpretedOption"}],enumType:[{name:"IdempotencyLevel",value:[{name:"IDEMPOTENCY_UNKNOWN",number:0},{name:"NO_SIDE_EFFECTS",number:1},{name:"IDEMPOTENT",number:2}]}],extensionRange:[{start:1e3,end:536870912}]},{name:"UninterpretedOption",field:[{name:"name",number:2,type:11,label:3,typeName:".google.protobuf.UninterpretedOption.NamePart"},{name:"identifier_value",number:3,type:9,label:1},{name:"positive_int_value",number:4,type:4,label:1},{name:"negative_int_value",number:5,type:3,label:1},{name:"double_value",number:6,type:1,label:1},{name:"string_value",number:7,type:12,label:1},{name:"aggregate_value",number:8,type:9,label:1}],nestedType:[{name:"NamePart",field:[{name:"name_part",number:1,type:9,label:2},{name:"is_extension",number:2,type:8,label:2}]}]},{name:"FeatureSet",field:[{name:"field_presence",number:1,type:14,label:1,typeName:".google.protobuf.FeatureSet.FieldPresence",options:{retention:1,targets:[4,1],editionDefaults:[{value:"EXPLICIT",edition:900},{value:"IMPLICIT",edition:999},{value:"EXPLICIT",edition:1e3}]}},{name:"enum_type",number:2,type:14,label:1,typeName:".google.protobuf.FeatureSet.EnumType",options:{retention:1,targets:[6,1],editionDefaults:[{value:"CLOSED",edition:900},{value:"OPEN",edition:999}]}},{name:"repeated_field_encoding",number:3,type:14,label:1,typeName:".google.protobuf.FeatureSet.RepeatedFieldEncoding",options:{retention:1,targets:[4,1],editionDefaults:[{value:"EXPANDED",edition:900},{value:"PACKED",edition:999}]}},{name:"utf8_validation",number:4,type:14,label:1,typeName:".google.protobuf.FeatureSet.Utf8Validation",options:{retention:1,targets:[4,1],editionDefaults:[{value:"NONE",edition:900},{value:"VERIFY",edition:999}]}},{name:"message_encoding",number:5,type:14,label:1,typeName:".google.protobuf.FeatureSet.MessageEncoding",options:{retention:1,targets:[4,1],editionDefaults:[{value:"LENGTH_PREFIXED",edition:900}]}},{name:"json_format",number:6,type:14,label:1,typeName:".google.protobuf.FeatureSet.JsonFormat",options:{retention:1,targets:[3,6,1],editionDefaults:[{value:"LEGACY_BEST_EFFORT",edition:900},{value:"ALLOW",edition:999}]}}],enumType:[{name:"FieldPresence",value:[{name:"FIELD_PRESENCE_UNKNOWN",number:0},{name:"EXPLICIT",number:1},{name:"IMPLICIT",number:2},{name:"LEGACY_REQUIRED",number:3}]},{name:"EnumType",value:[{name:"ENUM_TYPE_UNKNOWN",number:0},{name:"OPEN",number:1},{name:"CLOSED",number:2}]},{name:"RepeatedFieldEncoding",value:[{name:"REPEATED_FIELD_ENCODING_UNKNOWN",number:0},{name:"PACKED",number:1},{name:"EXPANDED",number:2}]},{name:"Utf8Validation",value:[{name:"UTF8_VALIDATION_UNKNOWN",number:0},{name:"VERIFY",number:2},{name:"NONE",number:3}]},{name:"MessageEncoding",value:[{name:"MESSAGE_ENCODING_UNKNOWN",number:0},{name:"LENGTH_PREFIXED",number:1},{name:"DELIMITED",number:2}]},{name:"JsonFormat",value:[{name:"JSON_FORMAT_UNKNOWN",number:0},{name:"ALLOW",number:1},{name:"LEGACY_BEST_EFFORT",number:2}]}],extensionRange:[{start:1e3,end:9995},{start:9995,end:1e4},{start:1e4,end:10001}]},{name:"FeatureSetDefaults",field:[{name:"defaults",number:1,type:11,label:3,typeName:".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"},{name:"minimum_edition",number:4,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"maximum_edition",number:5,type:14,label:1,typeName:".google.protobuf.Edition"}],nestedType:[{name:"FeatureSetEditionDefault",field:[{name:"edition",number:3,type:14,label:1,typeName:".google.protobuf.Edition"},{name:"overridable_features",number:4,type:11,label:1,typeName:".google.protobuf.FeatureSet"},{name:"fixed_features",number:5,type:11,label:1,typeName:".google.protobuf.FeatureSet"}]}]},{name:"SourceCodeInfo",field:[{name:"location",number:1,type:11,label:3,typeName:".google.protobuf.SourceCodeInfo.Location"}],nestedType:[{name:"Location",field:[{name:"path",number:1,type:5,label:3,options:{packed:!0}},{name:"span",number:2,type:5,label:3,options:{packed:!0}},{name:"leading_comments",number:3,type:9,label:1},{name:"trailing_comments",number:4,type:9,label:1},{name:"leading_detached_comments",number:6,type:9,label:3}]}]},{name:"GeneratedCodeInfo",field:[{name:"annotation",number:1,type:11,label:3,typeName:".google.protobuf.GeneratedCodeInfo.Annotation"}],nestedType:[{name:"Annotation",field:[{name:"path",number:1,type:5,label:3,options:{packed:!0}},{name:"source_file",number:2,type:9,label:1},{name:"begin",number:3,type:5,label:1},{name:"end",number:4,type:5,label:1},{name:"semantic",number:5,type:14,label:1,typeName:".google.protobuf.GeneratedCodeInfo.Annotation.Semantic"}],enumType:[{name:"Semantic",value:[{name:"NONE",number:0},{name:"SET",number:1},{name:"ALIAS",number:2}]}]}]}],enumType:[{name:"Edition",value:[{name:"EDITION_UNKNOWN",number:0},{name:"EDITION_LEGACY",number:900},{name:"EDITION_PROTO2",number:998},{name:"EDITION_PROTO3",number:999},{name:"EDITION_2023",number:1e3},{name:"EDITION_2024",number:1001},{name:"EDITION_1_TEST_ONLY",number:1},{name:"EDITION_2_TEST_ONLY",number:2},{name:"EDITION_99997_TEST_ONLY",number:99997},{name:"EDITION_99998_TEST_ONLY",number:99998},{name:"EDITION_99999_TEST_ONLY",number:99999},{name:"EDITION_MAX",number:2147483647}]}]}),se=(0,ae.Z)(oe,1);var le;!function(e){e[e.DECLARATION=0]="DECLARATION",e[e.UNVERIFIED=1]="UNVERIFIED"}(le||(le={}));var ue;!function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.GROUP=10]="GROUP",e[e.MESSAGE=11]="MESSAGE",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.ENUM=14]="ENUM",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"}(ue||(ue={}));var ce;!function(e){e[e.OPTIONAL=1]="OPTIONAL",e[e.REPEATED=3]="REPEATED",e[e.REQUIRED=2]="REQUIRED"}(ce||(ce={}));var de;!function(e){e[e.SPEED=1]="SPEED",e[e.CODE_SIZE=2]="CODE_SIZE",e[e.LITE_RUNTIME=3]="LITE_RUNTIME"}(de||(de={}));var he;!function(e){e[e.STRING=0]="STRING",e[e.CORD=1]="CORD",e[e.STRING_PIECE=2]="STRING_PIECE"}(he||(he={}));var pe;!function(e){e[e.JS_NORMAL=0]="JS_NORMAL",e[e.JS_STRING=1]="JS_STRING",e[e.JS_NUMBER=2]="JS_NUMBER"}(pe||(pe={}));var fe;!function(e){e[e.RETENTION_UNKNOWN=0]="RETENTION_UNKNOWN",e[e.RETENTION_RUNTIME=1]="RETENTION_RUNTIME",e[e.RETENTION_SOURCE=2]="RETENTION_SOURCE"}(fe||(fe={}));var me;!function(e){e[e.TARGET_TYPE_UNKNOWN=0]="TARGET_TYPE_UNKNOWN",e[e.TARGET_TYPE_FILE=1]="TARGET_TYPE_FILE",e[e.TARGET_TYPE_EXTENSION_RANGE=2]="TARGET_TYPE_EXTENSION_RANGE",e[e.TARGET_TYPE_MESSAGE=3]="TARGET_TYPE_MESSAGE",e[e.TARGET_TYPE_FIELD=4]="TARGET_TYPE_FIELD",e[e.TARGET_TYPE_ONEOF=5]="TARGET_TYPE_ONEOF",e[e.TARGET_TYPE_ENUM=6]="TARGET_TYPE_ENUM",e[e.TARGET_TYPE_ENUM_ENTRY=7]="TARGET_TYPE_ENUM_ENTRY",e[e.TARGET_TYPE_SERVICE=8]="TARGET_TYPE_SERVICE",e[e.TARGET_TYPE_METHOD=9]="TARGET_TYPE_METHOD"}(me||(me={}));var ge;!function(e){e[e.IDEMPOTENCY_UNKNOWN=0]="IDEMPOTENCY_UNKNOWN",e[e.NO_SIDE_EFFECTS=1]="NO_SIDE_EFFECTS",e[e.IDEMPOTENT=2]="IDEMPOTENT"}(ge||(ge={}));var ve;!function(e){e[e.FIELD_PRESENCE_UNKNOWN=0]="FIELD_PRESENCE_UNKNOWN",e[e.EXPLICIT=1]="EXPLICIT",e[e.IMPLICIT=2]="IMPLICIT",e[e.LEGACY_REQUIRED=3]="LEGACY_REQUIRED"}(ve||(ve={}));var ye;!function(e){e[e.ENUM_TYPE_UNKNOWN=0]="ENUM_TYPE_UNKNOWN",e[e.OPEN=1]="OPEN",e[e.CLOSED=2]="CLOSED"}(ye||(ye={}));var be;!function(e){e[e.REPEATED_FIELD_ENCODING_UNKNOWN=0]="REPEATED_FIELD_ENCODING_UNKNOWN",e[e.PACKED=1]="PACKED",e[e.EXPANDED=2]="EXPANDED"}(be||(be={}));var we;!function(e){e[e.UTF8_VALIDATION_UNKNOWN=0]="UTF8_VALIDATION_UNKNOWN",e[e.VERIFY=2]="VERIFY",e[e.NONE=3]="NONE"}(we||(we={}));var Se;!function(e){e[e.MESSAGE_ENCODING_UNKNOWN=0]="MESSAGE_ENCODING_UNKNOWN",e[e.LENGTH_PREFIXED=1]="LENGTH_PREFIXED",e[e.DELIMITED=2]="DELIMITED"}(Se||(Se={}));var xe;!function(e){e[e.JSON_FORMAT_UNKNOWN=0]="JSON_FORMAT_UNKNOWN",e[e.ALLOW=1]="ALLOW",e[e.LEGACY_BEST_EFFORT=2]="LEGACY_BEST_EFFORT"}(xe||(xe={}));var Ee;!function(e){e[e.NONE=0]="NONE",e[e.SET=1]="SET",e[e.ALIAS=2]="ALIAS"}(Ee||(Ee={}));var _e;!function(e){e[e.EDITION_UNKNOWN=0]="EDITION_UNKNOWN",e[e.EDITION_LEGACY=900]="EDITION_LEGACY",e[e.EDITION_PROTO2=998]="EDITION_PROTO2",e[e.EDITION_PROTO3=999]="EDITION_PROTO3",e[e.EDITION_2023=1e3]="EDITION_2023",e[e.EDITION_2024=1001]="EDITION_2024",e[e.EDITION_1_TEST_ONLY=1]="EDITION_1_TEST_ONLY",e[e.EDITION_2_TEST_ONLY=2]="EDITION_2_TEST_ONLY",e[e.EDITION_99997_TEST_ONLY=99997]="EDITION_99997_TEST_ONLY",e[e.EDITION_99998_TEST_ONLY=99998]="EDITION_99998_TEST_ONLY",e[e.EDITION_99999_TEST_ONLY=99999]="EDITION_99999_TEST_ONLY",e[e.EDITION_MAX=2147483647]="EDITION_MAX"}(_e||(_e={}));var Oe=n(8190),Te=n(4230);class ke extends Error{constructor(e,t,n="FieldValueInvalidError"){super(t),this.name=n,this.field=()=>e}}var Ce=n(6417),Ae=n(6834);const De=Symbol.for("@bufbuild/protobuf/text-encoding");function Re(){if(null==globalThis[De]){const e=new globalThis.TextEncoder,t=new globalThis.TextDecoder;globalThis[De]={encodeUtf8:t=>e.encode(t),decodeUtf8:e=>t.decode(e),checkUtf8(e){try{return encodeURIComponent(e),!0}catch(e){return!1}}}}return globalThis[De]}var Ie;!function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"}(Ie||(Ie={}));const Pe=34028234663852886e22,Ne=-34028234663852886e22,je=4294967295,Le=2147483647,Me=-2147483648;class Fe{constructor(e,t=Re().decodeUtf8){this.decodeUtf8=t,this.varint64=Ae.ls,this.uint32=Ae.Gn,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.uint32(),t=e>>>3,n=7&e;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(e,t){let n=this.pos;switch(e){case Ie.Varint:for(;128&this.buf[this.pos++];);break;case Ie.Bit64:this.pos+=4;case Ie.Bit32:this.pos+=4;break;case Ie.LengthDelimited:let n=this.uint32();this.pos+=n;break;case Ie.StartGroup:for(;;){const[e,n]=this.tag();if(n===Ie.EndGroup){if(void 0!==t&&e!==t)throw new Error("invalid end group tag");break}this.skip(n,e)}break;default:throw new Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return f.M.dec(...this.varint64())}uint64(){return f.M.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(1&e);return e=(e>>>1|(1&t)<<31)^n,t=t>>>1^n,f.M.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return f.M.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return f.M.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.decodeUtf8(this.bytes())}}function Ve(e,t,n){const r=$e(e,n);if(!0!==r)return new ke(e,`list item #${t+1}: ${ze(e,n,r)}`)}function $e(e,t){return void 0!==e.scalar?Be(t,e.scalar):void 0!==e.enum?e.enum.open?Number.isInteger(t):e.enum.values.some((e=>e.number===t)):(0,Ce.LT)(t,e.message)}function Be(e,t){switch(t){case p.L.DOUBLE:return"number"==typeof e;case p.L.FLOAT:return"number"==typeof e&&(!(!Number.isNaN(e)&&Number.isFinite(e))||(!(e>Pe||e<Ne)||`${e.toFixed()} out of range`));case p.L.INT32:case p.L.SFIXED32:case p.L.SINT32:return!("number"!=typeof e||!Number.isInteger(e))&&(!(e>Le||e<Me)||`${e.toFixed()} out of range`);case p.L.FIXED32:case p.L.UINT32:return!("number"!=typeof e||!Number.isInteger(e))&&(!(e>je||e<0)||`${e.toFixed()} out of range`);case p.L.BOOL:return"boolean"==typeof e;case p.L.STRING:return"string"==typeof e&&(Re().checkUtf8(e)||"invalid UTF8");case p.L.BYTES:return e instanceof Uint8Array;case p.L.INT64:case p.L.SFIXED64:case p.L.SINT64:if("string"!=typeof e&&"bigint"!=typeof e&&"number"!=typeof e)return!1;try{f.M.parse(e)}catch(t){return`${e} out of range`}return!0;case p.L.FIXED64:case p.L.UINT64:if("string"!=typeof e&&"bigint"!=typeof e&&"number"!=typeof e)return!1;try{f.M.uParse(e)}catch(t){return`${e} out of range`}return!0}}function ze(e,t,n){return n="string"==typeof n?`: ${n}`:`, got ${Ue(t)}`,void 0!==e.scalar?`expected ${function(e){switch(e){case p.L.STRING:return"string";case p.L.BOOL:return"boolean";case p.L.INT64:case p.L.SINT64:case p.L.SFIXED64:return"bigint (int64)";case p.L.UINT64:case p.L.FIXED64:return"bigint (uint64)";case p.L.BYTES:return"Uint8Array";case p.L.DOUBLE:return"number (float64)";case p.L.FLOAT:return"number (float32)";case p.L.FIXED32:case p.L.UINT32:return"number (uint32)";case p.L.INT32:case p.L.SFIXED32:case p.L.SINT32:return"number (int32)"}}(e.scalar)}`+n:void 0!==e.enum?`expected ${e.enum.toString()}`+n:`expected ${qe(e.message)}`+n}function Ue(e){switch(typeof e){case"object":return null===e?"null":e instanceof Uint8Array?`Uint8Array(${e.length})`:Array.isArray(e)?`Array(${e.length})`:(0,Ce.sG)(e)?He(e.field()):(0,Ce.G6)(e)?Ge(e.field()):(0,Ce.LT)(e)?qe(e.desc):(0,Te.K)(e)?`message ${e.$typeName}`:"object";case"string":return e.length>30?"string":`"${e.split('"').join('\\"')}"`;case"boolean":case"number":return String(e);case"bigint":return String(e)+"n";default:return typeof e}}function qe(e){return`ReflectMessage (${e.typeName})`}function He(e){switch(e.listKind){case"message":return`ReflectList (${e.message.toString()})`;case"enum":return`ReflectList (${e.enum.toString()})`;case"scalar":return`ReflectList (${p.L[e.scalar]})`}}function Ge(e){switch(e.mapKind){case"message":return`ReflectMap (${p.L[e.mapKey]}, ${e.message.toString()})`;case"enum":return`ReflectMap (${p.L[e.mapKey]}, ${e.enum.toString()})`;case"scalar":return`ReflectMap (${p.L[e.mapKey]}, ${p.L[e.scalar]})`}}var We=n(3632),Qe=n(987);function Ke(e,t,n=!0){return new Xe(e,t,n)}class Xe{get sortedFields(){var e;return null!==(e=this._sortedFields)&&void 0!==e?e:this._sortedFields=this.desc.fields.concat().sort(((e,t)=>e.number-t.number))}constructor(e,t,n=!0){this.lists=new Map,this.maps=new Map,this.check=n,this.desc=e,this.message=this[d.I4]=null!=t?t:(0,We.v)(e),this.fields=e.fields,this.oneofs=e.oneofs,this.members=e.members}findNumber(e){return this._fieldsByNumber||(this._fieldsByNumber=new Map(this.desc.fields.map((e=>[e.number,e])))),this._fieldsByNumber.get(e)}oneofCase(e){return Ye(this.message,e),(0,d.mO)(this.message,e)}isSet(e){return Ye(this.message,e),(0,d.zB)(this.message,e)}clear(e){Ye(this.message,e),(0,d.yO)(this.message,e)}get(e){Ye(this.message,e);const t=(0,d.$v)(this.message,e);switch(e.fieldKind){case"list":let n=this.lists.get(e);return n&&n[d.I4]===t||this.lists.set(e,n=new Je(e,t,this.check)),n;case"map":let r=this.maps.get(e);return r&&r[d.I4]===t||this.maps.set(e,r=new Ze(e,t,this.check)),r;case"message":return tt(e,t,this.check);case"scalar":return void 0===t?(0,Oe.M7)(e.scalar,!1):st(e,t);case"enum":return null!=t?t:e.enum.values[0].number}}set(e,t){if(Ye(this.message,e),this.check){const n=function(e,t){const n="list"==e.fieldKind?(0,Ce.sG)(t,e):"map"==e.fieldKind?(0,Ce.G6)(t,e):$e(e,t);if(!0===n)return;let r;switch(e.fieldKind){case"list":r=`expected ${He(e)}, got ${Ue(t)}`;break;case"map":r=`expected ${Ge(e)}, got ${Ue(t)}`;break;default:r=ze(e,t,n)}return new ke(e,r)}(e,t);if(n)throw n}let n;n="message"==e.fieldKind?et(e,t):(0,Ce.G6)(t)||(0,Ce.sG)(t)?t[d.I4]:lt(e,t),(0,d.lA)(this.message,e,n)}getUnknown(){return this.message.$unknown}setUnknown(e){this.message.$unknown=e}}function Ye(e,t){if(t.parent.typeName!==e.$typeName)throw new ke(t,`cannot use ${t.toString()} with message ${e.$typeName}`,"ForeignFieldError")}class Je{field(){return this._field}get size(){return this._arr.length}constructor(e,t,n){this._field=e,this._arr=this[d.I4]=t,this.check=n}get(e){const t=this._arr[e];return void 0===t?void 0:rt(this._field,t,this.check)}set(e,t){if(e<0||e>=this._arr.length)throw new ke(this._field,`list item #${e+1}: out of range`);if(this.check){const n=Ve(this._field,e,t);if(n)throw n}this._arr[e]=nt(this._field,t)}add(e){if(this.check){const t=Ve(this._field,this._arr.length,e);if(t)throw t}this._arr.push(nt(this._field,e))}clear(){this._arr.splice(0,this._arr.length)}[Symbol.iterator](){return this.values()}keys(){return this._arr.keys()}*values(){for(const e of this._arr)yield rt(this._field,e,this.check)}*entries(){for(let e=0;e<this._arr.length;e++)yield[e,rt(this._field,this._arr[e],this.check)]}}class Ze{constructor(e,t,n=!0){this.obj=this[d.I4]=null!=t?t:{},this.check=n,this._field=e}field(){return this._field}set(e,t){if(this.check){const n=function(e,t,n){const r=Be(t,e.mapKey);if(!0!==r)return new ke(e,`invalid map key: ${ze({scalar:e.mapKey},t,r)}`);const i=$e(e,n);return!0!==i?new ke(e,`map entry ${Ue(t)}: ${ze(e,n,i)}`):void 0}(this._field,e,t);if(n)throw n}return this.obj[at(e)]=function(e,t){if("message"==e.mapKind)return et(e,t);return lt(e,t)}(this._field,t),this}delete(e){const t=at(e),n=Object.prototype.hasOwnProperty.call(this.obj,t);return n&&delete this.obj[t],n}clear(){for(const e of Object.keys(this.obj))delete this.obj[e]}get(e){let t=this.obj[at(e)];return void 0!==t&&(t=it(this._field,t,this.check)),t}has(e){return Object.prototype.hasOwnProperty.call(this.obj,at(e))}*keys(){for(const e of Object.keys(this.obj))yield ot(e,this._field.mapKey)}*entries(){for(const e of Object.entries(this.obj))yield[ot(e[0],this._field.mapKey),it(this._field,e[1],this.check)]}[Symbol.iterator](){return this.entries()}get size(){return Object.keys(this.obj).length}*values(){for(const e of Object.values(this.obj))yield it(this._field,e,this.check)}forEach(e,t){for(const n of this.entries())e.call(t,n[1],n[0],this)}}function et(e,t){return(0,Ce.LT)(t)?(0,Qe.Y)(t.message)&&!e.oneof&&"message"==e.fieldKind?t.message.value:"google.protobuf.Struct"==t.desc.typeName&&"google.protobuf.Value"!=e.parent.typeName?ct(t.message):t.message:t}function tt(e,t,n){return void 0!==t&&((0,Qe.l)(e.message)&&!e.oneof&&"message"==e.fieldKind?t={$typeName:e.message.typeName,value:st(e.message.fields[0],t)}:"google.protobuf.Struct"==e.message.typeName&&"google.protobuf.Value"!=e.parent.typeName&&(0,Ce.Gv)(t)&&(t=ut(t))),new Xe(e.message,t,n)}function nt(e,t){return"message"==e.listKind?et(e,t):lt(e,t)}function rt(e,t,n){return"message"==e.listKind?tt(e,t,n):st(e,t)}function it(e,t,n){return"message"==e.mapKind?tt(e,t,n):t}function at(e){return"string"==typeof e||"number"==typeof e?e:String(e)}function ot(e,t){switch(t){case p.L.STRING:return e;case p.L.INT32:case p.L.FIXED32:case p.L.UINT32:case p.L.SFIXED32:case p.L.SINT32:{const t=Number.parseInt(e);if(Number.isFinite(t))return t;break}case p.L.BOOL:switch(e){case"true":return!0;case"false":return!1}break;case p.L.UINT64:case p.L.FIXED64:try{return f.M.uParse(e)}catch(e){}break;default:try{return f.M.parse(e)}catch(e){}}return e}function st(e,t){switch(e.scalar){case p.L.INT64:case p.L.SFIXED64:case p.L.SINT64:"longAsString"in e&&e.longAsString&&"string"==typeof t&&(t=f.M.parse(t));break;case p.L.FIXED64:case p.L.UINT64:"longAsString"in e&&e.longAsString&&"string"==typeof t&&(t=f.M.uParse(t))}return t}function lt(e,t){switch(e.scalar){case p.L.INT64:case p.L.SFIXED64:case p.L.SINT64:"longAsString"in e&&e.longAsString?t=String(t):"string"!=typeof t&&"number"!=typeof t||(t=f.M.parse(t));break;case p.L.FIXED64:case p.L.UINT64:"longAsString"in e&&e.longAsString?t=String(t):"string"!=typeof t&&"number"!=typeof t||(t=f.M.uParse(t))}return t}function ut(e){const t={$typeName:"google.protobuf.Struct",fields:{}};if((0,Ce.Gv)(e))for(const[n,r]of Object.entries(e))t.fields[n]=ht(r);return t}function ct(e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=dt(r);return t}function dt(e){switch(e.kind.case){case"structValue":return ct(e.kind.value);case"listValue":return e.kind.value.values.map(dt);case"nullValue":case void 0:return null;default:return e.kind.value}}function ht(e){const t={$typeName:"google.protobuf.Value",kind:{case:void 0}};switch(typeof e){case"number":t.kind={case:"numberValue",value:e};break;case"string":t.kind={case:"stringValue",value:e};break;case"boolean":t.kind={case:"boolValue",value:e};break;case"object":if(null===e){const e=0;t.kind={case:"nullValue",value:e}}else if(Array.isArray(e)){const n={$typeName:"google.protobuf.ListValue",values:[]};if(Array.isArray(e))for(const t of e)n.values.push(ht(t));t.kind={case:"listValue",value:n}}else t.kind={case:"structValue",value:ut(e)}}return t}const pt={readUnknownFields:!0};function ft(e){return e?Object.assign(Object.assign({},pt),e):pt}function mt(e,t,n,r,i){var a;const o=r?t.len:t.pos+i;let s,l;const u=null!==(a=e.getUnknown())&&void 0!==a?a:[];for(;t.pos<o&&([s,l]=t.tag(),!r||l!=Ie.EndGroup);){const r=e.findNumber(s);if(r)gt(e,t,r,l,n);else{const e=t.skip(l,s);n.readUnknownFields&&u.push({no:s,wireType:l,data:e})}}if(r&&(l!=Ie.EndGroup||s!==i))throw new Error("invalid end group tag");u.length>0&&e.setUnknown(u)}function gt(e,t,n,r,i){switch(n.fieldKind){case"scalar":e.set(n,yt(t,n.scalar));break;case"enum":e.set(n,yt(t,p.L.INT32));break;case"message":e.set(n,vt(t,i,n,e.get(n)));break;case"list":!function(e,t,n,r){var i;const a=n.field();if("message"===a.listKind)return void n.add(vt(e,r,a));const o=null!==(i=a.scalar)&&void 0!==i?i:p.L.INT32,s=t==Ie.LengthDelimited&&o!=p.L.STRING&&o!=p.L.BYTES;if(!s)return void n.add(yt(e,o));const l=e.uint32()+e.pos;for(;e.pos<l;)n.add(yt(e,o))}(t,r,e.get(n),i);break;case"map":!function(e,t,n){const r=t.field();let i,a;const o=e.pos+e.uint32();for(;e.pos<o;){const[t]=e.tag();switch(t){case 1:i=yt(e,r.mapKey);break;case 2:switch(r.mapKind){case"scalar":a=yt(e,r.scalar);break;case"enum":a=e.int32();break;case"message":a=vt(e,n,r)}}}void 0===i&&(i=(0,Oe.M7)(r.mapKey,!1));if(void 0===a)switch(r.mapKind){case"scalar":a=(0,Oe.M7)(r.scalar,!1);break;case"enum":a=r.enum.values[0].number;break;case"message":a=Ke(r.message,void 0,!1)}t.set(i,a)}(t,e.get(n),i)}}function vt(e,t,n,r){const i=n.delimitedEncoding,a=null!=r?r:Ke(n.message,void 0,!1);return mt(a,e,t,i,i?n.number:e.uint32()),a}function yt(e,t){switch(t){case p.L.STRING:return e.string();case p.L.BOOL:return e.bool();case p.L.DOUBLE:return e.double();case p.L.FLOAT:return e.float();case p.L.INT32:return e.int32();case p.L.INT64:return e.int64();case p.L.UINT64:return e.uint64();case p.L.FIXED64:return e.fixed64();case p.L.BYTES:return e.bytes();case p.L.FIXED32:return e.fixed32();case p.L.SFIXED32:return e.sfixed32();case p.L.SFIXED64:return e.sfixed64();case p.L.SINT64:return e.sint64();case p.L.UINT32:return e.uint32();case p.L.SINT32:return e.sint32()}}function bt(e,t){var n;const i=function(e,t,n){const r=Ke(e,void 0,!1);return mt(r,new Fe(t),ft(n),!1,t.byteLength),r.message}(se,r(e));i.messageType.forEach(h),i.dependency=null!==(n=null==t?void 0:t.map((e=>e.proto.name)))&&void 0!==n?n:[];return v(i,(e=>null==t?void 0:t.find((t=>t.proto.name===e)))).getFile(i.name)}},1298:(e,t,n)=>{"use strict";function r(e,t,...n){return n.reduce(((e,t)=>e.nestedMessages[t]),e.messages[t])}n.d(t,{Z:()=>r})},3632:(e,t,n)=>{"use strict";n.d(t,{v:()=>h});var r=n(4230),i=n(6592),a=n(8190),o=n(6417),s=n(9228),l=n(987);const u=999,c=998,d=2;function h(e,t){if((0,r.K)(t,e))return t;const n=function(e){let t;if(function(e){switch(e.file.edition){case u:return!1;case c:return!0;default:return e.fields.some((e=>e.presence!=d&&"message"!=e.fieldKind&&!e.oneof))}}(e)){const n=w.get(e);let r,i;if(n)({prototype:r,members:i}=n);else{r={},i=new Set;for(const t of e.members)"oneof"!=t.kind&&("scalar"!=t.fieldKind&&"enum"!=t.fieldKind||t.presence!=d&&(i.add(t),r[t.localName]=S(t)));w.set(e,{prototype:r,members:i})}t=Object.create(r),t.$typeName=e.typeName;for(const n of e.members)if(!i.has(n)){if("field"==n.kind){if("message"==n.fieldKind)continue;if(("scalar"==n.fieldKind||"enum"==n.fieldKind)&&n.presence!=d)continue}t[n.localName]=S(n)}}else{t={$typeName:e.typeName};for(const n of e.members)"oneof"!=n.kind&&n.presence!=d||(t[n.localName]=S(n))}return t}(e);return void 0!==t&&function(e,t,n){for(const r of e.members){let e,i=n[r.localName];if(null!=i){if("oneof"==r.kind){const t=(0,s.mO)(n,r);if(!t)continue;e=t,i=(0,s.$v)(n,t)}else e=r;switch(e.fieldKind){case"message":i=g(e,i);break;case"scalar":i=p(e,i);break;case"list":i=m(e,i);break;case"map":i=f(e,i)}(0,s.lA)(t,e,i)}}}(e,n,t),n}function p(e,t){return e.scalar==i.L.BYTES?v(t):t}function f(e,t){if((0,o.Gv)(t)){if(e.scalar==i.L.BYTES)return y(t,v);if("message"==e.mapKind)return y(t,(t=>g(e,t)))}return t}function m(e,t){if(Array.isArray(t)){if(e.scalar==i.L.BYTES)return t.map(v);if("message"==e.listKind)return t.map((t=>g(e,t)))}return t}function g(e,t){if("message"==e.fieldKind&&!e.oneof&&(0,l.l)(e.message))return p(e.message.fields[0],t);if((0,o.Gv)(t)){if("google.protobuf.Struct"==e.message.typeName&&"google.protobuf.Value"!==e.parent.typeName)return t;if(!(0,r.K)(t,e.message))return h(e.message,t)}return t}function v(e){return Array.isArray(e)?new Uint8Array(e):e}function y(e,t){const n={};for(const r of Object.entries(e))n[r[0]]=t(r[1]);return n}const b=Symbol(),w=new WeakMap;function S(e){if("oneof"==e.kind)return{case:void 0};if("list"==e.fieldKind)return[];if("map"==e.fieldKind)return{};if("message"==e.fieldKind)return b;const t=e.getDefaultValue();return void 0!==t?"scalar"==e.fieldKind&&e.longAsString?t.toString():t:"scalar"==e.fieldKind?(0,a.M7)(e.scalar,e.longAsString):e.enum.values[0].number}},6592:(e,t,n)=>{"use strict";var r;n.d(t,{L:()=>r}),function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"}(r||(r={}))},4230:(e,t,n)=>{"use strict";function r(e,t){return!(null===e||"object"!=typeof e||!("$typeName"in e)||"string"!=typeof e.$typeName)&&(void 0===t||t.typeName===e.$typeName)}n.d(t,{K:()=>r})},8302:(e,t,n)=>{"use strict";n.d(t,{M:()=>i});var r=n(6834);const i=a();function a(){const e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&("object"!=typeof process||"object"!=typeof process.env||"1"!==process.env.BUF_BIGINT_DISABLE)){const t=BigInt("-9223372036854775808"),n=BigInt("9223372036854775807"),r=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){const r="bigint"==typeof e?e:BigInt(e);if(r>n||r<t)throw new Error(`invalid int64: ${e}`);return r},uParse(e){const t="bigint"==typeof e?e:BigInt(e);if(t>i||t<r)throw new Error(`invalid uint64: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigInt64(0,!0)),uDec:(t,n)=>(e.setInt32(0,t,!0),e.setInt32(4,n,!0),e.getBigUint64(0,!0))}}return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),o(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),s(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),o(e),(0,r.LJ)(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),s(e),(0,r.LJ)(e)),dec:(e,t)=>(0,r._Q)(e,t),uDec:(e,t)=>(0,r.Hc)(e,t)}}function o(e){if(!/^-?[0-9]+$/.test(e))throw new Error("invalid int64: "+e)}function s(e){if(!/^[0-9]+$/.test(e))throw new Error("invalid uint64: "+e)}},6417:(e,t,n)=>{"use strict";n.d(t,{G6:()=>o,Gv:()=>i,LT:()=>s,sG:()=>a});var r=n(9228);function i(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function a(e,t){var n,a,o,s;if(i(e)&&r.I4 in e&&"add"in e&&"field"in e&&"function"==typeof e.field){if(void 0!==t){const r=t,i=e.field();return r.listKind==i.listKind&&r.scalar===i.scalar&&(null===(n=r.message)||void 0===n?void 0:n.typeName)===(null===(a=i.message)||void 0===a?void 0:a.typeName)&&(null===(o=r.enum)||void 0===o?void 0:o.typeName)===(null===(s=i.enum)||void 0===s?void 0:s.typeName)}return!0}return!1}function o(e,t){var n,a,o,s;if(i(e)&&r.I4 in e&&"has"in e&&"field"in e&&"function"==typeof e.field){if(void 0!==t){const r=t,i=e.field();return r.mapKey===i.mapKey&&r.mapKind==i.mapKind&&r.scalar===i.scalar&&(null===(n=r.message)||void 0===n?void 0:n.typeName)===(null===(a=i.message)||void 0===a?void 0:a.typeName)&&(null===(o=r.enum)||void 0===o?void 0:o.typeName)===(null===(s=i.enum)||void 0===s?void 0:s.typeName)}return!0}return!1}function s(e,t){return i(e)&&r.I4 in e&&"desc"in e&&i(e.desc)&&"message"===e.desc.kind&&(void 0===t||e.desc.typeName==t.typeName)}},8190:(e,t,n)=>{"use strict";n.d(t,{M7:()=>a,MZ:()=>o});var r=n(8302),i=n(6592);function a(e,t){switch(e){case i.L.STRING:return"";case i.L.BOOL:return!1;default:case i.L.DOUBLE:case i.L.FLOAT:return 0;case i.L.INT64:case i.L.UINT64:case i.L.SFIXED64:case i.L.FIXED64:case i.L.SINT64:return t?"0":r.M.zero;case i.L.BYTES:return new Uint8Array(0)}}function o(e,t){switch(e){case i.L.BOOL:return!1===t;case i.L.STRING:return""===t;case i.L.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return 0==t}}},9228:(e,t,n)=>{"use strict";n.d(t,{$v:()=>u,I4:()=>a,b1:()=>l,lA:()=>c,mO:()=>o,yO:()=>d,zB:()=>s});var r=n(8190);const i=2,a=Symbol.for("reflect unsafe local");function o(e,t){const n=e[t.localName].case;return void 0===n?n:t.fields.find((e=>e.localName===n))}function s(e,t){const n=t.localName;if(t.oneof)return e[t.oneof.localName].case===n;if(t.presence!=i)return void 0!==e[n]&&Object.prototype.hasOwnProperty.call(e,n);switch(t.fieldKind){case"list":return e[n].length>0;case"map":return Object.keys(e[n]).length>0;case"scalar":return!(0,r.MZ)(t.scalar,e[n]);case"enum":return e[n]!==t.enum.values[0].number}throw new Error("message field with implicit presence")}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)&&void 0!==e[t]}function u(e,t){if(t.oneof){const n=e[t.oneof.localName];return n.case===t.localName?n.value:void 0}return e[t.localName]}function c(e,t,n){t.oneof?e[t.oneof.localName]={case:t.localName,value:n}:e[t.localName]=n}function d(e,t){const n=t.localName;if(t.oneof){const r=t.oneof.localName;e[r].case===n&&(e[r]={case:void 0})}else if(t.presence!=i)delete e[n];else switch(t.fieldKind){case"map":e[n]={};break;case"list":e[n]=[];break;case"enum":e[n]=t.enum.values[0].number;break;case"scalar":e[n]=(0,r.M7)(t.scalar,t.longAsString)}}},6834:(e,t,n)=>{"use strict";function r(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(127&r)<<n,!(128&r))return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(15&n)<<28,t=(112&n)>>4,!(128&n))return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(127&r)<<n,!(128&r))return this.assertBounds(),[e,t]}throw new Error("invalid varint")}n.d(t,{Gn:()=>d,Hc:()=>s,LJ:()=>a,_Q:()=>o,ls:()=>r});const i=4294967296;function a(e){const t="-"===e[0];t&&(e=e.slice(1));const n=1e6;let r=0,a=0;function o(t,o){const s=Number(e.slice(t,o));a*=n,r=r*n+s,r>=i&&(a+=r/i|0,r%=i)}return o(-24,-18),o(-18,-12),o(-12,-6),o(-6),t?u(r,a):l(r,a)}function o(e,t){let n=l(e,t);const r=2147483648&n.hi;r&&(n=u(n.lo,n.hi));const i=s(n.lo,n.hi);return r?"-"+i:i}function s(e,t){if(({lo:e,hi:t}=function(e,t){return{lo:e>>>0,hi:t>>>0}}(e,t)),t<=2097151)return String(i*t+e);const n=16777215&(e>>>24|t<<8),r=t>>16&65535;let a=(16777215&e)+6777216*n+6710656*r,o=n+8147497*r,s=2*r;const l=1e7;return a>=l&&(o+=Math.floor(a/l),a%=l),o>=l&&(s+=Math.floor(o/l),o%=l),s.toString()+c(o)+c(a)}function l(e,t){return{lo:0|e,hi:0|t}}function u(e,t){return t=~t,e?e=1+~e:t+=1,l(e,t)}const c=e=>{const t=String(e);return"0000000".slice(t.length)+t};function d(){let e=this.buf[this.pos++],t=127&e;if(!(128&e))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(127&e)<<7,!(128&e))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(127&e)<<14,!(128&e))return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(127&e)<<21,!(128&e))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(15&e)<<28;for(let t=5;128&e&&t<10;t++)e=this.buf[this.pos++];if(128&e)throw new Error("invalid varint");return this.assertBounds(),t>>>0}},987:(e,t,n)=>{"use strict";function r(e){return a(e.$typeName)}function i(e){const t=e.fields[0];return a(e.typeName)&&void 0!==t&&"scalar"==t.fieldKind&&"value"==t.name&&1==t.number}function a(e){return e.startsWith("google.protobuf.")&&["DoubleValue","FloatValue","Int64Value","UInt64Value","Int32Value","UInt32Value","BoolValue","StringValue","BytesValue"].includes(e.substring(16))}n.d(t,{Y:()=>r,l:()=>i})},6248:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>kt});var r=n(2540),i=n(6089);const a=(e,t)=>e>t?1:e<t?-1:0,o=1/0,s=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l="eexxaacctt",u=/\p{P}/gu,c=["en",{numeric:!0,sensitivity:"base"}],d=(e,t,n)=>e.replace("A-Z",t).replace("a-z",n),h={unicode:!1,alpha:null,interSplit:"[^A-Za-z\\d']+",intraSplit:"[a-z][A-Z]",interBound:"[^A-Za-z\\d]",intraBound:"[A-Za-z]\\d|\\d[A-Za-z]|[a-z][A-Z]",interLft:0,interRgt:0,interChars:".",interIns:o,intraChars:"[a-z\\d']",intraIns:null,intraContr:"'[a-z]{1,2}\\b",intraMode:0,intraSlice:[1,o],intraSub:null,intraTrn:null,intraDel:null,intraFilt:(e,t,n)=>!0,toUpper:e=>e.toLocaleUpperCase(),toLower:e=>e.toLocaleLowerCase(),compare:null,sort:(e,t,n,r=a)=>{let{idx:i,chars:o,terms:s,interLft2:l,interLft1:u,start:c,intraIns:d,interIns:h,cases:p}=e;return i.map(((e,t)=>t)).sort(((e,n)=>o[n]-o[e]||d[e]-d[n]||s[n]+l[n]+.5*u[n]-(s[e]+l[e]+.5*u[e])||h[e]-h[n]||c[e]-c[n]||p[n]-p[e]||r(t[i[e]],t[i[n]])))}},p=(e,t)=>0==t?"":1==t?e+"??":t==o?e+"*?":e+`{0,${t}}?`,f="(?:\\b|_)";function m(e){e=Object.assign({},h,e);let{unicode:t,interLft:n,interRgt:r,intraMode:i,intraSlice:o,intraIns:m,intraSub:g,intraTrn:y,intraDel:b,intraContr:w,intraSplit:S,interSplit:x,intraBound:E,interBound:_,intraChars:O,toUpper:T,toLower:k,compare:C}=e;m??=i,g??=i,y??=i,b??=i,C??="undefined"==typeof Intl?a:new Intl.Collator(...c).compare;let A=e.letters??e.alpha;if(null!=A){let e=T(A),t=k(A);x=d(x,e,t),S=d(S,e,t),_=d(_,e,t),E=d(E,e,t),O=d(O,e,t),w=d(w,e,t)}let D=t?"u":"";const R='".+?"',I=new RegExp(R,"gi"+D),P=new RegExp(`(?:\\s+|^)-(?:${O}+|${R})`,"gi"+D);let{intraRules:N}=e;null==N&&(N=e=>{let t=h.intraSlice,n=0,r=0,i=0,a=0;if(/[^\d]/.test(e)){let s=e.length;s<=4?s>=3&&(i=Math.min(y,1),4==s&&(n=Math.min(m,1))):(t=o,n=m,r=g,i=y,a=b)}return{intraSlice:t,intraIns:n,intraSub:r,intraTrn:i,intraDel:a}});let j=!!S,L=new RegExp(S,"g"+D),M=new RegExp(x,"g"+D),F=new RegExp("^"+x+"|"+x+"$","g"+D),V=new RegExp(w,"gi"+D);const $=(e,t=!1)=>{let n=[];e=(e=e.replace(I,(e=>(n.push(e),l)))).replace(F,""),t||(e=k(e)),j&&(e=e.replace(L,(e=>e[0]+" "+e[1])));let r=0;return e.split(M).filter((e=>""!=e)).map((e=>e===l?n[r++]:e))},B=/[^\d]+|\d+/g,z=(t,a=0,o=!1)=>{let l=$(t);if(0==l.length)return[];let u,c=Array(l.length).fill("");if(l=l.map(((e,t)=>e.replace(V,(e=>(c[t]=e,""))))),1==i)u=l.map(((e,t)=>{if('"'===e[0])return s(e.slice(1,-1));let n="";for(let r of e.matchAll(B)){let e=r[0],{intraSlice:i,intraIns:a,intraSub:o,intraTrn:s,intraDel:l}=N(e);if(a+o+s+l==0)n+=e+c[t];else{let[r,u]=i,d=e.slice(0,r),h=e.slice(u),f=e.slice(r,u);1==a&&1==d.length&&d!=f[0]&&(d+="(?!"+d+")");let m=f.length,g=[e];if(o)for(let e=0;e<m;e++)g.push(d+f.slice(0,e)+O+f.slice(e+1)+h);if(s)for(let e=0;e<m-1;e++)f[e]!=f[e+1]&&g.push(d+f.slice(0,e)+f[e+1]+f[e]+f.slice(e+2)+h);if(l)for(let e=0;e<m;e++)g.push(d+f.slice(0,e+1)+"?"+f.slice(e+1)+h);if(a){let e=p(O,1);for(let t=0;t<m;t++)g.push(d+f.slice(0,t)+e+f.slice(t)+h)}n+="(?:"+g.join("|")+")"+c[t]}}return n}));else{let e=p(O,m);2==a&&m>0&&(e=")("+e+")("),u=l.map(((t,n)=>'"'===t[0]?s(t.slice(1,-1)):t.split("").map(((e,t,n)=>(1==m&&0==t&&n.length>1&&e!=n[t+1]&&(e+="(?!"+e+")"),e))).join(e)+c[n]))}let d=2==n?f:"",h=2==r?f:"",g=h+p(e.interChars,e.interIns)+d;return a>0?o?u=d+"("+u.join(")"+h+"|"+d+"(")+")"+h:(u="("+u.join(")("+g+")(")+")",u="(.??"+d+")"+u+"("+h+".*)"):(u=u.join(g),u=d+u+h),[new RegExp(u,"i"+D),l,c]},U=(e,t,n)=>{let[r]=z(t);if(null==r)return null;let i=[];if(null!=n)for(let t=0;t<n.length;t++){let a=n[t];r.test(e[a])&&i.push(a)}else for(let t=0;t<e.length;t++)r.test(e[t])&&i.push(t);return i};let q=!!E,H=new RegExp(_,D),G=new RegExp(E,D);const W=(t,i,a)=>{let[o,s,l]=z(a,1),u=$(a,!0),[c]=z(a,2),d=s.length,h=Array(d),p=Array(d);for(let e=0;e<d;e++){let t=s[e],n=u[e],r='"'==t[0]?t.slice(1,-1):t+l[e],i='"'==n[0]?n.slice(1,-1):n+l[e];h[e]=r,p[e]=i}let f=t.length,m=Array(f).fill(0),g={idx:Array(f),start:m.slice(),chars:m.slice(),cases:m.slice(),terms:m.slice(),interIns:m.slice(),intraIns:m.slice(),interLft2:m.slice(),interRgt2:m.slice(),interLft1:m.slice(),interRgt1:m.slice(),ranges:Array(f)},v=1==n||1==r,y=0;for(let a=0;a<t.length;a++){let s=i[t[a]],l=s.match(o),u=l.index+l[1].length,f=u,m=!1,b=0,w=0,S=0,x=0,E=0,_=0,O=0,T=0,C=0,A=[];for(let t=0,i=2;t<d;t++,i+=2){let a=k(l[i]),o=h[t],c=p[t],g=o.length,y=a.length,R=a==o;if(l[i]==c&&O++,!R&&l[i+1].length>=g){let e=k(l[i+1]).indexOf(o);e>-1&&(A.push(f,y,e,g),f+=Q(l,i,e,g),a=o,y=g,R=!0,0==t&&(u=f))}if(v||R){let e=f-1,c=f+y,d=!1,h=!1;if(-1==e||H.test(s[e]))R&&b++,d=!0;else{if(2==n){m=!0;break}if(q&&G.test(s[e]+s[e+1]))R&&w++,d=!0;else if(1==n){let e=l[i+1],n=f+y;if(e.length>=g){let r,c=0,h=!1,p=new RegExp(o,"ig"+D);for(;r=p.exec(e);){c=r.index;let e=n+c,t=e-1;if(-1==t||H.test(s[t])){b++,h=!0;break}if(G.test(s[t]+s[e])){w++,h=!0;break}}h&&(d=!0,A.push(f,y,c,g),f+=Q(l,i,c,g),a=o,y=g,R=!0,0==t&&(u=f))}if(!d){m=!0;break}}}if(c==s.length||H.test(s[c]))R&&S++,h=!0;else{if(2==r){m=!0;break}if(q&&G.test(s[c-1]+s[c]))R&&x++,h=!0;else if(1==r){m=!0;break}}R&&(E+=g,d&&h&&_++)}if(y>g&&(C+=y-g),t>0&&(T+=l[i-1].length),!e.intraFilt(o,a,f)){m=!0;break}t<d-1&&(f+=y+l[i+1].length)}if(!m){g.idx[y]=t[a],g.interLft2[y]=b,g.interLft1[y]=w,g.interRgt2[y]=S,g.interRgt1[y]=x,g.chars[y]=E,g.terms[y]=_,g.cases[y]=O,g.interIns[y]=T,g.intraIns[y]=C,g.start[y]=u;let e=s.match(c),n=e.index+e[1].length,r=A.length,i=r>0?0:1/0,o=r-4;for(let t=2;t<e.length;){let r=e[t].length;if(i<=o&&A[i]==n){let r=A[i+1],a=A[i+2],o=A[i+3],s=t,l="";for(let t=0;t<r;s++)l+=e[s],t+=e[s].length;e.splice(t,s-t,l),n+=Q(e,t,a,o),i+=4}else n+=r,t++}n=e.index+e[1].length;let l=g.ranges[y]=[],d=n,h=n;for(let t=2;t<e.length;t++){let r=e[t].length;n+=r,t%2==0?h=n:r>0&&(l.push(d,h),d=h=n)}h>d&&l.push(d,h),y++}}if(y<t.length)for(let e in g)g[e]=g[e].slice(0,y);return g},Q=(e,t,n,r)=>{let i=e[t]+e[t+1].slice(0,n);return e[t-1]+=i,e[t]=e[t+1].slice(n,n+r),e[t+1]=e[t+1].slice(n+r),i.length};return{search:(...t)=>((t,n,r,i=1e3,a)=>{r=r?!0===r?5:r:0;let o=null,l=null,c=[];n=n.replace(P,(e=>{let t=e.trim().slice(1);return t='"'===t[0]?s(t.slice(1,-1)):t.replace(u,""),""!=t&&c.push(t),""}));let d,h=$(n);if(c.length>0){if(d=new RegExp(c.join("|"),"i"+D),0==h.length){let e=[];for(let n=0;n<t.length;n++)d.test(t[n])||e.push(n);return[e,null,null]}}else if(0==h.length)return[null,null,null];if(r>0){let e=$(n);if(e.length>1){let n=e.slice().sort(((e,t)=>t.length-e.length));for(let e=0;e<n.length;e++){if(0==a?.length)return[[],null,null];a=U(t,n[e],a)}if(e.length>r)return[a,null,null];o=v(e).map((e=>e.join(" "))),l=[];let i=new Set;for(let e=0;e<o.length;e++)if(i.size<a.length){let n=a.filter((e=>!i.has(e))),r=U(t,o[e],n);for(let e=0;e<r.length;e++)i.add(r[e]);l.push(r)}else l.push([])}}null==o&&(o=[n],l=[a?.length>0?a:U(t,n)]);let p=null,f=null;if(c.length>0&&(l=l.map((e=>e.filter((e=>!d.test(t[e])))))),l.reduce(((e,t)=>e+t.length),0)<=i){p={},f=[];for(let n=0;n<l.length;n++){let r=l[n];if(null==r||0==r.length)continue;let i=o[n],a=W(r,t,i),s=e.sort(a,t,i,C);if(n>0)for(let e=0;e<s.length;e++)s[e]+=f.length;for(let e in a)p[e]=(p[e]??[]).concat(a[e]);f=f.concat(s)}}return[[].concat(...l),p,f]})(...t),split:$,filter:U,info:W,sort:e.sort}}const g=(()=>{let e={A:"ÁÀÃÂÄĄĂÅ",a:"áàãâäąăå",E:"ÉÈÊËĖĚ",e:"éèêëęě",I:"ÍÌÎÏĮİ",i:"íìîïįı",O:"ÓÒÔÕÖ",o:"óòôõö",U:"ÚÙÛÜŪŲŮŰ",u:"úùûüūųůű",C:"ÇČĆ",c:"çčć",D:"Ď",d:"ď",G:"Ğ",g:"ğ",L:"Ł",l:"ł",N:"ÑŃŇ",n:"ñńň",S:"ŠŚȘŞ",s:"šśșş",T:"ŢȚŤ",t:"ţțť",Y:"Ý",y:"ý",Z:"ŻŹŽ",z:"żźž"},t={},n="";for(let r in e)e[r].split("").forEach((e=>{n+=e,t[e]=r}));let r=new RegExp(`[${n}]`,"g"),i=e=>t[e];return e=>{if("string"==typeof e)return e.replace(r,i);let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n].replace(r,i);return t}})();function v(e){let t,n,r=(e=e.slice()).length,i=[e.slice()],a=new Array(r).fill(0),o=1;for(;o<r;)a[o]<o?(t=o%2&&a[o],n=e[o],e[o]=e[t],e[t]=n,++a[o],o=1,i.push(e.slice())):(a[o]=0,++o);return i}const y=(e,t)=>t?`<mark>${e}</mark>`:e,b=(e,t)=>e+t;m.latinize=g,m.permute=e=>v([...Array(e.length).keys()]).sort(((e,t)=>{for(let n=0;n<e.length;n++)if(e[n]!=t[n])return e[n]-t[n];return 0})).map((t=>t.map((t=>e[t])))),m.highlight=function(e,t,n=y,r="",i=b){r=i(r,n(e.substring(0,t[0]),!1))??r;for(let a=0;a<t.length;a+=2){let o=t[a],s=t[a+1];r=i(r,n(e.substring(o,s),!0))??r,a<t.length-3&&(r=i(r,n(e.substring(t[a+1],t[a+2]),!1))??r)}return r=i(r,n(e.substring(t[t.length-1]),!1))??r};var w=n(5959),S=n(2871);const x=S.Bd?w.useLayoutEffect:w.useEffect;var E={x:0,y:0,width:0,height:0,top:0,left:0,bottom:0,right:0};const _=S.Bd&&void 0!==window.ResizeObserver?function(){var e=(0,w.useState)(null),t=e[0],n=e[1],r=(0,w.useState)(E),i=r[0],a=r[1],o=(0,w.useMemo)((function(){return new window.ResizeObserver((function(e){if(e[0]){var t=e[0].contentRect,n=t.x,r=t.y,i=t.width,o=t.height,s=t.top,l=t.left,u=t.bottom,c=t.right;a({x:n,y:r,width:i,height:o,top:s,left:l,bottom:u,right:c})}}))}),[]);return x((function(){if(t)return o.observe(t),function(){o.disconnect()}}),[t]),[n,i]}:function(){return[S.lQ,E]};var O=n(2007);const T=22*window.devicePixelRatio,k=10*window.devicePixelRatio,C=.5*window.devicePixelRatio,A=20*window.devicePixelRatio,D=.5*window.devicePixelRatio,R=4*window.devicePixelRatio,I=3*window.devicePixelRatio,P=3*window.devicePixelRatio,N=4*window.devicePixelRatio,j=2*window.devicePixelRatio,L=120,M=({data:e,itemData:t,onMenuItemClick:n,onItemFocus:i,onSandwich:a,collapseConfig:o,onExpandGroup:s,onCollapseGroup:l,onExpandAllGroups:u,onCollapseAllGroups:c,getExtraContextMenuButtons:d,collapsing:h,allGroupsExpanded:p,allGroupsCollapsed:f,selectedView:m,search:g})=>(0,r.jsx)("div",{"data-testid":"contextMenu",children:(0,r.jsx)(O.ContextMenu,{renderMenuItems:function(){const v=(null==d?void 0:d(t,e.data,{selectedView:m,isDiff:e.isDiffFlamegraph(),search:g,collapseConfig:o}))||[];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.MenuItem,{label:"Focus block",icon:"eye",onClick:()=>{i(),n()}}),(0,r.jsx)(O.MenuItem,{label:"Copy function name",icon:"copy",onClick:()=>{navigator.clipboard.writeText(t.label).then((()=>{n()}))}}),(0,r.jsx)(O.MenuItem,{label:"Sandwich view",icon:"gf-show-context",onClick:()=>{a(),n()}}),v.map((({label:e,icon:t,onClick:n})=>(0,r.jsx)(O.MenuItem,{label:e,icon:t,onClick:()=>n()},e))),h&&(0,r.jsxs)(O.MenuGroup,{label:"Grouping",children:[o?o.collapsed?(0,r.jsx)(O.MenuItem,{label:"Expand group",icon:"angle-double-down",onClick:()=>{s(),n()}}):(0,r.jsx)(O.MenuItem,{label:"Collapse group",icon:"angle-double-up",onClick:()=>{l(),n()}}):null,!p&&(0,r.jsx)(O.MenuItem,{label:"Expand all groups",icon:"angle-double-down",onClick:()=>{u(),n()}}),!f&&(0,r.jsx)(O.MenuItem,{label:"Collapse all groups",icon:"angle-double-up",onClick:()=>{c(),n()}})]})]})},x:t.posX+10,y:t.posY,focusOnOpen:!1})});var F=n(7781);const V=({data:e,item:t,totalTicks:n,position:i,collapseConfig:a})=>{const o=(0,O.useStyles2)(q);if(!t||!i)return null;let s;if(e.isDiffFlamegraph()){const i=z(e,t,n);s=(0,r.jsx)(O.InteractiveTable,{className:o.tooltipTable,columns:[{id:"label",header:""},{id:"baseline",header:"Baseline"},{id:"comparison",header:"Comparison"},{id:"diff",header:"Diff"}],data:i,getRowId:e=>e.rowId})}else{const i=$(e,t,n);s=(0,r.jsxs)("p",{className:o.lastParagraph,children:[i.unitTitle,(0,r.jsx)("br",{}),"Total: ",(0,r.jsx)("b",{children:i.unitValue})," (",i.percentValue,"%)",(0,r.jsx)("br",{}),"Self: ",(0,r.jsx)("b",{children:i.unitSelf})," (",i.percentSelf,"%)",(0,r.jsx)("br",{}),"Samples: ",(0,r.jsx)("b",{children:i.samples})]})}return(0,r.jsx)(O.Portal,{children:(0,r.jsx)(O.VizTooltipContainer,{className:o.tooltipContainer,position:i,offset:{x:15,y:0},children:(0,r.jsxs)("div",{className:o.tooltipContent,children:[(0,r.jsxs)("p",{className:o.tooltipName,children:[e.getLabel(t.itemIndexes[0]),a&&a.collapsed?(0,r.jsxs)("span",{children:[(0,r.jsx)("br",{}),"and ",a.items.length," similar items"]}):""]}),s]})})})},$=(e,t,n)=>{const r=e.valueDisplayProcessor(t.value),i=e.getSelfDisplay(t.itemIndexes),a=Math.round(r.numeric/n*1e4)/100,o=Math.round(i.numeric/n*1e4)/100;let s=r.text+r.suffix,l=i.text+i.suffix;const u=e.getUnitTitle();return"Count"===u&&(r.suffix||(s=r.text),i.suffix||(l=i.text)),{percentValue:a,percentSelf:o,unitTitle:u,unitValue:s,unitSelf:l,samples:r.numeric.toLocaleString()}},B=(e,t)=>{const n=t(e);return n.text+n.suffix},z=(e,t,n)=>{const r=e.getLevels()[0][0].valueRight,i=n-r,a=t.value-t.valueRight,o=Math.round(1e4*a/i)/100,s=Math.round(1e4*t.valueRight/r)/100,l=(s-o)/o*100,u=U(e,e.valueDisplayProcessor(a)),c=U(e,e.valueDisplayProcessor(t.valueRight)),d=(0,F.getValueFormat)("short");return[{rowId:"1",label:"% of total",baseline:o+"%",comparison:s+"%",diff:B(l,d)+"%"},{rowId:"2",label:"Value",baseline:u,comparison:c,diff:U(e,e.valueDisplayProcessor(t.valueRight-a))},{rowId:"3",label:"Samples",baseline:B(a,d),comparison:B(t.valueRight,d),diff:B(t.valueRight-a,d)}]};function U(e,t){let n=t.text+t.suffix;return"Count"===e.getUnitTitle()&&(t.suffix||(n=t.text)),n}const q=e=>({tooltipContainer:(0,i.css)({title:"tooltipContainer",overflow:"hidden"}),tooltipContent:(0,i.css)({title:"tooltipContent",fontSize:e.typography.bodySmall.fontSize,width:"100%"}),tooltipName:(0,i.css)({title:"tooltipName",marginTop:0,wordBreak:"break-all"}),lastParagraph:(0,i.css)({title:"lastParagraph",marginBottom:0}),name:(0,i.css)({title:"name",marginBottom:"10px"}),tooltipTable:(0,i.css)({title:"tooltipTable",maxWidth:"400px"})});function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}var G=/^\s+/,W=/\s+$/;function Q(e,t){if(t=t||{},(e=e||"")instanceof Q)return e;if(!(this instanceof Q))return new Q(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;"string"==typeof e&&(e=function(e){e=e.replace(G,"").replace(W,"").toLowerCase();var t,n=!1;if(de[e])e=de[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=_e.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=_e.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=_e.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=_e.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=_e.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=_e.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=_e.hex8.exec(e))return{r:ge(t[1]),g:ge(t[2]),b:ge(t[3]),a:we(t[4]),format:n?"name":"hex8"};if(t=_e.hex6.exec(e))return{r:ge(t[1]),g:ge(t[2]),b:ge(t[3]),format:n?"name":"hex"};if(t=_e.hex4.exec(e))return{r:ge(t[1]+""+t[1]),g:ge(t[2]+""+t[2]),b:ge(t[3]+""+t[3]),a:we(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=_e.hex3.exec(e))return{r:ge(t[1]+""+t[1]),g:ge(t[2]+""+t[2]),b:ge(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==H(e)&&(Oe(e.r)&&Oe(e.g)&&Oe(e.b)?(l=e.r,u=e.g,c=e.b,t={r:255*fe(l,255),g:255*fe(u,255),b:255*fe(c,255)},o=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):Oe(e.h)&&Oe(e.s)&&Oe(e.v)?(r=ye(e.s),i=ye(e.v),t=function(e,t,n){e=6*fe(e,360),t=fe(t,100),n=fe(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6,u=[n,o,a,a,s,n][l],c=[s,n,n,o,a,a][l],d=[a,a,s,n,n,o][l];return{r:255*u,g:255*c,b:255*d}}(e.h,r,i),o=!0,s="hsv"):Oe(e.h)&&Oe(e.s)&&Oe(e.l)&&(r=ye(e.s),a=ye(e.l),t=function(e,t,n){var r,i,a;function o(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=fe(e,360),t=fe(t,100),n=fe(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=o(l,s,e+1/3),i=o(l,s,e),a=o(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a));var l,u,c;return n=pe(n),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function K(e,t,n){e=fe(e,255),t=fe(t,255),n=fe(n,255);var r,i,a=Math.max(e,t,n),o=Math.min(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,l:s}}function X(e,t,n){e=fe(e,255),t=fe(t,255),n=fe(n,255);var r,i,a=Math.max(e,t,n),o=Math.min(e,t,n),s=a,l=a-o;if(i=0===a?0:l/a,a==o)r=0;else{switch(a){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,v:s}}function Y(e,t,n,r){var i=[ve(Math.round(e).toString(16)),ve(Math.round(t).toString(16)),ve(Math.round(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function J(e,t,n,r){return[ve(be(r)),ve(Math.round(e).toString(16)),ve(Math.round(t).toString(16)),ve(Math.round(n).toString(16))].join("")}function Z(e,t){t=0===t?0:t||10;var n=Q(e).toHsl();return n.s-=t/100,n.s=me(n.s),Q(n)}function ee(e,t){t=0===t?0:t||10;var n=Q(e).toHsl();return n.s+=t/100,n.s=me(n.s),Q(n)}function te(e){return Q(e).desaturate(100)}function ne(e,t){t=0===t?0:t||10;var n=Q(e).toHsl();return n.l+=t/100,n.l=me(n.l),Q(n)}function re(e,t){t=0===t?0:t||10;var n=Q(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),Q(n)}function ie(e,t){t=0===t?0:t||10;var n=Q(e).toHsl();return n.l-=t/100,n.l=me(n.l),Q(n)}function ae(e,t){var n=Q(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,Q(n)}function oe(e){var t=Q(e).toHsl();return t.h=(t.h+180)%360,Q(t)}function se(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Q(e).toHsl(),r=[Q(e)],i=360/t,a=1;a<t;a++)r.push(Q({h:(n.h+a*i)%360,s:n.s,l:n.l}));return r}function le(e){var t=Q(e).toHsl(),n=t.h;return[Q(e),Q({h:(n+72)%360,s:t.s,l:t.l}),Q({h:(n+216)%360,s:t.s,l:t.l})]}function ue(e,t,n){t=t||6,n=n||30;var r=Q(e).toHsl(),i=360/n,a=[Q(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(Q(r));return a}function ce(e,t){t=t||6;for(var n=Q(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(Q({h:r,s:i,v:a})),a=(a+s)%1;return o}Q.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=pe(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=X(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=X(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=K(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=K(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return Y(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[ve(Math.round(e).toString(16)),ve(Math.round(t).toString(16)),ve(Math.round(n).toString(16)),ve(be(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*fe(this._r,255))+"%",g:Math.round(100*fe(this._g,255))+"%",b:Math.round(100*fe(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*fe(this._r,255))+"%, "+Math.round(100*fe(this._g,255))+"%, "+Math.round(100*fe(this._b,255))+"%)":"rgba("+Math.round(100*fe(this._r,255))+"%, "+Math.round(100*fe(this._g,255))+"%, "+Math.round(100*fe(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(he[Y(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+J(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=Q(e);n="#"+J(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return Q(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(ne,arguments)},brighten:function(){return this._applyModification(re,arguments)},darken:function(){return this._applyModification(ie,arguments)},desaturate:function(){return this._applyModification(Z,arguments)},saturate:function(){return this._applyModification(ee,arguments)},greyscale:function(){return this._applyModification(te,arguments)},spin:function(){return this._applyModification(ae,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(ue,arguments)},complement:function(){return this._applyCombination(oe,arguments)},monochromatic:function(){return this._applyCombination(ce,arguments)},splitcomplement:function(){return this._applyCombination(le,arguments)},triad:function(){return this._applyCombination(se,[3])},tetrad:function(){return this._applyCombination(se,[4])}},Q.fromRatio=function(e,t){if("object"==H(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:ye(e[r]));e=n}return Q(e,t)},Q.equals=function(e,t){return!(!e||!t)&&Q(e).toRgbString()==Q(t).toRgbString()},Q.random=function(){return Q.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Q.mix=function(e,t,n){n=0===n?0:n||50;var r=Q(e).toRgb(),i=Q(t).toRgb(),a=n/100;return Q({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},Q.readability=function(e,t){var n=Q(e),r=Q(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},Q.isReadable=function(e,t,n){var r,i,a=Q.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},Q.mostReadable=function(e,t,n){var r,i,a,o,s=null,l=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var u=0;u<t.length;u++)(r=Q.readability(e,t[u]))>l&&(l=r,s=Q(t[u]));return Q.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,Q.mostReadable(e,["#fff","#000"],n))};var de=Q.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},he=Q.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(de);function pe(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function fe(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function me(e){return Math.min(1,Math.max(0,e))}function ge(e){return parseInt(e,16)}function ve(e){return 1==e.length?"0"+e:""+e}function ye(e){return e<=1&&(e=100*e+"%"),e}function be(e){return Math.round(255*parseFloat(e)).toString(16)}function we(e){return ge(e)/255}var Se,xe,Ee,_e=(xe="[\\s|\\(]+("+(Se="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+Se+")[,|\\s]+("+Se+")\\s*\\)?",Ee="[\\s|\\(]+("+Se+")[,|\\s]+("+Se+")[,|\\s]+("+Se+")[,|\\s]+("+Se+")\\s*\\)?",{CSS_UNIT:new RegExp(Se),rgb:new RegExp("rgb"+xe),rgba:new RegExp("rgba"+Ee),hsl:new RegExp("hsl"+xe),hsla:new RegExp("hsla"+Ee),hsv:new RegExp("hsv"+xe),hsva:new RegExp("hsva"+Ee),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Oe(e){return!!_e.CSS_UNIT.exec(e)}var Te=(e=>(e.Bytes="bytes",e.Short="short",e.Nanoseconds="ns",e))(Te||{}),ke=(e=>(e.TopTable="topTable",e.FlameGraph="flameGraph",e.Both="both",e))(ke||{}),Ce=(e=>(e.ValueBased="valueBased",e.PackageBased="packageBased",e))(Ce||{}),Ae=(e=>(e.Default="default",e.DiffColorBlind="diffColorBlind",e))(Ae||{}),De=n(4201);const Re=[Q({h:24,s:69,l:60}),Q({h:34,s:65,l:65}),Q({h:194,s:52,l:61}),Q({h:163,s:45,l:55}),Q({h:211,s:48,l:60}),Q({h:246,s:40,l:65}),Q({h:305,s:63,l:79}),Q({h:47,s:100,l:73}),Q({r:183,g:219,b:171}),Q({r:244,g:213,b:152}),Q({r:78,g:146,b:249}),Q({r:249,g:186,b:143}),Q({r:242,g:145,b:145}),Q({r:130,g:181,b:216}),Q({r:229,g:168,b:226}),Q({r:174,g:162,b:224}),Q({r:154,g:196,b:138}),Q({r:242,g:201,b:109}),Q({r:101,g:197,b:219}),Q({r:249,g:147,b:78}),Q({r:234,g:100,b:96}),Q({r:81,g:149,b:206}),Q({r:214,g:131,b:206}),Q({r:128,g:110,b:183})],Ie=`linear-gradient(90deg, ${Ne(1,100,0,1)} 0%, ${Ne(100,100,0,1)} 100%)`,Pe=`linear-gradient(90deg, ${Re[0]} 0%, ${Re[2]} 30%, ${Re[6]} 50%, ${Re[7]} 70%, ${Re[8]} 100%)`;function Ne(e,t,n,r){const i=Math.min(1,e/t/(r-n));return Q({h:50-50*i,s:100,l:65+7*i})}function je(e,t){const n=function(e,t=0){let n,r,i,a,o,s,l,u;for(n=3&e.length,r=e.length-n,i=t,o=3432918353,s=461845907,u=0;u<r;)l=255&e.charCodeAt(u)|(255&e.charCodeAt(++u))<<8|(255&e.charCodeAt(++u))<<16|(255&e.charCodeAt(++u))<<24,++u,l=(65535&l)*o+(((l>>>16)*o&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,i^=l,i=i<<13|i>>>19,a=5*(65535&i)+((5*(i>>>16)&65535)<<16)&4294967295,i=27492+(65535&a)+((58964+(a>>>16)&65535)<<16);switch(l=0,n){case 3:l^=(255&e.charCodeAt(u+2))<<16;case 2:l^=(255&e.charCodeAt(u+1))<<8;case 1:l^=255&e.charCodeAt(u);default:l=(65535&l)*o+(((l>>>16)*o&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,i^=l}return i^=e.length,i^=i>>>16,i=2246822507*(65535&i)+((2246822507*(i>>>16)&65535)<<16)&4294967295,i^=i>>>13,i=3266489909*(65535&i)+((3266489909*(i>>>16)&65535)<<16)&4294967295,i^=i>>>16,i>>>0}(function(e){var t;for(const[n,r]of $e){const n=e.match(r);if(n)return(null==(t=n.groups)?void 0:t.packageName)||""}return}(e)||"",0)%Re.length;let r=Re[n].clone();return t.isLight&&(r=r.brighten(15)),r}const Le=["rgb(0, 170, 0)","rgb(148, 142, 142)","rgb(200, 0, 0)"],Me=`linear-gradient(90deg, ${Le[0]} 0%, ${Le[1]} 50%, ${Le[2]} 100%)`,Fe=["rgb(26, 133, 255)","rgb(148, 142, 142)","rgb(220, 50, 32)"],Ve=`linear-gradient(90deg, ${Fe[0]} 0%, ${Fe[1]} 50%, ${Fe[2]} 100%)`;const $e=[["phpspy",/^(?<packageName>([^\/]*\/)*)(?<filename>.*\.php+)(?<line_info>.*)$/],["pyspy",/^(?<packageName>([^\/]*\/)*)(?<filename>.*\.py+)(?<line_info>.*)$/],["rbspy",/^(?<packageName>([^\/]*\/)*)(?<filename>.*\.rb+)(?<line_info>.*)$/],["nodespy",/^(\.\/node_modules\/)?(?<packageName>[^/]*)(?<filename>.*\.?(jsx?|tsx?)?):(?<functionName>.*):(?<line_info>.*)$/],["gospy",/^(?<packageName>.*?\/.*?\.|.*?\.|.+)(?<functionName>.*)$/],["javaspy",/^(?<packageName>.+\/)(?<filename>.+\.)(?<functionName>.+)$/],["dotnetspy",/^(?<packageName>.+)\.(.+)\.(.+)\(.*\)$/],["tracing",/^(?<packageName>.+?):.*$/],["pyroscope-rs",/^(?<packageName>[^::]+)/],["ebpfspy",/^(?<packageName>.+)$/],["unknown",/^(?<packageName>.+)$/]];function Be(e){const{canvasRef:t,data:n,root:r,depth:i,direction:a,wrapperWidth:o,rangeMin:s,rangeMax:l,matchedLabels:u,textAlign:c,totalViewTicks:d,totalColorTicks:h,totalTicksRight:p,colorScheme:f,focusedItemData:m,collapsedMap:g}=e,v=function(e,t,n){const[r,i]=(0,w.useState)();return(0,w.useEffect)((()=>{if(!n||!e.current)return;const r=e.current.getContext("2d"),a=T*n;e.current.width=Math.round(t*window.devicePixelRatio),e.current.height=Math.round(a),e.current.style.width=`${t}px`,e.current.style.height=a/window.devicePixelRatio+"px",r.textBaseline="middle",r.font=12*window.devicePixelRatio+"px monospace",r.strokeStyle="white",i(r)}),[e,i,t,n]),r}(t,o,i),y=(0,O.useTheme2)(),b=(0,w.useMemo)((()=>{const e=Q(y.colors.background.secondary);return y.isLight?e.darken(10).toHexString():e.lighten(10).toHexString()}),[y]),S=function(e,t,n,r,i,a,o,s,l){return(0,w.useCallback)((function(u,c,d){if(d&&!s)return i;const h=void 0===u.valueRight||n!==Ae.Default&&n!==Ae.DiffColorBlind?n===Ce.ValueBased?Ne(u.value,e,a,o):je(c,r):function(e,t,n,r,i){const a=i===Ae.Default?Le:Fe,o=(0,De.scaleLinear)().domain([-100,0,100]).range(a),s=e-t,l=n-r;if(0===r||0===l)return Q(o(0));const u=Math.round(1e4*s/l)/100;return Q(o((Math.round(1e4*t/r)/100-u)/u*100))}(u.value,u.valueRight,e,t,n);return s?s.has(c)?h.toHslString():i:u.level>l-1?h.toHslString():h.lighten(15).toHslString()}),[e,t,n,r,a,o,s,l,i])}(h,p,f,y,b,s,l,u,m?m.item.level:0),x=function(e,t,n,r,i){return(0,w.useMemo)((()=>{if(!e)return()=>{};return(a,o,s,l,u,c)=>{e.beginPath(),e.rect(o+D,s,l,u),e.fillStyle=n(a,c,!1),e.stroke(),e.fill();const d=i.get(a);let h=c;if(d&&d.collapsed){h=`(${d.items.length}) `+c}l>=A&&(d?(ze(e,t,h,a,l,"left"===r?o+N+j:o,s,r),function(e,t,n,r,i,a){const o=t+N;e.beginPath(),e.rect(t,n,o-t+I+P,r),e.fill(),e.beginPath(),a.collapsed?e.rect(o,n+r/4,I,r/2):a.items[0]===i?e.rect(o,n+r/2,I,r/2):a.items[a.items.length-1]===i?e.rect(o,n,I,r/2):e.rect(o,n,I,r);e.fillStyle="#666",e.fill()}(e,o,s,u,a,d)):ze(e,t,h,a,l,o,s,r))}}),[e,n,r,t,i])}(v,n,S,c,g);(0,w.useEffect)((()=>{if(!v)return;v.clearRect(0,0,v.canvas.width,v.canvas.height);const e=new Path2D;!function(e,t,n,r,i,a,o,s,l){const u=[];u.push({item:e,levelOffset:0});const c=o*window.devicePixelRatio/r/(a-i);let d;for(;u.length>0;){const{item:e,levelOffset:a}=u.shift();let o=e.value;const h=o*c<=k,p=o*c-(h?0:2*D),f=T;if(p<C)continue;let m=0,g=!1;const v=s.get(e),y=v&&v.collapsed;if(y&&d===v.items[0]?(m="children"===t?-1:1,g=!0):d=void 0,!g){y&&(d=e),l(e,Ue(e.start,r,i,c),(e.level+a)*T,p,f,n.getLabel(e.itemIndexes[0]),h)}const b="children"===t?e.children:e.parents;b&&u.unshift(...b.map((e=>({item:e,levelOffset:a+m}))))}}(r,a,n,d,s,l,o,g,((t,n,r,i,a,o,s)=>{s?e.rect(n,r,i,a):x(t,n,r,i,a,o)})),v.fillStyle=b,v.fill(e)}),[v,n,r,o,s,l,d,a,x,g,b])}function ze(e,t,n,r,i,a,o,s){e.save(),e.clip(),e.fillStyle="#222";const l=t.valueDisplayProcessor(r.value),u=l.suffix?l.text+l.suffix:l.text,c=e.measureText(n),d=i-R;let h=`${n} (${u})`,p=Math.max(a,0)+R;c.width>d&&(e.textAlign=s,"right"===s&&(h=n,p=a+i-R)),e.fillText(h,p,o+T/2+2),e.restore()}function Ue(e,t,n,r){return(e-t*n)*r}const qe=({data:e,rangeMin:t,rangeMax:n,matchedLabels:i,setRangeMin:a,setRangeMax:o,onItemFocused:s,focusedItemData:l,textAlign:u,onSandwich:c,colorScheme:d,totalProfileTicks:h,totalProfileTicksRight:p,totalViewTicks:f,root:m,direction:g,depth:v,showFlameGraphOnly:y,collapsedMap:b,setCollapsedMap:S,collapsing:x,getExtraContextMenuButtons:E,selectedView:O,search:T})=>{const k=He(),[C,{width:A}]=_(),D=(0,w.useRef)(null),[R,I]=(0,w.useState)(),[P,N]=(0,w.useState)();Be({canvasRef:D,colorScheme:d,data:e,focusedItemData:l,root:m,direction:g,depth:v,rangeMax:n,rangeMin:t,matchedLabels:i,textAlign:u,totalViewTicks:f,totalColorTicks:e.isDiffFlamegraph()?h:f,totalTicksRight:p,wrapperWidth:A,collapsedMap:b});const j=(0,w.useCallback)((r=>{I(void 0);const i=D.current.clientWidth/f/(n-t),a=Ge({x:r.nativeEvent.offsetX,y:r.nativeEvent.offsetY},m,g,v,i,f,t,b);N(a?{posY:r.clientY,posX:r.clientX,item:a,label:e.getLabel(a.itemIndexes[0])}:void 0)}),[e,t,n,f,m,g,v,b]),[L,F]=(0,w.useState)(),$=(0,w.useCallback)((e=>{if(void 0===P){I(void 0),F(void 0);const r=D.current.clientWidth/f/(n-t),i=Ge({x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY},m,g,v,r,f,t,b);i&&(F({x:e.clientX,y:e.clientY}),I(i))}}),[t,n,f,P,F,m,g,v,b]),B=(0,w.useCallback)((()=>{I(void 0)}),[]);return(0,w.useEffect)((()=>{const e=e=>{var t;e.target instanceof HTMLElement&&"flameGraphCanvasContainer_clickOutsideCheck"!==(null==(t=e.target.parentElement)?void 0:t.id)&&N(void 0)};return window.addEventListener("click",e),()=>window.removeEventListener("click",e)}),[N]),(0,r.jsxs)("div",{className:k.graph,children:[(0,r.jsx)("div",{className:k.canvasWrapper,id:"flameGraphCanvasContainer_clickOutsideCheck",ref:C,children:(0,r.jsx)("canvas",{ref:D,"data-testid":"flameGraph",onClick:j,onMouseMove:$,onMouseLeave:B})}),(0,r.jsx)(V,{position:L,item:R,data:e,totalTicks:f,collapseConfig:R?b.get(R):void 0}),!y&&P&&(0,r.jsx)(M,{data:e,itemData:P,collapsing:x,collapseConfig:b.get(P.item),onMenuItemClick:()=>{N(void 0)},onItemFocus:()=>{a(P.item.start/f),o((P.item.start+P.item.value)/f),s(P)},onSandwich:()=>{c(e.getLabel(P.item.itemIndexes[0]))},onExpandGroup:()=>{S(b.setCollapsedStatus(P.item,!1))},onCollapseGroup:()=>{S(b.setCollapsedStatus(P.item,!0))},onExpandAllGroups:()=>{S(b.setAllCollapsedStatus(!1))},onCollapseAllGroups:()=>{S(b.setAllCollapsedStatus(!0))},allGroupsCollapsed:Array.from(b.values()).every((e=>e.collapsed)),allGroupsExpanded:Array.from(b.values()).every((e=>!e.collapsed)),getExtraContextMenuButtons:E,selectedView:O,search:T})]})},He=()=>({graph:(0,i.css)({label:"graph",overflow:"auto",flexGrow:1,flexBasis:"50%"}),canvasContainer:(0,i.css)({label:"canvasContainer",display:"flex"}),canvasWrapper:(0,i.css)({label:"canvasWrapper",cursor:"pointer",flex:1,overflow:"hidden"}),sandwichMarker:(0,i.css)({label:"sandwichMarker",writingMode:"vertical-lr",transform:"rotate(180deg)",overflow:"hidden",whiteSpace:"nowrap"}),sandwichMarkerIcon:(0,i.css)({label:"sandwichMarkerIcon",verticalAlign:"baseline"})}),Ge=(e,t,n,r,i,a,o,s)=>{let l=t,u="children"===n?0:r-1;const c=Math.floor(e.y/(T/window.devicePixelRatio));let d;for(;l;){const t=l;if(l=void 0,u===c){d=t;break}const r="children"===n?t.children:t.parents||[];for(const t of r){const r=Ue(t.start,a,o,i),c=Ue(t.start+t.value,a,o,i);if(r<=e.x&&e.x<c){l=t;const e=s.get(t);e&&e.collapsed&&e.items[0]!==t||(u+="children"===n?1:-1);break}}}return d},We=(0,w.memo)((({data:e,focusedItem:t,totalTicks:n,sandwichedLabel:i,onFocusPillClick:a,onSandwichPillClick:o})=>{const s=(0,O.useStyles2)(Qe),l=[],u=(0,F.getValueFormat)("short")(n),c=e.valueDisplayProcessor(n);let d=c.text+c.suffix;const h=e.getUnitTitle();if("Count"===h&&(c.suffix||(d=c.text)),l.push((0,r.jsxs)("div",{className:s.metadataPill,children:[d," | ",u.text,u.suffix," samples (",h,")"]},"default")),i&&l.push((0,r.jsx)(O.Tooltip,{content:i,placement:"top",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(O.Icon,{size:"sm",name:"angle-right"}),(0,r.jsxs)("div",{className:s.metadataPill,children:[(0,r.jsx)(O.Icon,{size:"sm",name:"gf-show-context"})," ",(0,r.jsx)("span",{className:s.metadataPillName,children:i.substring(i.lastIndexOf("/")+1)}),(0,r.jsx)(O.IconButton,{className:s.pillCloseButton,name:"times",size:"sm",onClick:o,tooltip:"Remove sandwich view","aria-label":"Remove sandwich view"})]})]})},"sandwich")),t){const e=n>0?Math.round(t.item.value/n*1e4)/100:0,i=e>0?"eye":"exclamation-circle";l.push((0,r.jsx)(O.Tooltip,{content:t.label,placement:"top",children:(0,r.jsxs)("div",{children:[(0,r.jsx)(O.Icon,{size:"sm",name:"angle-right"}),(0,r.jsxs)("div",{className:s.metadataPill,children:[(0,r.jsx)(O.Icon,{size:"sm",name:i})," ",e,"% of total",(0,r.jsx)(O.IconButton,{className:s.pillCloseButton,name:"times",size:"sm",onClick:a,tooltip:"Remove focus","aria-label":"Remove focus"})]})]})},"focus"))}return(0,r.jsx)("div",{className:s.metadata,children:l})}));We.displayName="FlameGraphMetadata";const Qe=e=>({metadataPill:(0,i.css)({label:"metadataPill",display:"inline-flex",alignItems:"center",background:e.colors.background.secondary,borderRadius:e.shape.borderRadius(8),padding:e.spacing(.5,1),fontSize:e.typography.bodySmall.fontSize,fontWeight:e.typography.fontWeightMedium,lineHeight:e.typography.bodySmall.lineHeight,color:e.colors.text.secondary}),pillCloseButton:(0,i.css)({label:"pillCloseButton",verticalAlign:"text-bottom",margin:e.spacing(0,.5)}),metadata:(0,i.css)({display:"flex",alignItems:"center",justifyContent:"center",margin:"8px 0"}),metadataPillName:(0,i.css)({label:"metadataPillName",maxWidth:"200px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginLeft:e.spacing(.5)})}),Ke=({data:e,rangeMin:t,rangeMax:n,matchedLabels:a,setRangeMin:o,setRangeMax:s,onItemFocused:l,focusedItemData:u,textAlign:c,onSandwich:d,sandwichItem:h,onFocusPillClick:p,onSandwichPillClick:f,colorScheme:m,showFlameGraphOnly:g,getExtraContextMenuButtons:v,collapsing:y,selectedView:b,search:S,collapsedMap:x,setCollapsedMap:E})=>{const _=Xe(),[T,k]=(0,w.useState)(),[C,A]=(0,w.useState)(),[D,R]=(0,w.useState)(0),[I,P]=(0,w.useState)(),[N,j]=(0,w.useState)(0);if((0,w.useEffect)((()=>{var t,n,r;if(e){let i,a=e.getLevels(),o=a.length?a[0][0].value:0,s=a.length?a[0][0].valueRight:void 0,l=o;if(h){const[o,s]=e.getSandwichLevels(h);a=s,i=o,l=null!=(r=null==(n=null==(t=s[0])?void 0:t[0])?void 0:n.value)?r:0}k(a),A(i),R(o),P(s),j(l)}}),[e,h]),!T)return null;const L={data:e,rangeMin:t,rangeMax:n,matchedLabels:a,setRangeMin:o,setRangeMax:s,onItemFocused:l,focusedItemData:u,textAlign:c,onSandwich:d,colorScheme:m,totalProfileTicks:D,totalProfileTicksRight:I,totalViewTicks:N,showFlameGraphOnly:g,collapsedMap:x,setCollapsedMap:E,getExtraContextMenuButtons:v,collapsing:y,search:S,selectedView:b};let M=null;return(null==C?void 0:C.length)?M=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:_.sandwichCanvasWrapper,children:[(0,r.jsxs)("div",{className:_.sandwichMarker,children:["Callers",(0,r.jsx)(O.Icon,{className:_.sandwichMarkerIcon,name:"arrow-down"})]}),(0,r.jsx)(qe,{...L,root:C[C.length-1][0],depth:C.length,direction:"parents",collapsing:!1})]}),(0,r.jsxs)("div",{className:_.sandwichCanvasWrapper,children:[(0,r.jsxs)("div",{className:(0,i.cx)(_.sandwichMarker,_.sandwichMarkerCalees),children:[(0,r.jsx)(O.Icon,{className:_.sandwichMarkerIcon,name:"arrow-up"}),"Callees"]}),(0,r.jsx)(qe,{...L,root:T[0][0],depth:T.length,direction:"children",collapsing:!1})]})]}):(null==T?void 0:T.length)&&(M=(0,r.jsx)(qe,{...L,root:T[0][0],depth:T.length,direction:"children"})),(0,r.jsxs)("div",{className:_.graph,children:[(0,r.jsx)(We,{data:e,focusedItem:u,sandwichedLabel:h,totalTicks:N,onFocusPillClick:p,onSandwichPillClick:f}),M]})},Xe=()=>({graph:(0,i.css)({label:"graph",overflow:"auto",flexGrow:1,flexBasis:"50%"}),sandwichCanvasWrapper:(0,i.css)({label:"sandwichCanvasWrapper",display:"flex",marginBottom:T/window.devicePixelRatio+"px"}),sandwichMarker:(0,i.css)({label:"sandwichMarker",writingMode:"vertical-lr",transform:"rotate(180deg)",overflow:"hidden",whiteSpace:"nowrap"}),sandwichMarkerCalees:(0,i.css)({label:"sandwichMarkerCalees",textAlign:"right"}),sandwichMarkerIcon:(0,i.css)({label:"sandwichMarkerIcon",verticalAlign:"baseline"})});var Ye=n(3241);function Je(e,t,n="children"){var r;const i="parents"===n?"children":"parents",a=[],o=[{previous:void 0,items:e,level:0}];for(;o.length;){const e=o.shift(),s=e.items.flatMap((e=>e.itemIndexes)),l={value:e.items.reduce(((e,t)=>e+t.value),0),itemIndexes:s,children:[],parents:[],start:0,level:e.level};if(a[e.level]=a[e.level]||[],a[e.level].push(l),e.previous){l[i]=[e.previous];const t=(null==(r=e.previous[n])?void 0:r.reduce(((e,t)=>e+t.value),0))||0;l.start=e.previous.start+t,e.previous[n].push(l)}const u=e.items.flatMap((e=>e[n]||[])),c=(0,Ye.groupBy)(u,(e=>t.getLabel(e.itemIndexes[0])));for(const t of Object.values(c))o.push({previous:l,items:t,level:e.level+1})}return"parents"===n&&(a.reverse(),a.forEach(((e,t)=>{e.forEach((e=>{e.level=t}))}))),a}class Ze{constructor(e){this.map=new Map,this.map=e||new Map}get(e){return this.map.get(e)}keys(){return this.map.keys()}values(){return this.map.values()}size(){return this.map.size}setCollapsedStatus(e,t){const n=new Map(this.map),r=this.map.get(e),i={...r,collapsed:t};for(const e of r.items)n.set(e,i);return new Ze(n)}setAllCollapsedStatus(e){const t=new Map(this.map);for(const n of this.map.keys()){const r={...this.map.get(n),collapsed:e};t.set(n,r)}return new Ze(t)}}class et{constructor(e){this.map=new Map,this.threshold=.99,void 0!==e&&(this.threshold=e)}addTree(e){var t;const n=[e];for(;n.length;){const e=n.shift();(null==(t=e.parents)?void 0:t.length)&&this.addItem(e,e.parents[0]),e.children.length&&n.unshift(...e.children)}}addItem(e,t){if(t&&e.value>t.value*this.threshold&&1===t.children.length)if(this.map.has(t)){const n=this.map.get(t);this.map.set(e,n),n.items.push(e)}else{const n={items:[t,e],collapsed:!0};this.map.set(t,n),this.map.set(e,n)}}getCollapsedMap(){return new Ze(this.map)}}class tt{constructor(e,t,n=(0,F.createTheme)()){var r,i,a;this.data=e,this.options=t;const o=function(e){const t=[["label",[F.FieldType.string,F.FieldType.enum]],["level",[F.FieldType.number]],["value",[F.FieldType.number]],["self",[F.FieldType.number]]],n=[],r=[];for(const i of t){const[t,a]=i,o=null==e?void 0:e.fields.find((e=>e.name===t));o?a.includes(o.type)||r.push({name:t,expectedTypes:a,type:o.type}):n.push(t)}if(n.length>0||r.length>0)return{wrongTypeFields:r,missingFields:n}}(e);if(o)throw new Error(function(e){return e.missingFields.length?`Data is missing fields: ${e.missingFields.join(", ")}`:e.wrongTypeFields.length?`Data has fields of wrong type: ${e.wrongTypeFields.map((e=>`${e.name} has type ${e.type} but should be ${e.expectedTypes.join(" or ")}`)).join(", ")}`:""}(o));if(this.labelField=e.fields.find((e=>"label"===e.name)),this.levelField=e.fields.find((e=>"level"===e.name)),this.valueField=e.fields.find((e=>"value"===e.name)),this.selfField=e.fields.find((e=>"self"===e.name)),this.valueRightField=e.fields.find((e=>"valueRight"===e.name)),this.selfRightField=e.fields.find((e=>"selfRight"===e.name)),(this.valueField||this.selfField)&&(!this.valueField||!this.selfField))throw new Error("Malformed dataFrame: both valueRight and selfRight has to be present if one of them is present.");const s=null==(a=null==(i=null==(r=this.labelField)?void 0:r.config)?void 0:i.type)?void 0:a.enum;s?(this.labelDisplayProcessor=(0,F.getDisplayProcessor)({field:this.labelField,theme:n}),this.uniqueLabels=s.text||[]):(this.labelDisplayProcessor=e=>({text:e+"",numeric:0}),this.uniqueLabels=[...new Set(this.labelField.values)]),this.valueDisplayProcessor=(0,F.getDisplayProcessor)({field:this.valueField,theme:n})}isDiffFlamegraph(){return Boolean(this.valueRightField&&this.selfRightField)}getLabel(e){return this.labelDisplayProcessor(this.labelField.values[e]).text}getLevel(e){return this.levelField.values[e]}getValue(e){return nt(this.valueField,e)}getValueRight(e){return nt(this.valueRightField,e)}getSelf(e){return nt(this.selfField,e)}getSelfRight(e){return nt(this.selfRightField,e)}getSelfDisplay(e){return this.valueDisplayProcessor(this.getSelf(e))}getUniqueLabels(){return this.uniqueLabels}getUnitTitle(){switch(this.valueField.config.unit){case Te.Bytes:return"RAM";case Te.Nanoseconds:return"Time"}return"Count"}getLevels(){return this.initLevels(),this.levels}getSandwichLevels(e){const t=this.getNodesWithLabel(e);if(!(null==t?void 0:t.length))return[[],[]];var n;return[(n=this,Je(function(e){return e.map((e=>{var t,n;if(!(null==(t=e.parents)?void 0:t.length))return e;const r={...e,children:[]},i=[{child:r,parent:e.parents[0]}];for(;i.length;){const e=i.shift(),t={...e.parent,children:e.child?[e.child]:[],parents:[]};e.child&&(t.value=e.child.value,e.child.parents=[t]),(null==(n=e.parent.parents)?void 0:n.length)&&i.push({child:t,parent:e.parent.parents[0]})}return r}))}(t),n,"parents")),Je(t,this)]}getNodesWithLabel(e){return this.initLevels(),this.uniqueLabelsMap[e]}getCollapsedMap(){return this.initLevels(),this.collapsedMap}initLevels(){if(!this.levels){const[e,t,n]=function(e,t){const n=[];let r,i=0;const a=Object.create(null);for(let t=0;t<e.data.length;t++){const o=e.getLevel(t),s=t>0?e.getLevel(t-1):void 0;if(n[o]=n[o]||[],s&&s>=o){const t=n[o][n[o].length-1];i=t.start+e.getValue(t.itemIndexes[0])+e.getValueRight(t.itemIndexes[0]),r=t.parents[0]}const l={itemIndexes:[t],value:e.getValue(t)+e.getValueRight(t),valueRight:e.isDiffFlamegraph()?e.getValueRight(t):void 0,start:i,parents:r&&[r],children:[],level:o};a[e.getLabel(t)]?a[e.getLabel(t)].push(l):a[e.getLabel(t)]=[l],r&&r.children.push(l),r=l,n[o].push(l)}const o=new et(null==t?void 0:t.collapsingThreshold);return(null==t?void 0:t.collapsing)&&o.addTree(n[0][0]),[n,a,o.getCollapsedMap()]}(this,this.options);this.levels=e,this.uniqueLabelsMap=t,this.collapsedMap=n}}}function nt(e,t){if(!e)return 0;return("number"==typeof t?[t]:t).reduce(((t,n)=>t+e.values[n]),0)}function rt(e,t,n){void 0===t&&(t=0),void 0===n&&(n=[]);var r=function(e,t){void 0===t&&(t=0);var n=(0,w.useRef)(!1),r=(0,w.useRef)(),i=(0,w.useRef)(e),a=(0,w.useCallback)((function(){return n.current}),[]),o=(0,w.useCallback)((function(){n.current=!1,r.current&&clearTimeout(r.current),r.current=setTimeout((function(){n.current=!0,i.current()}),t)}),[t]),s=(0,w.useCallback)((function(){n.current=null,r.current&&clearTimeout(r.current)}),[]);return(0,w.useEffect)((function(){i.current=e}),[e]),(0,w.useEffect)((function(){return o(),s}),[t]),[a,s,o]}(e,t),i=r[0],a=r[1],o=r[2];return(0,w.useEffect)(o,n),[i,a]}var it=n(219);const at=({search:e,setSearch:t,selectedView:n,setSelectedView:a,containerWidth:o,onReset:s,textAlign:l,onTextAlignChange:u,showResetButton:c,colorScheme:d,onColorSchemeChange:h,stickyHeader:p,extraHeaderElements:f,vertical:m,isDiffMode:g,setCollapsedMap:v,collapsedMap:y,assistantContext:b})=>{const S=(0,O.useStyles2)(ut),[x,E]=function(e,t){const[n,r]=(0,w.useState)(e),i=(a=e,o=(0,w.useRef)(),(0,w.useEffect)((function(){o.current=a})),o.current);var a,o;return rt((()=>{t(n)}),250,[n]),(0,w.useEffect)((()=>{i!==e&&e!==n&&r(e)}),[e,i,n]),[n,r]}(e,t),_=""!==x?(0,r.jsx)(O.Button,{icon:"times",fill:"text",size:"sm",onClick:()=>{t(""),E("")},children:"Clear"}):null;return(0,r.jsxs)("div",{className:(0,i.cx)(S.header,{[S.stickyHeader]:p}),children:[(0,r.jsx)("div",{className:S.inputContainer,children:(0,r.jsx)(O.Input,{value:x||"",onChange:e=>{E(e.currentTarget.value)},placeholder:"Search...",suffix:_})}),(0,r.jsxs)("div",{className:S.rightContainer,children:[!!(null==b?void 0:b.length)&&(0,r.jsx)("div",{className:S.buttonSpacing,children:(0,r.jsx)(it.OpenAssistantButton,{origin:"grafana/flame-graph",prompt:"Analyze Flame Graph",context:b})}),c&&(0,r.jsx)(O.Button,{variant:"secondary",fill:"outline",size:"sm",icon:"history-alt",tooltip:"Reset focus and sandwich state",onClick:()=>{s()},className:S.buttonSpacing,"aria-label":"Reset focus and sandwich state"}),(0,r.jsx)(ot,{value:d,onChange:h,isDiffMode:g}),(0,r.jsxs)(O.ButtonGroup,{className:S.buttonSpacing,children:[(0,r.jsx)(O.Button,{variant:"secondary",fill:"outline",size:"sm",tooltip:"Expand all groups",onClick:()=>{v(y.setAllCollapsedStatus(!1))},"aria-label":"Expand all groups",icon:"angle-double-down",disabled:n===ke.TopTable}),(0,r.jsx)(O.Button,{variant:"secondary",fill:"outline",size:"sm",tooltip:"Collapse all groups",onClick:()=>{v(y.setAllCollapsedStatus(!0))},"aria-label":"Collapse all groups",icon:"angle-double-up",disabled:n===ke.TopTable})]}),(0,r.jsx)(O.RadioButtonGroup,{size:"sm",disabled:n===ke.TopTable,options:st,value:l,onChange:u,className:S.buttonSpacing}),(0,r.jsx)(O.RadioButtonGroup,{size:"sm",options:lt(o,m),value:n,onChange:a}),f&&(0,r.jsx)("div",{className:S.extraElements,children:f})]})]})};function ot(e){const t=(0,O.useStyles2)(ut);let n=(0,r.jsxs)(O.Menu,{children:[(0,r.jsx)(O.Menu.Item,{label:"By package name",onClick:()=>e.onChange(Ce.PackageBased)}),(0,r.jsx)(O.Menu.Item,{label:"By value",onClick:()=>e.onChange(Ce.ValueBased)})]});const a={[Ce.ValueBased]:t.colorDotByValue,[Ce.PackageBased]:t.colorDotByPackage,[Ae.DiffColorBlind]:t.colorDotDiffColorBlind,[Ae.Default]:t.colorDotDiffDefault}[e.value]||t.colorDotByValue;let o=(0,r.jsx)("span",{className:(0,i.cx)(t.colorDot,a)});return e.isDiffMode&&(n=(0,r.jsxs)(O.Menu,{children:[(0,r.jsx)(O.Menu.Item,{label:"Default (green to red)",onClick:()=>e.onChange(Ae.Default)}),(0,r.jsx)(O.Menu.Item,{label:"Color blind (blue to red)",onClick:()=>e.onChange(Ae.DiffColorBlind)})]}),o=(0,r.jsxs)("div",{className:(0,i.cx)(t.colorDotDiff,a),children:[(0,r.jsx)("div",{children:"-100% (removed)"}),(0,r.jsx)("div",{children:"0%"}),(0,r.jsx)("div",{children:"+100% (added)"})]})),(0,r.jsx)(O.Dropdown,{overlay:n,children:(0,r.jsx)(O.Button,{variant:"secondary",fill:"outline",size:"sm",tooltip:"Change color scheme",onClick:()=>{},className:t.buttonSpacing,"aria-label":"Change color scheme",children:o})})}const st=[{value:"left",description:"Align text left",icon:"align-left"},{value:"right",description:"Align text right",icon:"align-right"}];function lt(e,t){let n=[{value:ke.TopTable,label:"Top Table",description:"Only show top table"},{value:ke.FlameGraph,label:"Flame Graph",description:"Only show flame graph"}];return(e>=800||t)&&n.push({value:ke.Both,label:"Both",description:"Show both the top table and flame graph"}),n}const ut=e=>({header:(0,i.css)({label:"header",display:"flex",flexWrap:"wrap",justifyContent:"space-between",width:"100%",top:0,gap:e.spacing(1),marginTop:e.spacing(1)}),stickyHeader:(0,i.css)({zIndex:e.zIndex.navbarFixed,position:"sticky",background:e.colors.background.primary}),inputContainer:(0,i.css)({label:"inputContainer",flexGrow:1,minWidth:"150px",maxWidth:"350px"}),rightContainer:(0,i.css)({label:"rightContainer",display:"flex",alignItems:"flex-start",flexWrap:"wrap"}),buttonSpacing:(0,i.css)({label:"buttonSpacing",marginRight:e.spacing(1)}),resetButton:(0,i.css)({label:"resetButton",display:"flex",marginRight:e.spacing(2)}),resetButtonIconWrapper:(0,i.css)({label:"resetButtonIcon",padding:"0 5px",color:e.colors.text.disabled}),colorDot:(0,i.css)({label:"colorDot",display:"inline-block",width:"10px",height:"10px",borderRadius:e.shape.radius.circle}),colorDotDiff:(0,i.css)({label:"colorDotDiff",display:"flex",width:"200px",height:"12px",color:"white",fontSize:9,lineHeight:1.3,fontWeight:300,justifyContent:"space-between",padding:"0 2px",borderRadius:"2px"}),colorDotByValue:(0,i.css)({label:"colorDotByValue",background:Ie}),colorDotByPackage:(0,i.css)({label:"colorDotByPackage",background:Pe}),colorDotDiffDefault:(0,i.css)({label:"colorDotDiffDefault",background:Me}),colorDotDiffColorBlind:(0,i.css)({label:"colorDotDiffColorBlind",background:Ve}),extraElements:(0,i.css)({label:"extraElements",marginLeft:e.spacing(1)})});let ct;ct="undefined"!=typeof window?window:"undefined"!=typeof self?self:n.g;let dt=null,ht=null;const pt=ct.clearTimeout,ft=ct.setTimeout,mt=ct.cancelAnimationFrame||ct.mozCancelAnimationFrame||ct.webkitCancelAnimationFrame,gt=ct.requestAnimationFrame||ct.mozRequestAnimationFrame||ct.webkitRequestAnimationFrame;function vt(e){let t,n,r,i,a,o,s;const l="undefined"!=typeof document&&document.attachEvent;if(!l){o=function(e){const t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},a=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)return;const t=this;o(this),this.__resizeRAF__&&dt(this.__resizeRAF__),this.__resizeRAF__=ht((function(){a(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))};let e=!1,l="";r="animationstart";const u="Webkit Moz O ms".split(" ");let c="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),d="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let n=0;n<u.length;n++)if(void 0!==t.style[u[n]+"AnimationName"]){d=u[n],l="-"+d.toLowerCase()+"-",r=c[n],e=!0;break}}n="resizeanim",t="@"+l+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",i=l+"animation: 1ms "+n+"; "}return{addResizeListener:function(a,u){if(l)a.attachEvent("onresize",u);else{if(!a.__resizeTriggers__){const l=a.ownerDocument,u=ct.getComputedStyle(a);u&&"static"===u.position&&(a.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){const r=(t||"")+".resize-triggers { "+(i||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',a=n.head||n.getElementsByTagName("head")[0],o=n.createElement("style");o.id="detectElementResize",o.type="text/css",null!=e&&o.setAttribute("nonce",e),o.styleSheet?o.styleSheet.cssText=r:o.appendChild(n.createTextNode(r)),a.appendChild(o)}}(l),a.__resizeLast__={},a.__resizeListeners__=[],(a.__resizeTriggers__=l.createElement("div")).className="resize-triggers";const c=l.createElement("div");c.className="expand-trigger",c.appendChild(l.createElement("div"));const d=l.createElement("div");d.className="contract-trigger",a.__resizeTriggers__.appendChild(c),a.__resizeTriggers__.appendChild(d),a.appendChild(a.__resizeTriggers__),o(a),a.addEventListener("scroll",s,!0),r&&(a.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&o(a)},a.__resizeTriggers__.addEventListener(r,a.__resizeTriggers__.__animationListener__))}a.__resizeListeners__.push(u)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}null==mt||null==gt?(dt=pt,ht=function(e){return ft(e,20)}):(dt=function([e,t]){mt(e),pt(t)},ht=function(e){const t=gt((function(){pt(n),e()})),n=ft((function(){mt(t),e()}),20);return[t,n]});class yt extends w.Component{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._didLogDeprecationWarning=!1,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){const r=window.getComputedStyle(this._parentNode)||{},i=parseFloat(r.paddingLeft||"0"),a=parseFloat(r.paddingRight||"0"),o=parseFloat(r.paddingTop||"0"),s=parseFloat(r.paddingBottom||"0"),l=this._parentNode.getBoundingClientRect(),u=l.height-o-s,c=l.width-i-a;if(!e&&this.state.height!==u||!t&&this.state.width!==c){this.setState({height:u,width:c});const e=()=>{this._didLogDeprecationWarning||(this._didLogDeprecationWarning=!0,console.warn("scaledWidth and scaledHeight parameters have been deprecated; use width and height instead"))};"function"==typeof n&&n({height:u,width:c,get scaledHeight(){return e(),u},get scaledWidth(){return e(),c}})}}},this._setRef=e=>{this._autoSizer=e}}componentDidMount(){const{nonce:e}=this.props,t=this._autoSizer?this._autoSizer.parentNode:null;if(null!=t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){this._parentNode=t;const n=t.ownerDocument.defaultView.ResizeObserver;null!=n?(this._resizeObserver=new n((()=>{this._timeoutId=setTimeout(this._onResize,0)})),this._resizeObserver.observe(t)):(this._detectElementResize=vt(e),this._detectElementResize.addResizeListener(t,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:r=!1,disableWidth:i=!1,doNotBailOutOnEmptyChildren:a=!1,nonce:o,onResize:s,style:l={},tagName:u="div",...c}=this.props,{height:d,width:h}=this.state,p={overflow:"visible"},f={};let m=!1;return r||(0===d&&(m=!0),p.height=0,f.height=d,f.scaledHeight=d),i||(0===h&&(m=!0),p.width=0,f.width=h,f.scaledWidth=h),a&&(m=!1),(0,w.createElement)(u,{ref:this._setRef,style:{...p,...l},...c},!m&&e(f))}}const bt=(0,w.memo)((({data:e,onSymbolClick:t,search:n,matchedLabels:i,onSearch:a,sandwichItem:o,onSandwich:s,onTableSort:l,colorScheme:u})=>{const c=(0,w.useMemo)((()=>function(e,t){let n=Object.create(null);const r=[];for(let i=0;i<e.data.length;i++){const a=e.getValue(i),o=e.getValueRight(i),s=e.getSelf(i),l=e.getLabel(i),u=e.getLevel(i);for(;r.length>u;)r.pop();const c=r.some((e=>e===l));t&&!t.has(l)||(n[l]=n[l]||{},n[l].self=n[l].self?n[l].self+s:s,c||(n[l].total=n[l].total?n[l].total+a:a,n[l].totalRight=n[l].totalRight?n[l].totalRight+o:o)),r.push(l)}return n}(e,i)),[e,i]),d=(0,O.useStyles2)(Et),h=(0,O.useTheme2)(),[p,f]=(0,w.useState)([{displayName:"Self",desc:!0}]);return(0,r.jsx)("div",{className:d.topTableContainer,"data-testid":"topTable",children:(0,r.jsx)(yt,{style:{width:"100%"},children:({width:i,height:d})=>{if(i<3||d<3)return null;const m=function(e,t,n,i,a,o,s,l,u,c){const d=function(e,t,n,i){const a={type:O.TableCellDisplayMode.Custom,cellComponent:a=>(0,r.jsx)(xt,{frame:a.frame,onSandwich:e,onSearch:t,search:n,sandwichItem:i,rowIndex:a.rowIndex})},o={filterable:!1,width:St,hideHeader:!0,inspect:!1,align:"auto",cellOptions:a};return{type:F.FieldType.number,name:"actions",values:[],config:{custom:o}}}(o,a,u,c),h={type:F.FieldType.string,name:"Symbol",values:[],config:{custom:{width:n-St-2*L},links:[{title:"Highlight symbol",url:"",onClick:e=>{const t=e.origin.field.values[e.origin.rowIndex];i(t)}}]}};let p;if(e.isDiffFlamegraph()){h.config.custom.width=n-St-3*L;const r=wt("Baseline","percent"),i=wt("Comparison","percent"),a=wt("Diff","percent");a.config.custom.cellOptions.type=O.TableCellDisplayMode.ColorText;const[o,s]=l===Ae.DiffColorBlind?[Fe[0],Fe[2]]:[Le[0],Le[2]];a.config.mappings=[{type:F.MappingType.ValueToText,options:{[1/0]:{text:"new",color:s}}},{type:F.MappingType.ValueToText,options:{[-100]:{text:"removed",color:o}}},{type:F.MappingType.RangeToText,options:{from:0,to:1/0,result:{color:s}}},{type:F.MappingType.RangeToText,options:{from:-1/0,to:0,result:{color:o}}}];const u=e.getLevels(),c=u.length?u[0][0].value:0,f=u.length?u[0][0].valueRight:void 0;for(let e in t){d.values.push(null),h.values.push(e);const n=t[e].total,o=t[e].totalRight,s=c-f,l=Math.round(1e4*n/s)/100,u=Math.round(1e4*o/f)/100,p=(u-l)/l*100;a.values.push(p),r.values.push(l),i.values.push(u)}p={fields:[d,h,r,i,a],length:h.values.length}}else{const n=wt("Self",e.selfField.config.unit),r=wt("Total",e.valueField.config.unit);for(let e in t)d.values.push(null),h.values.push(e),n.values.push(t[e].self),r.values.push(t[e].total);p={fields:[d,h,n,r],length:h.values.length}}const f=(0,F.applyFieldOverrides)({data:[p],fieldConfig:{defaults:{},overrides:[]},replaceVariables:e=>e,theme:s});return f[0]}(e,c,i,t,a,s,h,u,n,o);return(0,r.jsx)(O.Table,{initialSortBy:p,onSortByChange:e=>{e&&e.length&&(null==l||l(e[0].displayName+"_"+(e[0].desc?"desc":"asc"))),f(e)},data:m,width:i,height:d})}})})}));function wt(e,t){const n={width:L,align:"auto",inspect:!1,cellOptions:{type:O.TableCellDisplayMode.Auto}};return{type:F.FieldType.number,name:e,values:[],config:{unit:t,custom:n}}}bt.displayName="FlameGraphTopTableContainer";const St=61;function xt(e){var t;const n=_t(),i=null==(t=e.frame.fields.find((e=>"Symbol"===e.name)))?void 0:t.values[e.rowIndex],a=e.search===i,o=e.sandwichItem===i;return(0,r.jsxs)("div",{className:n.actionCellWrapper,children:[(0,r.jsx)(O.IconButton,{className:n.actionCellButton,name:"search",variant:a?"primary":"secondary",tooltip:a?"Clear from search":"Search for symbol","aria-label":a?"Clear from search":"Search for symbol",onClick:()=>{e.onSearch(a?"":i)}}),(0,r.jsx)(O.IconButton,{className:n.actionCellButton,name:"gf-show-context",tooltip:o?"Remove from sandwich view":"Show in sandwich view",variant:o?"primary":"secondary","aria-label":o?"Remove from sandwich view":"Show in sandwich view",onClick:()=>{e.onSandwich(o?void 0:i)}})]})}const Et=e=>({topTableContainer:(0,i.css)({label:"topTableContainer",padding:e.spacing(1),backgroundColor:e.colors.background.secondary,height:"100%"})}),_t=()=>({actionCellWrapper:(0,i.css)({label:"actionCellWrapper",display:"flex",height:"24px"}),actionCellButton:(0,i.css)({label:"actionCellButton",marginRight:0,width:"24px"})});function Ot(e){var t,n;return(null==(n=null==(t=e.meta)?void 0:t.custom)?void 0:n.assistantContext)||[]}const Tt=new m,kt=({data:e,onTableSymbolClick:t,onViewSelected:n,onTextAlignSelected:a,onTableSort:o,getTheme:s,stickyHeader:l,extraHeaderElements:u,vertical:c,showFlameGraphOnly:d,disableCollapsing:h,keepFocusOnDataChange:p,getExtraContextMenuButtons:f,showAnalyzeWithAssistant:m=!0})=>{const[g,v]=(0,w.useState)(),[y,b]=(0,w.useState)(0),[S,x]=(0,w.useState)(1),[E,T]=(0,w.useState)(""),[k,C]=(0,w.useState)(ke.Both),[A,{width:D}]=_(),[R,I]=(0,w.useState)("left"),[P,N]=(0,w.useState)(),[j,L]=(0,w.useState)(new Ze),M=(0,w.useMemo)((()=>s()),[s]),F=(0,w.useMemo)((()=>{if(!e)return;const t=new tt(e,{collapsing:!h},M);return L(t.getCollapsedMap()),t}),[e,M,h]),[V,$]=function(e){const t=(null==e?void 0:e.isDiffFlamegraph())?Ae.Default:Ce.PackageBased,[n,r]=(0,w.useState)(t);return(0,w.useEffect)((()=>{r(t)}),[t]),[n,r]}(F),B=function(e){return{container:(0,i.css)({label:"container",overflow:"auto",height:"100%",display:"flex",flex:"1 1 0",flexDirection:"column",minHeight:0,gap:e.spacing(1)}),body:(0,i.css)({label:"body",flexGrow:1}),tableContainer:(0,i.css)({height:800}),horizontalContainer:(0,i.css)({label:"horizontalContainer",display:"flex",minHeight:0,flexDirection:"row",columnGap:e.spacing(1),width:"100%"}),horizontalGraphContainer:(0,i.css)({flexBasis:"50%"}),horizontalTableContainer:(0,i.css)({flexBasis:"50%",maxHeight:800}),verticalGraphContainer:(0,i.css)({marginBottom:e.spacing(1)}),verticalTableContainer:(0,i.css)({height:800})}}(M),z=function(e,t){return(0,w.useMemo)((()=>{if(e&&t)return function(e,t){const n=new Set,r=e.split(","),i=(e,t)=>{let r;try{r=new RegExp(t)}catch(e){return!1}let i=!1;for(let t of e)r.test(t)&&(n.add(t),i=!0);return i},a=(e,t)=>{let r=Tt.filter(e,t);if(!r)return!1;let i=!1;for(let t of r)n.add(e[t]),i=!0;return i};for(let e of r){if(!e)continue;i(t.getUniqueLabels(),e)||a(t.getUniqueLabels(),e)}return n}(e,t)}),[e,t])}(E,F);(0,w.useEffect)((()=>{D>0&&D<800&&k===ke.Both&&!c&&C(ke.FlameGraph)}),[k,C,D,c]);const U=(0,w.useCallback)((()=>{v(void 0),b(0),x(1)}),[v,x,b]),q=(0,w.useCallback)((()=>{N(void 0)}),[N]);(0,w.useEffect)((()=>{var e;if(!p)return U(),void q();if(F&&g){const t=null==(e=F.getNodesWithLabel(g.label))?void 0:e[0];if(t){v({...g,item:t});const e=F.getLevels(),n=e.length?e[0][0].value:0;b(t.start/n),x((t.start+t.value)/n)}else v({...g,item:{start:0,value:0,itemIndexes:[],children:[],level:0}}),b(0),x(1)}}),[F,p]);const H=(0,w.useCallback)((e=>{E===e?T(""):(null==t||t(e),T(e),U())}),[T,U,t,E]);if(!F)return null;const G=(0,r.jsx)(Ke,{data:F,rangeMin:y,rangeMax:S,matchedLabels:z,setRangeMin:b,setRangeMax:x,onItemFocused:e=>v(e),focusedItemData:g,textAlign:R,sandwichItem:P,onSandwich:e=>{U(),N(e)},onFocusPillClick:U,onSandwichPillClick:q,colorScheme:V,showFlameGraphOnly:d,collapsing:!h,getExtraContextMenuButtons:f,selectedView:k,search:E,collapsedMap:j,setCollapsedMap:L}),W=(0,r.jsx)(bt,{data:F,onSymbolClick:H,search:E,matchedLabels:z,sandwichItem:P,onSandwich:N,onSearch:T,onTableSort:o,colorScheme:V});let Q;return d||k===ke.FlameGraph?Q=G:k===ke.TopTable?Q=(0,r.jsx)("div",{className:B.tableContainer,children:W}):k===ke.Both&&(Q=c?(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:B.verticalGraphContainer,children:G}),(0,r.jsx)("div",{className:B.verticalTableContainer,children:W})]}):(0,r.jsxs)("div",{className:B.horizontalContainer,children:[(0,r.jsx)("div",{className:B.horizontalTableContainer,children:W}),(0,r.jsx)("div",{className:B.horizontalGraphContainer,children:G})]})),(0,r.jsx)(O.ThemeContext.Provider,{value:M,children:(0,r.jsxs)("div",{ref:A,className:B.container,children:[!d&&(0,r.jsx)(at,{search:E,setSearch:T,selectedView:k,setSelectedView:e=>{C(e),null==n||n(e)},containerWidth:D,onReset:()=>{U(),q()},textAlign:R,onTextAlignChange:e=>{I(e),null==a||a(e)},showResetButton:Boolean(g||P),colorScheme:V,onColorSchemeChange:$,stickyHeader:Boolean(l),extraHeaderElements:u,vertical:c,isDiffMode:F.isDiffFlamegraph(),setCollapsedMap:L,collapsedMap:j,assistantContext:e&&m?Ot(e):void 0}),(0,r.jsx)("div",{className:B.body,children:Q})]})})}},1625:(e,t,n)=>{"use strict";n.d(t,{$l:()=>s,$m:()=>d,L4:()=>r,T6:()=>u,TZ:()=>l,eX:()=>o,ob:()=>c,on:()=>i,xB:()=>a});var r=(e=>(e.Linear="linear",e.Log="log",e.Ordinal="ordinal",e.Symlog="symlog",e))(r||{}),i=(e=>(e.Hue="hue",e.None="none",e.Opacity="opacity",e.Scheme="scheme",e))(i||{});var a=(e=>(e.Ascending="asc",e.Descending="desc",e.None="none",e))(a||{});var o=(e=>(e.Basic="basic",e.Gradient="gradient",e.Lcd="lcd",e))(o||{}),s=(e=>(e.Color="color",e.Hidden="hidden",e.Text="text",e))(s||{}),l=(e=>(e.Auto="auto",e.Hidden="hidden",e.Left="left",e.Top="top",e))(l||{}),u=(e=>(e.Auto="auto",e.Manual="manual",e))(u||{}),c=(e=>(e.Actions="actions",e.Auto="auto",e.BasicGauge="basic",e.ColorBackground="color-background",e.ColorBackgroundSolid="color-background-solid",e.ColorText="color-text",e.Custom="custom",e.DataLinks="data-links",e.Gauge="gauge",e.GradientGauge="gradient-gauge",e.Image="image",e.JSONView="json-view",e.LcdGauge="lcd-gauge",e.Pill="pill",e.Sparkline="sparkline",e))(c||{});var d=(e=>(e.CSV="csv",e.Date="date",e.Distributed="distributed",e.DoubleQuote="doublequote",e.Glob="glob",e.HTML="html",e.JSON="json",e.Join="join",e.Lucene="lucene",e.PercentEncode="percentencode",e.Pipe="pipe",e.QueryParam="queryparam",e.Raw="raw",e.Regex="regex",e.SQLString="sqlstring",e.SingleQuote="singlequote",e.Text="text",e.UriEncode="uriencode",e))(d||{})},5540:(e,t,n)=>{"use strict";n.d(t,{w:()=>i});var r=n(5959);function i(e){const{ref:t,box:n,onResize:i}=e;(0,r.useEffect)((()=>{let e=null==t?void 0:t.current;if(e){if(void 0===window.ResizeObserver)return window.addEventListener("resize",i,!1),()=>{window.removeEventListener("resize",i,!1)};{const t=new window.ResizeObserver((e=>{e.length&&i()}));return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}}}),[i,t,n])}},7528:(e,t,n)=>{"use strict";n.d(t,{m:()=>a});var r=n(7794),i=n(9106),a=new class extends r.Q{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!i.S$&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e((e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()}))}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach((t=>{t(e)}))}isFocused(){return"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}}},9304:(e,t,n)=>{"use strict";n.d(t,{$:()=>s,s:()=>o});var r=n(3403),i=n(8546),a=n(5610),o=class extends i.k{#r;#i;#a;constructor(e){super(),this.mutationId=e.mutationId,this.#i=e.mutationCache,this.#r=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#r.includes(e)||(this.#r.push(e),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#r=this.#r.filter((t=>t!==e)),this.scheduleGc(),this.#i.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#r.length||("pending"===this.state.status?this.scheduleGc():this.#i.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){this.#a=(0,a.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#i.canRun(this)});const t="pending"===this.state.status,n=!this.#a.canStart();try{if(!t){this.#o({type:"pending",variables:e,isPaused:n}),await(this.#i.config.onMutate?.(e,this));const t=await(this.options.onMutate?.(e));t!==this.state.context&&this.#o({type:"pending",context:t,variables:e,isPaused:n})}const r=await this.#a.start();return await(this.#i.config.onSuccess?.(r,e,this.state.context,this)),await(this.options.onSuccess?.(r,e,this.state.context)),await(this.#i.config.onSettled?.(r,null,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(r,null,e,this.state.context)),this.#o({type:"success",data:r}),r}catch(t){try{throw await(this.#i.config.onError?.(t,e,this.state.context,this)),await(this.options.onError?.(t,e,this.state.context)),await(this.#i.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this)),await(this.options.onSettled?.(void 0,t,e,this.state.context)),t}finally{this.#o({type:"error",error:t})}}finally{this.#i.runNext(this)}}#o(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),r.j.batch((()=>{this.#r.forEach((t=>{t.onMutationUpdate(e)})),this.#i.notify({mutation:this,type:"updated",action:e})}))}};function s(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},3403:(e,t,n)=>{"use strict";n.d(t,{j:()=>r});var r=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=e=>setTimeout(e,0);const a=r=>{t?e.push(r):i((()=>{n(r)}))},o=()=>{const t=e;e=[],t.length&&i((()=>{r((()=>{t.forEach((e=>{n(e)}))}))}))};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a((()=>{e(...t)}))},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}()},4841:(e,t,n)=>{"use strict";n.d(t,{t:()=>a});var r=n(7794),i=n(9106),a=new class extends r.Q{#s=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!i.S$&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach((t=>{t(e)})))}isOnline(){return this.#s}}},2015:(e,t,n)=>{"use strict";n.d(t,{X:()=>s,k:()=>l});var r=n(9106),i=n(3403),a=n(5610),o=n(8546),s=class extends o.k{#l;#u;#c;#a;#d;#h;constructor(e){super(),this.#h=!1,this.#d=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#c=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#l=e.state||function(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=this.#l,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){this.options={...this.#d,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#c.remove(this)}setData(e,t){const n=(0,r.pl)(this.state.data,e,this.options);return this.#o({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#o({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(r.lQ).catch(r.lQ):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#l)}isActive(){return this.observers.some((e=>!1!==(0,r.Eh)(e.options.enabled,this)))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some((e=>e.getCurrentResult().isStale)):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!(0,r.j3)(this.state.dataUpdatedAt,e)}onFocus(){const e=this.observers.find((e=>e.shouldFetchOnWindowFocus()));e?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){const e=this.observers.find((e=>e.shouldFetchOnReconnect()));e?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#c.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter((t=>t!==e)),this.observers.length||(this.#a&&(this.#h?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#c.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus)if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find((e=>e.options.queryFn));e&&this.setOptions(e.options)}const n=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#h=!0,n.signal)})},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>{const e=(0,r.ZM)(this.options,t),n={queryKey:this.queryKey,meta:this.meta};return i(n),this.#h=!1,this.options.persister?this.options.persister(e,n,this):e(n)}};i(o),this.options.behavior?.onFetch(o,this),this.#u=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===o.fetchOptions?.meta||this.#o({type:"fetch",meta:o.fetchOptions?.meta});const s=e=>{(0,a.wm)(e)&&e.silent||this.#o({type:"error",error:e}),(0,a.wm)(e)||(this.#c.config.onError?.(e,this),this.#c.config.onSettled?.(this.state.data,e,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.#a=(0,a.II)({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:e=>{void 0!==e?(this.setData(e),this.#c.config.onSuccess?.(e,this),this.#c.config.onSettled?.(e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):s(new Error(`${this.queryHash} data is undefined`))},onError:s,onFail:(e,t)=>{this.#o({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#a.start()}#o(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...l(t.data,this.options),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=e.error;return(0,a.wm)(n)&&n.revert&&this.#u?{...this.#u,fetchStatus:"idle"}:{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),i.j.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate()})),this.#c.notify({query:this,type:"updated",action:e})}))}};function l(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,a.v_)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}},9398:(e,t,n)=>{"use strict";n.d(t,{E:()=>g});var r=n(9106),i=n(2015),a=n(3403),o=n(7794),s=class extends o.Q{constructor(e={}){super(),this.config=e,this.#p=new Map}#p;build(e,t,n){const a=t.queryKey,o=t.queryHash??(0,r.F$)(a,t);let s=this.get(o);return s||(s=new i.X({cache:this,queryKey:a,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(s)),s}add(e){this.#p.has(e.queryHash)||(this.#p.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#p.get(e.queryHash);t&&(e.destroy(),t===e&&this.#p.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){a.j.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}get(e){return this.#p.get(e)}getAll(){return[...this.#p.values()]}find(e){const t={exact:!0,...e};return this.getAll().find((e=>(0,r.MK)(t,e)))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter((t=>(0,r.MK)(e,t))):t}notify(e){a.j.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}onFocus(){a.j.batch((()=>{this.getAll().forEach((e=>{e.onFocus()}))}))}onOnline(){a.j.batch((()=>{this.getAll().forEach((e=>{e.onOnline()}))}))}},l=n(9304),u=class extends o.Q{constructor(e={}){super(),this.config=e,this.#f=new Map,this.#m=Date.now()}#f;#m;build(e,t,n){const r=new l.s({mutationCache:this,mutationId:++this.#m,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=c(e),n=this.#f.get(t)??[];n.push(e),this.#f.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=c(e);if(this.#f.has(t)){const n=this.#f.get(t)?.filter((t=>t!==e));n&&(0===n.length?this.#f.delete(t):this.#f.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#f.get(c(e))?.find((e=>"pending"===e.state.status));return!t||t===e}runNext(e){const t=this.#f.get(c(e))?.find((t=>t!==e&&t.state.isPaused));return t?.continue()??Promise.resolve()}clear(){a.j.batch((()=>{this.getAll().forEach((e=>{this.remove(e)}))}))}getAll(){return[...this.#f.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find((e=>(0,r.nJ)(t,e)))}findAll(e={}){return this.getAll().filter((t=>(0,r.nJ)(e,t)))}notify(e){a.j.batch((()=>{this.listeners.forEach((t=>{t(e)}))}))}resumePausedMutations(){const e=this.getAll().filter((e=>e.state.isPaused));return a.j.batch((()=>Promise.all(e.map((e=>e.continue().catch(r.lQ))))))}};function c(e){return e.options.scope?.id??String(e.mutationId)}var d=n(7528),h=n(4841);function p(e){return{onFetch:(t,n)=>{const i=async()=>{const n=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]};let l=!1;const u=(0,r.ZM)(t.options,t.fetchOptions),c=async(e,n,i)=>{if(l)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);const a={queryKey:t.queryKey,pageParam:n,direction:i?"backward":"forward",meta:t.options.meta};var o;o=a,Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(t.signal.aborted?l=!0:t.signal.addEventListener("abort",(()=>{l=!0})),t.signal)});const s=await u(a),{maxPages:c}=t.options,d=i?r.ZZ:r.y9;return{pages:d(e.pages,s,c),pageParams:d(e.pageParams,n,c)}};let d;if(i&&a.length){const e="backward"===i,t={pages:a,pageParams:o},r=(e?m:f)(n,t);d=await c(t,r,e)}else{d=await c(s,o[0]??n.initialPageParam);const t=e??a.length;for(let e=1;e<t;e++){const e=f(n,d);d=await c(d,e)}}return d};t.options.persister?t.fetchFn=()=>t.options.persister?.(i,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=i}}}function f(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function m(e,{pages:t,pageParams:n}){return e.getPreviousPageParam?.(t[0],t,n[0],n)}var g=class{#g;#i;#d;#v;#y;#b;#w;#S;constructor(e={}){this.#g=e.queryCache||new s,this.#i=e.mutationCache||new u,this.#d=e.defaultOptions||{},this.#v=new Map,this.#y=new Map,this.#b=0}mount(){this.#b++,1===this.#b&&(this.#w=d.m.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#g.onFocus())})),this.#S=h.t.subscribe((async e=>{e&&(await this.resumePausedMutations(),this.#g.onOnline())})))}unmount(){this.#b--,0===this.#b&&(this.#w?.(),this.#w=void 0,this.#S?.(),this.#S=void 0)}isFetching(e){return this.#g.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#i.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#g.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(void 0===t)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),i=this.#g.build(this,n);return e.revalidateIfStale&&i.isStaleByTime((0,r.d2)(n.staleTime,i))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return this.#g.findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),a=this.#g.get(i.queryHash),o=a?.state.data,s=(0,r.Zw)(t,o);if(void 0!==s)return this.#g.build(this,i).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return a.j.batch((()=>this.#g.findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#g.get(t.queryHash)?.state}removeQueries(e){const t=this.#g;a.j.batch((()=>{t.findAll(e).forEach((e=>{t.remove(e)}))}))}resetQueries(e,t){const n=this.#g,r={type:"active",...e};return a.j.batch((()=>(n.findAll(e).forEach((e=>{e.reset()})),this.refetchQueries(r,t))))}cancelQueries(e={},t={}){const n={revert:!0,...t},i=a.j.batch((()=>this.#g.findAll(e).map((e=>e.cancel(n)))));return Promise.all(i).then(r.lQ).catch(r.lQ)}invalidateQueries(e={},t={}){return a.j.batch((()=>{if(this.#g.findAll(e).forEach((e=>{e.invalidate()})),"none"===e.refetchType)return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)}))}refetchQueries(e={},t){const n={...t,cancelRefetch:t?.cancelRefetch??!0},i=a.j.batch((()=>this.#g.findAll(e).filter((e=>!e.isDisabled())).map((e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r.lQ)),"paused"===e.state.fetchStatus?Promise.resolve():t}))));return Promise.all(i).then(r.lQ)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const n=this.#g.build(this,t);return n.isStaleByTime((0,r.d2)(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r.lQ).catch(r.lQ)}fetchInfiniteQuery(e){return e.behavior=p(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r.lQ).catch(r.lQ)}resumePausedMutations(){return h.t.isOnline()?this.#i.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#g}getMutationCache(){return this.#i}getDefaultOptions(){return this.#d}setDefaultOptions(e){this.#d=e}setQueryDefaults(e,t){this.#v.set((0,r.EN)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#v.values()];let n={};return t.forEach((t=>{(0,r.Cp)(e,t.queryKey)&&(n={...n,...t.defaultOptions})})),n}setMutationDefaults(e,t){this.#y.set((0,r.EN)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#y.values()];let n={};return t.forEach((t=>{(0,r.Cp)(e,t.mutationKey)&&(n={...n,...t.defaultOptions})})),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#d.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,r.F$)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),!0!==t.enabled&&t.queryFn===r.hT&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#d.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#g.clear(),this.#i.clear()}}},8546:(e,t,n)=>{"use strict";n.d(t,{k:()=>i});var r=n(9106),i=class{#x;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,r.gn)(this.gcTime)&&(this.#x=setTimeout((()=>{this.optionalRemove()}),this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(r.S$?1/0:3e5))}clearGcTimeout(){this.#x&&(clearTimeout(this.#x),this.#x=void 0)}}},5610:(e,t,n)=>{"use strict";n.d(t,{II:()=>c,v_:()=>s,wm:()=>u});var r=n(7528),i=n(4841),a=n(9106);function o(e){return Math.min(1e3*2**e,3e4)}function s(e){return"online"!==(e??"online")||i.t.isOnline()}var l=class{constructor(e){this.revert=e?.revert,this.silent=e?.silent}};function u(e){return e instanceof l}function c(e){let t,n,u,c=!1,d=0,h=!1;const p=new Promise(((e,t)=>{n=e,u=t})),f=()=>r.m.isFocused()&&("always"===e.networkMode||i.t.isOnline())&&e.canRun(),m=()=>s(e.networkMode)&&e.canRun(),g=r=>{h||(h=!0,e.onSuccess?.(r),t?.(),n(r))},v=n=>{h||(h=!0,e.onError?.(n),t?.(),u(n))},y=()=>new Promise((n=>{t=e=>{(h||f())&&n(e)},e.onPause?.()})).then((()=>{t=void 0,h||e.onContinue?.()})),b=()=>{if(h)return;let t;const n=0===d?e.initialPromise:void 0;try{t=n??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(g).catch((t=>{if(h)return;const n=e.retry??(a.S$?0:3),r=e.retryDelay??o,i="function"==typeof r?r(d,t):r,s=!0===n||"number"==typeof n&&d<n||"function"==typeof n&&n(d,t);!c&&s?(d++,e.onFail?.(d,t),(0,a.yy)(i).then((()=>f()?void 0:y())).then((()=>{c?v(t):b()}))):v(t)}))};return{promise:p,cancel:t=>{h||(v(new l(t)),e.abort?.())},continue:()=>(t?.(),p),cancelRetry:()=>{c=!0},continueRetry:()=>{c=!1},canStart:m,start:()=>(m()?b():y().then(b),p)}}},7794:(e,t,n)=>{"use strict";n.d(t,{Q:()=>r});var r=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},9106:(e,t,n)=>{"use strict";n.d(t,{Cp:()=>f,EN:()=>p,Eh:()=>u,F$:()=>h,MK:()=>c,S$:()=>r,ZM:()=>O,ZZ:()=>E,Zw:()=>a,d2:()=>l,f8:()=>g,gn:()=>o,hT:()=>_,j3:()=>s,lQ:()=>i,nJ:()=>d,pl:()=>S,y9:()=>x,yy:()=>w});var r="undefined"==typeof window||"Deno"in globalThis;function i(){}function a(e,t){return"function"==typeof e?e(t):e}function o(e){return"number"==typeof e&&e>=0&&e!==1/0}function s(e,t){return Math.max(e+(t||0)-Date.now(),0)}function l(e,t){return"function"==typeof e?e(t):e}function u(e,t){return"function"==typeof e?e(t):e}function c(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o)if(r){if(t.queryHash!==h(o,t.options))return!1}else if(!f(t.queryKey,o))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof s||t.isStale()===s)&&((!i||i===t.state.fetchStatus)&&!(a&&!a(t)))}function d(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(p(t.options.mutationKey)!==p(a))return!1}else if(!f(t.options.mutationKey,a))return!1}return(!r||t.state.status===r)&&!(i&&!i(t))}function h(e,t){return(t?.queryKeyHashFn||p)(e)}function p(e){return JSON.stringify(e,((e,t)=>y(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t))}function f(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&!Object.keys(t).some((n=>!f(e[n],t[n]))))}function m(e,t){if(e===t)return e;const n=v(e)&&v(t);if(n||y(e)&&y(t)){const r=n?e:Object.keys(e),i=r.length,a=n?t:Object.keys(t),o=a.length,s=n?[]:{};let l=0;for(let i=0;i<o;i++){const o=n?i:a[i];(!n&&r.includes(o)||n)&&void 0===e[o]&&void 0===t[o]?(s[o]=void 0,l++):(s[o]=m(e[o],t[o]),s[o]===e[o]&&void 0!==e[o]&&l++)}return i===o&&l===i?e:s}return t}function g(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function v(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function y(e){if(!b(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!b(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function b(e){return"[object Object]"===Object.prototype.toString.call(e)}function w(e){return new Promise((t=>{setTimeout(t,e)}))}function S(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?m(e,t):t}function x(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function E(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var _=Symbol(),O=(e,t)=>!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==_?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))},3715:(e,t,n)=>{"use strict";n.d(t,{Ht:()=>s,jE:()=>o});var r=n(5959),i=n(2540),a=r.createContext(void 0),o=e=>{const t=r.useContext(a);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},s=({client:e,children:t})=>(r.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]),(0,i.jsx)(a.Provider,{value:e,children:t}))},6667:(e,t,n)=>{"use strict";n.d(t,{n:()=>d});var r=n(5959),i=n(9304),a=n(3403),o=n(7794),s=n(9106),l=class extends o.Q{#E;#_=void 0;#O;#T;constructor(e,t){super(),this.#E=e,this.setOptions(t),this.bindMethods(),this.#k()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#E.defaultMutationOptions(e),(0,s.f8)(this.options,t)||this.#E.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#O,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,s.EN)(t.mutationKey)!==(0,s.EN)(this.options.mutationKey)?this.reset():"pending"===this.#O?.state.status&&this.#O.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#O?.removeObserver(this)}onMutationUpdate(e){this.#k(),this.#C(e)}getCurrentResult(){return this.#_}reset(){this.#O?.removeObserver(this),this.#O=void 0,this.#k(),this.#C()}mutate(e,t){return this.#T=t,this.#O?.removeObserver(this),this.#O=this.#E.getMutationCache().build(this.#E,this.options),this.#O.addObserver(this),this.#O.execute(e)}#k(){const e=this.#O?.state??(0,i.$)();this.#_={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#C(e){a.j.batch((()=>{if(this.#T&&this.hasListeners()){const t=this.#_.variables,n=this.#_.context;"success"===e?.type?(this.#T.onSuccess?.(e.data,t,n),this.#T.onSettled?.(e.data,null,t,n)):"error"===e?.type&&(this.#T.onError?.(e.error,t,n),this.#T.onSettled?.(void 0,e.error,t,n))}this.listeners.forEach((e=>{e(this.#_)}))}))}},u=n(3715),c=n(908);function d(e,t){const n=(0,u.jE)(t),[i]=r.useState((()=>new l(n,e)));r.useEffect((()=>{i.setOptions(e)}),[i,e]);const o=r.useSyncExternalStore(r.useCallback((e=>i.subscribe(a.j.batchCalls(e))),[i]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),s=r.useCallback(((e,t)=>{i.mutate(e,t).catch(c.l)}),[i]);if(o.error&&(0,c.G)(i.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}},7616:(e,t,n)=>{"use strict";n.d(t,{I:()=>k});var r=n(9106),i=n(3403),a=n(7528),o=n(7794),s=n(2015),l=class extends o.Q{constructor(e,t){super(),this.options=t,this.#E=e,this.#A=null,this.bindMethods(),this.setOptions(t)}#E;#D=void 0;#R=void 0;#_=void 0;#I;#P;#A;#N;#j;#L;#M;#F;#V;#$=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#D.addObserver(this),u(this.#D,this.options)?this.#B():this.updateResult(),this.#z())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return c(this.#D,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return c(this.#D,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#U(),this.#q(),this.#D.removeObserver(this)}setOptions(e,t){const n=this.options,i=this.#D;if(this.options=this.#E.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,r.Eh)(this.options.enabled,this.#D))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#H(),this.#D.setOptions(this.options),n._defaulted&&!(0,r.f8)(this.options,n)&&this.#E.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#D,observer:this});const a=this.hasListeners();a&&d(this.#D,i,this.options,n)&&this.#B(),this.updateResult(t),!a||this.#D===i&&(0,r.Eh)(this.options.enabled,this.#D)===(0,r.Eh)(n.enabled,this.#D)&&(0,r.d2)(this.options.staleTime,this.#D)===(0,r.d2)(n.staleTime,this.#D)||this.#G();const o=this.#W();!a||this.#D===i&&(0,r.Eh)(this.options.enabled,this.#D)===(0,r.Eh)(n.enabled,this.#D)&&o===this.#V||this.#Q(o)}getOptimisticResult(e){const t=this.#E.getQueryCache().build(this.#E,e),n=this.createResult(t,e);return function(e,t){if(!(0,r.f8)(e.getCurrentResult(),t))return!0;return!1}(this,n)&&(this.#_=n,this.#P=this.options,this.#I=this.#D.state),n}getCurrentResult(){return this.#_}trackResult(e,t){const n={};return Object.keys(e).forEach((r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})})),n}trackProp(e){this.#$.add(e)}getCurrentQuery(){return this.#D}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#E.defaultQueryOptions(e),n=this.#E.getQueryCache().build(this.#E,t);return n.isFetchingOptimistic=!0,n.fetch().then((()=>this.createResult(n,t)))}fetch(e){return this.#B({...e,cancelRefetch:e.cancelRefetch??!0}).then((()=>(this.updateResult(),this.#_)))}#B(e){this.#H();let t=this.#D.fetch(this.options,e);return e?.throwOnError||(t=t.catch(r.lQ)),t}#G(){this.#U();const e=(0,r.d2)(this.options.staleTime,this.#D);if(r.S$||this.#_.isStale||!(0,r.gn)(e))return;const t=(0,r.j3)(this.#_.dataUpdatedAt,e)+1;this.#M=setTimeout((()=>{this.#_.isStale||this.updateResult()}),t)}#W(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#D):this.options.refetchInterval)??!1}#Q(e){this.#q(),this.#V=e,!r.S$&&!1!==(0,r.Eh)(this.options.enabled,this.#D)&&(0,r.gn)(this.#V)&&0!==this.#V&&(this.#F=setInterval((()=>{(this.options.refetchIntervalInBackground||a.m.isFocused())&&this.#B()}),this.#V))}#z(){this.#G(),this.#Q(this.#W())}#U(){this.#M&&(clearTimeout(this.#M),this.#M=void 0)}#q(){this.#F&&(clearInterval(this.#F),this.#F=void 0)}createResult(e,t){const n=this.#D,i=this.options,a=this.#_,o=this.#I,l=this.#P,c=e!==n?e.state:this.#R,{state:p}=e;let f,m={...p},g=!1;if(t._optimisticResults){const r=this.hasListeners(),a=!r&&u(e,t),o=r&&d(e,n,t,i);(a||o)&&(m={...m,...(0,s.k)(p.data,e.options)}),"isRestoring"===t._optimisticResults&&(m.fetchStatus="idle")}let{error:v,errorUpdatedAt:y,status:b}=m;if(t.select&&void 0!==m.data)if(a&&m.data===o?.data&&t.select===this.#N)f=this.#j;else try{this.#N=t.select,f=t.select(m.data),f=(0,r.pl)(a?.data,f,t),this.#j=f,this.#A=null}catch(e){this.#A=e}else f=m.data;if(void 0!==t.placeholderData&&void 0===f&&"pending"===b){let e;if(a?.isPlaceholderData&&t.placeholderData===l?.placeholderData)e=a.data;else if(e="function"==typeof t.placeholderData?t.placeholderData(this.#L?.state.data,this.#L):t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.#A=null}catch(e){this.#A=e}void 0!==e&&(b="success",f=(0,r.pl)(a?.data,e,t),g=!0)}this.#A&&(v=this.#A,f=this.#j,y=Date.now(),b="error");const w="fetching"===m.fetchStatus,S="pending"===b,x="error"===b,E=S&&w,_=void 0!==f;return{status:b,fetchStatus:m.fetchStatus,isPending:S,isSuccess:"success"===b,isError:x,isInitialLoading:E,isLoading:E,data:f,dataUpdatedAt:m.dataUpdatedAt,error:v,errorUpdatedAt:y,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>c.dataUpdateCount||m.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!S,isLoadingError:x&&!_,isPaused:"paused"===m.fetchStatus,isPlaceholderData:g,isRefetchError:x&&_,isStale:h(e,t),refetch:this.refetch}}updateResult(e){const t=this.#_,n=this.createResult(this.#D,this.options);if(this.#I=this.#D.state,this.#P=this.options,void 0!==this.#I.data&&(this.#L=this.#D),(0,r.f8)(n,t))return;this.#_=n;const i={};!1!==e?.listeners&&(()=>{if(!t)return!0;const{notifyOnChangeProps:e}=this.options,n="function"==typeof e?e():e;if("all"===n||!n&&!this.#$.size)return!0;const r=new Set(n??this.#$);return this.options.throwOnError&&r.add("error"),Object.keys(this.#_).some((e=>{const n=e;return this.#_[n]!==t[n]&&r.has(n)}))})()&&(i.listeners=!0),this.#C({...i,...e})}#H(){const e=this.#E.getQueryCache().build(this.#E,this.options);if(e===this.#D)return;const t=this.#D;this.#D=e,this.#R=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#z()}#C(e){i.j.batch((()=>{e.listeners&&this.listeners.forEach((e=>{e(this.#_)})),this.#E.getQueryCache().notify({query:this.#D,type:"observerResultsUpdated"})}))}};function u(e,t){return function(e,t){return!1!==(0,r.Eh)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)}(e,t)||void 0!==e.state.data&&c(e,t,t.refetchOnMount)}function c(e,t,n){if(!1!==(0,r.Eh)(t.enabled,e)){const r="function"==typeof n?n(e):n;return"always"===r||!1!==r&&h(e,t)}return!1}function d(e,t,n,i){return(e!==t||!1===(0,r.Eh)(i.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&h(e,n)}function h(e,t){return!1!==(0,r.Eh)(t.enabled,e)&&e.isStaleByTime((0,r.d2)(t.staleTime,e))}var p=n(5959);n(2540);function f(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var m=p.createContext(f()),g=()=>p.useContext(m),v=n(3715),y=p.createContext(!1),b=()=>p.useContext(y),w=(y.Provider,n(908)),S=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},x=e=>{p.useEffect((()=>{e.clearReset()}),[e])},E=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(0,w.G)(n,[e.error,r]),_=e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)},O=(e,t)=>e?.suspense&&t.isPending,T=(e,t,n)=>t.fetchOptimistic(e).catch((()=>{n.clearReset()}));function k(e,t){return function(e,t,n){const r=(0,v.jE)(n),a=b(),o=g(),s=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(s),s._optimisticResults=a?"isRestoring":"optimistic",_(s),S(s,o),x(o);const[l]=p.useState((()=>new t(r,s))),u=l.getOptimisticResult(s);if(p.useSyncExternalStore(p.useCallback((e=>{const t=a?()=>{}:l.subscribe(i.j.batchCalls(e));return l.updateResult(),t}),[l,a]),(()=>l.getCurrentResult()),(()=>l.getCurrentResult())),p.useEffect((()=>{l.setOptions(s,{listeners:!1})}),[s,l]),O(s,u))throw T(s,l,o);if(E({result:u,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw u.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(s,u),s.notifyOnChangeProps?u:l.trackResult(u)}(e,l,t)}},908:(e,t,n)=>{"use strict";function r(e,t){return"function"==typeof e?e(...t):!!e}function i(){}n.d(t,{G:()=>r,l:()=>i})},8727:()=>{"use strict";var e={},t=Uint8Array,n=Uint16Array,r=Int32Array,i=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(e,t){for(var i=new n(31),a=0;a<31;++a)i[a]=t+=1<<e[a-1];var o=new r(i[30]);for(a=1;a<30;++a)for(var s=i[a];s<i[a+1];++s)o[s]=s-i[a]<<5|a;return{b:i,r:o}},l=s(i,2),u=l.b,c=l.r;u[28]=258,c[258]=28;for(var d=s(a,0),h=d.b,p=d.r,f=new n(32768),m=0;m<32768;++m){var g=(43690&m)>>1|(21845&m)<<1;g=(61680&(g=(52428&g)>>2|(13107&g)<<2))>>4|(3855&g)<<4,f[m]=((65280&g)>>8|(255&g)<<8)>>1}var v=function(e,t,r){for(var i=e.length,a=0,o=new n(t);a<i;++a)e[a]&&++o[e[a]-1];var s,l=new n(t);for(a=1;a<t;++a)l[a]=l[a-1]+o[a-1]<<1;if(r){s=new n(1<<t);var u=15-t;for(a=0;a<i;++a)if(e[a])for(var c=a<<4|e[a],d=t-e[a],h=l[e[a]-1]++<<d,p=h|(1<<d)-1;h<=p;++h)s[f[h]>>u]=c}else for(s=new n(i),a=0;a<i;++a)e[a]&&(s[a]=f[l[e[a]-1]++]>>15-e[a]);return s},y=new t(288);for(m=0;m<144;++m)y[m]=8;for(m=144;m<256;++m)y[m]=9;for(m=256;m<280;++m)y[m]=7;for(m=280;m<288;++m)y[m]=8;var b=new t(32);for(m=0;m<32;++m)b[m]=5;var w=v(y,9,0),S=v(y,9,1),x=v(b,5,0),E=v(b,5,1),_=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},O=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},T=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},k=function(e){return(e+7)/8|0},C=function(e,n,r){return(null==n||n<0)&&(n=0),(null==r||r>e.length)&&(r=e.length),new t(e.subarray(n,r))},A=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],D=function(e,t,n){var r=new Error(t||A[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,D),!n)throw r;return r},R=function(e,n,r,s){var l=e.length,c=s?s.length:0;if(!l||n.f&&!n.l)return r||new t(0);var d=!r,p=d||2!=n.i,f=n.i;d&&(r=new t(3*l));var m=function(e){var n=r.length;if(e>n){var i=new t(Math.max(2*n,e));i.set(r),r=i}},g=n.f||0,y=n.p||0,b=n.b||0,w=n.l,x=n.d,A=n.m,R=n.n,I=8*l;do{if(!w){g=O(e,y,1);var P=O(e,y+1,3);if(y+=3,!P){var N=e[(H=k(y)+4)-4]|e[H-3]<<8,j=H+N;if(j>l){f&&D(0);break}p&&m(b+N),r.set(e.subarray(H,j),b),n.b=b+=N,n.p=y=8*j,n.f=g;continue}if(1==P)w=S,x=E,A=9,R=5;else if(2==P){var L=O(e,y,31)+257,M=O(e,y+10,15)+4,F=L+O(e,y+5,31)+1;y+=14;for(var V=new t(F),$=new t(19),B=0;B<M;++B)$[o[B]]=O(e,y+3*B,7);y+=3*M;var z=_($),U=(1<<z)-1,q=v($,z,1);for(B=0;B<F;){var H,G=q[O(e,y,U)];if(y+=15&G,(H=G>>4)<16)V[B++]=H;else{var W=0,Q=0;for(16==H?(Q=3+O(e,y,3),y+=2,W=V[B-1]):17==H?(Q=3+O(e,y,7),y+=3):18==H&&(Q=11+O(e,y,127),y+=7);Q--;)V[B++]=W}}var K=V.subarray(0,L),X=V.subarray(L);A=_(K),R=_(X),w=v(K,A,1),x=v(X,R,1)}else D(1);if(y>I){f&&D(0);break}}p&&m(b+131072);for(var Y=(1<<A)-1,J=(1<<R)-1,Z=y;;Z=y){var ee=(W=w[T(e,y)&Y])>>4;if((y+=15&W)>I){f&&D(0);break}if(W||D(2),ee<256)r[b++]=ee;else{if(256==ee){Z=y,w=null;break}var te=ee-254;if(ee>264){var ne=i[B=ee-257];te=O(e,y,(1<<ne)-1)+u[B],y+=ne}var re=x[T(e,y)&J],ie=re>>4;re||D(3),y+=15&re;X=h[ie];if(ie>3){ne=a[ie];X+=T(e,y)&(1<<ne)-1,y+=ne}if(y>I){f&&D(0);break}p&&m(b+131072);var ae=b+te;if(b<X){var oe=c-X,se=Math.min(X,ae);for(oe+b<0&&D(3);b<se;++b)r[b]=s[oe+b]}for(;b<ae;++b)r[b]=r[b-X]}}n.l=w,n.p=Z,n.b=b,n.f=g,w&&(g=1,n.m=A,n.d=x,n.n=R)}while(!g);return b!=r.length&&d?C(r,0,b):r.subarray(0,b)},I=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},P=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},N=function(e,r){for(var i=[],a=0;a<e.length;++a)e[a]&&i.push({s:a,f:e[a]});var o=i.length,s=i.slice();if(!o)return{t:B,l:0};if(1==o){var l=new t(i[0].s+1);return l[i[0].s]=1,{t:l,l:1}}i.sort((function(e,t){return e.f-t.f})),i.push({s:-1,f:25001});var u=i[0],c=i[1],d=0,h=1,p=2;for(i[0]={s:-1,f:u.f+c.f,l:u,r:c};h!=o-1;)u=i[i[d].f<i[p].f?d++:p++],c=i[d!=h&&i[d].f<i[p].f?d++:p++],i[h++]={s:-1,f:u.f+c.f,l:u,r:c};var f=s[0].s;for(a=1;a<o;++a)s[a].s>f&&(f=s[a].s);var m=new n(f+1),g=j(i[h-1],m,0);if(g>r){a=0;var v=0,y=g-r,b=1<<y;for(s.sort((function(e,t){return m[t.s]-m[e.s]||e.f-t.f}));a<o;++a){var w=s[a].s;if(!(m[w]>r))break;v+=b-(1<<g-m[w]),m[w]=r}for(v>>=y;v>0;){var S=s[a].s;m[S]<r?v-=1<<r-m[S]++-1:++a}for(;a>=0&&v;--a){var x=s[a].s;m[x]==r&&(--m[x],++v)}g=r}return{t:new t(m),l:g}},j=function(e,t,n){return-1==e.s?Math.max(j(e.l,t,n+1),j(e.r,t,n+1)):t[e.s]=n},L=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new n(++t),i=0,a=e[0],o=1,s=function(e){r[i++]=e},l=1;l<=t;++l)if(e[l]==a&&l!=t)++o;else{if(!a&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(a),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(a);o=1,a=e[l]}return{c:r.subarray(0,i),n:t}},M=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},F=function(e,t,n){var r=n.length,i=k(t+2);e[i]=255&r,e[i+1]=r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var a=0;a<r;++a)e[i+a+4]=n[a];return 8*(i+4+r)},V=function(e,t,r,s,l,u,c,d,h,p,f){I(t,f++,r),++l[256];for(var m=N(l,15),g=m.t,S=m.l,E=N(u,15),_=E.t,O=E.l,T=L(g),k=T.c,C=T.n,A=L(_),D=A.c,R=A.n,j=new n(19),V=0;V<k.length;++V)++j[31&k[V]];for(V=0;V<D.length;++V)++j[31&D[V]];for(var $=N(j,7),B=$.t,z=$.l,U=19;U>4&&!B[o[U-1]];--U);var q,H,G,W,Q=p+5<<3,K=M(l,y)+M(u,b)+c,X=M(l,g)+M(u,_)+c+14+3*U+M(j,B)+2*j[16]+3*j[17]+7*j[18];if(h>=0&&Q<=K&&Q<=X)return F(t,f,e.subarray(h,h+p));if(I(t,f,1+(X<K)),f+=2,X<K){q=v(g,S,0),H=g,G=v(_,O,0),W=_;var Y=v(B,z,0);I(t,f,C-257),I(t,f+5,R-1),I(t,f+10,U-4),f+=14;for(V=0;V<U;++V)I(t,f+3*V,B[o[V]]);f+=3*U;for(var J=[k,D],Z=0;Z<2;++Z){var ee=J[Z];for(V=0;V<ee.length;++V){var te=31&ee[V];I(t,f,Y[te]),f+=B[te],te>15&&(I(t,f,ee[V]>>5&127),f+=ee[V]>>12)}}}else q=w,H=y,G=x,W=b;for(V=0;V<d;++V){var ne=s[V];if(ne>255){P(t,f,q[(te=ne>>18&31)+257]),f+=H[te+257],te>7&&(I(t,f,ne>>23&31),f+=i[te]);var re=31&ne;P(t,f,G[re]),f+=W[re],re>3&&(P(t,f,ne>>5&8191),f+=a[re])}else P(t,f,q[ne]),f+=H[ne]}return P(t,f,q[256]),f+H[256]},$=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),B=new t(0),z=function(e,o,s,l,u,d){var h=d.z||e.length,f=new t(l+h+5*(1+Math.ceil(h/7e3))+u),m=f.subarray(l,f.length-u),g=d.l,v=7&(d.r||0);if(o){v&&(m[0]=d.r>>3);for(var y=$[o-1],b=y>>13,w=8191&y,S=(1<<s)-1,x=d.p||new n(32768),E=d.h||new n(S+1),_=Math.ceil(s/3),O=2*_,T=function(t){return(e[t]^e[t+1]<<_^e[t+2]<<O)&S},A=new r(25e3),D=new n(288),R=new n(32),I=0,P=0,N=d.i||0,j=0,L=d.w||0,M=0;N+2<h;++N){var B=T(N),z=32767&N,U=E[B];if(x[z]=U,E[B]=z,L<=N){var q=h-N;if((I>7e3||j>24576)&&(q>423||!g)){v=V(e,m,0,A,D,R,P,j,M,N-M,v),j=I=P=0,M=N;for(var H=0;H<286;++H)D[H]=0;for(H=0;H<30;++H)R[H]=0}var G=2,W=0,Q=w,K=z-U&32767;if(q>2&&B==T(N-K))for(var X=Math.min(b,q)-1,Y=Math.min(32767,N),J=Math.min(258,q);K<=Y&&--Q&&z!=U;){if(e[N+G]==e[N+G-K]){for(var Z=0;Z<J&&e[N+Z]==e[N+Z-K];++Z);if(Z>G){if(G=Z,W=K,Z>X)break;var ee=Math.min(K,Z-2),te=0;for(H=0;H<ee;++H){var ne=N-K+H&32767,re=ne-x[ne]&32767;re>te&&(te=re,U=ne)}}}K+=(z=U)-(U=x[z])&32767}if(W){A[j++]=268435456|c[G]<<18|p[W];var ie=31&c[G],ae=31&p[W];P+=i[ie]+a[ae],++D[257+ie],++R[ae],L=N+G,++I}else A[j++]=e[N],++D[e[N]]}}for(N=Math.max(N,L);N<h;++N)A[j++]=e[N],++D[e[N]];v=V(e,m,g,A,D,R,P,j,M,N-M,v),g||(d.r=7&v|m[v/8|0]<<3,v-=7,d.h=E,d.p=x,d.i=N,d.w=L)}else{for(N=d.w||0;N<h+g;N+=65535){var oe=N+65535;oe>=h&&(m[v/8|0]=g,oe=h),v=F(m,v+1,e.subarray(N,oe))}d.i=h}return C(f,0,l+k(v)+u)},U=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),q=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=U[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}},H=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,a=0|n.length,o=0;o!=a;){for(var s=Math.min(o+2655,a);o<s;++o)i+=r+=n[o];r=(65535&r)+15*(r>>16),i=(65535&i)+15*(i>>16)}e=r,t=i},d:function(){return(255&(e%=65521))<<24|(65280&e)<<8|(255&(t%=65521))<<8|t>>8}}},G=function(e,n,r,i,a){if(!a&&(a={l:1},n.dictionary)){var o=n.dictionary.subarray(-32768),s=new t(o.length+e.length);s.set(o),s.set(e,o.length),e=s,a.w=o.length}return z(e,null==n.level?6:n.level,null==n.mem?a.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+n.mem,r,i,a)},W=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},Q=function(e,t,n){for(var r=e(),i=e.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o<r.length;++o){var s=r[o],l=a[o];if("function"==typeof s){t+=";"+l+"=";var u=s.toString();if(s.prototype)if(-1!=u.indexOf("[native code]")){var c=u.indexOf(" ",8)+1;t+=u.slice(c,u.indexOf("(",c))}else for(var d in t+=u,s.prototype)t+=";"+l+".prototype."+d+"="+s.prototype[d].toString();else t+=u}else n[l]=s}return t},K=[],X=function(t,n,r,i){if(!K[r]){for(var a="",o={},s=t.length-1,l=0;l<s;++l)a=Q(t[l],a,o);K[r]={c:Q(t[s],a,o),e:o}}var u=W({},K[r].e);return function(t,n,r,i,a){var o=new Worker(e[n]||(e[n]=URL.createObjectURL(new Blob([t+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],a(r,null)}else a(null,t)},o.postMessage(r,i),o}(K[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+n.toString()+"}",r,u,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(u),i)},Y=function(){return[t,n,r,i,a,o,u,h,S,E,f,A,v,_,O,T,k,C,D,R,we,re,ie]},J=function(){return[t,n,r,i,a,o,c,p,w,y,x,b,f,$,B,v,I,P,N,j,L,M,F,V,k,C,z,G,ve,re]},Z=function(){return[le,de,se,q,U]},ee=function(){return[ue,ce]},te=function(){return[he,se,H]},ne=function(){return[pe]},re=function(e){return postMessage(e,[e.buffer])},ie=function(e){return e&&{out:e.size&&new t(e.size),dictionary:e.dictionary}},ae=function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){t.data.length?(e.push(t.data[0],t.data[1]),postMessage([t.data[0].length])):e.flush()}},oe=function(e,t,n,r,i,a,o){var s,l=X(e,r,i,(function(e,n){e?(l.terminate(),t.ondata.call(t,e)):Array.isArray(n)?1==n.length?(t.queuedSize-=n[0],t.ondrain&&t.ondrain(n[0])):(n[1]&&l.terminate(),t.ondata.call(t,e,n[0],n[1])):o(n)}));l.postMessage(n),t.queuedSize=0,t.push=function(e,n){t.ondata||D(5),s&&t.ondata(D(4,0,1),null,!!n),t.queuedSize+=e.length,l.postMessage([e,s=n],[e.buffer])},t.terminate=function(){l.terminate()},a&&(t.flush=function(){l.postMessage([])})},se=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},le=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&se(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},ue=function(e){31==e[0]&&139==e[1]&&8==e[2]||D(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=2+(e[10]|e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},ce=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},de=function(e){return 10+(e.filename?e.filename.length+1:0)},he=function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=H();i.p(t.dictionary),se(e,2,i.d())}},pe=function(e,t){return(8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31)&&D(6,"invalid zlib data"),(e[1]>>5&1)==+!t&&D(6,"invalid zlib data: "+(32&e[1]?"need":"unexpected")+" dictionary"),2+(e[1]>>3&4)};function fe(e,t){return"function"==typeof e&&(t=e,e={}),this.ondata=t,e}var me=function(){function e(e,n){if("function"==typeof e&&(n=e,e={}),this.ondata=n,this.o=e||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var r=this.o.dictionary.subarray(-32768);this.b.set(r,32768-r.length),this.s.i=32768-r.length}}return e.prototype.p=function(e,t){this.ondata(G(e,this.o,0,0,this.s),t)},e.prototype.push=function(e,n){this.ondata||D(5),this.s.l&&D(4);var r=e.length+this.s.z;if(r>this.b.length){if(r>2*this.b.length-32768){var i=new t(-32768&r);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;this.b.set(e.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(e.subarray(a),32768),this.s.z=e.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(e,this.s.z),this.s.z+=e.length;this.s.l=1&n,(this.s.z>this.s.w+8191||n)&&(this.p(this.b,n||!1),this.s.w=this.s.i,this.s.i-=2)},e.prototype.flush=function(){this.ondata||D(5),this.s.l&&D(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},e}(),ge=function(){return function(e,t){oe([J,function(){return[ae,me]}],this,fe.call(this,e,t),(function(e){var t=new me(e.data);onmessage=ae(t)}),6,1)}}();function ve(e,t){return G(e,t||{},0,0)}var ye=function(){function e(e,n){"function"==typeof e&&(n=e,e={}),this.ondata=n;var r=e&&e.dictionary&&e.dictionary.subarray(-32768);this.s={i:0,b:r?r.length:0},this.o=new t(32768),this.p=new t(0),r&&this.o.set(r)}return e.prototype.e=function(e){if(this.ondata||D(5),this.d&&D(4),this.p.length){if(e.length){var n=new t(this.p.length+e.length);n.set(this.p),n.set(e,this.p.length),this.p=n}}else this.p=e},e.prototype.c=function(e){this.s.i=+(this.d=e||!1);var t=this.s.b,n=R(this.p,this.s,this.o);this.ondata(C(n,t,this.s.b),this.d),this.o=C(n,this.s.b-32768),this.s.b=this.o.length,this.p=C(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}(),be=function(){return function(e,t){oe([Y,function(){return[ae,ye]}],this,fe.call(this,e,t),(function(e){var t=new ye(e.data);onmessage=ae(t)}),7,0)}}();function we(e,t){return R(e,{i:2},t&&t.out,t&&t.dictionary)}var Se=function(){function e(e,t){this.c=q(),this.l=0,this.v=1,me.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),this.l+=e.length,me.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var n=G(e,this.o,this.v&&de(this.o),t&&8,this.s);this.v&&(le(n,this.o),this.v=0),t&&(se(n,n.length-8,this.c.d()),se(n,n.length-4,this.l)),this.ondata(n,t)},e.prototype.flush=function(){me.prototype.flush.call(this)},e}(),xe=function(){return function(e,t){oe([J,Z,function(){return[ae,me,Se]}],this,fe.call(this,e,t),(function(e){var t=new Se(e.data);onmessage=ae(t)}),8,1)}}();var Ee=function(){function e(e,t){this.v=1,this.r=0,ye.call(this,e,t)}return e.prototype.push=function(e,n){if(ye.prototype.e.call(this,e),this.r+=e.length,this.v){var r=this.p.subarray(this.v-1),i=r.length>3?ue(r):4;if(i>r.length){if(!n)return}else this.v>1&&this.onmember&&this.onmember(this.r-r.length);this.p=r.subarray(i),this.v=0}ye.prototype.c.call(this,n),!this.s.f||this.s.l||n||(this.v=k(this.s.p)+9,this.s={i:0},this.o=new t(0),this.push(new t(0),n))},e}(),_e=function(){return function(e,t){var n=this;oe([Y,ee,function(){return[ae,ye,Ee]}],this,fe.call(this,e,t),(function(e){var t=new Ee(e.data);t.onmember=function(e){return postMessage(e)},onmessage=ae(t)}),9,0,(function(e){return n.onmember&&n.onmember(e)}))}}();var Oe=function(){function e(e,t){this.c=H(),this.v=1,me.call(this,e,t)}return e.prototype.push=function(e,t){this.c.p(e),me.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){var n=G(e,this.o,this.v&&(this.o.dictionary?6:2),t&&4,this.s);this.v&&(he(n,this.o),this.v=0),t&&se(n,n.length-4,this.c.d()),this.ondata(n,t)},e.prototype.flush=function(){me.prototype.flush.call(this)},e}(),Te=function(){return function(e,t){oe([J,te,function(){return[ae,me,Oe]}],this,fe.call(this,e,t),(function(e){var t=new Oe(e.data);onmessage=ae(t)}),10,1)}}();var ke=function(){function e(e,t){ye.call(this,e,t),this.v=e&&e.dictionary?2:1}return e.prototype.push=function(e,t){if(ye.prototype.e.call(this,e),this.v){if(this.p.length<6&&!t)return;this.p=this.p.subarray(pe(this.p,this.v-1)),this.v=0}t&&(this.p.length<4&&D(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),ye.prototype.c.call(this,t)},e}(),Ce=function(){return function(e,t){oe([Y,ne,function(){return[ae,ye,ke]}],this,fe.call(this,e,t),(function(e){var t=new ke(e.data);onmessage=ae(t)}),11,0)}}();var Ae="undefined"!=typeof TextDecoder&&new TextDecoder;try{Ae.decode(B,{stream:!0}),1}catch(e){}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;const De=e=>class{constructor(){this.i=new e,this.i.ondata=(e,t)=>{this.ondata(null,e,t)}}push(e,t){try{this.queuedSize+=e.length,this.i.push(e,t),this.queuedSize-=e.length,this.ondrain&&this.ondrain(e.length)}catch(e){this.ondata(e,null,t||!1)}}};let Re=1;try{(new ge).terminate()}catch(D){Re=0}const Ie=Re?{gzip:xe,deflate:Te,"deflate-raw":ge}:{gzip:De(Se),deflate:De(Oe),"deflate-raw":De(me)},Pe=Re?{gzip:_e,deflate:Ce,"deflate-raw":be}:{gzip:De(Ee),deflate:De(ke),"deflate-raw":De(ye)},Ne=(e,t,n)=>class extends e{constructor(e){if(!arguments.length)throw new TypeError(`Failed to construct '${n}': 1 argument required, but only 0 present.`);const r=t[e];if(!r)throw new TypeError(`Failed to construct '${n}': Unsupported compression format: '${e}'`);let i,a=new r;super({start:e=>{a.ondata=(t,n,r)=>{t?e.error(t):n&&(e.enqueue(n),r&&(i?i():e.terminate()))}},transform:e=>{if(e instanceof ArrayBuffer)e=new Uint8Array(e);else{if(!ArrayBuffer.isView(e))throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}if(a.push(e),a.queuedSize>=32768)return new Promise((e=>{a.ondrain=()=>{a.queuedSize<32768&&e()}}))},flush:()=>new Promise((e=>{i=e,a.push(new Uint8Array(0),!0)}))},{size:e=>0|e.byteLength,highWaterMark:65536},{size:e=>0|e.byteLength,highWaterMark:65536})}};const je="undefined"==typeof globalThis?"undefined"==typeof self?"undefined"==typeof global?{}:global:self:globalThis;var Le;void 0===je.CompressionStream&&(je.CompressionStream=(Le=TransformStream,Ne(Le,Ie,"CompressionStream"))),void 0===je.DecompressionStream&&(je.DecompressionStream=function(e){return Ne(e,Pe,"DecompressionStream")}(TransformStream))},7879:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>Ye});var r=n(5959);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}const a=["children","options"];var o,s,l;(l=o||(o={})).blockQuote="0",l.breakLine="1",l.breakThematic="2",l.codeBlock="3",l.codeFenced="4",l.codeInline="5",l.footnote="6",l.footnoteReference="7",l.gfmTask="8",l.heading="9",l.headingSetext="10",l.htmlBlock="11",l.htmlComment="12",l.htmlSelfClosing="13",l.image="14",l.link="15",l.linkAngleBraceStyleDetector="16",l.linkBareUrlDetector="17",l.linkMailtoDetector="18",l.newlineCoalescer="19",l.orderedList="20",l.paragraph="21",l.ref="22",l.refImage="23",l.refLink="24",l.table="25",l.tableSeparator="26",l.text="27",l.textBolded="28",l.textEmphasized="29",l.textEscaped="30",l.textMarked="31",l.textStrikethroughed="32",l.unorderedList="33",function(e){e[e.MAX=0]="MAX",e[e.HIGH=1]="HIGH",e[e.MED=2]="MED",e[e.LOW=3]="LOW",e[e.MIN=4]="MIN"}(s||(s={}));const u=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","className","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce(((e,t)=>(e[t.toLowerCase()]=t,e)),{for:"htmlFor"}),c={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},d=["style","script"],h=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,p=/mailto:/i,f=/\n{2,}$/,m=/^(\s*>[\s\S]*?)(?=\n{2,})/,g=/^ *> ?/gm,v=/^ {2,}\n/,y=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,b=/^\s*(`{3,}|~{3,}) *(\S+)?([^\n]*?)?\n([\s\S]+?)\s*\1 *(?:\n *)*\n?/,w=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,S=/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,x=/^(?:\n *)*\n/,E=/\r\n?/g,_=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,O=/^\[\^([^\]]+)]/,T=/\f/g,k=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,C=/^\s*?\[(x|\s)\]/,A=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,D=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,R=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,I=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,P=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,N=/^<!--[\s\S]*?(?:-->)/,j=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,L=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,M=/^\{.*\}$/,F=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,V=/^<([^ >]+@[^ >]+)>/,$=/^<([^ >]+:\/[^ >]+)>/,B=/-([a-z])?/gi,z=/^(.*\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,U=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,q=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,H=/^\[([^\]]*)\] ?\[([^\]]*)\]/,G=/(\[|\])/g,W=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,Q=/\t/g,K=/(^ *\||\| *$)/g,X=/^ *:-+: *$/,Y=/^ *:-+ *$/,J=/^ *-+: *$/,Z="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|~~.*?~~|==.*?==|.|\\n)*?)",ee=new RegExp(`^([*_])\\1${Z}\\1\\1(?!\\1)`),te=new RegExp(`^([*_])${Z}\\1(?!\\1|\\w)`),ne=new RegExp(`^==${Z}==`),re=new RegExp(`^~~${Z}~~`),ie=/^\\([^0-9A-Za-z\s])/,ae=/^[\s\S]+?(?=[^0-9A-Z\s\u00c0-\uffff&#;.()'"]|\d+\.|\n\n| {2,}\n|\w+:\S|$)/i,oe=/^\n+/,se=/^([ \t]*)/,le=/\\([^\\])/g,ue=/ *\n+$/,ce=/(?:^|\n)( *)$/,de="(?:\\d+\\.)",he="(?:[*+-])";function pe(e){return"( *)("+(1===e?de:he)+") +"}const fe=pe(1),me=pe(2);function ge(e){return new RegExp("^"+(1===e?fe:me))}const ve=ge(1),ye=ge(2);function be(e){return new RegExp("^"+(1===e?fe:me)+"[^\\n]*(?:\\n(?!\\1"+(1===e?de:he)+" )[^\\n]*)*(\\n|$)","gm")}const we=be(1),Se=be(2);function xe(e){const t=1===e?de:he;return new RegExp("^( *)("+t+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+t+" (?!"+t+" ))\\n*|\\s*\\n*$)")}const Ee=xe(1),_e=xe(2);function Oe(e,t){const n=1===t,r=n?Ee:_e,i=n?we:Se,a=n?ve:ye;return{match(e,t,n){const i=ce.exec(n);return i&&(t.list||!t.inline&&!t.simple)?r.exec(e=i[1]+e):null},order:1,parse(e,t,r){const o=n?+e[2]:void 0,s=e[0].replace(f,"\n").match(i);let l=!1;return{items:s.map((function(e,n){const i=a.exec(e)[0].length,o=new RegExp("^ {1,"+i+"}","gm"),u=e.replace(o,"").replace(a,""),c=n===s.length-1,d=-1!==u.indexOf("\n\n")||c&&l;l=d;const h=r.inline,p=r.list;let f;r.list=!0,d?(r.inline=!1,f=u.replace(ue,"\n\n")):(r.inline=!0,f=u.replace(ue,""));const m=t(f,r);return r.inline=h,r.list=p,m})),ordered:n,start:o}},render:(t,n,r)=>e(t.ordered?"ol":"ul",{key:r.key,start:"20"===t.type?t.start:void 0},t.items.map((function(t,i){return e("li",{key:i},n(t,r))})))}}const Te=new RegExp("^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['\"]([\\s\\S]*?)['\"])?\\s*\\)"),ke=/^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/,Ce=[m,b,w,A,R,D,N,z,we,Ee,Se,_e],Ae=[...Ce,/^[^\n]+(?: \n|\n{2,})/,I,L];function De(e){return e.replace(/[ÀÁÂÃÄÅàáâãä忯]/g,"a").replace(/[çÇ]/g,"c").replace(/[ðÐ]/g,"d").replace(/[ÈÉÊËéèêë]/g,"e").replace(/[ÏïÎîÍíÌì]/g,"i").replace(/[Ññ]/g,"n").replace(/[øØœŒÕõÔôÓóÒò]/g,"o").replace(/[ÜüÛûÚúÙù]/g,"u").replace(/[ŸÿÝý]/g,"y").replace(/[^a-z0-9- ]/gi,"").replace(/ /gi,"-").toLowerCase()}function Re(e){return J.test(e)?"right":X.test(e)?"center":Y.test(e)?"left":null}function Ie(e,t,n,r){const i=n.inTable;n.inTable=!0;let a=e.trim().split(/( *(?:`[^`]*`|<.*?>.*?<\/.*?>(?!<\/.*?>)|\\\||\|) *)/).reduce(((e,i)=>("|"===i.trim()?e.push(r?{type:"26"}:{type:"27",text:i}):""!==i&&e.push.apply(e,t(i,n)),e)),[]);n.inTable=i;let o=[[]];return a.forEach((function(e,t){"26"===e.type?0!==t&&t!==a.length-1&&o.push([]):("27"!==e.type||null!=a[t+1]&&"26"!==a[t+1].type||(e.text=e.text.trimEnd()),o[o.length-1].push(e))})),o}function Pe(e,t,n){n.inline=!0;const r=e[2]?e[2].replace(K,"").split("|").map(Re):[],i=e[3]?function(e,t,n){return e.trim().split("\n").map((function(e){return Ie(e,t,n,!0)}))}(e[3],t,n):[],a=Ie(e[1],t,n,!!i.length);return n.inline=!1,i.length?{align:r,cells:i,header:a,type:"25"}:{children:a,type:"21"}}function Ne(e,t){return null==e.align[t]?{}:{textAlign:e.align[t]}}function je(e){return function(t,n){return n.inline?e.exec(t):null}}function Le(e){return function(t,n){return n.inline||n.simple?e.exec(t):null}}function Me(e){return function(t,n){return n.inline||n.simple?null:e.exec(t)}}function Fe(e){return function(t){return e.exec(t)}}function Ve(e,t,n){if(t.inline||t.simple)return null;if(n&&!n.endsWith("\n"))return null;let r="";e.split("\n").every((e=>!Ce.some((t=>t.test(e)))&&(r+=e+"\n",e.trim())));const i=r.trimEnd();return""==i?null:[r,i]}function $e(e){try{if(decodeURIComponent(e).replace(/[^A-Za-z0-9/:]/g,"").match(/^\s*(javascript|vbscript|data(?!:image)):/i))return}catch(e){return null}return e}function Be(e){return e.replace(le,"$1")}function ze(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!0,n.simple=!0;const a=e(t,n);return n.inline=r,n.simple=i,a}function Ue(e,t,n){const r=n.inline||!1,i=n.simple||!1;n.inline=!1,n.simple=!0;const a=e(t,n);return n.inline=r,n.simple=i,a}function qe(e,t,n){const r=n.inline||!1;n.inline=!1;const i=e(t,n);return n.inline=r,i}const He=(e,t,n)=>({children:ze(t,e[1],n)});function Ge(){return{}}function We(){return null}function Qe(...e){return e.filter(Boolean).join(" ")}function Ke(e,t,n){let r=e;const i=t.split(".");for(;i.length&&(r=r[i[0]],void 0!==r);)i.shift();return r||n}function Xe(e="",t={}){t.overrides=t.overrides||{},t.slugify=t.slugify||De,t.namedCodesToUnicode=t.namedCodesToUnicode?i({},c,t.namedCodesToUnicode):c;const n=t.createElement||r.createElement;function a(e,r,...a){const o=Ke(t.overrides,`${e}.props`,{});return n(function(e,t){const n=Ke(t,e);return n?"function"==typeof n||"object"==typeof n&&"render"in n?n:Ke(t,`${e}.component`,e):e}(e,t.overrides),i({},r,o,{className:Qe(null==r?void 0:r.className,o.className)||void 0}),...a)}function o(e){e=e.replace(k,"");let n=!1;t.forceInline?n=!0:t.forceBlock||(n=!1===W.test(e));const i=Y(X(n?e:`${e.trimEnd().replace(oe,"")}\n\n`,{inline:n}));for(;"string"==typeof i[i.length-1]&&!i[i.length-1].trim();)i.pop();if(null===t.wrapper)return i;const o=t.wrapper||(n?"span":"div");let s;if(i.length>1||t.forceWrapper)s=i;else{if(1===i.length)return s=i[0],"string"==typeof s?a("span",{key:"outer"},s):s;s=null}return r.createElement(o,{key:"outer"},s)}function s(e){const t=e.match(h);return t?t.reduce((function(e,t,n){const i=t.indexOf("=");if(-1!==i){const a=function(e){return-1!==e.indexOf("-")&&null===e.match(j)&&(e=e.replace(B,(function(e,t){return t.toUpperCase()}))),e}(t.slice(0,i)).trim(),s=function(e){const t=e[0];return('"'===t||"'"===t)&&e.length>=2&&e[e.length-1]===t?e.slice(1,-1):e}(t.slice(i+1).trim()),l=u[a]||a,c=e[l]=function(e,t){return"style"===e?t.split(/;\s?/).reduce((function(e,t){const n=t.slice(0,t.indexOf(":"));return e[n.trim().replace(/(-[a-z])/g,(e=>e[1].toUpperCase()))]=t.slice(n.length+1).trim(),e}),{}):"href"===e||"src"===e?$e(t):(t.match(M)&&(t=t.slice(1,t.length-1)),"true"===t||"false"!==t&&t)}(a,s);"string"==typeof c&&(I.test(c)||L.test(c))&&(e[l]=r.cloneElement(o(c.trim()),{key:n}))}else"style"!==t&&(e[u[t]||t]=!0);return e}),{}):null}const l=[],f={},K={0:{match:Me(m),order:1,parse:(e,t,n)=>({children:t(e[0].replace(g,""),n)}),render:(e,t,n)=>a("blockquote",{key:n.key},t(e.children,n))},1:{match:Fe(v),order:1,parse:Ge,render:(e,t,n)=>a("br",{key:n.key})},2:{match:Me(y),order:1,parse:Ge,render:(e,t,n)=>a("hr",{key:n.key})},3:{match:Me(w),order:0,parse:e=>({lang:void 0,text:e[0].replace(/^ {4}/gm,"").replace(/\n+$/,"")}),render:(e,t,n)=>a("pre",{key:n.key},a("code",i({},e.attrs,{className:e.lang?`lang-${e.lang}`:""}),e.text))},4:{match:Me(b),order:0,parse:e=>({attrs:s(e[3]||""),lang:e[2]||void 0,text:e[4],type:"3"})},5:{match:Le(S),order:3,parse:e=>({text:e[2]}),render:(e,t,n)=>a("code",{key:n.key},e.text)},6:{match:Me(_),order:0,parse:e=>(l.push({footnote:e[2],identifier:e[1]}),{}),render:We},7:{match:je(O),order:1,parse:e=>({target:`#${t.slugify(e[1])}`,text:e[1]}),render:(e,t,n)=>a("a",{key:n.key,href:$e(e.target)},a("sup",{key:n.key},e.text))},8:{match:je(C),order:1,parse:e=>({completed:"x"===e[1].toLowerCase()}),render:(e,t,n)=>a("input",{checked:e.completed,key:n.key,readOnly:!0,type:"checkbox"})},9:{match:Me(t.enforceAtxHeadings?D:A),order:1,parse:(e,n,r)=>({children:ze(n,e[2],r),id:t.slugify(e[2]),level:e[1].length}),render:(e,t,n)=>a(`h${e.level}`,{id:e.id,key:n.key},t(e.children,n))},10:{match:Me(R),order:0,parse:(e,t,n)=>({children:ze(t,e[1],n),level:"="===e[2]?1:2,type:"9"})},11:{match:Fe(I),order:1,parse(e,t,n){const[,r]=e[3].match(se),i=new RegExp(`^${r}`,"gm"),a=e[3].replace(i,""),o=(l=a,Ae.some((e=>e.test(l)))?qe:ze);var l;const u=e[1].toLowerCase(),c=-1!==d.indexOf(u),h={attrs:s(e[2]),noInnerParse:c,tag:(c?u:e[1]).trim()};return n.inAnchor=n.inAnchor||"a"===u,c?h.text=e[3]:h.children=o(t,a,n),n.inAnchor=!1,h},render:(e,t,n)=>a(e.tag,i({key:n.key},e.attrs),e.text||t(e.children,n))},13:{match:Fe(L),order:1,parse:e=>({attrs:s(e[2]||""),tag:e[1].trim()}),render:(e,t,n)=>a(e.tag,i({},e.attrs,{key:n.key}))},12:{match:Fe(N),order:1,parse:()=>({}),render:We},14:{match:Le(ke),order:1,parse:e=>({alt:e[1],target:Be(e[2]),title:e[3]}),render:(e,t,n)=>a("img",{key:n.key,alt:e.alt||void 0,title:e.title||void 0,src:$e(e.target)})},15:{match:je(Te),order:3,parse:(e,t,n)=>({children:Ue(t,e[1],n),target:Be(e[2]),title:e[3]}),render:(e,t,n)=>a("a",{key:n.key,href:$e(e.target),title:e.title},t(e.children,n))},16:{match:je($),order:0,parse:e=>({children:[{text:e[1],type:"27"}],target:e[1],type:"15"})},17:{match:(e,t)=>t.inAnchor?null:je(F)(e,t),order:0,parse:e=>({children:[{text:e[1],type:"27"}],target:e[1],title:void 0,type:"15"})},18:{match:je(V),order:0,parse(e){let t=e[1],n=e[1];return p.test(n)||(n="mailto:"+n),{children:[{text:t.replace("mailto:",""),type:"27"}],target:n,type:"15"}}},20:Oe(a,1),33:Oe(a,2),19:{match:Me(x),order:3,parse:Ge,render:()=>"\n"},21:{match:Ve,order:3,parse:He,render:(e,t,n)=>a("p",{key:n.key},t(e.children,n))},22:{match:je(U),order:0,parse:e=>(f[e[1]]={target:e[2],title:e[4]},{}),render:We},23:{match:Le(q),order:0,parse:e=>({alt:e[1]||void 0,ref:e[2]}),render:(e,t,n)=>f[e.ref]?a("img",{key:n.key,alt:e.alt,src:$e(f[e.ref].target),title:f[e.ref].title}):null},24:{match:je(H),order:0,parse:(e,t,n)=>({children:t(e[1],n),fallbackChildren:t(e[0].replace(G,"\\$1"),n),ref:e[2]}),render:(e,t,n)=>f[e.ref]?a("a",{key:n.key,href:$e(f[e.ref].target),title:f[e.ref].title},t(e.children,n)):a("span",{key:n.key},t(e.fallbackChildren,n))},25:{match:Me(z),order:1,parse:Pe,render(e,t,n){const r=e;return a("table",{key:n.key},a("thead",null,a("tr",null,r.header.map((function(e,i){return a("th",{key:i,style:Ne(r,i)},t(e,n))})))),a("tbody",null,r.cells.map((function(e,i){return a("tr",{key:i},e.map((function(e,i){return a("td",{key:i,style:Ne(r,i)},t(e,n))})))}))))}},27:{match:Fe(ae),order:4,parse:e=>({text:e[0].replace(P,((e,n)=>t.namedCodesToUnicode[n]?t.namedCodesToUnicode[n]:e))}),render:e=>e.text},28:{match:Le(ee),order:2,parse:(e,t,n)=>({children:t(e[2],n)}),render:(e,t,n)=>a("strong",{key:n.key},t(e.children,n))},29:{match:Le(te),order:3,parse:(e,t,n)=>({children:t(e[2],n)}),render:(e,t,n)=>a("em",{key:n.key},t(e.children,n))},30:{match:Le(ie),order:1,parse:e=>({text:e[1],type:"27"})},31:{match:Le(ne),order:3,parse:He,render:(e,t,n)=>a("mark",{key:n.key},t(e.children,n))},32:{match:Le(re),order:3,parse:He,render:(e,t,n)=>a("del",{key:n.key},t(e.children,n))}};!0===t.disableParsingRawHTML&&(delete K[11],delete K[13]);const X=function(e){let t=Object.keys(e);function n(r,i){let a=[],o="";for(;r;){let s=0;for(;s<t.length;){const l=t[s],u=e[l],c=u.match(r,i,o);if(c){const e=c[0];r=r.substring(e.length);const t=u.parse(c,n,i);null==t.type&&(t.type=l),a.push(t),o=e;break}s++}}return a}return t.sort((function(t,n){let r=e[t].order,i=e[n].order;return r!==i?r-i:t<n?-1:1})),function(e,t){return n(function(e){return e.replace(E,"\n").replace(T,"").replace(Q," ")}(e),t)}}(K),Y=(J=function(e,t){return function(n,r,i){const a=e[n.type].render;return t?t((()=>a(n,r,i)),n,r,i):a(n,r,i)}}(K,t.renderRule),function e(t,n={}){if(Array.isArray(t)){const r=n.key,i=[];let a=!1;for(let r=0;r<t.length;r++){n.key=r;const o=e(t[r],n),s="string"==typeof o;s&&a?i[i.length-1]+=o:null!==o&&i.push(o),a=s}return n.key=r,i}return J(t,e,n)});var J;const Z=o(e);return l.length?a("div",null,Z,a("footer",{key:"footer"},l.map((function(e){return a("div",{id:t.slugify(e.identifier),key:e.identifier},e.identifier,Y(X(e.footnote,{inline:!0})))})))):Z}const Ye=e=>{let{children:t="",options:n}=e,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}(e,a);return r.cloneElement(Xe(t,n),i)}},8987:(e,t,n)=>{"use strict";n.d(t,{Ak:()=>r});let r=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t}},8537:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});class r{value;next;constructor(e){this.value=e}}class i{#K;#X;#Y;constructor(){this.clear()}enqueue(e){const t=new r(e);this.#K?(this.#X.next=t,this.#X=t):(this.#K=t,this.#X=t),this.#Y++}dequeue(){const e=this.#K;if(e)return this.#K=this.#K.next,this.#Y--,e.value}peek(){if(this.#K)return this.#K.value}clear(){this.#K=void 0,this.#X=void 0,this.#Y=0}get size(){return this.#Y}*[Symbol.iterator](){let e=this.#K;for(;e;)yield e.value,e=e.next}}function a(e){o(e);const t=new i;let n=0;const r=()=>{n<e&&t.size>0&&(t.dequeue()(),n++)},a=async(e,t,i)=>{const a=(async()=>e(...i))();t(a);try{await a}catch{}n--,r()},s=(i,...o)=>new Promise((s=>{((i,o,s)=>{new Promise((e=>{t.enqueue(e)})).then(a.bind(void 0,i,o,s)),(async()=>{await Promise.resolve(),n<e&&r()})()})(i,s,o)}));return Object.defineProperties(s,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value(){t.clear()}},concurrency:{get:()=>e,set(i){o(i),e=i,queueMicrotask((()=>{for(;n<e&&t.size>0;)r()}))}}}),s}function o(e){if(!Number.isInteger(e)&&e!==Number.POSITIVE_INFINITY||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up")}},9215:(e,t,n)=>{"use strict";n.d(t,{mN:()=>De,xI:()=>B});var r=n(5959),i=e=>"checkbox"===e.type,a=e=>e instanceof Date,o=e=>null==e;const s=e=>"object"==typeof e;var l=e=>!o(e)&&!Array.isArray(e)&&s(e)&&!a(e),u=e=>l(e)&&e.target?i(e.target)?e.target.checked:e.target.value:e,c=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),d=e=>{const t=e.constructor&&e.constructor.prototype;return l(t)&&t.hasOwnProperty("isPrototypeOf")},h="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function p(e){let t;const n=Array.isArray(e),r="undefined"!=typeof FileList&&e instanceof FileList;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(h&&(e instanceof Blob||r)||!n&&!l(e))return e;if(t=n?[]:{},n||d(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=p(e[n]));else t=e}return t}var f=e=>Array.isArray(e)?e.filter(Boolean):[],m=e=>void 0===e,g=(e,t,n)=>{if(!t||!l(e))return n;const r=f(t.split(/[,[\].]+?/)).reduce(((e,t)=>o(e)?e:e[t]),e);return m(r)||r===e?m(e[t])?n:e[t]:r},v=e=>"boolean"==typeof e,y=e=>/^\w*$/.test(e),b=e=>f(e.replace(/["|']|\]/g,"").split(/\.|\[/)),w=(e,t,n)=>{let r=-1;const i=y(t)?[t]:b(t),a=i.length,o=a-1;for(;++r<a;){const t=i[r];let a=n;if(r!==o){const n=e[t];a=l(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=a,e=e[t]}return e};const S={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},x={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},E="max",_="min",O="maxLength",T="minLength",k="pattern",C="required",A="validate",D=r.createContext(null),R=()=>r.useContext(D);var I=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const i=a;return t._proxyFormState[i]!==x.all&&(t._proxyFormState[i]=!r||x.all),n&&(n[i]=!0),e[i]}});return i},P=e=>l(e)&&!Object.keys(e).length,N=(e,t,n,r)=>{n(e);const{name:i,...a}=e;return P(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find((e=>t[e]===(!r||x.all)))},j=e=>Array.isArray(e)?e:[e],L=(e,t,n)=>!e||!t||e===t||j(e).some((e=>e&&(n?e===t:e.startsWith(t)||t.startsWith(e))));function M(e){const t=r.useRef(e);t.current=e,r.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var F=e=>"string"==typeof e,V=(e,t,n,r,i)=>F(e)?(r&&t.watch.add(e),g(n,e,i)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),g(n,e)))):(r&&(t.watchAll=!0),n);function $(e){const t=R(),{name:n,disabled:i,control:a=t.control,shouldUnregister:o}=e,s=c(a._names.array,n),l=function(e){const t=R(),{control:n=t.control,name:i,defaultValue:a,disabled:o,exact:s}=e||{},l=r.useRef(i);l.current=i,M({disabled:o,subject:n._subjects.values,next:e=>{L(l.current,e.name,s)&&c(p(V(l.current,n._names,e.values||n._formValues,!1,a)))}});const[u,c]=r.useState(n._getWatch(i,a));return r.useEffect((()=>n._removeUnmounted())),u}({control:a,name:n,defaultValue:g(a._formValues,n,g(a._defaultValues,n,e.defaultValue)),exact:!0}),d=function(e){const t=R(),{control:n=t.control,disabled:i,name:a,exact:o}=e||{},[s,l]=r.useState(n._formState),u=r.useRef(!0),c=r.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=r.useRef(a);return d.current=a,M({disabled:i,next:e=>u.current&&L(d.current,e.name,o)&&N(e,c.current,n._updateFormState)&&l({...n._formState,...e}),subject:n._subjects.state}),r.useEffect((()=>(u.current=!0,c.current.isValid&&n._updateValid(!0),()=>{u.current=!1})),[n]),r.useMemo((()=>I(s,n,c.current,!1)),[s,n])}({control:a,name:n,exact:!0}),h=r.useRef(a.register(n,{...e.rules,value:l,...v(e.disabled)?{disabled:e.disabled}:{}})),f=r.useMemo((()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!g(d.errors,n)},isDirty:{enumerable:!0,get:()=>!!g(d.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!g(d.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!g(d.validatingFields,n)},error:{enumerable:!0,get:()=>g(d.errors,n)}})),[d,n]),y=r.useMemo((()=>({name:n,value:l,...v(i)||d.disabled?{disabled:d.disabled||i}:{},onChange:e=>h.current.onChange({target:{value:u(e),name:n},type:S.CHANGE}),onBlur:()=>h.current.onBlur({target:{value:g(a._formValues,n),name:n},type:S.BLUR}),ref:e=>{const t=g(a._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}})),[n,a._formValues,i,d.disabled,l,a._fields]);return r.useEffect((()=>{const e=a._options.shouldUnregister||o,t=(e,t)=>{const n=g(a._fields,e);n&&n._f&&(n._f.mount=t)};if(t(n,!0),e){const e=p(g(a._options.defaultValues,n));w(a._defaultValues,n,e),m(g(a._formValues,n))&&w(a._formValues,n,e)}return!s&&a.register(n),()=>{(s?e&&!a._state.action:e)?a.unregister(n):t(n,!1)}}),[n,a,s,o]),r.useEffect((()=>{a._updateDisabledField({disabled:i,fields:a._fields,name:n})}),[i,n,a]),r.useMemo((()=>({field:y,formState:d,fieldState:f})),[y,d,f])}const B=e=>e.render($(e));var z=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},U=e=>({isOnSubmit:!e||e===x.onSubmit,isOnBlur:e===x.onBlur,isOnChange:e===x.onChange,isOnAll:e===x.all,isOnTouch:e===x.onTouched}),q=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const H=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const n=g(e,i);if(n){const{_f:e,...a}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],i)&&!r)return!0;if(e.ref&&t(e.ref,e.name)&&!r)return!0;if(H(a,t))break}else if(l(a)&&H(a,t))break}}};var G=(e,t,n)=>{const r=j(g(e,n));return w(r,"root",t[n]),w(e,n,r),e},W=e=>"file"===e.type,Q=e=>"function"==typeof e,K=e=>{if(!h)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},X=e=>F(e),Y=e=>"radio"===e.type,J=e=>e instanceof RegExp;const Z={value:!1,isValid:!1},ee={value:!0,isValid:!0};var te=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!m(e[0].attributes.value)?m(e[0].value)||""===e[0].value?ee:{value:e[0].value,isValid:!0}:ee:Z}return Z};const ne={isValid:!1,value:null};var re=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),ne):ne;function ie(e,t,n="validate"){if(X(e)||Array.isArray(e)&&e.every(X)||v(e)&&!e)return{type:n,message:X(e)?e:"",ref:t}}var ae=e=>l(e)&&!J(e)?e:{value:e,message:""},oe=async(e,t,n,r,a,s)=>{const{ref:u,refs:c,required:d,maxLength:h,minLength:p,min:f,max:y,pattern:b,validate:w,name:S,valueAsNumber:x,mount:D}=e._f,R=g(n,S);if(!D||t.has(S))return{};const I=c?c[0]:u,N=e=>{a&&I.reportValidity&&(I.setCustomValidity(v(e)?"":e||""),I.reportValidity())},j={},L=Y(u),M=i(u),V=L||M,$=(x||W(u))&&m(u.value)&&m(R)||K(u)&&""===u.value||""===R||Array.isArray(R)&&!R.length,B=z.bind(null,S,r,j),U=(e,t,n,r=O,i=T)=>{const a=e?t:n;j[S]={type:e?r:i,message:a,ref:u,...B(e?r:i,a)}};if(s?!Array.isArray(R)||!R.length:d&&(!V&&($||o(R))||v(R)&&!R||M&&!te(c).isValid||L&&!re(c).isValid)){const{value:e,message:t}=X(d)?{value:!!d,message:d}:ae(d);if(e&&(j[S]={type:C,message:t,ref:I,...B(C,t)},!r))return N(t),j}if(!($||o(f)&&o(y))){let e,t;const n=ae(y),i=ae(f);if(o(R)||isNaN(R)){const r=u.valueAsDate||new Date(R),a=e=>new Date((new Date).toDateString()+" "+e),o="time"==u.type,s="week"==u.type;F(n.value)&&R&&(e=o?a(R)>a(n.value):s?R>n.value:r>new Date(n.value)),F(i.value)&&R&&(t=o?a(R)<a(i.value):s?R<i.value:r<new Date(i.value))}else{const r=u.valueAsNumber||(R?+R:R);o(n.value)||(e=r>n.value),o(i.value)||(t=r<i.value)}if((e||t)&&(U(!!e,n.message,i.message,E,_),!r))return N(j[S].message),j}if((h||p)&&!$&&(F(R)||s&&Array.isArray(R))){const e=ae(h),t=ae(p),n=!o(e.value)&&R.length>+e.value,i=!o(t.value)&&R.length<+t.value;if((n||i)&&(U(n,e.message,t.message),!r))return N(j[S].message),j}if(b&&!$&&F(R)){const{value:e,message:t}=ae(b);if(J(e)&&!R.match(e)&&(j[S]={type:k,message:t,ref:u,...B(k,t)},!r))return N(t),j}if(w)if(Q(w)){const e=ie(await w(R,n),I);if(e&&(j[S]={...e,...B(A,e.message)},!r))return N(e.message),j}else if(l(w)){let e={};for(const t in w){if(!P(e)&&!r)break;const i=ie(await w[t](R,n),I,t);i&&(e={...i,...B(t,i.message)},N(i.message),r&&(j[S]=e))}if(!P(e)&&(j[S]={ref:I,...e},!r))return j}return N(!0),j};function se(e,t){const n=Array.isArray(t)?t:y(t)?[t]:b(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=m(e)?r++:e[t[r++]];return e}(e,n),i=n.length-1,a=n[i];return r&&delete r[a],0!==i&&(l(r)&&P(r)||Array.isArray(r)&&function(e){for(const t in e)if(e.hasOwnProperty(t)&&!m(e[t]))return!1;return!0}(r))&&se(e,n.slice(0,-1)),e}var le=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},ue=e=>o(e)||!s(e);function ce(e,t){if(ue(e)||ue(t))return e===t;if(a(e)&&a(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const n=e[i];if(!r.includes(i))return!1;if("ref"!==i){const e=t[i];if(a(n)&&a(e)||l(n)&&l(e)||Array.isArray(n)&&Array.isArray(e)?!ce(n,e):n!==e)return!1}}return!0}var de=e=>"select-multiple"===e.type,he=e=>Y(e)||i(e),pe=e=>K(e)&&e.isConnected,fe=e=>{for(const t in e)if(Q(e[t]))return!0;return!1};function me(e,t={}){const n=Array.isArray(e);if(l(e)||n)for(const n in e)Array.isArray(e[n])||l(e[n])&&!fe(e[n])?(t[n]=Array.isArray(e[n])?[]:{},me(e[n],t[n])):o(e[n])||(t[n]=!0);return t}function ge(e,t,n){const r=Array.isArray(e);if(l(e)||r)for(const r in e)Array.isArray(e[r])||l(e[r])&&!fe(e[r])?m(t)||ue(n[r])?n[r]=Array.isArray(e[r])?me(e[r],[]):{...me(e[r])}:ge(e[r],o(t)?{}:t[r],n[r]):n[r]=!ce(e[r],t[r]);return n}var ve=(e,t)=>ge(e,t,me(t)),ye=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>m(e)?e:t?""===e?NaN:e?+e:e:n&&F(e)?new Date(e):r?r(e):e;function be(e){const t=e.ref;return W(t)?t.files:Y(t)?re(e.refs).value:de(t)?[...t.selectedOptions].map((({value:e})=>e)):i(t)?te(e.refs).value:ye(m(t.value)?e.ref.value:t.value,e)}var we=(e,t,n,r)=>{const i={};for(const n of e){const e=g(t,n);e&&w(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Se=e=>m(e)?e:J(e)?e.source:l(e)?J(e.value)?e.value.source:e.value:e;const xe="AsyncFunction";var Ee=e=>!!e&&!!e.validate&&!!(Q(e.validate)&&e.validate.constructor.name===xe||l(e.validate)&&Object.values(e.validate).find((e=>e.constructor.name===xe))),_e=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Oe(e,t,n){const r=g(e,n);if(r||y(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const r=i.join("."),a=g(t,r),o=g(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};i.pop()}return{name:n}}var Te=(e,t,n,r,i)=>!i.isOnAll&&(!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e),ke=(e,t)=>!f(g(e,t)).length&&se(e,t);const Ce={mode:x.onSubmit,reValidateMode:x.onChange,shouldFocusError:!0};function Ae(e={}){let t,n={...Ce,...e},r={submitCount:0,isDirty:!1,isLoading:Q(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},s={},d=(l(n.defaultValues)||l(n.values))&&p(n.defaultValues||n.values)||{},y=n.shouldUnregister?{}:p(d),b={action:!1,mount:!1,watch:!1},E={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},_=0;const O={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},T={values:le(),array:le(),state:le()},k=U(n.mode),C=U(n.reValidateMode),A=n.criteriaMode===x.all,D=async e=>{if(!n.disabled&&(O.isValid||e)){const e=n.resolver?P((await M()).errors):await $(s,!0);e!==r.isValid&&T.state.next({isValid:e})}},R=(e,t)=>{n.disabled||!O.isValidating&&!O.validatingFields||((e||Array.from(E.mount)).forEach((e=>{e&&(t?w(r.validatingFields,e,t):se(r.validatingFields,e))})),T.state.next({validatingFields:r.validatingFields,isValidating:!P(r.validatingFields)}))},I=(e,t,n,r)=>{const i=g(s,e);if(i){const a=g(y,e,m(n)?g(d,e):n);m(a)||r&&r.defaultChecked||t?w(y,e,t?a:be(i._f)):X(e,a),b.mount&&D()}},N=(e,t,i,a,o)=>{let l=!1,u=!1;const c={name:e};if(!n.disabled){const n=!!(g(s,e)&&g(s,e)._f&&g(s,e)._f.disabled);if(!i||a){O.isDirty&&(u=r.isDirty,r.isDirty=c.isDirty=B(),l=u!==c.isDirty);const i=n||ce(g(d,e),t);u=!(n||!g(r.dirtyFields,e)),i||n?se(r.dirtyFields,e):w(r.dirtyFields,e,!0),c.dirtyFields=r.dirtyFields,l=l||O.dirtyFields&&u!==!i}if(i){const t=g(r.touchedFields,e);t||(w(r.touchedFields,e,i),c.touchedFields=r.touchedFields,l=l||O.touchedFields&&t!==i)}l&&o&&T.state.next(c)}return l?c:{}},L=(e,i,a,o)=>{const s=g(r.errors,e),l=O.isValid&&v(i)&&r.isValid!==i;var u;if(n.delayError&&a?(u=()=>((e,t)=>{w(r.errors,e,t),T.state.next({errors:r.errors})})(e,a),t=e=>{clearTimeout(_),_=setTimeout(u,e)},t(n.delayError)):(clearTimeout(_),t=null,a?w(r.errors,e,a):se(r.errors,e)),(a?!ce(s,a):s)||!P(o)||l){const t={...o,...l&&v(i)?{isValid:i}:{},errors:r.errors,name:e};r={...r,...t},T.state.next(t)}},M=async e=>{R(e,!0);const t=await n.resolver(y,n.context,we(e||E.mount,s,n.criteriaMode,n.shouldUseNativeValidation));return R(e),t},$=async(e,t,i={valid:!0})=>{for(const a in e){const o=e[a];if(o){const{_f:e,...s}=o;if(e){const s=E.array.has(e.name),l=o._f&&Ee(o._f);l&&O.validatingFields&&R([a],!0);const u=await oe(o,E.disabled,y,A,n.shouldUseNativeValidation&&!t,s);if(l&&O.validatingFields&&R([a]),u[e.name]&&(i.valid=!1,t))break;!t&&(g(u,e.name)?s?G(r.errors,u,e.name):w(r.errors,e.name,u[e.name]):se(r.errors,e.name))}!P(s)&&await $(s,t,i)}}return i.valid},B=(e,t)=>!n.disabled&&(e&&t&&w(y,e,t),!ce(ne(),d)),z=(e,t,n)=>V(e,E,{...b.mount?y:m(t)?d:F(e)?{[e]:t}:t},n,t),X=(e,t,n={})=>{const r=g(s,e);let a=t;if(r){const n=r._f;n&&(!n.disabled&&w(y,e,ye(t,n)),a=K(n.ref)&&o(t)?"":t,de(n.ref)?[...n.ref.options].forEach((e=>e.selected=a.includes(e.value))):n.refs?i(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(a)?!!a.find((t=>t===e.value)):a===e.value))):n.refs[0]&&(n.refs[0].checked=!!a):n.refs.forEach((e=>e.checked=e.value===a)):W(n.ref)?n.ref.value="":(n.ref.value=a,n.ref.type||T.values.next({name:e,values:{...y}})))}(n.shouldDirty||n.shouldTouch)&&N(e,a,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&te(e)},Y=(e,t,n)=>{for(const r in t){const i=t[r],o=`${e}.${r}`,u=g(s,o);(E.array.has(e)||l(i)||u&&!u._f)&&!a(i)?Y(o,i,n):X(o,i,n)}},J=(e,t,n={})=>{const i=g(s,e),a=E.array.has(e),l=p(t);w(y,e,l),a?(T.array.next({name:e,values:{...y}}),(O.isDirty||O.dirtyFields)&&n.shouldDirty&&T.state.next({name:e,dirtyFields:ve(d,y),isDirty:B(e,l)})):!i||i._f||o(l)?X(e,l,n):Y(e,l,n),q(e,E)&&T.state.next({...r}),T.values.next({name:b.mount?e:void 0,values:{...y}})},Z=async e=>{b.mount=!0;const i=e.target;let o=i.name,l=!0;const c=g(s,o),d=e=>{l=Number.isNaN(e)||a(e)&&isNaN(e.getTime())||ce(e,g(y,o,e))};if(c){let a,h;const p=i.type?be(c._f):u(e),f=e.type===S.BLUR||e.type===S.FOCUS_OUT,m=!_e(c._f)&&!n.resolver&&!g(r.errors,o)&&!c._f.deps||Te(f,g(r.touchedFields,o),r.isSubmitted,C,k),v=q(o,E,f);w(y,o,p),f?(c._f.onBlur&&c._f.onBlur(e),t&&t(0)):c._f.onChange&&c._f.onChange(e);const b=N(o,p,f,!1),x=!P(b)||v;if(!f&&T.values.next({name:o,type:e.type,values:{...y}}),m)return O.isValid&&("onBlur"===n.mode&&f?D():f||D()),x&&T.state.next({name:o,...v?{}:b});if(!f&&v&&T.state.next({...r}),n.resolver){const{errors:e}=await M([o]);if(d(p),l){const t=Oe(r.errors,s,o),n=Oe(e,s,t.name||o);a=n.error,o=n.name,h=P(e)}}else R([o],!0),a=(await oe(c,E.disabled,y,A,n.shouldUseNativeValidation))[o],R([o]),d(p),l&&(a?h=!1:O.isValid&&(h=await $(s,!0)));l&&(c._f.deps&&te(c._f.deps),L(o,h,a,b))}},ee=(e,t)=>{if(g(r.errors,t)&&e.focus)return e.focus(),1},te=async(e,t={})=>{let i,a;const o=j(e);if(n.resolver){const t=await(async e=>{const{errors:t}=await M(e);if(e)for(const n of e){const e=g(t,n);e?w(r.errors,n,e):se(r.errors,n)}else r.errors=t;return t})(m(e)?e:o);i=P(t),a=e?!o.some((e=>g(t,e))):i}else e?(a=(await Promise.all(o.map((async e=>{const t=g(s,e);return await $(t&&t._f?{[e]:t}:t)})))).every(Boolean),(a||r.isValid)&&D()):a=i=await $(s);return T.state.next({...!F(e)||O.isValid&&i!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:i}:{},errors:r.errors}),t.shouldFocus&&!a&&H(s,ee,e?o:E.mount),a},ne=e=>{const t={...b.mount?y:d};return m(e)?t:F(e)?g(t,e):e.map((e=>g(t,e)))},re=(e,t)=>({invalid:!!g((t||r).errors,e),isDirty:!!g((t||r).dirtyFields,e),error:g((t||r).errors,e),isValidating:!!g(r.validatingFields,e),isTouched:!!g((t||r).touchedFields,e)}),ie=(e,t,n)=>{const i=(g(s,e,{_f:{}})._f||{}).ref,a=g(r.errors,e)||{},{ref:o,message:l,type:u,...c}=a;w(r.errors,e,{...c,...t,ref:i}),T.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&i&&i.focus&&i.focus()},ae=(e,t={})=>{for(const i of e?j(e):E.mount)E.mount.delete(i),E.array.delete(i),t.keepValue||(se(s,i),se(y,i)),!t.keepError&&se(r.errors,i),!t.keepDirty&&se(r.dirtyFields,i),!t.keepTouched&&se(r.touchedFields,i),!t.keepIsValidating&&se(r.validatingFields,i),!n.shouldUnregister&&!t.keepDefaultValue&&se(d,i);T.values.next({values:{...y}}),T.state.next({...r,...t.keepDirty?{isDirty:B()}:{}}),!t.keepIsValid&&D()},ue=({disabled:e,name:t,field:n,fields:r})=>{(v(e)&&b.mount||e||E.disabled.has(t))&&(e?E.disabled.add(t):E.disabled.delete(t),N(t,be(n?n._f:g(r,t)._f),!1,!1,!0))},fe=(e,t={})=>{let r=g(s,e);const i=v(t.disabled)||v(n.disabled);return w(s,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),E.mount.add(e),r?ue({field:r,disabled:v(t.disabled)?t.disabled:n.disabled,name:e}):I(e,!0,t.value),{...i?{disabled:t.disabled||n.disabled}:{},...n.progressive?{required:!!t.required,min:Se(t.min),max:Se(t.max),minLength:Se(t.minLength),maxLength:Se(t.maxLength),pattern:Se(t.pattern)}:{},name:e,onChange:Z,onBlur:Z,ref:i=>{if(i){fe(e,t),r=g(s,e);const n=m(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,a=he(n),o=r._f.refs||[];if(a?o.find((e=>e===n)):n===r._f.ref)return;w(s,e,{_f:{...r._f,...a?{refs:[...o.filter(pe),n,...Array.isArray(g(d,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),I(e,!1,void 0,n)}else r=g(s,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!c(E.array,e)||!b.action)&&E.unMount.add(e)}}},me=()=>n.shouldFocusError&&H(s,ee,E.mount),ge=(e,t)=>async i=>{let a;i&&(i.preventDefault&&i.preventDefault(),i.persist&&i.persist());let o=p(y);if(E.disabled.size)for(const e of E.disabled)w(o,e,void 0);if(T.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await M();r.errors=e,o=t}else await $(s);if(se(r.errors,"root"),P(r.errors)){T.state.next({errors:{}});try{await e(o,i)}catch(e){a=e}}else t&&await t({...r.errors},i),me(),setTimeout(me);if(T.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:P(r.errors)&&!a,submitCount:r.submitCount+1,errors:r.errors}),a)throw a},xe=(e,t={})=>{const i=e?p(e):d,a=p(i),o=P(e),l=o?d:a;if(t.keepDefaultValues||(d=i),!t.keepValues){if(t.keepDirtyValues){const e=new Set([...E.mount,...Object.keys(ve(d,y))]);for(const t of Array.from(e))g(r.dirtyFields,t)?w(l,t,g(y,t)):J(t,g(l,t))}else{if(h&&m(e))for(const e of E.mount){const t=g(s,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(K(e)){const t=e.closest("form");if(t){t.reset();break}}}}s={}}y=n.shouldUnregister?t.keepDefaultValues?p(d):{}:p(l),T.array.next({values:{...l}}),T.values.next({values:{...l}})}E={mount:t.keepDirtyValues?E.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},b.mount=!O.isValid||!!t.keepIsValid||!!t.keepDirtyValues,b.watch=!!n.shouldUnregister,T.state.next({submitCount:t.keepSubmitCount?r.submitCount:0,isDirty:!o&&(t.keepDirty?r.isDirty:!(!t.keepDefaultValues||ce(e,d))),isSubmitted:!!t.keepIsSubmitted&&r.isSubmitted,dirtyFields:o?{}:t.keepDirtyValues?t.keepDefaultValues&&y?ve(d,y):r.dirtyFields:t.keepDefaultValues&&e?ve(d,e):t.keepDirty?r.dirtyFields:{},touchedFields:t.keepTouched?r.touchedFields:{},errors:t.keepErrors?r.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},Ae=(e,t)=>xe(Q(e)?e(y):e,t);return{control:{register:fe,unregister:ae,getFieldState:re,handleSubmit:ge,setError:ie,_executeSchema:M,_getWatch:z,_getDirty:B,_updateValid:D,_removeUnmounted:()=>{for(const e of E.unMount){const t=g(s,e);t&&(t._f.refs?t._f.refs.every((e=>!pe(e))):!pe(t._f.ref))&&ae(e)}E.unMount=new Set},_updateFieldArray:(e,t=[],i,a,o=!0,l=!0)=>{if(a&&i&&!n.disabled){if(b.action=!0,l&&Array.isArray(g(s,e))){const t=i(g(s,e),a.argA,a.argB);o&&w(s,e,t)}if(l&&Array.isArray(g(r.errors,e))){const t=i(g(r.errors,e),a.argA,a.argB);o&&w(r.errors,e,t),ke(r.errors,e)}if(O.touchedFields&&l&&Array.isArray(g(r.touchedFields,e))){const t=i(g(r.touchedFields,e),a.argA,a.argB);o&&w(r.touchedFields,e,t)}O.dirtyFields&&(r.dirtyFields=ve(d,y)),T.state.next({name:e,isDirty:B(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else w(y,e,t)},_updateDisabledField:ue,_getFieldArray:e=>f(g(b.mount?y:d,e,n.shouldUnregister?g(d,e,[]):[])),_reset:xe,_resetDefaultValues:()=>Q(n.defaultValues)&&n.defaultValues().then((e=>{Ae(e,n.resetOptions),T.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{v(e)&&(T.state.next({disabled:e}),H(s,((t,n)=>{const r=g(s,n);r&&(t.disabled=r._f.disabled||e,Array.isArray(r._f.refs)&&r._f.refs.forEach((t=>{t.disabled=r._f.disabled||e})))}),0,!1))},_subjects:T,_proxyFormState:O,_setErrors:e=>{r.errors=e,T.state.next({errors:r.errors,isValid:!1})},get _fields(){return s},get _formValues(){return y},get _state(){return b},set _state(e){b=e},get _defaultValues(){return d},get _names(){return E},set _names(e){E=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:te,register:fe,handleSubmit:ge,watch:(e,t)=>Q(e)?T.values.subscribe({next:n=>e(z(void 0,t),n)}):z(e,t,!0),setValue:J,getValues:ne,reset:Ae,resetField:(e,t={})=>{g(s,e)&&(m(t.defaultValue)?J(e,p(g(d,e))):(J(e,t.defaultValue),w(d,e,p(t.defaultValue))),t.keepTouched||se(r.touchedFields,e),t.keepDirty||(se(r.dirtyFields,e),r.isDirty=t.defaultValue?B(e,p(g(d,e))):B()),t.keepError||(se(r.errors,e),O.isValid&&D()),T.state.next({...r}))},clearErrors:e=>{e&&j(e).forEach((e=>se(r.errors,e))),T.state.next({errors:e?r.errors:{}})},unregister:ae,setError:ie,setFocus:(e,t={})=>{const n=g(s,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&Q(e.select)&&e.select())}},getFieldState:re}}function De(e={}){const t=r.useRef(void 0),n=r.useRef(void 0),[i,a]=r.useState({isDirty:!1,isValidating:!1,isLoading:Q(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Q(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Ae(e),formState:i});const o=t.current.control;return o._options=e,M({subject:o._subjects.state,next:e=>{N(e,o._proxyFormState,o._updateFormState,!0)&&a({...o._formState})}}),r.useEffect((()=>o._disableForm(e.disabled)),[o,e.disabled]),r.useEffect((()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==i.isDirty&&o._subjects.state.next({isDirty:e})}}),[o,i.isDirty]),r.useEffect((()=>{e.values&&!ce(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,a((e=>({...e})))):o._resetDefaultValues()}),[e.values,o]),r.useEffect((()=>{e.errors&&o._setErrors(e.errors)}),[e.errors,o]),r.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),r.useEffect((()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[e.shouldUnregister,o]),t.current.formState=I(i,o),t.current}},9488:(e,t,n)=>{"use strict";n.d(t,{A:()=>T});var r=n(5959),i=e=>"string"!=typeof e?{}:e.split(/ ?; ?/).reduce(((e,t)=>{const[n,r]=t.split(/ ?: ?/).map(((e,t)=>0===t?e.replace(/\s+/g,""):e.trim()));if(n&&r){const t=n.replace(/(\w)-(\w)/g,((e,t,n)=>`${t}${n.toUpperCase()}`));let i=r.trim();Number.isNaN(Number(r))||(i=Number(r)),e[n.startsWith("-")?n:t]=i}return e}),{});var a=["br","col","colgroup","dl","hr","iframe","img","input","link","menuitem","meta","ol","param","select","table","tbody","tfoot","thead","tr","ul","wbr"],o={"accept-charset":"acceptCharset",acceptcharset:"acceptCharset",accesskey:"accessKey",allowfullscreen:"allowFullScreen",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",class:"className",classid:"classID",classname:"className",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",controlslist:"controlsList",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",datetime:"dateTime",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",enctype:"encType",for:"htmlFor",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",innerhtml:"innerHTML",inputmode:"inputMode",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",marginwidth:"marginWidth",marginheight:"marginHeight",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",nomodule:"noModule",novalidate:"noValidate",playsinline:"playsInline",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",typemustmatch:"typeMustMatch",usemap:"useMap",accentheight:"accentHeight","accent-height":"accentHeight",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",arabicform:"arabicForm","arabic-form":"arabicForm",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",diffuseconstant:"diffuseConstant",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",edgemode:"edgeMode",enablebackground:"enableBackground","enable-background":"enableBackground",externalresourcesrequired:"externalResourcesRequired",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",imagerendering:"imageRendering","image-rendering":"imageRendering",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",vmathematical:"vMathematical","v-mathematical":"vMathematical",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan",onblur:"onBlur",onchange:"onChange",onclick:"onClick",oncontextmenu:"onContextMenu",ondoubleclick:"onDoubleClick",ondrag:"onDrag",ondragend:"onDragEnd",ondragenter:"onDragEnter",ondragexit:"onDragExit",ondragleave:"onDragLeave",ondragover:"onDragOver",ondragstart:"onDragStart",ondrop:"onDrop",onerror:"onError",onfocus:"onFocus",oninput:"onInput",oninvalid:"onInvalid",onkeydown:"onKeyDown",onkeypress:"onKeyPress",onkeyup:"onKeyUp",onload:"onLoad",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onscroll:"onScroll",onsubmit:"onSubmit",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"};function s(e,t){const{key:n,level:s,...u}=t;switch(e.nodeType){case 1:return r.createElement(function(e){if(/[a-z]+[A-Z]+[a-z]+/.test(e))return e;return e.toLowerCase()}(e.nodeName),function(e,t){const n={key:t};if(e instanceof Element){const t=e.getAttribute("class");t&&(n.className=t),[...e.attributes].forEach((e=>{switch(e.name){case"class":break;case"style":n[e.name]=i(e.value);break;case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"readonly":case"required":case"reversed":case"selected":case"typemustmatch":n[o[e.name]||e.name]=!0;break;default:n[o[e.name]||e.name]=e.value}}))}return n}(e,n),l(e.childNodes,s,u));case 3:{const t=e.nodeValue?.toString()??"";if(!u.allowWhiteSpaces&&/^\s+$/.test(t)&&!/[\u00A0\u202F]/.test(t))return null;if(!e.parentNode)return t;const n=e.parentNode.nodeName.toLowerCase();return a.includes(n)?(/\S/.test(t)&&console.warn(`A textNode is not allowed inside '${n}'. Your text "${t}" will be ignored`),null):t}case 8:default:return null;case 11:return l(e.childNodes,s,t)}}function l(e,t,n){const r=[...e].map(((e,r)=>u(e,{...n,index:r,level:t+1}))).filter(Boolean);return r.length?r:null}function u(e,t={}){if(!(e&&e instanceof Node))return null;const{actions:n=[],index:r=0,level:i=0,randomKey:a}=t;let o=e,l=`${i}-${r}`;const u=[];return a&&0===i&&(l=`${function(e=6){const t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";let n="";for(let r=e;r>0;--r)n+=t[Math.round(61*Math.random())];return n}()}-${l}`),Array.isArray(n)&&n.forEach((t=>{t.condition(o,l,i)&&("function"==typeof t.pre&&(o=t.pre(o,l,i),o instanceof Node||(o=e)),"function"==typeof t.post&&u.push(t.post(o,l,i)))})),u.length?u:s(o,{key:l,level:i,...t})}function c(e,t={}){return"string"==typeof e?function(e,t={}){if(!e||"string"!=typeof e)return null;const{includeAllNodes:n=!1,nodeOnly:r=!1,selector:i="body > *",type:a="text/html"}=t;try{const o=(new DOMParser).parseFromString(e,a);if(n){const{childNodes:e}=o.body;return r?e:[...e].map((e=>u(e,t)))}const s=o.querySelector(i)||o.body.childNodes[0];if(!(s instanceof Node))throw new TypeError("Error parsing input");return r?s:u(s,t)}catch(e){}return null}(e,t):e instanceof Node?u(e,t):null}var d=n(2540),h=Object.defineProperty,p=(e,t,n)=>(((e,t,n)=>{t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),f="react-inlinesvg",m={IDLE:"idle",LOADING:"loading",LOADED:"loaded",FAILED:"failed",READY:"ready",UNSUPPORTED:"unsupported"};function g(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}function v(){return function(){if(!document)return!1;const e=document.createElement("div");e.innerHTML="<svg />";const t=e.firstChild;return!!t&&"http://www.w3.org/2000/svg"===t.namespaceURI}()&&"undefined"!=typeof window&&null!==window}async function y(e,t){const n=await fetch(e,t),r=n.headers.get("content-type"),[i]=(r??"").split(/ ?; ?/);if(n.status>299)throw new Error("Not found");if(!["image/svg+xml","text/plain"].some((e=>i.includes(e))))throw new Error(`Content type isn't valid: ${i}`);return n.text()}function b(e=1){return new Promise((t=>{setTimeout(t,1e3*e)}))}var w,S=class{constructor(){p(this,"cacheApi"),p(this,"cacheStore"),p(this,"subscribers",[]),p(this,"isReady",!1),this.cacheStore=new Map;let e=f,t=!1;g()&&(e=window.REACT_INLINESVG_CACHE_NAME??f,t=!!window.REACT_INLINESVG_PERSISTENT_CACHE&&"caches"in window),t?caches.open(e).then((e=>{this.cacheApi=e,this.isReady=!0,this.subscribers.forEach((e=>e()))})).catch((e=>{this.isReady=!0,console.error(`Failed to open cache: ${e.message}`)})):this.isReady=!0}onReady(e){this.isReady?e():this.subscribers.push(e)}async get(e,t){return await(this.cacheApi?this.fetchAndAddToPersistentCache(e,t):this.fetchAndAddToInternalCache(e,t)),this.cacheStore.get(e)?.content??""}set(e,t){this.cacheStore.set(e,t)}isCached(e){return this.cacheStore.get(e)?.status===m.LOADED}async fetchAndAddToInternalCache(e,t){const n=this.cacheStore.get(e);if(n?.status!==m.LOADING){if(!n?.content){this.cacheStore.set(e,{content:"",status:m.LOADING});try{const n=await y(e,t);this.cacheStore.set(e,{content:n,status:m.LOADED})}catch(t){throw this.cacheStore.set(e,{content:"",status:m.FAILED}),t}}}else await this.handleLoading(e,(async()=>{this.cacheStore.set(e,{content:"",status:m.IDLE}),await this.fetchAndAddToInternalCache(e,t)}))}async fetchAndAddToPersistentCache(e,t){const n=this.cacheStore.get(e);if(n?.status===m.LOADED)return;if(n?.status===m.LOADING)return void await this.handleLoading(e,(async()=>{this.cacheStore.set(e,{content:"",status:m.IDLE}),await this.fetchAndAddToPersistentCache(e,t)}));this.cacheStore.set(e,{content:"",status:m.LOADING});const r=await(this.cacheApi?.match(e));if(r){const t=await r.text();this.cacheStore.set(e,{content:t,status:m.LOADED})}else try{await(this.cacheApi?.add(new Request(e,t)));const n=await(this.cacheApi?.match(e)),r=await(n?.text())??"";this.cacheStore.set(e,{content:r,status:m.LOADED})}catch(t){throw this.cacheStore.set(e,{content:"",status:m.FAILED}),t}}async handleLoading(e,t){let n=0;for(;this.cacheStore.get(e)?.status===m.LOADING&&n<10;)await b(.1),n+=1;n>=10&&await t()}keys(){return[...this.cacheStore.keys()]}data(){return[...this.cacheStore.entries()].map((([e,t])=>({[e]:t})))}async delete(e){this.cacheApi&&await this.cacheApi.delete(e),this.cacheStore.delete(e)}async clear(){if(this.cacheApi){const e=await this.cacheApi.keys();for(const t of e)await this.cacheApi.delete(t)}this.cacheStore.clear()}};function x(e){const t=(0,r.useRef)();return(0,r.useEffect)((()=>{t.current=e})),t.current}function E(e){const{baseURL:t,content:n,description:r,handleError:i,hash:a,preProcessor:o,title:s,uniquifyIDs:l=!1}=e;try{const e=function(e,t){if(t)return t(e);return e}(n,o),i=c(e,{nodeOnly:!0});if(!(i&&i instanceof SVGSVGElement))throw new Error("Could not convert the src to a DOM Node");const u=_(i,{baseURL:t,hash:a,uniquifyIDs:l});if(r){const e=u.querySelector("desc");e?.parentNode&&e.parentNode.removeChild(e);const t=document.createElementNS("http://www.w3.org/2000/svg","desc");t.innerHTML=r,u.prepend(t)}if(void 0!==s){const e=u.querySelector("title");if(e?.parentNode&&e.parentNode.removeChild(e),s){const e=document.createElementNS("http://www.w3.org/2000/svg","title");e.innerHTML=s,u.prepend(e)}}return u}catch(e){return i(e)}}function _(e,t){const{baseURL:n="",hash:r,uniquifyIDs:i}=t,a=["id","href","xlink:href","xlink:role","xlink:arcrole"],o=["href","xlink:href"];return i?([...e.children].forEach((e=>{if(e.attributes?.length){const t=Object.values(e.attributes).map((e=>{const t=e,i=/url\((.*?)\)/.exec(e.value);return i?.[1]&&(t.value=e.value.replace(i[0],`url(${n}${i[1]}__${r})`)),t}));a.forEach((e=>{const n=t.find((t=>t.name===e));var i,a;n&&(i=e,a=n.value,!o.includes(i)||!a||a.includes("#"))&&(n.value=`${n.value}__${r}`)}))}return e.children.length?_(e,t):e})),e):e}function O(e){const{cacheRequests:t=!0,children:n=null,description:i,fetchOptions:a,innerRef:o,loader:s=null,onError:l,onLoad:u,src:d,title:h,uniqueHash:p}=e,[f,b]=(0,r.useReducer)(((e,t)=>({...e,...t})),{content:"",element:null,isCached:t&&w.isCached(e.src),status:m.IDLE}),{content:S,element:_,isCached:O,status:T}=f,k=x(e),C=x(f),A=(0,r.useRef)(p??function(e){const t="abcdefghijklmnopqrstuvwxyz",n=`${t}${t.toUpperCase()}1234567890`;let r="";for(let t=0;t<e;t++)r+=(i=n)[Math.floor(Math.random()*i.length)];var i;return r}(8)),D=(0,r.useRef)(!1),R=(0,r.useRef)(!1),I=(0,r.useCallback)((e=>{D.current&&(b({status:"Browser does not support SVG"===e.message?m.UNSUPPORTED:m.FAILED}),l?.(e))}),[l]),P=(0,r.useCallback)(((e,t=!1)=>{D.current&&b({content:e,isCached:t,status:m.LOADED})}),[]),N=(0,r.useCallback)((async()=>{const e=await y(d,a);P(e)}),[a,P,d]),j=(0,r.useCallback)((()=>{try{const t=c(E({...e,handleError:I,hash:A.current,content:S}));if(!t||!(0,r.isValidElement)(t))throw new Error("Could not convert the src to a React element");b({element:t,status:m.READY})}catch(e){I(new Error(e.message))}}),[S,I,e]),L=(0,r.useCallback)((async()=>{const e=/^data:image\/svg[^,]*?(;base64)?,(.*)/u.exec(d);let n;if(e?n=e[1]?window.atob(e[2]):decodeURIComponent(e[2]):d.includes("<svg")&&(n=d),n)P(n);else try{if(t){const e=await w.get(d,a);P(e,!0)}else await N()}catch(e){I(e)}}),[t,N,a,I,P,d]),M=(0,r.useCallback)((async()=>{D.current&&b({content:"",element:null,isCached:!1,status:m.LOADING})}),[]);(0,r.useEffect)((()=>{if(D.current=!0,!g()||R.current)return()=>{};try{if(T===m.IDLE){if(!v())throw new Error("Browser does not support SVG");if(!d)throw new Error("Missing src");M()}}catch(e){I(e)}return R.current=!0,()=>{D.current=!1}}),[]),(0,r.useEffect)((()=>{if(g()&&k)if(k.src!==d){if(!d)return void I(new Error("Missing src"));M()}else k.title===h&&k.description===i||j()}),[i,j,I,M,k,d,h]),(0,r.useEffect)((()=>{C&&(C.status!==m.LOADING&&T===m.LOADING&&L(),C.status!==m.LOADED&&T===m.LOADED&&j(),C.status!==m.READY&&T===m.READY&&u?.(d,O))}),[L,j,O,u,C,d,T]);const F=function(e,...t){const n={};for(const r in e)({}).hasOwnProperty.call(e,r)&&(t.includes(r)||(n[r]=e[r]));return n}(e,"baseURL","cacheRequests","children","description","fetchOptions","innerRef","loader","onError","onLoad","preProcessor","src","title","uniqueHash","uniquifyIDs");return g()?_?(0,r.cloneElement)(_,{ref:o,...F}):[m.UNSUPPORTED,m.FAILED].includes(T)?n:s:s}function T(e){w||(w=new S);const{loader:t}=e,n=(0,r.useRef)(!1),[i,a]=(0,r.useState)(w.isReady);return(0,r.useEffect)((()=>{n.current||(w.onReady((()=>{a(!0)})),n.current=!0)}),[]),i?(0,d.jsx)(O,{...e}):t}},4120:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>d,C6:()=>i,Ju:()=>s,N3:()=>c,YH:()=>o,fX:()=>u,sH:()=>a,xN:()=>h,zs:()=>l});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function a(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function o(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}Object.create;function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function u(e,t,n){if(n||2===arguments.length)for(var r,i=0,a=t.length;i<a;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function c(e){return this instanceof c?(this.v=e,this):new c(e)}function d(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),a=[];return r={},o("next"),o("throw"),o("return",(function(e){return function(t){return Promise.resolve(t).then(e,u)}})),r[Symbol.asyncIterator]=function(){return this},r;function o(e,t){i[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||s(e,t)}))},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=i[e](t)).value instanceof c?Promise.resolve(n.value.v).then(l,u):d(a[0][2],n)}catch(e){d(a[0][3],e)}var n}function l(e){s("next",e)}function u(e){s("throw",e)}function d(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function h(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=s(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,i,(t=e[n](t)).done,t.value)}))}}}Object.create;"function"==typeof SuppressedError&&SuppressedError}}]);
//# sourceMappingURL=908.js.map?_cache=05c1c1be91aace7c5e18