@kylincloud/flamegraph 0.36.3 → 0.36.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,18 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("zod"),r=require("react-dom"),a=require("./logo-v3-small.svg"),o="undefined"!=typeof document?document.currentScript:null,i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l,c={exports:{}};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("zod"),r=require("react-dom"),a=require("virtual:flamegraph-worker"),o=require("./logo-v3-small.svg"),i="undefined"!=typeof document?document.currentScript:null,s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var c,u={exports:{}};
2
2
  /*!
3
3
  Copyright (c) 2018 Jed Watson.
4
4
  Licensed under the MIT License (MIT), see
5
5
  http://jedwatson.github.io/classnames
6
- */var u,f=(l||(l=1,u=c,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=r(e,n.call(this,a)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return this&&this[n]||n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var a="";for(var o in n)e.call(n,o)&&n[o]&&(a=r(a,this&&this[o]||o));return a}function r(e,t){return t?e?e+" "+t:e+t:e}u.exports?(t.default=t,u.exports=t):window.classNames=t}()),c.exports),d=s(f);
6
+ */var f,d=(c||(c=1,f=u,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var a=arguments[t];a&&(e=r(e,n.call(this,a)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return this&&this[n]||n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(this,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var a="";for(var o in n)e.call(n,o)&&n[o]&&(a=r(a,this&&this[o]||o));return a}function r(e,t){return t?e?e+" "+t:e+t:e}f.exports?(t.default=t,f.exports=t):window.classNames=t}()),u.exports),h=l(d);
7
7
  /*!
8
8
  * Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
9
9
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
10
10
  * Copyright 2025 Fonticons, Inc.
11
11
  */
12
- function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function m(e,t,n){return t&&function(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,x(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=j(e))||t){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw o}}}}function g(e,t,n){return(t=x(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v(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 b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||j(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 w(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||j(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 x(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);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:t+""}function k(e){return k="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},k(e)}function j(e,t){if(e){if("string"==typeof e)return h(e,t);var n={}.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)?h(e,t):void 0}}var _=function(){},N={},S={},M=null,C={mark:_,measure:_};try{"undefined"!=typeof window&&(N=window),"undefined"!=typeof document&&(S=document),"undefined"!=typeof MutationObserver&&(M=MutationObserver),"undefined"!=typeof performance&&(C=performance)}catch(Pl){}var T=(N.navigator||{}).userAgent,R=void 0===T?"":T,O=N,E=S,P=M,F=C;O.document;var A,I=!!E.documentElement&&!!E.head&&"function"==typeof E.addEventListener&&"function"==typeof E.createElement,D=~R.indexOf("MSIE")||~R.indexOf("Trident/"),L={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},B=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],z="classic",$="duotone",V="sharp",H="sharp-duotone",W="chisel",U="etch",J="jelly",Q="jelly-duo",q="jelly-fill",X="notdog",Y="notdog-duo",K="slab",Z="slab-press",G="thumbprint",ee="utility",te="utility-duo",ne="utility-fill",re="whiteboard",ae=[z,$,V,H,W,U,J,Q,q,X,Y,K,Z,G,ee,te,ne,re];g(g(g(g(g(g(g(g(g(g(A={},z,"Classic"),$,"Duotone"),V,"Sharp"),H,"Sharp Duotone"),W,"Chisel"),U,"Etch"),J,"Jelly"),Q,"Jelly Duo"),q,"Jelly Fill"),X,"Notdog"),g(g(g(g(g(g(g(g(A,Y,"Notdog Duo"),K,"Slab"),Z,"Slab Press"),G,"Thumbprint"),ee,"Utility"),te,"Utility Duo"),ne,"Utility Fill"),re,"Whiteboard");var oe=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),ie=["fak","fa-kit","fakd","fa-kit-duotone"],se={fak:"kit","fa-kit":"kit"},le={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"};g(g({},"kit","Kit"),"kit-duotone","Kit Duotone");var ce,ue={kit:"fak"},fe={"kit-duotone":"fakd"},de="duotone-group",he="swap-opacity",me="primary",pe="secondary";g(g(g(g(g(g(g(g(g(g(ce={},"classic","Classic"),"duotone","Duotone"),"sharp","Sharp"),"sharp-duotone","Sharp Duotone"),"chisel","Chisel"),"etch","Etch"),"jelly","Jelly"),"jelly-duo","Jelly Duo"),"jelly-fill","Jelly Fill"),"notdog","Notdog"),g(g(g(g(g(g(g(g(ce,"notdog-duo","Notdog Duo"),"slab","Slab"),"slab-press","Slab Press"),"thumbprint","Thumbprint"),"utility","Utility"),"utility-duo","Utility Duo"),"utility-fill","Utility Fill"),"whiteboard","Whiteboard");g(g({},"kit","Kit"),"kit-duotone","Kit Duotone");var ge={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},ve=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fajr","fajfr","fajdr","facr","fausb","faudsb","faufsb"].concat(["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"]),be=[1,2,3,4,5,6,7,8,9,10],ye=be.concat([11,12,13,14,15,16,17,18,19,20]),we=[].concat(w(Object.keys({classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]})),["solid","regular","light","thin","duotone","brands","semibold"],["aw","fw","pull-left","pull-right"],["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",de,he,me,pe]).concat(be.map(function(e){return"".concat(e,"x")})).concat(ye.map(function(e){return"w-".concat(e)})),xe="___FONT_AWESOME___",ke="svg-inline--fa",je="data-fa-i2svg",_e="data-fa-pseudo-element",Ne="data-prefix",Se="data-icon",Me="fontawesome-i2svg",Ce=["HTML","HEAD","STYLE","SCRIPT"],Te=["::before","::after",":before",":after"],Re=function(){try{return"production"===process.env.NODE_ENV}catch(e){return!1}}();function Oe(e){return new Proxy(e,{get:function(e,t){return t in e?e[t]:e[z]}})}var Ee=b({},L);Ee[z]=b(b(b(b({},{"fa-duotone":"duotone"}),L[z]),se),le);var Pe=Oe(Ee),Fe=b({},{chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}});Fe[z]=b(b(b(b({},{duotone:"fad"}),Fe[z]),ue),fe);var Ae=Oe(Fe),Ie=b({},ge);Ie[z]=b(b({},Ie[z]),{fak:"fa-kit"});var De=Oe(Ie),Le=b({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}});Le[z]=b(b({},Le[z]),{"fa-kit":"fak"}),Oe(Le);var Be=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,ze="fa-layers-text",$e=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i;Oe(b({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}}));var Ve=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],He={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},We=[].concat(w(["kit"]),w(we)),Ue=O.FontAwesomeConfig||{};if(E&&"function"==typeof E.querySelector){[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(function(e){var t=y(e,2),n=t[0],r=t[1],a=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=E.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(n));null!=a&&(Ue[r]=a)})}var Je={styleDefault:"solid",familyDefault:z,cssPrefix:"fa",replacementClass:ke,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Ue.familyPrefix&&(Ue.cssPrefix=Ue.familyPrefix);var Qe=b(b({},Je),Ue);Qe.autoReplaceSvg||(Qe.observeMutations=!1);var qe={};Object.keys(Je).forEach(function(e){Object.defineProperty(qe,e,{enumerable:!0,set:function(t){Qe[e]=t,Xe.forEach(function(e){return e(qe)})},get:function(){return Qe[e]}})}),Object.defineProperty(qe,"familyPrefix",{enumerable:!0,set:function(e){Qe.cssPrefix=e,Xe.forEach(function(e){return e(qe)})},get:function(){return Qe.cssPrefix}}),O.FontAwesomeConfig=qe;var Xe=[];var Ye=16,Ke={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Ze(){for(var e=12,t="";e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function Ge(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function et(e){return e.classList?Ge(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function tt(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function nt(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function rt(e){return e.size!==Ke.size||e.x!==Ke.x||e.y!==Ke.y||e.rotate!==Ke.rotate||e.flipX||e.flipY}function at(){var e="fa",t=ke,n=qe.cssPrefix,r=qe.replacementClass,a=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 7 Free";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 7 Free";\n --fa-font-light: normal 300 1em/1 "Font Awesome 7 Pro";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 7 Pro";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 7 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 7 Brands";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-slab-regular: normal 400 1em/1 "Font Awesome 7 Slab";\n --fa-font-slab-press-regular: normal 400 1em/1 "Font Awesome 7 Slab Press";\n --fa-font-whiteboard-semibold: normal 600 1em/1 "Font Awesome 7 Whiteboard";\n --fa-font-thumbprint-light: normal 300 1em/1 "Font Awesome 7 Thumbprint";\n --fa-font-notdog-solid: normal 900 1em/1 "Font Awesome 7 Notdog";\n --fa-font-notdog-duo-solid: normal 900 1em/1 "Font Awesome 7 Notdog Duo";\n --fa-font-etch-solid: normal 900 1em/1 "Font Awesome 7 Etch";\n --fa-font-jelly-regular: normal 400 1em/1 "Font Awesome 7 Jelly";\n --fa-font-jelly-fill-regular: normal 400 1em/1 "Font Awesome 7 Jelly Fill";\n --fa-font-jelly-duo-regular: normal 400 1em/1 "Font Awesome 7 Jelly Duo";\n --fa-font-chisel-regular: normal 400 1em/1 "Font Awesome 7 Chisel";\n --fa-font-utility-semibold: normal 600 1em/1 "Font Awesome 7 Utility";\n --fa-font-utility-duo-semibold: normal 600 1em/1 "Font Awesome 7 Utility Duo";\n --fa-font-utility-fill-semibold: normal 600 1em/1 "Font Awesome 7 Utility Fill";\n}\n\n.svg-inline--fa {\n box-sizing: content-box;\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285714em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left,\n.svg-inline--fa .fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-pull-right,\n.svg-inline--fa .fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n inset-block-start: 0.25em; /* syncing vertical alignment with Web Font rendering */\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.fa-layers .svg-inline--fa {\n inset: 0;\n margin: auto;\n position: absolute;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: calc(10 / 16 * 1em); /* converts a 10px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 10 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 10 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-xs {\n font-size: calc(12 / 16 * 1em); /* converts a 12px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 12 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 12 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-sm {\n font-size: calc(14 / 16 * 1em); /* converts a 14px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 14 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 14 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-lg {\n font-size: calc(20 / 16 * 1em); /* converts a 20px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 20 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 20 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-xl {\n font-size: calc(24 / 16 * 1em); /* converts a 24px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 24 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 24 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-2xl {\n font-size: calc(32 / 16 * 1em); /* converts a 32px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 32 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 32 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-width-auto {\n --fa-width: auto;\n}\n\n.fa-fw,\n.fa-width-fixed {\n --fa-width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-inline-start: var(--fa-li-margin, 2.5em);\n padding-inline-start: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n/* Heads Up: Bordered Icons will not be supported in the future!\n - This feature will be deprecated in the next major release of Font Awesome (v8)!\n - You may continue to use it in this version *v7), but it will not be supported in Font Awesome v8.\n*/\n/* Notes:\n* --@{v.$css-prefix}-border-width = 1/16 by default (to render as ~1px based on a 16px default font-size)\n* --@{v.$css-prefix}-border-padding =\n ** 3/16 for vertical padding (to give ~2px of vertical whitespace around an icon considering it\'s vertical alignment)\n ** 4/16 for horizontal padding (to give ~4px of horizontal whitespace around an icon)\n*/\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.0625em);\n box-sizing: var(--fa-border-box-sizing, content-box);\n padding: var(--fa-border-padding, 0.1875em 0.25em);\n}\n\n.fa-pull-left,\n.fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right,\n.fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n .fa-bounce,\n .fa-fade,\n .fa-beat-fade,\n .fa-flip,\n .fa-pulse,\n .fa-shake,\n .fa-spin,\n .fa-spin-pulse {\n animation: none !important;\n transition: none !important;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.svg-inline--fa.fa-inverse {\n fill: var(--fa-inverse, #fff);\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n line-height: 2em;\n position: relative;\n vertical-align: middle;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.svg-inline--fa.fa-stack-1x {\n --fa-width: 1.25em;\n height: 1em;\n width: var(--fa-width);\n}\n.svg-inline--fa.fa-stack-2x {\n --fa-width: 2.5em;\n height: 2em;\n width: var(--fa-width);\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n inset: 0;\n margin: auto;\n position: absolute;\n z-index: var(--fa-stack-z-index, auto);\n}';if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),i=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");a=a.replace(o,".".concat(n,"-")).replace(i,"--".concat(n,"-")).replace(s,".".concat(r))}return a}var ot=!1;function it(){qe.autoAddCss&&!ot&&(!function(e){if(e&&I){var t=E.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=E.head.childNodes,r=null,a=n.length-1;a>-1;a--){var o=n[a],i=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=o)}E.head.insertBefore(t,r)}}(at()),ot=!0)}var st={mixout:function(){return{dom:{css:at,insertCss:it}}},hooks:function(){return{beforeDOMElementCreation:function(){it()},beforeI2svg:function(){it()}}}},lt=O||{};lt[xe]||(lt[xe]={}),lt[xe].styles||(lt[xe].styles={}),lt[xe].hooks||(lt[xe].hooks={}),lt[xe].shims||(lt[xe].shims=[]);var ct=lt[xe],ut=[],ft=function(){E.removeEventListener("DOMContentLoaded",ft),dt=1,ut.map(function(e){return e()})},dt=!1;function ht(e){var t=e.tag,n=e.attributes,r=void 0===n?{}:n,a=e.children,o=void 0===a?[]:a;return"string"==typeof e?tt(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(tt(e[n]),'" ')},"").trim()}(r),">").concat(o.map(ht).join(""),"</").concat(t,">")}function mt(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}I&&((dt=(E.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(E.readyState))||E.addEventListener("DOMContentLoaded",ft));var pt=function(e,t,n,r){var a,o,i,s=Object.keys(e),l=s.length,c=t;for(void 0===n?(a=1,i=e[s[0]]):(a=0,i=n);a<l;a++)i=c(i,e[o=s[a]],o,e);return i};function gt(e){return 1!==w(e).length?null:e.codePointAt(0).toString(16)}function vt(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return!!r.icon?t[r.iconName]=r.icon:t[n]=r,t},{})}function bt(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).skipHooks,r=void 0!==n&&n,a=vt(t);"function"!=typeof ct.hooks.addPack||r?ct.styles[e]=b(b({},ct.styles[e]||{}),a):ct.hooks.addPack(e,vt(t)),"fas"===e&&bt("fa",t)}var yt=ct.styles,wt=ct.shims,xt=Object.keys(De),kt=xt.reduce(function(e,t){return e[t]=Object.keys(De[t]),e},{}),jt=null,_t={},Nt={},St={},Mt={},Ct={};function Tt(e,t){var n,r=t.split("-"),a=r[0],o=r.slice(1).join("-");return a!==e||""===o||(n=o,~We.indexOf(n))?null:o}var Rt,Ot=function(){var e=function(e){return pt(yt,function(t,n,r){return t[r]=pt(n,e,{}),t},{})};_t=e(function(e,t,n){(t[3]&&(e[t[3]]=n),t[2])&&t[2].filter(function(e){return"number"==typeof e}).forEach(function(t){e[t.toString(16)]=n});return e}),Nt=e(function(e,t,n){(e[n]=n,t[2])&&t[2].filter(function(e){return"string"==typeof e}).forEach(function(t){e[t]=n});return e}),Ct=e(function(e,t,n){var r=t[2];return e[n]=n,r.forEach(function(t){e[t]=n}),e});var t="far"in yt||qe.autoFetchSvg,n=pt(wt,function(e,n){var r=n[0],a=n[1],o=n[2];return"far"!==a||t||(a="fas"),"string"==typeof r&&(e.names[r]={prefix:a,iconName:o}),"number"==typeof r&&(e.unicodes[r.toString(16)]={prefix:a,iconName:o}),e},{names:{},unicodes:{}});St=n.names,Mt=n.unicodes,jt=It(qe.styleDefault,{family:qe.familyDefault})};function Et(e,t){return(_t[e]||{})[t]}function Pt(e,t){return(Ct[e]||{})[t]}function Ft(e){return St[e]||{prefix:null,iconName:null}}function At(){return jt}Rt=function(e){jt=It(e.styleDefault,{family:qe.familyDefault})},Xe.push(Rt),Ot();function It(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).family,n=void 0===t?z:t,r=Pe[n][e];if(n===$&&!e)return"fad";var a=Ae[n][e]||Ae[n][r],o=e in ct.styles?e:null;return a||o||null}function Dt(e){return e.sort().filter(function(e,t,n){return n.indexOf(e)===t})}var Lt=ve.concat(ie);function Bt(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).skipLookups,n=void 0!==t&&t,r=null,a=Dt(e.filter(function(e){return Lt.includes(e)})),o=Dt(e.filter(function(e){return!Lt.includes(e)})),i=y(a.filter(function(e){return r=e,!B.includes(e)}),1)[0],s=void 0===i?null:i,l=function(e){var t=z,n=xt.reduce(function(e,t){return e[t]="".concat(qe.cssPrefix,"-").concat(t),e},{});return ae.forEach(function(r){(e.includes(n[r])||e.some(function(e){return kt[r].includes(e)}))&&(t=r)}),t}(a),c=b(b({},function(e){var t=[],n=null;return e.forEach(function(e){var r=Tt(qe.cssPrefix,e);r?n=r:e&&t.push(e)}),{iconName:n,rest:t}}(o)),{},{prefix:It(s,{family:l})});return b(b(b({},c),function(e){var t=e.values,n=e.family,r=e.canonical,a=e.givenPrefix,o=void 0===a?"":a,i=e.styles,s=void 0===i?{}:i,l=e.config,c=void 0===l?{}:l,u=n===$,f=t.includes("fa-duotone")||t.includes("fad"),d="duotone"===c.familyDefault,h="fad"===r.prefix||"fa-duotone"===r.prefix;!u&&(f||d||h)&&(r.prefix="fad");(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab");if(!r.prefix&&zt.includes(n)){if(Object.keys(s).find(function(e){return $t.includes(e)})||c.autoFetchSvg){var m=oe.get(n).defaultShortPrefixId;r.prefix=m,r.iconName=Pt(r.prefix,r.iconName)||r.iconName}}"fa"!==r.prefix&&"fa"!==o||(r.prefix=At()||"fas");return r}({values:e,family:l,styles:yt,config:qe,canonical:c,givenPrefix:r})),function(e,t,n){var r=n.prefix,a=n.iconName;if(e||!r||!a)return{prefix:r,iconName:a};var o="fa"===t?Ft(a):{},i=Pt(r,a);a=o.iconName||i||a,"far"!==(r=o.prefix||r)||yt.far||!yt.fas||qe.autoFetchSvg||(r="fas");return{prefix:r,iconName:a}}(n,r,c))}var zt=ae.filter(function(e){return e!==z||e!==$}),$t=Object.keys(ge).filter(function(e){return e!==z}).map(function(e){return Object.keys(ge[e])}).flat();var Vt=function(){return m(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}},[{key:"add",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.reduce(this._pullDefinitions,{});Object.keys(a).forEach(function(t){e.definitions[t]=b(b({},e.definitions[t]||{}),a[t]),bt(t,a[t]);var n=De[z][t];n&&bt(n,a[t]),Ot()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(e,t){var n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map(function(t){var r=n[t],a=r.prefix,o=r.iconName,i=r.icon,s=i[2];e[a]||(e[a]={}),s.length>0&&s.forEach(function(t){"string"==typeof t&&(e[a][t]=i)}),e[a][o]=i}),e}}])}(),Ht=[],Wt={},Ut={},Jt=Object.keys(Ut);function Qt(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return(Wt[e]||[]).forEach(function(e){t=e.apply(null,[t].concat(r))}),t}function qt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(Wt[e]||[]).forEach(function(e){e.apply(null,n)})}function Xt(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Ut[e]?Ut[e].apply(null,t):void 0}function Yt(e){"fa"===e.prefix&&(e.prefix="fas");var t=e.iconName,n=e.prefix||At();if(t)return t=Pt(n,t)||t,mt(Kt.definitions,n,t)||mt(ct.styles,n,t)}var Kt=new Vt,Zt={i2svg:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return I?(qt("beforeI2svg",e),Xt("pseudoElements2svg",e),Xt("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoReplaceSvgRoot;!1===qe.autoReplaceSvg&&(qe.autoReplaceSvg=!0),qe.observeMutations=!0,e=function(){en({autoReplaceSvgRoot:n}),qt("watch",t)},I&&(dt?setTimeout(e,0):ut.push(e))}},Gt={noAuto:function(){qe.autoReplaceSvg=!1,qe.observeMutations=!1,qt("noAuto")},config:qe,dom:Zt,parse:{icon:function(e){if(null===e)return null;if("object"===k(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Pt(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){var t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],n=It(e[0]);return{prefix:n,iconName:Pt(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(qe.cssPrefix,"-"))>-1||e.match(Be))){var r=Bt(e.split(" "),{skipLookups:!0});return{prefix:r.prefix||At(),iconName:Pt(r.prefix,r.iconName)||r.iconName}}if("string"==typeof e){var a=At();return{prefix:a,iconName:Pt(a,e)||e}}}},library:Kt,findIconDefinition:Yt,toHtml:ht},en=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).autoReplaceSvgRoot,t=void 0===e?E:e;(Object.keys(ct.styles).length>0||qe.autoFetchSvg)&&I&&qe.autoReplaceSvg&&Gt.dom.i2svg({node:t})};function tn(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return ht(e)})}}),Object.defineProperty(e,"node",{get:function(){if(I){var t=E.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function nn(e){var t=e.icons,n=t.main,r=t.mask,a=e.prefix,o=e.iconName,i=e.transform,s=e.symbol,l=e.maskId,c=e.extra,u=e.watchable,f=void 0!==u&&u,d=r.found?r:n,h=d.width,m=d.height,p=[qe.replacementClass,o?"".concat(qe.cssPrefix,"-").concat(o):""].filter(function(e){return-1===c.classes.indexOf(e)}).filter(function(e){return""!==e||!!e}).concat(c.classes).join(" "),g={children:[],attributes:b(b({},c.attributes),{},{"data-prefix":a,"data-icon":o,class:p,role:c.attributes.role||"img",viewBox:"0 0 ".concat(h," ").concat(m)})};(function(e){return["aria-label","aria-labelledby","title","role"].some(function(t){return t in e})})(c.attributes)||c.attributes["aria-hidden"]||(g.attributes["aria-hidden"]="true"),f&&(g.attributes[je]="");var v=b(b({},g),{},{prefix:a,iconName:o,main:n,mask:r,maskId:l,transform:i,symbol:s,styles:b({},c.styles)}),y=r.found&&n.found?Xt("generateAbstractMask",v)||{children:[],attributes:{}}:Xt("generateAbstractIcon",v)||{children:[],attributes:{}},w=y.children,x=y.attributes;return v.children=w,v.attributes=x,s?function(e){var t=e.prefix,n=e.iconName,r=e.children,a=e.attributes,o=e.symbol,i=!0===o?"".concat(t,"-").concat(qe.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:b(b({},a),{},{id:i}),children:r}]}]}(v):function(e){var t=e.children,n=e.main,r=e.mask,a=e.attributes,o=e.styles,i=e.transform;if(rt(i)&&n.found&&!r.found){var s={x:n.width/n.height/2,y:.5};a.style=nt(b(b({},o),{},{"transform-origin":"".concat(s.x+i.x/16,"em ").concat(s.y+i.y/16,"em")}))}return[{tag:"svg",attributes:a,children:t}]}(v)}function rn(e){var t=e.content,n=e.width,r=e.height,a=e.transform,o=e.extra,i=e.watchable,s=void 0!==i&&i,l=b(b({},o.attributes),{},{class:o.classes.join(" ")});s&&(l[je]="");var c=b({},o.styles);rt(a)&&(c.transform=function(e){var t=e.transform,n=e.width,r=void 0===n?16:n,a=e.height,o=void 0===a?16:a,i="";return i+=D?"translate(".concat(t.x/Ye-r/2,"em, ").concat(t.y/Ye-o/2,"em) "):"translate(calc(-50% + ".concat(t.x/Ye,"em), calc(-50% + ").concat(t.y/Ye,"em)) "),i+="scale(".concat(t.size/Ye*(t.flipX?-1:1),", ").concat(t.size/Ye*(t.flipY?-1:1),") "),i+"rotate(".concat(t.rotate,"deg) ")}({transform:a,width:n,height:r}),c["-webkit-transform"]=c.transform);var u=nt(c);u.length>0&&(l.style=u);var f=[];return f.push({tag:"span",attributes:l,children:[t]}),f}var an=ct.styles;function on(e){var t=e[0],n=e[1],r=y(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(qe.cssPrefix,"-").concat(He.GROUP)},children:[{tag:"path",attributes:{class:"".concat(qe.cssPrefix,"-").concat(He.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(qe.cssPrefix,"-").concat(He.PRIMARY),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}var sn={found:!1,width:512,height:512};function ln(e,t){var n=t;return"fa"===t&&null!==qe.styleDefault&&(t=At()),new Promise(function(r,a){if("fa"===n){var o=Ft(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&an[t]&&an[t][e])return r(on(an[t][e]));!function(e,t){Re||qe.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),r(b(b({},sn),{},{icon:qe.showMissingIcons&&e&&Xt("missingIconAbstract")||{}}))})}var cn=function(){},un=qe.measurePerformance&&F&&F.mark&&F.measure?F:{mark:cn,measure:cn},fn='FA "7.1.0"',dn=function(e){un.mark("".concat(fn," ").concat(e," ends")),un.measure("".concat(fn," ").concat(e),"".concat(fn," ").concat(e," begins"),"".concat(fn," ").concat(e," ends"))},hn=function(e){return un.mark("".concat(fn," ").concat(e," begins")),function(){return dn(e)}},mn=function(){};function pn(e){return"string"==typeof(e.getAttribute?e.getAttribute(je):null)}function gn(e){return E.createElementNS("http://www.w3.org/2000/svg",e)}function vn(e){return E.createElement(e)}function bn(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).ceFn,n=void 0===t?"svg"===e.tag?gn:vn:t;if("string"==typeof e)return E.createTextNode(e);var r=n(e.tag);return Object.keys(e.attributes||[]).forEach(function(t){r.setAttribute(t,e.attributes[t])}),(e.children||[]).forEach(function(e){r.appendChild(bn(e,{ceFn:n}))}),r}var yn={replace:function(e){var t=e[0];if(t.parentNode)if(e[1].forEach(function(e){t.parentNode.insertBefore(bn(e),t)}),null===t.getAttribute(je)&&qe.keepOriginalSource){var n=E.createComment(function(e){var t=" ".concat(e.outerHTML," ");return"".concat(t,"Font Awesome fontawesome.com ")}(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){var t=e[0],n=e[1];if(~et(t).indexOf(qe.replacementClass))return yn.replace(e);var r=new RegExp("".concat(qe.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var a=n[0].attributes.class.split(" ").reduce(function(e,t){return t===qe.replacementClass||t.match(r)?e.toSvg.push(t):e.toNode.push(t),e},{toNode:[],toSvg:[]});n[0].attributes.class=a.toSvg.join(" "),0===a.toNode.length?t.removeAttribute("class"):t.setAttribute("class",a.toNode.join(" "))}var o=n.map(function(e){return ht(e)}).join("\n");t.setAttribute(je,""),t.innerHTML=o}};function wn(e){e()}function xn(e,t){var n="function"==typeof t?t:mn;if(0===e.length)n();else{var r=wn;"async"===qe.mutateApproach&&(r=O.requestAnimationFrame||wn),r(function(){var t=!0===qe.autoReplaceSvg?yn.replace:yn[qe.autoReplaceSvg]||yn.replace,r=hn("mutate");e.map(t),r(),n()})}}var kn=!1;function jn(){kn=!0}function _n(){kn=!1}var Nn=null;function Sn(e){if(P&&qe.observeMutations){var t=e.treeCallback,n=void 0===t?mn:t,r=e.nodeCallback,a=void 0===r?mn:r,o=e.pseudoElementsCallback,i=void 0===o?mn:o,s=e.observeMutationsRoot,l=void 0===s?E:s;Nn=new P(function(e){if(!kn){var t=At();Ge(e).forEach(function(e){if("childList"===e.type&&e.addedNodes.length>0&&!pn(e.addedNodes[0])&&(qe.searchPseudoElements&&i(e.target),n(e.target)),"attributes"===e.type&&e.target.parentNode&&qe.searchPseudoElements&&i([e.target],!0),"attributes"===e.type&&pn(e.target)&&~Ve.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){var t=e.getAttribute?e.getAttribute(Ne):null,n=e.getAttribute?e.getAttribute(Se):null;return t&&n}(e.target)){var r=Bt(et(e.target)),o=r.prefix,s=r.iconName;e.target.setAttribute(Ne,o||t),s&&e.target.setAttribute(Se,s)}else(l=e.target)&&l.classList&&l.classList.contains&&l.classList.contains(qe.replacementClass)&&a(e.target);var l})}}),I&&Nn.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Mn(e){var t,n,r=e.getAttribute("data-prefix"),a=e.getAttribute("data-icon"),o=void 0!==e.innerText?e.innerText.trim():"",i=Bt(et(e));return i.prefix||(i.prefix=At()),r&&a&&(i.prefix=r,i.iconName=a),i.iconName&&i.prefix||(i.prefix&&o.length>0&&(i.iconName=(t=i.prefix,n=e.innerText,(Nt[t]||{})[n]||Et(i.prefix,gt(e.innerText)))),!i.iconName&&qe.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function Cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},n=Mn(e),r=n.iconName,a=n.prefix,o=n.rest,i=function(e){return Ge(e.attributes).reduce(function(e,t){return"class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e},{})}(e),s=Qt("parseNodeAttributes",{},e),l=t.styleParser?function(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(e,t){var n=t.split(":"),r=n[0],a=n.slice(1);return r&&a.length>0&&(e[r]=a.join(":").trim()),e},{})),n}(e):[];return b({iconName:r,prefix:a,transform:Ke,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:i}},s)}var Tn=ct.styles;function Rn(e){var t="nest"===qe.autoReplaceSvg?Cn(e,{styleParser:!1}):Cn(e);return~t.extra.classes.indexOf(ze)?Xt("generateLayersText",e,t):Xt("generateSvgReplacementMutation",e,t)}function On(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!I)return Promise.resolve();var n=E.documentElement.classList,r=function(e){return n.add("".concat(Me,"-").concat(e))},a=function(e){return n.remove("".concat(Me,"-").concat(e))},o=qe.autoFetchSvg?[].concat(w(ie),w(ve)):B.concat(Object.keys(Tn));o.includes("fa")||o.push("fa");var i=[".".concat(ze,":not([").concat(je,"])")].concat(o.map(function(e){return".".concat(e,":not([").concat(je,"])")})).join(", ");if(0===i.length)return Promise.resolve();var s=[];try{s=Ge(e.querySelectorAll(i))}catch(e){}if(!(s.length>0))return Promise.resolve();r("pending"),a("complete");var l=hn("onTree"),c=s.reduce(function(e,t){try{var n=Rn(t);n&&e.push(n)}catch(e){Re||"MissingIcon"===e.name&&console.error(e)}return e},[]);return new Promise(function(e,n){Promise.all(c).then(function(n){xn(n,function(){r("active"),r("complete"),a("pending"),"function"==typeof t&&t(),l(),e()})}).catch(function(e){l(),n(e)})})}function En(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Rn(e).then(function(e){e&&xn([e],t)})}var Pn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?Ke:n,a=t.symbol,o=void 0!==a&&a,i=t.mask,s=void 0===i?null:i,l=t.maskId,c=void 0===l?null:l,u=t.classes,f=void 0===u?[]:u,d=t.attributes,h=void 0===d?{}:d,m=t.styles,p=void 0===m?{}:m;if(e){var g=e.prefix,v=e.iconName,y=e.icon;return tn(b({type:"icon"},e),function(){return qt("beforeDOMElementCreation",{iconDefinition:e,params:t}),nn({icons:{main:on(y),mask:s?on(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:g,iconName:v,transform:b(b({},Ke),r),symbol:o,maskId:c,extra:{attributes:h,styles:p,classes:f}})})}},Fn={mixout:function(){return{icon:(e=Pn,function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(t||{}).icon?t:Yt(t||{}),a=n.mask;return a&&(a=(a||{}).icon?a:Yt(a||{})),e(r,b(b({},n),{},{mask:a}))})};var e},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=On,e.nodeCallback=En,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,n=void 0===t?E:t,r=e.callback;return On(n,void 0===r?function(){}:r)},e.generateSvgReplacementMutation=function(e,t){var n=t.iconName,r=t.prefix,a=t.transform,o=t.symbol,i=t.mask,s=t.maskId,l=t.extra;return new Promise(function(t,c){Promise.all([ln(n,r),i.iconName?ln(i.iconName,i.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(i){var c=y(i,2),u=c[0],f=c[1];t([e,nn({icons:{main:u,mask:f},prefix:r,iconName:n,transform:a,symbol:o,maskId:s,extra:l,watchable:!0})])}).catch(c)})},e.generateAbstractIcon=function(e){var t,n=e.children,r=e.attributes,a=e.main,o=e.transform,i=nt(e.styles);return i.length>0&&(r.style=i),rt(o)&&(t=Xt("generateAbstractTransformGrouping",{main:a,transform:o,containerWidth:a.width,iconWidth:a.width})),n.push(t||a.icon),{children:n,attributes:r}}}},An={mixout:function(){return{layer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.classes,r=void 0===n?[]:n;return tn({type:"layer"},function(){qt("beforeDOMElementCreation",{assembler:e,params:t});var n=[];return e(function(e){Array.isArray(e)?e.map(function(e){n=n.concat(e.abstract)}):n=n.concat(e.abstract)}),[{tag:"span",attributes:{class:["".concat(qe.cssPrefix,"-layers")].concat(w(r)).join(" ")},children:n}]})}}}},In={mixout:function(){return{counter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.title;var n=t.classes,r=void 0===n?[]:n,a=t.attributes,o=void 0===a?{}:a,i=t.styles,s=void 0===i?{}:i;return tn({type:"counter",content:e},function(){return qt("beforeDOMElementCreation",{content:e,params:t}),function(e){var t=e.content,n=e.extra,r=b(b({},n.attributes),{},{class:n.classes.join(" ")}),a=nt(n.styles);a.length>0&&(r.style=a);var o=[];return o.push({tag:"span",attributes:r,children:[t]}),o}({content:e.toString(),extra:{attributes:o,styles:s,classes:["".concat(qe.cssPrefix,"-layers-counter")].concat(w(r))}})})}}}},Dn={mixout:function(){return{text:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?Ke:n,a=t.classes,o=void 0===a?[]:a,i=t.attributes,s=void 0===i?{}:i,l=t.styles,c=void 0===l?{}:l;return tn({type:"text",content:e},function(){return qt("beforeDOMElementCreation",{content:e,params:t}),rn({content:e,transform:b(b({},Ke),r),extra:{attributes:s,styles:c,classes:["".concat(qe.cssPrefix,"-layers-text")].concat(w(o))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var n=t.transform,r=t.extra,a=null,o=null;if(D){var i=parseInt(getComputedStyle(e).fontSize,10),s=e.getBoundingClientRect();a=s.width/i,o=s.height/i}return Promise.resolve([e,rn({content:e.innerHTML,width:a,height:o,transform:n,extra:r,watchable:!0})])}}},Ln=new RegExp('"',"ug"),Bn=[1105920,1112319],zn=b(b(b(b({},{FontAwesome:{normal:"fas",400:"fas"}}),{"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}}),{"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}}),{"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}}),$n=Object.keys(zn).reduce(function(e,t){return e[t.toLowerCase()]=zn[t],e},{}),Vn=Object.keys($n).reduce(function(e,t){var n=$n[t];return e[t]=n[900]||w(Object.entries(n))[0][1],e},{});function Hn(e,t){var n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(function(r,a){if(null!==e.getAttribute(n))return r();var o,i,s,l=Ge(e.children).filter(function(e){return e.getAttribute(_e)===t})[0],c=O.getComputedStyle(e,t),u=c.getPropertyValue("font-family"),f=u.match($e),d=c.getPropertyValue("font-weight"),h=c.getPropertyValue("content");if(l&&!f)return e.removeChild(l),r();if(f&&"none"!==h&&""!==h){var m=c.getPropertyValue("content"),p=function(e,t){var n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),a=isNaN(r)?"normal":r;return($n[n]||{})[a]||Vn[n]}(u,d),g=function(e){return gt(w(e.replace(Ln,""))[0]||"")}(m),v=f[0].startsWith("FontAwesome"),y=function(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),n=e.getPropertyValue("content").replace(Ln,""),r=n.codePointAt(0),a=r>=Bn[0]&&r<=Bn[1],o=2===n.length&&n[0]===n[1];return a||o||t}(c),x=Et(p,g),k=x;if(v){var j=(i=Mt[o=g],s=Et("fas",o),i||(s?{prefix:"fas",iconName:s}:null)||{prefix:null,iconName:null});j.iconName&&j.prefix&&(x=j.iconName,p=j.prefix)}if(!x||y||l&&l.getAttribute(Ne)===p&&l.getAttribute(Se)===k)r();else{e.setAttribute(n,k),l&&e.removeChild(l);var _={iconName:null,prefix:null,transform:Ke,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},N=_.extra;N.attributes[_e]=t,ln(x,p).then(function(a){var o=nn(b(b({},_),{},{icons:{main:a,mask:{prefix:null,iconName:null,rest:[]}},prefix:p,iconName:k,extra:N,watchable:!0})),i=E.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===t?e.insertBefore(i,e.firstChild):e.appendChild(i),i.outerHTML=o.map(function(e){return ht(e)}).join("\n"),e.removeAttribute(n),r()}).catch(a)}}else r()})}function Wn(e){return Promise.all([Hn(e,"::before"),Hn(e,"::after")])}function Un(e){return!(e.parentNode===document.head||~Ce.indexOf(e.tagName.toUpperCase())||e.getAttribute(_e)||e.parentNode&&"svg"===e.parentNode.tagName)}var Jn=function(e){return!!e&&Te.some(function(t){return e.includes(t)})},Qn=function(e){if(!e)return[];var t=new Set,n=e.split(/,(?![^()]*\))/).map(function(e){return e.trim()});n=n.flatMap(function(e){return e.includes("(")?e:e.split(",").map(function(e){return e.trim()})});var r,a=p(n);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(Jn(o)){var i=Te.reduce(function(e,t){return e.replace(t,"")},o);""!==i&&"*"!==i&&t.add(i)}}}catch(e){a.e(e)}finally{a.f()}return t};function qn(e){if(I){var t;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])t=e;else if(qe.searchPseudoElementsFullScan)t=e.querySelectorAll("*");else{var n,r=new Set,a=p(document.styleSheets);try{for(a.s();!(n=a.n()).done;){var o=n.value;try{var i,s=p(o.cssRules);try{for(s.s();!(i=s.n()).done;){var l,c=i.value,u=p(Qn(c.selectorText));try{for(u.s();!(l=u.n()).done;){var f=l.value;r.add(f)}}catch(e){u.e(e)}finally{u.f()}}}catch(e){s.e(e)}finally{s.f()}}catch(e){qe.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(o.href," (").concat(e.message,')\nIf it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.'))}}}catch(e){a.e(e)}finally{a.f()}if(!r.size)return;var d=Array.from(r).join(", ");try{t=e.querySelectorAll(d)}catch(e){}}return new Promise(function(e,n){var r=Ge(t).filter(Un).map(Wn),a=hn("searchPseudoElements");jn(),Promise.all(r).then(function(){a(),_n(),e()}).catch(function(){a(),_n(),n()})})}}var Xn={hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=qn,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node,n=void 0===t?E:t;qe.searchPseudoElements&&qn(n)}}},Yn=!1,Kn=function(e){return e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),r=n[0],a=n.slice(1).join("-");if(r&&"h"===a)return e.flipX=!0,e;if(r&&"v"===a)return e.flipY=!0,e;if(a=parseFloat(a),isNaN(a))return e;switch(r){case"grow":e.size=e.size+a;break;case"shrink":e.size=e.size-a;break;case"left":e.x=e.x-a;break;case"right":e.x=e.x+a;break;case"up":e.y=e.y-a;break;case"down":e.y=e.y+a;break;case"rotate":e.rotate=e.rotate+a}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},Zn={mixout:function(){return{parse:{transform:function(e){return Kn(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-transform");return n&&(e.transform=Kn(n)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,n=e.transform,r=e.containerWidth,a=e.iconWidth,o={transform:"translate(".concat(r/2," 256)")},i="translate(".concat(32*n.x,", ").concat(32*n.y,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),c={outer:o,inner:{transform:"".concat(i," ").concat(s," ").concat(l)},path:{transform:"translate(".concat(a/2*-1," -256)")}};return{tag:"g",attributes:b({},c.outer),children:[{tag:"g",attributes:b({},c.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:b(b({},t.icon.attributes),c.path)}]}]}}}},Gn={x:0,y:0,width:"100%",height:"100%"};function er(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}var tr={hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-mask"),r=n?Bt(n.split(" ").map(function(e){return e.trim()})):{prefix:null,iconName:null,rest:[]};return r.prefix||(r.prefix=At()),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var t,n=e.children,r=e.attributes,a=e.main,o=e.mask,i=e.maskId,s=e.transform,l=a.width,c=a.icon,u=o.width,f=o.icon,d=function(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,a={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(32*t.x,", ").concat(32*t.y,") "),i="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)");return{outer:a,inner:{transform:"".concat(o," ").concat(i," ").concat(s)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}({transform:s,containerWidth:u,iconWidth:l}),h={tag:"rect",attributes:b(b({},Gn),{},{fill:"white"})},m=c.children?{children:c.children.map(er)}:{},p={tag:"g",attributes:b({},d.inner),children:[er(b({tag:c.tag,attributes:b(b({},c.attributes),d.path)},m))]},g={tag:"g",attributes:b({},d.outer),children:[p]},v="mask-".concat(i||Ze()),y="clip-".concat(i||Ze()),w={tag:"mask",attributes:b(b({},Gn),{},{id:v,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[h,g]},x={tag:"defs",children:[{tag:"clipPath",attributes:{id:y},children:(t=f,"g"===t.tag?t.children:[t])},w]};return n.push(x,{tag:"rect",attributes:b({fill:"currentColor","clip-path":"url(#".concat(y,")"),mask:"url(#".concat(v,")")},Gn)}),{children:n,attributes:r}}}},nr={provides:function(e){var t=!1;O.matchMedia&&(t=O.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],n={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:b(b({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=b(b({},r),{},{attributeName:"opacity"}),o={tag:"circle",attributes:b(b({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||o.children.push({tag:"animate",attributes:b(b({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:b(b({},a),{},{values:"1;0;1;1;0;1;"})}),e.push(o),e.push({tag:"path",attributes:b(b({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:b(b({},a),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:b(b({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:b(b({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}};!function(e,t){var n=t.mixoutsTo;Ht=e,Wt={},Object.keys(Ut).forEach(function(e){-1===Jt.indexOf(e)&&delete Ut[e]}),Ht.forEach(function(e){var t=e.mixout?e.mixout():{};if(Object.keys(t).forEach(function(e){"function"==typeof t[e]&&(n[e]=t[e]),"object"===k(t[e])&&Object.keys(t[e]).forEach(function(r){n[e]||(n[e]={}),n[e][r]=t[e][r]})}),e.hooks){var r=e.hooks();Object.keys(r).forEach(function(e){Wt[e]||(Wt[e]=[]),Wt[e].push(r[e])})}e.provides&&e.provides(Ut)})}([st,Fn,An,In,Dn,Xn,{mixout:function(){return{dom:{unwatch:function(){jn(),Yn=!0}}}},hooks:function(){return{bootstrap:function(){Sn(Qt("mutationObserverCallbacks",{}))},noAuto:function(){Nn&&Nn.disconnect()},watch:function(e){var t=e.observeMutationsRoot;Yn?_n():Sn(Qt("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},Zn,tr,nr,{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-symbol"),r=null!==n&&(""===n||n);return e.symbol=r,e}}}}],{mixoutsTo:Gt});var rr=Gt.config,ar=Gt.parse,or=Gt.icon;function ir(e){return function(e){return(e-=0)==e}(e)?e:(e=e.replace(/[_-]+(.)?/g,(e,t)=>t?t.toUpperCase():"")).charAt(0).toLowerCase()+e.slice(1)}function sr(e){return e.charAt(0).toUpperCase()+e.slice(1)}var lr=new Map;function cr(e){if(lr.has(e))return lr.get(e);const t={};let n=0;const r=e.length;for(;n<r;){const a=e.indexOf(";",n),o=-1===a?r:a,i=e.slice(n,o).trim();if(i){const e=i.indexOf(":");if(e>0){const n=i.slice(0,e).trim(),r=i.slice(e+1).trim();if(n&&r){const e=ir(n);t[e.startsWith("webkit")?sr(e):e]=r}}}n=o+1}if(1e3===lr.size){const e=lr.keys().next().value;e&&lr.delete(e)}return lr.set(e,t),t}var ur=function e(t,n,r={}){if("string"==typeof n)return n;const a=(n.children||[]).map(n=>e(t,n)),o=n.attributes||{},i={};for(const[e,t]of Object.entries(o))switch(!0){case"class"===e:i.className=t;break;case"style"===e:i.style=cr(String(t));break;case e.startsWith("aria-"):case e.startsWith("data-"):i[e.toLowerCase()]=t;break;default:i[ir(e)]=t}const{style:s,role:l,"aria-label":c,...u}=r;return s&&(i.style=i.style?{...i.style,...s}:s),l&&(i.role=l),c&&(i["aria-label"]=c,i["aria-hidden"]="false"),t(n.tag,{...u,...i},...a)}.bind(null,t.createElement),fr=(e,n)=>{const r=t.useId();return e||(n?r:void 0)};"undefined"!=typeof process&&process.env.FA_VERSION;var dr="searchPseudoElementsFullScan"in rr?"7.0.0":"6.0.0",hr=Number.parseInt(dr)>=7,mr="fa",pr="fa-beat",gr="fa-fade",vr="fa-beat-fade",br="fa-bounce",yr="fa-shake",wr="fa-spin",xr="fa-spin-pulse",kr="fa-spin-reverse",jr="fa-pulse",_r={left:"fa-pull-left",right:"fa-pull-right"},Nr={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},Sr={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},Mr="fa-border",Cr="fa-fw",Tr="fa-flip",Rr="fa-flip-horizontal",Or="fa-flip-vertical",Er="fa-inverse",Pr="fa-rotate-by",Fr="fa-swap-opacity",Ar="fa-width-auto";function Ir(e){const t=rr.cssPrefix||rr.familyPrefix||mr;return t===mr?e:e.replace(new RegExp(String.raw`(?<=^|\s)${mr}-`,"g"),`${t}-`)}function Dr(e){if(e)return(e=>"object"==typeof e&&"icon"in e&&!!e.icon)(e)?e:ar.icon(e)}var Lr=new class{constructor(e="react-fontawesome"){this.enabled=!1;let t=!1;try{t="undefined"!=typeof process&&"development"===process.env.NODE_ENV}catch{}this.scope=e,this.enabled=t}log(...e){this.enabled&&console.log(`[${this.scope}]`,...e)}warn(...e){this.enabled&&console.warn(`[${this.scope}]`,...e)}error(...e){this.enabled&&console.error(`[${this.scope}]`,...e)}}("FontAwesomeIcon"),Br={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},zr=new Set(Object.keys(Br)),$r=t.forwardRef((e,t)=>{const n={...Br,...e},{icon:r,mask:a,symbol:o,title:i,titleId:s,maskId:l,transform:c}=n,u=fr(l,Boolean(a)),f=fr(s,Boolean(i)),d=Dr(r);if(!d)return Lr.error("Icon lookup is undefined",r),null;const h=function(e){const{beat:t,fade:n,beatFade:r,bounce:a,shake:o,spin:i,spinPulse:s,spinReverse:l,pulse:c,fixedWidth:u,inverse:f,border:d,flip:h,size:m,rotation:p,pull:g,swapOpacity:v,rotateBy:b,widthAuto:y,className:w}=e,x=[];return w&&x.push(...w.split(" ")),t&&x.push(pr),n&&x.push(gr),r&&x.push(vr),a&&x.push(br),o&&x.push(yr),i&&x.push(wr),l&&x.push(kr),s&&x.push(xr),c&&x.push(jr),u&&x.push(Cr),f&&x.push(Er),d&&x.push(Mr),!0===h&&x.push(Tr),"horizontal"!==h&&"both"!==h||x.push(Rr),"vertical"!==h&&"both"!==h||x.push(Or),null!=m&&x.push(Sr[m]),null!=p&&0!==p&&x.push(Nr[p]),null!=g&&x.push(_r[g]),v&&x.push(Fr),hr?(b&&x.push(Pr),y&&x.push(Ar),(rr.cssPrefix||rr.familyPrefix||mr)===mr?x:x.map(Ir)):x}(n),m="string"==typeof c?ar.transform(c):c,p=Dr(a),g=or(d,{...h.length>0&&{classes:h},...m&&{transform:m},...p&&{mask:p},symbol:o,title:i,titleId:f,maskId:u});if(!g)return Lr.error("Could not find icon",d),null;const{abstract:v}=g,b={ref:t};for(const e of(y=n,Object.keys(y)))zr.has(e)||(b[e]=n[e]);var y;return ur(v[0],b)});$r.displayName="FontAwesomeIcon";var Vr={box:"Box-module_box__SQLj3",collapseBox:"Box-module_collapseBox__5A5Fc",padding:"Box-module_padding__dIJ-L",collapsedContent:"Box-module_collapsedContent__yn-0g",collapseTitle:"Box-module_collapseTitle__-R0ge",collapseIcon:"Box-module_collapseIcon__OAiTO",collapsed:"Box-module_collapsed__nf76f"};d.bind(Vr);const Hr=Symbol("BrandTag");const Wr=new class{constructor(e){this[Hr]=e}}("unit"),Ur=e=>null==e;function Jr(e,t){return void 0!==t?e(t):e}function Qr(e){if(function(e,t){return"object"==typeof e&&null!==e&&t in e}(e,"toString")&&"function"==typeof e.toString){const t=e.toString();return"string"==typeof t?t:JSON.stringify(e)}return JSON.stringify(e)}const qr="Ok",Xr="Err";class Yr{constructor(e){this.repr=e}static ok(e){return Ur(e)?new Yr(["Ok",Wr]):new Yr(["Ok",e])}static err(e){return Ur(e)?new Yr(["Err",Wr]):new Yr(["Err",e])}get variant(){return this.repr[0]}get value(){if(this.repr[0]===Xr)throw new Error("Cannot get the value of Err");return this.repr[1]}get error(){if(this.repr[0]===qr)throw new Error("Cannot get the error of Ok");return this.repr[1]}get isOk(){return this.repr[0]===qr}get isErr(){return this.repr[0]===Xr}map(e){return function(e,t){const n=t=>t.isOk?Kr(e(t.value)):t;return Jr(n,t)}(e,this)}mapOr(e,t){return function(e,t,n){function r(t,n){return n.isOk?t(n.value):e}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}(e,t,this)}mapOrElse(e,t){return Gr(e,t,this)}match(e){return function(e,t){const n=t=>Gr(e.Err,e.Ok,t);return Jr(n,t)}(e,this)}mapErr(e){return function(e,t){const n=t=>t.isOk?t:Zr(e(t.error));return Jr(n,t)}(e,this)}or(e){return function(e,t){const n=t=>t.isOk?Kr(t.value):e;return Jr(n,t)}(e,this)}orElse(e){return function(e,t){const n=t=>t.isOk?Kr(t.value):e(t.error);return Jr(n,t)}(e,this)}and(e){return function(e,t){const n=t=>t.isOk?e:Zr(t.error);return Jr(n,t)}(e,this)}andThen(e){return function(e,t){const n=t=>t.isOk?e(t.value):Zr(t.error);return Jr(n,t)}(e,this)}unwrapOr(e){return function(e,t){const n=t=>t.isOk?t.value:e;return Jr(n,t)}(e,this)}unwrapOrElse(e){return function(e,t){const n=t=>t.isOk?t.value:e(t.error);return Jr(n,t)}(e,this)}toMaybe(){return(e=this).isOk?da.just(e.value):da.nothing();var e}toString(){return ea(this)}toJSON(){return ta(this)}equals(e){return t=e,void 0!==(n=this)?n.match({Err:()=>t.isErr,Ok:e=>t.isOk&&t.value===e}):e=>e.match({Err:()=>t.isErr,Ok:e=>t.isOk&&t.value===e});var t,n}ap(e){return function(e,t){const n=t=>t.andThen(t=>e.map(e=>e(t)));return Jr(n,t)}(this,e)}}const Kr=Yr.ok,Zr=Yr.err;function Gr(e,t,n){function r(t,n){return n.isOk?t(n.value):e(n.error)}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}const ea=e=>{const t=e.match({Ok:Qr,Err:Qr});return`${e.variant.toString()}(${t})`},ta=e=>e.isOk?{variant:e.variant,value:e.value}:{variant:e.variant,error:e.error};const na=Yr,ra="Just",aa="Nothing";let oa;class ia{constructor(e){if(Ur(e))return this.repr=[aa],oa||(oa=this),oa;this.repr=[ra,e]}static of(e){return new ia(e)}static just(e){if(Ur(e))throw new Error(`attempted to call "just" with ${e}`);return new ia(e)}static nothing(e){return new ia}get variant(){return this.repr[0]}get value(){if(this.repr[0]===aa)throw new Error("Cannot get the value of `Nothing`");return this.repr[1]}get isJust(){return this.repr[0]===ra}get isNothing(){return this.repr[0]===aa}map(e){return function(e,t){const n=t=>t.isJust?sa(e(t.value)):la();return Jr(n,t)}(e,this)}mapOr(e,t){return function(e,t,n){function r(t,n){return n.isJust?t(n.value):e}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}(e,t,this)}mapOrElse(e,t){return ca(e,t,this)}match(e){return function(e,t){const n=t=>ca(e.Nothing,e.Just,t);return Jr(n,t)}(e,this)}or(e){return function(e,t){const n=t=>t.isJust?t:e;return void 0!==t?n(t):n}(e,this)}orElse(e){return function(e,t){const n=t=>t.isJust?t:e();return Jr(n,t)}(e,this)}and(e){return function(e,t){const n=t=>t.isJust?e:la();return Jr(n,t)}(e,this)}andThen(e){return ua(e,this)}unwrapOr(e){return function(e,t){const n=t=>t.isJust?t.value:e;return Jr(n,t)}(e,this)}unwrapOrElse(e){return function(e,t){const n=t=>t.isJust?t.value:e();return Jr(n,t)}(e,this)}toOkOrErr(e){return function(e,t){const n=t=>t.isJust?na.ok(t.value):na.err(e);return void 0!==t?n(t):n}(e,this)}toOkOrElseErr(e){return function(e,t){return Jr(t=>t.isJust?na.ok(t.value):na.err(e()),t)}(e,this)}toString(){return function(e){const t=e.map(e=>`(${Qr(e)})`).unwrapOr("");return`${e.variant}${t}`}(this)}toJSON(){return(e=this).isJust?{variant:e.variant,value:fa(e.value)?e.value.toJSON():e.value}:{variant:e.variant};var e}equals(e){return t=e,Jr(e=>e.match({Just:e=>t.isJust&&t.value===e,Nothing:()=>t.isNothing}),this);var t}ap(e){return function(e,t){const n=t=>t.andThen(t=>e.map(e=>e(t)));return Jr(n,t)}(this,e)}get(e){return function(e,t){return Jr(ua(function(e,t){const n=t=>da.of(t[e]);return Jr(n,t)}(e)),t)}(e,this)}}const sa=ia.just,la=ia.nothing;function ca(e,t,n){function r(t,n){return n.isJust?t(n.value):e()}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}function ua(e,t){const n=t=>t.isJust?e(t.value):la();return void 0!==t?n(t):n}function fa(e){return e instanceof da}const da=ia,ha=["dotnetspy","ebpfspy","gospy","phpspy","pyspy","rbspy","nodespy","javaspy","pyroscope-rs","scrape","tracing","unknown"],ma=n.z.preprocess(e=>e&&ha.includes(e)?e:"unknown",n.z.enum(ha).default("unknown")),pa=["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions"],ga=n.z.preprocess(e=>"string"==typeof e&&pa.includes(e)?e:"unknown",n.z.enum(["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions","unknown"])),va=n.z.object({names:n.z.array(n.z.preprocess(e=>e||"unknown",n.z.string().min(1))),levels:n.z.array(n.z.array(n.z.number())),numTicks:n.z.number(),maxSelf:n.z.number()}),ba=n.z.object({appName:n.z.string().optional(),name:n.z.string().optional(),startTime:n.z.number().optional(),endTime:n.z.number().optional(),query:n.z.string().optional(),maxNodes:n.z.number().optional(),format:n.z.enum(["single","double"]),sampleRate:n.z.number(),spyName:ma,units:ga});n.z.object({version:n.z.number().min(1).max(1).default(1),flamebearer:va,metadata:ba,leftTicks:n.z.number().optional(),rightTicks:n.z.number().optional()});const ya={format:"single",jStep:4,jName:3,getBarOffset:(e,t)=>e[t],getBarTotal:(e,t)=>e[t+1],getBarTotalDiff:(e,t)=>0,getBarSelf:(e,t)=>e[t+2],getBarSelfDiff:(e,t)=>0,getBarName:(e,t)=>e[t+3]},wa={format:"double",jStep:7,jName:6,getBarOffset:(e,t)=>e[t]+e[t+3],getBarTotal:(e,t)=>e[t+4]+e[t+1],getBarTotalLeft:(e,t)=>e[t+1],getBarTotalRght:(e,t)=>e[t+4],getBarTotalDiff:(e,t)=>e[t+4]-e[t+1],getBarSelf:(e,t)=>e[t+5]+e[t+2],getBarSelfLeft:(e,t)=>e[t+2],getBarSelfRght:(e,t)=>e[t+5],getBarSelfDiff:(e,t)=>e[t+5]-e[t+2],getBarName:(e,t)=>e[t+6]};function xa(e){switch(e){case"single":return ya;case"double":return wa;default:throw new Error(`Unsupported type: '${e}'`)}}const ka=n.z.object({refType:n.z.string(),traceID:n.z.string(),spanID:n.z.string()}),ja=n.z.object({key:n.z.string(),type:n.z.string(),value:n.z.union([n.z.boolean(),n.z.number(),n.z.string()])}),_a=n.z.object({traceID:n.z.string(),spanID:n.z.string(),flags:n.z.string(),operationName:n.z.string(),references:n.z.array(ka),startTime:n.z.number(),duration:n.z.number(),tags:n.z.array(ja),logs:n.z.object({timestamp:n.z.number(),fields:n.z.array(ja)}),processID:n.z.string(),warnings:n.z.any()}),Na=n.z.object({serviceName:n.z.string(),tags:n.z.array(ja)});n.z.object({traceID:n.z.string(),spans:n.z.array(_a),processes:n.z.record(Na),warnings:n.z.any()});const Sa=n.z.object({watermark:n.z.object({}).optional(),startTime:n.z.number(),samples:n.z.array(n.z.number()),durationDelta:n.z.number()});n.z.record(n.z.string(),Sa);const Ma=22,Ca=21.5;function Ta(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Ra(e){if(null==e)return null;if("number"==typeof e)return{value:e,unit:"",hasLessThan:!1,sign:""};let t=String(e).trim().replace(/\u2212/g,"-");if(!t)return null;let n=!1;t.startsWith("<")&&(n=!0,t=t.slice(1).trim());const r=t.match(/^([+\-]?)(\d*\.?\d+)\s*(.*)$/);if(!r)return null;const a=r[1]||"",o=r[2],i=(r[3]||"").trim(),s=parseFloat(o);return Number.isFinite(s)?{value:s,unit:i,hasLessThan:n,sign:a}:null}function Oa(e,t=!1){if(!e||!t)return e;const n=Ra(e);if(!n)return e;const{unit:r}=n;let a=r;const o=r.toLowerCase();"ms"===o?a="毫秒":"μs"===o||"µs"===o||"us"===o?a="微秒":"second"===o||"seconds"===o?a="秒":"minute"===o||"minutes"===o||"min"===o||"mins"===o?a="分钟":"hour"===o||"hours"===o?a="小时":"day"===o||"days"===o?a="天":"month"===o||"months"===o?a="月":"year"!==o&&"years"!==o||(a="年");const i=String(e).match(/^([<\s]*)([+\-]?\d*\.?\d+)(.*)$/);if(!i)return e;return`${i[1]||""}${i[2]||""} ${a}`.trim()}const Ea=[{value:1e15,label:"Quad"},{value:1e12,label:"Tri"},{value:1e9,label:"B"},{value:1e6,label:"M"},{value:1e3,label:"K"}];function Pa(e){return Math.round(1e4*e)/100}function Fa(e,t){return(t-e)/e*100}function Aa(e,t,n){switch(n){case"samples":return new Ia(e/t);case"objects":case"goroutines":case"lock_samples":case"exceptions":return new La(e);case"bytes":return new Ba(e);case"lock_nanoseconds":return new Da(e);case"trace_samples":return new Ia(e/t,"",!0);default:return console.warn(`Unsupported unit: '${n}'. Defaulting to ''`),new Ia(e/t," ")}}class Ia{constructor(e,t,n){this.divider=1,this.enableSubsecondPrecision=!1,this.suffix="second",this.durations=[[60,"minute"],[60,"hour"],[24,"day"],[30,"month"],[12,"year"]],this.units="",n&&(this.enableSubsecondPrecision=n,this.durations=[[1e3,"ms"],[1e3,"second"],...this.durations],this.suffix="μs",e*=1e6),this.units=t||"";for(let t=0;t<this.durations.length;t++){const n=this.durations[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e,t,n=!0){this.enableSubsecondPrecision&&(t/=1e6);const r=e/t/this.divider;let a=r.toFixed(2);return 0===r?a="0.00":(r>=0&&r<.01||r<=0&&r>-.01)&&(a="< 0.01"),n?`${a} ${this.units||`${this.suffix}${1===r||2===this.suffix.length?"":"s"}`}`:a}formatPrecise(e,t){this.enableSubsecondPrecision&&(t/=1e6);const n=e/t/this.divider;return`${parseFloat(n.toFixed(5))} ${this.units||`${this.suffix}${1===n||2===this.suffix.length?"":"s"}`}`}}class Da{constructor(e){this.divider=1,this.multiplier=1,this.suffix="second",this.durations=[[60,"minute"],[60,"hour"],[24,"day"],[30,"month"],[12,"year"]],e/=1e9;for(let t=0;t<this.durations.length;t++){const n=this.durations[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e){const t=e/1e9/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}${1===t?"":"s"}`}formatPrecise(e){const t=e/1e9/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}${1===t?"":"s"}`}}class La{constructor(e){this.divider=1,this.suffix="",this.objects=[[1e3,"K"],[1e3,"M"],[1e3,"G"],[1e3,"T"],[1e3,"P"]];for(let t=0;t<this.objects.length;t++){const n=this.objects[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e){const t=e/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}`}formatPrecise(e){const t=e/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}`}}class Ba{constructor(e){this.divider=1,this.suffix="bytes",this.bytes=[[1024,"KB"],[1024,"MB"],[1024,"GB"],[1024,"TB"],[1024,"PB"]];for(let t=0;t<this.bytes.length;t++){const n=this.bytes[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;{this.divider*=n[0],e/=n[0];const t=n[1];t?this.suffix=t:(console.warn("Could not calculate suffix"),this.suffix="")}}}format(e){const t=e/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}`}formatPrecise(e){const t=e/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}`}}const za="TAIL",$a="HEAD";function Va({mode:e,charSize:t,rectWidth:n,fullText:r,shortText:a}){if(e===za){if(t*r.length<=n)return{mode:e,text:r,marginLeft:3};const o=t*a.length;return o<=n?{mode:e,text:a,marginLeft:3}:{mode:e,text:a,marginLeft:-(o-n+3)}}return{mode:e,text:r,marginLeft:3}}function Ha(e){return e===za?{direction:"rtl",overflow:"hidden",textOverflow:"ellipsis"}:{overflow:"hidden",textOverflow:"ellipsis"}}const Wa={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]};for(const e in Wa)Object.freeze(Wa[e]);var Ua=Object.freeze(Wa);const Ja=Object.create(null);for(const e in Ua)Object.hasOwn(Ua,e)&&(Ja[Ua[e]]=e);const Qa={to:{},get:{}};function qa(e,t,n){return Math.min(Math.max(t,e),n)}function Xa(e){const t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}Qa.get=function(e){let t,n;switch(e.slice(0,3).toLowerCase()){case"hsl":t=Qa.get.hsl(e),n="hsl";break;case"hwb":t=Qa.get.hwb(e),n="hwb";break;default:t=Qa.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},Qa.get.rgb=function(e){if(!e)return null;let t,n,r,a=[0,0,0,1];if(t=e.match(/^#([a-f\d]{6})([a-f\d]{2})?$/i)){for(r=t[2],t=t[1],n=0;n<3;n++){const e=2*n;a[n]=Number.parseInt(t.slice(e,e+2),16)}r&&(a[3]=Number.parseInt(r,16)/255)}else if(t=e.match(/^#([a-f\d]{3,4})$/i)){for(t=t[1],r=t[3],n=0;n<3;n++)a[n]=Number.parseInt(t[n]+t[n],16);r&&(a[3]=Number.parseInt(r+r,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i)){for(n=0;n<3;n++)a[n]=Number.parseFloat(t[n+1]);t[4]&&(a[3]=t[5]?.01*Number.parseFloat(t[4]):Number.parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i)))return(t=e.toLowerCase().match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:Object.hasOwn(Ua,t[1])?(a=Ua[t[1]].slice(),a[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*Number.parseFloat(t[n+1]));t[4]&&(a[3]=t[5]?.01*Number.parseFloat(t[4]):Number.parseFloat(t[4]))}for(n=0;n<3;n++)a[n]=qa(a[n],0,255);return a[3]=qa(a[3],0,1),a},Qa.get.hsl=function(e){if(!e)return null;const 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*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){const e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,qa(Number.parseFloat(t[2]),0,100),qa(Number.parseFloat(t[3]),0,100),qa(Number.isNaN(e)?1:e,0,1)]}return null},Qa.get.hwb=function(e){if(!e)return null;const t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){const e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,qa(Number.parseFloat(t[2]),0,100),qa(Number.parseFloat(t[3]),0,100),qa(Number.isNaN(e)?1:e,0,1)]}return null},Qa.to.hex=function(...e){return"#"+Xa(e[0])+Xa(e[1])+Xa(e[2])+(e[3]<1?Xa(Math.round(255*e[3])):"")},Qa.to.rgb=function(...e){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]+")"},Qa.to.rgb.percent=function(...e){const 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]+")"},Qa.to.hsl=function(...e){return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},Qa.to.hwb=function(...e){let t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},Qa.to.keyword=function(...e){return Ja[e.slice(0,3)]};const Ya={};for(const e of Object.keys(Ua))Ya[Ua[e]]=e;const Ka={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"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},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"]}},Za=(6/29)**3;function Ga(e){const t=e>.0031308?1.055*e**(1/2.4)-.055:12.92*e;return Math.min(Math.max(0,t),1)}function eo(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}for(const e of Object.keys(Ka)){if(!("channels"in Ka[e]))throw new Error("missing channels property: "+e);if(!("labels"in Ka[e]))throw new Error("missing channel labels property: "+e);if(Ka[e].labels.length!==Ka[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=Ka[e];delete Ka[e].channels,delete Ka[e].labels,Object.defineProperty(Ka[e],"channels",{value:t}),Object.defineProperty(Ka[e],"labels",{value:n})}function to(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}function no(e){const t=function(){const e={},t=Object.keys(Ka);for(let{length:n}=t,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length>0;){const e=n.pop(),r=Object.keys(Ka[e]);for(let{length:a}=r,o=0;o<a;o++){const a=r[o],i=t[a];-1===i.distance&&(i.distance=t[e].distance+1,i.parent=e,n.unshift(a))}}return t}function ro(e,t){return function(n){return t(e(n))}}function ao(e,t){const n=[t[e].parent,e];let r=Ka[t[e].parent][e],a=t[e].parent;for(;t[a].parent;)n.unshift(t[a].parent),r=ro(Ka[t[a].parent][a],r),a=t[a].parent;return r.conversion=n,r}function oo(e){const t=no(e),n={},r=Object.keys(t);for(let{length:e}=r,a=0;a<e;a++){const e=r[a];null!==t[e].parent&&(n[e]=ao(e,t))}return n}Ka.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=o-a;let s,l;switch(o){case a:s=0;break;case t:s=(n-r)/i;break;case n:s=2+(r-t)/i;break;case r:s=4+(t-n)/i}s=Math.min(60*s,360),s<0&&(s+=360);const c=(a+o)/2;return l=o===a?0:c<=.5?i/(o+a):i/(2-o-a),[s,100*l,100*c]},Ka.rgb.hsv=function(e){let t,n,r,a,o;const i=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(i,s,l),u=c-Math.min(i,s,l),f=function(e){return(c-e)/6/u+.5};if(0===u)a=0,o=0;else{switch(o=u/c,t=f(i),n=f(s),r=f(l),c){case i:a=r-n;break;case s:a=1/3+t-r;break;case l:a=2/3+n-t}a<0?a+=1:a>1&&(a-=1)}return[360*a,100*o,100*c]},Ka.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const a=Ka.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)),[a,100*o,100*r]},Ka.rgb.oklab=function(e){const t=eo(e[0]/255),n=eo(e[1]/255),r=eo(e[2]/255),a=Math.cbrt(.4122214708*t+.5363325363*n+.0514459929*r),o=Math.cbrt(.2119034982*t+.6806995451*n+.1073969566*r),i=Math.cbrt(.0883024619*t+.2817188376*n+.6299787005*r);return[100*(.2104542553*a+.793617785*o-.0040720468*i),100*(1.9779984951*a-2.428592205*o+.4505937099*i),100*(.0259040371*a+.7827717662*o-.808675766*i)]},Ka.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(1-t,1-n,1-r);return[100*((1-t-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*((1-r-a)/(1-a)||0),100*a]},Ka.rgb.keyword=function(e){const t=Ya[e];if(t)return t;let n,r=Number.POSITIVE_INFINITY;for(const t of Object.keys(Ua)){const a=to(e,Ua[t]);a<r&&(r=a,n=t)}return n},Ka.keyword.rgb=function(e){return[...Ua[e]]},Ka.rgb.xyz=function(e){const t=eo(e[0]/255),n=eo(e[1]/255),r=eo(e[2]/255);return[100*(.4124564*t+.3575761*n+.1804375*r),100*(.2126729*t+.7151522*n+.072175*r),100*(.0193339*t+.119192*n+.9503041*r)]},Ka.rgb.lab=function(e){const t=Ka.rgb.xyz(e);let n=t[0],r=t[1],a=t[2];n/=95.047,r/=100,a/=108.883,n=n>Za?n**(1/3):7.787*n+16/116,r=r>Za?r**(1/3):7.787*r+16/116,a=a>Za?a**(1/3):7.787*a+16/116;return[116*r-16,500*(n-r),200*(r-a)]},Ka.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let a,o;if(0===n)return o=255*r,[o,o,o];const i=r<.5?r*(1+n):r+n-r*n,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},Ka.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,a=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,a*=o<=1?o:2-o;return[t,100*(0===r?2*a/(o+a):2*n/(r+n)),100*((r+n)/2)]},Ka.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const a=Math.floor(t)%6,o=t-Math.floor(t),i=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,a){case 0:return[r,l,i];case 1:return[s,r,i];case 2:return[i,r,l];case 3:return[i,s,r];case 4:return[l,i,r];case 5:return[r,i,s]}},Ka.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,a=Math.max(r,.01);let o,i;i=(2-n)*r;const s=(2-n)*a;return o=n*a,o/=s<=1?s:2-s,o=o||0,i/=2,[t,100*o,100*i]},Ka.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const a=n+r;let o;a>1&&(n/=a,r/=a);const i=Math.floor(6*t),s=1-r;o=6*t-i,1&i&&(o=1-o);const l=n+o*(s-n);let c,u,f;switch(i){default:case 6:case 0:c=s,u=l,f=n;break;case 1:c=l,u=s,f=n;break;case 2:c=n,u=s,f=l;break;case 3:c=n,u=l,f=s;break;case 4:c=l,u=n,f=s;break;case 5:c=s,u=n,f=l}return[255*c,255*u,255*f]},Ka.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=e[3]/100;return[255*(1-Math.min(1,t*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a))]},Ka.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let a,o,i;return a=3.2404542*t+-1.5371385*n+-.4985314*r,o=-.969266*t+1.8760108*n+.041556*r,i=.0556434*t+-.2040259*n+1.0572252*r,a=Ga(a),o=Ga(o),i=Ga(i),[255*a,255*o,255*i]},Ka.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>Za?t**(1/3):7.787*t+16/116,n=n>Za?n**(1/3):7.787*n+16/116,r=r>Za?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},Ka.xyz.oklab=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=Math.cbrt(.8189330101*t+.3618667424*n-.1288597137*r),o=Math.cbrt(.0329845436*t+.9293118715*n+.0361456387*r),i=Math.cbrt(.0482003018*t+.2643662691*n+.633851707*r);return[100*(.2104542553*a+.793617785*o-.0040720468*i),100*(1.9779984951*a-2.428592205*o+.4505937099*i),100*(.0259040371*a+.7827717662*o-.808675766*i)]},Ka.oklab.oklch=function(e){return Ka.lab.lch(e)},Ka.oklab.xyz=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=(.999999998*t+.396337792*n+.215803758*r)**3,o=(1.000000008*t-.105561342*n-.063854175*r)**3,i=(1.000000055*t-.089484182*n-1.291485538*r)**3;return[100*(1.227013851*a-.55779998*o+.281256149*i),100*(-.040580178*a+1.11225687*o-.071676679*i),100*(-.076381285*a-.421481978*o+1.58616322*i)]},Ka.oklab.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=(t+.3963377774*n+.2158037573*r)**3,o=(t-.1055613458*n-.0638541728*r)**3,i=(t-.0894841775*n-1.291485548*r)**3;return[255*Ga(4.0767416621*a-3.3077115913*o+.2309699292*i),255*Ga(-1.2684380046*a+2.6097574011*o-.3413193965*i),255*Ga(-.0041960863*a-.7034186147*o+1.707614701*i)]},Ka.oklch.oklab=function(e){return Ka.lch.lab(e)},Ka.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const a=n**3,o=t**3,i=r**3;return n=a>Za?a:(n-16/116)/7.787,t=o>Za?o:(t-16/116)/7.787,r=i>Za?i:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},Ka.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let a;a=360*Math.atan2(r,n)/2/Math.PI,a<0&&(a+=360);return[t,Math.sqrt(n*n+r*r),a]},Ka.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)]},Ka.rgb.ansi16=function(e,t=null){const[n,r,a]=e;let o=null===t?Ka.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let i=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===o&&(i+=60),i},Ka.hsv.ansi16=function(e){return Ka.rgb.ansi16(Ka.hsv.rgb(e),e[2])},Ka.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t>>4==n>>4&&n>>4==r>>4)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)},Ka.ansi16.rgb=function(e){let t=(e=e[0])%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(Math.trunc(e>50)+1);return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},Ka.ansi256.rgb=function(e){if((e=e[0])>=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]},Ka.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".slice(t.length)+t},Ka.hex.rgb=function(e){const t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=[...n].map(e=>e+e).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},Ka.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),i=a-o;let s;return s=i<=0?0:a===t?(n-r)/i%6:a===n?2+(r-t)/i:4+(t-n)/i,s/=6,s%=1,[360*s,100*i,100*(i<1?o/(1-i):0)]},Ka.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let a=0;return r<1&&(a=(n-.5*r)/(1-r)),[e[0],100*r,100*a]},Ka.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},Ka.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 a=[0,0,0],o=t%1*6,i=o%1,s=1-i;let l=0;switch(Math.floor(o)){case 0:a[0]=1,a[1]=i,a[2]=0;break;case 1:a[0]=s,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=i;break;case 3:a[0]=0,a[1]=s,a[2]=1;break;case 4:a[0]=i,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=s}return l=(1-n)*r,[255*(n*a[0]+l),255*(n*a[1]+l),255*(n*a[2]+l)]},Ka.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]},Ka.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]},Ka.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)]},Ka.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},Ka.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},Ka.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},Ka.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},Ka.gray.hsl=function(e){return[0,0,e[0]]},Ka.gray.hsv=Ka.gray.hsl,Ka.gray.hwb=function(e){return[0,100,e[0]]},Ka.gray.cmyk=function(e){return[0,0,0,e[0]]},Ka.gray.lab=function(e){return[e[0],0,0]},Ka.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(n.length)+n},Ka.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const io={},so=Object.keys(Ka);function lo(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}function co(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{length:e}=r,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}for(const e of so){io[e]={},Object.defineProperty(io[e],"channels",{value:Ka[e].channels}),Object.defineProperty(io[e],"labels",{value:Ka[e].labels});const t=oo(e),n=Object.keys(t);for(const r of n){const n=t[r];io[e][r]=co(n),io[e][r].raw=lo(n)}}const uo=["keyword","gray","hex"],fo={};for(const e of Object.keys(io))fo[[...io[e].labels].sort().join("")]=e;const ho={};function mo(e,t){if(!(this instanceof mo))return new mo(e,t);if(t&&t in uo&&(t=null),t&&!(t in io))throw new Error("Unknown model: "+t);let n,r;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof mo)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=Qa.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,r=io[this.model].channels,this.color=t.value.slice(0,r),this.valpha="number"==typeof t.value[r]?t.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=io[this.model].channels;const n=Array.prototype.slice.call(e,0,r);this.color=bo(n,r),this.valpha="number"==typeof e[r]?e[r]: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 fo))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=fo[r];const{labels:a}=io[this.model],o=[];for(n=0;n<a.length;n++)o.push(e[a[n]]);this.color=bo(o)}if(ho[this.model])for(r=io[this.model].channels,n=0;n<r;n++){const e=ho[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)}mo.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Qa.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const n=1===t.valpha?t.color:[...t.color,this.valpha];return Qa.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 Qa.to.rgb.percent(...n)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=io[this.model],{labels:n}=io[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 mo([...this.color.map(po(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new mo([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:go("rgb",0,vo(255)),green:go("rgb",1,vo(255)),blue:go("rgb",2,vo(255)),hue:go(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:go("hsl",1,vo(100)),lightness:go("hsl",2,vo(100)),saturationv:go("hsv",1,vo(100)),value:go("hsv",2,vo(100)),chroma:go("hcg",1,vo(100)),gray:go("hcg",2,vo(100)),white:go("hwb",1,vo(100)),wblack:go("hwb",2,vo(100)),cyan:go("cmyk",0,vo(100)),magenta:go("cmyk",1,vo(100)),yellow:go("cmyk",2,vo(100)),black:go("cmyk",3,vo(100)),x:go("xyz",0,vo(95.047)),y:go("xyz",1,vo(100)),z:go("xyz",2,vo(108.833)),l:go("lab",0,vo(100)),a:go("lab",1),b:go("lab",2),keyword(e){return void 0!==e?new mo(e):io[this.model].keyword(this.color)},hex(e){return void 0!==e?new mo(e):Qa.to.hex(...this.rgb().round().color)},hexa(e){if(void 0!==e)return new mo(e);const t=this.rgb().round().color;let n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),Qa.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 mo.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(),a=void 0===t?.5:t,o=2*a-1,i=n.alpha()-r.alpha(),s=((o*i===-1?o:(o+i)/(1+o*i))+1)/2,l=1-s;return mo.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*a+r.alpha()*(1-a))}};for(const e of Object.keys(io)){if(uo.includes(e))continue;const{channels:t}=io[e];mo.prototype[e]=function(...t){return this.model===e?new mo(this):t.length>0?new mo(t,e):new mo([...(n=io[this.model][e].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],e);var n},mo[e]=function(...n){let r=n[0];return"number"==typeof r&&(r=bo(n,t)),new mo(r,e)}}function po(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function go(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(ho[r]||=[])[t]=n;return e=e[0],function(r){let a;return void 0!==r?(n&&(r=n(r)),a=this[e](),a.color[t]=r,a):(a=this[e]().color[t],n&&(a=n(a)),a)}}function vo(e){return function(t){return Math.max(0,Math.min(e,t))}}function bo(e,t){for(let n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}function yo(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function wo(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function xo(e){let t,n,r;function a(e,r,a=0,o=e.length){if(a<o){if(0!==t(r,r))return o;do{const t=a+o>>>1;n(e[t],r)<0?a=t+1:o=t}while(a<o)}return a}return 2!==e.length?(t=yo,n=(t,n)=>yo(e(t),n),r=(t,n)=>e(t)-n):(t=e===yo||e===wo?e:ko,n=e,r=e),{left:a,center:function(e,t,n=0,o=e.length){const i=a(e,t,n,o-1);return i>n&&r(e[i-1],t)>-r(e[i],t)?i-1:i},right:function(e,r,a=0,o=e.length){if(a<o){if(0!==t(r,r))return o;do{const t=a+o>>>1;n(e[t],r)<=0?a=t+1:o=t}while(a<o)}return a}}}function ko(){return 0}const jo=xo(yo).right;xo(function(e){return null===e?NaN:+e}).center;const _o=Math.sqrt(50),No=Math.sqrt(10),So=Math.sqrt(2);function Mo(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),o=r/Math.pow(10,a),i=o>=_o?10:o>=No?5:o>=So?2:1;let s,l,c;return a<0?(c=Math.pow(10,-a)/i,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*i,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Mo(e,t,2*n):[s,l,c]}function Co(e,t,n){return Mo(e=+e,t=+t,n=+n)[2]}function To(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Ro(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Oo(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Eo(){}var Po=.7,Fo=1/Po,Ao="\\s*([+-]?\\d+)\\s*",Io="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Do="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Lo=/^#([0-9a-f]{3,8})$/,Bo=new RegExp(`^rgb\\(${Ao},${Ao},${Ao}\\)$`),zo=new RegExp(`^rgb\\(${Do},${Do},${Do}\\)$`),$o=new RegExp(`^rgba\\(${Ao},${Ao},${Ao},${Io}\\)$`),Vo=new RegExp(`^rgba\\(${Do},${Do},${Do},${Io}\\)$`),Ho=new RegExp(`^hsl\\(${Io},${Do},${Do}\\)$`),Wo=new RegExp(`^hsla\\(${Io},${Do},${Do},${Io}\\)$`),Uo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Jo(){return this.rgb().formatHex()}function Qo(){return this.rgb().formatRgb()}function qo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Lo.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Xo(t):3===n?new Zo(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Yo(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Yo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Bo.exec(e))?new Zo(t[1],t[2],t[3],1):(t=zo.exec(e))?new Zo(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=$o.exec(e))?Yo(t[1],t[2],t[3],t[4]):(t=Vo.exec(e))?Yo(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Ho.exec(e))?ai(t[1],t[2]/100,t[3]/100,1):(t=Wo.exec(e))?ai(t[1],t[2]/100,t[3]/100,t[4]):Uo.hasOwnProperty(e)?Xo(Uo[e]):"transparent"===e?new Zo(NaN,NaN,NaN,0):null}function Xo(e){return new Zo(e>>16&255,e>>8&255,255&e,1)}function Yo(e,t,n,r){return r<=0&&(e=t=n=NaN),new Zo(e,t,n,r)}function Ko(e,t,n,r){return 1===arguments.length?function(e){return e instanceof Eo||(e=qo(e)),e?new Zo((e=e.rgb()).r,e.g,e.b,e.opacity):new Zo}(e):new Zo(e,t,n,null==r?1:r)}function Zo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Go(){return`#${ri(this.r)}${ri(this.g)}${ri(this.b)}`}function ei(){const e=ti(this.opacity);return`${1===e?"rgb(":"rgba("}${ni(this.r)}, ${ni(this.g)}, ${ni(this.b)}${1===e?")":`, ${e})`}`}function ti(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ni(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ri(e){return((e=ni(e))<16?"0":"")+e.toString(16)}function ai(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ii(e,t,n,r)}function oi(e){if(e instanceof ii)return new ii(e.h,e.s,e.l,e.opacity);if(e instanceof Eo||(e=qo(e)),!e)return new ii;if(e instanceof ii)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,s=o-a,l=(o+a)/2;return s?(i=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+a:2-o-a,i*=60):s=l>0&&l<1?0:i,new ii(i,s,l,e.opacity)}function ii(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function si(e){return(e=(e||0)%360)<0?e+360:e}function li(e){return Math.max(0,Math.min(1,e||0))}function ci(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Ro(Eo,qo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Jo,formatHex:Jo,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return oi(this).formatHsl()},formatRgb:Qo,toString:Qo}),Ro(Zo,Ko,Oo(Eo,{brighter(e){return e=null==e?Fo:Math.pow(Fo,e),new Zo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Po:Math.pow(Po,e),new Zo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Zo(ni(this.r),ni(this.g),ni(this.b),ti(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Go,formatHex:Go,formatHex8:function(){return`#${ri(this.r)}${ri(this.g)}${ri(this.b)}${ri(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ei,toString:ei})),Ro(ii,function(e,t,n,r){return 1===arguments.length?oi(e):new ii(e,t,n,null==r?1:r)},Oo(Eo,{brighter(e){return e=null==e?Fo:Math.pow(Fo,e),new ii(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Po:Math.pow(Po,e),new ii(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Zo(ci(e>=240?e-240:e+120,a,r),ci(e,a,r),ci(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new ii(si(this.h),li(this.s),li(this.l),ti(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ti(this.opacity);return`${1===e?"hsl(":"hsla("}${si(this.h)}, ${100*li(this.s)}%, ${100*li(this.l)}%${1===e?")":`, ${e})`}`}}));var ui=e=>()=>e;function fi(e){return 1===(e=+e)?di:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):ui(isNaN(t)?n:t)}}function di(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ui(isNaN(e)?t:e)}var hi=function e(t){var n=fi(t);function r(e,t){var r=n((e=Ko(e)).r,(t=Ko(t)).r),a=n(e.g,t.g),o=n(e.b,t.b),i=di(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=o(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function mi(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,a=t.slice();return function(o){for(n=0;n<r;++n)a[n]=e[n]*(1-o)+t[n]*o;return a}}function pi(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),i=new Array(r);for(n=0;n<a;++n)o[n]=ki(e[n],t[n]);for(;n<r;++n)i[n]=t[n];return function(e){for(n=0;n<a;++n)i[n]=o[n](e);return i}}function gi(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function vi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function bi(e,t){var n,r={},a={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=ki(e[n],t[n]):a[n]=t[n];return function(e){for(n in r)a[n]=r[n](e);return a}}var yi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wi=new RegExp(yi.source,"g");function xi(e,t){var n,r,a,o=yi.lastIndex=wi.lastIndex=0,i=-1,s=[],l=[];for(e+="",t+="";(n=yi.exec(e))&&(r=wi.exec(t));)(a=r.index)>o&&(a=t.slice(o,a),s[i]?s[i]+=a:s[++i]=a),(n=n[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,l.push({i:i,x:vi(n,r)})),o=wi.lastIndex;return o<t.length&&(a=t.slice(o),s[i]?s[i]+=a:s[++i]=a),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function ki(e,t){var n,r=typeof t;return null==t||"boolean"===r?ui(t):("number"===r?vi:"string"===r?(n=qo(t))?(t=n,hi):xi:t instanceof qo?hi:t instanceof Date?gi:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?mi:Array.isArray(t)?pi:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?bi:vi)(e,t)}function ji(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function _i(e){return+e}var Ni=[0,1];function Si(e){return e}function Mi(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Ci(e,t,n){var r=e[0],a=e[1],o=t[0],i=t[1];return a<r?(r=Mi(a,r),o=n(i,o)):(r=Mi(r,a),o=n(o,i)),function(e){return o(r(e))}}function Ti(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),o=new Array(r),i=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<r;)a[i]=Mi(e[i],e[i+1]),o[i]=n(t[i],t[i+1]);return function(t){var n=jo(e,t,1,r)-1;return o[n](a[n](t))}}function Ri(){var e,t,n,r,a,o,i=Ni,s=Ni,l=ki,c=Si;function u(){var e=Math.min(i.length,s.length);return c!==Si&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(i[0],i[e-1])),r=e>2?Ti:Ci,a=o=null,f}function f(t){return null==t||isNaN(t=+t)?n:(a||(a=r(i.map(e),s,l)))(e(c(t)))}return f.invert=function(n){return c(t((o||(o=r(s,i.map(e),vi)))(n)))},f.domain=function(e){return arguments.length?(i=Array.from(e,_i),u()):i.slice()},f.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},f.rangeRound=function(e){return s=Array.from(e),l=ji,u()},f.clamp=function(e){return arguments.length?(c=!!e||Si,u()):c!==Si},f.interpolate=function(e){return arguments.length?(l=e,u()):l},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,u()}}function Oi(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Ei(e){return(e=Oi(Math.abs(e)))?e[1]:NaN}var Pi,Fi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ai(e){if(!(t=Fi.exec(e)))throw new Error("invalid format: "+e);var t;return new Ii({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Ii(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Di(e,t){var n=Oi(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}Ai.prototype=Ii.prototype,Ii.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Li={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Di(100*e,t),r:Di,s:function(e,t){var n=Oi(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(Pi=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,i=r.length;return o===i?r:o>i?r+new Array(o-i+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Oi(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Bi(e){return e}var zi,$i,Vi,Hi=Array.prototype.map,Wi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ui(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?Bi:(t=Hi.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,o=[],i=0,s=t[0],l=0;a>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(a-=s,a+s)),!((l+=s+1)>r));)s=t[i=(i+1)%t.length];return o.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?Bi:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Hi.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=Ai(e)).fill,n=e.align,f=e.sign,d=e.symbol,h=e.zero,m=e.width,p=e.comma,g=e.precision,v=e.trim,b=e.type;"n"===b?(p=!0,b="g"):Li[b]||(void 0===g&&(g=12),v=!0,b="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var y="$"===d?a:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===d?o:/[%p]/.test(b)?l:"",x=Li[b],k=/[defgprs%]/.test(b);function j(e){var a,o,l,d=y,j=w;if("c"===b)j=x(e)+j,e="";else{var _=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:x(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r<n;++r)switch(e[r]){case".":a=t=r;break;case"0":0===a&&(a=r),t=r;break;default:if(!+e[r])break e;a>0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),_&&0===+e&&"+"!==f&&(_=!1),d=(_?"("===f?f:c:"-"===f||"("===f?"":f)+d,j=("s"===b?Wi[8+Pi/3]:"")+j+(_&&"("===f?")":""),k)for(a=-1,o=e.length;++a<o;)if(48>(l=e.charCodeAt(a))||l>57){j=(46===l?i+e.slice(a+1):e.slice(a))+j,e=e.slice(0,a);break}}p&&!h&&(e=r(e,1/0));var N=d.length+e.length+j.length,S=N<m?new Array(m-N+1).join(t):"";switch(p&&h&&(e=r(S+e,S.length?m-j.length:1/0),S=""),n){case"<":e=d+e+j+S;break;case"=":e=d+S+e+j;break;case"^":e=S.slice(0,N=S.length>>1)+d+e+j+S.slice(N);break;default:e=S+d+e+j}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),j.toString=function(){return e+""},j}return{format:f,formatPrefix:function(e,t){var n=f(((e=Ai(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Ei(t)/3))),a=Math.pow(10,-r),o=Wi[8+r/3];return function(e){return n(a*e)+o}}}}function Ji(e,t,n,r){var a,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),a=r?Co(t,e,n):Co(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}(e,t,n);switch((r=Ai(null==r?",f":r)).type){case"s":var i=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(a=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ei(t)/3)))-Ei(Math.abs(e)))}(o,i))||(r.precision=a),Vi(r,i);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ei(t)-Ei(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(e){return Math.max(0,-Ei(Math.abs(e)))}(o))||(r.precision=a-2*("%"===r.type))}return $i(r)}function Qi(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[a,o,i]=r?Mo(t,e,n):Mo(e,t,n);if(!(o>=a))return[];const s=o-a+1,l=new Array(s);if(r)if(i<0)for(let e=0;e<s;++e)l[e]=(o-e)/-i;else for(let e=0;e<s;++e)l[e]=(o-e)*i;else if(i<0)for(let e=0;e<s;++e)l[e]=(a+e)/-i;else for(let e=0;e<s;++e)l[e]=(a+e)*i;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Ji(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,a,o=t(),i=0,s=o.length-1,l=o[i],c=o[s],u=10;for(c<l&&(a=l,l=c,c=a,a=i,i=s,s=a);u-- >0;){if((a=Co(l,c,n))===r)return o[i]=l,o[s]=c,t(o);if(a>0)l=Math.floor(l/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;l=Math.ceil(l*a)/a,c=Math.floor(c*a)/a}r=a}return e},e}function qi(){var e=Ri()(Si,Si);return e.copy=function(){return t=e,qi().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},To.apply(e,arguments),Qi(e)}function Xi(e,t){if(e===t)return 0;if(0===e)return 100;const n=(t-e)/e*100;return n>100?100:n<-100?-100:n}function Yi(e,t){return mo.rgb(e,e,e).alpha(t)}function Ki(e,t){if(0===t.length)return t;const n=function(e){switch(e){case"dotnetspy":return/^(?<packageName>.+)\.(.+)\.(.+)\(.*\)$/;case"ebpfspy":case"unknown":return/^(?<packageName>.+)$/;case"gospy":case"scrape":return/^(?<packageName>.*?\/.*?\.|.*?\.|.+)(?<functionName>.*)$/;case"phpspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.php+)(?<line_info>.*)$/;case"pyspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.py+)(?<line_info>.*)$/;case"rbspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.rb+)(?<line_info>.*)$/;case"nodespy":return/^(\.\/node_modules\/)?(?<packageName>[^/]*)(?<filename>.*\.?(jsx?|tsx?)?):(?<functionName>.*):(?<line_info>.*)$/;case"tracing":return/^(?<packageName>.+?):.*$/;case"javaspy":return/^(?<packageName>.+\/)(?<filename>.+\.)(?<functionName>.+)$/;case"pyroscope-rs":return/^(?<packageName>[^::]+)/}return/^(?<packageName>.+)$/}(e),r=t.match(n);return r&&r.groups?r.groups.packageName||"":t}function Zi(e,t){const n=function(e,t=0){let n,r,a,o,i,s,l,c;for(n=3&e.length,r=e.length-n,a=t,i=3432918353,s=461845907,c=0;c<r;)l=255&e.charCodeAt(c)|(255&e.charCodeAt(++c))<<8|(255&e.charCodeAt(++c))<<16|(255&e.charCodeAt(++c))<<24,++c,l=(65535&l)*i+(((l>>>16)*i&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,a^=l,a=a<<13|a>>>19,o=5*(65535&a)+((5*(a>>>16)&65535)<<16)&4294967295,a=27492+(65535&o)+(((o>>>16)+58964&65535)<<16);switch(l=0,n){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:l^=255&e.charCodeAt(c);default:l=(65535&l)*i+(((l>>>16)*i&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,a^=l}return a^=e.length,a^=a>>>16,a=2246822507*(65535&a)+((2246822507*(a>>>16)&65535)<<16)&4294967295,a^=a>>>13,a=3266489909*(65535&a)+((3266489909*(a>>>16)&65535)<<16)&4294967295,a^=a>>>16,a>>>0}(t,0),r=n%e.colors.length,a=e.colors[r];return a||(console.warn("Could not calculate color. Defaulting to the first one"),e.colors[0])}function Gi(e){const{goodColor:t,neutralColor:n,badColor:r}=e,a=qi().domain([-100,0,100]).range([t.rgb().toString(),n.rgb().toString(),r.rgb().toString()]);return e=>mo(a(e).toString())}zi=Ui({thousands:",",grouping:[3],currency:["$",""]}),$i=zi.format,Vi=zi.formatPrefix,mo.rgb(148,142,142),mo.rgb(200,0,0),mo.rgb(0,170,0),mo("#48CE73");const es=new WeakMap,ts=new WeakMap,ns=new WeakMap,rs=new WeakMap;const as={collapsedLevelsSingular:"total (1 level collapsed)",collapsedLevelsPlural:"total ({n} levels collapsed)",isZh:!1};function os(e){var t,n,r,a,o,i,s,l;const c=performance.now(),u=!1!==e.renderRects,f=!1!==e.renderText,d=null!==(t=e.renderMode)&&void 0!==t?t:"normal",h=e.timeBudgetMs,{canvas:m,fitMode:p,units:g,tickToX:v,levels:b,palette:y}=e,{numTicks:w,sampleRate:x,pxPerTick:k}=e,{rangeMin:j,rangeMax:_}=e,{focusedNode:N,zoom:S}=e,M=e.messages||as,C=e.skipCanvasResize?m.width:function(e){if("clientWidth"in e&&"number"==typeof e.clientWidth)return e.clientWidth;return e.width}(m);if(e.skipCanvasResize||(m.width=C),j>=_)throw new Error("'rangeMin' should be strictly smaller than 'rangeMax'");const{format:T}=e,R=xa(T),O=m.getContext("2d");if(!O)throw new Error("Could not get ctx");const E=S.mapOrElse(()=>0,e=>e.i),P=Aa(w,x,g),F=N.isJust,A=N.mapOrElse(()=>0,e=>e.i),I=F?Ca:0,D=!!e.highlightQuery&&e.highlightQuery.length>0,L=Ma*(b.length-A)+(F?Ca:0);e.skipCanvasResize||(m.height=L);const B="number"==typeof e.devicePixelRatio?e.devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1;!e.skipDprScale&&B>1&&(m.width*=B,m.height*=B,O.scale(B,B)),O.textBaseline="middle",O.font="400 11.5px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace";const z=O.measureText("a").width,{names:$}=e,V=function(e){const t=es.get(e);if(t)return t;const n=new Map;return es.set(e,n),n}(m),H=D?function(e,t){const n=ts.get(e);if(n){const e=n.get(t);if(e)return e}const r=t.toLowerCase(),a=new Uint8Array(e.length);for(let t=1;t<e.length;t+=1){const n=e[t];n&&n.toLowerCase().includes(r)&&(a[t]=1)}const o=null!=n?n:new Map;return o.set(t,a),ts.set(e,o),a}($,e.highlightQuery):null,W="single"===e.format?function(e,t,n){const r=`${t}|${n.name}`,a=ns.get(e);if(a){const e=a.get(r);if(e)return e}const o=new Array(e.length);for(let r=0;r<e.length;r+=1){const a=Ki(t,e[r]||"")||"";o[r]=Zi(n,a)}const i=null!=a?a:new Map;return i.set(r,o),ns.set(e,i),o}($,e.spyName,y):null,U="double"===e.format?Gi({name:y.name,goodColor:y.goodColor,neutralColor:y.neutralColor,badColor:y.badColor}):null,J=(e,t)=>{const n=e[t+R.jName];return!(!n||n<0||!H)&&1===H[n]},Q=null!==(n=e.startI)&&void 0!==n?n:0,q=null!==(r=e.startJ)&&void 0!==r?r:0;if(F&&"highlightOnly"!==d&&0===(null!==(a=e.levelStart)&&void 0!==a?a:0)&&0===Q&&0===q){const e=w*k;u&&(O.beginPath(),O.rect(0,0,w*k,Ca),O.fillStyle=Yi(200,1).rgb().string(),O.fill());const t=N.mapOrElse(()=>"total",e=>function(e,t){return 1===e?t.collapsedLevelsSingular:t.collapsedLevelsPlural.replace("{n}",String(e))}(e.i-1,M)),n=Va({mode:p,charSize:z,rectWidth:e,fullText:t,shortText:t}),r=0,a=0,o=Ca;if(f){O.beginPath(),O.rect(0,0,e,Ca),O.save(),O.clip(),O.fillStyle="black";const t=Math.round(Math.max(r,0));O.fillText(n.text,t+n.marginLeft,a+o/2+1),O.restore()}}const X=Math.max(0,null!==(o=e.levelStart)&&void 0!==o?o:0),Y=b.length-A,K=Math.min(Y,null!==(i=e.levelEnd)&&void 0!==i?i:Y),Z=Math.max(X,null!==(s=e.startI)&&void 0!==s?s:X),G=Math.max(0,null!==(l=e.startJ)&&void 0!==l?l:0),{spyName:ee}=e,te=(t,n,r,a,o)=>{const i={level:t,j:n,i:r+N.mapOrElse(()=>0,e=>e.i),names:$,collapsed:a,selectedLevel:E,highlightModeOn:D,isHighlighted:o,spyName:ee,palette:y,colorByNameIndex:W,diffColorFn:U};switch(T){case"single":return function(e){const t=ls(e);if(t)return t;const n=xa("single"),r=e.selectedLevel>e.i?.33:1;let a=e.level[e.j+n.jName];void 0===a&&(console.warn("Could nto find level",{l:e.j,jName:n.jName,level:e.level}),a=-1);if(e.colorByNameIndex&&a>=0&&e.colorByNameIndex[a])return e.colorByNameIndex[a].alpha(r);const o=e.names[a]||"",i=Ki(e.spyName,o)||"";return Zi(e.palette,i).alpha(r)}({...i});case"double":return function(e){const t=ls(e);if(t)return t;const n=e.selectedLevel>e.i?.33:1,{leftRatio:r,rightRatio:a}=function(e,t,n,r){const a=wa;return n&&r?{leftRatio:a.getBarTotalLeft(e,t)/n,rightRatio:a.getBarTotalRght(e,t)/r}:(console.error("Properties 'rightTicks' and 'leftTicks' are required. Can't calculate ratio."),{leftRatio:0,rightRatio:0})}(e.level,e.j,e.leftTicks,e.rightTicks),o=Pa(r),i=Pa(a);if(e.diffColorFn)return e.diffColorFn(Xi(o,i)).alpha(n);return function(e,t,n){const r=Xi(t,n);return Gi(e)(r)}(e.palette,o,i).alpha(n)}({...i,leftTicks:e.leftTicks,rightTicks:e.rightTicks});default:throw new Error(`Unsupported format: ${T}`)}};if("highlightOnly"===d&&D&&u){const e=function(e,t){const n=rs.get(e);if(n)return n;const r=xa(t),a=new Map;for(let t=0;t<e.length;t+=1){const n=e[t];for(let e=0;e<n.length;e+=r.jStep){const o=r.getBarName(n,e);if(void 0===o||o<0)continue;const i=a.get(o);i?i.push({i:t,j:e}):a.set(o,[{i:t,j:e}])}}return rs.set(e,a),a}(b,T),t=[];for(let e=1;e<$.length;e+=1)H&&1===H[e]&&t.push(e);for(let n=0;n<t.length;n+=1){const r=t[n],a=e.get(r);if(a)for(let e=0;e<a.length;e+=1){const t=a[e],n=t.i-A;if(t.i<A||n<X||n>=K)continue;const r=b[t.i],o=v(R.getBarOffset(r,t.j)),i=n*Ma+I,s=Ca,l=R.getBarTotal(r,t.j),c=l*k<=5,u=l*k-(c?0:.5);if(u<=0)continue;O.beginPath(),O.rect(o,i,u,s);const f=te(r,t.j,n,c,!0);O.fillStyle=f.string(),O.fill()}}return{done:!0,nextI:K,nextJ:0}}for(let e=Z;e<K;e+=1){const t=b[A+e];if(!t)throw new Error(`Could not find level: ${A+e}`);let n=e===Z?G:0;for(;n<t.length;n+=R.jStep){const r=R.getBarOffset(t,n),a=v(r),o=e*Ma+I,i=Ca,s=D&&J(t,n);let l=R.getBarTotal(t,n);const m=l*k<=5;if(m)for(;n<t.length-R.jStep&&r+l===R.getBarOffset(t,n+R.jStep)&&R.getBarTotal(t,n+R.jStep)*k<=5&&s===(D&&J(t,n+R.jStep));)n+=R.jStep,l+=R.getBarTotal(t,n);const g=l*k-(m?0:.5);if(O.beginPath(),O.rect(a,o,g,i),u){if("forceGrey"===d)O.fillStyle=Yi(200,.66).rgb().string();else{const r=te(t,n,e,m,s);O.fillStyle=r.string()}O.fill()}if(!f||m||"forceGrey"===d){if(h&&performance.now()-c>h)return{done:!1,nextI:e,nextJ:n+R.jStep};continue}if(g<20)continue;const b=is($,n,T,t),y=Va({mode:p,charSize:z,rectWidth:g,fullText:ss(b,l,x,P,M,V),shortText:b});O.save(),O.clip(),O.fillStyle="black";const w=Math.round(Math.max(a,0));if(O.fillText(y.text,w+y.marginLeft,o+i/2+1),O.restore(),h&&performance.now()-c>h)return{done:!1,nextI:e,nextJ:n+R.jStep}}if(h&&performance.now()-c>h)return{done:!1,nextI:e+1,nextJ:0}}return{done:!0,nextI:K,nextJ:0}}function is(e,t,n,r){let a=r[t+xa(n).jName];void 0===a&&(a=-1);const o=e[a];return o||(console.warn("Could not find function name for",{j:t,format:n,level:r,names:e}),"")}function ss(e,t,n,r,a,o){let i=null==o?void 0:o.get(t);if(!i){const e=r.format(t,n);i=Oa(e,!!a.isZh)||e,null==o||o.set(t,i)}return`${e} (${i})`}function ls({collapsed:e,highlightModeOn:t,isHighlighted:n}){return e||t&&!n?Yi(200,.66):null}class cs{constructor(e,t,n,r,a,o,i,s){if(this.flamebearer=e,this.canvas=t,this.focusedNode=n,this.fitMode=r,this.highlightQuery=a,this.zoom=o,this.palette=i,this.messages=s,this.cachedRange=null,this.cachedPxPerTick=null,this.tickToX=e=>{var t;const n=this.cachedRange?this.cachedRange.rangeMin:this.getRange().rangeMin,r=null!==(t=this.cachedPxPerTick)&&void 0!==t?t:this.pxPerTick();return(e-this.flamebearer.numTicks*n)*r},this.xyToBarPosition=e=>{const{ff:t}=this,{i:n,j:r}=this.xyToBarIndex(e.x,e.y),a=this.focusedNode.mapOrElse(()=>0,e=>e.i<0?0:e.i-1),o=this.flamebearer.levels[n];if(!o)throw new Error(`Could not find level: '${n}'`);const i=Math.max(this.tickToX(t.getBarOffset(o,r)),0);return{x:i,y:Math.max((n-a)*Ma,0),width:Math.min(this.tickToX(t.getBarOffset(o,r)+t.getBarTotal(o,r))-i,this.getCanvasWidth())}},this.xyToBarData=e=>{const{i:t,j:n}=this.xyToBarIndex(e.x,e.y),r=this.flamebearer.levels[t];if(!r)throw new Error(`Could not find level: '${t}'`);switch(this.flamebearer.format){case"single":{const e=ya;return{format:"single",name:this.flamebearer.names[e.getBarName(r,n)],self:e.getBarSelf(r,n),offset:e.getBarOffset(r,n),total:e.getBarTotal(r,n)}}case"double":{const e=wa;return{format:"double",barTotal:e.getBarTotal(r,n),totalLeft:e.getBarTotalLeft(r,n),totalRight:e.getBarTotalRght(r,n),totalDiff:e.getBarTotalDiff(r,n),name:this.flamebearer.names[e.getBarName(r,n)]}}default:throw new Error("Unsupported type")}},this.isWithinBounds=(e,t)=>{if(e<0||e>this.getCanvasWidth())return!1;try{const{i:n,j:r}=this.xyToBarIndex(e,t);if(-1===r||-1===n)return!1}catch(e){return!1}return!0},this.zoom=o,this.focusedNode=n,this.flamebearer=e,this.canvas=t,this.highlightQuery=a,this.ff=xa(e.format),this.palette=i,this.messages=s,n.isJust&&o.isJust&&o.value.i<n.value.i)throw new Error("Zoom i level should be bigger than Focus")}render(e){var t;const{rangeMin:n,rangeMax:r,pxPerTick:a}=this.updateCachedMetrics(),o=null!==(t=null==e?void 0:e.highlightQueryOverride)&&void 0!==t?t:this.highlightQuery,i={canvas:this.canvas,format:this.flamebearer.format,numTicks:this.flamebearer.numTicks,sampleRate:this.flamebearer.sampleRate,names:this.flamebearer.names,levels:this.flamebearer.levels,spyName:this.flamebearer.spyName,units:this.flamebearer.units,maxSelf:this.flamebearer.maxSelf,rangeMin:n,rangeMax:r,fitMode:this.fitMode,highlightQuery:o,zoom:this.zoom,focusedNode:this.focusedNode,pxPerTick:a,tickToX:e=>(e-this.flamebearer.numTicks*n)*a,palette:this.palette,messages:this.messages,renderRects:null==e?void 0:e.renderRects,renderText:null==e?void 0:e.renderText,renderMode:null==e?void 0:e.renderMode,levelStart:null==e?void 0:e.levelStart,levelEnd:null==e?void 0:e.levelEnd,startI:null==e?void 0:e.startI,startJ:null==e?void 0:e.startJ,timeBudgetMs:null==e?void 0:e.timeBudgetMs,skipCanvasResize:null==e?void 0:e.skipCanvasResize,skipDprScale:null==e?void 0:e.skipDprScale,devicePixelRatio:null==e?void 0:e.devicePixelRatio},{format:s}=this.flamebearer;switch(s){case"single":return os({...i,format:"single"});case"double":return os({...i,leftTicks:this.flamebearer.leftTicks,rightTicks:this.flamebearer.rightTicks});default:throw new Error(`Invalid format: '${s}'`)}}pxPerTick(){if(null!==this.cachedPxPerTick)return this.cachedPxPerTick;const{rangeMin:e,rangeMax:t}=this.getRange(),n=this.getCanvasWidth()/this.flamebearer.numTicks/(t-e);return this.cachedRange={rangeMin:e,rangeMax:t},this.cachedPxPerTick=n,n}updateCachedMetrics(){const{rangeMin:e,rangeMax:t}=this.getRange(),n=this.getCanvasWidth()/this.flamebearer.numTicks/(t-e);return this.cachedRange={rangeMin:e,rangeMax:t},this.cachedPxPerTick=n,{rangeMin:e,rangeMax:t,pxPerTick:n}}getRange(){const{ff:e}=this,t=t=>{const n=this.flamebearer.levels[t.i];if(!n)throw new Error(`Could not find level: '${t.i}'`);return{rangeMin:e.getBarOffset(n,t.j)/this.flamebearer.numTicks,rangeMax:(e.getBarOffset(n,t.j)+e.getBarTotal(n,t.j))/this.flamebearer.numTicks}},n=t=>{const n=this.flamebearer.levels[t.i];if(!n)throw new Error(`Could not find level: '${t.i}'`);return{rangeMin:e.getBarOffset(n,t.j)/this.flamebearer.numTicks,rangeMax:(e.getBarOffset(n,t.j)+e.getBarTotal(n,t.j))/this.flamebearer.numTicks}},{zoom:r,focusedNode:a}=this;return r.match({Just:e=>a.match({Just:r=>{const a=n(r),o=t(e);return a.rangeMax-a.rangeMin<o.rangeMax-o.rangeMin?(console.warn("Focus is smaller than range, this shouldnt happen. Verify that the zoom is always bigger than the focus."),n(r)):t(e)},Nothing:()=>t(e)}),Nothing:()=>a.match({Just:e=>n(e),Nothing:()=>({rangeMin:0,rangeMax:1})})})}getCanvasWidth(){return"clientWidth"in this.canvas&&"number"==typeof this.canvas.clientWidth?this.canvas.clientWidth:this.canvas.width}isFocused(){return this.focusedNode.isJust}binarySearchLevel(e,t){const{ff:n}=this;let r=0,a=t.length-n.jStep;for(;r<=a;){const o=n.jStep*(r/n.jStep+a/n.jStep>>1),i=this.tickToX(n.getBarOffset(t,o)),s=this.tickToX(n.getBarOffset(t,o)+n.getBarTotal(t,o));if(i<=e&&s>=e)return s-i>5?o:-1;i>e?a=o-n.jStep:r=o+n.jStep}return-1}xyToBarIndex(e,t){if(e<0||t<0)throw new Error(`x and y must be bigger than 0. x = ${e}, y = ${t}`);if(this.isFocused()&&t<=Ca)return{i:0,j:0};const n=this.isFocused()?t-Ca:t,r=this.focusedNode.mapOrElse(()=>0,e=>e.i<=0?0:e.i),a=this.zoom.match({Just:()=>this.focusedNode.match({Just:()=>r,Nothing:()=>0}),Nothing:()=>this.focusedNode.match({Just:()=>r,Nothing:()=>0})}),o=Math.floor(n/Ma)+a;if(o>=0&&o<this.flamebearer.levels.length){const t=this.flamebearer.levels[o];if(!t)throw new Error(`Could not find level: '${o}'`);return{i:o,j:this.binarySearchLevel(e,t)}}return{i:0,j:0}}parseXY(e,t){const n={x:e,y:t};return this.isWithinBounds(e,t)?da.of(n):da.nothing()}xyToBar(e,t){return this.parseXY(e,t).map(n=>{const{i:r,j:a}=this.xyToBarIndex(e,t);return{i:r,j:a,...this.xyToBarPosition(n),...this.xyToBarData(n)}})}}function us(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=us(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function fs(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=us(e))&&(r&&(r+=" "),r+=t);return r}var ds="NoData-module_noData__WuuID";function hs(){return e.jsx("div",{"data-testid":"no-data",className:ds,children:e.jsx("span",{children:"No data available"})})}var ms,ps,gs={},vs={};function bs(){return ms||(ms=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="arrow-rotate-right",n=[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],r="f01e",a="M436.7 74.7L448 85.4 448 32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l47.9 0-7.6-7.2c-.2-.2-.4-.4-.6-.6-75-75-196.5-75-271.5 0s-75 196.5 0 271.5 196.5 75 271.5 0c8.2-8.2 15.5-16.9 21.9-26.1 10.1-14.5 30.1-18 44.6-7.9s18 30.1 7.9 44.6c-8.5 12.2-18.2 23.8-29.1 34.7-100 100-262.1 100-362 0S-25 175 75 75c99.9-99.9 261.7-100 361.7-.3z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faArrowRotateRight=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(vs)),vs}function ys(){return ps||(ps=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=bs();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faRedo=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(gs)),gs}var ws,xs=ys(),ks={};function js(){return ws||(ws=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="copy",n=[],r="f0c5",a="M192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-200.6c0-17.4-7.1-34.1-19.7-46.2L370.6 17.8C358.7 6.4 342.8 0 326.3 0L192 0zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-16-64 0 0 16-192 0 0-256 16 0 0-64-16 0z";e.definition={prefix:"fas",iconName:t,icon:[448,512,n,r,a]},e.faCopy=e.definition,e.prefix="fas",e.iconName=t,e.width=448,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(ks)),ks}var _s,Ns=js(),Ss={};function Ms(){return _s||(_s=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="highlighter",n=[],r="f591",a="M315 315L473.4 99.9 444.1 70.6 229 229 315 315zm-187 5l0 0 0-71.7c0-15.3 7.2-29.6 19.5-38.6L420.6 8.4C428 2.9 437 0 446.2 0 457.6 0 468.5 4.5 476.6 12.6l54.8 54.8c8.1 8.1 12.6 19 12.6 30.5 0 9.2-2.9 18.2-8.4 25.6L334.4 396.5c-9 12.3-23.4 19.5-38.6 19.5l-71.7 0-25.4 25.4c-12.5 12.5-32.8 12.5-45.3 0l-50.7-50.7c-12.5-12.5-12.5-32.8 0-45.3L128 320zM7 466.3l51.7-51.7 70.6 70.6-19.7 19.7c-4.5 4.5-10.6 7-17 7L24 512c-13.3 0-24-10.7-24-24l0-4.7c0-6.4 2.5-12.5 7-17z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,r,a]},e.faHighlighter=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Ss)),Ss}var Cs,Ts,Rs=Ms(),Os={},Es={};function Ps(){return Cs||(Cs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="down-left-and-up-right-to-center",n=["compress-alt"],r="f422",a="M439.5 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S450.2 240 440.5 240l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87zM72.5 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S62.8 272 72.5 272z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faDownLeftAndUpRightToCenter=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Es)),Es}function Fs(){return Ts||(Ts=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ps();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faCompressAlt=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Os)),Os}var As=Fs();const Is=e=>!!e&&"o"===e[0],Ds=r.unstable_batchedUpdates,Ls=(e,t)=>!0===e||!(!e||!e[t]),Bs=(e,t)=>"function"==typeof e?e(t):e,zs="_szhsinMenu",$s=(e,t)=>Object.defineProperty(t,zs,{value:e}),Vs=(e,t)=>(t&&Object.keys(t).forEach(n=>{const r=e[n],a=t[n];e[n]="function"==typeof a&&r?(...e)=>{a(...e),r(...e)}:a}),e),Hs=e=>{for(;e;){if(!(e=e.parentNode)||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:r}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+r+n))return e}};function Ws(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function Us(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}const Js=({block:e,element:n,modifiers:r,className:a})=>t.useMemo(()=>{const t=n?`${e}__${n}`:e;let o=t;r&&Object.keys(r).forEach(e=>{const n=r[e];n&&(o+=` ${t}--${!0===n?e:`${e}-${n}`}`)});let i="function"==typeof a?a(r):a;return"string"==typeof i&&(i=i.trim(),i&&(o+=` ${i}`)),o},[e,n,r,a]),Qs="szh-menu",qs=t.createContext(),Xs=t.createContext({}),Ys=t.createContext({}),Ks=t.createContext({}),Zs=t.createContext({}),Gs=t.createContext({}),el=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),tl=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),nl=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),rl=Object.freeze({FIRST:"first",LAST:"last"}),al=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),ol="absolute",il="none",sl={preventScroll:!0},ll=$s("MenuButton",t.forwardRef(function({className:n,isOpen:r,disabled:a,children:o,...i},s){const l=t.useMemo(()=>({open:r}),[r]);return e.jsx("button",{"aria-haspopup":!0,"aria-expanded":r,"aria-disabled":a||void 0,type:"button",disabled:a,...i,ref:s,className:Js({block:"szh-menu-button",modifiers:l,className:n}),children:o})})),cl=({className:n,containerRef:r,containerProps:a,children:o,isOpen:i,theming:s,transition:l,onClose:c})=>{const u=Ls(l,"item");return e.jsx("div",{...Vs({onKeyDown:({key:e})=>{if(e===el.ESC)Bs(c,{key:e,reason:nl.CANCEL})},onBlur:e=>{i&&!e.currentTarget.contains(e.relatedTarget)&&Bs(c,{reason:nl.BLUR})}},a),className:Js({block:"szh-menu-container",modifiers:t.useMemo(()=>({theme:s,itemTransition:u}),[s,u]),className:n}),style:{position:"absolute",...a?.style},ref:r,children:o})},ul=()=>{let e,t=0;return{toggle:e=>{e?t++:t--,t=Math.max(t,0)},on:(n,r,a)=>{t?e||(e=setTimeout(()=>{e=0,r()},n)):a?.()},off:()=>{e&&(clearTimeout(e),e=0)}}},fl=(e,t)=>Math.round(e)===t?e:t,dl=(e,t,n,r)=>{const a=(e=>{const t=e.getBoundingClientRect();return t.width=fl(t.width,e.offsetWidth),t.height=fl(t.height,e.offsetHeight),t})(t),o=e.getBoundingClientRect(),i=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),s=(e=>{if("string"!=typeof e)return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],r=isNaN(t[1])?n:t[1];return{top:n,right:r,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?r:t[3]}})(r),l=e=>e+o.left-i.left-s.left,c=e=>e+o.left+a.width-i.right+s.right,u=e=>e+o.top-i.top-s.top,f=e=>e+o.top+a.height-i.bottom+s.bottom;return{menuRect:a,containerRect:o,getLeftOverflow:l,getRightOverflow:c,getTopOverflow:u,getBottomOverflow:f,confineHorizontally:e=>{let t=l(e);if(t<0)e-=t;else{const n=c(e);n>0&&(t=l(e-=n),t<0&&(e-=t))}return e},confineVertically:e=>{let t=u(e);if(t<0)e-=t;else{const n=f(e);n>0&&(t=u(e-=n),t<0&&(e-=t))}return e}}},hl=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:r,placeLeftX:a,placeRightX:o,getLeftOverflow:i,getRightOverflow:s,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:f,direction:d,position:h})=>{let m,p,g,v=d,b=r;"initial"!==h&&(b=c(b),"anchor"===h&&(b=Math.min(b,e.bottom-t.top),b=Math.max(b,e.top-t.top-n.height))),"left"===v?(m=a,"initial"!==h&&(p=i(m),p<0&&(g=s(o),(g<=0||-p>g)&&(m=o,v="right")))):(m=o,"initial"!==h&&(g=s(m),g>0&&(p=i(a),(p>=0||-p<g)&&(m=a,v="left")))),"auto"===h&&(m=l(m));const y=f?(({arrowRef:e,menuY:t,anchorRect:n,containerRect:r,menuRect:a})=>{let o=n.top-r.top-t+n.height/2;const i=1.25*e.current.offsetHeight;return o=Math.max(i,o),o=Math.min(o,a.height-i),o})({menuY:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowY:y,x:m,y:b,computedDirection:v}},ml=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:r,placeTopY:a,placeBottomY:o,getTopOverflow:i,getBottomOverflow:s,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:f,direction:d,position:h})=>{let m,p,g,v="top"===d?"top":"bottom",b=r;"initial"!==h&&(b=l(b),"anchor"===h&&(b=Math.min(b,e.right-t.left),b=Math.max(b,e.left-t.left-n.width))),"top"===v?(m=a,"initial"!==h&&(p=i(m),p<0&&(g=s(o),(g<=0||-p>g)&&(m=o,v="bottom")))):(m=o,"initial"!==h&&(g=s(m),g>0&&(p=i(a),(p>=0||-p<g)&&(m=a,v="top")))),"auto"===h&&(m=c(m));const y=f?(({arrowRef:e,menuX:t,anchorRect:n,containerRect:r,menuRect:a})=>{let o=n.left-r.left-t+n.width/2;const i=1.25*e.current.offsetWidth;return o=Math.max(i,o),o=Math.min(o,a.width-i),o})({menuX:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowX:y,x:b,y:m,computedDirection:v}},pl="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function gl(e,t){"function"==typeof e?e(t):e.current=t}const vl=(e,n)=>t.useMemo(()=>e?n?t=>{gl(e,t),gl(n,t)}:e:n,[e,n]),bl=({ariaLabel:n,menuClassName:a,menuStyle:o,arrow:i,arrowProps:s={},anchorPoint:l,anchorRef:c,containerRef:u,containerProps:f,externalRef:d,parentScrollingRef:h,align:m="start",direction:p="bottom",position:g="auto",overflow:v="visible",setDownOverflow:b,repositionFlag:y,captureFocus:w=!0,state:x,endTransition:k,isDisabled:j,menuItemFocus:_,gap:N=0,shift:S=0,children:M,onClose:C,focusProps:T,...R})=>{const[O,E]=t.useState({x:-9999,y:-9999}),[P,F]=t.useState({}),[A,I]=t.useState(),[D,L]=t.useState(p),[B]=t.useState(ul),[z,$]=t.useReducer(e=>e+1,1),{transition:V,boundingBoxRef:H,boundingBoxPadding:W,rootMenuRef:U,rootAnchorRef:J,scrollNodesRef:Q,reposition:q,viewScroll:X,submenuCloseDelay:Y}=t.useContext(Gs),{submenuCtx:K,reposSubmenu:Z=y}=t.useContext(Ys),G=t.useRef(),ee=t.useRef(),te=t.useRef(!1),{hoverItem:ne,dispatch:re,updateItems:ae}=(e=>{const[n,r]=t.useState(),a=t.useRef({items:[],hoverIndex:-1,sorted:!1}).current,o=t.useCallback((t,n)=>{const{items:o}=a;if(t)if(n)o.push(t);else{const n=o.indexOf(t);n>-1&&(o.splice(n,1),t.contains(document.activeElement)&&(e.current.focus(sl),r()))}else a.items=[];a.hoverIndex=-1,a.sorted=!1},[a,e]),i=t.useCallback((t,n,o)=>{const{items:i,hoverIndex:s}=a,l=()=>{if(a.sorted)return;const t=e.current.querySelectorAll(".szh-menu__item");i.sort((e,n)=>Us(t,e)-Us(t,n)),a.sorted=!0};let c,u=-1;switch(t){case tl.RESET:break;case tl.SET:c=n;break;case tl.UNSET:c=e=>e===n?void 0:e;break;case tl.FIRST:l(),u=0,c=i[u];break;case tl.LAST:l(),u=i.length-1,c=i[u];break;case tl.SET_INDEX:l(),u=o,c=i[u];break;case tl.INCREASE:l(),u=s,u<0&&(u=i.indexOf(n)),u++,u>=i.length&&(u=0),c=i[u];break;case tl.DECREASE:l(),u=s,u<0&&(u=i.indexOf(n)),u--,u<0&&(u=i.length-1),c=i[u];break;default:if("production"!==process.env.NODE_ENV)throw new Error(`[React-Menu] Unknown hover action type: ${t}`)}c||(u=-1),r(c),a.hoverIndex=u},[e,a]);return{hoverItem:n,dispatch:i,updateItems:o}})(G),oe=Is(x),ie=Ls(V,"open"),se=Ls(V,"close"),le=Q.current,ce=t.useCallback(e=>{const t=G.current,n=u.current;if(!t||!n)return;const r=c?c.current?.getBoundingClientRect():l?{left:l.x,right:l.x,top:l.y,bottom:l.y,width:0,height:0}:null;if(!r)return void("production"!==process.env.NODE_ENV&&console.warn("[React-Menu] Menu might not be positioned properly as one of the anchorRef or anchorPoint prop should be provided. If `anchorRef` is provided, the anchor must be mounted before menu is open."));le.menu||(le.menu=(H?H.current:Hs(U.current))||window);const a=dl(n,t,le.menu,W);let{arrowX:o,arrowY:s,x:f,y:d,computedDirection:h}=(({arrow:e,align:t,direction:n,gap:r,shift:a,position:o,anchorRect:i,arrowRef:s,positionHelpers:l})=>{const{menuRect:c,containerRect:u}=l,f="left"===n||"right"===n;let d=f?r:a,h=f?a:r;if(e){const e=s.current;f?d+=e.offsetWidth:h+=e.offsetHeight}const m=i.left-u.left-c.width-d,p=i.right-u.left+d,g=i.top-u.top-c.height-h,v=i.bottom-u.top+h;let b,y;"end"===t?(b=i.right-u.left-c.width,y=i.bottom-u.top-c.height):"center"===t?(b=i.left-u.left-(c.width-i.width)/2,y=i.top-u.top-(c.height-i.height)/2):(b=i.left-u.left,y=i.top-u.top),b+=d,y+=h;const w={...l,anchorRect:i,placeLeftX:m,placeRightX:p,placeLeftorRightY:y,placeTopY:g,placeBottomY:v,placeToporBottomX:b,arrowRef:s,arrow:e,direction:n,position:o};switch(n){case"left":case"right":return hl(w);default:return ml(w)}})({arrow:i,align:m,direction:p,gap:N,shift:S,position:g,anchorRect:r,arrowRef:ee,positionHelpers:a});const{menuRect:b}=a,y=b.height;if(!e&&"visible"!==v){const{getTopOverflow:e,getBottomOverflow:t}=a;let n,r;const o=t(d);if(o>0)n=y-o,r=o;else{const t=e(d);t<0&&(n=y+t,r=0-t,n>=0&&(d-=t))}n>=0&&I({height:n,overflowAmt:r})}i&&F({x:o,y:s}),E({x:f,y:d}),L(h)},[i,m,W,p,N,S,g,v,l,c,u,H,U,le]);pl(()=>{oe&&(ce(),te.current&&$()),te.current=oe},[oe,ce,Z]),pl(()=>{A&&!b&&(G.current.scrollTop=0)},[A,b]),pl(()=>ae,[ae]),t.useEffect(()=>{let{menu:e}=le;if(!oe||!e)return;if(e=e.addEventListener?e:window,!le.anchors){le.anchors=[];let t=Hs(J&&J.current);for(;t&&t!==e;)le.anchors.push(t),t=Hs(t)}let t=X;if(le.anchors.length&&"initial"===t&&(t="auto"),"initial"===t)return;const n=()=>{"auto"===t?Ds(()=>ce(!0)):Bs(C,{reason:nl.SCROLL})},r=le.anchors.concat("initial"!==X?e:[]);return r.forEach(e=>e.addEventListener("scroll",n)),()=>r.forEach(e=>e.removeEventListener("scroll",n))},[J,le,oe,C,X,ce]);const ue=!!A&&A.overflowAmt>0;t.useEffect(()=>{if(ue||!oe||!h)return;const e=()=>Ds(ce),t=h.current;return t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)},[oe,ue,h,ce]),t.useEffect(()=>{if(!oe||"function"!=typeof ResizeObserver||"initial"===q)return;const e=[],t=new ResizeObserver(t=>t.forEach(({target:t})=>{e.indexOf(t)<0?e.push(t):r.flushSync(()=>{ce(),$()})})),n={box:"border-box"};t.observe(G.current,n);const a=c?.current;return a&&t.observe(a,n),()=>t.disconnect()},[oe,q,c,ce]),t.useEffect(()=>{if(!oe)return re(tl.RESET),void(se||I());const{position:e,alwaysUpdate:t}=_||{},n=()=>{e===rl.FIRST?re(tl.FIRST):e===rl.LAST?re(tl.LAST):e>=-1&&re(tl.SET_INDEX,void 0,e)};if(t)n();else if(w){const e=setTimeout(()=>{const e=G.current;e&&!e.contains(document.activeElement)&&(e.focus(sl),n())},ie?170:100);return()=>clearTimeout(e)}},[oe,ie,se,w,_,re]);const fe=t.useMemo(()=>({isParentOpen:oe,submenuCtx:B,dispatch:re,updateItems:ae}),[oe,B,re,ae]);let de,he;A&&(b?he=A.overflowAmt:de=A.height);const me=t.useMemo(()=>({reposSubmenu:z,submenuCtx:B,overflow:v,overflowAmt:he,parentMenuRef:G,parentDir:D}),[z,B,v,he,D]),pe=de>=0?{maxHeight:de,overflow:v}:void 0,ge=t.useMemo(()=>({state:x,align:m,dir:D}),[x,m,D]),ve=t.useMemo(()=>({dir:D}),[D]),be=Js({block:Qs,element:"arrow",modifiers:ve,className:s.className}),ye=e.jsxs("ul",{role:"menu","aria-label":n,...Ws(j),...Vs({onPointerEnter:K?.off,onPointerMove:e=>{e.stopPropagation(),B.on(Y,()=>{re(tl.RESET),G.current.focus(sl)})},onPointerLeave:e=>{e.target===e.currentTarget&&B.off()},onKeyDown:e=>{switch(e.key){case el.HOME:re(tl.FIRST);break;case el.END:re(tl.LAST);break;case el.UP:re(tl.DECREASE,ne);break;case el.DOWN:re(tl.INCREASE,ne);break;case el.SPACE:return void(e.target&&-1!==e.target.className.indexOf(Qs)&&e.preventDefault());default:return}e.preventDefault(),e.stopPropagation()},onAnimationEnd:()=>{"closing"===x&&I(),Bs(k)}},R),ref:vl(d,G),className:Js({block:Qs,modifiers:ge,className:a}),style:{...o,...pe,margin:0,display:"closed"===x?"none":void 0,position:ol,left:O.x,top:O.y},children:[i&&e.jsx("li",{"aria-hidden":!0,...s,className:be,style:{display:"block",position:ol,left:P.x,top:P.y,...s.style},ref:ee}),e.jsx(Ys.Provider,{value:me,children:e.jsx(Xs.Provider,{value:fe,children:e.jsx(qs.Provider,{value:ne,children:Bs(M,ge)})})})]});return f?e.jsx(cl,{...f,isOpen:oe,children:ye}):ye},yl=t.forwardRef(function({"aria-label":n,className:a,containerProps:o,initialMounted:i,unmountOnClose:s,transition:l,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:f,reposition:d="auto",submenuOpenDelay:h=300,submenuCloseDelay:m=150,viewScroll:p="initial",portal:g,theming:v,onItemClick:b,...y},w){const x=t.useRef(null),k=t.useRef({}),{anchorRef:j,state:_,onClose:N}=y,S=t.useMemo(()=>({initialMounted:i,unmountOnClose:s,transition:l,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:f,rootMenuRef:x,rootAnchorRef:j,scrollNodesRef:k,reposition:d,viewScroll:p,submenuOpenDelay:h,submenuCloseDelay:m}),[i,s,l,c,j,u,f,d,p,h,m]),M=t.useMemo(()=>({handleClick(e,t){e.stopPropagation||Bs(b,e);let n=e.keepOpen;void 0===n&&(n=t&&e.key===el.SPACE),n||Bs(N,{value:e.value,key:e.key,reason:nl.CLICK})},handleClose(e){Bs(N,{key:e,reason:nl.CLICK})}}),[b,N]);if(!_)return null;const C=e.jsx(Gs.Provider,{value:S,children:e.jsx(Ks.Provider,{value:M,children:e.jsx(bl,{...y,ariaLabel:n||"Menu",externalRef:w,containerRef:x,containerProps:{className:a,containerRef:x,containerProps:o,theming:v,transition:l,onClose:N}})})});return!0===g&&"undefined"!=typeof document?r.createPortal(C,document.body):g?g.target?r.createPortal(C,g.target):g.stablePosition?null:C:C}),wl=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],xl=e=>({_s:e,status:wl[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),kl=e=>e?6:5,jl=(e,t,n,r,a)=>{clearTimeout(r.current);const o=xl(e);t(o),n.current=o,a&&a({current:o})},_l=({enter:e=!0,exit:n=!0,preEnter:r,preExit:a,timeout:o,initialEntered:i,mountOnEnter:s,unmountOnExit:l,onStateChange:c}={})=>{const[u,f]=t.useState(()=>xl(i?2:kl(s))),d=t.useRef(u),h=t.useRef(),[m,p]=(e=>"object"==typeof e?[e.enter,e.exit]:[e,e])(o),g=t.useCallback(()=>{const e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return kl(t)}})(d.current._s,l);e&&jl(e,f,d,h,c)},[c,l]);return[u,t.useCallback(t=>{const o=e=>{switch(jl(e,f,d,h,c),e){case 1:m>=0&&(h.current=setTimeout(g,m));break;case 4:p>=0&&(h.current=setTimeout(g,p));break;case 0:case 3:h.current=((e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0))(o,e)}},i=d.current.isEnter;"boolean"!=typeof t&&(t=!i),t?!i&&o(e?r?0:1:2):i&&o(n?a?3:4:kl(l))},[g,c,e,n,r,a,m,p,l]),g]},Nl=({initialOpen:e,initialMounted:n,unmountOnClose:r,transition:a,transitionTimeout:o=500,onMenuChange:i}={})=>{const s=Ls(a,"open"),l=Ls(a,"close"),[{status:c},u,f]=_l({initialEntered:e,mountOnEnter:!n,unmountOnExit:r,timeout:o,enter:s,exit:l,onStateChange:t.useCallback(({current:{isEnter:e,isResolved:t}})=>{!i||e&&s&&t||!e&&l&&t||i({open:e})},[i,s,l])});return[{state:al[c],endTransition:f},u]},Sl=parseInt(t.version)<19,Ml=t.forwardRef(function({"aria-label":n,captureFocus:r,initialOpen:a,menuButton:o,instanceRef:i,onMenuChange:s,...l},c){const[u,f,d]=(e=>{const[n,r]=Nl(e),[a,o]=t.useState();return[{menuItemFocus:a,...n},r,(e,t)=>{o({position:e,alwaysUpdate:t}),r(!0)}]})({...l,onMenuChange:s}),{state:h}=u,m=Is(h),p=t.useRef(null),g=((e,n)=>{if("production"!==process.env.NODE_ENV&&"function"!=typeof n)throw new Error("[React-Menu] useClick/useHover requires a function in the second parameter.");const[r]=t.useState({});return{onMouseDown:()=>{r.v=e&&"closed"!==e},onClick:e=>r.v?r.v=!1:n(!0,e)}})(h,(e,t)=>d(t.detail?void 0:rl.FIRST)),v=t.useCallback(e=>{f(!1),e.key&&p.current.focus()},[f]),b=Bs(o,{open:m});if(!b||!b.type)throw new Error("Menu requires a menuButton prop.");const y={...Vs({onKeyDown:e=>{switch(e.key){case el.UP:d(rl.LAST);break;case el.DOWN:d(rl.FIRST);break;default:return}e.preventDefault()},...g},b.props),ref:vl(Sl?b.ref:b.props.ref,p)};"MenuButton"===b.type[zs]&&(y.isOpen=m);const w=t.cloneElement(b,y);return t.useImperativeHandle(i,()=>({openMenu:d,closeMenu:()=>f(!1)})),e.jsxs(t.Fragment,{children:[w,e.jsx(yl,{...l,...u,"aria-label":n||("string"==typeof b.props.children?b.props.children:"Menu"),anchorRef:p,ref:c,onClose:v})]})}),Cl=(n,r)=>{const a=t.memo(r),o=t.forwardRef((n,r)=>{const o=t.useRef(null);return e.jsx(a,{...n,itemRef:o,externalRef:r,isHovering:t.useContext(qs)===o.current})});return o.displayName=`WithHovering(${n})`,o},Tl=(e,n,r,a)=>{const[o,i,s]=(e=>{const[n,r]=t.useState(!1);return t.useEffect(()=>{!e&&r(!1)},[e]),[n,()=>!n&&r(!0),()=>r(!1)]})(r),{submenuCloseDelay:l}=t.useContext(Gs),{isParentOpen:c,submenuCtx:u,dispatch:f,updateItems:d}=t.useContext(Xs),h=()=>{!r&&!a&&f(tl.SET,e.current)},m=()=>{!a&&f(tl.UNSET,e.current)};return((e,t,n)=>{pl(()=>{if("production"!==process.env.NODE_ENV&&!n)throw new Error(`[React-Menu] This menu item or submenu should be rendered under a menu: ${t.current.outerHTML}`);if(e)return;const r=t.current;return n(r,!0),()=>{n(r)}},[e,t,n])})(a,e,d),t.useEffect(()=>{r&&c&&n.current&&n.current.focus()},[n,r,c]),{mouseOver:o,setHover:h,onBlur:e=>{r&&!e.currentTarget.contains(e.relatedTarget)&&m()},onPointerMove:e=>{a||(e.stopPropagation(),i(),u.on(l,h,h))},onPointerLeave:(e,t)=>{s(),u.off(),!t&&m()}}},Rl=Cl("MenuItem",function({className:n,value:r,href:a,type:o,checked:i,disabled:s,children:l,onClick:c,isHovering:u,itemRef:f,externalRef:d,...h}){const m=!!s,{mouseOver:p,setHover:g,...v}=Tl(f,f,u,m),b=t.useContext(Ks),y=t.useContext(Zs),w="radio"===o,x="checkbox"===o,k=!(!a||m||w||x),j=w?y.value===r:!!x&&!!i,_=e=>{if(m)return e.stopPropagation(),void e.preventDefault();const t={value:r,syntheticEvent:e};void 0!==e.key&&(t.key=e.key),x&&(t.checked=!j),w&&(t.name=y.name),Bs(c,t),w&&Bs(y.onRadioChange,t),b.handleClick(t,x||w)},N=t.useMemo(()=>({type:o,disabled:m,hover:p||u,checked:j,anchor:k}),[o,m,p,u,j,k]),S=Vs({...v,onPointerDown:g,onKeyDown:e=>{if(u)switch(e.key){case el.ENTER:e.preventDefault();case el.SPACE:k?f.current.click():_(e)}},onClick:_},h),M={role:w?"menuitemradio":x?"menuitemcheckbox":"menuitem","aria-checked":w||x?j:void 0,...Ws(m,u),...S,ref:vl(d,f),className:Js({block:Qs,element:"item",modifiers:N,className:n}),children:t.useMemo(()=>Bs(l,N),[l,N])};return k?e.jsx("li",{role:il,children:e.jsx("a",{href:a,...M})}):e.jsx("li",{...M})}),Ol=t.memo(t.forwardRef(function({className:t,...n},r){return e.jsx("li",{role:il,...n,ref:r,className:Js({block:Qs,element:"header",className:t})})}));var El=t["undefined"!=typeof document&&void 0!==document.createElement?"useLayoutEffect":"useEffect"];function Pl(){}function Fl(e,n,r){void 0===r&&(r={});var a=Ll(r.polyfill),o=(e=>{var n=t.useRef(e);return t.useEffect(()=>{n.current=e}),n})(n);return El(()=>{function t(e,t){n||o.current(e,t)}var n=0,r=e&&"current"in e?e.current:e;return r?(a.subscribe(r,t),()=>{n=1,a.unsubscribe(r,t)}):Pl},[e,a,o]),a.observer}var Al,Il,Dl,Ll=e=>Al||(Al=function(e){var t=0,n=[],r=new Map,a=new(e||window.ResizeObserver)((e,a)=>{n=n.concat(e),t||window.requestAnimationFrame(function(){for(var e=new Set,o=function(t){if(e.has(n[t].target))return"continue";e.add(n[t].target);var o=r.get(n[t].target);null==o||o.forEach(e=>e(n[t],a))},i=0;i<n.length;i++)o(i);n=[],t=0}),t=1});return{observer:a,subscribe(e,t){var n;a.observe(e);var o=null!==(n=r.get(e))&&void 0!==n?n:[];o.push(t),r.set(e,o)},unsubscribe(e,t){var n,o=null!==(n=r.get(e))&&void 0!==n?n:[];if(1===o.length)return a.unobserve(e),void r.delete(e);var i=o.indexOf(t);-1!==i&&o.splice(i,1),r.set(e,o)}}}(e));function Bl(){if(Dl)return Il;Dl=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,r=/^0o[0-7]+$/i,a=parseInt,o="object"==typeof i&&i&&i.Object===Object&&i,s="object"==typeof self&&self&&self.Object===Object&&self,l=o||s||Function("return this")(),c=Object.prototype.toString,u=Math.max,f=Math.min,d=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(o){if("number"==typeof o)return o;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(o))return NaN;if(h(o)){var i="function"==typeof o.valueOf?o.valueOf():o;o=h(i)?i+"":i}if("string"!=typeof o)return 0===o?o:+o;o=o.replace(e,"");var s=n.test(o);return s||r.test(o)?a(o.slice(2),s?2:8):t.test(o)?NaN:+o}return Il=function(e,t,n){var r,a,o,i,s,l,c=0,p=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,o=a;return r=a=void 0,c=t,i=e.apply(o,n)}function y(e){var n=e-l;return void 0===l||n>=t||n<0||g&&e-c>=o}function w(){var e=d();if(y(e))return x(e);s=setTimeout(w,function(e){var n=t-(e-l);return g?f(n,o-(e-c)):n}(e))}function x(e){return s=void 0,v&&r?b(e):(r=a=void 0,i)}function k(){var e=d(),n=y(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(w,t),p?b(e):i}(l);if(g)return s=setTimeout(w,t),b(l)}return void 0===s&&(s=setTimeout(w,t)),i}return t=m(t)||0,h(n)&&(p=!!n.leading,o=(g="maxWait"in n)?u(m(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=a=s=void 0},k.flush=function(){return void 0===s?i:x(d())},k},Il}var zl=s(Bl()),$l="canvas-module_canvas__Iiaz4",Vl="canvas-module_textCanvas__eFxM4",Hl="Highlight-module_highlight__1VV-X";function Wl(n){const{canvasRef:r,barHeight:a,xyToHighlightData:o,zoom:i}=n,[s,l]=t.useState({height:"0px",visibility:"hidden"}),c=t.useRef(null),u=t.useRef(null),f=t.useRef(null);t.useEffect(()=>{l({height:"0px",visibility:"hidden"})},[i]);const d=e=>{const t=c.current;if(!t)return void l(e);const n=f.current;n&&n.left===e.left&&n.top===e.top&&n.width===e.width&&n.visibility===e.visibility||(f.current=e,t.style.visibility=String(e.visibility||""),void 0!==e.left&&(t.style.left=String(e.left)),void 0!==e.top&&(t.style.top=String(e.top)),void 0!==e.width&&(t.style.width=String(e.width)),void 0!==e.height&&(t.style.height=String(e.height)))},h=e=>{u.current&&cancelAnimationFrame(u.current);const t=e.offsetX,n=e.offsetY;u.current=requestAnimationFrame(()=>{const e=o(t,n);if(e.isJust){const t=e.value;d({visibility:"visible",height:`${a}px`,...t})}else m()})},m=()=>{d({...f.current||{},visibility:"hidden"})};return t.useEffect(()=>{const e=r.current;return e?(e.addEventListener("mousemove",h),e.addEventListener("mouseout",m),()=>{e.removeEventListener("mousemove",h),e.removeEventListener("mouseout",m),u.current&&cancelAnimationFrame(u.current)}):()=>{}},[r.current,h,m]),e.jsx("div",{ref:c,className:Hl,style:s,"data-testid":"flamegraph-highlight"})}var Ul="ContextMenuHighlight-module_highlightContextMenu__WI1nK";const Jl={height:"0px",visibility:"hidden"};function Ql(n){const{node:r,barHeight:a}=n,[o,i]=t.useState(Jl);return t.useEffect(()=>{r.match({Nothing:()=>i(Jl),Just:e=>i({visibility:"visible",height:`${a}px`,...e})})},[r]),e.jsx("div",{className:Ul,style:o,"data-testid":"flamegraph-highlight-contextmenu"})}const ql={name:"Default",goodColor:mo.rgb(0,170,0),neutralColor:mo.rgb(148,142,142),badColor:mo.rgb(200,0,0),colors:[mo.hsl(24,69,60),mo.hsl(34,65,65),mo.hsl(194,52,61),mo.hsl(163,45,55),mo.hsl(211,48,60),mo.hsl(246,40,65),mo.hsl(305,63,79),mo.hsl(47,100,73),mo.rgb(183,219,171),mo.rgb(244,213,152),mo.rgb(78,146,249),mo.rgb(249,186,143),mo.rgb(242,145,145),mo.rgb(130,181,216),mo.rgb(229,168,226),mo.rgb(174,162,224),mo.rgb(154,196,138),mo.rgb(242,201,109),mo.rgb(101,197,219),mo.rgb(249,147,78),mo.rgb(234,100,96),mo.rgb(81,149,206),mo.rgb(214,131,206),mo.rgb(128,110,183)]},Xl={...ql,name:"Color Blind",goodColor:mo.rgb(26,133,255),neutralColor:mo.rgb(148,142,142),badColor:mo.rgb(220,50,32)};function Yl(){return e.jsxs("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",children:[e.jsx("defs",{}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M5,19.56c0,5.22,3.54,9.44,7.92,9.44h3.17c4.37,0,7.92-4.23,7.92-9.44v-7.56H5v7.56Z"}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M14,1h-.82c-4.52,0-8.18,3.73-8.18,8.33v1.67H14V1Z"}),e.jsx("path",{d:"M15.82,1h-.82V11h9v-1.67c0-4.6-3.66-8.33-8.18-8.33Z"})]})}function Kl(){return e.jsxs("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",children:[e.jsx("defs",{}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M24,19.56c0,5.22-3.54,9.44-7.92,9.44h-3.17c-4.37,0-7.92-4.23-7.92-9.44v-7.56H24v7.56Z"}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M15,1h.82c4.52,0,8.18,3.73,8.18,8.33v1.67H15V1Z"}),e.jsx("path",{d:"M13.18,1h.82V11H5v-1.67c0-4.6,3.66-8.33,8.18-8.33Z"})]})}var Zl={tooltip:"Tooltip-module_tooltip__NMZ65",flamegraphDiffTooltip:"Tooltip-module_flamegraphDiffTooltip__Z983o",tooltipName:"Tooltip-module_tooltipName__y4Qs3",functionName:"Tooltip-module_functionName__z9LHO",tooltipTable:"Tooltip-module_tooltipTable__ct3pq",clickInfo:"Tooltip-module_clickInfo__Utux5"};const Gl={location:"Location",self:"Self",total:"Total",baseline:"Baseline",comparison:"Comparison",diff:"Diff",noItemsFound:"No items found",diffNew:"new",diffRemoved:"removed",tooltipSamples:"Samples:",tooltipUnitTitles:{objects:{percent:"% of objects in RAM",formattedValue:"Objects in RAM",total:"% of total RAM"},goroutines:{percent:"% of goroutines",formattedValue:"Goroutines",total:"% of total goroutines"},bytes:{percent:"% of RAM",formattedValue:"RAM",total:"% of total bytes"},samples:{percent:"Share of CPU",formattedValue:"CPU Time",total:"% of total CPU"},lock_nanoseconds:{percent:"% of Time spent",formattedValue:"Time",total:"% of total seconds"},lock_samples:{percent:"% of contended locks",formattedValue:"Contended locks",total:"% of total locks"},trace_samples:{percent:"% of time",formattedValue:"Samples",total:"% of total samples"},exceptions:{percent:"% of thrown exceptions",formattedValue:"Thrown exceptions",total:"% of total thrown exceptions"},unknown:{percent:"Percentage",formattedValue:"Units",total:"% of total units"}},resetView:"Reset View",collapseNodesAbove:"Collapse nodes above",copyFunctionName:"Copy function name",highlightSimilarNodes:"Highlight similar nodes",clearHighlight:"Clear highlight",openInSandwichView:"Open in sandwich view",showTextTailFirst:"Show text tail first",showTextHeadFirst:"Show text head first",headFirst:"Head first",tailFirst:"Tail first",clickToHighlightNode:"Click to highlight node in flamegraph",rightClickForMoreNodeOptions:"Right click for more node viewing options",viewTable:"Table",viewTableAndFlamegraph:"Table and Flamegraph",viewFlamegraph:"Flamegraph",viewSandwich:"Sandwich",viewGraphviz:"GraphViz",more:"More",diffLegendRemovedLabel:"(-) Removed",diffLegendAddedLabel:"Added (+)",diffLegendSelectPalette:"Select a palette",paletteDefaultName:"Default",paletteColorBlindName:"Color Blind",paletteDefaultDesc:"(green to red)",paletteColorBlindDesc:"(blue to red)",searchPlaceholder:"Search...",syncSearchBars:"Sync Search Bars",unsyncSearchBars:"Unsync Search Bars",focusOnThisFunction:"Focus on this function",tableDoubleClickToFocus:"Double-click to focus in flamegraph",tableRightClickForOptions:"Right-click for more options",collapsedLevelsSingular:"total (1 level collapsed)",collapsedLevelsPlural:"total ({n} levels collapsed)",ofTotal:"of total",clearFocus:"Clear focus",sampleCountFormat:[{value:1e15,label:"Quad"},{value:1e12,label:"Tri"},{value:1e9,label:"B"},{value:1e6,label:"M"},{value:1e3,label:"K"}]},ec={...Gl,location:"位置",self:"自身",total:"总计",baseline:"基线",comparison:"对比",diff:"差异",noItemsFound:"没有找到任何条目",diffNew:"新增",diffRemoved:"移除",tooltipSamples:"样本数:",tooltipUnitTitles:{objects:{percent:"RAM 中对象占比",formattedValue:"RAM 中对象数",total:"占总 RAM 的百分比"},goroutines:{percent:"协程占比",formattedValue:"协程数量",total:"占协程总数的百分比"},bytes:{percent:"RAM 占比",formattedValue:"RAM",total:"占总字节数的百分比"},samples:{percent:"CPU 占比",formattedValue:"CPU 时间",total:"占总 CPU 的百分比"},lock_nanoseconds:{percent:"耗时占比",formattedValue:"时间",total:"占总秒数的百分比"},lock_samples:{percent:"锁竞争事件占比",formattedValue:"锁竞争事件数",total:"占锁竞争总数的百分比"},trace_samples:{percent:"时间占比",formattedValue:"样本数",total:"占样本总数的百分比"},exceptions:{percent:"异常抛出占比",formattedValue:"异常数",total:"占异常总数的百分比"},unknown:{percent:"百分比",formattedValue:"单位",total:"占单位总量的百分比"}},resetView:"重置视图",collapseNodesAbove:"收起上方节点",copyFunctionName:"复制函数名",highlightSimilarNodes:"高亮相似节点",clearHighlight:"清除高亮",openInSandwichView:"在 sandwich 视图中查看",showTextTailFirst:"显示文本尾部优先",showTextHeadFirst:"显示文本头部优先",headFirst:"从头部开始显示",tailFirst:"从尾部开始显示",clickToHighlightNode:"点击火焰图节点高亮",rightClickForMoreNodeOptions:"右键查看更多节点选项",viewTable:"表格",viewTableAndFlamegraph:"表格 + 火焰图",viewFlamegraph:"火焰图",viewSandwich:"三明治视图",viewGraphviz:"调用图 (GraphViz)",more:"更多",diffLegendRemovedLabel:"(-) 减少",diffLegendAddedLabel:"增加 (+)",diffLegendSelectPalette:"选择颜色方案",paletteDefaultName:"默认",paletteColorBlindName:"色盲",paletteDefaultDesc:"(绿色 → 红色)",paletteColorBlindDesc:"(蓝色 → 红色)",searchPlaceholder:"搜索...",syncSearchBars:"同步搜索栏",unsyncSearchBars:"取消同步搜索栏",focusOnThisFunction:"聚焦到此函数",tableDoubleClickToFocus:"双击可聚焦到火焰图",tableRightClickForOptions:"右键查看更多选项",collapsedLevelsSingular:"总计(已折叠 1 层)",collapsedLevelsPlural:"总计(已折叠 {n} 层)",ofTotal:"占总量",clearFocus:"清除聚焦",sampleCountFormat:[{value:1e12,label:"兆"},{value:1e8,label:"亿"},{value:1e4,label:"万"},{value:1e3,label:"千"}]},tc=t.createContext(Gl),nc=tc,rc=({messages:n,children:r})=>{const a=t.useMemo(()=>{var e;return{...Gl,...n,tooltipUnitTitles:{...Gl.tooltipUnitTitles,...null!==(e=null==n?void 0:n.tooltipUnitTitles)&&void 0!==e?e:{}}}},[n]);return e.jsx(tc.Provider,{value:a,children:r})},ac=()=>t.useContext(tc);function oc(e){if(!e)return null;const t=e.replace(/,/g,"").trim();if(!t)return null;const n=Number(t);return Number.isFinite(n)?n:null}function ic(e,t){if(!e||!t)return;const n=e.trim().replace(/\u2212/g,"-");return n&&"0"!==n?n.startsWith("+")?t.badColor.rgb().string():n.startsWith("-")?t.goodColor.rgb().string():void 0:void 0}function sc(e,t,n){return n<t?t:Math.max(t,Math.min(n,e))}function lc(e,t,n,r){const a=window.innerWidth,o=window.innerHeight,i=Math.max(0,n||0),s=Math.max(0,r||0);let l=e+12,c=t+20;return l+i+8>a&&(l=e-i-12),c+s+8>o&&(c=t-s-20),l=sc(l,8,a-i-8),c=sc(c,8,o-s-8),{left:l,top:c}}function cc({shouldShowFooter:n=!0,shouldShowTitle:r=!0,dataSourceRef:a,clickInfoSide:o,setTooltipContent:i,palette:s}){const l=t.useRef(null),c=t.useRef(null),u=t.useRef(null),f=t.useRef(null),[d,h]=t.useState({title:{text:"",diff:{text:"",color:""}},tooltipData:[]}),[m,p]=t.useState(),g=()=>{p({visibility:"hidden"}),h({title:{text:"",diff:{text:"",color:""}},tooltipData:[]})},v=t.useCallback(e=>{u.current&&cancelAnimationFrame(u.current);const t=e.clientX,n=e.clientY;u.current=requestAnimationFrame(()=>{if(!l.current)throw new Error("Missing tooltipElement");c.current={x:t,y:n},i(h,g,e);const r=l.current.clientWidth||0,a=l.current.clientHeight||0,{left:o,top:s}=lc(t,n,r,a);p({top:s,left:o,visibility:"visible"})})},[i]);return t.useEffect(()=>{const e=a.current;if(!e)return()=>{};const t=()=>{g()},n=t=>{e.contains(t.target)||g()};return e.addEventListener("mousemove",v),e.addEventListener("mouseout",g),e.addEventListener("mouseleave",t),window.addEventListener("mousemove",n,{passive:!0}),window.addEventListener("blur",t),()=>{e.removeEventListener("mousemove",v),e.removeEventListener("mouseout",g),e.removeEventListener("mouseleave",t),window.removeEventListener("mousemove",n),window.removeEventListener("blur",t),u.current&&cancelAnimationFrame(u.current)}},[a.current,v]),t.useLayoutEffect(()=>{if(!l.current)return;if(!c.current)return;if(0===d.tooltipData.length)return;const{x:e,y:t}=c.current,n=l.current.getBoundingClientRect(),r=n.width,a=n.height,o=f.current;if(o&&Math.abs(o.w-r)<1&&Math.abs(o.h-a)<1)return;f.current={w:r,h:a};const{left:i,top:s}=lc(e,t,r,a);p(e=>e&&e.left===i&&e.top===s&&"visible"===e.visibility?e:{...e||{},left:i,top:s,visibility:"visible"})},[d.tooltipData.length,d.title.text]),e.jsx("div",{"data-testid":"tooltip",className:fs(Zl.tooltip,{[Zl.flamegraphDiffTooltip]:d.tooltipData.length>1}),style:{...m,textAlign:"center"},ref:l,children:d.tooltipData.length>0&&e.jsxs(e.Fragment,{children:[r&&e.jsx("div",{className:Zl.tooltipName,"data-testid":"tooltip-title",children:d.title.text}),e.jsx("div",{className:Zl.functionName,"data-testid":"tooltip-function-name",children:d.title.text}),d.title.diff.text.length>0?e.jsx(uc,{data:d.tooltipData,diff:d.title.diff,palette:s}):e.jsx(uc,{data:d.tooltipData,palette:s}),n&&e.jsx(fc,{clickInfoSide:o})]})})}function uc({data:t,diff:n,palette:r}){const a=ac(),[o,i]=t,s="Location"!==a.location;if(!o)return null;let l;switch(o.tooltipType){case"flamegraph":l=()=>{const t=i&&function(e,t){const n=Ra(e),r=Ra(t);if(!n||!r)return"";const a=r.value-n.value;if(0===a)return"0";const o=a>0?"+":"-",i=Math.abs(a);let s;s=i>=100?i.toFixed(0):i>=10?i.toFixed(1):i.toFixed(2);const l=n.unit||r.unit;return l?`${o}${s} ${l}`:`${o}${s}`}(o.formattedValue,i.formattedValue),l=Oa(t,s),c=i&&function(e,t){const n=oc(e),r=oc(t);if(null==n||null==r)return"";const a=r-n;return 0===a?"0":`${a>0?"+":"-"}${Math.abs(a).toLocaleString()}`}(o.samples,i.samples),u=Oa(o.formattedValue,s),f=Oa(null==i?void 0:i.formattedValue,s),d=null==n?void 0:n.color,h=ic(t,r),m=ic(c,r);return e.jsxs(e.Fragment,{children:[i&&e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{}),e.jsx("th",{children:a.baseline}),e.jsx("th",{children:a.comparison}),e.jsx("th",{children:a.diff})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsxs("td",{children:[a.tooltipUnitTitles[o.units].percent,":"]}),e.jsx("td",{children:o.percent}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:i.percent}),e.jsx("td",{style:{textAlign:"center"},children:n&&e.jsx("span",{"data-testid":"tooltip-diff",style:{color:d},children:n.text})})]})]}),e.jsxs("tr",{children:[e.jsxs("td",{children:[a.tooltipUnitTitles[o.units].formattedValue,":"]}),e.jsx("td",{children:u}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:f}),e.jsx("td",{style:{textAlign:"center"},children:l&&e.jsx("span",{"data-testid":"tooltip-time-diff",style:h?{color:h}:void 0,children:l})})]})]}),e.jsxs("tr",{children:[e.jsx("td",{children:a.tooltipSamples}),e.jsx("td",{children:o.samples}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:i.samples}),e.jsx("td",{style:{textAlign:"center"},children:c&&e.jsx("span",{"data-testid":"tooltip-samples-diff",style:m?{color:m}:void 0,children:c})})]})]})]})]})};break;case"table":l=()=>e.jsxs(e.Fragment,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{}),e.jsxs("td",{children:[a.self," (",a.tooltipUnitTitles[o.units].total,")"]}),e.jsxs("td",{children:[a.total," (",a.tooltipUnitTitles[o.units].total,")"]})]})}),e.jsx("tbody",{children:e.jsxs("tr",{children:[e.jsxs("td",{children:[a.tooltipUnitTitles[o.units].formattedValue,":"]}),e.jsx("td",{children:o.self}),e.jsx("td",{children:o.total})]})})]});break;default:l=()=>null}return e.jsx("table",{"data-testid":"tooltip-table",className:fs(Zl.tooltipTable,{[Zl[`${o.tooltipType}${i?"Diff":""}`]]:o.tooltipType}),style:{textAlign:"center",margin:"0 auto"},children:l()})}function fc({clickInfoSide:t}){const n=ac();let r;switch(t){case"right":r=e.jsxs(e.Fragment,{children:[e.jsx(Yl,{}),e.jsx("span",{children:n.rightClickForMoreNodeOptions})]});break;case"left":r=e.jsxs(e.Fragment,{children:[e.jsx(Kl,{}),e.jsx("span",{children:n.clickToHighlightNode})]});break;default:r=e.jsx(e.Fragment,{})}return e.jsx("div",{"data-testid":"tooltip-footer",className:Zl.clickInfo,children:r})}function dc(n){const{format:r,canvasRef:a,xyToData:o,numTicks:i,sampleRate:s,units:l,leftTicks:c,rightTicks:u,palette:f}=n,d=ac(),h=t.useCallback((e,t,n)=>{const a=Aa(i,s,l),h=o(n.offsetX,n.offsetY);let m;var p;if(h.isJust)switch(m=h.value,m.format){case"single":{const t={percent:(p=m.total/i,`${Pa(p)}%`),samples:"trace_samples"===l?"":Ta(m.total),units:l,formattedValue:a.format(m.total,s),tooltipType:"flamegraph"};e({title:{text:m.name,diff:{text:"",color:""}},tooltipData:[t]});break}case"double":{if("single"===r)throw new Error("props format is 'single' but it has been mapped to 'double'");const t=hc({formatter:a,sampleRate:s,totalLeft:m.totalLeft,leftTicks:c,totalRight:m.totalRight,rightTicks:u,title:m.name,units:l},f,d);e({title:t.title,tooltipData:t.tooltipData});break}default:throw new Error(`Unsupported format: '${m.format}'`)}else t()},[i,s,l,c,u,f,o,r,d]);return e.jsx(cc,{dataSourceRef:a,clickInfoSide:"right",setTooltipContent:h,palette:f})}function hc({formatter:e,sampleRate:t,totalLeft:n,leftTicks:r,totalRight:a,rightTicks:o,title:i,units:s},l=ql,c){var u,f;const d=o>0?a/o:0,h=Pa(r>0?n/r:0),m=Pa(d),p={percent:`${h}%`,samples:Ta(n),units:s,formattedValue:e.format(n,t),tooltipType:"flamegraph"},g={percent:`${m}%`,samples:Ta(a),units:s,formattedValue:e.format(a,t),tooltipType:"flamegraph"};let v=Fa(h,m);Number.isFinite(v)||(v=0);let b="";v>0?b=l.badColor.rgb().string():v<0&&(b=l.goodColor.rgb().string());let y="";return 0===n&&a>0?y=null!==(u=null==c?void 0:c.diffNew)&&void 0!==u?u:"新增":0===a&&n>0?y=null!==(f=null==c?void 0:c.diffRemoved)&&void 0!==f?f:"移除":0===v?y="0%":v>0?y=`+${v.toFixed(2)}%`:v<0&&(y=`${v.toFixed(2)}%`),{title:{text:i,diff:{text:y,color:b}},tooltipData:[p,g]}}var mc="ContextMenu-module_menu__x-AtY";function pc(n){const[r,a]=Nl({transition:!0}),[o,i]=t.useState({x:0,y:0}),{canvasRef:s}=n,[l,c]=t.useState([]),{xyToMenuItems:u,onClose:f,onOpen:d}=n;return t.useEffect(()=>{a(!1);const e=s.current;if(!e)return()=>{};const t=e=>{e.preventDefault();const t=u(e.offsetX,e.offsetY);c(t);const n=e.clientX,r=e.clientY+20;i({x:n,y:r}),a(!0),d(e.offsetX,e.offsetY)};return e.addEventListener("contextmenu",t),()=>{e.removeEventListener("contextmenu",t)}},[u]),e.jsx(yl,{...r,className:mc,anchorPoint:o,onClose:()=>{a(!1),f()},children:l})}var gc="LogoLink-module_logoLink__oWRri";function vc(){return e.jsxs("a",{className:gc,href:"https://github.com/pyroscope-io/pyroscope/",target:"_blank",rel:"noreferrer",children:[e.jsxs("svg",{width:"22px",height:"22px",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("defs",{children:e.jsxs("radialGradient",{cx:"49.4236252%",cy:"92.6627823%",fx:"49.4236252%",fy:"92.6627823%",r:"195.066755%",gradientTransform:"translate(0.494236,0.926628),scale(1.000000,0.735610),rotate(-90.000000),translate(-0.494236,-0.926628)",id:"radialGradient-1",children:[e.jsx("stop",{stopColor:"#FFB90C",offset:"0%"}),e.jsx("stop",{stopColor:"#F9243A",offset:"38.390924%"}),e.jsx("stop",{stopColor:"#F9243A",offset:"50.5405%"}),e.jsx("stop",{stopColor:"#B51424",offset:"73.98091%"}),e.jsx("stop",{stopColor:"#B51424",offset:"100%"})]})}),e.jsx("g",{id:"Artboard",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:e.jsx("g",{id:"fire-part",transform:"translate(148.516736, 0.000000)",fillRule:"nonzero",children:e.jsxs("g",{id:"whole-thing",transform:"translate(363.983264, 495.000000) scale(-1, 1) rotate(-180.000000) translate(-363.983264, -495.000000) translate(0.483264, 0.000000)",children:[e.jsx("g",{id:"g70",transform:"translate(-0.000091, 0.685815)",fill:"url(#radialGradient-1)",children:e.jsx("path",{d:"M65.3646667,571.739321 L65.4492471,571.698868 C19.5139147,505.999969 -5.32464048,424.477859 1.04305801,336.877516 L1.04305801,336.877516 C14.0321963,158.179446 159.192462,13.7596653 338.059844,1.5917266 L338.059844,1.5917266 C419.418369,-3.93888015 495.500283,17.3823334 558.456522,57.4611191 L558.456522,57.4611191 L481.301947,162.097965 C437.516468,136.521928 399.367671,129.590556 363.486536,130.155994 L363.486536,130.155994 C234.497143,130.155994 129.556988,235.032238 129.556988,363.946998 L129.556988,363.946998 C129.556988,492.865683 234.497143,597.738003 363.486536,597.738003 L363.486536,597.738003 C492.483783,597.738003 597.427864,492.865683 597.427864,363.946998 L597.427864,363.946998 C597.41276,304.634864 581.39383,255.677522 530.630465,199.668053 L607.770843,95.1329436 C680.936847,161.576603 726.932594,257.364176 726.932594,363.946998 L726.932594,363.946998 C726.932594,458.031616 691.13483,543.75602 632.416071,608.271816 L632.416071,608.271816 L632.416071,608.275741 L533.597728,748.122808 L428.601388,617.203806 L434.703262,646.563419 C459.453008,765.59222 433.664131,889.543925 363.49439,988.853335 L363.49439,988.853335 L65.3646667,571.723019 L65.3646667,571.739321 Z",id:"path84"})}),e.jsx("g",{id:"blue",transform:"translate(191.447039, 191.331780)",children:e.jsxs("g",{id:"g88",transform:"translate(-0.000063, 0.685930)",children:[e.jsx("g",{id:"g94",transform:"translate(0.177296, 0.699054)",fill:"#3EC1D3",children:e.jsx("path",{d:"M171.862466,343.697728 C77.0961324,343.697728 -0.00497405932,266.647602 -0.00497405932,171.934957 C-0.00497405932,77.2182874 77.0961324,0.168162396 171.862466,0.168162396 C266.632828,0.168162396 343.741988,77.2182874 343.741988,171.934957 C343.741988,266.647602 266.632828,343.697728 171.862466,343.697728",id:"path96"})}),e.jsx("g",{id:"g98",transform:"translate(29.362379, 172.629585)",fill:"#FFFFFF",children:e.jsx("path",{d:"M22.8397982,0 L0.671669409,0 C0.671669409,78.2496309 64.380874,141.920035 142.678189,141.920035 L142.678189,119.765407 C76.6007327,119.765407 22.8397982,66.0372141 22.8397982,0",id:"path100"})})]})})]})})})]}),e.jsx("span",{children:"Pyroscope"})]})}const bc=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 208H676V232h212v136zm0 224H676V432h212v160zM412 432h200v160H412V432zm200-64H412V232h200v136zm-476 64h212v160H136V432zm0-200h212v136H136V232zm0 424h212v136H136V656zm276 0h200v136H412V656zm476 136H676V656h212v136z"})}),yc=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"})}),wc=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z"})}),xc=({fill:t})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:t,children:[e.jsx("g",{id:"shape_squiggle",children:e.jsx("path",{d:"M60,38.42c-4.62,0-6.97-2.64-8.86-4.75-1.81-2.03-2.86-3.08-5.13-3.08s-3.32,1.06-5.13,3.08c-1.89,2.12-4.24,4.75-8.86,4.75s-6.97-2.64-8.87-4.75c-1.81-2.03-2.86-3.08-5.14-3.08s-3.33,1.06-5.14,3.08c-1.89,2.12-4.25,4.75-8.87,4.75-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5c2.28,0,3.33-1.06,5.14-3.09,1.89-2.12,4.25-4.75,8.87-4.75s6.97,2.64,8.87,4.75c1.81,2.03,2.86,3.09,5.14,3.09s3.32-1.06,5.13-3.08c1.89-2.12,4.24-4.75,8.86-4.75s6.97,2.64,8.86,4.75c1.81,2.03,2.86,3.08,5.13,3.08,1.38,0,2.5,1.12,2.5,2.5s-1.12,2.5-2.5,2.5Z"})}),e.jsxs("g",{id:"Layer_4",children:[e.jsx("rect",{x:"2",y:"8",width:"60",height:"14",rx:"3.94",ry:"3.94"}),e.jsx("path",{d:"M58.06,41h-18.64c-1.58,0-3.14,.42-4.5,1.22l-6.88,4.02c-1.87,1.09-4.19,1.09-6.06,0l-6.88-4.02c-1.37-.8-2.92-1.22-4.5-1.22H5.94c-2.18,0-3.94,1.76-3.94,3.94v7.12c0,2.18,1.76,3.94,3.94,3.94H58.06c2.18,0,3.94-1.76,3.94-3.94v-7.12c0-2.18-1.76-3.94-3.94-3.94Z"})]})]}),kc=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",children:[e.jsx("g",{id:"ab_shape",children:e.jsxs("g",{children:[e.jsx("path",{d:"M16.71,41l-.42-2.45h-.16c-1.63,1.95-4.06,2.95-6.91,2.95-4.8,0-7.86-3.45-7.86-7.45,0-6.4,6.01-9.3,14.13-9.3v-.4c0-1.5-.84-3.2-4.38-3.2-2.48,0-4.9,.75-6.54,1.7l-1.42-4.75c1.69-.9,5.01-2.1,9.44-2.1,8.33,0,10.65,4.95,10.65,10.45v8.7c0,2.25,.11,4.4,.37,5.85h-6.91Zm-.95-11.7c-3.64,0-6.91,.9-6.91,4,0,2.1,1.37,3,3,3s3.22-1.05,3.74-2.6c.11-.35,.16-.8,.16-1.2v-3.2Z"}),e.jsx("path",{d:"M29.36,41c.11-1.79,.21-4.62,.21-7.25V6h7.7v13.46h.11c1.42-1.99,3.8-3.28,7.06-3.28,5.85,0,9.7,5.01,9.65,12.16,0,8.69-5.22,13.16-10.81,13.16-2.74,0-5.22-.99-6.91-3.72h-.11l-.37,3.23h-6.54Zm7.91-9.83c0,.55,.05,.99,.16,1.39,.58,1.94,2.16,3.18,4.01,3.18,3.11,0,4.9-2.53,4.9-7,0-3.92-1.58-6.8-4.9-6.8-1.85,0-3.53,1.39-3.95,3.28-.16,.4-.21,.94-.21,1.44v4.52Z"})]})}),e.jsx("g",{id:"arrows",children:e.jsx("polygon",{points:"62 54 52 45 52 51 35 51 35 57 52 57 52 63 62 54"})})]}),jc=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",children:[e.jsx("g",{id:"yz_shape",children:e.jsxs("g",{children:[e.jsx("path",{d:"M22.75,13l3.43,12.39c.42,1.47,.84,3.2,1.16,4.52h.11c.32-1.32,.69-3.05,1-4.47l2.9-12.44h8.01l-5.8,17.16c-2.95,8.33-5.17,12.54-8.07,15.23-2.58,2.39-5.43,3.3-7.17,3.55l-1.85-6.3c1.11-.25,2.32-.76,3.48-1.52,1.16-.71,2.32-1.88,2.95-3.05,.26-.41,.42-.76,.42-1.12,0-.31-.05-.66-.26-1.17L14.32,13h8.43Z"}),e.jsx("path",{d:"M41.62,33.46l7.59-10.16c1.27-1.57,2.37-2.95,3.58-4.27v-.15h-10.33v-5.89h19.45l-.05,4.57-7.28,9.8c-1.21,1.57-2.48,3.15-3.69,4.42v.1h11.33v5.94h-20.61v-4.37Z"})]})}),e.jsx("g",{id:"arrows",children:e.jsx("polygon",{points:"12 51 12 45 2 54 12 63 12 57 29 57 29 51 12 51"})})]});var _c="Header-module_flamegraphHeader__nIrXP",Nc="Header-module_row__P7-2L",Sc="Header-module_flamegraphTitle__sjsvB";function Mc(t){const{format:n,units:r,toolbarVisible:a}=t,o={objects:"number of objects in RAM per function",goroutines:"number of goroutines",bytes:"amount of RAM per function",samples:"CPU time per function",lock_nanoseconds:"time spent waiting on locks per function",lock_samples:"number of contended locks per function",trace_samples:"aggregated span duration",exceptions:"number of exceptions thrown",unknown:""},i=a&&"single"===n?e.jsx("div",{className:`${Nc} ${Sc}`,role:"heading","aria-level":2,children:o[r]&&e.jsxs(e.Fragment,{children:["Frame width represents ",o[r]]})}):null;return i?e.jsx("div",{className:_c,children:e.jsx("div",{children:i})}):null}var Cc="FlamegraphBreadcrumb-module_bar__v8uhn",Tc="FlamegraphBreadcrumb-module_chip__pdv1k",Rc="FlamegraphBreadcrumb-module_focusTooltip__nX30y",Oc="FlamegraphBreadcrumb-module_separator__Zj-rC",Ec="FlamegraphBreadcrumb-module_chipSeparator__S-Gld",Pc="FlamegraphBreadcrumb-module_unitLabel__bjHEA",Fc="FlamegraphBreadcrumb-module_focusIcon__aJBb6",Ac="FlamegraphBreadcrumb-module_ofTotal__kk4dt",Ic="FlamegraphBreadcrumb-module_clearBtn__spimK";function Dc(t){const{totalValueText:n,totalSamplesText:r,samplesLabel:a,unitLabel:o,hasFocus:i,focusPercent:s,focusLabel:l,ofTotalPlacement:c="after",ofTotalLabel:u,clearFocusLabel:f,onClearFocus:d}=t,h=l&&l.trim().length>0?l:void 0;return e.jsxs("div",{className:Cc,"aria-live":"polite",children:[e.jsxs("span",{className:Tc,children:[e.jsx("span",{children:n}),e.jsx("span",{className:Oc,children:"|"}),e.jsxs("span",{children:[r," ",a]}),e.jsxs("span",{className:Pc,children:["(",o,")"]})]}),i&&void 0!==s&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:Ec,children:">"}),e.jsxs("span",{className:`${Tc} ${Rc}`,"data-tooltip":h,children:[e.jsx("span",{className:Fc,"aria-hidden":"true",children:e.jsxs("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6-10-6-10-6Z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3.2"})]})}),"before"===c?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:Ac,children:u}),e.jsxs("span",{children:[s.toFixed(2),"%"]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:[s.toFixed(2),"%"]}),e.jsx("span",{className:Ac,children:u})]}),e.jsx("button",{type:"button",className:Ic,"aria-label":f,onClick:e=>{e.preventDefault(),e.stopPropagation(),d()},children:"×"})]})]})]})}var Lc="styles-module_flamegraphPane__ejguD",Bc="styles-module_fitModeItem__0UBwN",zc="styles-module_sandwichItem__WYvnd",$c="styles-module_flamegraphFrame__9ZW-z";function Vc(n){const r=t.useRef(null),a=t.useRef(null),i=t.useRef(),s=t.useRef(),l=t.useRef(null),c=t.useRef(null),u=t.useRef(null),f=t.useRef({rect:!1,text:!1}),d=t.useRef(!1),h=ac(),m=t.useRef({lastWidth:0,lastHeight:0}),p="undefined"!=typeof window&&"undefined"!=typeof OffscreenCanvas&&"transferControlToOffscreen"in HTMLCanvasElement.prototype,[g,v]=t.useState(p),b=t.useRef(!1);t.useEffect(()=>{"undefined"==typeof window||d.current||(d.current=!0)},[p]),t.useEffect(()=>{"undefined"==typeof window||b.current||(b.current=!0,p||console.info("[flamegraph] OffscreenCanvas unavailable, using main thread renderer"))},[p]);const y=t.useMemo(()=>({collapsedLevelsSingular:h.collapsedLevelsSingular,collapsedLevelsPlural:h.collapsedLevelsPlural,isZh:"Location"!==h.location}),[h.collapsedLevelsSingular,h.collapsedLevelsPlural,h.location]),w=t.useCallback(e=>({name:e.name,goodColor:e.goodColor.rgb().array(),neutralColor:e.neutralColor.rgb().array(),badColor:e.badColor.rgb().array(),colors:e.colors.map(e=>e.rgb().array())}),[]),[x,k]=t.useState(da.nothing()),{flamebearer:j,focusedNode:_,fitMode:N,updateFitMode:S,highlightQuery:M,zoom:C,toolbarVisible:T,headerVisible:R=!0,disableClick:O=!1,showSingleLevel:E=!1,showCredit:P,setActiveItem:F,selectedItem:A,updateView:I,enableSandwichView:D=!0,breadcrumb:L}=n,{onZoom:B,onReset:z,isDirty:$,onFocusOnNode:V}=n,{"data-testid":H}=n,{palette:W,setPalette:U}=n,J=t.useCallback(zl(()=>{Z(),G()},50),[]);t.useEffect(()=>{if(!g)return()=>{};let e;try{e=function(){const e=new URL("undefined"==typeof document?require("url").pathToFileURL(__filename).href:o&&"SCRIPT"===o.tagName.toUpperCase()&&o.src||new URL("index.node.cjs.js",document.baseURI).href),t=e.pathname,n=t.includes("/src/"),r=t.includes("/dist/");if(t.includes("/node_modules/.vite/deps/")){const t=new URL("../../@kylincloud/flamegraph/dist/flamegraphRenderWorker.js",e);try{return new Worker(t,{type:"module"})}catch(e){throw console.error("[flamegraph] worker create failed (vite deps)",e),e}}const a=n?new URL("./flamegraphRenderWorker.ts",e):new URL("./flamegraphRenderWorker.js",e);try{return new Worker(a,{type:"module"})}catch(e){throw console.error("[flamegraph] worker create failed",e,{workerUrl:a.href,isFromSrc:n,isFromDist:r}),e}}()}catch(e){return console.warn("[flamegraph] render worker init failed, fallback to main thread",e),v(!1),()=>{}}return d.current||(d.current=!0),console.info("[flamegraph] render worker created"),e.addEventListener("error",e=>{console.error("[flamegraph] render worker error",e)}),e.addEventListener("messageerror",e=>{console.error("[flamegraph] render worker message error",e)}),l.current=e,setTimeout(()=>{Z(),G()},0),()=>{e.terminate(),l.current=null,c.current=null,u.current=null,f.current={rect:!1,text:!1}}},[g]),Fl(r,()=>{if(i){if(r.current){const e=r.current.clientWidth,t=r.current.clientHeight,n=m.current;if(!(Math.abs(e-n.lastWidth)>=2))return;n.lastWidth=e,n.lastHeight=t}J()}});const Q=(e,t)=>ne().xyToBar(e,t).map(e=>({left:te().offsetLeft+e.x,top:te().offsetTop+e.y,width:e.width})),q=t.useCallback((t,n)=>{const r=$(),a=ne().xyToBar(t,n),o=a.isJust?a.value.name:"";return[e.jsxs(Rl,{disabled:!r,onClick:z,children:[e.jsx($r,{icon:xs.faRedo}),h.resetView]},"reset"),(()=>{const t=a.mapOrElse(()=>!1,()=>!0),n=a.mapOrElse(()=>()=>{},e=>V.bind(null,e.i,e.j));return e.jsxs(Rl,{disabled:!t,onClick:n,children:[e.jsx($r,{icon:As.faCompressAlt}),h.collapseNodesAbove]},"focus")})(),e.jsxs(Rl,{onClick:()=>{navigator.clipboard&&navigator.clipboard.writeText(o)},children:[e.jsx($r,{icon:Ns.faCopy}),h.copyFunctionName]},"copy"),(()=>{const t=A.isJust&&A.value===o?h.clearHighlight:h.highlightSimilarNodes;return e.jsxs(Rl,{onClick:()=>{F({name:o})},children:[e.jsx($r,{icon:Rs.faHighlighter}),t]},"highlight-similar-nodes")})(),(()=>{if(!I||!D)return null;return e.jsxs(Rl,{className:zc,onClick:()=>{I("sandwich"),F({name:o})},children:[e.jsx(xc,{fill:"black"}),h.openInSandwichView]},"open-in-sandwich-view")})(),(()=>{const t=N===$a;return e.jsxs(Rl,{className:Bc,onClick:()=>{S(t?za:$a)},children:[t?e.jsx(jc,{}):e.jsx(kc,{}),t?h.showTextTailFirst:h.showTextHeadFirst]},"fit-mode")})()].filter(Boolean)},[i,A,N,$,z,V,F,I,h,D]),X=()=>{if(r.current){const e=new cs(j,r.current,_,N,M,C,W,y);i.current=e}if(a.current){const e=new cs(j,a.current,_,N,M,C,W,y);s.current=e}},Y=t.useCallback(()=>{if(!g||!l.current)return!1;const e=l.current;if(r.current&&!c.current)try{const t=r.current.transferControlToOffscreen();c.current=t,e.postMessage({type:"init",payload:{kind:"rect",canvas:t}},[t]),f.current.rect=!0}catch(e){console.error("[flamegraph] offscreen init failed (rect)",e)}if(a.current&&!u.current)try{const t=a.current.transferControlToOffscreen();u.current=t,e.postMessage({type:"init",payload:{kind:"text",canvas:t}},[t]),f.current.text=!0}catch(e){console.error("[flamegraph] offscreen init failed (text)",e)}return!0},[g]);t.useEffect(()=>{X(),Z(),G()},[W,y]),t.useEffect(()=>{X(),Z(),G()},[r.current,j,_,N,C]),t.useEffect(()=>{X(),Z(),G()},[M]);const K=(e,t)=>{if(!g)return!1;if(!l.current)return!0;if(!Y())return!0;const n="rect"===e?r.current:a.current,o=(null==n?void 0:n.clientWidth)||(null==n?void 0:n.width)||0,i={kind:e,flamebearer:j,focusedNode:_.isJust?_.value:null,fitMode:N,highlightQuery:M,zoom:C.isJust?C.value:null,palette:w(W),messages:y,renderRects:t.renderRects,renderText:t.renderText,width:o,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1};return l.current.postMessage({type:"render",payload:i}),!0},Z=()=>{var e,t,n;K("rect",{renderText:!1})||(null===(e=null==r?void 0:r.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==i?void 0:i.current)||void 0===t||t.render({renderText:!1}),null===(n=null==r?void 0:r.current)||void 0===n||n.setAttribute("data-state","rendered"))},G=()=>{var e,t,n;K("text",{renderRects:!1})||(null===(e=null==a?void 0:a.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==s?void 0:s.current)||void 0===t||t.render({renderRects:!1}),null===(n=null==a?void 0:a.current)||void 0===n||n.setAttribute("data-state","rendered"))},ee=!j||j&&j.names.length<=1,te=()=>{if(!r.current)throw new Error("Missing canvas");return r.current},ne=()=>{if(!i.current)throw new Error("Missing canvas");return i.current};return e.jsxs("div",{"data-testid":"flamegraph-view",className:fs(Lc,{"vertical-orientation":"double"===j.format}),children:[e.jsxs("div",{className:$c,children:[L&&e.jsx(Dc,{totalValueText:L.totalValueText,totalSamplesText:L.totalSamplesText,samplesLabel:L.samplesLabel,unitLabel:L.unitLabel,hasFocus:L.hasFocus,focusPercent:L.focusPercent,focusLabel:L.focusLabel,ofTotalPlacement:L.ofTotalPlacement,ofTotalLabel:L.ofTotalLabel,clearFocusLabel:L.clearFocusLabel,onClearFocus:L.onClearFocus}),R&&e.jsx(Mc,{format:j.format,units:j.units,toolbarVisible:T}),e.jsxs("div",{"data-testid":H,style:{position:"relative",opacity:ee&&!E?0:1},children:[e.jsx("canvas",{height:"0","data-testid":"flamegraph-canvas","data-highlightquery":M,className:fs("flamegraph-canvas",$l),ref:r,onClick:O?void 0:e=>{const t=ne().xyToBar(e.nativeEvent.offsetX,e.nativeEvent.offsetY);t.match({Nothing:()=>{},Just:e=>{C.match({Nothing:()=>{B(t)},Just:n=>{e.i===n.i&&e.j===n.j?B(da.nothing()):B(t)}})}})}}),e.jsx("canvas",{height:"0","data-testid":"flamegraph-text-canvas",className:fs("flamegraph-text-canvas",Vl),ref:a}),i&&r&&e.jsx(Wl,{barHeight:Ma,canvasRef:r,zoom:C,xyToHighlightData:Q}),i&&e.jsx(Ql,{barHeight:Ma,node:x})]}),P?e.jsx(vc,{}):""]}),i&&e.jsx(dc,{format:j.format,canvasRef:r,xyToData:(e,t)=>ne().xyToBar(e,t),numTicks:j.numTicks,sampleRate:j.sampleRate,leftTicks:"double"===j.format?j.leftTicks:0,rightTicks:"double"===j.format?j.rightTicks:0,units:j.units,palette:W}),!O&&i&&r&&e.jsx(pc,{canvasRef:r,xyToMenuItems:q,onClose:()=>{k(da.nothing())},onOpen:(e,t)=>{k(Q(e,t))}})]})}var Hc,Wc={exports:{}};
12
+ function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(e,t,n){return t&&function(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,k(r.key),r)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_(e))||t){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw o}}}}function v(e,t,n){return(t=k(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(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 y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach(function(t){v(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw a}}return s}}(e,t)||_(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 x(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_(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 k(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);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:t+""}function j(e){return j="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},j(e)}function _(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.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)?m(e,t):void 0}}var N=function(){},S={},M={},C=null,T={mark:N,measure:N};try{"undefined"!=typeof window&&(S=window),"undefined"!=typeof document&&(M=document),"undefined"!=typeof MutationObserver&&(C=MutationObserver),"undefined"!=typeof performance&&(T=performance)}catch(Fl){}var R=(S.navigator||{}).userAgent,O=void 0===R?"":R,E=S,P=M,F=C,A=T;E.document;var I,D=!!P.documentElement&&!!P.head&&"function"==typeof P.addEventListener&&"function"==typeof P.createElement,L=~O.indexOf("MSIE")||~O.indexOf("Trident/"),B={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"},slab:{"fa-regular":"regular",faslr:"regular"},"slab-press":{"fa-regular":"regular",faslpr:"regular"},thumbprint:{"fa-light":"light",fatl:"light"},whiteboard:{"fa-semibold":"semibold",fawsb:"semibold"},notdog:{"fa-solid":"solid",fans:"solid"},"notdog-duo":{"fa-solid":"solid",fands:"solid"},etch:{"fa-solid":"solid",faes:"solid"},jelly:{"fa-regular":"regular",fajr:"regular"},"jelly-fill":{"fa-regular":"regular",fajfr:"regular"},"jelly-duo":{"fa-regular":"regular",fajdr:"regular"},chisel:{"fa-regular":"regular",facr:"regular"},utility:{"fa-semibold":"semibold",fausb:"semibold"},"utility-duo":{"fa-semibold":"semibold",faudsb:"semibold"},"utility-fill":{"fa-semibold":"semibold",faufsb:"semibold"}},z=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],$="classic",V="duotone",H="sharp",W="sharp-duotone",U="chisel",J="etch",Q="jelly",q="jelly-duo",X="jelly-fill",Y="notdog",K="notdog-duo",Z="slab",G="slab-press",ee="thumbprint",te="utility",ne="utility-duo",re="utility-fill",ae="whiteboard",oe=[$,V,H,W,U,J,Q,q,X,Y,K,Z,G,ee,te,ne,re,ae];v(v(v(v(v(v(v(v(v(v(I={},$,"Classic"),V,"Duotone"),H,"Sharp"),W,"Sharp Duotone"),U,"Chisel"),J,"Etch"),Q,"Jelly"),q,"Jelly Duo"),X,"Jelly Fill"),Y,"Notdog"),v(v(v(v(v(v(v(v(I,K,"Notdog Duo"),Z,"Slab"),G,"Slab Press"),ee,"Thumbprint"),te,"Utility"),ne,"Utility Duo"),re,"Utility Fill"),ae,"Whiteboard");var ie=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["chisel",{defaultShortPrefixId:"facr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["etch",{defaultShortPrefixId:"faes",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["jelly",{defaultShortPrefixId:"fajr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-duo",{defaultShortPrefixId:"fajdr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["jelly-fill",{defaultShortPrefixId:"fajfr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["notdog",{defaultShortPrefixId:"fans",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["notdog-duo",{defaultShortPrefixId:"fands",defaultStyleId:"solid",styleIds:["solid"],futureStyleIds:[],defaultFontWeight:900}],["slab",{defaultShortPrefixId:"faslr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["slab-press",{defaultShortPrefixId:"faslpr",defaultStyleId:"regular",styleIds:["regular"],futureStyleIds:[],defaultFontWeight:400}],["thumbprint",{defaultShortPrefixId:"fatl",defaultStyleId:"light",styleIds:["light"],futureStyleIds:[],defaultFontWeight:300}],["utility",{defaultShortPrefixId:"fausb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-duo",{defaultShortPrefixId:"faudsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["utility-fill",{defaultShortPrefixId:"faufsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}],["whiteboard",{defaultShortPrefixId:"fawsb",defaultStyleId:"semibold",styleIds:["semibold"],futureStyleIds:[],defaultFontWeight:600}]]),se=["fak","fa-kit","fakd","fa-kit-duotone"],le={fak:"kit","fa-kit":"kit"},ce={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"};v(v({},"kit","Kit"),"kit-duotone","Kit Duotone");var ue,fe={kit:"fak"},de={"kit-duotone":"fakd"},he="duotone-group",me="swap-opacity",pe="primary",ge="secondary";v(v(v(v(v(v(v(v(v(v(ue={},"classic","Classic"),"duotone","Duotone"),"sharp","Sharp"),"sharp-duotone","Sharp Duotone"),"chisel","Chisel"),"etch","Etch"),"jelly","Jelly"),"jelly-duo","Jelly Duo"),"jelly-fill","Jelly Fill"),"notdog","Notdog"),v(v(v(v(v(v(v(v(ue,"notdog-duo","Notdog Duo"),"slab","Slab"),"slab-press","Slab Press"),"thumbprint","Thumbprint"),"utility","Utility"),"utility-duo","Utility Duo"),"utility-fill","Utility Fill"),"whiteboard","Whiteboard");v(v({},"kit","Kit"),"kit-duotone","Kit Duotone");var ve={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"},slab:{faslr:"fa-regular"},"slab-press":{faslpr:"fa-regular"},whiteboard:{fawsb:"fa-semibold"},thumbprint:{fatl:"fa-light"},notdog:{fans:"fa-solid"},"notdog-duo":{fands:"fa-solid"},etch:{faes:"fa-solid"},jelly:{fajr:"fa-regular"},"jelly-fill":{fajfr:"fa-regular"},"jelly-duo":{fajdr:"fa-regular"},chisel:{facr:"fa-regular"},utility:{fausb:"fa-semibold"},"utility-duo":{faudsb:"fa-semibold"},"utility-fill":{faufsb:"fa-semibold"}},be=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","faslr","faslpr","fawsb","fatl","fans","fands","faes","fajr","fajfr","fajdr","facr","fausb","faudsb","faufsb"].concat(["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-thumbprint","fa-whiteboard","fa-notdog","fa-notdog-duo","fa-chisel","fa-etch","fa-jelly","fa-jelly-fill","fa-jelly-duo","fa-slab","fa-slab-press","fa-utility","fa-utility-duo","fa-utility-fill"],["fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands","fa-semibold"]),ye=[1,2,3,4,5,6,7,8,9,10],we=ye.concat([11,12,13,14,15,16,17,18,19,20]),xe=[].concat(x(Object.keys({classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"],slab:["faslr"],"slab-press":["faslpr"],whiteboard:["fawsb"],thumbprint:["fatl"],notdog:["fans"],"notdog-duo":["fands"],etch:["faes"],jelly:["fajr"],"jelly-fill":["fajfr"],"jelly-duo":["fajdr"],chisel:["facr"],utility:["fausb"],"utility-duo":["faudsb"],"utility-fill":["faufsb"]})),["solid","regular","light","thin","duotone","brands","semibold"],["aw","fw","pull-left","pull-right"],["2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","inverse","layers","layers-bottom-left","layers-bottom-right","layers-counter","layers-text","layers-top-left","layers-top-right","li","pull-end","pull-start","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul","width-auto","width-fixed",he,me,pe,ge]).concat(ye.map(function(e){return"".concat(e,"x")})).concat(we.map(function(e){return"w-".concat(e)})),ke="___FONT_AWESOME___",je="svg-inline--fa",_e="data-fa-i2svg",Ne="data-fa-pseudo-element",Se="data-prefix",Me="data-icon",Ce="fontawesome-i2svg",Te=["HTML","HEAD","STYLE","SCRIPT"],Re=["::before","::after",":before",":after"],Oe=function(){try{return"production"===process.env.NODE_ENV}catch(e){return!1}}();function Ee(e){return new Proxy(e,{get:function(e,t){return t in e?e[t]:e[$]}})}var Pe=y({},B);Pe[$]=y(y(y(y({},{"fa-duotone":"duotone"}),B[$]),le),ce);var Fe=Ee(Pe),Ae=y({},{chisel:{regular:"facr"},classic:{brands:"fab",light:"fal",regular:"far",solid:"fas",thin:"fat"},duotone:{light:"fadl",regular:"fadr",solid:"fad",thin:"fadt"},etch:{solid:"faes"},jelly:{regular:"fajr"},"jelly-duo":{regular:"fajdr"},"jelly-fill":{regular:"fajfr"},notdog:{solid:"fans"},"notdog-duo":{solid:"fands"},sharp:{light:"fasl",regular:"fasr",solid:"fass",thin:"fast"},"sharp-duotone":{light:"fasdl",regular:"fasdr",solid:"fasds",thin:"fasdt"},slab:{regular:"faslr"},"slab-press":{regular:"faslpr"},thumbprint:{light:"fatl"},utility:{semibold:"fausb"},"utility-duo":{semibold:"faudsb"},"utility-fill":{semibold:"faufsb"},whiteboard:{semibold:"fawsb"}});Ae[$]=y(y(y(y({},{duotone:"fad"}),Ae[$]),fe),de);var Ie=Ee(Ae),De=y({},ve);De[$]=y(y({},De[$]),{fak:"fa-kit"});var Le=Ee(De),Be=y({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"},slab:{"fa-regular":"faslr"},"slab-press":{"fa-regular":"faslpr"},whiteboard:{"fa-semibold":"fawsb"},thumbprint:{"fa-light":"fatl"},notdog:{"fa-solid":"fans"},"notdog-duo":{"fa-solid":"fands"},etch:{"fa-solid":"faes"},jelly:{"fa-regular":"fajr"},"jelly-fill":{"fa-regular":"fajfr"},"jelly-duo":{"fa-regular":"fajdr"},chisel:{"fa-regular":"facr"},utility:{"fa-semibold":"fausb"},"utility-duo":{"fa-semibold":"faudsb"},"utility-fill":{"fa-semibold":"faufsb"}});Be[$]=y(y({},Be[$]),{"fa-kit":"fak"}),Ee(Be);var ze=/fa(k|kd|s|r|l|t|d|dr|dl|dt|b|slr|slpr|wsb|tl|ns|nds|es|jr|jfr|jdr|usb|ufsb|udsb|cr|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,$e="fa-layers-text",Ve=/Font ?Awesome ?([567 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit|Notdog Duo|Notdog|Chisel|Etch|Thumbprint|Jelly Fill|Jelly Duo|Jelly|Utility|Utility Fill|Utility Duo|Slab Press|Slab|Whiteboard)?.*/i;Ee(y({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"},slab:{400:"faslr"},"slab-press":{400:"faslpr"},whiteboard:{600:"fawsb"},thumbprint:{300:"fatl"},notdog:{900:"fans"},"notdog-duo":{900:"fands"},etch:{900:"faes"},chisel:{400:"facr"},jelly:{400:"fajr"},"jelly-fill":{400:"fajfr"},"jelly-duo":{400:"fajdr"},utility:{600:"fausb"},"utility-duo":{600:"faudsb"},"utility-fill":{600:"faufsb"}}));var He=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],We={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Ue=[].concat(x(["kit"]),x(xe)),Je=E.FontAwesomeConfig||{};if(P&&"function"==typeof P.querySelector){[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-search-pseudo-elements","searchPseudoElements"],["data-search-pseudo-elements-warnings","searchPseudoElementsWarnings"],["data-search-pseudo-elements-full-scan","searchPseudoElementsFullScan"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach(function(e){var t=w(e,2),n=t[0],r=t[1],a=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=P.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(n));null!=a&&(Je[r]=a)})}var Qe={styleDefault:"solid",familyDefault:$,cssPrefix:"fa",replacementClass:je,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Je.familyPrefix&&(Je.cssPrefix=Je.familyPrefix);var qe=y(y({},Qe),Je);qe.autoReplaceSvg||(qe.observeMutations=!1);var Xe={};Object.keys(Qe).forEach(function(e){Object.defineProperty(Xe,e,{enumerable:!0,set:function(t){qe[e]=t,Ye.forEach(function(e){return e(Xe)})},get:function(){return qe[e]}})}),Object.defineProperty(Xe,"familyPrefix",{enumerable:!0,set:function(e){qe.cssPrefix=e,Ye.forEach(function(e){return e(Xe)})},get:function(){return qe.cssPrefix}}),E.FontAwesomeConfig=Xe;var Ye=[];var Ke=16,Ze={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Ge(){for(var e=12,t="";e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function et(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function tt(e){return e.classList?et(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function nt(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function rt(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function at(e){return e.size!==Ze.size||e.x!==Ze.x||e.y!==Ze.y||e.rotate!==Ze.rotate||e.flipX||e.flipY}function ot(){var e="fa",t=je,n=Xe.cssPrefix,r=Xe.replacementClass,a=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 7 Free";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 7 Free";\n --fa-font-light: normal 300 1em/1 "Font Awesome 7 Pro";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 7 Pro";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 7 Duotone";\n --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 7 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 7 Brands";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 7 Sharp";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 7 Sharp Duotone";\n --fa-font-slab-regular: normal 400 1em/1 "Font Awesome 7 Slab";\n --fa-font-slab-press-regular: normal 400 1em/1 "Font Awesome 7 Slab Press";\n --fa-font-whiteboard-semibold: normal 600 1em/1 "Font Awesome 7 Whiteboard";\n --fa-font-thumbprint-light: normal 300 1em/1 "Font Awesome 7 Thumbprint";\n --fa-font-notdog-solid: normal 900 1em/1 "Font Awesome 7 Notdog";\n --fa-font-notdog-duo-solid: normal 900 1em/1 "Font Awesome 7 Notdog Duo";\n --fa-font-etch-solid: normal 900 1em/1 "Font Awesome 7 Etch";\n --fa-font-jelly-regular: normal 400 1em/1 "Font Awesome 7 Jelly";\n --fa-font-jelly-fill-regular: normal 400 1em/1 "Font Awesome 7 Jelly Fill";\n --fa-font-jelly-duo-regular: normal 400 1em/1 "Font Awesome 7 Jelly Duo";\n --fa-font-chisel-regular: normal 400 1em/1 "Font Awesome 7 Chisel";\n --fa-font-utility-semibold: normal 600 1em/1 "Font Awesome 7 Utility";\n --fa-font-utility-duo-semibold: normal 600 1em/1 "Font Awesome 7 Utility Duo";\n --fa-font-utility-fill-semibold: normal 600 1em/1 "Font Awesome 7 Utility Fill";\n}\n\n.svg-inline--fa {\n box-sizing: content-box;\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285714em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left,\n.svg-inline--fa .fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-pull-right,\n.svg-inline--fa .fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n inset-block-start: 0.25em; /* syncing vertical alignment with Web Font rendering */\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: var(--fa-width, 1.25em);\n}\n.fa-layers .svg-inline--fa {\n inset: 0;\n margin: auto;\n position: absolute;\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: calc(10 / 16 * 1em); /* converts a 10px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 10 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 10 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-xs {\n font-size: calc(12 / 16 * 1em); /* converts a 12px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 12 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 12 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-sm {\n font-size: calc(14 / 16 * 1em); /* converts a 14px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 14 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 14 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-lg {\n font-size: calc(20 / 16 * 1em); /* converts a 20px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 20 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 20 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-xl {\n font-size: calc(24 / 16 * 1em); /* converts a 24px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 24 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 24 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-2xl {\n font-size: calc(32 / 16 * 1em); /* converts a 32px size into an em-based value that\'s relative to the scale\'s 16px base */\n line-height: calc(1 / 32 * 1em); /* sets the line-height of the icon back to that of it\'s parent */\n vertical-align: calc((6 / 32 - 0.375) * 1em); /* vertically centers the icon taking into account the surrounding text\'s descender */\n}\n\n.fa-width-auto {\n --fa-width: auto;\n}\n\n.fa-fw,\n.fa-width-fixed {\n --fa-width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-inline-start: var(--fa-li-margin, 2.5em);\n padding-inline-start: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n inset-inline-start: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n/* Heads Up: Bordered Icons will not be supported in the future!\n - This feature will be deprecated in the next major release of Font Awesome (v8)!\n - You may continue to use it in this version *v7), but it will not be supported in Font Awesome v8.\n*/\n/* Notes:\n* --@{v.$css-prefix}-border-width = 1/16 by default (to render as ~1px based on a 16px default font-size)\n* --@{v.$css-prefix}-border-padding =\n ** 3/16 for vertical padding (to give ~2px of vertical whitespace around an icon considering it\'s vertical alignment)\n ** 4/16 for horizontal padding (to give ~4px of horizontal whitespace around an icon)\n*/\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.0625em);\n box-sizing: var(--fa-border-box-sizing, content-box);\n padding: var(--fa-border-padding, 0.1875em 0.25em);\n}\n\n.fa-pull-left,\n.fa-pull-start {\n float: inline-start;\n margin-inline-end: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right,\n.fa-pull-end {\n float: inline-end;\n margin-inline-start: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n .fa-bounce,\n .fa-fade,\n .fa-beat-fade,\n .fa-flip,\n .fa-pulse,\n .fa-shake,\n .fa-spin,\n .fa-spin-pulse {\n animation: none !important;\n transition: none !important;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.svg-inline--fa.fa-inverse {\n fill: var(--fa-inverse, #fff);\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n line-height: 2em;\n position: relative;\n vertical-align: middle;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.svg-inline--fa.fa-stack-1x {\n --fa-width: 1.25em;\n height: 1em;\n width: var(--fa-width);\n}\n.svg-inline--fa.fa-stack-2x {\n --fa-width: 2.5em;\n height: 2em;\n width: var(--fa-width);\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n inset: 0;\n margin: auto;\n position: absolute;\n z-index: var(--fa-stack-z-index, auto);\n}';if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),i=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");a=a.replace(o,".".concat(n,"-")).replace(i,"--".concat(n,"-")).replace(s,".".concat(r))}return a}var it=!1;function st(){Xe.autoAddCss&&!it&&(!function(e){if(e&&D){var t=P.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=P.head.childNodes,r=null,a=n.length-1;a>-1;a--){var o=n[a],i=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=o)}P.head.insertBefore(t,r)}}(ot()),it=!0)}var lt={mixout:function(){return{dom:{css:ot,insertCss:st}}},hooks:function(){return{beforeDOMElementCreation:function(){st()},beforeI2svg:function(){st()}}}},ct=E||{};ct[ke]||(ct[ke]={}),ct[ke].styles||(ct[ke].styles={}),ct[ke].hooks||(ct[ke].hooks={}),ct[ke].shims||(ct[ke].shims=[]);var ut=ct[ke],ft=[],dt=function(){P.removeEventListener("DOMContentLoaded",dt),ht=1,ft.map(function(e){return e()})},ht=!1;function mt(e){var t=e.tag,n=e.attributes,r=void 0===n?{}:n,a=e.children,o=void 0===a?[]:a;return"string"==typeof e?nt(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(nt(e[n]),'" ')},"").trim()}(r),">").concat(o.map(mt).join(""),"</").concat(t,">")}function pt(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}D&&((ht=(P.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(P.readyState))||P.addEventListener("DOMContentLoaded",dt));var gt=function(e,t,n,r){var a,o,i,s=Object.keys(e),l=s.length,c=t;for(void 0===n?(a=1,i=e[s[0]]):(a=0,i=n);a<l;a++)i=c(i,e[o=s[a]],o,e);return i};function vt(e){return 1!==x(e).length?null:e.codePointAt(0).toString(16)}function bt(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return!!r.icon?t[r.iconName]=r.icon:t[n]=r,t},{})}function yt(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).skipHooks,r=void 0!==n&&n,a=bt(t);"function"!=typeof ut.hooks.addPack||r?ut.styles[e]=y(y({},ut.styles[e]||{}),a):ut.hooks.addPack(e,bt(t)),"fas"===e&&yt("fa",t)}var wt=ut.styles,xt=ut.shims,kt=Object.keys(Le),jt=kt.reduce(function(e,t){return e[t]=Object.keys(Le[t]),e},{}),_t=null,Nt={},St={},Mt={},Ct={},Tt={};function Rt(e,t){var n,r=t.split("-"),a=r[0],o=r.slice(1).join("-");return a!==e||""===o||(n=o,~Ue.indexOf(n))?null:o}var Ot,Et=function(){var e=function(e){return gt(wt,function(t,n,r){return t[r]=gt(n,e,{}),t},{})};Nt=e(function(e,t,n){(t[3]&&(e[t[3]]=n),t[2])&&t[2].filter(function(e){return"number"==typeof e}).forEach(function(t){e[t.toString(16)]=n});return e}),St=e(function(e,t,n){(e[n]=n,t[2])&&t[2].filter(function(e){return"string"==typeof e}).forEach(function(t){e[t]=n});return e}),Tt=e(function(e,t,n){var r=t[2];return e[n]=n,r.forEach(function(t){e[t]=n}),e});var t="far"in wt||Xe.autoFetchSvg,n=gt(xt,function(e,n){var r=n[0],a=n[1],o=n[2];return"far"!==a||t||(a="fas"),"string"==typeof r&&(e.names[r]={prefix:a,iconName:o}),"number"==typeof r&&(e.unicodes[r.toString(16)]={prefix:a,iconName:o}),e},{names:{},unicodes:{}});Mt=n.names,Ct=n.unicodes,_t=Dt(Xe.styleDefault,{family:Xe.familyDefault})};function Pt(e,t){return(Nt[e]||{})[t]}function Ft(e,t){return(Tt[e]||{})[t]}function At(e){return Mt[e]||{prefix:null,iconName:null}}function It(){return _t}Ot=function(e){_t=Dt(e.styleDefault,{family:Xe.familyDefault})},Ye.push(Ot),Et();function Dt(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).family,n=void 0===t?$:t,r=Fe[n][e];if(n===V&&!e)return"fad";var a=Ie[n][e]||Ie[n][r],o=e in ut.styles?e:null;return a||o||null}function Lt(e){return e.sort().filter(function(e,t,n){return n.indexOf(e)===t})}var Bt=be.concat(se);function zt(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).skipLookups,n=void 0!==t&&t,r=null,a=Lt(e.filter(function(e){return Bt.includes(e)})),o=Lt(e.filter(function(e){return!Bt.includes(e)})),i=w(a.filter(function(e){return r=e,!z.includes(e)}),1)[0],s=void 0===i?null:i,l=function(e){var t=$,n=kt.reduce(function(e,t){return e[t]="".concat(Xe.cssPrefix,"-").concat(t),e},{});return oe.forEach(function(r){(e.includes(n[r])||e.some(function(e){return jt[r].includes(e)}))&&(t=r)}),t}(a),c=y(y({},function(e){var t=[],n=null;return e.forEach(function(e){var r=Rt(Xe.cssPrefix,e);r?n=r:e&&t.push(e)}),{iconName:n,rest:t}}(o)),{},{prefix:Dt(s,{family:l})});return y(y(y({},c),function(e){var t=e.values,n=e.family,r=e.canonical,a=e.givenPrefix,o=void 0===a?"":a,i=e.styles,s=void 0===i?{}:i,l=e.config,c=void 0===l?{}:l,u=n===V,f=t.includes("fa-duotone")||t.includes("fad"),d="duotone"===c.familyDefault,h="fad"===r.prefix||"fa-duotone"===r.prefix;!u&&(f||d||h)&&(r.prefix="fad");(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab");if(!r.prefix&&$t.includes(n)){if(Object.keys(s).find(function(e){return Vt.includes(e)})||c.autoFetchSvg){var m=ie.get(n).defaultShortPrefixId;r.prefix=m,r.iconName=Ft(r.prefix,r.iconName)||r.iconName}}"fa"!==r.prefix&&"fa"!==o||(r.prefix=It()||"fas");return r}({values:e,family:l,styles:wt,config:Xe,canonical:c,givenPrefix:r})),function(e,t,n){var r=n.prefix,a=n.iconName;if(e||!r||!a)return{prefix:r,iconName:a};var o="fa"===t?At(a):{},i=Ft(r,a);a=o.iconName||i||a,"far"!==(r=o.prefix||r)||wt.far||!wt.fas||Xe.autoFetchSvg||(r="fas");return{prefix:r,iconName:a}}(n,r,c))}var $t=oe.filter(function(e){return e!==$||e!==V}),Vt=Object.keys(ve).filter(function(e){return e!==$}).map(function(e){return Object.keys(ve[e])}).flat();var Ht=function(){return p(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}},[{key:"add",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var a=n.reduce(this._pullDefinitions,{});Object.keys(a).forEach(function(t){e.definitions[t]=y(y({},e.definitions[t]||{}),a[t]),yt(t,a[t]);var n=Le[$][t];n&&yt(n,a[t]),Et()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(e,t){var n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map(function(t){var r=n[t],a=r.prefix,o=r.iconName,i=r.icon,s=i[2];e[a]||(e[a]={}),s.length>0&&s.forEach(function(t){"string"==typeof t&&(e[a][t]=i)}),e[a][o]=i}),e}}])}(),Wt=[],Ut={},Jt={},Qt=Object.keys(Jt);function qt(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a];return(Ut[e]||[]).forEach(function(e){t=e.apply(null,[t].concat(r))}),t}function Xt(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(Ut[e]||[]).forEach(function(e){e.apply(null,n)})}function Yt(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Jt[e]?Jt[e].apply(null,t):void 0}function Kt(e){"fa"===e.prefix&&(e.prefix="fas");var t=e.iconName,n=e.prefix||It();if(t)return t=Ft(n,t)||t,pt(Zt.definitions,n,t)||pt(ut.styles,n,t)}var Zt=new Ht,Gt={i2svg:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return D?(Xt("beforeI2svg",e),Yt("pseudoElements2svg",e),Yt("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.autoReplaceSvgRoot;!1===Xe.autoReplaceSvg&&(Xe.autoReplaceSvg=!0),Xe.observeMutations=!0,e=function(){tn({autoReplaceSvgRoot:n}),Xt("watch",t)},D&&(ht?setTimeout(e,0):ft.push(e))}},en={noAuto:function(){Xe.autoReplaceSvg=!1,Xe.observeMutations=!1,Xt("noAuto")},config:Xe,dom:Gt,parse:{icon:function(e){if(null===e)return null;if("object"===j(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Ft(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){var t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],n=Dt(e[0]);return{prefix:n,iconName:Ft(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(Xe.cssPrefix,"-"))>-1||e.match(ze))){var r=zt(e.split(" "),{skipLookups:!0});return{prefix:r.prefix||It(),iconName:Ft(r.prefix,r.iconName)||r.iconName}}if("string"==typeof e){var a=It();return{prefix:a,iconName:Ft(a,e)||e}}}},library:Zt,findIconDefinition:Kt,toHtml:mt},tn=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).autoReplaceSvgRoot,t=void 0===e?P:e;(Object.keys(ut.styles).length>0||Xe.autoFetchSvg)&&D&&Xe.autoReplaceSvg&&en.dom.i2svg({node:t})};function nn(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return mt(e)})}}),Object.defineProperty(e,"node",{get:function(){if(D){var t=P.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function rn(e){var t=e.icons,n=t.main,r=t.mask,a=e.prefix,o=e.iconName,i=e.transform,s=e.symbol,l=e.maskId,c=e.extra,u=e.watchable,f=void 0!==u&&u,d=r.found?r:n,h=d.width,m=d.height,p=[Xe.replacementClass,o?"".concat(Xe.cssPrefix,"-").concat(o):""].filter(function(e){return-1===c.classes.indexOf(e)}).filter(function(e){return""!==e||!!e}).concat(c.classes).join(" "),g={children:[],attributes:y(y({},c.attributes),{},{"data-prefix":a,"data-icon":o,class:p,role:c.attributes.role||"img",viewBox:"0 0 ".concat(h," ").concat(m)})};(function(e){return["aria-label","aria-labelledby","title","role"].some(function(t){return t in e})})(c.attributes)||c.attributes["aria-hidden"]||(g.attributes["aria-hidden"]="true"),f&&(g.attributes[_e]="");var v=y(y({},g),{},{prefix:a,iconName:o,main:n,mask:r,maskId:l,transform:i,symbol:s,styles:y({},c.styles)}),b=r.found&&n.found?Yt("generateAbstractMask",v)||{children:[],attributes:{}}:Yt("generateAbstractIcon",v)||{children:[],attributes:{}},w=b.children,x=b.attributes;return v.children=w,v.attributes=x,s?function(e){var t=e.prefix,n=e.iconName,r=e.children,a=e.attributes,o=e.symbol,i=!0===o?"".concat(t,"-").concat(Xe.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:y(y({},a),{},{id:i}),children:r}]}]}(v):function(e){var t=e.children,n=e.main,r=e.mask,a=e.attributes,o=e.styles,i=e.transform;if(at(i)&&n.found&&!r.found){var s={x:n.width/n.height/2,y:.5};a.style=rt(y(y({},o),{},{"transform-origin":"".concat(s.x+i.x/16,"em ").concat(s.y+i.y/16,"em")}))}return[{tag:"svg",attributes:a,children:t}]}(v)}function an(e){var t=e.content,n=e.width,r=e.height,a=e.transform,o=e.extra,i=e.watchable,s=void 0!==i&&i,l=y(y({},o.attributes),{},{class:o.classes.join(" ")});s&&(l[_e]="");var c=y({},o.styles);at(a)&&(c.transform=function(e){var t=e.transform,n=e.width,r=void 0===n?16:n,a=e.height,o=void 0===a?16:a,i="";return i+=L?"translate(".concat(t.x/Ke-r/2,"em, ").concat(t.y/Ke-o/2,"em) "):"translate(calc(-50% + ".concat(t.x/Ke,"em), calc(-50% + ").concat(t.y/Ke,"em)) "),i+="scale(".concat(t.size/Ke*(t.flipX?-1:1),", ").concat(t.size/Ke*(t.flipY?-1:1),") "),i+"rotate(".concat(t.rotate,"deg) ")}({transform:a,width:n,height:r}),c["-webkit-transform"]=c.transform);var u=rt(c);u.length>0&&(l.style=u);var f=[];return f.push({tag:"span",attributes:l,children:[t]}),f}var on=ut.styles;function sn(e){var t=e[0],n=e[1],r=w(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(r)?{tag:"g",attributes:{class:"".concat(Xe.cssPrefix,"-").concat(We.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Xe.cssPrefix,"-").concat(We.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(Xe.cssPrefix,"-").concat(We.PRIMARY),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}}}}var ln={found:!1,width:512,height:512};function cn(e,t){var n=t;return"fa"===t&&null!==Xe.styleDefault&&(t=It()),new Promise(function(r,a){if("fa"===n){var o=At(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&on[t]&&on[t][e])return r(sn(on[t][e]));!function(e,t){Oe||Xe.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),r(y(y({},ln),{},{icon:Xe.showMissingIcons&&e&&Yt("missingIconAbstract")||{}}))})}var un=function(){},fn=Xe.measurePerformance&&A&&A.mark&&A.measure?A:{mark:un,measure:un},dn='FA "7.1.0"',hn=function(e){fn.mark("".concat(dn," ").concat(e," ends")),fn.measure("".concat(dn," ").concat(e),"".concat(dn," ").concat(e," begins"),"".concat(dn," ").concat(e," ends"))},mn=function(e){return fn.mark("".concat(dn," ").concat(e," begins")),function(){return hn(e)}},pn=function(){};function gn(e){return"string"==typeof(e.getAttribute?e.getAttribute(_e):null)}function vn(e){return P.createElementNS("http://www.w3.org/2000/svg",e)}function bn(e){return P.createElement(e)}function yn(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).ceFn,n=void 0===t?"svg"===e.tag?vn:bn:t;if("string"==typeof e)return P.createTextNode(e);var r=n(e.tag);return Object.keys(e.attributes||[]).forEach(function(t){r.setAttribute(t,e.attributes[t])}),(e.children||[]).forEach(function(e){r.appendChild(yn(e,{ceFn:n}))}),r}var wn={replace:function(e){var t=e[0];if(t.parentNode)if(e[1].forEach(function(e){t.parentNode.insertBefore(yn(e),t)}),null===t.getAttribute(_e)&&Xe.keepOriginalSource){var n=P.createComment(function(e){var t=" ".concat(e.outerHTML," ");return"".concat(t,"Font Awesome fontawesome.com ")}(t));t.parentNode.replaceChild(n,t)}else t.remove()},nest:function(e){var t=e[0],n=e[1];if(~tt(t).indexOf(Xe.replacementClass))return wn.replace(e);var r=new RegExp("".concat(Xe.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var a=n[0].attributes.class.split(" ").reduce(function(e,t){return t===Xe.replacementClass||t.match(r)?e.toSvg.push(t):e.toNode.push(t),e},{toNode:[],toSvg:[]});n[0].attributes.class=a.toSvg.join(" "),0===a.toNode.length?t.removeAttribute("class"):t.setAttribute("class",a.toNode.join(" "))}var o=n.map(function(e){return mt(e)}).join("\n");t.setAttribute(_e,""),t.innerHTML=o}};function xn(e){e()}function kn(e,t){var n="function"==typeof t?t:pn;if(0===e.length)n();else{var r=xn;"async"===Xe.mutateApproach&&(r=E.requestAnimationFrame||xn),r(function(){var t=!0===Xe.autoReplaceSvg?wn.replace:wn[Xe.autoReplaceSvg]||wn.replace,r=mn("mutate");e.map(t),r(),n()})}}var jn=!1;function _n(){jn=!0}function Nn(){jn=!1}var Sn=null;function Mn(e){if(F&&Xe.observeMutations){var t=e.treeCallback,n=void 0===t?pn:t,r=e.nodeCallback,a=void 0===r?pn:r,o=e.pseudoElementsCallback,i=void 0===o?pn:o,s=e.observeMutationsRoot,l=void 0===s?P:s;Sn=new F(function(e){if(!jn){var t=It();et(e).forEach(function(e){if("childList"===e.type&&e.addedNodes.length>0&&!gn(e.addedNodes[0])&&(Xe.searchPseudoElements&&i(e.target),n(e.target)),"attributes"===e.type&&e.target.parentNode&&Xe.searchPseudoElements&&i([e.target],!0),"attributes"===e.type&&gn(e.target)&&~He.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){var t=e.getAttribute?e.getAttribute(Se):null,n=e.getAttribute?e.getAttribute(Me):null;return t&&n}(e.target)){var r=zt(tt(e.target)),o=r.prefix,s=r.iconName;e.target.setAttribute(Se,o||t),s&&e.target.setAttribute(Me,s)}else(l=e.target)&&l.classList&&l.classList.contains&&l.classList.contains(Xe.replacementClass)&&a(e.target);var l})}}),D&&Sn.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function Cn(e){var t,n,r=e.getAttribute("data-prefix"),a=e.getAttribute("data-icon"),o=void 0!==e.innerText?e.innerText.trim():"",i=zt(tt(e));return i.prefix||(i.prefix=It()),r&&a&&(i.prefix=r,i.iconName=a),i.iconName&&i.prefix||(i.prefix&&o.length>0&&(i.iconName=(t=i.prefix,n=e.innerText,(St[t]||{})[n]||Pt(i.prefix,vt(e.innerText)))),!i.iconName&&Xe.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function Tn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},n=Cn(e),r=n.iconName,a=n.prefix,o=n.rest,i=function(e){return et(e.attributes).reduce(function(e,t){return"class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e},{})}(e),s=qt("parseNodeAttributes",{},e),l=t.styleParser?function(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(e,t){var n=t.split(":"),r=n[0],a=n.slice(1);return r&&a.length>0&&(e[r]=a.join(":").trim()),e},{})),n}(e):[];return y({iconName:r,prefix:a,transform:Ze,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:i}},s)}var Rn=ut.styles;function On(e){var t="nest"===Xe.autoReplaceSvg?Tn(e,{styleParser:!1}):Tn(e);return~t.extra.classes.indexOf($e)?Yt("generateLayersText",e,t):Yt("generateSvgReplacementMutation",e,t)}function En(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!D)return Promise.resolve();var n=P.documentElement.classList,r=function(e){return n.add("".concat(Ce,"-").concat(e))},a=function(e){return n.remove("".concat(Ce,"-").concat(e))},o=Xe.autoFetchSvg?[].concat(x(se),x(be)):z.concat(Object.keys(Rn));o.includes("fa")||o.push("fa");var i=[".".concat($e,":not([").concat(_e,"])")].concat(o.map(function(e){return".".concat(e,":not([").concat(_e,"])")})).join(", ");if(0===i.length)return Promise.resolve();var s=[];try{s=et(e.querySelectorAll(i))}catch(e){}if(!(s.length>0))return Promise.resolve();r("pending"),a("complete");var l=mn("onTree"),c=s.reduce(function(e,t){try{var n=On(t);n&&e.push(n)}catch(e){Oe||"MissingIcon"===e.name&&console.error(e)}return e},[]);return new Promise(function(e,n){Promise.all(c).then(function(n){kn(n,function(){r("active"),r("complete"),a("pending"),"function"==typeof t&&t(),l(),e()})}).catch(function(e){l(),n(e)})})}function Pn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;On(e).then(function(e){e&&kn([e],t)})}var Fn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?Ze:n,a=t.symbol,o=void 0!==a&&a,i=t.mask,s=void 0===i?null:i,l=t.maskId,c=void 0===l?null:l,u=t.classes,f=void 0===u?[]:u,d=t.attributes,h=void 0===d?{}:d,m=t.styles,p=void 0===m?{}:m;if(e){var g=e.prefix,v=e.iconName,b=e.icon;return nn(y({type:"icon"},e),function(){return Xt("beforeDOMElementCreation",{iconDefinition:e,params:t}),rn({icons:{main:sn(b),mask:s?sn(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:g,iconName:v,transform:y(y({},Ze),r),symbol:o,maskId:c,extra:{attributes:h,styles:p,classes:f}})})}},An={mixout:function(){return{icon:(e=Fn,function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(t||{}).icon?t:Kt(t||{}),a=n.mask;return a&&(a=(a||{}).icon?a:Kt(a||{})),e(r,y(y({},n),{},{mask:a}))})};var e},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=En,e.nodeCallback=Pn,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,n=void 0===t?P:t,r=e.callback;return En(n,void 0===r?function(){}:r)},e.generateSvgReplacementMutation=function(e,t){var n=t.iconName,r=t.prefix,a=t.transform,o=t.symbol,i=t.mask,s=t.maskId,l=t.extra;return new Promise(function(t,c){Promise.all([cn(n,r),i.iconName?cn(i.iconName,i.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(i){var c=w(i,2),u=c[0],f=c[1];t([e,rn({icons:{main:u,mask:f},prefix:r,iconName:n,transform:a,symbol:o,maskId:s,extra:l,watchable:!0})])}).catch(c)})},e.generateAbstractIcon=function(e){var t,n=e.children,r=e.attributes,a=e.main,o=e.transform,i=rt(e.styles);return i.length>0&&(r.style=i),at(o)&&(t=Yt("generateAbstractTransformGrouping",{main:a,transform:o,containerWidth:a.width,iconWidth:a.width})),n.push(t||a.icon),{children:n,attributes:r}}}},In={mixout:function(){return{layer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.classes,r=void 0===n?[]:n;return nn({type:"layer"},function(){Xt("beforeDOMElementCreation",{assembler:e,params:t});var n=[];return e(function(e){Array.isArray(e)?e.map(function(e){n=n.concat(e.abstract)}):n=n.concat(e.abstract)}),[{tag:"span",attributes:{class:["".concat(Xe.cssPrefix,"-layers")].concat(x(r)).join(" ")},children:n}]})}}}},Dn={mixout:function(){return{counter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.title;var n=t.classes,r=void 0===n?[]:n,a=t.attributes,o=void 0===a?{}:a,i=t.styles,s=void 0===i?{}:i;return nn({type:"counter",content:e},function(){return Xt("beforeDOMElementCreation",{content:e,params:t}),function(e){var t=e.content,n=e.extra,r=y(y({},n.attributes),{},{class:n.classes.join(" ")}),a=rt(n.styles);a.length>0&&(r.style=a);var o=[];return o.push({tag:"span",attributes:r,children:[t]}),o}({content:e.toString(),extra:{attributes:o,styles:s,classes:["".concat(Xe.cssPrefix,"-layers-counter")].concat(x(r))}})})}}}},Ln={mixout:function(){return{text:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?Ze:n,a=t.classes,o=void 0===a?[]:a,i=t.attributes,s=void 0===i?{}:i,l=t.styles,c=void 0===l?{}:l;return nn({type:"text",content:e},function(){return Xt("beforeDOMElementCreation",{content:e,params:t}),an({content:e,transform:y(y({},Ze),r),extra:{attributes:s,styles:c,classes:["".concat(Xe.cssPrefix,"-layers-text")].concat(x(o))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var n=t.transform,r=t.extra,a=null,o=null;if(L){var i=parseInt(getComputedStyle(e).fontSize,10),s=e.getBoundingClientRect();a=s.width/i,o=s.height/i}return Promise.resolve([e,an({content:e.innerHTML,width:a,height:o,transform:n,extra:r,watchable:!0})])}}},Bn=new RegExp('"',"ug"),zn=[1105920,1112319],$n=y(y(y(y({},{FontAwesome:{normal:"fas",400:"fas"}}),{"Font Awesome 7 Free":{900:"fas",400:"far"},"Font Awesome 7 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 7 Brands":{400:"fab",normal:"fab"},"Font Awesome 7 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 7 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 7 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"},"Font Awesome 7 Jelly":{400:"fajr",normal:"fajr"},"Font Awesome 7 Jelly Fill":{400:"fajfr",normal:"fajfr"},"Font Awesome 7 Jelly Duo":{400:"fajdr",normal:"fajdr"},"Font Awesome 7 Slab":{400:"faslr",normal:"faslr"},"Font Awesome 7 Slab Press":{400:"faslpr",normal:"faslpr"},"Font Awesome 7 Thumbprint":{300:"fatl",normal:"fatl"},"Font Awesome 7 Notdog":{900:"fans",normal:"fans"},"Font Awesome 7 Notdog Duo":{900:"fands",normal:"fands"},"Font Awesome 7 Etch":{900:"faes",normal:"faes"},"Font Awesome 7 Chisel":{400:"facr",normal:"facr"},"Font Awesome 7 Whiteboard":{600:"fawsb",normal:"fawsb"},"Font Awesome 7 Utility":{600:"fausb",normal:"fausb"},"Font Awesome 7 Utility Duo":{600:"faudsb",normal:"faudsb"},"Font Awesome 7 Utility Fill":{600:"faufsb",normal:"faufsb"}}),{"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}}),{"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}}),Vn=Object.keys($n).reduce(function(e,t){return e[t.toLowerCase()]=$n[t],e},{}),Hn=Object.keys(Vn).reduce(function(e,t){var n=Vn[t];return e[t]=n[900]||x(Object.entries(n))[0][1],e},{});function Wn(e,t){var n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(function(r,a){if(null!==e.getAttribute(n))return r();var o,i,s,l=et(e.children).filter(function(e){return e.getAttribute(Ne)===t})[0],c=E.getComputedStyle(e,t),u=c.getPropertyValue("font-family"),f=u.match(Ve),d=c.getPropertyValue("font-weight"),h=c.getPropertyValue("content");if(l&&!f)return e.removeChild(l),r();if(f&&"none"!==h&&""!==h){var m=c.getPropertyValue("content"),p=function(e,t){var n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),a=isNaN(r)?"normal":r;return(Vn[n]||{})[a]||Hn[n]}(u,d),g=function(e){return vt(x(e.replace(Bn,""))[0]||"")}(m),v=f[0].startsWith("FontAwesome"),b=function(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),n=e.getPropertyValue("content").replace(Bn,""),r=n.codePointAt(0),a=r>=zn[0]&&r<=zn[1],o=2===n.length&&n[0]===n[1];return a||o||t}(c),w=Pt(p,g),k=w;if(v){var j=(i=Ct[o=g],s=Pt("fas",o),i||(s?{prefix:"fas",iconName:s}:null)||{prefix:null,iconName:null});j.iconName&&j.prefix&&(w=j.iconName,p=j.prefix)}if(!w||b||l&&l.getAttribute(Se)===p&&l.getAttribute(Me)===k)r();else{e.setAttribute(n,k),l&&e.removeChild(l);var _={iconName:null,prefix:null,transform:Ze,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},N=_.extra;N.attributes[Ne]=t,cn(w,p).then(function(a){var o=rn(y(y({},_),{},{icons:{main:a,mask:{prefix:null,iconName:null,rest:[]}},prefix:p,iconName:k,extra:N,watchable:!0})),i=P.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===t?e.insertBefore(i,e.firstChild):e.appendChild(i),i.outerHTML=o.map(function(e){return mt(e)}).join("\n"),e.removeAttribute(n),r()}).catch(a)}}else r()})}function Un(e){return Promise.all([Wn(e,"::before"),Wn(e,"::after")])}function Jn(e){return!(e.parentNode===document.head||~Te.indexOf(e.tagName.toUpperCase())||e.getAttribute(Ne)||e.parentNode&&"svg"===e.parentNode.tagName)}var Qn=function(e){return!!e&&Re.some(function(t){return e.includes(t)})},qn=function(e){if(!e)return[];var t=new Set,n=e.split(/,(?![^()]*\))/).map(function(e){return e.trim()});n=n.flatMap(function(e){return e.includes("(")?e:e.split(",").map(function(e){return e.trim()})});var r,a=g(n);try{for(a.s();!(r=a.n()).done;){var o=r.value;if(Qn(o)){var i=Re.reduce(function(e,t){return e.replace(t,"")},o);""!==i&&"*"!==i&&t.add(i)}}}catch(e){a.e(e)}finally{a.f()}return t};function Xn(e){if(D){var t;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])t=e;else if(Xe.searchPseudoElementsFullScan)t=e.querySelectorAll("*");else{var n,r=new Set,a=g(document.styleSheets);try{for(a.s();!(n=a.n()).done;){var o=n.value;try{var i,s=g(o.cssRules);try{for(s.s();!(i=s.n()).done;){var l,c=i.value,u=g(qn(c.selectorText));try{for(u.s();!(l=u.n()).done;){var f=l.value;r.add(f)}}catch(e){u.e(e)}finally{u.f()}}}catch(e){s.e(e)}finally{s.f()}}catch(e){Xe.searchPseudoElementsWarnings&&console.warn("Font Awesome: cannot parse stylesheet: ".concat(o.href," (").concat(e.message,')\nIf it declares any Font Awesome CSS pseudo-elements, they will not be rendered as SVG icons. Add crossorigin="anonymous" to the <link>, enable searchPseudoElementsFullScan for slower but more thorough DOM parsing, or suppress this warning by setting searchPseudoElementsWarnings to false.'))}}}catch(e){a.e(e)}finally{a.f()}if(!r.size)return;var d=Array.from(r).join(", ");try{t=e.querySelectorAll(d)}catch(e){}}return new Promise(function(e,n){var r=et(t).filter(Jn).map(Un),a=mn("searchPseudoElements");_n(),Promise.all(r).then(function(){a(),Nn(),e()}).catch(function(){a(),Nn(),n()})})}}var Yn={hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=Xn,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node,n=void 0===t?P:t;Xe.searchPseudoElements&&Xn(n)}}},Kn=!1,Zn=function(e){return e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),r=n[0],a=n.slice(1).join("-");if(r&&"h"===a)return e.flipX=!0,e;if(r&&"v"===a)return e.flipY=!0,e;if(a=parseFloat(a),isNaN(a))return e;switch(r){case"grow":e.size=e.size+a;break;case"shrink":e.size=e.size-a;break;case"left":e.x=e.x-a;break;case"right":e.x=e.x+a;break;case"up":e.y=e.y-a;break;case"down":e.y=e.y+a;break;case"rotate":e.rotate=e.rotate+a}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},Gn={mixout:function(){return{parse:{transform:function(e){return Zn(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-transform");return n&&(e.transform=Zn(n)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,n=e.transform,r=e.containerWidth,a=e.iconWidth,o={transform:"translate(".concat(r/2," 256)")},i="translate(".concat(32*n.x,", ").concat(32*n.y,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),c={outer:o,inner:{transform:"".concat(i," ").concat(s," ").concat(l)},path:{transform:"translate(".concat(a/2*-1," -256)")}};return{tag:"g",attributes:y({},c.outer),children:[{tag:"g",attributes:y({},c.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:y(y({},t.icon.attributes),c.path)}]}]}}}},er={x:0,y:0,width:"100%",height:"100%"};function tr(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}var nr={hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-mask"),r=n?zt(n.split(" ").map(function(e){return e.trim()})):{prefix:null,iconName:null,rest:[]};return r.prefix||(r.prefix=It()),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var t,n=e.children,r=e.attributes,a=e.main,o=e.mask,i=e.maskId,s=e.transform,l=a.width,c=a.icon,u=o.width,f=o.icon,d=function(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,a={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(32*t.x,", ").concat(32*t.y,") "),i="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)");return{outer:a,inner:{transform:"".concat(o," ").concat(i," ").concat(s)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}({transform:s,containerWidth:u,iconWidth:l}),h={tag:"rect",attributes:y(y({},er),{},{fill:"white"})},m=c.children?{children:c.children.map(tr)}:{},p={tag:"g",attributes:y({},d.inner),children:[tr(y({tag:c.tag,attributes:y(y({},c.attributes),d.path)},m))]},g={tag:"g",attributes:y({},d.outer),children:[p]},v="mask-".concat(i||Ge()),b="clip-".concat(i||Ge()),w={tag:"mask",attributes:y(y({},er),{},{id:v,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[h,g]},x={tag:"defs",children:[{tag:"clipPath",attributes:{id:b},children:(t=f,"g"===t.tag?t.children:[t])},w]};return n.push(x,{tag:"rect",attributes:y({fill:"currentColor","clip-path":"url(#".concat(b,")"),mask:"url(#".concat(v,")")},er)}),{children:n,attributes:r}}}},rr={provides:function(e){var t=!1;E.matchMedia&&(t=E.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],n={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:y(y({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var a=y(y({},r),{},{attributeName:"opacity"}),o={tag:"circle",attributes:y(y({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||o.children.push({tag:"animate",attributes:y(y({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:y(y({},a),{},{values:"1;0;1;1;0;1;"})}),e.push(o),e.push({tag:"path",attributes:y(y({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:y(y({},a),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:y(y({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:y(y({},a),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}};!function(e,t){var n=t.mixoutsTo;Wt=e,Ut={},Object.keys(Jt).forEach(function(e){-1===Qt.indexOf(e)&&delete Jt[e]}),Wt.forEach(function(e){var t=e.mixout?e.mixout():{};if(Object.keys(t).forEach(function(e){"function"==typeof t[e]&&(n[e]=t[e]),"object"===j(t[e])&&Object.keys(t[e]).forEach(function(r){n[e]||(n[e]={}),n[e][r]=t[e][r]})}),e.hooks){var r=e.hooks();Object.keys(r).forEach(function(e){Ut[e]||(Ut[e]=[]),Ut[e].push(r[e])})}e.provides&&e.provides(Jt)})}([lt,An,In,Dn,Ln,Yn,{mixout:function(){return{dom:{unwatch:function(){_n(),Kn=!0}}}},hooks:function(){return{bootstrap:function(){Mn(qt("mutationObserverCallbacks",{}))},noAuto:function(){Sn&&Sn.disconnect()},watch:function(e){var t=e.observeMutationsRoot;Kn?Nn():Mn(qt("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},Gn,nr,rr,{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-symbol"),r=null!==n&&(""===n||n);return e.symbol=r,e}}}}],{mixoutsTo:en});var ar=en.config,or=en.parse,ir=en.icon;function sr(e){return function(e){return(e-=0)==e}(e)?e:(e=e.replace(/[_-]+(.)?/g,(e,t)=>t?t.toUpperCase():"")).charAt(0).toLowerCase()+e.slice(1)}function lr(e){return e.charAt(0).toUpperCase()+e.slice(1)}var cr=new Map;function ur(e){if(cr.has(e))return cr.get(e);const t={};let n=0;const r=e.length;for(;n<r;){const a=e.indexOf(";",n),o=-1===a?r:a,i=e.slice(n,o).trim();if(i){const e=i.indexOf(":");if(e>0){const n=i.slice(0,e).trim(),r=i.slice(e+1).trim();if(n&&r){const e=sr(n);t[e.startsWith("webkit")?lr(e):e]=r}}}n=o+1}if(1e3===cr.size){const e=cr.keys().next().value;e&&cr.delete(e)}return cr.set(e,t),t}var fr=function e(t,n,r={}){if("string"==typeof n)return n;const a=(n.children||[]).map(n=>e(t,n)),o=n.attributes||{},i={};for(const[e,t]of Object.entries(o))switch(!0){case"class"===e:i.className=t;break;case"style"===e:i.style=ur(String(t));break;case e.startsWith("aria-"):case e.startsWith("data-"):i[e.toLowerCase()]=t;break;default:i[sr(e)]=t}const{style:s,role:l,"aria-label":c,...u}=r;return s&&(i.style=i.style?{...i.style,...s}:s),l&&(i.role=l),c&&(i["aria-label"]=c,i["aria-hidden"]="false"),t(n.tag,{...u,...i},...a)}.bind(null,t.createElement),dr=(e,n)=>{const r=t.useId();return e||(n?r:void 0)};"undefined"!=typeof process&&process.env.FA_VERSION;var hr="searchPseudoElementsFullScan"in ar?"7.0.0":"6.0.0",mr=Number.parseInt(hr)>=7,pr="fa",gr="fa-beat",vr="fa-fade",br="fa-beat-fade",yr="fa-bounce",wr="fa-shake",xr="fa-spin",kr="fa-spin-pulse",jr="fa-spin-reverse",_r="fa-pulse",Nr={left:"fa-pull-left",right:"fa-pull-right"},Sr={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},Mr={"2xs":"fa-2xs",xs:"fa-xs",sm:"fa-sm",lg:"fa-lg",xl:"fa-xl","2xl":"fa-2xl","1x":"fa-1x","2x":"fa-2x","3x":"fa-3x","4x":"fa-4x","5x":"fa-5x","6x":"fa-6x","7x":"fa-7x","8x":"fa-8x","9x":"fa-9x","10x":"fa-10x"},Cr="fa-border",Tr="fa-fw",Rr="fa-flip",Or="fa-flip-horizontal",Er="fa-flip-vertical",Pr="fa-inverse",Fr="fa-rotate-by",Ar="fa-swap-opacity",Ir="fa-width-auto";function Dr(e){const t=ar.cssPrefix||ar.familyPrefix||pr;return t===pr?e:e.replace(new RegExp(String.raw`(?<=^|\s)${pr}-`,"g"),`${t}-`)}function Lr(e){if(e)return(e=>"object"==typeof e&&"icon"in e&&!!e.icon)(e)?e:or.icon(e)}var Br=new class{constructor(e="react-fontawesome"){this.enabled=!1;let t=!1;try{t="undefined"!=typeof process&&"development"===process.env.NODE_ENV}catch{}this.scope=e,this.enabled=t}log(...e){this.enabled&&console.log(`[${this.scope}]`,...e)}warn(...e){this.enabled&&console.warn(`[${this.scope}]`,...e)}error(...e){this.enabled&&console.error(`[${this.scope}]`,...e)}}("FontAwesomeIcon"),zr={border:!1,className:"",mask:void 0,maskId:void 0,fixedWidth:!1,inverse:!1,flip:!1,icon:void 0,listItem:!1,pull:void 0,pulse:!1,rotation:void 0,rotateBy:!1,size:void 0,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:void 0,transform:void 0,swapOpacity:!1,widthAuto:!1},$r=new Set(Object.keys(zr)),Vr=t.forwardRef((e,t)=>{const n={...zr,...e},{icon:r,mask:a,symbol:o,title:i,titleId:s,maskId:l,transform:c}=n,u=dr(l,Boolean(a)),f=dr(s,Boolean(i)),d=Lr(r);if(!d)return Br.error("Icon lookup is undefined",r),null;const h=function(e){const{beat:t,fade:n,beatFade:r,bounce:a,shake:o,spin:i,spinPulse:s,spinReverse:l,pulse:c,fixedWidth:u,inverse:f,border:d,flip:h,size:m,rotation:p,pull:g,swapOpacity:v,rotateBy:b,widthAuto:y,className:w}=e,x=[];return w&&x.push(...w.split(" ")),t&&x.push(gr),n&&x.push(vr),r&&x.push(br),a&&x.push(yr),o&&x.push(wr),i&&x.push(xr),l&&x.push(jr),s&&x.push(kr),c&&x.push(_r),u&&x.push(Tr),f&&x.push(Pr),d&&x.push(Cr),!0===h&&x.push(Rr),"horizontal"!==h&&"both"!==h||x.push(Or),"vertical"!==h&&"both"!==h||x.push(Er),null!=m&&x.push(Mr[m]),null!=p&&0!==p&&x.push(Sr[p]),null!=g&&x.push(Nr[g]),v&&x.push(Ar),mr?(b&&x.push(Fr),y&&x.push(Ir),(ar.cssPrefix||ar.familyPrefix||pr)===pr?x:x.map(Dr)):x}(n),m="string"==typeof c?or.transform(c):c,p=Lr(a),g=ir(d,{...h.length>0&&{classes:h},...m&&{transform:m},...p&&{mask:p},symbol:o,title:i,titleId:f,maskId:u});if(!g)return Br.error("Could not find icon",d),null;const{abstract:v}=g,b={ref:t};for(const e of(y=n,Object.keys(y)))$r.has(e)||(b[e]=n[e]);var y;return fr(v[0],b)});Vr.displayName="FontAwesomeIcon";var Hr={box:"Box-module_box__SQLj3",collapseBox:"Box-module_collapseBox__5A5Fc",padding:"Box-module_padding__dIJ-L",collapsedContent:"Box-module_collapsedContent__yn-0g",collapseTitle:"Box-module_collapseTitle__-R0ge",collapseIcon:"Box-module_collapseIcon__OAiTO",collapsed:"Box-module_collapsed__nf76f"};h.bind(Hr);const Wr=Symbol("BrandTag");const Ur=new class{constructor(e){this[Wr]=e}}("unit"),Jr=e=>null==e;function Qr(e,t){return void 0!==t?e(t):e}function qr(e){if(function(e,t){return"object"==typeof e&&null!==e&&t in e}(e,"toString")&&"function"==typeof e.toString){const t=e.toString();return"string"==typeof t?t:JSON.stringify(e)}return JSON.stringify(e)}const Xr="Ok",Yr="Err";class Kr{constructor(e){this.repr=e}static ok(e){return Jr(e)?new Kr(["Ok",Ur]):new Kr(["Ok",e])}static err(e){return Jr(e)?new Kr(["Err",Ur]):new Kr(["Err",e])}get variant(){return this.repr[0]}get value(){if(this.repr[0]===Yr)throw new Error("Cannot get the value of Err");return this.repr[1]}get error(){if(this.repr[0]===Xr)throw new Error("Cannot get the error of Ok");return this.repr[1]}get isOk(){return this.repr[0]===Xr}get isErr(){return this.repr[0]===Yr}map(e){return function(e,t){const n=t=>t.isOk?Zr(e(t.value)):t;return Qr(n,t)}(e,this)}mapOr(e,t){return function(e,t,n){function r(t,n){return n.isOk?t(n.value):e}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}(e,t,this)}mapOrElse(e,t){return ea(e,t,this)}match(e){return function(e,t){const n=t=>ea(e.Err,e.Ok,t);return Qr(n,t)}(e,this)}mapErr(e){return function(e,t){const n=t=>t.isOk?t:Gr(e(t.error));return Qr(n,t)}(e,this)}or(e){return function(e,t){const n=t=>t.isOk?Zr(t.value):e;return Qr(n,t)}(e,this)}orElse(e){return function(e,t){const n=t=>t.isOk?Zr(t.value):e(t.error);return Qr(n,t)}(e,this)}and(e){return function(e,t){const n=t=>t.isOk?e:Gr(t.error);return Qr(n,t)}(e,this)}andThen(e){return function(e,t){const n=t=>t.isOk?e(t.value):Gr(t.error);return Qr(n,t)}(e,this)}unwrapOr(e){return function(e,t){const n=t=>t.isOk?t.value:e;return Qr(n,t)}(e,this)}unwrapOrElse(e){return function(e,t){const n=t=>t.isOk?t.value:e(t.error);return Qr(n,t)}(e,this)}toMaybe(){return(e=this).isOk?ha.just(e.value):ha.nothing();var e}toString(){return ta(this)}toJSON(){return na(this)}equals(e){return t=e,void 0!==(n=this)?n.match({Err:()=>t.isErr,Ok:e=>t.isOk&&t.value===e}):e=>e.match({Err:()=>t.isErr,Ok:e=>t.isOk&&t.value===e});var t,n}ap(e){return function(e,t){const n=t=>t.andThen(t=>e.map(e=>e(t)));return Qr(n,t)}(this,e)}}const Zr=Kr.ok,Gr=Kr.err;function ea(e,t,n){function r(t,n){return n.isOk?t(n.value):e(n.error)}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}const ta=e=>{const t=e.match({Ok:qr,Err:qr});return`${e.variant.toString()}(${t})`},na=e=>e.isOk?{variant:e.variant,value:e.value}:{variant:e.variant,error:e.error};const ra=Kr,aa="Just",oa="Nothing";let ia;class sa{constructor(e){if(Jr(e))return this.repr=[oa],ia||(ia=this),ia;this.repr=[aa,e]}static of(e){return new sa(e)}static just(e){if(Jr(e))throw new Error(`attempted to call "just" with ${e}`);return new sa(e)}static nothing(e){return new sa}get variant(){return this.repr[0]}get value(){if(this.repr[0]===oa)throw new Error("Cannot get the value of `Nothing`");return this.repr[1]}get isJust(){return this.repr[0]===aa}get isNothing(){return this.repr[0]===oa}map(e){return function(e,t){const n=t=>t.isJust?la(e(t.value)):ca();return Qr(n,t)}(e,this)}mapOr(e,t){return function(e,t,n){function r(t,n){return n.isJust?t(n.value):e}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}(e,t,this)}mapOrElse(e,t){return ua(e,t,this)}match(e){return function(e,t){const n=t=>ua(e.Nothing,e.Just,t);return Qr(n,t)}(e,this)}or(e){return function(e,t){const n=t=>t.isJust?t:e;return void 0!==t?n(t):n}(e,this)}orElse(e){return function(e,t){const n=t=>t.isJust?t:e();return Qr(n,t)}(e,this)}and(e){return function(e,t){const n=t=>t.isJust?e:ca();return Qr(n,t)}(e,this)}andThen(e){return fa(e,this)}unwrapOr(e){return function(e,t){const n=t=>t.isJust?t.value:e;return Qr(n,t)}(e,this)}unwrapOrElse(e){return function(e,t){const n=t=>t.isJust?t.value:e();return Qr(n,t)}(e,this)}toOkOrErr(e){return function(e,t){const n=t=>t.isJust?ra.ok(t.value):ra.err(e);return void 0!==t?n(t):n}(e,this)}toOkOrElseErr(e){return function(e,t){return Qr(t=>t.isJust?ra.ok(t.value):ra.err(e()),t)}(e,this)}toString(){return function(e){const t=e.map(e=>`(${qr(e)})`).unwrapOr("");return`${e.variant}${t}`}(this)}toJSON(){return(e=this).isJust?{variant:e.variant,value:da(e.value)?e.value.toJSON():e.value}:{variant:e.variant};var e}equals(e){return t=e,Qr(e=>e.match({Just:e=>t.isJust&&t.value===e,Nothing:()=>t.isNothing}),this);var t}ap(e){return function(e,t){const n=t=>t.andThen(t=>e.map(e=>e(t)));return Qr(n,t)}(this,e)}get(e){return function(e,t){return Qr(fa(function(e,t){const n=t=>ha.of(t[e]);return Qr(n,t)}(e)),t)}(e,this)}}const la=sa.just,ca=sa.nothing;function ua(e,t,n){function r(t,n){return n.isJust?t(n.value):e()}function a(e,t){return void 0!==t?r(e,t):t=>r(e,t)}return void 0===t?a:void 0===n?a(t):a(t,n)}function fa(e,t){const n=t=>t.isJust?e(t.value):ca();return void 0!==t?n(t):n}function da(e){return e instanceof ha}const ha=sa,ma=["dotnetspy","ebpfspy","gospy","phpspy","pyspy","rbspy","nodespy","javaspy","pyroscope-rs","scrape","tracing","unknown"],pa=n.z.preprocess(e=>e&&ma.includes(e)?e:"unknown",n.z.enum(ma).default("unknown")),ga=["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions"],va=n.z.preprocess(e=>"string"==typeof e&&ga.includes(e)?e:"unknown",n.z.enum(["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions","unknown"])),ba=n.z.object({names:n.z.array(n.z.preprocess(e=>e||"unknown",n.z.string().min(1))),levels:n.z.array(n.z.array(n.z.number())),numTicks:n.z.number(),maxSelf:n.z.number()}),ya=n.z.object({appName:n.z.string().optional(),name:n.z.string().optional(),startTime:n.z.number().optional(),endTime:n.z.number().optional(),query:n.z.string().optional(),maxNodes:n.z.number().optional(),format:n.z.enum(["single","double"]),sampleRate:n.z.number(),spyName:pa,units:va});n.z.object({version:n.z.number().min(1).max(1).default(1),flamebearer:ba,metadata:ya,leftTicks:n.z.number().optional(),rightTicks:n.z.number().optional()});const wa={format:"single",jStep:4,jName:3,getBarOffset:(e,t)=>e[t],getBarTotal:(e,t)=>e[t+1],getBarTotalDiff:(e,t)=>0,getBarSelf:(e,t)=>e[t+2],getBarSelfDiff:(e,t)=>0,getBarName:(e,t)=>e[t+3]},xa={format:"double",jStep:7,jName:6,getBarOffset:(e,t)=>e[t]+e[t+3],getBarTotal:(e,t)=>e[t+4]+e[t+1],getBarTotalLeft:(e,t)=>e[t+1],getBarTotalRght:(e,t)=>e[t+4],getBarTotalDiff:(e,t)=>e[t+4]-e[t+1],getBarSelf:(e,t)=>e[t+5]+e[t+2],getBarSelfLeft:(e,t)=>e[t+2],getBarSelfRght:(e,t)=>e[t+5],getBarSelfDiff:(e,t)=>e[t+5]-e[t+2],getBarName:(e,t)=>e[t+6]};function ka(e){switch(e){case"single":return wa;case"double":return xa;default:throw new Error(`Unsupported type: '${e}'`)}}const ja=n.z.object({refType:n.z.string(),traceID:n.z.string(),spanID:n.z.string()}),_a=n.z.object({key:n.z.string(),type:n.z.string(),value:n.z.union([n.z.boolean(),n.z.number(),n.z.string()])}),Na=n.z.object({traceID:n.z.string(),spanID:n.z.string(),flags:n.z.string(),operationName:n.z.string(),references:n.z.array(ja),startTime:n.z.number(),duration:n.z.number(),tags:n.z.array(_a),logs:n.z.object({timestamp:n.z.number(),fields:n.z.array(_a)}),processID:n.z.string(),warnings:n.z.any()}),Sa=n.z.object({serviceName:n.z.string(),tags:n.z.array(_a)});n.z.object({traceID:n.z.string(),spans:n.z.array(Na),processes:n.z.record(Sa),warnings:n.z.any()});const Ma=n.z.object({watermark:n.z.object({}).optional(),startTime:n.z.number(),samples:n.z.array(n.z.number()),durationDelta:n.z.number()});n.z.record(n.z.string(),Ma);const Ca=22,Ta=21.5;function Ra(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Oa(e){if(null==e)return null;if("number"==typeof e)return{value:e,unit:"",hasLessThan:!1,sign:""};let t=String(e).trim().replace(/\u2212/g,"-");if(!t)return null;let n=!1;t.startsWith("<")&&(n=!0,t=t.slice(1).trim());const r=t.match(/^([+\-]?)(\d*\.?\d+)\s*(.*)$/);if(!r)return null;const a=r[1]||"",o=r[2],i=(r[3]||"").trim(),s=parseFloat(o);return Number.isFinite(s)?{value:s,unit:i,hasLessThan:n,sign:a}:null}function Ea(e,t=!1){if(!e||!t)return e;const n=Oa(e);if(!n)return e;const{unit:r}=n;let a=r;const o=r.toLowerCase();"ms"===o?a="毫秒":"μs"===o||"µs"===o||"us"===o?a="微秒":"second"===o||"seconds"===o?a="秒":"minute"===o||"minutes"===o||"min"===o||"mins"===o?a="分钟":"hour"===o||"hours"===o?a="小时":"day"===o||"days"===o?a="天":"month"===o||"months"===o?a="月":"year"!==o&&"years"!==o||(a="年");const i=String(e).match(/^([<\s]*)([+\-]?\d*\.?\d+)(.*)$/);if(!i)return e;return`${i[1]||""}${i[2]||""} ${a}`.trim()}const Pa=[{value:1e15,label:"Quad"},{value:1e12,label:"Tri"},{value:1e9,label:"B"},{value:1e6,label:"M"},{value:1e3,label:"K"}];function Fa(e){return Math.round(1e4*e)/100}function Aa(e,t){return(t-e)/e*100}function Ia(e,t,n){switch(n){case"samples":return new Da(e/t);case"objects":case"goroutines":case"lock_samples":case"exceptions":return new Ba(e);case"bytes":return new za(e);case"lock_nanoseconds":return new La(e);case"trace_samples":return new Da(e/t,"",!0);default:return console.warn(`Unsupported unit: '${n}'. Defaulting to ''`),new Da(e/t," ")}}class Da{constructor(e,t,n){this.divider=1,this.enableSubsecondPrecision=!1,this.suffix="second",this.durations=[[60,"minute"],[60,"hour"],[24,"day"],[30,"month"],[12,"year"]],this.units="",n&&(this.enableSubsecondPrecision=n,this.durations=[[1e3,"ms"],[1e3,"second"],...this.durations],this.suffix="μs",e*=1e6),this.units=t||"";for(let t=0;t<this.durations.length;t++){const n=this.durations[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e,t,n=!0){this.enableSubsecondPrecision&&(t/=1e6);const r=e/t/this.divider;let a=r.toFixed(2);return 0===r?a="0.00":(r>=0&&r<.01||r<=0&&r>-.01)&&(a="< 0.01"),n?`${a} ${this.units||`${this.suffix}${1===r||2===this.suffix.length?"":"s"}`}`:a}formatPrecise(e,t){this.enableSubsecondPrecision&&(t/=1e6);const n=e/t/this.divider;return`${parseFloat(n.toFixed(5))} ${this.units||`${this.suffix}${1===n||2===this.suffix.length?"":"s"}`}`}}class La{constructor(e){this.divider=1,this.multiplier=1,this.suffix="second",this.durations=[[60,"minute"],[60,"hour"],[24,"day"],[30,"month"],[12,"year"]],e/=1e9;for(let t=0;t<this.durations.length;t++){const n=this.durations[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e){const t=e/1e9/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}${1===t?"":"s"}`}formatPrecise(e){const t=e/1e9/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}${1===t?"":"s"}`}}class Ba{constructor(e){this.divider=1,this.suffix="",this.objects=[[1e3,"K"],[1e3,"M"],[1e3,"G"],[1e3,"T"],[1e3,"P"]];for(let t=0;t<this.objects.length;t++){const n=this.objects[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;this.divider*=n[0],e/=n[0],this.suffix=n[1]}}format(e){const t=e/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}`}formatPrecise(e){const t=e/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}`}}class za{constructor(e){this.divider=1,this.suffix="bytes",this.bytes=[[1024,"KB"],[1024,"MB"],[1024,"GB"],[1024,"TB"],[1024,"PB"]];for(let t=0;t<this.bytes.length;t++){const n=this.bytes[t];if(!n){console.warn("Could not calculate level");break}if(!(e>=n[0]))break;{this.divider*=n[0],e/=n[0];const t=n[1];t?this.suffix=t:(console.warn("Could not calculate suffix"),this.suffix="")}}}format(e){const t=e/this.divider;let n=t.toFixed(2);return(t>=0&&t<.01||t<=0&&t>-.01)&&(n="< 0.01"),`${n} ${this.suffix}`}formatPrecise(e){const t=e/this.divider;return`${parseFloat(t.toFixed(5))} ${this.suffix}`}}const $a="TAIL",Va="HEAD";function Ha({mode:e,charSize:t,rectWidth:n,fullText:r,shortText:a}){if(e===$a){if(t*r.length<=n)return{mode:e,text:r,marginLeft:3};const o=t*a.length;return o<=n?{mode:e,text:a,marginLeft:3}:{mode:e,text:a,marginLeft:-(o-n+3)}}return{mode:e,text:r,marginLeft:3}}function Wa(e){return e===$a?{direction:"rtl",overflow:"hidden",textOverflow:"ellipsis"}:{overflow:"hidden",textOverflow:"ellipsis"}}const Ua={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]};for(const e in Ua)Object.freeze(Ua[e]);var Ja=Object.freeze(Ua);const Qa=Object.create(null);for(const e in Ja)Object.hasOwn(Ja,e)&&(Qa[Ja[e]]=e);const qa={to:{},get:{}};function Xa(e,t,n){return Math.min(Math.max(t,e),n)}function Ya(e){const t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}qa.get=function(e){let t,n;switch(e.slice(0,3).toLowerCase()){case"hsl":t=qa.get.hsl(e),n="hsl";break;case"hwb":t=qa.get.hwb(e),n="hwb";break;default:t=qa.get.rgb(e),n="rgb"}return t?{model:n,value:t}:null},qa.get.rgb=function(e){if(!e)return null;let t,n,r,a=[0,0,0,1];if(t=e.match(/^#([a-f\d]{6})([a-f\d]{2})?$/i)){for(r=t[2],t=t[1],n=0;n<3;n++){const e=2*n;a[n]=Number.parseInt(t.slice(e,e+2),16)}r&&(a[3]=Number.parseInt(r,16)/255)}else if(t=e.match(/^#([a-f\d]{3,4})$/i)){for(t=t[1],r=t[3],n=0;n<3;n++)a[n]=Number.parseInt(t[n]+t[n],16);r&&(a[3]=Number.parseInt(r+r,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i)){for(n=0;n<3;n++)a[n]=Number.parseFloat(t[n+1]);t[4]&&(a[3]=t[5]?.01*Number.parseFloat(t[4]):Number.parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i)))return(t=e.toLowerCase().match(/^(\w+)$/))?"transparent"===t[1]?[0,0,0,0]:Object.hasOwn(Ja,t[1])?(a=Ja[t[1]].slice(),a[3]=1,a):null:null;for(n=0;n<3;n++)a[n]=Math.round(2.55*Number.parseFloat(t[n+1]));t[4]&&(a[3]=t[5]?.01*Number.parseFloat(t[4]):Number.parseFloat(t[4]))}for(n=0;n<3;n++)a[n]=Xa(a[n],0,255);return a[3]=Xa(a[3],0,1),a},qa.get.hsl=function(e){if(!e)return null;const 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*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){const e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,Xa(Number.parseFloat(t[2]),0,100),Xa(Number.parseFloat(t[3]),0,100),Xa(Number.isNaN(e)?1:e,0,1)]}return null},qa.get.hwb=function(e){if(!e)return null;const t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){const e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,Xa(Number.parseFloat(t[2]),0,100),Xa(Number.parseFloat(t[3]),0,100),Xa(Number.isNaN(e)?1:e,0,1)]}return null},qa.to.hex=function(...e){return"#"+Ya(e[0])+Ya(e[1])+Ya(e[2])+(e[3]<1?Ya(Math.round(255*e[3])):"")},qa.to.rgb=function(...e){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]+")"},qa.to.rgb.percent=function(...e){const 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]+")"},qa.to.hsl=function(...e){return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},qa.to.hwb=function(...e){let t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},qa.to.keyword=function(...e){return Qa[e.slice(0,3)]};const Ka={};for(const e of Object.keys(Ja))Ka[Ja[e]]=e;const Za={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"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},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"]}},Ga=(6/29)**3;function eo(e){const t=e>.0031308?1.055*e**(1/2.4)-.055:12.92*e;return Math.min(Math.max(0,t),1)}function to(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}for(const e of Object.keys(Za)){if(!("channels"in Za[e]))throw new Error("missing channels property: "+e);if(!("labels"in Za[e]))throw new Error("missing channel labels property: "+e);if(Za[e].labels.length!==Za[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=Za[e];delete Za[e].channels,delete Za[e].labels,Object.defineProperty(Za[e],"channels",{value:t}),Object.defineProperty(Za[e],"labels",{value:n})}function no(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}function ro(e){const t=function(){const e={},t=Object.keys(Za);for(let{length:n}=t,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length>0;){const e=n.pop(),r=Object.keys(Za[e]);for(let{length:a}=r,o=0;o<a;o++){const a=r[o],i=t[a];-1===i.distance&&(i.distance=t[e].distance+1,i.parent=e,n.unshift(a))}}return t}function ao(e,t){return function(n){return t(e(n))}}function oo(e,t){const n=[t[e].parent,e];let r=Za[t[e].parent][e],a=t[e].parent;for(;t[a].parent;)n.unshift(t[a].parent),r=ao(Za[t[a].parent][a],r),a=t[a].parent;return r.conversion=n,r}function io(e){const t=ro(e),n={},r=Object.keys(t);for(let{length:e}=r,a=0;a<e;a++){const e=r[a];null!==t[e].parent&&(n[e]=oo(e,t))}return n}Za.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=o-a;let s,l;switch(o){case a:s=0;break;case t:s=(n-r)/i;break;case n:s=2+(r-t)/i;break;case r:s=4+(t-n)/i}s=Math.min(60*s,360),s<0&&(s+=360);const c=(a+o)/2;return l=o===a?0:c<=.5?i/(o+a):i/(2-o-a),[s,100*l,100*c]},Za.rgb.hsv=function(e){let t,n,r,a,o;const i=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(i,s,l),u=c-Math.min(i,s,l),f=function(e){return(c-e)/6/u+.5};if(0===u)a=0,o=0;else{switch(o=u/c,t=f(i),n=f(s),r=f(l),c){case i:a=r-n;break;case s:a=1/3+t-r;break;case l:a=2/3+n-t}a<0?a+=1:a>1&&(a-=1)}return[360*a,100*o,100*c]},Za.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const a=Za.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)),[a,100*o,100*r]},Za.rgb.oklab=function(e){const t=to(e[0]/255),n=to(e[1]/255),r=to(e[2]/255),a=Math.cbrt(.4122214708*t+.5363325363*n+.0514459929*r),o=Math.cbrt(.2119034982*t+.6806995451*n+.1073969566*r),i=Math.cbrt(.0883024619*t+.2817188376*n+.6299787005*r);return[100*(.2104542553*a+.793617785*o-.0040720468*i),100*(1.9779984951*a-2.428592205*o+.4505937099*i),100*(.0259040371*a+.7827717662*o-.808675766*i)]},Za.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(1-t,1-n,1-r);return[100*((1-t-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*((1-r-a)/(1-a)||0),100*a]},Za.rgb.keyword=function(e){const t=Ka[e];if(t)return t;let n,r=Number.POSITIVE_INFINITY;for(const t of Object.keys(Ja)){const a=no(e,Ja[t]);a<r&&(r=a,n=t)}return n},Za.keyword.rgb=function(e){return[...Ja[e]]},Za.rgb.xyz=function(e){const t=to(e[0]/255),n=to(e[1]/255),r=to(e[2]/255);return[100*(.4124564*t+.3575761*n+.1804375*r),100*(.2126729*t+.7151522*n+.072175*r),100*(.0193339*t+.119192*n+.9503041*r)]},Za.rgb.lab=function(e){const t=Za.rgb.xyz(e);let n=t[0],r=t[1],a=t[2];n/=95.047,r/=100,a/=108.883,n=n>Ga?n**(1/3):7.787*n+16/116,r=r>Ga?r**(1/3):7.787*r+16/116,a=a>Ga?a**(1/3):7.787*a+16/116;return[116*r-16,500*(n-r),200*(r-a)]},Za.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let a,o;if(0===n)return o=255*r,[o,o,o];const i=r<.5?r*(1+n):r+n-r*n,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},Za.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,a=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,a*=o<=1?o:2-o;return[t,100*(0===r?2*a/(o+a):2*n/(r+n)),100*((r+n)/2)]},Za.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const a=Math.floor(t)%6,o=t-Math.floor(t),i=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,a){case 0:return[r,l,i];case 1:return[s,r,i];case 2:return[i,r,l];case 3:return[i,s,r];case 4:return[l,i,r];case 5:return[r,i,s]}},Za.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,a=Math.max(r,.01);let o,i;i=(2-n)*r;const s=(2-n)*a;return o=n*a,o/=s<=1?s:2-s,o=o||0,i/=2,[t,100*o,100*i]},Za.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const a=n+r;let o;a>1&&(n/=a,r/=a);const i=Math.floor(6*t),s=1-r;o=6*t-i,1&i&&(o=1-o);const l=n+o*(s-n);let c,u,f;switch(i){default:case 6:case 0:c=s,u=l,f=n;break;case 1:c=l,u=s,f=n;break;case 2:c=n,u=s,f=l;break;case 3:c=n,u=l,f=s;break;case 4:c=l,u=n,f=s;break;case 5:c=s,u=n,f=l}return[255*c,255*u,255*f]},Za.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=e[3]/100;return[255*(1-Math.min(1,t*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a))]},Za.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let a,o,i;return a=3.2404542*t+-1.5371385*n+-.4985314*r,o=-.969266*t+1.8760108*n+.041556*r,i=.0556434*t+-.2040259*n+1.0572252*r,a=eo(a),o=eo(o),i=eo(i),[255*a,255*o,255*i]},Za.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>Ga?t**(1/3):7.787*t+16/116,n=n>Ga?n**(1/3):7.787*n+16/116,r=r>Ga?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},Za.xyz.oklab=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=Math.cbrt(.8189330101*t+.3618667424*n-.1288597137*r),o=Math.cbrt(.0329845436*t+.9293118715*n+.0361456387*r),i=Math.cbrt(.0482003018*t+.2643662691*n+.633851707*r);return[100*(.2104542553*a+.793617785*o-.0040720468*i),100*(1.9779984951*a-2.428592205*o+.4505937099*i),100*(.0259040371*a+.7827717662*o-.808675766*i)]},Za.oklab.oklch=function(e){return Za.lab.lch(e)},Za.oklab.xyz=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=(.999999998*t+.396337792*n+.215803758*r)**3,o=(1.000000008*t-.105561342*n-.063854175*r)**3,i=(1.000000055*t-.089484182*n-1.291485538*r)**3;return[100*(1.227013851*a-.55779998*o+.281256149*i),100*(-.040580178*a+1.11225687*o-.071676679*i),100*(-.076381285*a-.421481978*o+1.58616322*i)]},Za.oklab.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,a=(t+.3963377774*n+.2158037573*r)**3,o=(t-.1055613458*n-.0638541728*r)**3,i=(t-.0894841775*n-1.291485548*r)**3;return[255*eo(4.0767416621*a-3.3077115913*o+.2309699292*i),255*eo(-1.2684380046*a+2.6097574011*o-.3413193965*i),255*eo(-.0041960863*a-.7034186147*o+1.707614701*i)]},Za.oklch.oklab=function(e){return Za.lch.lab(e)},Za.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const a=n**3,o=t**3,i=r**3;return n=a>Ga?a:(n-16/116)/7.787,t=o>Ga?o:(t-16/116)/7.787,r=i>Ga?i:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},Za.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let a;a=360*Math.atan2(r,n)/2/Math.PI,a<0&&(a+=360);return[t,Math.sqrt(n*n+r*r),a]},Za.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)]},Za.rgb.ansi16=function(e,t=null){const[n,r,a]=e;let o=null===t?Za.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let i=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return 2===o&&(i+=60),i},Za.hsv.ansi16=function(e){return Za.rgb.ansi16(Za.hsv.rgb(e),e[2])},Za.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t>>4==n>>4&&n>>4==r>>4)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)},Za.ansi16.rgb=function(e){let t=(e=e[0])%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(Math.trunc(e>50)+1);return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},Za.ansi256.rgb=function(e){if((e=e[0])>=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]},Za.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".slice(t.length)+t},Za.hex.rgb=function(e){const t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=[...n].map(e=>e+e).join(""));const r=Number.parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},Za.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),i=a-o;let s;return s=i<=0?0:a===t?(n-r)/i%6:a===n?2+(r-t)/i:4+(t-n)/i,s/=6,s%=1,[360*s,100*i,100*(i<1?o/(1-i):0)]},Za.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let a=0;return r<1&&(a=(n-.5*r)/(1-r)),[e[0],100*r,100*a]},Za.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},Za.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 a=[0,0,0],o=t%1*6,i=o%1,s=1-i;let l=0;switch(Math.floor(o)){case 0:a[0]=1,a[1]=i,a[2]=0;break;case 1:a[0]=s,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=i;break;case 3:a[0]=0,a[1]=s,a[2]=1;break;case 4:a[0]=i,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=s}return l=(1-n)*r,[255*(n*a[0]+l),255*(n*a[1]+l),255*(n*a[2]+l)]},Za.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]},Za.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]},Za.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)]},Za.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},Za.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},Za.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},Za.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},Za.gray.hsl=function(e){return[0,0,e[0]]},Za.gray.hsv=Za.gray.hsl,Za.gray.hwb=function(e){return[0,100,e[0]]},Za.gray.cmyk=function(e){return[0,0,0,e[0]]},Za.gray.lab=function(e){return[e[0],0,0]},Za.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(n.length)+n},Za.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const so={},lo=Object.keys(Za);function co(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}function uo(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{length:e}=r,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}for(const e of lo){so[e]={},Object.defineProperty(so[e],"channels",{value:Za[e].channels}),Object.defineProperty(so[e],"labels",{value:Za[e].labels});const t=io(e),n=Object.keys(t);for(const r of n){const n=t[r];so[e][r]=uo(n),so[e][r].raw=co(n)}}const fo=["keyword","gray","hex"],ho={};for(const e of Object.keys(so))ho[[...so[e].labels].sort().join("")]=e;const mo={};function po(e,t){if(!(this instanceof po))return new po(e,t);if(t&&t in fo&&(t=null),t&&!(t in so))throw new Error("Unknown model: "+t);let n,r;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof po)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){const t=qa.get(e);if(null===t)throw new Error("Unable to parse color from string: "+e);this.model=t.model,r=so[this.model].channels,this.color=t.value.slice(0,r),this.valpha="number"==typeof t.value[r]?t.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=so[this.model].channels;const n=Array.prototype.slice.call(e,0,r);this.color=yo(n,r),this.valpha="number"==typeof e[r]?e[r]: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 ho))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=ho[r];const{labels:a}=so[this.model],o=[];for(n=0;n<a.length;n++)o.push(e[a[n]]);this.color=yo(o)}if(mo[this.model])for(r=so[this.model].channels,n=0;n<r;n++){const e=mo[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)}po.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in qa.to?this:this.rgb();t=t.round("number"==typeof e?e:1);const n=1===t.valpha?t.color:[...t.color,this.valpha];return qa.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 qa.to.rgb.percent(...n)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=so[this.model],{labels:n}=so[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 po([...this.color.map(go(e)),this.valpha],this.model)},alpha(e){return void 0!==e?new po([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:vo("rgb",0,bo(255)),green:vo("rgb",1,bo(255)),blue:vo("rgb",2,bo(255)),hue:vo(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:vo("hsl",1,bo(100)),lightness:vo("hsl",2,bo(100)),saturationv:vo("hsv",1,bo(100)),value:vo("hsv",2,bo(100)),chroma:vo("hcg",1,bo(100)),gray:vo("hcg",2,bo(100)),white:vo("hwb",1,bo(100)),wblack:vo("hwb",2,bo(100)),cyan:vo("cmyk",0,bo(100)),magenta:vo("cmyk",1,bo(100)),yellow:vo("cmyk",2,bo(100)),black:vo("cmyk",3,bo(100)),x:vo("xyz",0,bo(95.047)),y:vo("xyz",1,bo(100)),z:vo("xyz",2,bo(108.833)),l:vo("lab",0,bo(100)),a:vo("lab",1),b:vo("lab",2),keyword(e){return void 0!==e?new po(e):so[this.model].keyword(this.color)},hex(e){return void 0!==e?new po(e):qa.to.hex(...this.rgb().round().color)},hexa(e){if(void 0!==e)return new po(e);const t=this.rgb().round().color;let n=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===n.length&&(n="0"+n),qa.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 po.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(),a=void 0===t?.5:t,o=2*a-1,i=n.alpha()-r.alpha(),s=((o*i===-1?o:(o+i)/(1+o*i))+1)/2,l=1-s;return po.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*a+r.alpha()*(1-a))}};for(const e of Object.keys(so)){if(fo.includes(e))continue;const{channels:t}=so[e];po.prototype[e]=function(...t){return this.model===e?new po(this):t.length>0?new po(t,e):new po([...(n=so[this.model][e].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],e);var n},po[e]=function(...n){let r=n[0];return"number"==typeof r&&(r=yo(n,t)),new po(r,e)}}function go(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function vo(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(mo[r]||=[])[t]=n;return e=e[0],function(r){let a;return void 0!==r?(n&&(r=n(r)),a=this[e](),a.color[t]=r,a):(a=this[e]().color[t],n&&(a=n(a)),a)}}function bo(e){return function(t){return Math.max(0,Math.min(e,t))}}function yo(e,t){for(let n=0;n<t;n++)"number"!=typeof e[n]&&(e[n]=0);return e}function wo(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function xo(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ko(e){let t,n,r;function a(e,r,a=0,o=e.length){if(a<o){if(0!==t(r,r))return o;do{const t=a+o>>>1;n(e[t],r)<0?a=t+1:o=t}while(a<o)}return a}return 2!==e.length?(t=wo,n=(t,n)=>wo(e(t),n),r=(t,n)=>e(t)-n):(t=e===wo||e===xo?e:jo,n=e,r=e),{left:a,center:function(e,t,n=0,o=e.length){const i=a(e,t,n,o-1);return i>n&&r(e[i-1],t)>-r(e[i],t)?i-1:i},right:function(e,r,a=0,o=e.length){if(a<o){if(0!==t(r,r))return o;do{const t=a+o>>>1;n(e[t],r)<=0?a=t+1:o=t}while(a<o)}return a}}}function jo(){return 0}const _o=ko(wo).right;ko(function(e){return null===e?NaN:+e}).center;const No=Math.sqrt(50),So=Math.sqrt(10),Mo=Math.sqrt(2);function Co(e,t,n){const r=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(r)),o=r/Math.pow(10,a),i=o>=No?10:o>=So?5:o>=Mo?2:1;let s,l,c;return a<0?(c=Math.pow(10,-a)/i,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,a)*i,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Co(e,t,2*n):[s,l,c]}function To(e,t,n){return Co(e=+e,t=+t,n=+n)[2]}function Ro(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Oo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Eo(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Po(){}var Fo=.7,Ao=1/Fo,Io="\\s*([+-]?\\d+)\\s*",Do="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Bo=/^#([0-9a-f]{3,8})$/,zo=new RegExp(`^rgb\\(${Io},${Io},${Io}\\)$`),$o=new RegExp(`^rgb\\(${Lo},${Lo},${Lo}\\)$`),Vo=new RegExp(`^rgba\\(${Io},${Io},${Io},${Do}\\)$`),Ho=new RegExp(`^rgba\\(${Lo},${Lo},${Lo},${Do}\\)$`),Wo=new RegExp(`^hsl\\(${Do},${Lo},${Lo}\\)$`),Uo=new RegExp(`^hsla\\(${Do},${Lo},${Lo},${Do}\\)$`),Jo={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Qo(){return this.rgb().formatHex()}function qo(){return this.rgb().formatRgb()}function Xo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Bo.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Yo(t):3===n?new Go(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ko(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ko(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=zo.exec(e))?new Go(t[1],t[2],t[3],1):(t=$o.exec(e))?new Go(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Vo.exec(e))?Ko(t[1],t[2],t[3],t[4]):(t=Ho.exec(e))?Ko(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Wo.exec(e))?oi(t[1],t[2]/100,t[3]/100,1):(t=Uo.exec(e))?oi(t[1],t[2]/100,t[3]/100,t[4]):Jo.hasOwnProperty(e)?Yo(Jo[e]):"transparent"===e?new Go(NaN,NaN,NaN,0):null}function Yo(e){return new Go(e>>16&255,e>>8&255,255&e,1)}function Ko(e,t,n,r){return r<=0&&(e=t=n=NaN),new Go(e,t,n,r)}function Zo(e,t,n,r){return 1===arguments.length?function(e){return e instanceof Po||(e=Xo(e)),e?new Go((e=e.rgb()).r,e.g,e.b,e.opacity):new Go}(e):new Go(e,t,n,null==r?1:r)}function Go(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ei(){return`#${ai(this.r)}${ai(this.g)}${ai(this.b)}`}function ti(){const e=ni(this.opacity);return`${1===e?"rgb(":"rgba("}${ri(this.r)}, ${ri(this.g)}, ${ri(this.b)}${1===e?")":`, ${e})`}`}function ni(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ri(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ai(e){return((e=ri(e))<16?"0":"")+e.toString(16)}function oi(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new si(e,t,n,r)}function ii(e){if(e instanceof si)return new si(e.h,e.s,e.l,e.opacity);if(e instanceof Po||(e=Xo(e)),!e)return new si;if(e instanceof si)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,a=Math.min(t,n,r),o=Math.max(t,n,r),i=NaN,s=o-a,l=(o+a)/2;return s?(i=t===o?(n-r)/s+6*(n<r):n===o?(r-t)/s+2:(t-n)/s+4,s/=l<.5?o+a:2-o-a,i*=60):s=l>0&&l<1?0:i,new si(i,s,l,e.opacity)}function si(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function li(e){return(e=(e||0)%360)<0?e+360:e}function ci(e){return Math.max(0,Math.min(1,e||0))}function ui(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Oo(Po,Xo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Qo,formatHex:Qo,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ii(this).formatHsl()},formatRgb:qo,toString:qo}),Oo(Go,Zo,Eo(Po,{brighter(e){return e=null==e?Ao:Math.pow(Ao,e),new Go(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Fo:Math.pow(Fo,e),new Go(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Go(ri(this.r),ri(this.g),ri(this.b),ni(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ei,formatHex:ei,formatHex8:function(){return`#${ai(this.r)}${ai(this.g)}${ai(this.b)}${ai(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ti,toString:ti})),Oo(si,function(e,t,n,r){return 1===arguments.length?ii(e):new si(e,t,n,null==r?1:r)},Eo(Po,{brighter(e){return e=null==e?Ao:Math.pow(Ao,e),new si(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Fo:Math.pow(Fo,e),new si(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,a=2*n-r;return new Go(ui(e>=240?e-240:e+120,a,r),ui(e,a,r),ui(e<120?e+240:e-120,a,r),this.opacity)},clamp(){return new si(li(this.h),ci(this.s),ci(this.l),ni(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ni(this.opacity);return`${1===e?"hsl(":"hsla("}${li(this.h)}, ${100*ci(this.s)}%, ${100*ci(this.l)}%${1===e?")":`, ${e})`}`}}));var fi=e=>()=>e;function di(e){return 1===(e=+e)?hi:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):fi(isNaN(t)?n:t)}}function hi(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):fi(isNaN(e)?t:e)}var mi=function e(t){var n=di(t);function r(e,t){var r=n((e=Zo(e)).r,(t=Zo(t)).r),a=n(e.g,t.g),o=n(e.b,t.b),i=hi(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=a(t),e.b=o(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function pi(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,a=t.slice();return function(o){for(n=0;n<r;++n)a[n]=e[n]*(1-o)+t[n]*o;return a}}function gi(e,t){var n,r=t?t.length:0,a=e?Math.min(r,e.length):0,o=new Array(a),i=new Array(r);for(n=0;n<a;++n)o[n]=ji(e[n],t[n]);for(;n<r;++n)i[n]=t[n];return function(e){for(n=0;n<a;++n)i[n]=o[n](e);return i}}function vi(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function bi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function yi(e,t){var n,r={},a={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=ji(e[n],t[n]):a[n]=t[n];return function(e){for(n in r)a[n]=r[n](e);return a}}var wi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xi=new RegExp(wi.source,"g");function ki(e,t){var n,r,a,o=wi.lastIndex=xi.lastIndex=0,i=-1,s=[],l=[];for(e+="",t+="";(n=wi.exec(e))&&(r=xi.exec(t));)(a=r.index)>o&&(a=t.slice(o,a),s[i]?s[i]+=a:s[++i]=a),(n=n[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,l.push({i:i,x:bi(n,r)})),o=xi.lastIndex;return o<t.length&&(a=t.slice(o),s[i]?s[i]+=a:s[++i]=a),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function ji(e,t){var n,r=typeof t;return null==t||"boolean"===r?fi(t):("number"===r?bi:"string"===r?(n=Xo(t))?(t=n,mi):ki:t instanceof Xo?mi:t instanceof Date?vi:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?pi:Array.isArray(t)?gi:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?yi:bi)(e,t)}function _i(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Ni(e){return+e}var Si=[0,1];function Mi(e){return e}function Ci(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function Ti(e,t,n){var r=e[0],a=e[1],o=t[0],i=t[1];return a<r?(r=Ci(a,r),o=n(i,o)):(r=Ci(r,a),o=n(o,i)),function(e){return o(r(e))}}function Ri(e,t,n){var r=Math.min(e.length,t.length)-1,a=new Array(r),o=new Array(r),i=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<r;)a[i]=Ci(e[i],e[i+1]),o[i]=n(t[i],t[i+1]);return function(t){var n=_o(e,t,1,r)-1;return o[n](a[n](t))}}function Oi(){var e,t,n,r,a,o,i=Si,s=Si,l=ji,c=Mi;function u(){var e=Math.min(i.length,s.length);return c!==Mi&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(i[0],i[e-1])),r=e>2?Ri:Ti,a=o=null,f}function f(t){return null==t||isNaN(t=+t)?n:(a||(a=r(i.map(e),s,l)))(e(c(t)))}return f.invert=function(n){return c(t((o||(o=r(s,i.map(e),bi)))(n)))},f.domain=function(e){return arguments.length?(i=Array.from(e,Ni),u()):i.slice()},f.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},f.rangeRound=function(e){return s=Array.from(e),l=_i,u()},f.clamp=function(e){return arguments.length?(c=!!e||Mi,u()):c!==Mi},f.interpolate=function(e){return arguments.length?(l=e,u()):l},f.unknown=function(e){return arguments.length?(n=e,f):n},function(n,r){return e=n,t=r,u()}}function Ei(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Pi(e){return(e=Ei(Math.abs(e)))?e[1]:NaN}var Fi,Ai=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ii(e){if(!(t=Ai.exec(e)))throw new Error("invalid format: "+e);var t;return new Di({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Di(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Li(e,t){var n=Ei(e,t);if(!n)return e+"";var r=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+r:r.length>a+1?r.slice(0,a+1)+"."+r.slice(a+1):r+new Array(a-r.length+2).join("0")}Ii.prototype=Di.prototype,Di.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Bi={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Li(100*e,t),r:Li,s:function(e,t){var n=Ei(e,t);if(!n)return e+"";var r=n[0],a=n[1],o=a-(Fi=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,i=r.length;return o===i?r:o>i?r+new Array(o-i+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Ei(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function zi(e){return e}var $i,Vi,Hi,Wi=Array.prototype.map,Ui=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ji(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?zi:(t=Wi.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var a=e.length,o=[],i=0,s=t[0],l=0;a>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(a-=s,a+s)),!((l+=s+1)>r));)s=t[i=(i+1)%t.length];return o.reverse().join(n)}),a=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?zi:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(Wi.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function f(e){var t=(e=Ii(e)).fill,n=e.align,f=e.sign,d=e.symbol,h=e.zero,m=e.width,p=e.comma,g=e.precision,v=e.trim,b=e.type;"n"===b?(p=!0,b="g"):Bi[b]||(void 0===g&&(g=12),v=!0,b="g"),(h||"0"===t&&"="===n)&&(h=!0,t="0",n="=");var y="$"===d?a:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",w="$"===d?o:/[%p]/.test(b)?l:"",x=Bi[b],k=/[defgprs%]/.test(b);function j(e){var a,o,l,d=y,j=w;if("c"===b)j=x(e)+j,e="";else{var _=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:x(Math.abs(e),g),v&&(e=function(e){e:for(var t,n=e.length,r=1,a=-1;r<n;++r)switch(e[r]){case".":a=t=r;break;case"0":0===a&&(a=r),t=r;break;default:if(!+e[r])break e;a>0&&(a=0)}return a>0?e.slice(0,a)+e.slice(t+1):e}(e)),_&&0===+e&&"+"!==f&&(_=!1),d=(_?"("===f?f:c:"-"===f||"("===f?"":f)+d,j=("s"===b?Ui[8+Fi/3]:"")+j+(_&&"("===f?")":""),k)for(a=-1,o=e.length;++a<o;)if(48>(l=e.charCodeAt(a))||l>57){j=(46===l?i+e.slice(a+1):e.slice(a))+j,e=e.slice(0,a);break}}p&&!h&&(e=r(e,1/0));var N=d.length+e.length+j.length,S=N<m?new Array(m-N+1).join(t):"";switch(p&&h&&(e=r(S+e,S.length?m-j.length:1/0),S=""),n){case"<":e=d+e+j+S;break;case"=":e=d+S+e+j;break;case"^":e=S.slice(0,N=S.length>>1)+d+e+j+S.slice(N);break;default:e=S+d+e+j}return s(e)}return g=void 0===g?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),j.toString=function(){return e+""},j}return{format:f,formatPrefix:function(e,t){var n=f(((e=Ii(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Pi(t)/3))),a=Math.pow(10,-r),o=Ui[8+r/3];return function(e){return n(a*e)+o}}}}function Qi(e,t,n,r){var a,o=function(e,t,n){n=+n;const r=(t=+t)<(e=+e),a=r?To(t,e,n):To(e,t,n);return(r?-1:1)*(a<0?1/-a:a)}(e,t,n);switch((r=Ii(null==r?",f":r)).type){case"s":var i=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(a=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Pi(t)/3)))-Pi(Math.abs(e)))}(o,i))||(r.precision=a),Hi(r,i);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(a=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Pi(t)-Pi(e))+1}(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=a-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(a=function(e){return Math.max(0,-Pi(Math.abs(e)))}(o))||(r.precision=a-2*("%"===r.type))}return Vi(r)}function qi(e){var t=e.domain;return e.ticks=function(e){var n=t();return function(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[a,o,i]=r?Co(t,e,n):Co(e,t,n);if(!(o>=a))return[];const s=o-a+1,l=new Array(s);if(r)if(i<0)for(let e=0;e<s;++e)l[e]=(o-e)/-i;else for(let e=0;e<s;++e)l[e]=(o-e)*i;else if(i<0)for(let e=0;e<s;++e)l[e]=(a+e)/-i;else for(let e=0;e<s;++e)l[e]=(a+e)*i;return l}(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return Qi(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,a,o=t(),i=0,s=o.length-1,l=o[i],c=o[s],u=10;for(c<l&&(a=l,l=c,c=a,a=i,i=s,s=a);u-- >0;){if((a=To(l,c,n))===r)return o[i]=l,o[s]=c,t(o);if(a>0)l=Math.floor(l/a)*a,c=Math.ceil(c/a)*a;else{if(!(a<0))break;l=Math.ceil(l*a)/a,c=Math.floor(c*a)/a}r=a}return e},e}function Xi(){var e=Oi()(Mi,Mi);return e.copy=function(){return t=e,Xi().domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown());var t},Ro.apply(e,arguments),qi(e)}function Yi(e,t){if(e===t)return 0;if(0===e)return 100;const n=(t-e)/e*100;return n>100?100:n<-100?-100:n}function Ki(e,t){return po.rgb(e,e,e).alpha(t)}function Zi(e,t){if(0===t.length)return t;const n=function(e){switch(e){case"dotnetspy":return/^(?<packageName>.+)\.(.+)\.(.+)\(.*\)$/;case"ebpfspy":case"unknown":return/^(?<packageName>.+)$/;case"gospy":case"scrape":return/^(?<packageName>.*?\/.*?\.|.*?\.|.+)(?<functionName>.*)$/;case"phpspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.php+)(?<line_info>.*)$/;case"pyspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.py+)(?<line_info>.*)$/;case"rbspy":return/^(?<packageName>(.*\/)*)(?<filename>.*\.rb+)(?<line_info>.*)$/;case"nodespy":return/^(\.\/node_modules\/)?(?<packageName>[^/]*)(?<filename>.*\.?(jsx?|tsx?)?):(?<functionName>.*):(?<line_info>.*)$/;case"tracing":return/^(?<packageName>.+?):.*$/;case"javaspy":return/^(?<packageName>.+\/)(?<filename>.+\.)(?<functionName>.+)$/;case"pyroscope-rs":return/^(?<packageName>[^::]+)/}return/^(?<packageName>.+)$/}(e),r=t.match(n);return r&&r.groups?r.groups.packageName||"":t}function Gi(e,t){const n=function(e,t=0){let n,r,a,o,i,s,l,c;for(n=3&e.length,r=e.length-n,a=t,i=3432918353,s=461845907,c=0;c<r;)l=255&e.charCodeAt(c)|(255&e.charCodeAt(++c))<<8|(255&e.charCodeAt(++c))<<16|(255&e.charCodeAt(++c))<<24,++c,l=(65535&l)*i+(((l>>>16)*i&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,a^=l,a=a<<13|a>>>19,o=5*(65535&a)+((5*(a>>>16)&65535)<<16)&4294967295,a=27492+(65535&o)+(((o>>>16)+58964&65535)<<16);switch(l=0,n){case 3:l^=(255&e.charCodeAt(c+2))<<16;case 2:l^=(255&e.charCodeAt(c+1))<<8;case 1:l^=255&e.charCodeAt(c);default:l=(65535&l)*i+(((l>>>16)*i&65535)<<16)&4294967295,l=l<<15|l>>>17,l=(65535&l)*s+(((l>>>16)*s&65535)<<16)&4294967295,a^=l}return a^=e.length,a^=a>>>16,a=2246822507*(65535&a)+((2246822507*(a>>>16)&65535)<<16)&4294967295,a^=a>>>13,a=3266489909*(65535&a)+((3266489909*(a>>>16)&65535)<<16)&4294967295,a^=a>>>16,a>>>0}(t,0),r=n%e.colors.length,a=e.colors[r];return a||(console.warn("Could not calculate color. Defaulting to the first one"),e.colors[0])}function es(e){const{goodColor:t,neutralColor:n,badColor:r}=e,a=Xi().domain([-100,0,100]).range([t.rgb().toString(),n.rgb().toString(),r.rgb().toString()]);return e=>po(a(e).toString())}$i=Ji({thousands:",",grouping:[3],currency:["$",""]}),Vi=$i.format,Hi=$i.formatPrefix,po.rgb(148,142,142),po.rgb(200,0,0),po.rgb(0,170,0),po("#48CE73");const ts=new WeakMap,ns=new WeakMap,rs=new WeakMap,as=new WeakMap;const os={collapsedLevelsSingular:"total (1 level collapsed)",collapsedLevelsPlural:"total ({n} levels collapsed)",isZh:!1};function is(e){var t,n,r,a,o,i,s,l;const c=performance.now(),u=!1!==e.renderRects,f=!1!==e.renderText,d=null!==(t=e.renderMode)&&void 0!==t?t:"normal",h=e.timeBudgetMs,{canvas:m,fitMode:p,units:g,tickToX:v,levels:b,palette:y}=e,{numTicks:w,sampleRate:x,pxPerTick:k}=e,{rangeMin:j,rangeMax:_}=e,{focusedNode:N,zoom:S}=e,M=e.messages||os,C=e.skipCanvasResize?m.width:function(e){if("clientWidth"in e&&"number"==typeof e.clientWidth)return e.clientWidth;return e.width}(m);if(e.skipCanvasResize||(m.width=C),j>=_)throw new Error("'rangeMin' should be strictly smaller than 'rangeMax'");const{format:T}=e,R=ka(T),O=m.getContext("2d");if(!O)throw new Error("Could not get ctx");const E=S.mapOrElse(()=>0,e=>e.i),P=Ia(w,x,g),F=N.isJust,A=N.mapOrElse(()=>0,e=>e.i),I=F?Ta:0,D=!!e.highlightQuery&&e.highlightQuery.length>0,L=Ca*(b.length-A)+(F?Ta:0);e.skipCanvasResize||(m.height=L);const B="number"==typeof e.devicePixelRatio?e.devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1;!e.skipDprScale&&B>1&&(m.width*=B,m.height*=B,O.scale(B,B)),O.textBaseline="middle",O.font="400 11.5px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace";const z=O.measureText("a").width,{names:$}=e,V=function(e){const t=ts.get(e);if(t)return t;const n=new Map;return ts.set(e,n),n}(m),H=D?function(e,t){const n=ns.get(e);if(n){const e=n.get(t);if(e)return e}const r=t.toLowerCase(),a=new Uint8Array(e.length);for(let t=1;t<e.length;t+=1){const n=e[t];n&&n.toLowerCase().includes(r)&&(a[t]=1)}const o=null!=n?n:new Map;return o.set(t,a),ns.set(e,o),a}($,e.highlightQuery):null,W="single"===e.format?function(e,t,n){const r=`${t}|${n.name}`,a=rs.get(e);if(a){const e=a.get(r);if(e)return e}const o=new Array(e.length);for(let r=0;r<e.length;r+=1){const a=Zi(t,e[r]||"")||"";o[r]=Gi(n,a)}const i=null!=a?a:new Map;return i.set(r,o),rs.set(e,i),o}($,e.spyName,y):null,U="double"===e.format?es({name:y.name,goodColor:y.goodColor,neutralColor:y.neutralColor,badColor:y.badColor}):null,J=(e,t)=>{const n=e[t+R.jName];return!(!n||n<0||!H)&&1===H[n]},Q=null!==(n=e.startI)&&void 0!==n?n:0,q=null!==(r=e.startJ)&&void 0!==r?r:0;if(F&&"highlightOnly"!==d&&0===(null!==(a=e.levelStart)&&void 0!==a?a:0)&&0===Q&&0===q){const e=w*k;u&&(O.beginPath(),O.rect(0,0,w*k,Ta),O.fillStyle=Ki(200,1).rgb().string(),O.fill());const t=N.mapOrElse(()=>"total",e=>function(e,t){return 1===e?t.collapsedLevelsSingular:t.collapsedLevelsPlural.replace("{n}",String(e))}(e.i-1,M)),n=Ha({mode:p,charSize:z,rectWidth:e,fullText:t,shortText:t}),r=0,a=0,o=Ta;if(f){O.beginPath(),O.rect(0,0,e,Ta),O.save(),O.clip(),O.fillStyle="black";const t=Math.round(Math.max(r,0));O.fillText(n.text,t+n.marginLeft,a+o/2+1),O.restore()}}const X=Math.max(0,null!==(o=e.levelStart)&&void 0!==o?o:0),Y=b.length-A,K=Math.min(Y,null!==(i=e.levelEnd)&&void 0!==i?i:Y),Z=Math.max(X,null!==(s=e.startI)&&void 0!==s?s:X),G=Math.max(0,null!==(l=e.startJ)&&void 0!==l?l:0),{spyName:ee}=e,te=(t,n,r,a,o)=>{const i={level:t,j:n,i:r+N.mapOrElse(()=>0,e=>e.i),names:$,collapsed:a,selectedLevel:E,highlightModeOn:D,isHighlighted:o,spyName:ee,palette:y,colorByNameIndex:W,diffColorFn:U};switch(T){case"single":return function(e){const t=cs(e);if(t)return t;const n=ka("single"),r=e.selectedLevel>e.i?.33:1;let a=e.level[e.j+n.jName];void 0===a&&(console.warn("Could nto find level",{l:e.j,jName:n.jName,level:e.level}),a=-1);if(e.colorByNameIndex&&a>=0&&e.colorByNameIndex[a])return e.colorByNameIndex[a].alpha(r);const o=e.names[a]||"",i=Zi(e.spyName,o)||"";return Gi(e.palette,i).alpha(r)}({...i});case"double":return function(e){const t=cs(e);if(t)return t;const n=e.selectedLevel>e.i?.33:1,{leftRatio:r,rightRatio:a}=function(e,t,n,r){const a=xa;return n&&r?{leftRatio:a.getBarTotalLeft(e,t)/n,rightRatio:a.getBarTotalRght(e,t)/r}:(console.error("Properties 'rightTicks' and 'leftTicks' are required. Can't calculate ratio."),{leftRatio:0,rightRatio:0})}(e.level,e.j,e.leftTicks,e.rightTicks),o=Fa(r),i=Fa(a);if(e.diffColorFn)return e.diffColorFn(Yi(o,i)).alpha(n);return function(e,t,n){const r=Yi(t,n);return es(e)(r)}(e.palette,o,i).alpha(n)}({...i,leftTicks:e.leftTicks,rightTicks:e.rightTicks});default:throw new Error(`Unsupported format: ${T}`)}};if("highlightOnly"===d&&D&&u){const e=function(e,t){const n=as.get(e);if(n)return n;const r=ka(t),a=new Map;for(let t=0;t<e.length;t+=1){const n=e[t];for(let e=0;e<n.length;e+=r.jStep){const o=r.getBarName(n,e);if(void 0===o||o<0)continue;const i=a.get(o);i?i.push({i:t,j:e}):a.set(o,[{i:t,j:e}])}}return as.set(e,a),a}(b,T),t=[];for(let e=1;e<$.length;e+=1)H&&1===H[e]&&t.push(e);for(let n=0;n<t.length;n+=1){const r=t[n],a=e.get(r);if(a)for(let e=0;e<a.length;e+=1){const t=a[e],n=t.i-A;if(t.i<A||n<X||n>=K)continue;const r=b[t.i],o=v(R.getBarOffset(r,t.j)),i=n*Ca+I,s=Ta,l=R.getBarTotal(r,t.j),c=l*k<=5,u=l*k-(c?0:.5);if(u<=0)continue;O.beginPath(),O.rect(o,i,u,s);const f=te(r,t.j,n,c,!0);O.fillStyle=f.string(),O.fill()}}return{done:!0,nextI:K,nextJ:0}}for(let e=Z;e<K;e+=1){const t=b[A+e];if(!t)throw new Error(`Could not find level: ${A+e}`);let n=e===Z?G:0;for(;n<t.length;n+=R.jStep){const r=R.getBarOffset(t,n),a=v(r),o=e*Ca+I,i=Ta,s=D&&J(t,n);let l=R.getBarTotal(t,n);const m=l*k<=5;if(m)for(;n<t.length-R.jStep&&r+l===R.getBarOffset(t,n+R.jStep)&&R.getBarTotal(t,n+R.jStep)*k<=5&&s===(D&&J(t,n+R.jStep));)n+=R.jStep,l+=R.getBarTotal(t,n);const g=l*k-(m?0:.5);if(O.beginPath(),O.rect(a,o,g,i),u){if("forceGrey"===d)O.fillStyle=Ki(200,.66).rgb().string();else{const r=te(t,n,e,m,s);O.fillStyle=r.string()}O.fill()}if(!f||m||"forceGrey"===d){if(h&&performance.now()-c>h)return{done:!1,nextI:e,nextJ:n+R.jStep};continue}if(g<20)continue;const b=ss($,n,T,t),y=Ha({mode:p,charSize:z,rectWidth:g,fullText:ls(b,l,x,P,M,V),shortText:b});O.save(),O.clip(),O.fillStyle="black";const w=Math.round(Math.max(a,0));if(O.fillText(y.text,w+y.marginLeft,o+i/2+1),O.restore(),h&&performance.now()-c>h)return{done:!1,nextI:e,nextJ:n+R.jStep}}if(h&&performance.now()-c>h)return{done:!1,nextI:e+1,nextJ:0}}return{done:!0,nextI:K,nextJ:0}}function ss(e,t,n,r){let a=r[t+ka(n).jName];void 0===a&&(a=-1);const o=e[a];return o||(console.warn("Could not find function name for",{j:t,format:n,level:r,names:e}),"")}function ls(e,t,n,r,a,o){let i=null==o?void 0:o.get(t);if(!i){const e=r.format(t,n);i=Ea(e,!!a.isZh)||e,null==o||o.set(t,i)}return`${e} (${i})`}function cs({collapsed:e,highlightModeOn:t,isHighlighted:n}){return e||t&&!n?Ki(200,.66):null}class us{constructor(e,t,n,r,a,o,i,s){if(this.flamebearer=e,this.canvas=t,this.focusedNode=n,this.fitMode=r,this.highlightQuery=a,this.zoom=o,this.palette=i,this.messages=s,this.cachedRange=null,this.cachedPxPerTick=null,this.tickToX=e=>{var t;const n=this.cachedRange?this.cachedRange.rangeMin:this.getRange().rangeMin,r=null!==(t=this.cachedPxPerTick)&&void 0!==t?t:this.pxPerTick();return(e-this.flamebearer.numTicks*n)*r},this.xyToBarPosition=e=>{const{ff:t}=this,{i:n,j:r}=this.xyToBarIndex(e.x,e.y),a=this.focusedNode.mapOrElse(()=>0,e=>e.i<0?0:e.i-1),o=this.flamebearer.levels[n];if(!o)throw new Error(`Could not find level: '${n}'`);const i=Math.max(this.tickToX(t.getBarOffset(o,r)),0);return{x:i,y:Math.max((n-a)*Ca,0),width:Math.min(this.tickToX(t.getBarOffset(o,r)+t.getBarTotal(o,r))-i,this.getCanvasWidth())}},this.xyToBarData=e=>{const{i:t,j:n}=this.xyToBarIndex(e.x,e.y),r=this.flamebearer.levels[t];if(!r)throw new Error(`Could not find level: '${t}'`);switch(this.flamebearer.format){case"single":{const e=wa;return{format:"single",name:this.flamebearer.names[e.getBarName(r,n)],self:e.getBarSelf(r,n),offset:e.getBarOffset(r,n),total:e.getBarTotal(r,n)}}case"double":{const e=xa;return{format:"double",barTotal:e.getBarTotal(r,n),totalLeft:e.getBarTotalLeft(r,n),totalRight:e.getBarTotalRght(r,n),totalDiff:e.getBarTotalDiff(r,n),name:this.flamebearer.names[e.getBarName(r,n)]}}default:throw new Error("Unsupported type")}},this.isWithinBounds=(e,t)=>{if(e<0||e>this.getCanvasWidth())return!1;try{const{i:n,j:r}=this.xyToBarIndex(e,t);if(-1===r||-1===n)return!1}catch(e){return!1}return!0},this.zoom=o,this.focusedNode=n,this.flamebearer=e,this.canvas=t,this.highlightQuery=a,this.ff=ka(e.format),this.palette=i,this.messages=s,n.isJust&&o.isJust&&o.value.i<n.value.i)throw new Error("Zoom i level should be bigger than Focus")}render(e){var t;const{rangeMin:n,rangeMax:r,pxPerTick:a}=this.updateCachedMetrics(),o=null!==(t=null==e?void 0:e.highlightQueryOverride)&&void 0!==t?t:this.highlightQuery,i={canvas:this.canvas,format:this.flamebearer.format,numTicks:this.flamebearer.numTicks,sampleRate:this.flamebearer.sampleRate,names:this.flamebearer.names,levels:this.flamebearer.levels,spyName:this.flamebearer.spyName,units:this.flamebearer.units,maxSelf:this.flamebearer.maxSelf,rangeMin:n,rangeMax:r,fitMode:this.fitMode,highlightQuery:o,zoom:this.zoom,focusedNode:this.focusedNode,pxPerTick:a,tickToX:e=>(e-this.flamebearer.numTicks*n)*a,palette:this.palette,messages:this.messages,renderRects:null==e?void 0:e.renderRects,renderText:null==e?void 0:e.renderText,renderMode:null==e?void 0:e.renderMode,levelStart:null==e?void 0:e.levelStart,levelEnd:null==e?void 0:e.levelEnd,startI:null==e?void 0:e.startI,startJ:null==e?void 0:e.startJ,timeBudgetMs:null==e?void 0:e.timeBudgetMs,skipCanvasResize:null==e?void 0:e.skipCanvasResize,skipDprScale:null==e?void 0:e.skipDprScale,devicePixelRatio:null==e?void 0:e.devicePixelRatio},{format:s}=this.flamebearer;switch(s){case"single":return is({...i,format:"single"});case"double":return is({...i,leftTicks:this.flamebearer.leftTicks,rightTicks:this.flamebearer.rightTicks});default:throw new Error(`Invalid format: '${s}'`)}}pxPerTick(){if(null!==this.cachedPxPerTick)return this.cachedPxPerTick;const{rangeMin:e,rangeMax:t}=this.getRange(),n=this.getCanvasWidth()/this.flamebearer.numTicks/(t-e);return this.cachedRange={rangeMin:e,rangeMax:t},this.cachedPxPerTick=n,n}updateCachedMetrics(){const{rangeMin:e,rangeMax:t}=this.getRange(),n=this.getCanvasWidth()/this.flamebearer.numTicks/(t-e);return this.cachedRange={rangeMin:e,rangeMax:t},this.cachedPxPerTick=n,{rangeMin:e,rangeMax:t,pxPerTick:n}}getRange(){const{ff:e}=this,t=t=>{const n=this.flamebearer.levels[t.i];if(!n)throw new Error(`Could not find level: '${t.i}'`);return{rangeMin:e.getBarOffset(n,t.j)/this.flamebearer.numTicks,rangeMax:(e.getBarOffset(n,t.j)+e.getBarTotal(n,t.j))/this.flamebearer.numTicks}},n=t=>{const n=this.flamebearer.levels[t.i];if(!n)throw new Error(`Could not find level: '${t.i}'`);return{rangeMin:e.getBarOffset(n,t.j)/this.flamebearer.numTicks,rangeMax:(e.getBarOffset(n,t.j)+e.getBarTotal(n,t.j))/this.flamebearer.numTicks}},{zoom:r,focusedNode:a}=this;return r.match({Just:e=>a.match({Just:r=>{const a=n(r),o=t(e);return a.rangeMax-a.rangeMin<o.rangeMax-o.rangeMin?(console.warn("Focus is smaller than range, this shouldnt happen. Verify that the zoom is always bigger than the focus."),n(r)):t(e)},Nothing:()=>t(e)}),Nothing:()=>a.match({Just:e=>n(e),Nothing:()=>({rangeMin:0,rangeMax:1})})})}getCanvasWidth(){return"clientWidth"in this.canvas&&"number"==typeof this.canvas.clientWidth?this.canvas.clientWidth:this.canvas.width}isFocused(){return this.focusedNode.isJust}binarySearchLevel(e,t){const{ff:n}=this;let r=0,a=t.length-n.jStep;for(;r<=a;){const o=n.jStep*(r/n.jStep+a/n.jStep>>1),i=this.tickToX(n.getBarOffset(t,o)),s=this.tickToX(n.getBarOffset(t,o)+n.getBarTotal(t,o));if(i<=e&&s>=e)return s-i>5?o:-1;i>e?a=o-n.jStep:r=o+n.jStep}return-1}xyToBarIndex(e,t){if(e<0||t<0)throw new Error(`x and y must be bigger than 0. x = ${e}, y = ${t}`);if(this.isFocused()&&t<=Ta)return{i:0,j:0};const n=this.isFocused()?t-Ta:t,r=this.focusedNode.mapOrElse(()=>0,e=>e.i<=0?0:e.i),a=this.zoom.match({Just:()=>this.focusedNode.match({Just:()=>r,Nothing:()=>0}),Nothing:()=>this.focusedNode.match({Just:()=>r,Nothing:()=>0})}),o=Math.floor(n/Ca)+a;if(o>=0&&o<this.flamebearer.levels.length){const t=this.flamebearer.levels[o];if(!t)throw new Error(`Could not find level: '${o}'`);return{i:o,j:this.binarySearchLevel(e,t)}}return{i:0,j:0}}parseXY(e,t){const n={x:e,y:t};return this.isWithinBounds(e,t)?ha.of(n):ha.nothing()}xyToBar(e,t){return this.parseXY(e,t).map(n=>{const{i:r,j:a}=this.xyToBarIndex(e,t);return{i:r,j:a,...this.xyToBarPosition(n),...this.xyToBarData(n)}})}}function fs(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=fs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ds(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=fs(e))&&(r&&(r+=" "),r+=t);return r}var hs="NoData-module_noData__WuuID";function ms(){return e.jsx("div",{"data-testid":"no-data",className:hs,children:e.jsx("span",{children:"No data available"})})}var ps,gs,vs={},bs={};function ys(){return ps||(ps=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="arrow-rotate-right",n=[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],r="f01e",a="M436.7 74.7L448 85.4 448 32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l47.9 0-7.6-7.2c-.2-.2-.4-.4-.6-.6-75-75-196.5-75-271.5 0s-75 196.5 0 271.5 196.5 75 271.5 0c8.2-8.2 15.5-16.9 21.9-26.1 10.1-14.5 30.1-18 44.6-7.9s18 30.1 7.9 44.6c-8.5 12.2-18.2 23.8-29.1 34.7-100 100-262.1 100-362 0S-25 175 75 75c99.9-99.9 261.7-100 361.7-.3z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faArrowRotateRight=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(bs)),bs}function ws(){return gs||(gs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ys();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faRedo=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(vs)),vs}var xs,ks=ws(),js={};function _s(){return xs||(xs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="copy",n=[],r="f0c5",a="M192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-200.6c0-17.4-7.1-34.1-19.7-46.2L370.6 17.8C358.7 6.4 342.8 0 326.3 0L192 0zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-16-64 0 0 16-192 0 0-256 16 0 0-64-16 0z";e.definition={prefix:"fas",iconName:t,icon:[448,512,n,r,a]},e.faCopy=e.definition,e.prefix="fas",e.iconName=t,e.width=448,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(js)),js}var Ns,Ss=_s(),Ms={};function Cs(){return Ns||(Ns=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="highlighter",n=[],r="f591",a="M315 315L473.4 99.9 444.1 70.6 229 229 315 315zm-187 5l0 0 0-71.7c0-15.3 7.2-29.6 19.5-38.6L420.6 8.4C428 2.9 437 0 446.2 0 457.6 0 468.5 4.5 476.6 12.6l54.8 54.8c8.1 8.1 12.6 19 12.6 30.5 0 9.2-2.9 18.2-8.4 25.6L334.4 396.5c-9 12.3-23.4 19.5-38.6 19.5l-71.7 0-25.4 25.4c-12.5 12.5-32.8 12.5-45.3 0l-50.7-50.7c-12.5-12.5-12.5-32.8 0-45.3L128 320zM7 466.3l51.7-51.7 70.6 70.6-19.7 19.7c-4.5 4.5-10.6 7-17 7L24 512c-13.3 0-24-10.7-24-24l0-4.7c0-6.4 2.5-12.5 7-17z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,r,a]},e.faHighlighter=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Ms)),Ms}var Ts,Rs,Os=Cs(),Es={},Ps={};function Fs(){return Ts||(Ts=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="down-left-and-up-right-to-center",n=["compress-alt"],r="f422",a="M439.5 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2S450.2 240 440.5 240l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87zM72.5 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87-39-39c-6.9-6.9-8.9-17.2-5.2-26.2S62.8 272 72.5 272z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faDownLeftAndUpRightToCenter=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Ps)),Ps}function As(){return Rs||(Rs=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Fs();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faCompressAlt=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Es)),Es}var Is=As();const Ds=e=>!!e&&"o"===e[0],Ls=r.unstable_batchedUpdates,Bs=(e,t)=>!0===e||!(!e||!e[t]),zs=(e,t)=>"function"==typeof e?e(t):e,$s="_szhsinMenu",Vs=(e,t)=>Object.defineProperty(t,$s,{value:e}),Hs=(e,t)=>(t&&Object.keys(t).forEach(n=>{const r=e[n],a=t[n];e[n]="function"==typeof a&&r?(...e)=>{a(...e),r(...e)}:a}),e),Ws=e=>{for(;e;){if(!(e=e.parentNode)||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:r}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+r+n))return e}};function Us(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function Js(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}const Qs=({block:e,element:n,modifiers:r,className:a})=>t.useMemo(()=>{const t=n?`${e}__${n}`:e;let o=t;r&&Object.keys(r).forEach(e=>{const n=r[e];n&&(o+=` ${t}--${!0===n?e:`${e}-${n}`}`)});let i="function"==typeof a?a(r):a;return"string"==typeof i&&(i=i.trim(),i&&(o+=` ${i}`)),o},[e,n,r,a]),qs="szh-menu",Xs=t.createContext(),Ys=t.createContext({}),Ks=t.createContext({}),Zs=t.createContext({}),Gs=t.createContext({}),el=t.createContext({}),tl=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),nl=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),rl=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),al=Object.freeze({FIRST:"first",LAST:"last"}),ol=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),il="absolute",sl="none",ll={preventScroll:!0},cl=Vs("MenuButton",t.forwardRef(function({className:n,isOpen:r,disabled:a,children:o,...i},s){const l=t.useMemo(()=>({open:r}),[r]);return e.jsx("button",{"aria-haspopup":!0,"aria-expanded":r,"aria-disabled":a||void 0,type:"button",disabled:a,...i,ref:s,className:Qs({block:"szh-menu-button",modifiers:l,className:n}),children:o})})),ul=({className:n,containerRef:r,containerProps:a,children:o,isOpen:i,theming:s,transition:l,onClose:c})=>{const u=Bs(l,"item");return e.jsx("div",{...Hs({onKeyDown:({key:e})=>{if(e===tl.ESC)zs(c,{key:e,reason:rl.CANCEL})},onBlur:e=>{i&&!e.currentTarget.contains(e.relatedTarget)&&zs(c,{reason:rl.BLUR})}},a),className:Qs({block:"szh-menu-container",modifiers:t.useMemo(()=>({theme:s,itemTransition:u}),[s,u]),className:n}),style:{position:"absolute",...a?.style},ref:r,children:o})},fl=()=>{let e,t=0;return{toggle:e=>{e?t++:t--,t=Math.max(t,0)},on:(n,r,a)=>{t?e||(e=setTimeout(()=>{e=0,r()},n)):a?.()},off:()=>{e&&(clearTimeout(e),e=0)}}},dl=(e,t)=>Math.round(e)===t?e:t,hl=(e,t,n,r)=>{const a=(e=>{const t=e.getBoundingClientRect();return t.width=dl(t.width,e.offsetWidth),t.height=dl(t.height,e.offsetHeight),t})(t),o=e.getBoundingClientRect(),i=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),s=(e=>{if("string"!=typeof e)return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],r=isNaN(t[1])?n:t[1];return{top:n,right:r,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?r:t[3]}})(r),l=e=>e+o.left-i.left-s.left,c=e=>e+o.left+a.width-i.right+s.right,u=e=>e+o.top-i.top-s.top,f=e=>e+o.top+a.height-i.bottom+s.bottom;return{menuRect:a,containerRect:o,getLeftOverflow:l,getRightOverflow:c,getTopOverflow:u,getBottomOverflow:f,confineHorizontally:e=>{let t=l(e);if(t<0)e-=t;else{const n=c(e);n>0&&(t=l(e-=n),t<0&&(e-=t))}return e},confineVertically:e=>{let t=u(e);if(t<0)e-=t;else{const n=f(e);n>0&&(t=u(e-=n),t<0&&(e-=t))}return e}}},ml=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:r,placeLeftX:a,placeRightX:o,getLeftOverflow:i,getRightOverflow:s,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:f,direction:d,position:h})=>{let m,p,g,v=d,b=r;"initial"!==h&&(b=c(b),"anchor"===h&&(b=Math.min(b,e.bottom-t.top),b=Math.max(b,e.top-t.top-n.height))),"left"===v?(m=a,"initial"!==h&&(p=i(m),p<0&&(g=s(o),(g<=0||-p>g)&&(m=o,v="right")))):(m=o,"initial"!==h&&(g=s(m),g>0&&(p=i(a),(p>=0||-p<g)&&(m=a,v="left")))),"auto"===h&&(m=l(m));const y=f?(({arrowRef:e,menuY:t,anchorRect:n,containerRect:r,menuRect:a})=>{let o=n.top-r.top-t+n.height/2;const i=1.25*e.current.offsetHeight;return o=Math.max(i,o),o=Math.min(o,a.height-i),o})({menuY:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowY:y,x:m,y:b,computedDirection:v}},pl=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:r,placeTopY:a,placeBottomY:o,getTopOverflow:i,getBottomOverflow:s,confineHorizontally:l,confineVertically:c,arrowRef:u,arrow:f,direction:d,position:h})=>{let m,p,g,v="top"===d?"top":"bottom",b=r;"initial"!==h&&(b=l(b),"anchor"===h&&(b=Math.min(b,e.right-t.left),b=Math.max(b,e.left-t.left-n.width))),"top"===v?(m=a,"initial"!==h&&(p=i(m),p<0&&(g=s(o),(g<=0||-p>g)&&(m=o,v="bottom")))):(m=o,"initial"!==h&&(g=s(m),g>0&&(p=i(a),(p>=0||-p<g)&&(m=a,v="top")))),"auto"===h&&(m=c(m));const y=f?(({arrowRef:e,menuX:t,anchorRect:n,containerRect:r,menuRect:a})=>{let o=n.left-r.left-t+n.width/2;const i=1.25*e.current.offsetWidth;return o=Math.max(i,o),o=Math.min(o,a.width-i),o})({menuX:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowX:y,x:b,y:m,computedDirection:v}},gl="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function vl(e,t){"function"==typeof e?e(t):e.current=t}const bl=(e,n)=>t.useMemo(()=>e?n?t=>{vl(e,t),vl(n,t)}:e:n,[e,n]),yl=({ariaLabel:n,menuClassName:a,menuStyle:o,arrow:i,arrowProps:s={},anchorPoint:l,anchorRef:c,containerRef:u,containerProps:f,externalRef:d,parentScrollingRef:h,align:m="start",direction:p="bottom",position:g="auto",overflow:v="visible",setDownOverflow:b,repositionFlag:y,captureFocus:w=!0,state:x,endTransition:k,isDisabled:j,menuItemFocus:_,gap:N=0,shift:S=0,children:M,onClose:C,focusProps:T,...R})=>{const[O,E]=t.useState({x:-9999,y:-9999}),[P,F]=t.useState({}),[A,I]=t.useState(),[D,L]=t.useState(p),[B]=t.useState(fl),[z,$]=t.useReducer(e=>e+1,1),{transition:V,boundingBoxRef:H,boundingBoxPadding:W,rootMenuRef:U,rootAnchorRef:J,scrollNodesRef:Q,reposition:q,viewScroll:X,submenuCloseDelay:Y}=t.useContext(el),{submenuCtx:K,reposSubmenu:Z=y}=t.useContext(Ks),G=t.useRef(),ee=t.useRef(),te=t.useRef(!1),{hoverItem:ne,dispatch:re,updateItems:ae}=(e=>{const[n,r]=t.useState(),a=t.useRef({items:[],hoverIndex:-1,sorted:!1}).current,o=t.useCallback((t,n)=>{const{items:o}=a;if(t)if(n)o.push(t);else{const n=o.indexOf(t);n>-1&&(o.splice(n,1),t.contains(document.activeElement)&&(e.current.focus(ll),r()))}else a.items=[];a.hoverIndex=-1,a.sorted=!1},[a,e]),i=t.useCallback((t,n,o)=>{const{items:i,hoverIndex:s}=a,l=()=>{if(a.sorted)return;const t=e.current.querySelectorAll(".szh-menu__item");i.sort((e,n)=>Js(t,e)-Js(t,n)),a.sorted=!0};let c,u=-1;switch(t){case nl.RESET:break;case nl.SET:c=n;break;case nl.UNSET:c=e=>e===n?void 0:e;break;case nl.FIRST:l(),u=0,c=i[u];break;case nl.LAST:l(),u=i.length-1,c=i[u];break;case nl.SET_INDEX:l(),u=o,c=i[u];break;case nl.INCREASE:l(),u=s,u<0&&(u=i.indexOf(n)),u++,u>=i.length&&(u=0),c=i[u];break;case nl.DECREASE:l(),u=s,u<0&&(u=i.indexOf(n)),u--,u<0&&(u=i.length-1),c=i[u];break;default:if("production"!==process.env.NODE_ENV)throw new Error(`[React-Menu] Unknown hover action type: ${t}`)}c||(u=-1),r(c),a.hoverIndex=u},[e,a]);return{hoverItem:n,dispatch:i,updateItems:o}})(G),oe=Ds(x),ie=Bs(V,"open"),se=Bs(V,"close"),le=Q.current,ce=t.useCallback(e=>{const t=G.current,n=u.current;if(!t||!n)return;const r=c?c.current?.getBoundingClientRect():l?{left:l.x,right:l.x,top:l.y,bottom:l.y,width:0,height:0}:null;if(!r)return void("production"!==process.env.NODE_ENV&&console.warn("[React-Menu] Menu might not be positioned properly as one of the anchorRef or anchorPoint prop should be provided. If `anchorRef` is provided, the anchor must be mounted before menu is open."));le.menu||(le.menu=(H?H.current:Ws(U.current))||window);const a=hl(n,t,le.menu,W);let{arrowX:o,arrowY:s,x:f,y:d,computedDirection:h}=(({arrow:e,align:t,direction:n,gap:r,shift:a,position:o,anchorRect:i,arrowRef:s,positionHelpers:l})=>{const{menuRect:c,containerRect:u}=l,f="left"===n||"right"===n;let d=f?r:a,h=f?a:r;if(e){const e=s.current;f?d+=e.offsetWidth:h+=e.offsetHeight}const m=i.left-u.left-c.width-d,p=i.right-u.left+d,g=i.top-u.top-c.height-h,v=i.bottom-u.top+h;let b,y;"end"===t?(b=i.right-u.left-c.width,y=i.bottom-u.top-c.height):"center"===t?(b=i.left-u.left-(c.width-i.width)/2,y=i.top-u.top-(c.height-i.height)/2):(b=i.left-u.left,y=i.top-u.top),b+=d,y+=h;const w={...l,anchorRect:i,placeLeftX:m,placeRightX:p,placeLeftorRightY:y,placeTopY:g,placeBottomY:v,placeToporBottomX:b,arrowRef:s,arrow:e,direction:n,position:o};switch(n){case"left":case"right":return ml(w);default:return pl(w)}})({arrow:i,align:m,direction:p,gap:N,shift:S,position:g,anchorRect:r,arrowRef:ee,positionHelpers:a});const{menuRect:b}=a,y=b.height;if(!e&&"visible"!==v){const{getTopOverflow:e,getBottomOverflow:t}=a;let n,r;const o=t(d);if(o>0)n=y-o,r=o;else{const t=e(d);t<0&&(n=y+t,r=0-t,n>=0&&(d-=t))}n>=0&&I({height:n,overflowAmt:r})}i&&F({x:o,y:s}),E({x:f,y:d}),L(h)},[i,m,W,p,N,S,g,v,l,c,u,H,U,le]);gl(()=>{oe&&(ce(),te.current&&$()),te.current=oe},[oe,ce,Z]),gl(()=>{A&&!b&&(G.current.scrollTop=0)},[A,b]),gl(()=>ae,[ae]),t.useEffect(()=>{let{menu:e}=le;if(!oe||!e)return;if(e=e.addEventListener?e:window,!le.anchors){le.anchors=[];let t=Ws(J&&J.current);for(;t&&t!==e;)le.anchors.push(t),t=Ws(t)}let t=X;if(le.anchors.length&&"initial"===t&&(t="auto"),"initial"===t)return;const n=()=>{"auto"===t?Ls(()=>ce(!0)):zs(C,{reason:rl.SCROLL})},r=le.anchors.concat("initial"!==X?e:[]);return r.forEach(e=>e.addEventListener("scroll",n)),()=>r.forEach(e=>e.removeEventListener("scroll",n))},[J,le,oe,C,X,ce]);const ue=!!A&&A.overflowAmt>0;t.useEffect(()=>{if(ue||!oe||!h)return;const e=()=>Ls(ce),t=h.current;return t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)},[oe,ue,h,ce]),t.useEffect(()=>{if(!oe||"function"!=typeof ResizeObserver||"initial"===q)return;const e=[],t=new ResizeObserver(t=>t.forEach(({target:t})=>{e.indexOf(t)<0?e.push(t):r.flushSync(()=>{ce(),$()})})),n={box:"border-box"};t.observe(G.current,n);const a=c?.current;return a&&t.observe(a,n),()=>t.disconnect()},[oe,q,c,ce]),t.useEffect(()=>{if(!oe)return re(nl.RESET),void(se||I());const{position:e,alwaysUpdate:t}=_||{},n=()=>{e===al.FIRST?re(nl.FIRST):e===al.LAST?re(nl.LAST):e>=-1&&re(nl.SET_INDEX,void 0,e)};if(t)n();else if(w){const e=setTimeout(()=>{const e=G.current;e&&!e.contains(document.activeElement)&&(e.focus(ll),n())},ie?170:100);return()=>clearTimeout(e)}},[oe,ie,se,w,_,re]);const fe=t.useMemo(()=>({isParentOpen:oe,submenuCtx:B,dispatch:re,updateItems:ae}),[oe,B,re,ae]);let de,he;A&&(b?he=A.overflowAmt:de=A.height);const me=t.useMemo(()=>({reposSubmenu:z,submenuCtx:B,overflow:v,overflowAmt:he,parentMenuRef:G,parentDir:D}),[z,B,v,he,D]),pe=de>=0?{maxHeight:de,overflow:v}:void 0,ge=t.useMemo(()=>({state:x,align:m,dir:D}),[x,m,D]),ve=t.useMemo(()=>({dir:D}),[D]),be=Qs({block:qs,element:"arrow",modifiers:ve,className:s.className}),ye=e.jsxs("ul",{role:"menu","aria-label":n,...Us(j),...Hs({onPointerEnter:K?.off,onPointerMove:e=>{e.stopPropagation(),B.on(Y,()=>{re(nl.RESET),G.current.focus(ll)})},onPointerLeave:e=>{e.target===e.currentTarget&&B.off()},onKeyDown:e=>{switch(e.key){case tl.HOME:re(nl.FIRST);break;case tl.END:re(nl.LAST);break;case tl.UP:re(nl.DECREASE,ne);break;case tl.DOWN:re(nl.INCREASE,ne);break;case tl.SPACE:return void(e.target&&-1!==e.target.className.indexOf(qs)&&e.preventDefault());default:return}e.preventDefault(),e.stopPropagation()},onAnimationEnd:()=>{"closing"===x&&I(),zs(k)}},R),ref:bl(d,G),className:Qs({block:qs,modifiers:ge,className:a}),style:{...o,...pe,margin:0,display:"closed"===x?"none":void 0,position:il,left:O.x,top:O.y},children:[i&&e.jsx("li",{"aria-hidden":!0,...s,className:be,style:{display:"block",position:il,left:P.x,top:P.y,...s.style},ref:ee}),e.jsx(Ks.Provider,{value:me,children:e.jsx(Ys.Provider,{value:fe,children:e.jsx(Xs.Provider,{value:ne,children:zs(M,ge)})})})]});return f?e.jsx(ul,{...f,isOpen:oe,children:ye}):ye},wl=t.forwardRef(function({"aria-label":n,className:a,containerProps:o,initialMounted:i,unmountOnClose:s,transition:l,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:f,reposition:d="auto",submenuOpenDelay:h=300,submenuCloseDelay:m=150,viewScroll:p="initial",portal:g,theming:v,onItemClick:b,...y},w){const x=t.useRef(null),k=t.useRef({}),{anchorRef:j,state:_,onClose:N}=y,S=t.useMemo(()=>({initialMounted:i,unmountOnClose:s,transition:l,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:f,rootMenuRef:x,rootAnchorRef:j,scrollNodesRef:k,reposition:d,viewScroll:p,submenuOpenDelay:h,submenuCloseDelay:m}),[i,s,l,c,j,u,f,d,p,h,m]),M=t.useMemo(()=>({handleClick(e,t){e.stopPropagation||zs(b,e);let n=e.keepOpen;void 0===n&&(n=t&&e.key===tl.SPACE),n||zs(N,{value:e.value,key:e.key,reason:rl.CLICK})},handleClose(e){zs(N,{key:e,reason:rl.CLICK})}}),[b,N]);if(!_)return null;const C=e.jsx(el.Provider,{value:S,children:e.jsx(Zs.Provider,{value:M,children:e.jsx(yl,{...y,ariaLabel:n||"Menu",externalRef:w,containerRef:x,containerProps:{className:a,containerRef:x,containerProps:o,theming:v,transition:l,onClose:N}})})});return!0===g&&"undefined"!=typeof document?r.createPortal(C,document.body):g?g.target?r.createPortal(C,g.target):g.stablePosition?null:C:C}),xl=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],kl=e=>({_s:e,status:xl[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),jl=e=>e?6:5,_l=(e,t,n,r,a)=>{clearTimeout(r.current);const o=kl(e);t(o),n.current=o,a&&a({current:o})},Nl=({enter:e=!0,exit:n=!0,preEnter:r,preExit:a,timeout:o,initialEntered:i,mountOnEnter:s,unmountOnExit:l,onStateChange:c}={})=>{const[u,f]=t.useState(()=>kl(i?2:jl(s))),d=t.useRef(u),h=t.useRef(),[m,p]=(e=>"object"==typeof e?[e.enter,e.exit]:[e,e])(o),g=t.useCallback(()=>{const e=((e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return jl(t)}})(d.current._s,l);e&&_l(e,f,d,h,c)},[c,l]);return[u,t.useCallback(t=>{const o=e=>{switch(_l(e,f,d,h,c),e){case 1:m>=0&&(h.current=setTimeout(g,m));break;case 4:p>=0&&(h.current=setTimeout(g,p));break;case 0:case 3:h.current=((e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0))(o,e)}},i=d.current.isEnter;"boolean"!=typeof t&&(t=!i),t?!i&&o(e?r?0:1:2):i&&o(n?a?3:4:jl(l))},[g,c,e,n,r,a,m,p,l]),g]},Sl=({initialOpen:e,initialMounted:n,unmountOnClose:r,transition:a,transitionTimeout:o=500,onMenuChange:i}={})=>{const s=Bs(a,"open"),l=Bs(a,"close"),[{status:c},u,f]=Nl({initialEntered:e,mountOnEnter:!n,unmountOnExit:r,timeout:o,enter:s,exit:l,onStateChange:t.useCallback(({current:{isEnter:e,isResolved:t}})=>{!i||e&&s&&t||!e&&l&&t||i({open:e})},[i,s,l])});return[{state:ol[c],endTransition:f},u]},Ml=parseInt(t.version)<19,Cl=t.forwardRef(function({"aria-label":n,captureFocus:r,initialOpen:a,menuButton:o,instanceRef:i,onMenuChange:s,...l},c){const[u,f,d]=(e=>{const[n,r]=Sl(e),[a,o]=t.useState();return[{menuItemFocus:a,...n},r,(e,t)=>{o({position:e,alwaysUpdate:t}),r(!0)}]})({...l,onMenuChange:s}),{state:h}=u,m=Ds(h),p=t.useRef(null),g=((e,n)=>{if("production"!==process.env.NODE_ENV&&"function"!=typeof n)throw new Error("[React-Menu] useClick/useHover requires a function in the second parameter.");const[r]=t.useState({});return{onMouseDown:()=>{r.v=e&&"closed"!==e},onClick:e=>r.v?r.v=!1:n(!0,e)}})(h,(e,t)=>d(t.detail?void 0:al.FIRST)),v=t.useCallback(e=>{f(!1),e.key&&p.current.focus()},[f]),b=zs(o,{open:m});if(!b||!b.type)throw new Error("Menu requires a menuButton prop.");const y={...Hs({onKeyDown:e=>{switch(e.key){case tl.UP:d(al.LAST);break;case tl.DOWN:d(al.FIRST);break;default:return}e.preventDefault()},...g},b.props),ref:bl(Ml?b.ref:b.props.ref,p)};"MenuButton"===b.type[$s]&&(y.isOpen=m);const w=t.cloneElement(b,y);return t.useImperativeHandle(i,()=>({openMenu:d,closeMenu:()=>f(!1)})),e.jsxs(t.Fragment,{children:[w,e.jsx(wl,{...l,...u,"aria-label":n||("string"==typeof b.props.children?b.props.children:"Menu"),anchorRef:p,ref:c,onClose:v})]})}),Tl=(n,r)=>{const a=t.memo(r),o=t.forwardRef((n,r)=>{const o=t.useRef(null);return e.jsx(a,{...n,itemRef:o,externalRef:r,isHovering:t.useContext(Xs)===o.current})});return o.displayName=`WithHovering(${n})`,o},Rl=(e,n,r,a)=>{const[o,i,s]=(e=>{const[n,r]=t.useState(!1);return t.useEffect(()=>{!e&&r(!1)},[e]),[n,()=>!n&&r(!0),()=>r(!1)]})(r),{submenuCloseDelay:l}=t.useContext(el),{isParentOpen:c,submenuCtx:u,dispatch:f,updateItems:d}=t.useContext(Ys),h=()=>{!r&&!a&&f(nl.SET,e.current)},m=()=>{!a&&f(nl.UNSET,e.current)};return((e,t,n)=>{gl(()=>{if("production"!==process.env.NODE_ENV&&!n)throw new Error(`[React-Menu] This menu item or submenu should be rendered under a menu: ${t.current.outerHTML}`);if(e)return;const r=t.current;return n(r,!0),()=>{n(r)}},[e,t,n])})(a,e,d),t.useEffect(()=>{r&&c&&n.current&&n.current.focus()},[n,r,c]),{mouseOver:o,setHover:h,onBlur:e=>{r&&!e.currentTarget.contains(e.relatedTarget)&&m()},onPointerMove:e=>{a||(e.stopPropagation(),i(),u.on(l,h,h))},onPointerLeave:(e,t)=>{s(),u.off(),!t&&m()}}},Ol=Tl("MenuItem",function({className:n,value:r,href:a,type:o,checked:i,disabled:s,children:l,onClick:c,isHovering:u,itemRef:f,externalRef:d,...h}){const m=!!s,{mouseOver:p,setHover:g,...v}=Rl(f,f,u,m),b=t.useContext(Zs),y=t.useContext(Gs),w="radio"===o,x="checkbox"===o,k=!(!a||m||w||x),j=w?y.value===r:!!x&&!!i,_=e=>{if(m)return e.stopPropagation(),void e.preventDefault();const t={value:r,syntheticEvent:e};void 0!==e.key&&(t.key=e.key),x&&(t.checked=!j),w&&(t.name=y.name),zs(c,t),w&&zs(y.onRadioChange,t),b.handleClick(t,x||w)},N=t.useMemo(()=>({type:o,disabled:m,hover:p||u,checked:j,anchor:k}),[o,m,p,u,j,k]),S=Hs({...v,onPointerDown:g,onKeyDown:e=>{if(u)switch(e.key){case tl.ENTER:e.preventDefault();case tl.SPACE:k?f.current.click():_(e)}},onClick:_},h),M={role:w?"menuitemradio":x?"menuitemcheckbox":"menuitem","aria-checked":w||x?j:void 0,...Us(m,u),...S,ref:bl(d,f),className:Qs({block:qs,element:"item",modifiers:N,className:n}),children:t.useMemo(()=>zs(l,N),[l,N])};return k?e.jsx("li",{role:sl,children:e.jsx("a",{href:a,...M})}):e.jsx("li",{...M})}),El=t.memo(t.forwardRef(function({className:t,...n},r){return e.jsx("li",{role:sl,...n,ref:r,className:Qs({block:qs,element:"header",className:t})})}));var Pl=t["undefined"!=typeof document&&void 0!==document.createElement?"useLayoutEffect":"useEffect"];function Fl(){}function Al(e,n,r){void 0===r&&(r={});var a=Bl(r.polyfill),o=(e=>{var n=t.useRef(e);return t.useEffect(()=>{n.current=e}),n})(n);return Pl(()=>{function t(e,t){n||o.current(e,t)}var n=0,r=e&&"current"in e?e.current:e;return r?(a.subscribe(r,t),()=>{n=1,a.unsubscribe(r,t)}):Fl},[e,a,o]),a.observer}var Il,Dl,Ll,Bl=e=>Il||(Il=function(e){var t=0,n=[],r=new Map,a=new(e||window.ResizeObserver)((e,a)=>{n=n.concat(e),t||window.requestAnimationFrame(function(){for(var e=new Set,o=function(t){if(e.has(n[t].target))return"continue";e.add(n[t].target);var o=r.get(n[t].target);null==o||o.forEach(e=>e(n[t],a))},i=0;i<n.length;i++)o(i);n=[],t=0}),t=1});return{observer:a,subscribe(e,t){var n;a.observe(e);var o=null!==(n=r.get(e))&&void 0!==n?n:[];o.push(t),r.set(e,o)},unsubscribe(e,t){var n,o=null!==(n=r.get(e))&&void 0!==n?n:[];if(1===o.length)return a.unobserve(e),void r.delete(e);var i=o.indexOf(t);-1!==i&&o.splice(i,1),r.set(e,o)}}}(e));function zl(){if(Ll)return Dl;Ll=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,r=/^0o[0-7]+$/i,a=parseInt,o="object"==typeof s&&s&&s.Object===Object&&s,i="object"==typeof self&&self&&self.Object===Object&&self,l=o||i||Function("return this")(),c=Object.prototype.toString,u=Math.max,f=Math.min,d=function(){return l.Date.now()};function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function m(o){if("number"==typeof o)return o;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==c.call(e)}(o))return NaN;if(h(o)){var i="function"==typeof o.valueOf?o.valueOf():o;o=h(i)?i+"":i}if("string"!=typeof o)return 0===o?o:+o;o=o.replace(e,"");var s=n.test(o);return s||r.test(o)?a(o.slice(2),s?2:8):t.test(o)?NaN:+o}return Dl=function(e,t,n){var r,a,o,i,s,l,c=0,p=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var n=r,o=a;return r=a=void 0,c=t,i=e.apply(o,n)}function y(e){var n=e-l;return void 0===l||n>=t||n<0||g&&e-c>=o}function w(){var e=d();if(y(e))return x(e);s=setTimeout(w,function(e){var n=t-(e-l);return g?f(n,o-(e-c)):n}(e))}function x(e){return s=void 0,v&&r?b(e):(r=a=void 0,i)}function k(){var e=d(),n=y(e);if(r=arguments,a=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(w,t),p?b(e):i}(l);if(g)return s=setTimeout(w,t),b(l)}return void 0===s&&(s=setTimeout(w,t)),i}return t=m(t)||0,h(n)&&(p=!!n.leading,o=(g="maxWait"in n)?u(m(n.maxWait)||0,t):o,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=a=s=void 0},k.flush=function(){return void 0===s?i:x(d())},k},Dl}var $l=l(zl()),Vl="canvas-module_canvas__Iiaz4",Hl="canvas-module_textCanvas__eFxM4",Wl="Highlight-module_highlight__1VV-X";function Ul(n){const{canvasRef:r,barHeight:a,xyToHighlightData:o,zoom:i}=n,[s,l]=t.useState({height:"0px",visibility:"hidden"}),c=t.useRef(null),u=t.useRef(null),f=t.useRef(null);t.useEffect(()=>{l({height:"0px",visibility:"hidden"})},[i]);const d=e=>{const t=c.current;if(!t)return void l(e);const n=f.current;n&&n.left===e.left&&n.top===e.top&&n.width===e.width&&n.visibility===e.visibility||(f.current=e,t.style.visibility=String(e.visibility||""),void 0!==e.left&&(t.style.left=String(e.left)),void 0!==e.top&&(t.style.top=String(e.top)),void 0!==e.width&&(t.style.width=String(e.width)),void 0!==e.height&&(t.style.height=String(e.height)))},h=e=>{u.current&&cancelAnimationFrame(u.current);const t=e.offsetX,n=e.offsetY;u.current=requestAnimationFrame(()=>{const e=o(t,n);if(e.isJust){const t=e.value;d({visibility:"visible",height:`${a}px`,...t})}else m()})},m=()=>{d({...f.current||{},visibility:"hidden"})};return t.useEffect(()=>{const e=r.current;return e?(e.addEventListener("mousemove",h),e.addEventListener("mouseout",m),()=>{e.removeEventListener("mousemove",h),e.removeEventListener("mouseout",m),u.current&&cancelAnimationFrame(u.current)}):()=>{}},[r.current,h,m]),e.jsx("div",{ref:c,className:Wl,style:s,"data-testid":"flamegraph-highlight"})}var Jl="ContextMenuHighlight-module_highlightContextMenu__WI1nK";const Ql={height:"0px",visibility:"hidden"};function ql(n){const{node:r,barHeight:a}=n,[o,i]=t.useState(Ql);return t.useEffect(()=>{r.match({Nothing:()=>i(Ql),Just:e=>i({visibility:"visible",height:`${a}px`,...e})})},[r]),e.jsx("div",{className:Jl,style:o,"data-testid":"flamegraph-highlight-contextmenu"})}const Xl={name:"Default",goodColor:po.rgb(0,170,0),neutralColor:po.rgb(148,142,142),badColor:po.rgb(200,0,0),colors:[po.hsl(24,69,60),po.hsl(34,65,65),po.hsl(194,52,61),po.hsl(163,45,55),po.hsl(211,48,60),po.hsl(246,40,65),po.hsl(305,63,79),po.hsl(47,100,73),po.rgb(183,219,171),po.rgb(244,213,152),po.rgb(78,146,249),po.rgb(249,186,143),po.rgb(242,145,145),po.rgb(130,181,216),po.rgb(229,168,226),po.rgb(174,162,224),po.rgb(154,196,138),po.rgb(242,201,109),po.rgb(101,197,219),po.rgb(249,147,78),po.rgb(234,100,96),po.rgb(81,149,206),po.rgb(214,131,206),po.rgb(128,110,183)]},Yl={...Xl,name:"Color Blind",goodColor:po.rgb(26,133,255),neutralColor:po.rgb(148,142,142),badColor:po.rgb(220,50,32)};function Kl(){return e.jsxs("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",children:[e.jsx("defs",{}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M5,19.56c0,5.22,3.54,9.44,7.92,9.44h3.17c4.37,0,7.92-4.23,7.92-9.44v-7.56H5v7.56Z"}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M14,1h-.82c-4.52,0-8.18,3.73-8.18,8.33v1.67H14V1Z"}),e.jsx("path",{d:"M15.82,1h-.82V11h9v-1.67c0-4.6-3.66-8.33-8.18-8.33Z"})]})}function Zl(){return e.jsxs("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",children:[e.jsx("defs",{}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M24,19.56c0,5.22-3.54,9.44-7.92,9.44h-3.17c-4.37,0-7.92-4.23-7.92-9.44v-7.56H24v7.56Z"}),e.jsx("path",{style:{fill:"#7d7d7f"},d:"M15,1h.82c4.52,0,8.18,3.73,8.18,8.33v1.67H15V1Z"}),e.jsx("path",{d:"M13.18,1h.82V11H5v-1.67c0-4.6,3.66-8.33,8.18-8.33Z"})]})}var Gl={tooltip:"Tooltip-module_tooltip__NMZ65",flamegraphDiffTooltip:"Tooltip-module_flamegraphDiffTooltip__Z983o",tooltipName:"Tooltip-module_tooltipName__y4Qs3",functionName:"Tooltip-module_functionName__z9LHO",tooltipTable:"Tooltip-module_tooltipTable__ct3pq",clickInfo:"Tooltip-module_clickInfo__Utux5"};const ec={location:"Location",self:"Self",total:"Total",baseline:"Baseline",comparison:"Comparison",diff:"Diff",noItemsFound:"No items found",diffNew:"new",diffRemoved:"removed",tooltipSamples:"Samples:",tooltipUnitTitles:{objects:{percent:"% of objects in RAM",formattedValue:"Objects in RAM",total:"% of total RAM"},goroutines:{percent:"% of goroutines",formattedValue:"Goroutines",total:"% of total goroutines"},bytes:{percent:"% of RAM",formattedValue:"RAM",total:"% of total bytes"},samples:{percent:"Share of CPU",formattedValue:"CPU Time",total:"% of total CPU"},lock_nanoseconds:{percent:"% of Time spent",formattedValue:"Time",total:"% of total seconds"},lock_samples:{percent:"% of contended locks",formattedValue:"Contended locks",total:"% of total locks"},trace_samples:{percent:"% of time",formattedValue:"Samples",total:"% of total samples"},exceptions:{percent:"% of thrown exceptions",formattedValue:"Thrown exceptions",total:"% of total thrown exceptions"},unknown:{percent:"Percentage",formattedValue:"Units",total:"% of total units"}},resetView:"Reset View",collapseNodesAbove:"Collapse nodes above",copyFunctionName:"Copy function name",highlightSimilarNodes:"Highlight similar nodes",clearHighlight:"Clear highlight",openInSandwichView:"Open in sandwich view",showTextTailFirst:"Show text tail first",showTextHeadFirst:"Show text head first",headFirst:"Head first",tailFirst:"Tail first",clickToHighlightNode:"Click to highlight node in flamegraph",rightClickForMoreNodeOptions:"Right click for more node viewing options",viewTable:"Table",viewTableAndFlamegraph:"Table and Flamegraph",viewFlamegraph:"Flamegraph",viewSandwich:"Sandwich",viewGraphviz:"GraphViz",more:"More",diffLegendRemovedLabel:"(-) Removed",diffLegendAddedLabel:"Added (+)",diffLegendSelectPalette:"Select a palette",paletteDefaultName:"Default",paletteColorBlindName:"Color Blind",paletteDefaultDesc:"(green to red)",paletteColorBlindDesc:"(blue to red)",searchPlaceholder:"Search...",syncSearchBars:"Sync Search Bars",unsyncSearchBars:"Unsync Search Bars",focusOnThisFunction:"Focus on this function",tableDoubleClickToFocus:"Double-click to focus in flamegraph",tableRightClickForOptions:"Right-click for more options",collapsedLevelsSingular:"total (1 level collapsed)",collapsedLevelsPlural:"total ({n} levels collapsed)",ofTotal:"of total",clearFocus:"Clear focus",sampleCountFormat:[{value:1e15,label:"Quad"},{value:1e12,label:"Tri"},{value:1e9,label:"B"},{value:1e6,label:"M"},{value:1e3,label:"K"}]},tc={...ec,location:"位置",self:"自身",total:"总计",baseline:"基线",comparison:"对比",diff:"差异",noItemsFound:"没有找到任何条目",diffNew:"新增",diffRemoved:"移除",tooltipSamples:"样本数:",tooltipUnitTitles:{objects:{percent:"RAM 中对象占比",formattedValue:"RAM 中对象数",total:"占总 RAM 的百分比"},goroutines:{percent:"协程占比",formattedValue:"协程数量",total:"占协程总数的百分比"},bytes:{percent:"RAM 占比",formattedValue:"RAM",total:"占总字节数的百分比"},samples:{percent:"CPU 占比",formattedValue:"CPU 时间",total:"占总 CPU 的百分比"},lock_nanoseconds:{percent:"耗时占比",formattedValue:"时间",total:"占总秒数的百分比"},lock_samples:{percent:"锁竞争事件占比",formattedValue:"锁竞争事件数",total:"占锁竞争总数的百分比"},trace_samples:{percent:"时间占比",formattedValue:"样本数",total:"占样本总数的百分比"},exceptions:{percent:"异常抛出占比",formattedValue:"异常数",total:"占异常总数的百分比"},unknown:{percent:"百分比",formattedValue:"单位",total:"占单位总量的百分比"}},resetView:"重置视图",collapseNodesAbove:"收起上方节点",copyFunctionName:"复制函数名",highlightSimilarNodes:"高亮相似节点",clearHighlight:"清除高亮",openInSandwichView:"在 sandwich 视图中查看",showTextTailFirst:"显示文本尾部优先",showTextHeadFirst:"显示文本头部优先",headFirst:"从头部开始显示",tailFirst:"从尾部开始显示",clickToHighlightNode:"点击火焰图节点高亮",rightClickForMoreNodeOptions:"右键查看更多节点选项",viewTable:"表格",viewTableAndFlamegraph:"表格 + 火焰图",viewFlamegraph:"火焰图",viewSandwich:"三明治视图",viewGraphviz:"调用图 (GraphViz)",more:"更多",diffLegendRemovedLabel:"(-) 减少",diffLegendAddedLabel:"增加 (+)",diffLegendSelectPalette:"选择颜色方案",paletteDefaultName:"默认",paletteColorBlindName:"色盲",paletteDefaultDesc:"(绿色 → 红色)",paletteColorBlindDesc:"(蓝色 → 红色)",searchPlaceholder:"搜索...",syncSearchBars:"同步搜索栏",unsyncSearchBars:"取消同步搜索栏",focusOnThisFunction:"聚焦到此函数",tableDoubleClickToFocus:"双击可聚焦到火焰图",tableRightClickForOptions:"右键查看更多选项",collapsedLevelsSingular:"总计(已折叠 1 层)",collapsedLevelsPlural:"总计(已折叠 {n} 层)",ofTotal:"占总量",clearFocus:"清除聚焦",sampleCountFormat:[{value:1e12,label:"兆"},{value:1e8,label:"亿"},{value:1e4,label:"万"},{value:1e3,label:"千"}]},nc=t.createContext(ec),rc=nc,ac=({messages:n,children:r})=>{const a=t.useMemo(()=>{var e;return{...ec,...n,tooltipUnitTitles:{...ec.tooltipUnitTitles,...null!==(e=null==n?void 0:n.tooltipUnitTitles)&&void 0!==e?e:{}}}},[n]);return e.jsx(nc.Provider,{value:a,children:r})},oc=()=>t.useContext(nc);function ic(e){if(!e)return null;const t=e.replace(/,/g,"").trim();if(!t)return null;const n=Number(t);return Number.isFinite(n)?n:null}function sc(e,t){if(!e||!t)return;const n=e.trim().replace(/\u2212/g,"-");return n&&"0"!==n?n.startsWith("+")?t.badColor.rgb().string():n.startsWith("-")?t.goodColor.rgb().string():void 0:void 0}function lc(e,t,n){return n<t?t:Math.max(t,Math.min(n,e))}function cc(e,t,n,r){const a=window.innerWidth,o=window.innerHeight,i=Math.max(0,n||0),s=Math.max(0,r||0);let l=e+12,c=t+20;return l+i+8>a&&(l=e-i-12),c+s+8>o&&(c=t-s-20),l=lc(l,8,a-i-8),c=lc(c,8,o-s-8),{left:l,top:c}}function uc({shouldShowFooter:n=!0,shouldShowTitle:r=!0,dataSourceRef:a,clickInfoSide:o,setTooltipContent:i,palette:s}){const l=t.useRef(null),c=t.useRef(null),u=t.useRef(null),f=t.useRef(null),[d,h]=t.useState({title:{text:"",diff:{text:"",color:""}},tooltipData:[]}),[m,p]=t.useState(),g=()=>{p({visibility:"hidden"}),h({title:{text:"",diff:{text:"",color:""}},tooltipData:[]})},v=t.useCallback(e=>{u.current&&cancelAnimationFrame(u.current);const t=e.clientX,n=e.clientY;u.current=requestAnimationFrame(()=>{if(!l.current)throw new Error("Missing tooltipElement");c.current={x:t,y:n},i(h,g,e);const r=l.current.clientWidth||0,a=l.current.clientHeight||0,{left:o,top:s}=cc(t,n,r,a);p({top:s,left:o,visibility:"visible"})})},[i]);return t.useEffect(()=>{const e=a.current;if(!e)return()=>{};const t=()=>{g()},n=t=>{e.contains(t.target)||g()};return e.addEventListener("mousemove",v),e.addEventListener("mouseout",g),e.addEventListener("mouseleave",t),window.addEventListener("mousemove",n,{passive:!0}),window.addEventListener("blur",t),()=>{e.removeEventListener("mousemove",v),e.removeEventListener("mouseout",g),e.removeEventListener("mouseleave",t),window.removeEventListener("mousemove",n),window.removeEventListener("blur",t),u.current&&cancelAnimationFrame(u.current)}},[a.current,v]),t.useLayoutEffect(()=>{if(!l.current)return;if(!c.current)return;if(0===d.tooltipData.length)return;const{x:e,y:t}=c.current,n=l.current.getBoundingClientRect(),r=n.width,a=n.height,o=f.current;if(o&&Math.abs(o.w-r)<1&&Math.abs(o.h-a)<1)return;f.current={w:r,h:a};const{left:i,top:s}=cc(e,t,r,a);p(e=>e&&e.left===i&&e.top===s&&"visible"===e.visibility?e:{...e||{},left:i,top:s,visibility:"visible"})},[d.tooltipData.length,d.title.text]),e.jsx("div",{"data-testid":"tooltip",className:ds(Gl.tooltip,{[Gl.flamegraphDiffTooltip]:d.tooltipData.length>1}),style:{...m,textAlign:"center"},ref:l,children:d.tooltipData.length>0&&e.jsxs(e.Fragment,{children:[r&&e.jsx("div",{className:Gl.tooltipName,"data-testid":"tooltip-title",children:d.title.text}),e.jsx("div",{className:Gl.functionName,"data-testid":"tooltip-function-name",children:d.title.text}),d.title.diff.text.length>0?e.jsx(fc,{data:d.tooltipData,diff:d.title.diff,palette:s}):e.jsx(fc,{data:d.tooltipData,palette:s}),n&&e.jsx(dc,{clickInfoSide:o})]})})}function fc({data:t,diff:n,palette:r}){const a=oc(),[o,i]=t,s="Location"!==a.location;if(!o)return null;let l;switch(o.tooltipType){case"flamegraph":l=()=>{const t=i&&function(e,t){const n=Oa(e),r=Oa(t);if(!n||!r)return"";const a=r.value-n.value;if(0===a)return"0";const o=a>0?"+":"-",i=Math.abs(a);let s;s=i>=100?i.toFixed(0):i>=10?i.toFixed(1):i.toFixed(2);const l=n.unit||r.unit;return l?`${o}${s} ${l}`:`${o}${s}`}(o.formattedValue,i.formattedValue),l=Ea(t,s),c=i&&function(e,t){const n=ic(e),r=ic(t);if(null==n||null==r)return"";const a=r-n;return 0===a?"0":`${a>0?"+":"-"}${Math.abs(a).toLocaleString()}`}(o.samples,i.samples),u=Ea(o.formattedValue,s),f=Ea(null==i?void 0:i.formattedValue,s),d=null==n?void 0:n.color,h=sc(t,r),m=sc(c,r);return e.jsxs(e.Fragment,{children:[i&&e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{}),e.jsx("th",{children:a.baseline}),e.jsx("th",{children:a.comparison}),e.jsx("th",{children:a.diff})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsxs("td",{children:[a.tooltipUnitTitles[o.units].percent,":"]}),e.jsx("td",{children:o.percent}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:i.percent}),e.jsx("td",{style:{textAlign:"center"},children:n&&e.jsx("span",{"data-testid":"tooltip-diff",style:{color:d},children:n.text})})]})]}),e.jsxs("tr",{children:[e.jsxs("td",{children:[a.tooltipUnitTitles[o.units].formattedValue,":"]}),e.jsx("td",{children:u}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:f}),e.jsx("td",{style:{textAlign:"center"},children:l&&e.jsx("span",{"data-testid":"tooltip-time-diff",style:h?{color:h}:void 0,children:l})})]})]}),e.jsxs("tr",{children:[e.jsx("td",{children:a.tooltipSamples}),e.jsx("td",{children:o.samples}),i&&e.jsxs(e.Fragment,{children:[e.jsx("td",{children:i.samples}),e.jsx("td",{style:{textAlign:"center"},children:c&&e.jsx("span",{"data-testid":"tooltip-samples-diff",style:m?{color:m}:void 0,children:c})})]})]})]})]})};break;case"table":l=()=>e.jsxs(e.Fragment,{children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("td",{}),e.jsxs("td",{children:[a.self," (",a.tooltipUnitTitles[o.units].total,")"]}),e.jsxs("td",{children:[a.total," (",a.tooltipUnitTitles[o.units].total,")"]})]})}),e.jsx("tbody",{children:e.jsxs("tr",{children:[e.jsxs("td",{children:[a.tooltipUnitTitles[o.units].formattedValue,":"]}),e.jsx("td",{children:o.self}),e.jsx("td",{children:o.total})]})})]});break;default:l=()=>null}return e.jsx("table",{"data-testid":"tooltip-table",className:ds(Gl.tooltipTable,{[Gl[`${o.tooltipType}${i?"Diff":""}`]]:o.tooltipType}),style:{textAlign:"center",margin:"0 auto"},children:l()})}function dc({clickInfoSide:t}){const n=oc();let r;switch(t){case"right":r=e.jsxs(e.Fragment,{children:[e.jsx(Kl,{}),e.jsx("span",{children:n.rightClickForMoreNodeOptions})]});break;case"left":r=e.jsxs(e.Fragment,{children:[e.jsx(Zl,{}),e.jsx("span",{children:n.clickToHighlightNode})]});break;default:r=e.jsx(e.Fragment,{})}return e.jsx("div",{"data-testid":"tooltip-footer",className:Gl.clickInfo,children:r})}function hc(n){const{format:r,canvasRef:a,xyToData:o,numTicks:i,sampleRate:s,units:l,leftTicks:c,rightTicks:u,palette:f}=n,d=oc(),h=t.useCallback((e,t,n)=>{const a=Ia(i,s,l),h=o(n.offsetX,n.offsetY);let m;var p;if(h.isJust)switch(m=h.value,m.format){case"single":{const t={percent:(p=m.total/i,`${Fa(p)}%`),samples:"trace_samples"===l?"":Ra(m.total),units:l,formattedValue:a.format(m.total,s),tooltipType:"flamegraph"};e({title:{text:m.name,diff:{text:"",color:""}},tooltipData:[t]});break}case"double":{if("single"===r)throw new Error("props format is 'single' but it has been mapped to 'double'");const t=mc({formatter:a,sampleRate:s,totalLeft:m.totalLeft,leftTicks:c,totalRight:m.totalRight,rightTicks:u,title:m.name,units:l},f,d);e({title:t.title,tooltipData:t.tooltipData});break}default:throw new Error(`Unsupported format: '${m.format}'`)}else t()},[i,s,l,c,u,f,o,r,d]);return e.jsx(uc,{dataSourceRef:a,clickInfoSide:"right",setTooltipContent:h,palette:f})}function mc({formatter:e,sampleRate:t,totalLeft:n,leftTicks:r,totalRight:a,rightTicks:o,title:i,units:s},l=Xl,c){var u,f;const d=o>0?a/o:0,h=Fa(r>0?n/r:0),m=Fa(d),p={percent:`${h}%`,samples:Ra(n),units:s,formattedValue:e.format(n,t),tooltipType:"flamegraph"},g={percent:`${m}%`,samples:Ra(a),units:s,formattedValue:e.format(a,t),tooltipType:"flamegraph"};let v=Aa(h,m);Number.isFinite(v)||(v=0);let b="";v>0?b=l.badColor.rgb().string():v<0&&(b=l.goodColor.rgb().string());let y="";return 0===n&&a>0?y=null!==(u=null==c?void 0:c.diffNew)&&void 0!==u?u:"新增":0===a&&n>0?y=null!==(f=null==c?void 0:c.diffRemoved)&&void 0!==f?f:"移除":0===v?y="0%":v>0?y=`+${v.toFixed(2)}%`:v<0&&(y=`${v.toFixed(2)}%`),{title:{text:i,diff:{text:y,color:b}},tooltipData:[p,g]}}var pc="ContextMenu-module_menu__x-AtY";function gc(n){const[r,a]=Sl({transition:!0}),[o,i]=t.useState({x:0,y:0}),{canvasRef:s}=n,[l,c]=t.useState([]),{xyToMenuItems:u,onClose:f,onOpen:d}=n;return t.useEffect(()=>{a(!1);const e=s.current;if(!e)return()=>{};const t=e=>{e.preventDefault();const t=u(e.offsetX,e.offsetY);c(t);const n=e.clientX,r=e.clientY+20;i({x:n,y:r}),a(!0),d(e.offsetX,e.offsetY)};return e.addEventListener("contextmenu",t),()=>{e.removeEventListener("contextmenu",t)}},[u]),e.jsx(wl,{...r,className:pc,anchorPoint:o,onClose:()=>{a(!1),f()},children:l})}var vc="LogoLink-module_logoLink__oWRri";function bc(){return e.jsxs("a",{className:vc,href:"https://github.com/pyroscope-io/pyroscope/",target:"_blank",rel:"noreferrer",children:[e.jsxs("svg",{width:"22px",height:"22px",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("defs",{children:e.jsxs("radialGradient",{cx:"49.4236252%",cy:"92.6627823%",fx:"49.4236252%",fy:"92.6627823%",r:"195.066755%",gradientTransform:"translate(0.494236,0.926628),scale(1.000000,0.735610),rotate(-90.000000),translate(-0.494236,-0.926628)",id:"radialGradient-1",children:[e.jsx("stop",{stopColor:"#FFB90C",offset:"0%"}),e.jsx("stop",{stopColor:"#F9243A",offset:"38.390924%"}),e.jsx("stop",{stopColor:"#F9243A",offset:"50.5405%"}),e.jsx("stop",{stopColor:"#B51424",offset:"73.98091%"}),e.jsx("stop",{stopColor:"#B51424",offset:"100%"})]})}),e.jsx("g",{id:"Artboard",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:e.jsx("g",{id:"fire-part",transform:"translate(148.516736, 0.000000)",fillRule:"nonzero",children:e.jsxs("g",{id:"whole-thing",transform:"translate(363.983264, 495.000000) scale(-1, 1) rotate(-180.000000) translate(-363.983264, -495.000000) translate(0.483264, 0.000000)",children:[e.jsx("g",{id:"g70",transform:"translate(-0.000091, 0.685815)",fill:"url(#radialGradient-1)",children:e.jsx("path",{d:"M65.3646667,571.739321 L65.4492471,571.698868 C19.5139147,505.999969 -5.32464048,424.477859 1.04305801,336.877516 L1.04305801,336.877516 C14.0321963,158.179446 159.192462,13.7596653 338.059844,1.5917266 L338.059844,1.5917266 C419.418369,-3.93888015 495.500283,17.3823334 558.456522,57.4611191 L558.456522,57.4611191 L481.301947,162.097965 C437.516468,136.521928 399.367671,129.590556 363.486536,130.155994 L363.486536,130.155994 C234.497143,130.155994 129.556988,235.032238 129.556988,363.946998 L129.556988,363.946998 C129.556988,492.865683 234.497143,597.738003 363.486536,597.738003 L363.486536,597.738003 C492.483783,597.738003 597.427864,492.865683 597.427864,363.946998 L597.427864,363.946998 C597.41276,304.634864 581.39383,255.677522 530.630465,199.668053 L607.770843,95.1329436 C680.936847,161.576603 726.932594,257.364176 726.932594,363.946998 L726.932594,363.946998 C726.932594,458.031616 691.13483,543.75602 632.416071,608.271816 L632.416071,608.271816 L632.416071,608.275741 L533.597728,748.122808 L428.601388,617.203806 L434.703262,646.563419 C459.453008,765.59222 433.664131,889.543925 363.49439,988.853335 L363.49439,988.853335 L65.3646667,571.723019 L65.3646667,571.739321 Z",id:"path84"})}),e.jsx("g",{id:"blue",transform:"translate(191.447039, 191.331780)",children:e.jsxs("g",{id:"g88",transform:"translate(-0.000063, 0.685930)",children:[e.jsx("g",{id:"g94",transform:"translate(0.177296, 0.699054)",fill:"#3EC1D3",children:e.jsx("path",{d:"M171.862466,343.697728 C77.0961324,343.697728 -0.00497405932,266.647602 -0.00497405932,171.934957 C-0.00497405932,77.2182874 77.0961324,0.168162396 171.862466,0.168162396 C266.632828,0.168162396 343.741988,77.2182874 343.741988,171.934957 C343.741988,266.647602 266.632828,343.697728 171.862466,343.697728",id:"path96"})}),e.jsx("g",{id:"g98",transform:"translate(29.362379, 172.629585)",fill:"#FFFFFF",children:e.jsx("path",{d:"M22.8397982,0 L0.671669409,0 C0.671669409,78.2496309 64.380874,141.920035 142.678189,141.920035 L142.678189,119.765407 C76.6007327,119.765407 22.8397982,66.0372141 22.8397982,0",id:"path100"})})]})})]})})})]}),e.jsx("span",{children:"Pyroscope"})]})}const yc=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 208H676V232h212v136zm0 224H676V432h212v160zM412 432h200v160H412V432zm200-64H412V232h200v136zm-476 64h212v160H136V432zm0-200h212v136H136V232zm0 424h212v136H136V656zm276 0h200v136H412V656zm476 136H676V656h212v136z"})}),wc=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"})}),xc=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"64 64 896 896",fill:"currentColor",children:e.jsx("path",{d:"M834.1 469.2A347.49 347.49 0 00751.2 354l-29.1-26.7a8.09 8.09 0 00-13 3.3l-13 37.3c-8.1 23.4-23 47.3-44.1 70.8-1.4 1.5-3 1.9-4.1 2-1.1.1-2.8-.1-4.3-1.5-1.4-1.2-2.1-3-2-4.8 3.7-60.2-14.3-128.1-53.7-202C555.3 171 510 123.1 453.4 89.7l-41.3-24.3c-5.4-3.2-12.3 1-12 7.3l2.2 48c1.5 32.8-2.3 61.8-11.3 85.9-11 29.5-26.8 56.9-47 81.5a295.64 295.64 0 01-47.5 46.1 352.6 352.6 0 00-100.3 121.5A347.75 347.75 0 00160 610c0 47.2 9.3 92.9 27.7 136a349.4 349.4 0 0075.5 110.9c32.4 32 70 57.2 111.9 74.7C418.5 949.8 464.5 959 512 959s93.5-9.2 136.9-27.3A348.6 348.6 0 00760.8 857c32.4-32 57.8-69.4 75.5-110.9a344.2 344.2 0 0027.7-136c0-48.8-10-96.2-29.9-140.9zM713 808.5c-53.7 53.2-125 82.4-201 82.4s-147.3-29.2-201-82.4c-53.5-53.1-83-123.5-83-198.4 0-43.5 9.8-85.2 29.1-124 18.8-37.9 46.8-71.8 80.8-97.9a349.6 349.6 0 0058.6-56.8c25-30.5 44.6-64.5 58.2-101a240 240 0 0012.1-46.5c24.1 22.2 44.3 49 61.2 80.4 33.4 62.6 48.8 118.3 45.8 165.7a74.01 74.01 0 0024.4 59.8 73.36 73.36 0 0053.4 18.8c19.7-1 37.8-9.7 51-24.4 13.3-14.9 24.8-30.1 34.4-45.6 14 17.9 25.7 37.4 35 58.4 15.9 35.8 24 73.9 24 113.1 0 74.9-29.5 145.4-83 198.4z"})}),kc=({fill:t})=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",fill:t,children:[e.jsx("g",{id:"shape_squiggle",children:e.jsx("path",{d:"M60,38.42c-4.62,0-6.97-2.64-8.86-4.75-1.81-2.03-2.86-3.08-5.13-3.08s-3.32,1.06-5.13,3.08c-1.89,2.12-4.24,4.75-8.86,4.75s-6.97-2.64-8.87-4.75c-1.81-2.03-2.86-3.08-5.14-3.08s-3.33,1.06-5.14,3.08c-1.89,2.12-4.25,4.75-8.87,4.75-1.38,0-2.5-1.12-2.5-2.5s1.12-2.5,2.5-2.5c2.28,0,3.33-1.06,5.14-3.09,1.89-2.12,4.25-4.75,8.87-4.75s6.97,2.64,8.87,4.75c1.81,2.03,2.86,3.09,5.14,3.09s3.32-1.06,5.13-3.08c1.89-2.12,4.24-4.75,8.86-4.75s6.97,2.64,8.86,4.75c1.81,2.03,2.86,3.08,5.13,3.08,1.38,0,2.5,1.12,2.5,2.5s-1.12,2.5-2.5,2.5Z"})}),e.jsxs("g",{id:"Layer_4",children:[e.jsx("rect",{x:"2",y:"8",width:"60",height:"14",rx:"3.94",ry:"3.94"}),e.jsx("path",{d:"M58.06,41h-18.64c-1.58,0-3.14,.42-4.5,1.22l-6.88,4.02c-1.87,1.09-4.19,1.09-6.06,0l-6.88-4.02c-1.37-.8-2.92-1.22-4.5-1.22H5.94c-2.18,0-3.94,1.76-3.94,3.94v7.12c0,2.18,1.76,3.94,3.94,3.94H58.06c2.18,0,3.94-1.76,3.94-3.94v-7.12c0-2.18-1.76-3.94-3.94-3.94Z"})]})]}),jc=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",children:[e.jsx("g",{id:"ab_shape",children:e.jsxs("g",{children:[e.jsx("path",{d:"M16.71,41l-.42-2.45h-.16c-1.63,1.95-4.06,2.95-6.91,2.95-4.8,0-7.86-3.45-7.86-7.45,0-6.4,6.01-9.3,14.13-9.3v-.4c0-1.5-.84-3.2-4.38-3.2-2.48,0-4.9,.75-6.54,1.7l-1.42-4.75c1.69-.9,5.01-2.1,9.44-2.1,8.33,0,10.65,4.95,10.65,10.45v8.7c0,2.25,.11,4.4,.37,5.85h-6.91Zm-.95-11.7c-3.64,0-6.91,.9-6.91,4,0,2.1,1.37,3,3,3s3.22-1.05,3.74-2.6c.11-.35,.16-.8,.16-1.2v-3.2Z"}),e.jsx("path",{d:"M29.36,41c.11-1.79,.21-4.62,.21-7.25V6h7.7v13.46h.11c1.42-1.99,3.8-3.28,7.06-3.28,5.85,0,9.7,5.01,9.65,12.16,0,8.69-5.22,13.16-10.81,13.16-2.74,0-5.22-.99-6.91-3.72h-.11l-.37,3.23h-6.54Zm7.91-9.83c0,.55,.05,.99,.16,1.39,.58,1.94,2.16,3.18,4.01,3.18,3.11,0,4.9-2.53,4.9-7,0-3.92-1.58-6.8-4.9-6.8-1.85,0-3.53,1.39-3.95,3.28-.16,.4-.21,.94-.21,1.44v4.52Z"})]})}),e.jsx("g",{id:"arrows",children:e.jsx("polygon",{points:"62 54 52 45 52 51 35 51 35 57 52 57 52 63 62 54"})})]}),_c=()=>e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 64 64",children:[e.jsx("g",{id:"yz_shape",children:e.jsxs("g",{children:[e.jsx("path",{d:"M22.75,13l3.43,12.39c.42,1.47,.84,3.2,1.16,4.52h.11c.32-1.32,.69-3.05,1-4.47l2.9-12.44h8.01l-5.8,17.16c-2.95,8.33-5.17,12.54-8.07,15.23-2.58,2.39-5.43,3.3-7.17,3.55l-1.85-6.3c1.11-.25,2.32-.76,3.48-1.52,1.16-.71,2.32-1.88,2.95-3.05,.26-.41,.42-.76,.42-1.12,0-.31-.05-.66-.26-1.17L14.32,13h8.43Z"}),e.jsx("path",{d:"M41.62,33.46l7.59-10.16c1.27-1.57,2.37-2.95,3.58-4.27v-.15h-10.33v-5.89h19.45l-.05,4.57-7.28,9.8c-1.21,1.57-2.48,3.15-3.69,4.42v.1h11.33v5.94h-20.61v-4.37Z"})]})}),e.jsx("g",{id:"arrows",children:e.jsx("polygon",{points:"12 51 12 45 2 54 12 63 12 57 29 57 29 51 12 51"})})]});var Nc="Header-module_flamegraphHeader__nIrXP",Sc="Header-module_row__P7-2L",Mc="Header-module_flamegraphTitle__sjsvB";function Cc(t){const{format:n,units:r,toolbarVisible:a}=t,o={objects:"number of objects in RAM per function",goroutines:"number of goroutines",bytes:"amount of RAM per function",samples:"CPU time per function",lock_nanoseconds:"time spent waiting on locks per function",lock_samples:"number of contended locks per function",trace_samples:"aggregated span duration",exceptions:"number of exceptions thrown",unknown:""},i=a&&"single"===n?e.jsx("div",{className:`${Sc} ${Mc}`,role:"heading","aria-level":2,children:o[r]&&e.jsxs(e.Fragment,{children:["Frame width represents ",o[r]]})}):null;return i?e.jsx("div",{className:Nc,children:e.jsx("div",{children:i})}):null}var Tc="FlamegraphBreadcrumb-module_bar__v8uhn",Rc="FlamegraphBreadcrumb-module_chip__pdv1k",Oc="FlamegraphBreadcrumb-module_focusTooltip__nX30y",Ec="FlamegraphBreadcrumb-module_separator__Zj-rC",Pc="FlamegraphBreadcrumb-module_chipSeparator__S-Gld",Fc="FlamegraphBreadcrumb-module_unitLabel__bjHEA",Ac="FlamegraphBreadcrumb-module_focusIcon__aJBb6",Ic="FlamegraphBreadcrumb-module_ofTotal__kk4dt",Dc="FlamegraphBreadcrumb-module_clearBtn__spimK";function Lc(t){const{totalValueText:n,totalSamplesText:r,samplesLabel:a,unitLabel:o,hasFocus:i,focusPercent:s,focusLabel:l,ofTotalPlacement:c="after",ofTotalLabel:u,clearFocusLabel:f,onClearFocus:d}=t,h=l&&l.trim().length>0?l:void 0;return e.jsxs("div",{className:Tc,"aria-live":"polite",children:[e.jsxs("span",{className:Rc,children:[e.jsx("span",{children:n}),e.jsx("span",{className:Ec,children:"|"}),e.jsxs("span",{children:[r," ",a]}),e.jsxs("span",{className:Fc,children:["(",o,")"]})]}),i&&void 0!==s&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:Pc,children:">"}),e.jsxs("span",{className:`${Rc} ${Oc}`,"data-tooltip":h,children:[e.jsx("span",{className:Ac,"aria-hidden":"true",children:e.jsxs("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6-10-6-10-6Z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3.2"})]})}),"before"===c?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:Ic,children:u}),e.jsxs("span",{children:[s.toFixed(2),"%"]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:[s.toFixed(2),"%"]}),e.jsx("span",{className:Ic,children:u})]}),e.jsx("button",{type:"button",className:Dc,"aria-label":f,onClick:e=>{e.preventDefault(),e.stopPropagation(),d()},children:"×"})]})]})]})}var Bc="styles-module_flamegraphPane__ejguD",zc="styles-module_fitModeItem__0UBwN",$c="styles-module_sandwichItem__WYvnd",Vc="styles-module_flamegraphFrame__9ZW-z";function Hc(n){const r=t.useRef(null),o=t.useRef(null),s=t.useRef(),l=t.useRef(),c=t.useRef(null),u=t.useRef(null),f=t.useRef(null),d=t.useRef({rect:!1,text:!1}),h=oc(),m=t.useRef({lastWidth:0,lastHeight:0}),p="undefined"!=typeof window&&"undefined"!=typeof OffscreenCanvas&&"transferControlToOffscreen"in HTMLCanvasElement.prototype,[g,v]=t.useState(p),b=t.useRef(!1);t.useEffect(()=>{"undefined"==typeof window||b.current||(b.current=!0,p||console.info("[flamegraph] OffscreenCanvas unavailable, using main thread renderer"))},[p]);const y=t.useMemo(()=>({collapsedLevelsSingular:h.collapsedLevelsSingular,collapsedLevelsPlural:h.collapsedLevelsPlural,isZh:"Location"!==h.location}),[h.collapsedLevelsSingular,h.collapsedLevelsPlural,h.location]),w=t.useCallback(e=>({name:e.name,goodColor:e.goodColor.rgb().array(),neutralColor:e.neutralColor.rgb().array(),badColor:e.badColor.rgb().array(),colors:e.colors.map(e=>e.rgb().array())}),[]),[x,k]=t.useState(ha.nothing()),{flamebearer:j,focusedNode:_,fitMode:N,updateFitMode:S,highlightQuery:M,zoom:C,toolbarVisible:T,headerVisible:R=!0,disableClick:O=!1,showSingleLevel:E=!1,showCredit:P,setActiveItem:F,selectedItem:A,updateView:I,enableSandwichView:D=!0,breadcrumb:L}=n,{onZoom:B,onReset:z,isDirty:$,onFocusOnNode:V}=n,{"data-testid":H}=n,{palette:W,setPalette:U}=n,J=t.useCallback($l(()=>{Z(),G()},50),[]);t.useEffect(()=>{if(!g)return()=>{};let e;try{e=function(){if(a.inlineWorkerCode&&a.inlineWorkerCode.trim().length>0)try{const e=new Blob([a.inlineWorkerCode],{type:"text/javascript"}),t=URL.createObjectURL(e),n=new Worker(t,{type:"module"});return URL.revokeObjectURL(t),n}catch(e){console.warn("[flamegraph] inline worker failed, fallback to URL worker",e)}const e=new URL("undefined"==typeof document?require("url").pathToFileURL(__filename).href:i&&"SCRIPT"===i.tagName.toUpperCase()&&i.src||new URL("index.node.cjs.js",document.baseURI).href),t=e.pathname,n=t.includes("/src/"),r=t.includes("/dist/");if(t.includes("/node_modules/.vite/deps/")){const t=new URL("../../@kylincloud/flamegraph/dist/flamegraphRenderWorker.js",e);try{return new Worker(t,{type:"module"})}catch(e){throw console.error("[flamegraph] worker create failed (vite deps)",e),e}}const o=n?new URL("./flamegraphRenderWorker.ts",e):new URL("./flamegraphRenderWorker.js",e);try{return new Worker(o,{type:"module"})}catch(e){throw console.error("[flamegraph] worker create failed",e,{workerUrl:o.href,isFromSrc:n,isFromDist:r}),e}}()}catch(e){return console.warn("[flamegraph] render worker init failed, fallback to main thread",e),v(!1),()=>{}}return console.info("[flamegraph] render worker created"),e.addEventListener("error",e=>{console.error("[flamegraph] render worker error",e)}),e.addEventListener("messageerror",e=>{console.error("[flamegraph] render worker message error",e)}),c.current=e,setTimeout(()=>{Z(),G()},0),()=>{e.terminate(),c.current=null,u.current=null,f.current=null,d.current={rect:!1,text:!1}}},[g]),Al(r,()=>{if(s){if(r.current){const e=r.current.clientWidth,t=r.current.clientHeight,n=m.current;if(!(Math.abs(e-n.lastWidth)>=2))return;n.lastWidth=e,n.lastHeight=t}J()}});const Q=(e,t)=>ne().xyToBar(e,t).map(e=>({left:te().offsetLeft+e.x,top:te().offsetTop+e.y,width:e.width})),q=t.useCallback((t,n)=>{const r=$(),a=ne().xyToBar(t,n),o=a.isJust?a.value.name:"";return[e.jsxs(Ol,{disabled:!r,onClick:z,children:[e.jsx(Vr,{icon:ks.faRedo}),h.resetView]},"reset"),(()=>{const t=a.mapOrElse(()=>!1,()=>!0),n=a.mapOrElse(()=>()=>{},e=>V.bind(null,e.i,e.j));return e.jsxs(Ol,{disabled:!t,onClick:n,children:[e.jsx(Vr,{icon:Is.faCompressAlt}),h.collapseNodesAbove]},"focus")})(),e.jsxs(Ol,{onClick:()=>{navigator.clipboard&&navigator.clipboard.writeText(o)},children:[e.jsx(Vr,{icon:Ss.faCopy}),h.copyFunctionName]},"copy"),(()=>{const t=A.isJust&&A.value===o?h.clearHighlight:h.highlightSimilarNodes;return e.jsxs(Ol,{onClick:()=>{F({name:o})},children:[e.jsx(Vr,{icon:Os.faHighlighter}),t]},"highlight-similar-nodes")})(),(()=>{if(!I||!D)return null;return e.jsxs(Ol,{className:$c,onClick:()=>{I("sandwich"),F({name:o})},children:[e.jsx(kc,{fill:"black"}),h.openInSandwichView]},"open-in-sandwich-view")})(),(()=>{const t=N===Va;return e.jsxs(Ol,{className:zc,onClick:()=>{S(t?$a:Va)},children:[t?e.jsx(_c,{}):e.jsx(jc,{}),t?h.showTextTailFirst:h.showTextHeadFirst]},"fit-mode")})()].filter(Boolean)},[s,A,N,$,z,V,F,I,h,D]),X=()=>{if(r.current){const e=new us(j,r.current,_,N,M,C,W,y);s.current=e}if(o.current){const e=new us(j,o.current,_,N,M,C,W,y);l.current=e}},Y=t.useCallback(()=>{if(!g||!c.current)return!1;const e=c.current;if(r.current&&!u.current)try{const t=r.current.transferControlToOffscreen();u.current=t,e.postMessage({type:"init",payload:{kind:"rect",canvas:t}},[t]),d.current.rect=!0}catch(e){console.error("[flamegraph] offscreen init failed (rect)",e)}if(o.current&&!f.current)try{const t=o.current.transferControlToOffscreen();f.current=t,e.postMessage({type:"init",payload:{kind:"text",canvas:t}},[t]),d.current.text=!0}catch(e){console.error("[flamegraph] offscreen init failed (text)",e)}return!0},[g]);t.useEffect(()=>{X(),Z(),G()},[W,y]),t.useEffect(()=>{X(),Z(),G()},[r.current,j,_,N,C]),t.useEffect(()=>{X(),Z(),G()},[M]);const K=(e,t)=>{if(!g)return!1;if(!c.current)return!0;if(!Y())return!0;const n="rect"===e?r.current:o.current,a=(null==n?void 0:n.clientWidth)||(null==n?void 0:n.width)||0,i={kind:e,flamebearer:j,focusedNode:_.isJust?_.value:null,fitMode:N,highlightQuery:M,zoom:C.isJust?C.value:null,palette:w(W),messages:y,renderRects:t.renderRects,renderText:t.renderText,width:a,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1};return c.current.postMessage({type:"render",payload:i}),!0},Z=()=>{var e,t,n;K("rect",{renderText:!1})||(null===(e=null==r?void 0:r.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==s?void 0:s.current)||void 0===t||t.render({renderText:!1}),null===(n=null==r?void 0:r.current)||void 0===n||n.setAttribute("data-state","rendered"))},G=()=>{var e,t,n;K("text",{renderRects:!1})||(null===(e=null==o?void 0:o.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==l?void 0:l.current)||void 0===t||t.render({renderRects:!1}),null===(n=null==o?void 0:o.current)||void 0===n||n.setAttribute("data-state","rendered"))},ee=!j||j&&j.names.length<=1,te=()=>{if(!r.current)throw new Error("Missing canvas");return r.current},ne=()=>{if(!s.current)throw new Error("Missing canvas");return s.current};return e.jsxs("div",{"data-testid":"flamegraph-view",className:ds(Bc,{"vertical-orientation":"double"===j.format}),children:[e.jsxs("div",{className:Vc,children:[L&&e.jsx(Lc,{totalValueText:L.totalValueText,totalSamplesText:L.totalSamplesText,samplesLabel:L.samplesLabel,unitLabel:L.unitLabel,hasFocus:L.hasFocus,focusPercent:L.focusPercent,focusLabel:L.focusLabel,ofTotalPlacement:L.ofTotalPlacement,ofTotalLabel:L.ofTotalLabel,clearFocusLabel:L.clearFocusLabel,onClearFocus:L.onClearFocus}),R&&e.jsx(Cc,{format:j.format,units:j.units,toolbarVisible:T}),e.jsxs("div",{"data-testid":H,style:{position:"relative",opacity:ee&&!E?0:1},children:[e.jsx("canvas",{height:"0","data-testid":"flamegraph-canvas","data-highlightquery":M,className:ds("flamegraph-canvas",Vl),ref:r,onClick:O?void 0:e=>{const t=ne().xyToBar(e.nativeEvent.offsetX,e.nativeEvent.offsetY);t.match({Nothing:()=>{},Just:e=>{C.match({Nothing:()=>{B(t)},Just:n=>{e.i===n.i&&e.j===n.j?B(ha.nothing()):B(t)}})}})}}),e.jsx("canvas",{height:"0","data-testid":"flamegraph-text-canvas",className:ds("flamegraph-text-canvas",Hl),ref:o}),s&&r&&e.jsx(Ul,{barHeight:Ca,canvasRef:r,zoom:C,xyToHighlightData:Q}),s&&e.jsx(ql,{barHeight:Ca,node:x})]}),P?e.jsx(bc,{}):""]}),s&&e.jsx(hc,{format:j.format,canvasRef:r,xyToData:(e,t)=>ne().xyToBar(e,t),numTicks:j.numTicks,sampleRate:j.sampleRate,leftTicks:"double"===j.format?j.leftTicks:0,rightTicks:"double"===j.format?j.rightTicks:0,units:j.units,palette:W}),!O&&s&&r&&e.jsx(gc,{canvasRef:r,xyToMenuItems:q,onClose:()=>{k(ha.nothing())},onOpen:(e,t)=>{k(Q(e,t))}})]})}var Wc,Uc={exports:{}};
13
13
  /*!
14
14
  Copyright (c) 2018 Jed Watson.
15
15
  Licensed under the MIT License (MIT), see
16
16
  http://jedwatson.github.io/classnames
17
- */var Uc,Jc=(Hc||(Hc=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var o in e)t.call(e,o)&&e[o]&&(r=a(r,o));return r}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(Wc)),Wc.exports),Qc=s(Jc),qc={};function Xc(){return Uc||(Uc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="crosshairs",n=[],r="f05b",a="M288-16c17.7 0 32 14.3 32 32l0 18.3c98.1 14 175.7 91.6 189.7 189.7l18.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-18.3 0c-14 98.1-91.6 175.7-189.7 189.7l0 18.3c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-18.3C157.9 463.7 80.3 386.1 66.3 288L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l18.3 0C80.3 125.9 157.9 48.3 256 34.3L256 16c0-17.7 14.3-32 32-32zM131.2 288c12.7 62.7 62.1 112.1 124.8 124.8l0-12.8c0-17.7 14.3-32 32-32s32 14.3 32 32l0 12.8c62.7-12.7 112.1-62.1 124.8-124.8L432 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l12.8 0C432.1 161.3 382.7 111.9 320 99.2l0 12.8c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-12.8C193.3 111.9 143.9 161.3 131.2 224l12.8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-12.8 0zM288 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,r,a]},e.faCrosshairs=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(qc)),qc}var Yc,Kc=Xc(),Zc={};function Gc(){return Yc||(Yc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-left",n=[9001],r="f053",a="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z";e.definition={prefix:"fas",iconName:t,icon:[320,512,n,r,a]},e.faChevronLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Zc)),Zc}var eu,tu=Gc(),nu={};function ru(){return eu||(eu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-right",n=[9002],r="f054",a="M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z";e.definition={prefix:"fas",iconName:t,icon:[320,512,n,r,a]},e.faChevronRight=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(nu)),nu}var au=ru(),ou="Table-module_table__6A8SM",iu="Table-module_sortable__J6kyp",su="Table-module_sortArrow__Nrncn",lu="Table-module_sortArrowUp__WmbEG",cu="Table-module_sortArrowDown__Gyue1",uu="Table-module_asc__tJDI9",fu="Table-module_desc__fjVRY",du="Table-module_isRowSelected__UhIAJ",hu="Table-module_isRowDisabled__sz3NJ",mu="Table-module_virtualSpacer__C1hxH",pu="Table-module_active__EShS8",gu="Table-module_loadingSpinner__SSjMK",vu="Table-module_pagination__VXgcO",bu="Button-module_button__Ed1ge",yu="Button-module_noIcon__Uzjvv",wu="Button-module_noBox__mLreC",xu="Button-module_customIcon__-slpC",ku="Button-module_iconWithText__DQRkr",ju="Button-module_default__HhXlQ",_u="Button-module_outline__Flf4r",Nu="Button-module_float__4marx",Su="Button-module_primary__xByv0",Mu="Button-module_secondary__D0K-F",Cu="Button-module_danger__5-vIq",Tu="Button-module_grouped__j8KwB";const Ru=t.forwardRef(function({disabled:t=!1,kind:n="default",type:r="button",icon:a,iconNode:o,children:i,grouped:s,onClick:l,id:c,className:u,form:f,noBox:d,autoFocus:h,...m},p){return e.jsxs("button",{...m,id:c,ref:p,type:r,"data-testid":m["data-testid"],disabled:t,onClick:l,form:f,autoFocus:h,"aria-label":m["aria-label"],className:Qc(bu,s?Tu:"",Ou(n),u,d&&wu,o&&xu,!a&&!o&&yu),children:[a?e.jsx($r,{icon:a,className:i?ku:""}):null,o,i]})});function Ou(e){switch(e){case"default":return ju;case"primary":return Su;case"secondary":return Mu;case"danger":return Cu;case"outline":return _u;case"float":return Nu;default:throw Error(`Unsupported kind ${e}`)}}function Eu({row:n}){const{cells:r,isRowSelected:a,isRowDisabled:o,className:i,onClick:s,onDoubleClick:l,onContextMenu:c,...u}=n,f=t.useRef(Math.random()).current;return e.jsx("tr",{...u,onClick:s,onDoubleClick:l,onContextMenu:c,className:fs(i,{[du]:a,[hu]:o}),children:r&&r.map(({style:t,value:n,...r},a)=>e.jsx("td",{style:t,...r,children:n},f+a))})}function Pu({sortByDirection:n,sortBy:r,updateSortParams:a,table:o,tableBodyRef:i,className:s,isLoading:l,itemsPerPage:c,virtualize:u,virtualizeRowHeight:f,virtualizeOverscan:d=6,scrollRef:h,disableSort:m}){const p=!m&&n&&r&&a,[g,v]=t.useState(0),[b,y]=t.useState(0),[w,x]=t.useState(null),[k,j]=t.useState(null),_=t.useRef(null),N=t.useRef(null);t.useLayoutEffect(()=>{(null==h?void 0:h.current)&&h.current!==k&&j(h.current)},[null==h?void 0:h.current,k]),t.useEffect(()=>{if(!k||!u)return()=>{};const e=()=>{_.current&&cancelAnimationFrame(_.current),_.current=requestAnimationFrame(()=>{y(k.scrollTop||0)})};return k.addEventListener("scroll",e,{passive:!0}),()=>{k.removeEventListener("scroll",e),_.current&&cancelAnimationFrame(_.current)}},[k,u]),t.useEffect(()=>{if(!u||w||!(null==i?void 0:i.current))return;const e=i.current.querySelectorAll("tr[data-row]");if(!e.length)return;const t=e[0].getBoundingClientRect();t.height&&x(t.height)},[u,w,null==i?void 0:i.current,o]);const S="filled"===o.type?Fu(o.bodyRows,g,c):null,M="virtual"===o.type?o.rowCount:S?S.length:0,C=f||w||26,T=!!u&&!!k&&("filled"===o.type||"virtual"===o.type)&&C>0,R=T?(()=>{const e=k.clientHeight||0,t=Math.max(0,Math.floor(b/C)-d),n=Math.min(M,Math.ceil((b+e)/C)+d),r=t*C,a=Math.max(0,(M-n)*C),i="filled"===o.type&&S?S.slice(t,n):[];return{viewportHeight:e,totalRows:M,startIndex:t,endIndex:n,topSpacer:r,bottomSpacer:a,visibleRows:i}})():null,O=!!u&&!T&&"filled"===o.type,E=O?(S||[]).slice(0,Math.max(24,4*d)):null;t.useEffect(()=>{var e;"virtual"===o.type&&R&&(null===(e=o.onRangeChange)||void 0===e||e.call(o,R.startIndex,R.endIndex))},[o,null==R?void 0:R.startIndex,null==R?void 0:R.endIndex]);const P="virtual"===o.type&&R?Math.max(0,R.endIndex-R.startIndex):0,F="virtual"===o.type&&P>0?Array.from({length:P},()=>({cells:Array.from({length:o.headRow.length},()=>({value:" "}))})):[],A="virtual"===o.type&&R&&o.range&&o.range.start===R.startIndex&&o.range.end===R.endIndex;"virtual"===o.type&&A&&(N.current=o.rows);const I="virtual"===o.type?A?o.rows:N.current||F:F;return l?e.jsx("div",{className:gu}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:fs(ou,{[s||""]:s}),"data-testid":"table-ui",children:[e.jsx("thead",{children:e.jsx("tr",{children:o.headRow.map(({sortable:i,label:s,name:l,...c},u)=>i&&"not-filled"!==o.type&&p?t.createElement("th",{...c,key:u,className:iu,onClick:()=>a(l)},s,e.jsxs("span",{className:fs(su,{[pu]:r===l,[uu]:r===l&&"asc"===n,[fu]:r===l&&"desc"===n}),children:[e.jsx("span",{className:lu}),e.jsx("span",{className:cu})]})):e.jsx("th",{...c,children:s},u))})}),e.jsx("tbody",{ref:i,children:"not-filled"===o.type?e.jsx("tr",{className:null==o?void 0:o.bodyClassName,children:e.jsx("td",{colSpan:o.headRow.length,children:o.value})}):R?e.jsxs(e.Fragment,{children:[R.topSpacer>0&&e.jsx("tr",{"aria-hidden":"true",className:mu,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:R.topSpacer,padding:0,border:0}})}),("virtual"===o.type?I:R.visibleRows).map((t,n)=>{var r;return e.jsx(Eu,{row:t},null!==(r=t["data-row"])&&void 0!==r?r:`row-${R.startIndex+n}`)}),R.bottomSpacer>0&&e.jsx("tr",{"aria-hidden":"true",className:mu,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:R.bottomSpacer,padding:0,border:0}})})]}):O?(E||[]).map((t,n)=>{var r;return e.jsx(Eu,{row:t},null!==(r=t["data-row"])&&void 0!==r?r:`row-${n}`)}):(S||[]).map((t,n)=>{var r;return e.jsx(Eu,{row:t},null!==(r=t["data-row"])&&void 0!==r?r:`row-${n}`)})})]}),e.jsx(Au,{bodyRows:"filled"===o.type?o.bodyRows:void 0,itemsPerPage:c,currPage:g,setCurrPage:v})]})}function Fu(e,t,n){return n?e.slice(t*n,n*(t+1)):e}function Au({itemsPerPage:t,currPage:n,setCurrPage:r,bodyRows:a}){if(!t)return null;const o=!!a&&Fu(a,n+1,t).length>0,i=!!a&&Fu(a,n-1,t).length>0;return e.jsxs("nav",{className:vu,children:[e.jsx(Ru,{"aria-label":"Previous Page",disabled:!i,kind:"float",icon:tu.faChevronLeft,onClick:()=>r(n-1)}),e.jsx(Ru,{disabled:!o,"aria-label":"Next Page",kind:"float",icon:au.faChevronRight,onClick:()=>r(n+1)})]})}function Iu({numTicks:n,sampleRate:r,units:a,tableBodyRef:o,palette:i}){const s=Aa(n,r,a),l=s.format(n,r),c=ac(),u=t.useCallback((e,t,n)=>{var o;const u=null===(o=n.target.closest("tr"))||void 0===o?void 0:o.dataset.row;if(!u)return void t();const[f,d,...h]=u.split(";");switch(f){case"single":{const[t,n]=h,o=s.format(parseInt(t,10),r),i=s.format(parseInt(n,10),r),c=l.split(" "),u="<"===c[0]?c[1]:c[0],f=o.split(" "),m="<"===f[0]?f[1]:f[0],p=i.split(" "),g="<"===p[0]?p[1]:p[0];e({title:{text:d,diff:{text:"",color:""}},tooltipData:[{units:a,self:`${o}(${(parseFloat(m)/parseFloat(u)*100).toFixed(2)}%)`,total:`${i}(${(parseFloat(g)/parseFloat(u)*100).toFixed(2)}%)`,tooltipType:"table"}]});break}case"double":{const[t,n,o,l]=h,u=hc({formatter:s,sampleRate:r,totalLeft:parseInt(t,10),leftTicks:parseInt(n,10),totalRight:parseInt(o,10),rightTicks:parseInt(l,10),title:d,units:a},i,c);e({title:u.title,tooltipData:u.tooltipData});break}}},[s,r,a,l,i,c]);return e.jsx(cc,{dataSourceRef:o,shouldShowTitle:!1,clickInfoSide:"left",setTooltipContent:u,palette:i})}function Du(){const e=new Blob([`(${(()=>{const e=e=>e||0,t={format:"single",jStep:4,jName:3,getBarTotal:(e,t)=>e[t+1],getBarSelf:(e,t)=>e[t+2],getBarName:(e,t)=>e[t+3]},n={format:"double",jStep:7,jName:6,getBarTotal:(e,t)=>e[t+4]+e[t+1],getBarTotalLeft:(e,t)=>e[t+1],getBarTotalRght:(e,t)=>e[t+4],getBarSelf:(e,t)=>e[t+5]+e[t+2],getBarSelfLeft:(e,t)=>e[t+2],getBarSelfRght:(e,t)=>e[t+5],getBarName:(e,t)=>e[t+6]},r=e=>Math.round(1e4*e)/100,a=(e,t)=>(t-e)/e*100,o={baseRows:[],rows:[],bestNodeByName:new Map,sortBy:"total",sortByDirection:"desc",highlightQuery:"",format:"single",leftTicks:0,rightTicks:0},i=()=>{const e=o.highlightQuery.trim().toLowerCase(),t=e?o.baseRows.filter(t=>t.name.toLowerCase().includes(e)):o.baseRows.slice(),n="asc"===o.sortByDirection?1:-1;t.sort((e,t)=>{if("name"===o.sortBy)return n*e.name.localeCompare(t.name);switch(o.sortBy){case"total":case"self":{const r=e[o.sortBy]||0,a=t[o.sortBy]||0;return n*(r-a)}case"baseline":{const r=e.leftTicks>0?e.totalLeft/e.leftTicks:0,a=t.leftTicks>0?t.totalLeft/t.leftTicks:0;return n*(r-a)}case"comparison":{const r=e.rightTicks>0?e.totalRght/e.rightTicks:0,a=t.rightTicks>0?t.totalRght/t.rightTicks:0;return n*(r-a)}case"diff":{const o=e.leftTicks>0?e.totalLeft/e.leftTicks:0,i=e.rightTicks>0?e.totalRght/e.rightTicks:0,s=t.leftTicks>0?t.totalLeft/t.leftTicks:0,l=t.rightTicks>0?t.totalRght/t.rightTicks:0,c=a(r(o),r(i)),u=a(r(s),r(l));return n*(c-u)}default:return 0}}),o.rows=t},s=r=>{const{rows:a,bestNodeByName:s,format:l,leftTicks:c,rightTicks:u}=(r=>{const{names:a,levels:o,format:i}=r,s=new Map,l=new Map,c=r.leftTicks||0,u=r.rightTicks||0;if("double"===i){const t=n;for(let n=0;n<o.length;n+=1){const r=o[n];for(let o=0;o<r.length;o+=t.jStep){const i=a[t.getBarName(r,o)]||"<empty>";s.has(i)||s.set(i,{type:"double",name:i,totalLeft:0,totalRght:0,leftTicks:c,rightTicks:u});const f=s.get(i);if(!f)continue;f.totalLeft=e(f.totalLeft)+t.getBarTotalLeft(r,o),f.totalRght=e(f.totalRght)+t.getBarTotalRght(r,o);const d=t.getBarTotal(r,o),h=l.get(i);(!h||d>h.total)&&l.set(i,{i:n,j:o,total:d})}}}else{const n=t;for(let t=0;t<o.length;t+=1){const r=o[t];for(let o=0;o<r.length;o+=n.jStep){const i=a[n.getBarName(r,o)]||"<empty>";s.has(i)||s.set(i,{type:"single",name:i,self:0,total:0});const c=s.get(i);if(!c)continue;c.self=e(c.self)+n.getBarSelf(r,o),c.total=e(c.total)+n.getBarTotal(r,o);const u=n.getBarTotal(r,o),f=l.get(i);(!f||u>f.total)&&l.set(i,{i:t,j:o,total:u})}}}return{rows:Array.from(s.values()),bestNodeByName:l,format:i,leftTicks:c,rightTicks:u}})(r.flamebearer);o.baseRows=a,o.bestNodeByName=s,o.format=l,o.leftTicks=c,o.rightTicks=u,o.sortBy=r.sortBy,o.sortByDirection=r.sortByDirection,o.highlightQuery=r.highlightQuery||"",i(),self.postMessage({type:"ready",payload:{rowCount:o.rows.length}})};self.onmessage=e=>{const t=e.data;var n;if(t&&t.type)switch(t.type){case"init":s(t.payload);break;case"update":n=t.payload,o.sortBy=n.sortBy,o.sortByDirection=n.sortByDirection,o.highlightQuery=n.highlightQuery||"",i(),self.postMessage({type:"ready",payload:{rowCount:o.rows.length}});break;case"range":(e=>{const{start:t,end:n,requestId:r}=e,a=Math.max(0,t),i=Math.min(o.rows.length,n),s=o.rows.slice(a,i);self.postMessage({type:"range",payload:{rows:s,start:a,end:i,requestId:r}})})(t.payload);break;case"findNode":(e=>{const{name:t,requestId:n}=e,r=o.bestNodeByName.get(t);self.postMessage({type:"findNode",payload:{node:r?{i:r.i,j:r.j}:null,requestId:n}})})(t.payload)}}}).toString()})()`],{type:"text/javascript"});return new Worker(URL.createObjectURL(e))}var Lu="ProfilerTable-module_tableContextMenu__7Svm8",Bu="ProfilerTable-module_sandwichItem__b9Ipy";const zu=e=>e||0,$u="undefined"!=typeof Worker&&"undefined"!=typeof Blob&&"undefined"!=typeof URL;function Vu(e,t,n,r){const a=t;return a.type="single",a.self=zu(a.self)+e.getBarSelf(n,r),a.total=zu(a.total)+e.getBarTotal(n,r),a}function Hu(e,t,n,r,a,o){const i=t;return i.type="double",i.self=zu(i.self)+e.getBarSelf(n,r),i.total=zu(i.total)+e.getBarTotal(n,r),i.selfLeft=zu(i.selfLeft)+e.getBarSelfLeft(n,r),i.selfRght=zu(i.selfRght)+e.getBarSelfRght(n,r),i.selfDiff=zu(i.selfDiff)+e.getBarSelfDiff(n,r),i.totalLeft=zu(i.totalLeft)+e.getBarTotalLeft(n,r),i.totalRght=zu(i.totalRght)+e.getBarTotalRght(n,r),i.totalDiff=zu(i.totalDiff)+e.getBarTotalDiff(n,r),i.leftTicks=a,i.rightTicks=o,i}const Wu=new WeakMap;function Uu(e){const t=Wu.get(e);if(t)return t;const n=function(e){if(!e)return[];const{names:t,levels:n,format:r}=e,a="double"!==r?ya:wa,o=new Map;for(let i=0;i<n.length;i++){const s=n[i];for(let n=0;n<s.length;n+=a.jStep){const i=t[a.getBarName(s,n)];o.has(i)||o.set(i,{name:i||"<empty>",self:0,total:0});const l=o.get(i);if(!l)break;"single"===r?Vu(ya,l,s,n):Hu(wa,l,s,n,e.leftTicks,e.rightTicks)}}return Array.from(o.values())}(e);return Wu.set(e,n),n}function Ju(e,t,n){const r=148-e/t*148,a=n.alpha(1);return{backgroundImage:`linear-gradient(${a}, ${a})`,backgroundPosition:`-${r}px 0px`,backgroundRepeat:"no-repeat"}}const Qu=({flamebearer:t,sortBy:n,sortByDirection:r,fitMode:a,handleTableItemClick:o,highlightQuery:i,palette:s,selectedItem:l,messages:c,onRowContextMenu:u,onRowDoubleClick:f})=>{const{numTicks:d,maxSelf:h,sampleRate:m,spyName:p,units:g}=t,v=[...Uu(t)].sort((e,t)=>t.total-e.total),b="asc"===r?1:-1;let y;if("name"===n)y=v.sort((e,t)=>b*e[n].localeCompare(t[n]));else switch(n){case"total":case"self":y=v.sort((e,t)=>b*(e[n]-t[n]));break;case"baseline":y=v.sort((e,t)=>b*(e.totalLeft/e.leftTicks-t.totalLeft/t.leftTicks));break;case"comparison":y=v.sort((e,t)=>b*(e.totalRght/e.rightTicks-t.totalRght/t.rightTicks));break;case"diff":y=v.sort((e,t)=>{const n=Fa(Pa(e.totalLeft/e.leftTicks),Pa(e.totalRght/e.rightTicks)),r=Fa(Pa(t.totalLeft/t.leftTicks),Pa(t.totalRght/t.rightTicks));return b*(n-r)});break;default:y=v}const w=Aa(d,m,g),x=e=>!!l.isJust&&e===l.value,k=t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:Ha(a),children:e.jsx("bdi",{dir:"ltr",children:t.name})})}),j=y.filter(e=>{return!i||(t=i,e.name.toLowerCase().includes(t.toLowerCase()));var t}).map(e=>{if("double"===e.type)return(e=>{const t=Pa(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=Pa(e.rightTicks>0?e.totalRght/e.rightTicks:0);let r=Fa(t,n);Number.isFinite(r)||(r=0);let a="";r>0?a=s.badColor.rgb().string():r<0&&(a=s.goodColor.rgb().string());let i="";return 0===e.totalLeft&&e.totalRght>0?i=c.diffNew:0===e.totalRght&&e.totalLeft>0?i=c.diffRemoved:0===r?i="0%":r>0?i=`+${r.toFixed(2)}%`:r<0&&(i=`${r.toFixed(2)}%`),{"data-row":`${e.type};${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:x(e.name),onClick:()=>o(e),onContextMenu:t=>u(t,e.name),onDoubleClick:()=>f(e.name),cells:[{value:k(e)},{value:`${t} %`},{value:`${n} %`},{value:i,style:{color:a}}]}})(e);const t=Ki(p,e.name);return((e,t)=>({"data-row":`${e.type};${e.name};${e.self};${e.total}`,isRowSelected:x(e.name),onClick:()=>o(e),onContextMenu:t=>u(t,e.name),onDoubleClick:()=>f(e.name),cells:[{value:k(e)},{value:w.format(e.self,m),style:Ju(e.self,h,t)},{value:w.format(e.total,m),style:Ju(e.total,d,t)}]}))(e,Zi(s,t))});return j.length>0?{bodyRows:j,type:"filled"}:{value:e.jsx("div",{className:"unsupported-format",children:c.noItemsFound}),type:"not-filled"}};function qu({tableBodyRef:n,flamebearer:r,isDoubles:a,fitMode:o,handleTableItemClick:i,highlightQuery:s,selectedItem:l,palette:c,onFocusOnNode:u,updateView:f,enableSandwichView:d=!0,virtualize:h,virtualizeRowHeight:m,virtualizeOverscan:p,scrollRef:g,menuPortalTarget:v}){const b=ac(),[y,w]=Nl({transition:!0}),[x,k]=t.useState({x:0,y:0}),[j,_]=t.useState(null),N=$u,S=t.useRef(null),M=t.useRef(null),C=t.useRef(0),T=t.useRef(0),R=t.useRef(new Map),[O,E]=t.useState(!1),[P,F]=t.useState(0),[A,I]=t.useState([]),[D,L]=t.useState({start:0,end:0}),[B,z]=t.useState(null),[$,V]=t.useState(0),[H,W]=t.useState(0);t.useEffect(()=>{if(!N)return()=>{};const e=Du();S.current=e,W(e=>e+1);const t=e=>{const t=e.data;if(t&&t.type)switch(t.type){case"ready":F(t.payload.rowCount),E(!0),V(e=>e+1);break;case"range":if(t.payload.requestId!==C.current)return;I(t.payload.rows),L({start:t.payload.start,end:t.payload.end});break;case"findNode":{const e=R.current.get(t.payload.requestId);e&&(R.current.delete(t.payload.requestId),e(t.payload.node));break}}};return e.addEventListener("message",t),()=>{e.removeEventListener("message",t),e.terminate(),S.current=null,R.current.clear()}},[N]);const U=t.useCallback(e=>{if(!N||!S.current)return Promise.resolve(function(e,t){if(!e||!e.levels)return null;const{names:n,levels:r,format:a}=e,o=xa(a);let i=null;for(let e=0;e<r.length;e++){const a=r[e];for(let r=0;r<a.length;r+=o.jStep)if(n[o.getBarName(a,r)]===t){const t=o.getBarTotal(a,r);(!i||t>i.total)&&(i={i:e,j:r,total:t})}}return i?{i:i.i,j:i.j}:null}(r,e));const t=++T.current;return new Promise(n=>{var r;R.current.set(t,n),null===(r=S.current)||void 0===r||r.postMessage({type:"findNode",payload:{name:e,requestId:t}})})},[r,N]),J=t.useCallback(e=>{u&&U(e).then(e=>{e&&u(e.i,e.j)})},[u,U]),Q=t.useCallback(e=>{l.isJust&&l.value===e||i({name:e}),J(e)},[J,l,i]),q=t.useCallback((e,t)=>{e.preventDefault(),k({x:e.clientX,y:e.clientY}),_(t),w(!0)},[w]),X=t.useCallback(()=>{w(!1),_(null)},[w]),Y=t.useCallback(()=>{j&&(J(j),X())},[j,J,X]),K=t.useCallback(()=>{j&&navigator.clipboard&&(navigator.clipboard.writeText(j),X())},[j,X]),Z=t.useCallback(()=>{j&&(i({name:j}),X())},[j,i,X]),G=t.useCallback(()=>{j&&f&&(f("sandwich"),i({name:j}),X())},[j,f,i,X]),ee=t.useMemo(()=>a?[{sortable:1,name:"name",label:b.location},{sortable:1,name:"baseline",label:b.baseline,default:!0},{sortable:1,name:"comparison",label:b.comparison},{sortable:1,name:"diff",label:b.diff}]:[{sortable:1,name:"name",label:b.location},{sortable:1,name:"self",label:b.self,default:!0},{sortable:1,name:"total",label:b.total}],[b,a]),te=(e=>{const n=e.filter(e=>null==e?void 0:e.default)[0]||e[0],[r,a]=t.useState(n.name),[o,i]=t.useState("desc");return{sortBy:r,sortByDirection:o,updateSortParams:e=>{let t=o;t=r===e?"asc"===t?"desc":"asc":"desc",a(e),i(t)}}})(ee);t.useEffect(()=>{if(!N||!S.current)return;const e=S.current,t={sortBy:te.sortBy,sortByDirection:te.sortByDirection,highlightQuery:s};M.current!==r?(M.current=r,E(!1),F(0),I([]),e.postMessage({type:"init",payload:{flamebearer:r,...t}})):e.postMessage({type:"update",payload:t})},[r,s,te.sortBy,te.sortByDirection,N,H]);const ne=t.useCallback((e,t)=>{z(n=>n&&n.start===e&&n.end===t?n:{start:e,end:t})},[]);t.useEffect(()=>{if(!N||!S.current||!B)return;const e=++C.current;S.current.postMessage({type:"range",payload:{start:B.start,end:B.end,requestId:e}})},[B,$,N]);const{numTicks:re,maxSelf:ae,sampleRate:oe,spyName:ie,units:se}=r,le=t.useMemo(()=>Aa(re,oe,se),[re,oe,se]),ce=t.useMemo(()=>Ha(o),[o]),ue=t.useCallback(e=>l.isJust&&l.value===e,[l]),fe=t.useCallback(t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:ce,children:e.jsx("bdi",{dir:"ltr",children:t})})}),[ce]),de=t.useCallback(e=>{const t=Ki(ie,e.name),n=Zi(c,t);return{"data-row":`single;${e.name};${e.self};${e.total}`,isRowSelected:ue(e.name),onClick:()=>{i({name:e.name})},onContextMenu:t=>q(t,e.name),onDoubleClick:()=>Q(e.name),cells:[{value:fe(e.name)},{value:le.format(e.self,oe),style:Ju(e.self,ae,n)},{value:le.format(e.total,oe),style:Ju(e.total,re,n)}]}},[le,q,Q,i,ue,ae,fe,re,c,oe,ie]),he=t.useCallback(e=>{const t=Pa(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=Pa(e.rightTicks>0?e.totalRght/e.rightTicks:0);let r=Fa(t,n);Number.isFinite(r)||(r=0);let a="";r>0?a=c.badColor.rgb().string():r<0&&(a=c.goodColor.rgb().string());let o="";return 0===e.totalLeft&&e.totalRght>0?o=b.diffNew:0===e.totalRght&&e.totalLeft>0?o=b.diffRemoved:0===r?o="0%":r>0?o=`+${r.toFixed(2)}%`:r<0&&(o=`${r.toFixed(2)}%`),{"data-row":`double;${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:ue(e.name),onClick:()=>{i({name:e.name})},onContextMenu:t=>q(t,e.name),onDoubleClick:()=>Q(e.name),cells:[{value:fe(e.name)},{value:`${t} %`},{value:`${n} %`},{value:o,style:{color:a}}]}},[q,Q,i,b,ue,fe,c]),me=t.useMemo(()=>N?A.map(e=>"double"===e.type?he(e):de(e)):[],[he,de,N,A]),pe=t.useMemo(()=>N?O&&0===P?{headRow:ee,type:"not-filled",value:e.jsx("div",{className:"unsupported-format",children:b.noItemsFound})}:{headRow:ee,type:"virtual",rowCount:P,rows:me,range:D,onRangeChange:ne}:{headRow:ee,...Qu({flamebearer:r,sortBy:te.sortBy,sortByDirection:te.sortByDirection,fitMode:o,handleTableItemClick:i,highlightQuery:s,palette:c,selectedItem:l,messages:b,onRowContextMenu:q,onRowDoubleClick:Q})},[he,de,d,o,r,q,Q,ne,i,s,b,u,c,P,l,ee,te.sortBy,te.sortByDirection,f,N,me,D,O]),ge=l.isJust&&l.value===j;return e.jsxs(e.Fragment,{children:[e.jsx(Pu,{...te,tableBodyRef:n,table:pe,isLoading:N&&!O,className:Qc("flamegraph-table",{"flamegraph-table-doubles":a}),virtualize:h,virtualizeRowHeight:m,virtualizeOverscan:p,scrollRef:g}),e.jsxs(yl,{...y,anchorPoint:x,onClose:X,className:Lu,portal:!v||{target:v},children:[u&&e.jsxs(Rl,{onClick:Y,children:[e.jsx($r,{icon:Kc.faCrosshairs}),b.focusOnThisFunction]}),e.jsxs(Rl,{onClick:K,children:[e.jsx($r,{icon:Ns.faCopy}),b.copyFunctionName]}),e.jsxs(Rl,{onClick:Z,children:[e.jsx($r,{icon:Rs.faHighlighter}),ge?b.clearHighlight:b.highlightSimilarNodes]}),f&&d&&e.jsxs(Rl,{onClick:G,className:Bu,children:[e.jsx(xc,{fill:"currentColor"}),b.openInSandwichView]})]})]})}const Xu=t.memo(function({flamebearer:n,fitMode:r,handleTableItemClick:a,highlightQuery:o,palette:i,selectedItem:s,onFocusOnNode:l,updateView:c,enableSandwichView:u}){const f=t.useRef(null),d=t.useRef(null),h=t.useRef(null),[m,p]=t.useState(0),[g,v]=t.useState(null),b="double"===n.format;return t.useEffect(()=>{const e=f.current;if(!e)return;const t=e.offsetWidth-e.clientWidth;Number.isFinite(t)&&t!==m&&p(t)},[f.current,b,m]),t.useEffect(()=>{const e=d.current;if(!e||"undefined"==typeof document)return;const t=e.closest("[data-theme], [data-flamegraph-color-mode]")||e,n=document.createElement("div");return n.className="flamegraph-menu-portal",t.appendChild(n),v(n),()=>{n.parentElement&&n.parentElement.removeChild(n)}},[]),e.jsxs("div",{"data-testid":"table-view",ref:d,style:{"--kylin-flamegraph-scrollbar-size":`${m}px`},className:b?"flamegraph-table-wrapper flamegraph-table-wrapper--double":"flamegraph-table-wrapper",children:[e.jsx("div",{className:"flamegraph-table-scroll",ref:h,children:e.jsx(qu,{tableBodyRef:f,flamebearer:n,isDoubles:b,fitMode:r,highlightQuery:o,handleTableItemClick:a,palette:i,selectedItem:s,onFocusOnNode:l,updateView:c,enableSandwichView:u,virtualize:!0,virtualizeOverscan:8,scrollRef:h,menuPortalTarget:g})}),e.jsx(Iu,{tableBodyRef:f,numTicks:n.numTicks,sampleRate:n.sampleRate,units:n.units,palette:i})]})});var Yu,Ku,Zu={},Gu={};function ef(){return Yu||(Yu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="arrow-rotate-left",n=[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],r="f0e2",a="M256 64c-56.8 0-107.9 24.7-143.1 64l47.1 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 192c-17.7 0-32-14.3-32-32L0 32C0 14.3 14.3 0 32 0S64 14.3 64 32l0 54.7C110.9 33.6 179.5 0 256 0 397.4 0 512 114.6 512 256S397.4 512 256 512c-87 0-163.9-43.4-210.1-109.7-10.1-14.5-6.6-34.4 7.9-44.6s34.4-6.6 44.6 7.9c34.8 49.8 92.4 82.3 157.6 82.3 106 0 192-86 192-192S362 64 256 64z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faArrowRotateLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Gu)),Gu}function tf(){return Ku||(Ku=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=ef();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faUndo=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Zu)),Zu}var nf,rf,af=tf(),of={},sf={};function lf(){return nf||(nf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="diagram-project",n=["project-diagram"],r="f542",a="M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 128 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-16-128 0 0 16c0 7.3-1.7 14.3-4.6 20.5l68.6 91.5 80 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-7.3 1.7-14.3 4.6-20.5L128 224 48 224c-26.5 0-48-21.5-48-48L0 80z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faDiagramProject=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(sf)),sf}function cf(){return rf||(rf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=lf();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faProjectDiagram=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(of)),of}var uf,ff,df=cf(),hf={},mf={};function pf(){return uf||(uf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="ellipsis-vertical",n=["ellipsis-v"],r="f142",a="M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z";e.definition={prefix:"fas",iconName:t,icon:[128,512,n,r,a]},e.faEllipsisVertical=e.definition,e.prefix="fas",e.iconName=t,e.width=128,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(mf)),mf}function gf(){return ff||(ff=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=pf();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faEllipsisV=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(hf)),hf}var vf=gf(),bf="Tooltip-module_tooltipWrapper__leDK-",yf="Tooltip-module_tooltipBubble__8vweF",wf="Tooltip-module_tooltipArrow__7wGyN";function xf(e){if(null!=e&&!1!==e){if("string"==typeof e||"number"==typeof e)return String(e);if(Array.isArray(e)){const t=e.map(e=>xf(e)).filter(e=>!!e);return t.length?t.join(" "):void 0}return t.isValidElement(e)?xf(e.props.children):void 0}}const kf=({placement:n,title:r,content:a,children:o})=>{const i=xf(null!=r?r:a),s=t.useRef(null),[l,c]=t.useState(!1);return t.useEffect(()=>{const e=s.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");c(!!t)},[]),i?e.jsxs("span",{ref:s,className:bf,"data-placement":n||"top","data-tooltip":l?i:void 0,title:l?void 0:i,children:[o,l?e.jsxs("span",{className:yf,role:"tooltip",children:[i,e.jsx("span",{className:wf})]}):null]}):e.jsx(e.Fragment,{children:o})};var jf,_f={};function Nf(){return jf||(jf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="link",n=[128279,"chain"],r="f0c1",a="M419.5 96c-16.6 0-32.7 4.5-46.8 12.7-15.8-16-34.2-29.4-54.5-39.5 28.2-24 64.1-37.2 101.3-37.2 86.4 0 156.5 70 156.5 156.5 0 41.5-16.5 81.3-45.8 110.6l-71.1 71.1c-29.3 29.3-69.1 45.8-110.6 45.8-86.4 0-156.5-70-156.5-156.5 0-1.5 0-3 .1-4.5 .5-17.7 15.2-31.6 32.9-31.1s31.6 15.2 31.1 32.9c0 .9 0 1.8 0 2.6 0 51.1 41.4 92.5 92.5 92.5 24.5 0 48-9.7 65.4-27.1l71.1-71.1c17.3-17.3 27.1-40.9 27.1-65.4 0-51.1-41.4-92.5-92.5-92.5zM275.2 173.3c-1.9-.8-3.8-1.9-5.5-3.1-12.6-6.5-27-10.2-42.1-10.2-24.5 0-48 9.7-65.4 27.1L91.1 258.2c-17.3 17.3-27.1 40.9-27.1 65.4 0 51.1 41.4 92.5 92.5 92.5 16.5 0 32.6-4.4 46.7-12.6 15.8 16 34.2 29.4 54.6 39.5-28.2 23.9-64 37.2-101.3 37.2-86.4 0-156.5-70-156.5-156.5 0-41.5 16.5-81.3 45.8-110.6l71.1-71.1c29.3-29.3 69.1-45.8 110.6-45.8 86.6 0 156.5 70.6 156.5 156.9 0 1.3 0 2.6 0 3.9-.4 17.7-15.1 31.6-32.8 31.2s-31.6-15.1-31.2-32.8c0-.8 0-1.5 0-2.3 0-33.7-18-63.3-44.8-79.6z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,r,a]},e.faLink=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(_f)),_f}var Sf,Mf,Cf=Nf(),Tf={},Rf={};function Of(){return Sf||(Sf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="magnifying-glass",n=[128269,"search"],r="f002",a="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faMagnifyingGlass=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Rf)),Rf}function Ef(){return Mf||(Mf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Of();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faSearch=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Tf)),Tf}var Pf,Ff,Af,If=Ef(),Df={};function Lf(){if(Pf)return Df;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}Pf=1,Object.defineProperty(Df,"__esModule",{value:!0}),Df.DebounceInput=void 0;var n=o(t),r=o(Bl()),a=["element","onChange","value","minLength","debounceTimeout","forceNotifyByEnter","forceNotifyOnBlur","onKeyDown","onBlur","inputRef"];function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function s(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return t&&function(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)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function f(t){var n=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 r,a=h(t);if(n){var o=h(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}(this,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(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 p=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&&u(e,t)}(o,e);var t=f(o);function o(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),m(d(n=t.call(this,e)),"onChange",function(e){e.persist();var t=n.state.value,r=n.props.minLength;n.setState({value:e.target.value},function(){var a=n.state.value;a.length>=r?n.notify(e):t.length>a.length&&n.notify(l(l({},e),{},{target:l(l({},e.target),{},{value:""})}))})}),m(d(n),"onKeyDown",function(e){"Enter"===e.key&&n.forceNotify(e);var t=n.props.onKeyDown;t&&(e.persist(),t(e))}),m(d(n),"onBlur",function(e){n.forceNotify(e);var t=n.props.onBlur;t&&(e.persist(),t(e))}),m(d(n),"createNotifier",function(e){if(e<0)n.notify=function(){return null};else if(0===e)n.notify=n.doNotify;else{var t=(0,r.default)(function(e){n.isDebouncing=!1,n.doNotify(e)},e);n.notify=function(e){n.isDebouncing=!0,t(e)},n.flush=function(){return t.flush()},n.cancel=function(){n.isDebouncing=!1,t.cancel()}}}),m(d(n),"doNotify",function(){n.props.onChange.apply(void 0,arguments)}),m(d(n),"forceNotify",function(e){var t=n.props.debounceTimeout;if(n.isDebouncing||!(t>0)){n.cancel&&n.cancel();var r=n.state.value,a=n.props.minLength;r.length>=a?n.doNotify(e):n.doNotify(l(l({},e),{},{target:l(l({},e.target),{},{value:r})}))}}),n.isDebouncing=!1,n.state={value:void 0===e.value||null===e.value?"":e.value};var a=n.props.debounceTimeout;return n.createNotifier(a),n}return c(o,[{key:"componentDidUpdate",value:function(e){if(!this.isDebouncing){var t=this.props,n=t.value,r=t.debounceTimeout,a=e.debounceTimeout,o=e.value,i=this.state.value;void 0!==n&&o!==n&&i!==n&&this.setState({value:n}),r!==a&&this.createNotifier(r)}}},{key:"componentWillUnmount",value:function(){this.flush&&this.flush()}},{key:"render",value:function(){var e=this.props,t=e.element;e.onChange,e.value,e.minLength,e.debounceTimeout;var r,o,s=e.forceNotifyByEnter,c=e.forceNotifyOnBlur,u=e.onKeyDown,f=e.onBlur,d=e.inputRef,h=i(e,a),m=this.state.value;r=s?{onKeyDown:this.onKeyDown}:u?{onKeyDown:u}:{},o=c?{onBlur:this.onBlur}:f?{onBlur:f}:{};var p=d?{ref:d}:{};return n.default.createElement(t,l(l(l(l({},h),{},{onChange:this.onChange,value:m},r),o),p))}}]),o}(n.default.PureComponent);return Df.DebounceInput=p,m(p,"defaultProps",{element:"input",type:"text",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0}),Df}var Bf=function(){if(Af)return Ff;Af=1;var e=Lf().DebounceInput;return e.DebounceInput=e,Ff=e}(),zf="Input-module_input__ulQdV";const $f=t.forwardRef(({testId:t,className:n,type:r,name:a,placeholder:o,minLength:i=0,debounceTimeout:s=100,onChange:l,value:c,htmlId:u},f)=>e.jsx(Bf.DebounceInput,{inputRef:f,"data-testid":t,className:`${zf} ${n||""}`,type:r,name:a,placeholder:o,minLength:i,debounceTimeout:s,onChange:l,value:c,id:u}));var Vf="SharedQueryInput-module_wrapper__XRxrd",Hf="SharedQueryInput-module_search__XlzRv",Wf="SharedQueryInput-module_search-synced__J4T4b",Uf="SharedQueryInput-module_searchWithSync__ryuQa",Jf="SharedQueryInput-module_icon__Aq0Hv",Qf="SharedQueryInput-module_checked__oRvod",qf="SharedQueryInput-module_sync__0IO2N",Xf="SharedQueryInput-module_syncSelected__hstBI",Yf="SharedQueryInput-module_searchIcon__kfJxO";const Kf=({onHighlightChange:n,highlightQuery:r,sharedQuery:a,width:o})=>{const i=ac(),s=(e=>{const n=t.useRef();return t.useEffect(()=>{n.current=e},[e]),n.current})(null==a?void 0:a.syncEnabled),l=t.useRef(null),[c,u]=t.useState(!1);t.useEffect(()=>{"string"==typeof(null==a?void 0:a.searchQuery)&&(a.syncEnabled&&n(a.searchQuery),!a.syncEnabled&&s&&s!==(null==a?void 0:a.id)&&n(""))},[null==a?void 0:a.searchQuery,null==a?void 0:a.syncEnabled]),t.useEffect(()=>{const e=l.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");u(!!t)},[]);const f=t.useMemo(()=>a&&a.syncEnabled?a.searchQuery||"":r,[a,r]),d=t.useMemo(()=>`${a?Uf:Hf} ${(null==a?void 0:a.syncEnabled)?Wf:""}`,[a]),h=(null==a?void 0:a.syncEnabled)?i.unsyncSearchBars:i.syncSearchBars;return e.jsxs("div",{ref:l,className:Vf,style:{width:o},children:[e.jsx("span",{className:Yf,children:e.jsx($r,{icon:If.faSearch})}),e.jsx($f,{testId:"flamegraph-search",className:d,type:"search",name:"flamegraph-search",placeholder:c?"搜索函数 / 过滤":i.searchPlaceholder,minLength:1,debounceTimeout:100,onChange:e=>{n(e.target.value),a&&a.syncEnabled&&a.onQueryChange(e.target.value)},value:f}),a?e.jsx(kf,{placement:"top",title:h,children:e.jsx("button",{className:a.syncEnabled?Xf:qf,onClick:()=>{const e=!(null==a?void 0:a.syncEnabled)&&(null==a?void 0:a.id);null==a||a.toggleSync(e),e?null==a||a.onQueryChange(r):(n(r),null==a||a.onQueryChange(""))},children:e.jsx($r,{className:`${a.syncEnabled?Qf:Jf}`,icon:Cf.faLink})})}):null]})};var Zf="DiffLegend-module_flamegraph-legend__Cywr1",Gf="DiffLegend-module_flamegraph-legend-list__swdXj",ed="DiffLegend-module_flamegraph-legend-item__0P-6g";function td(t){const{palette:n,showMode:r}=t,a=function(e){switch(e){case"large":return[-100,-80,-60,-40,-20,-10,0,10,20,40,60,80,100];case"small":return[-100,-50,0,50,100];default:throw new Error(`Unsupported ${e}`)}}(r),o=Gi(n),i="small"===r?{"--legend-item-width":"32px","--legend-item-padding":"2px 2px","--legend-font-size":"10px","--legend-line-height":"1.1","--legend-item-height":"16px"}:void 0;return e.jsx("div",{"data-testid":"flamegraph-legend",className:`${Zf} ${Gf}`,style:i,children:a.map(t=>e.jsxs("div",{className:ed,style:{backgroundColor:o(t).rgb().toString()},children:[t>0?"+":"",t,"%"]},t))})}var nd="Dropdown-module_dropdownMenu__tbN8r",rd="Dropdown-module_dropdownMenuButton__Xy8M4";function ad({id:t,children:n,className:r,disabled:a,value:o,label:i,onItemClick:s,overflow:l,position:c,direction:u,align:f,viewScroll:d,arrow:h,menuButtonClassName:m="",ariaLabel:p,portal:g,...v}){const b=v.menuButton||e.jsx(id,{"aria-label":p,className:`${rd} ${m}`,disabled:a,type:"button",children:o||i});return e.jsxs(Ml,{id:t,"aria-label":p,className:Qc(r,nd),"data-testid":v["data-testid"],onItemClick:s,overflow:l,position:c,direction:u,align:f,viewScroll:d,arrow:h,menuButton:b,portal:g,children:[e.jsx(Ol,{children:i}),n]})}const od=Rl,id=ll;var sd="DiffLegendPaletteDropdown-module_container__h8Tts",ld="DiffLegendPaletteDropdown-module_triggerButton__oezA6",cd="DiffLegendPaletteDropdown-module_dropdownArrow__-Lu0w",ud="DiffLegendPaletteDropdown-module_menuItem__5iWry",fd="DiffLegendPaletteDropdown-module_menuItemText__a-tt0",dd="DiffLegendPaletteDropdown-module_dropdownMenu__G0NkR",hd="DiffLegendPaletteDropdown-module_menuItemWrapper__vAw-Q",md="DiffLegendPaletteDropdown-module_menuItemSelected__1gu9m";const pd=[ql,Xl],gd=t=>{const{palette:n=ql,onChange:r}=t,a=ac(),o=e=>"Default"===e.name?a.paletteDefaultName:"Color Blind"===e.name?a.paletteColorBlindName:e.name,i=e=>"Default"===e.name?a.paletteDefaultDesc:"Color Blind"===e.name?a.paletteColorBlindDesc:"";return e.jsx("div",{className:sd,children:e.jsx(ad,{label:a.diffLegendSelectPalette,align:"end",className:dd,menuButton:e.jsxs(id,{className:Qc(rd,ld),children:[e.jsx(td,{palette:n,showMode:"small"}),e.jsx("span",{className:cd})]}),onItemClick:e=>{e.value&&r(e.value)},children:pd.map(t=>e.jsx(od,{value:t,className:Qc(hd,t.name===n.name&&md),children:e.jsx("div",{className:ud,children:e.jsxs("span",{className:fd,children:[o(t)," ",i(t)]})})},t.name))})})};var vd={navbar:"Toolbar-module_navbar__XN6xZ",searchWrapper:"Toolbar-module_searchWrapper__k--ua",rightSection:"Toolbar-module_rightSection__if7LO",viewType:"Toolbar-module_viewType__AKARg",toggleViewButton:"Toolbar-module_toggleViewButton__OQ9-U",fitModeButton:"Toolbar-module_fitModeButton__jOxve",selected:"Toolbar-module_selected__vwBQt",collapseNodeButton:"Toolbar-module_collapseNodeButton__bLdiw",resetViewButton:"Toolbar-module_resetViewButton__y2ebV",divider:"Toolbar-module_divider__dG6pE",itemsContainer:"Toolbar-module_itemsContainer__gSTMF",item:"Toolbar-module_item__o-hKc",moreButton:"Toolbar-module_moreButton__rhOdT",active:"Toolbar-module_active__36Kt-",navbarCollapsedItems:"Toolbar-module_navbarCollapsedItems__vojhw"};const bd=d.bind(vd),yd=(e,t,n)=>{const r=0===t?e-360-5:e-360-16-5;let a=0,o=0;return n.reverse().forEach(e=>{o+=e,r<=o&&(a+=1)}),a},wd=()=>e.jsx("div",{className:vd.divider}),xd=t.memo(({view:n,handleSearchChange:r,highlightQuery:a,isFlamegraphDirty:o,reset:i,updateFitMode:s,fitMode:l,updateView:c,selectedNode:u,onFocusOnSubtree:f,flamegraphType:d,enableChangingDisplay:h=!0,sharedQuery:m,ExportData:p,palette:g,setPalette:v})=>{const b=t.useRef(null),[y,w]=t.useState(!1),x=ac();t.useEffect(()=>{const e=b.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");w(!!t)},[]);const k=y?32:44,j=y?220:360,_="double"===d&&g&&v,N=[{el:e.jsxs(e.Fragment,{children:[e.jsx(_d,{fitMode:l,updateFitMode:s}),e.jsx(wd,{})]}),width:2*k+5},{el:e.jsx(jd,{isFlamegraphDirty:o,reset:i}),width:k},{el:e.jsxs(e.Fragment,{children:[e.jsx(kd,{selectedNode:u,onFocusOnSubtree:f}),e.jsx(wd,{})]}),width:k+5},h?{el:e.jsx(Sd,{flamegraphType:d,view:n,updateView:c}),width:k*("single"===d?5:3)}:null,t.isValidElement(p)?{el:e.jsxs(e.Fragment,{children:[e.jsx(wd,{}),p]}),width:k+5}:null].filter(e=>null!==e),S=N.reduce((e,t)=>[...e,t.width],[]),{isCollapsed:M,collapsedItemsNumber:C,handleMoreClick:T}=((e,n)=>{const[r,a]=t.useState(!0),[o,i]=t.useState(0);return t.useLayoutEffect(()=>{if(e.current){const{width:t}=e.current.getBoundingClientRect(),r=yd(t,o,n);i(r)}},[e.current,n]),Fl(e,e=>{const{width:t}=e.target.getBoundingClientRect(),r=yd(t,o,n);i(r),a(!0)}),{isCollapsed:r,handleMoreClick:()=>{a(e=>!e)},collapsedItemsNumber:o}})(b,S),R=N.reduce((e,t,n)=>(n<C?e.hidden.push(t):e.visible.push(t),e),{visible:[],hidden:[]});return e.jsx("div",{role:"toolbar",ref:b,children:e.jsxs("div",{className:vd.navbar,children:[e.jsx("div",{className:vd.searchWrapper,children:e.jsx(Kf,{width:j,onHighlightChange:r,highlightQuery:a,sharedQuery:m})}),e.jsxs("div",{className:vd.rightSection,children:[_&&e.jsxs(e.Fragment,{children:[e.jsx(gd,{palette:g,onChange:v}),e.jsx(wd,{})]}),e.jsxs("div",{className:vd.itemsContainer,children:[R.visible.map((t,n)=>e.jsx("div",{className:vd.item,style:{width:t.width},children:t.el},n)),0!==C&&e.jsx(kf,{placement:"top",title:x.more,children:e.jsx("button",{onClick:T,className:bd({[vd.moreButton]:!0,[vd.active]:!M}),children:e.jsx($r,{icon:vf.faEllipsisV})})})]})]}),!M&&e.jsx("div",{className:vd.navbarCollapsedItems,children:R.hidden.map((t,n)=>e.jsx("div",{className:vd.item,style:{width:t.width},children:t.el},n))})]})})});function kd({onFocusOnSubtree:t,selectedNode:n}){const r=ac(),a=n.mapOr(()=>{},e=>()=>t(e.i,e.j));return e.jsx(kf,{placement:"top",title:r.collapseNodesAbove,children:e.jsx("div",{children:e.jsx(Ru,{disabled:!n.isJust,onClick:a,className:vd.collapseNodeButton,"aria-label":r.collapseNodesAbove,children:e.jsx($r,{icon:As.faCompressAlt})})})})}function jd({isFlamegraphDirty:t,reset:n}){const r=ac();return e.jsx(kf,{placement:"top",title:r.resetView,children:e.jsx("span",{children:e.jsx(Ru,{id:"reset",disabled:!t,onClick:n,className:vd.resetViewButton,"aria-label":r.resetView,children:e.jsx($r,{icon:af.faUndo})})})})}function _d({fitMode:t,updateFitMode:n}){const r=ac(),a=e=>t===e;return e.jsxs(e.Fragment,{children:[e.jsx(kf,{placement:"top",title:r.headFirst,children:e.jsx(Ru,{onClick:()=>n("HEAD"),className:bd({[vd.fitModeButton]:!0,[vd.selected]:a("HEAD")}),children:e.jsx(kc,{})})}),e.jsx(kf,{placement:"top",title:r.tailFirst,children:e.jsx(Ru,{onClick:()=>n("TAIL"),className:bd({[vd.fitModeButton]:!0,[vd.selected]:a("TAIL")}),children:e.jsx(jc,{})})})]})}const Nd=(t,n)=>"single"===t?[{label:n.viewFlamegraph,value:"flamegraph",Icon:wc},{label:n.viewTable,value:"table",Icon:bc},{label:n.viewTableAndFlamegraph,value:"both",Icon:yc},{label:n.viewSandwich,value:"sandwich",Icon:xc},{label:n.viewGraphviz,value:"graphviz",Icon:()=>e.jsx($r,{icon:df.faProjectDiagram})}]:[{label:n.viewFlamegraph,value:"flamegraph",Icon:wc},{label:n.viewTable,value:"table",Icon:bc},{label:n.viewTableAndFlamegraph,value:"both",Icon:yc}];function Sd({view:t,updateView:n,flamegraphType:r}){const a=ac(),o=Nd(r,a);return e.jsx("div",{className:vd.viewType,children:o.map(({label:r,value:a,Icon:o})=>e.jsx(kf,{placement:"top",title:r,children:e.jsx(Ru,{"data-testid":a,onClick:()=>n(a),className:bd({[vd.toggleViewButton]:!0,selected:t===a}),children:e.jsx(o,{})})},a))})}function Md(e,t){const n={},r={};let a={name:"total",children:[],self:[],total:[],key:"/total"};return(t?[e,t]:[e]).forEach((e,t)=>{var o,i;for(let s=0;s<e.levels.length;s+=1)for(let l=0;l<e.levels[s].length;l+=4){const c=[t,s,l].join("/"),u=e.names[e.levels[s][l+3]],f=e.levels[s][l+0],d=e.levels[s][l+1],h=e.levels[s][l+2];let m="";if(0!==s){const n=s-1,a=e.levels[n];for(let e=0;e<a.length;e+=4){const o=a[e+0],i=a[e+1];if(f>=o&&f<o+i){const a=[t,n,e].join("/");m=r[a].key;break}}}const p=[m||"",u].join("/"),g=!n[p];n[p]||(n[p]={name:u,children:[],self:[],total:[],key:p});const v=n[p];(o=v.total)[t]||(o[t]=0),v.total[t]+=d,(i=v.self)[t]||(i[t]=0),v.self[t]+=h,r[c]=v,m&&g&&n[m].children.push(v),0===s&&(a=v)}}),a}const Cd=e=>{const t={maxSelf:100,names:[],levels:[]},n=(e,r,a)=>{var o;const{name:i,children:s,self:l,total:c,offset:u}=e;t.names.push(i),(o=t.levels)[r]||(o[r]=[]),t.maxSelf=Math.max(t.maxSelf,l[0]||0),t.levels[r]=t.levels[r].concat([a,c[0]||0,l[0]||0,t.names.length-1]);for(let e=0;e<s.length;e+=1){a+=n(s[e],r+1,a)}return u||c[0]||0};return n(e,0,0),t};function Td(e){const t=new Map;for(let n=0;n<e.children.length;n+=1)t.has(e.children[n].name)||t.set(e.children[n].name,e.children[n]);for(let n=0;n<e.children.length;n+=1){const r=e.children[n],a=t.get(e.children[n].name);a&&a!==r&&(a.total[0]+=r.total[0],a.self[0]+=r.self[0],a.children=a.children.concat(r.children))}e.children=Array.from(t.values());for(let t=0;t<e.children.length;t+=1)Td(e.children[t])}function Rd(e,t){const n=function(e,t){const n=Md(e),r={format:"single",numTicks:0,maxSelf:100,sampleRate:100,names:[],levels:[],units:e.units,spyName:e.spyName},a={name:t,total:[],self:[0],children:[]},o=e=>{e.name===t&&(r.numTicks+=e.total[0],a.total=[r.numTicks],a.children=a.children.concat(e.children));for(let t=0;t<e.children.length;t+=1)o(e.children[t])};return o(n),Td(a),{...r,...Cd(a)}}(JSON.parse(JSON.stringify(e)),t);return n}function Od(e,t){const n=function(e,t){const n=Md(e),r={format:"single",maxSelf:100,sampleRate:100,numTicks:0,names:[],levels:[],units:e.units,spyName:e.spyName},a=[],o=[],i={name:t,total:[0],self:[0],children:[]},s=(e,n=[])=>{const i=n.concat([{...e,children:[]}]);e.name===t&&(o.push(i),a.push(e.total[0]),r.numTicks+=e.total[0]);for(let t=0;t<e.children.length;t+=1)s(e.children[t],i)};s(n),o.forEach((e,t)=>{i.children.push(((e,t)=>{const n={};let r=n;return e.forEach(({name:e,...n})=>{const a={name:e,...n,total:[t]};r.children=[a],r=a}),n.children[0]})(e.reverse(),a[t]))}),Td(i);const l=Cd(i);return l.levels=l.levels.reverse().slice(0,-1),{...r,...l}}(JSON.parse(JSON.stringify(e)),t);return n}var Ed={flamegraphContainer:"FlamegraphRenderer-module_flamegraphContainer__-7FRV",createdBy:"FlamegraphRenderer-module_createdBy__rHAOT",horizontal:"FlamegraphRenderer-module_horizontal__zs7--",vertical:"FlamegraphRenderer-module_vertical__fRcHg",panesWrapper:"FlamegraphRenderer-module_panesWrapper__L-mlA",tablePane:"FlamegraphRenderer-module_tablePane__Gin7Y",sandwichPane:"FlamegraphRenderer-module_sandwichPane__IEOyR",sandwichPaneInfo:"FlamegraphRenderer-module_sandwichPaneInfo__5hT4a",arrow:"FlamegraphRenderer-module_arrow__dPzpE",sandwichTop:"FlamegraphRenderer-module_sandwichTop__7N0ZY",sandwichBottom:"FlamegraphRenderer-module_sandwichBottom__Dc64g",name:"FlamegraphRenderer-module_name__XRbN9"};function Pd(e){const t=[];return Object.keys(e).forEach(n=>{var r;t.push(`${n}="${r=String(e[n]||""),r.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`)}),`[${t.join(" ")}]`}function Fd(e,t){return`${(100*e/t).toFixed(2)}%`}function Ad(e,t){let n,r,a,o;t?(n=.1,r=.93):(n=1,r=.7),e=Math.max(-1,Math.min(1,e)),Math.abs(e)<.2&&(n*=Math.abs(e)/.2),e>0&&(e**=1-.7),e<0&&(e=-((-e)**(1-.7))),e<0?(o=r,a=r*(1+n*e)):(a=r,o=r*(1-n*e));const i=r*(1-n);return`#${Math.floor(255*a).toString(16).padStart(2,"0")}${Math.floor(255*o).toString(16).padStart(2,"0")}${Math.floor(255*i).toString(16).padStart(2,"0")}`}function Id(e,t,n,r){const{self:a}=t,{total:o}=t,i=t.name.replace(/"/g,'\\"'),s=e(a),l=8+Math.ceil(16*Math.sqrt(a/n)),c=Ad(o/r,!1),u=Ad(o/r,!0),f=function(e,t,n,r,a){let o="";o=`${function(e){return e.replace(/.*\//,"")}(t)}\n`;const i=e(n);0!==n?o=`${o+i} (${Fd(n,a)})`:o+="0";let s=i;r!==n&&(o+=0!==n?"\n":" ",s=e(r),o=`${o}of ${s} (${Fd(r,a)})`);return o}(e,i,a,o,r),d={label:f,id:`node${t.index}`,fontsize:l,shape:"box",tooltip:`${i} (${s})`,color:c,fontcolor:"#000000",style:"filled",fontname:"",fillcolor:u};return`N${t.index} ${Pd(d)}`}function Dd(e){if("double"===e.metadata.format)return"diff flamegraphs are not supported";const t=Md(e.flamebearer),n=[],r=[];const[a,o,,i]=function e(t,n,r,a,o){return t.children.forEach(t=>{const[i,s]=e(t,n,r,a,o);n=Math.max(n,i),r=Math.max(r,s)}),n=Math.max(n,t.self[0]),r=Math.max(r,t.total[0]),a+=t.self[0],o+=t.total[0],[n,r,a,o]}(t,0,0,0,0),{sampleRate:s,units:l}=e.metadata,c=Aa(o,s,l),u=e=>c.format(e,s,!0);let f={};const d={};let h=0;function m(e,t){return-1===t.indexOf(e.name)&&(f[e.name]?(f[e.name].self+=e.self[0],f[e.name].total+=e.total[0]):(h+=1,f[e.name]={index:h,name:e.name,self:e.self[0],total:e.total[0],parents:[],children:[]})),e.children.forEach(n=>{const r=m(n,t.concat([e.name])),a=`${e.name}/${n.name}`;n.name!==e.name&&(d[a]?d[a].weight+=n.total[0]:d[a]={from:f[e.name],to:r,weight:n.total[0],residual:!1},r.parents.push(d[a]),f[e.name].children.push(d[a]))}),f[e.name]}t.children.forEach(e=>{m(e,[])});const p=.005*i,g=.001*i;function v(e,t){let n=0,r=t;if(e.forEach(e=>{e.weight>0&&(r+=Math.abs(e.weight))}),0!==r&&(e.forEach(e=>{const t=Math.abs(e.weight)/r;n+=-t*Math.log2(t)}),t>0)){const e=Math.abs(t)/r;n+=-e*Math.log2(e)}return n}Object.keys(f).forEach(e=>{f[e].total<p&&delete f[e]});const b={};Object.keys(f).forEach(e=>{b[f[e].name]=function(e){let t=0;return 0===e.parents.length?t+=1:t+=v(e.parents,0),0===e.children.length?t+=1:t+=v(e.children,e.self),t*e.total+e.self}(f[e])});const y=Object.values(f).sort((e,t)=>{const n=b[e.name],r=b[t.name];return n!==r?r-n:e.name!==t.name?e.name<t.name?-1:1:e.self!==t.self?r-n:e.name<t.name?-1:1}),w={};function x(e){const[t,n]=[e.from,e.to],r={},a=[n];for(;a.length>0;){const n=a.shift();for(let o=0;o<n.parents.length;o+=1){const i=n.parents[o];if(e!==i&&!r[i.from.name]){if(i.from===t)return!0;r[i.from.name]=!0,a.push(i.from)}}}return!1}return y.forEach(e=>{w[e.name]=e}),y.slice(80).forEach(e=>{delete w[e.name]}),function e(t,n){const r=!w[t.name];t.children.forEach(a=>{const o=!w[a.name];if(e(a,r?n:t),!o&&n&&r){const e=`${n.name}/${a.name}`;d[e]||(d[e]={from:f[n.name],to:f[a.name],weight:0,residual:!0}),d[e].weight+=a.total[0],d[e].residual=!0}})}(t,null),f=w,y.reverse().forEach(e=>{const t=e.parents.sort((e,t)=>t.weight-e.weight),n=[];for(let e=0;e<t.length;e+=1){const r=t[e];if(!r.residual)break;x(r)&&(n.push(r),delete d[`${r.from.name}/${r.to.name}`])}n.forEach(e=>{e.from.children=e.from.children.filter(t=>t.to!==e.to),e.to.parents=e.to.parents.filter(t=>t.from!==e.from)})}),Object.keys(d).forEach(e=>{const t=d[e];f[t.from.name]||delete d[e],f[t.to.name]||delete d[e],t.weight<g&&delete d[e]}),Object.keys(f).forEach(e=>{n.push(Id(u,f[e],a,o))}),Object.keys(d).forEach(e=>{r.push(function(e,t,n){const r=t.from.name.replace(/"/g,'\\"'),a=t.to.name.replace(/"/g,'\\"'),o=t.weight,i=e(t.weight),s=`${r} -> ${a} (${i})`,l={label:i,weight:1+100*o/n,penwidth:1+5*o/n,tooltip:s,labeltooltip:s,fontname:"",color:Ad(o/n,!1),style:t.residual?"dotted":""};return`N${t.from.index} -> N${t.to.index} ${Pd(l)}`}(u,d[e],o))}),`digraph "unnamed" {\n fontname= ""\n ${n.join("\n")}\n ${r.join("\n")}\n }`}var Ld="GraphVizPanel-module_graphVizPane__B18cQ";const Bd=()=>null;function zd({flamebearer:n}){var r,a;const o=n,i=(null===(r=o.metadata)||void 0===r?void 0:r.format)&&(null===(a=o.flamebearer)||void 0===a?void 0:a.levels),s=`graphviz-pane-${(null==o?void 0:o.appName)||String((new Date).valueOf())}`,l=t.useMemo(()=>Dd(o),[JSON.stringify(o)]);return e.jsx("div",{className:Ld,children:i?e.jsx(Bd,{options:{zoom:!0,width:"150%",height:"100%",scale:1,useWorker:!1},dot:l}):e.jsx("div",{children:"NO DATA"})},s)}function $d(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const r=[0,Math.floor(n/2),n-1];for(let n=0;n<r.length;n+=1){const a=e[r[n]];if(!a||0===a.length)continue;const o=Math.min(8,a.length);for(let e=0;e<o;e+=1)t^=0|a[e],t=Math.imul(t,16777619);for(let e=Math.max(0,a.length-o);e<a.length;e+=1)t^=0|a[e],t=Math.imul(t,16777619)}return t>>>0}function Vd(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const r=Math.min(32,n),a=[...Array.from({length:r},(e,t)=>t),...Array.from({length:r},(e,t)=>n-r+t)];for(let n=0;n<a.length;n+=1){const r=e[a[n]]||"";for(let e=0;e<r.length;e+=1)t^=r.charCodeAt(e),t=Math.imul(t,16777619)}return t>>>0}function Hd(e){var t,n,r,a,o,i;const s=e.__kylinSignature;if(s)return s;const l=e,c=[e.format,e.numTicks,e.sampleRate,e.units,e.maxSelf,null!==(n=null===(t=e.names)||void 0===t?void 0:t.length)&&void 0!==n?n:0,null!==(a=null===(r=e.levels)||void 0===r?void 0:r.length)&&void 0!==a?a:0,null!==(o=l.leftTicks)&&void 0!==o?o:"na",null!==(i=l.rightTicks)&&void 0!==i?i:"na",$d(e.levels),Vd(e.names||[])].join("|");return e.__kylinSignature=c,c}function Wd(e,t){const n=[...t];function r(e,t,n){for(const r of e){let e=0;for(let a=t;a<r.length;a+=n)r[a]-=e,e+=r[a]+r[a+1]}}return"double"===e?(r(n,0,7),r(n,3,7)):r(n,0,4),n}function Ud(e,t){const n=[...t];function r(e,t,n){for(const r of e){let e=0;for(let a=t;a<r.length;a+=n)r[a]+=e,e=r[a]+r[a+1]}}return"double"===e?(r(n,0,7),r(n,3,7)):r(n,0,4),n}function Jd(e){if(e.profile&&e.flamebearer&&console.warn("'profile' and 'flamebearer' properties are mutually exclusive. Please use profile if possible."),e.profile){const n=e.profile,r={...n,flamebearer:{...n.flamebearer}};n.__kylinDecoded||((t=r).flamebearer.levels=Ud(t.metadata.format,t.flamebearer.levels),n.__kylinDecoded=!0,r.__kylinDecoded=!0);const a={...r,...r.metadata,...r.flamebearer,flamebearer:void 0,metadata:void 0};return delete a.flamebearer,delete a.metadata,a}var t;if(e.flamebearer)return e.flamebearer;return{format:"single",names:[],units:"unknown",levels:[[]],spyName:"unknown",numTicks:0,sampleRate:0,maxSelf:0}}class Qd extends t.Component{constructor(t){super(t),this.resetFlamegraphState={focusedNode:da.nothing(),zoom:da.nothing()},this.initialFlamegraphState=this.resetFlamegraphState,this.calcNewConfigs=(e,t)=>{const n=this.state.flamegraphConfigs,r=(e,t,n)=>{const r=(e,t,n)=>e.names[xa(e.format).getBarName(e.levels[t],n)];if(n.isNothing)return!0;try{const a=n,o=r(e,a.value.i,a.value.j);return o===r(t,a.value.i,a.value.j)}catch{return!1}};r(e,t,this.state.flamegraphConfigs.zoom)||(n.zoom=this.resetFlamegraphState.zoom);return r(e,t,this.state.flamegraphConfigs.focusedNode)||(n.focusedNode=this.resetFlamegraphState.focusedNode),n},this.onSearchChange=e=>{this.setState({searchQuery:e})},this.isSameFlamebearer=(e,t)=>function(e,t){return Hd(e)===Hd(t)}(e,t),this.onReset=()=>{this.setState({...this.state,flamegraphConfigs:{...this.state.flamegraphConfigs,...this.initialFlamegraphState},selectedItem:da.nothing()})},this.onFlamegraphZoom=e=>{e.isJust&&0===e.value.i&&0===e.value.j?this.onReset():this.setState({...this.state,flamegraphConfigs:{...this.state.flamegraphConfigs,zoom:e}})},this.onFocusOnNode=(e,t)=>{if(0===e&&0===t)return void this.onReset();let n={...this.state.flamegraphConfigs};const{zoom:r}=this.state.flamegraphConfigs;r.isJust&&r.value.i<=e&&(n={...n,zoom:this.initialFlamegraphState.zoom}),this.setState({...this.state,flamegraphConfigs:{...n,focusedNode:da.just({i:e,j:t})}})},this.isNameInFocusedSubtree=e=>{const{focusedNode:t}=this.state.flamegraphConfigs;if(t.isNothing)return!0;const{flamebearer:n}=this.state;if(!n||!n.levels)return!0;const{names:r,levels:a,format:o}=n,i=xa(o),s=t.value.i,l=t.value.j,c=a[s];if(!c)return!0;const u=i.getBarOffset(c,l),f=u+i.getBarTotal(c,l);for(let t=s;t<a.length;t++){const n=a[t];for(let t=0;t<n.length;t+=i.jStep){const a=i.getBarOffset(n,t),o=i.getBarTotal(n,t);if(a>=u&&a+o<=f){if(r[i.getBarName(n,t)]===e)return!0}}}return!1},this.setActiveItem=e=>{const{name:t}=e;if(this.state.selectedItem.isJust&&t===this.state.selectedItem.value)return void this.setState({selectedItem:da.nothing()});this.isNameInFocusedSubtree(t)?this.setState({selectedItem:da.just(t)}):this.setState({selectedItem:da.just(t),flamegraphConfigs:{...this.state.flamegraphConfigs,focusedNode:this.resetFlamegraphState.focusedNode}})},this.getHighlightQuery=()=>this.state.selectedItem.isJust?this.state.selectedItem.value:this.state.searchQuery,this.updateView=e=>{"sandwich"===e&&this.setState({searchQuery:"",flamegraphConfigs:this.resetFlamegraphState}),this.setState({view:e})},this.updateFlamegraphDirtiness=()=>{const e=this.isDirty();this.setState({isFlamegraphDirty:e})},this.updateFitMode=e=>{this.setState({fitMode:e})},this.clearFocus=()=>{this.setState(e=>({...e,flamegraphConfigs:{...e.flamegraphConfigs,...this.resetFlamegraphState}}))},this.getActiveRange=()=>{const{flamebearer:e}=this.state,{zoom:t,focusedNode:n}=this.state.flamegraphConfigs,r=e.numTicks;if(!r)return{rangeMin:0,rangeMax:1};const a=xa(e.format),o=t=>{const n=e.levels[t.i];if(!n)return{rangeMin:0,rangeMax:1};const o=a.getBarOffset(n,t.j),i=a.getBarTotal(n,t.j);return{rangeMin:o/r,rangeMax:(o+i)/r}};return t.match({Just:e=>n.match({Just:t=>{const n=o(t),r=o(e);return n.rangeMax-n.rangeMin<r.rangeMax-r.rangeMin?n:r},Nothing:()=>o(e)}),Nothing:()=>n.match({Just:e=>o(e),Nothing:()=>({rangeMin:0,rangeMax:1})})})},this.isDirty=()=>this.state.selectedItem.isJust||JSON.stringify(this.initialFlamegraphState)!==JSON.stringify(this.state.flamegraphConfigs),this.handleSetPalette=e=>{this.setState({palette:e})},this.render=()=>{var t;const n=e.jsx("div",{className:fs(Ed.tablePane,"vertical"===this.state.panesOrientation?Ed.vertical:Ed.horizontal),children:e.jsx(Xu,{"data-testid":"table-view",flamebearer:this.state.flamebearer,fitMode:this.state.fitMode,highlightQuery:this.state.searchQuery,selectedItem:this.state.selectedItem,handleTableItemClick:this.setActiveItem,palette:this.state.palette,onFocusOnNode:this.onFocusOnNode,updateView:this.props.onlyDisplay?void 0:this.updateView,enableSandwichView:this.props.enableSandwichView})},"table-pane"),r=this.shouldShowToolbar(),o=!this.state.flamebearer||this.state.flamebearer.names.length<=1,i=this.context,s="Location"!==i.location,l=this.state.flamebearer.numTicks,c=Aa(l,this.state.flamebearer.sampleRate,this.state.flamebearer.units).format(l,this.state.flamebearer.sampleRate),u=Oa(c,s)||c,f=function(e,t=Ea){const n=Math.abs(e);for(const{value:r,label:a}of t)if(n>=r)return`${(e/r).toFixed(2).replace(/\.?0+$/,"")} ${a}`;return Ta(e)}(l,i.sampleCountFormat),d=i.tooltipSamples.replace(/[::]\s*$/,""),h=(null===(t=i.tooltipUnitTitles[this.state.flamebearer.units])||void 0===t?void 0:t.formattedValue)||i.tooltipUnitTitles.unknown.formattedValue,m=this.getActiveRange(),p=m.rangeMin>0||m.rangeMax<1,g=Math.max(0,Math.min(l,(m.rangeMax-m.rangeMin)*l)),v=l>0?g/l*100:0,b=(()=>{const e=xa(this.state.flamebearer.format),t=this.state.flamegraphConfigs.focusedNode.mapOrElse(()=>this.state.flamegraphConfigs.zoom.mapOrElse(()=>null,e=>e),e=>e);if(!t)return"";const n=this.state.flamebearer.levels[t.i];if(!n)return"";const r=e.getBarName(n,t.j);return this.state.flamebearer.names[r]||""})(),y=e.jsx(Vc,{showCredit:this.props.showCredit,flamebearer:this.state.flamebearer,highlightQuery:this.getHighlightQuery(),setActiveItem:this.setActiveItem,selectedItem:this.state.selectedItem,updateView:this.props.onlyDisplay?void 0:this.updateView,fitMode:this.state.fitMode,updateFitMode:this.updateFitMode,zoom:this.state.flamegraphConfigs.zoom,focusedNode:this.state.flamegraphConfigs.focusedNode,onZoom:this.onFlamegraphZoom,onFocusOnNode:this.onFocusOnNode,onReset:this.onReset,isDirty:this.isDirty,palette:this.state.palette,toolbarVisible:r,setPalette:this.handleSetPalette,enableSandwichView:this.props.enableSandwichView,breadcrumb:o?void 0:{totalValueText:u,totalSamplesText:f,samplesLabel:d,unitLabel:h,hasFocus:p,focusPercent:v,focusLabel:b,ofTotalPlacement:s?"before":"after",ofTotalLabel:i.ofTotal,clearFocusLabel:i.clearFocus,onClearFocus:this.clearFocus}},"flamegraph-pane"),w=(()=>{if("sandwich"!==this.state.view)return e.jsx("div",{className:Ed.sandwichPane},"sandwich-pane");if(this.state.selectedItem.isNothing)return e.jsx("div",{className:Ed.sandwichPane,children:e.jsxs("div",{className:fs(Ed.sandwichPaneInfo,"vertical"===this.state.panesOrientation?Ed.vertical:Ed.horizontal),children:[e.jsx("div",{className:Ed.arrow}),"Select a function to view callers/callees sandwich view"]})},"sandwich-pane");const t=Od(this.state.flamebearer,this.state.selectedItem.value),n=Rd(this.state.flamebearer,this.state.selectedItem.value),a=t=>e.jsx(Vc,{disableClick:!0,showCredit:this.props.showCredit,highlightQuery:"",setActiveItem:this.setActiveItem,selectedItem:this.state.selectedItem,fitMode:this.state.fitMode,updateFitMode:this.updateFitMode,zoom:this.state.flamegraphConfigs.zoom,focusedNode:this.state.flamegraphConfigs.focusedNode,onZoom:this.onFlamegraphZoom,onFocusOnNode:this.onFocusOnNode,onReset:this.onReset,isDirty:this.isDirty,palette:this.state.palette,toolbarVisible:r,setPalette:this.handleSetPalette,...t});return e.jsxs("div",{className:Ed.sandwichPane,children:[e.jsxs("div",{className:Ed.sandwichTop,children:[e.jsx("span",{className:Ed.name,children:"Callers"}),a({flamebearer:t})]}),e.jsxs("div",{className:Ed.sandwichBottom,children:[e.jsx("span",{className:Ed.name,children:"Callees"}),a({flamebearer:n,headerVisible:!1,showSingleLevel:!0})]})]},"sandwich-pane")})(),x=function(e,t,n,r,a){switch(e){case"table":return[n];case"flamegraph":return[t];case"sandwich":return[n,r];case"both":return[n,t];case"graphviz":return[a];default:throw new Error(`Invalid view '${e}'`)}}(this.state.view,y,n,w,e.jsx(zd,{flamebearer:this.state.flamebearer}));return e.jsxs("div",{children:[e.jsxs("div",{children:[r&&e.jsx(xd,{sharedQuery:this.props.sharedQuery,enableChangingDisplay:!this.props.onlyDisplay,flamegraphType:this.state.flamebearer.format,view:this.state.view,handleSearchChange:this.onSearchChange,reset:this.onReset,updateView:this.updateView,updateFitMode:this.updateFitMode,fitMode:this.state.fitMode,isFlamegraphDirty:this.isDirty(),selectedNode:this.state.flamegraphConfigs.zoom,highlightQuery:this.state.searchQuery,onFocusOnSubtree:this.onFocusOnNode,ExportData:this.props.ExportData,palette:this.state.palette,setPalette:this.handleSetPalette}),this.props.children,e.jsx("div",{className:`${Ed.flamegraphContainer} ${fs("vertical"===this.state.panesOrientation?Ed.vertical:Ed.horizontal,Ed[this.state.panesOrientation],Ed.panesWrapper)}`,children:o?e.jsx(hs,{}):x.map(e=>e)})]}),this.props.showPyroscopeLogo&&e.jsxs("div",{className:Ed.createdBy,children:["Created by",e.jsxs("a",{href:"https://twitter.com/PyroscopeIO",rel:"noreferrer",target:"_blank",children:[e.jsx(a,{width:"30",height:"30"}),"@PyroscopeIO"]})]})]})},this.state={isFlamegraphDirty:!1,view:this.props.onlyDisplay?this.props.onlyDisplay:"both",fitMode:"HEAD",flamebearer:Jd(t),panesOrientation:t.panesOrientation?t.panesOrientation:"horizontal",searchQuery:"",selectedItem:da.nothing(),flamegraphConfigs:this.initialFlamegraphState,palette:ql}}componentDidUpdate(e,t){if(e.profile!==this.props.profile||e.flamebearer!==this.props.flamebearer){const e=t.flamebearer,n=Jd(this.props);if(!this.isSameFlamebearer(e,n)){const t=this.calcNewConfigs(e,n);return void this.setState({flamebearer:n,flamegraphConfigs:{...this.state.flamegraphConfigs,...t},selectedItem:da.nothing()})}}t.flamegraphConfigs!==this.state.flamegraphConfigs&&this.updateFlamegraphDirtiness()}shouldShowToolbar(){return void 0===this.props.showToolbar||this.props.showToolbar}}Qd.contextType=nc,Qd.defaultProps={showCredit:!1};const qd={showPyroscopeLogo:!1},Xd=(e,t)=>{if(t)return t;const n=null!=e?e:"auto";return"zh-CN"===("auto"===n?"undefined"!=typeof navigator&&navigator.language&&navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en":n)?ec:Gl};var Yd,Kd={exports:{}};var Zd,Gd=(Yd||(Yd=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,a="[object Arguments]",o="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",m="[object Promise]",p="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",w="[object ArrayBuffer]",x="[object DataView]",k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j=/^\w*$/,_=/^\./,N=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S=/\\(\\)?/g,M=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[a]=T[o]=T[w]=T[s]=T[x]=T[l]=T[c]=T[u]=T[f]=T[d]=T[h]=T[p]=T[g]=T[v]=T[y]=!1;var R="object"==typeof i&&i&&i.Object===Object&&i,O="object"==typeof self&&self&&self.Object===Object&&self,E=R||O||Function("return this")(),P=t&&!t.nodeType&&t,F=P&&e&&!e.nodeType&&e,A=F&&F.exports===P&&R.process,I=function(){try{return A&&A.binding("util")}catch(e){}}(),D=I&&I.isTypedArray;function L(e,t,n,r){for(var a=-1,o=e?e.length:0;++a<o;){var i=e[a];t(r,i,n(i),e)}return r}function B(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function $(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var H,W,U,J=Array.prototype,Q=Function.prototype,q=Object.prototype,X=E["__core-js_shared__"],Y=(H=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",K=Q.toString,Z=q.hasOwnProperty,G=q.toString,ee=RegExp("^"+K.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=E.Symbol,ne=E.Uint8Array,re=q.propertyIsEnumerable,ae=J.splice,oe=(W=Object.keys,U=Object,function(e){return W(U(e))}),ie=ze(E,"DataView"),se=ze(E,"Map"),le=ze(E,"Promise"),ce=ze(E,"Set"),ue=ze(E,"WeakMap"),fe=ze(Object,"create"),de=qe(ie),he=qe(se),me=qe(le),pe=qe(ce),ge=qe(ue),ve=te?te.prototype:void 0,be=ve?ve.valueOf:void 0,ye=ve?ve.toString:void 0;function we(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function je(e){var t=-1,n=e?e.length:0;for(this.__data__=new ke;++t<n;)this.add(e[t])}function _e(e){this.__data__=new xe(e)}function Ne(e,t){var n=et(e)||Ge(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,a=!!r;for(var o in e)!Z.call(e,o)||a&&("length"==o||Ve(o,r))||n.push(o);return n}function Se(e,t){for(var n=e.length;n--;)if(Ze(e[n][0],t))return n;return-1}function Me(e,t,n,r){return Te(e,function(e,a,o){t(r,e,n(e),o)}),r}we.prototype.clear=function(){this.__data__=fe?fe(null):{}},we.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},we.prototype.get=function(e){var t=this.__data__;if(fe){var r=t[e];return r===n?void 0:r}return Z.call(t,e)?t[e]:void 0},we.prototype.has=function(e){var t=this.__data__;return fe?void 0!==t[e]:Z.call(t,e)},we.prototype.set=function(e,t){return this.__data__[e]=fe&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=Se(t,e);return!(n<0||(n==t.length-1?t.pop():ae.call(t,n,1),0))},xe.prototype.get=function(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return Se(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ke.prototype.clear=function(){this.__data__={hash:new we,map:new(se||xe),string:new we}},ke.prototype.delete=function(e){return Be(this,e).delete(e)},ke.prototype.get=function(e){return Be(this,e).get(e)},ke.prototype.has=function(e){return Be(this,e).has(e)},ke.prototype.set=function(e,t){return Be(this,e).set(e,t),this},je.prototype.add=je.prototype.push=function(e){return this.__data__.set(e,n),this},je.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new xe},_e.prototype.delete=function(e){return this.__data__.delete(e)},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!se||r.length<199)return r.push([e,t]),this;n=this.__data__=new ke(r)}return n.set(e,t),this};var Ce,Te=(Ce=function(e,t){return e&&Re(e,t,lt)},function(e,t){if(null==e)return e;if(!tt(e))return Ce(e,t);for(var n=e.length,r=-1,a=Object(e);++r<n&&!1!==t(a[r],r,a););return e}),Re=function(e,t,n){for(var r=-1,a=Object(e),o=n(e),i=o.length;i--;){var s=o[++r];if(!1===t(a[s],s,a))break}return e};function Oe(e,t){for(var n=0,r=(t=He(t,e)?[t]:De(t)).length;null!=e&&n<r;)e=e[Qe(t[n++])];return n&&n==r?e:void 0}function Ee(e,t){return null!=e&&t in Object(e)}function Pe(e,t,n,r,i){return e===t||(null==e||null==t||!at(e)&&!ot(t)?e!=e&&t!=t:function(e,t,n,r,i,u){var m=et(e),y=et(t),k=o,j=o;m||(k=(k=$e(e))==a?h:k),y||(j=(j=$e(t))==a?h:j);var _=k==h&&!z(e),N=j==h&&!z(t),S=k==j;if(S&&!_)return u||(u=new _e),m||st(e)?Le(e,t,n,r,i,u):function(e,t,n,r,a,o,i){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!r(new ne(e),new ne(t)));case s:case l:case d:return Ze(+e,+t);case c:return e.name==t.name&&e.message==t.message;case p:case v:return e==t+"";case f:var u=$;case g:var h=2&o;if(u||(u=V),e.size!=t.size&&!h)return!1;var m=i.get(e);if(m)return m==t;o|=1,i.set(e,t);var y=Le(u(e),u(t),r,a,o,i);return i.delete(e),y;case b:if(be)return be.call(e)==be.call(t)}return!1}(e,t,k,n,r,i,u);if(!(2&i)){var M=_&&Z.call(e,"__wrapped__"),C=N&&Z.call(t,"__wrapped__");if(M||C){var T=M?e.value():e,R=C?t.value():t;return u||(u=new _e),n(T,R,r,i,u)}}return!!S&&(u||(u=new _e),function(e,t,n,r,a,o){var i=2&a,s=lt(e),l=s.length,c=lt(t),u=c.length;if(l!=u&&!i)return!1;for(var f=l;f--;){var d=s[f];if(!(i?d in t:Z.call(t,d)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);for(var p=i;++f<l;){var g=e[d=s[f]],v=t[d];if(r)var b=i?r(v,g,d,t,e,o):r(g,v,d,e,t,o);if(!(void 0===b?g===v||n(g,v,r,a,o):b)){m=!1;break}p||(p="constructor"==d)}if(m&&!p){var y=e.constructor,w=t.constructor;y==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof w&&w instanceof w||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,r,i,u))}(e,t,Pe,n,r,i))}function Fe(e){return!(!at(e)||function(e){return!!Y&&Y in e}(e))&&(nt(e)||z(e)?ee:M).test(qe(e))}function Ae(e){return"function"==typeof e?e:null==e?ct:"object"==typeof e?et(e)?function(e,t){return He(e)&&We(t)?Ue(Qe(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Oe(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){t=He(t,e)?[t]:De(t);for(var r,a=-1,o=t.length;++a<o;){var i=Qe(t[a]);if(!(r=null!=e&&n(e,i)))break;e=e[i]}return r||!!(o=e?e.length:0)&&rt(o)&&Ve(i,o)&&(et(e)||Ge(e))}(e,t,Ee)}(n,e):Pe(t,r,void 0,3)}}(e[0],e[1]):(n=function(e){for(var t=lt(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,We(a)]}return t}(t=e),1==n.length&&n[0][2]?Ue(n[0][0],n[0][1]):function(e){return e===t||function(e,t,n,r){var a=n.length,o=a;if(null==e)return!o;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){var s=(i=n[a])[0],l=e[s],c=i[1];if(i[2]){if(void 0===l&&!(s in e))return!1}else if(!Pe(c,l,r,3,new _e))return!1}return!0}(e,0,n)}):He(r=e)?(a=Qe(r),function(e){return null==e?void 0:e[a]}):function(e){return function(t){return Oe(t,e)}}(r);var t,n,r,a}function Ie(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||q,t!==r)return oe(e);var t,n,r,a=[];for(var o in Object(e))Z.call(e,o)&&"constructor"!=o&&a.push(o);return a}function De(e){return et(e)?e:Je(e)}function Le(e,t,n,r,a,o){var i=2&a,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,f=!0,d=1&a?new je:void 0;for(o.set(e,t),o.set(t,e);++u<s;){var h=e[u],m=t[u];if(r)var p=i?r(m,h,u,t,e,o):r(h,m,u,e,t,o);if(void 0!==p){if(p)continue;f=!1;break}if(d){if(!B(t,function(e,t){if(!d.has(t)&&(h===e||n(h,e,r,a,o)))return d.add(t)})){f=!1;break}}else if(h!==m&&!n(h,m,r,a,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Be(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function ze(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Fe(n)?n:void 0}var $e=function(e){return G.call(e)};function Ve(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||C.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t){if(et(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!it(e))||j.test(e)||!k.test(e)||null!=t&&e in Object(t)}function We(e){return e==e&&!at(e)}function Ue(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}(ie&&$e(new ie(new ArrayBuffer(1)))!=x||se&&$e(new se)!=f||le&&$e(le.resolve())!=m||ce&&$e(new ce)!=g||ue&&$e(new ue)!=y)&&($e=function(e){var t=G.call(e),n=t==h?e.constructor:void 0,r=n?qe(n):void 0;if(r)switch(r){case de:return x;case he:return f;case me:return m;case pe:return g;case ge:return y}return t});var Je=Ke(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(it(e))return ye?ye.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return _.test(e)&&n.push(""),e.replace(N,function(e,t,r,a){n.push(r?a.replace(S,"$1"):t||e)}),n});function Qe(e){if("string"==typeof e||it(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function qe(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Xe,Ye=(Xe=function(e,t,n){Z.call(e,n)?e[n].push(t):e[n]=[t]},function(e,t){return(et(e)?L:Me)(e,Xe,Ae(t),{})});function Ke(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new(Ke.Cache||ke),n}function Ze(e,t){return e===t||e!=e&&t!=t}function Ge(e){return function(e){return ot(e)&&tt(e)}(e)&&Z.call(e,"callee")&&(!re.call(e,"callee")||G.call(e)==a)}Ke.Cache=ke;var et=Array.isArray;function tt(e){return null!=e&&rt(e.length)&&!nt(e)}function nt(e){var t=at(e)?G.call(e):"";return t==u||"[object GeneratorFunction]"==t}function rt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function at(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ot(e){return!!e&&"object"==typeof e}function it(e){return"symbol"==typeof e||ot(e)&&G.call(e)==b}var st=D?function(e){return function(t){return e(t)}}(D):function(e){return ot(e)&&rt(e.length)&&!!T[G.call(e)]};function lt(e){return tt(e)?Ne(e):Ie(e)}function ct(e){return e}e.exports=Ye}(Kd,Kd.exports)),Kd.exports),eh=s(Gd),th={exports:{}};var nh=(Zd||(Zd=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,a="[object Arguments]",o="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",m="[object Promise]",p="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",w="[object ArrayBuffer]",x="[object DataView]",k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j=/^\w*$/,_=/^\./,N=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S=/\\(\\)?/g,M=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[a]=T[o]=T[w]=T[s]=T[x]=T[l]=T[c]=T[u]=T[f]=T[d]=T[h]=T[p]=T[g]=T[v]=T[y]=!1;var R="object"==typeof i&&i&&i.Object===Object&&i,O="object"==typeof self&&self&&self.Object===Object&&self,E=R||O||Function("return this")(),P=t&&!t.nodeType&&t,F=P&&e&&!e.nodeType&&e,A=F&&F.exports===P&&R.process,I=function(){try{return A&&A.binding("util")}catch(e){}}(),D=I&&I.isTypedArray;function L(e,t){for(var n=-1,r=e?e.length:0,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}function B(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function $(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var H,W,U,J=Array.prototype,Q=Function.prototype,q=Object.prototype,X=E["__core-js_shared__"],Y=(H=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",K=Q.toString,Z=q.hasOwnProperty,G=q.toString,ee=RegExp("^"+K.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=E.Symbol,ne=E.Uint8Array,re=q.propertyIsEnumerable,ae=J.splice,oe=(W=Object.keys,U=Object,function(e){return W(U(e))}),ie=ze(E,"DataView"),se=ze(E,"Map"),le=ze(E,"Promise"),ce=ze(E,"Set"),ue=ze(E,"WeakMap"),fe=ze(Object,"create"),de=qe(ie),he=qe(se),me=qe(le),pe=qe(ce),ge=qe(ue),ve=te?te.prototype:void 0,be=ve?ve.valueOf:void 0,ye=ve?ve.toString:void 0;function we(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function je(e){var t=-1,n=e?e.length:0;for(this.__data__=new ke;++t<n;)this.add(e[t])}function _e(e){this.__data__=new xe(e)}function Ne(e,t){var n=Ze(e)||Ke(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,a=!!r;for(var o in e)!Z.call(e,o)||a&&("length"==o||Ve(o,r))||n.push(o);return n}function Se(e,t){for(var n=e.length;n--;)if(Ye(e[n][0],t))return n;return-1}we.prototype.clear=function(){this.__data__=fe?fe(null):{}},we.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},we.prototype.get=function(e){var t=this.__data__;if(fe){var r=t[e];return r===n?void 0:r}return Z.call(t,e)?t[e]:void 0},we.prototype.has=function(e){var t=this.__data__;return fe?void 0!==t[e]:Z.call(t,e)},we.prototype.set=function(e,t){return this.__data__[e]=fe&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=Se(t,e);return!(n<0||(n==t.length-1?t.pop():ae.call(t,n,1),0))},xe.prototype.get=function(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return Se(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ke.prototype.clear=function(){this.__data__={hash:new we,map:new(se||xe),string:new we}},ke.prototype.delete=function(e){return Be(this,e).delete(e)},ke.prototype.get=function(e){return Be(this,e).get(e)},ke.prototype.has=function(e){return Be(this,e).has(e)},ke.prototype.set=function(e,t){return Be(this,e).set(e,t),this},je.prototype.add=je.prototype.push=function(e){return this.__data__.set(e,n),this},je.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new xe},_e.prototype.delete=function(e){return this.__data__.delete(e)},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!se||r.length<199)return r.push([e,t]),this;n=this.__data__=new ke(r)}return n.set(e,t),this};var Me,Ce=(Me=function(e,t){return e&&Te(e,t,it)},function(e,t){if(null==e)return e;if(!Ge(e))return Me(e,t);for(var n=e.length,r=-1,a=Object(e);++r<n&&!1!==t(a[r],r,a););return e}),Te=function(e,t,n){for(var r=-1,a=Object(e),o=n(e),i=o.length;i--;){var s=o[++r];if(!1===t(a[s],s,a))break}return e};function Re(e,t){for(var n=0,r=(t=He(t,e)?[t]:De(t)).length;null!=e&&n<r;)e=e[Qe(t[n++])];return n&&n==r?e:void 0}function Oe(e,t){return null!=e&&t in Object(e)}function Ee(e,t,n,r,i){return e===t||(null==e||null==t||!nt(e)&&!rt(t)?e!=e&&t!=t:function(e,t,n,r,i,u){var m=Ze(e),y=Ze(t),k=o,j=o;m||(k=(k=$e(e))==a?h:k),y||(j=(j=$e(t))==a?h:j);var _=k==h&&!z(e),N=j==h&&!z(t),S=k==j;if(S&&!_)return u||(u=new _e),m||ot(e)?Le(e,t,n,r,i,u):function(e,t,n,r,a,o,i){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!r(new ne(e),new ne(t)));case s:case l:case d:return Ye(+e,+t);case c:return e.name==t.name&&e.message==t.message;case p:case v:return e==t+"";case f:var u=$;case g:var h=2&o;if(u||(u=V),e.size!=t.size&&!h)return!1;var m=i.get(e);if(m)return m==t;o|=1,i.set(e,t);var y=Le(u(e),u(t),r,a,o,i);return i.delete(e),y;case b:if(be)return be.call(e)==be.call(t)}return!1}(e,t,k,n,r,i,u);if(!(2&i)){var M=_&&Z.call(e,"__wrapped__"),C=N&&Z.call(t,"__wrapped__");if(M||C){var T=M?e.value():e,R=C?t.value():t;return u||(u=new _e),n(T,R,r,i,u)}}return!!S&&(u||(u=new _e),function(e,t,n,r,a,o){var i=2&a,s=it(e),l=s.length,c=it(t),u=c.length;if(l!=u&&!i)return!1;for(var f=l;f--;){var d=s[f];if(!(i?d in t:Z.call(t,d)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);for(var p=i;++f<l;){var g=e[d=s[f]],v=t[d];if(r)var b=i?r(v,g,d,t,e,o):r(g,v,d,e,t,o);if(!(void 0===b?g===v||n(g,v,r,a,o):b)){m=!1;break}p||(p="constructor"==d)}if(m&&!p){var y=e.constructor,w=t.constructor;y==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof w&&w instanceof w||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,r,i,u))}(e,t,Ee,n,r,i))}function Pe(e){return!(!nt(e)||function(e){return!!Y&&Y in e}(e))&&(et(e)||z(e)?ee:M).test(qe(e))}function Fe(e){return"function"==typeof e?e:null==e?st:"object"==typeof e?Ze(e)?function(e,t){return He(e)&&We(t)?Ue(Qe(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Re(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){t=He(t,e)?[t]:De(t);for(var r,a=-1,o=t.length;++a<o;){var i=Qe(t[a]);if(!(r=null!=e&&n(e,i)))break;e=e[i]}return r||!!(o=e?e.length:0)&&tt(o)&&Ve(i,o)&&(Ze(e)||Ke(e))}(e,t,Oe)}(n,e):Ee(t,r,void 0,3)}}(e[0],e[1]):(n=function(e){for(var t=it(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,We(a)]}return t}(t=e),1==n.length&&n[0][2]?Ue(n[0][0],n[0][1]):function(e){return e===t||function(e,t,n,r){var a=n.length,o=a;if(null==e)return!o;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){var s=(i=n[a])[0],l=e[s],c=i[1];if(i[2]){if(void 0===l&&!(s in e))return!1}else if(!Ee(c,l,r,3,new _e))return!1}return!0}(e,0,n)}):He(r=e)?(a=Qe(r),function(e){return null==e?void 0:e[a]}):function(e){return function(t){return Re(t,e)}}(r);var t,n,r,a}function Ae(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||q,t!==r)return oe(e);var t,n,r,a=[];for(var o in Object(e))Z.call(e,o)&&"constructor"!=o&&a.push(o);return a}function Ie(e,t){var n=-1,r=Ge(e)?Array(e.length):[];return Ce(e,function(e,a,o){r[++n]=t(e,a,o)}),r}function De(e){return Ze(e)?e:Je(e)}function Le(e,t,n,r,a,o){var i=2&a,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,f=!0,d=1&a?new je:void 0;for(o.set(e,t),o.set(t,e);++u<s;){var h=e[u],m=t[u];if(r)var p=i?r(m,h,u,t,e,o):r(h,m,u,e,t,o);if(void 0!==p){if(p)continue;f=!1;break}if(d){if(!B(t,function(e,t){if(!d.has(t)&&(h===e||n(h,e,r,a,o)))return d.add(t)})){f=!1;break}}else if(h!==m&&!n(h,m,r,a,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Be(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function ze(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Pe(n)?n:void 0}var $e=function(e){return G.call(e)};function Ve(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||C.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t){if(Ze(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!at(e))||j.test(e)||!k.test(e)||null!=t&&e in Object(t)}function We(e){return e==e&&!nt(e)}function Ue(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}(ie&&$e(new ie(new ArrayBuffer(1)))!=x||se&&$e(new se)!=f||le&&$e(le.resolve())!=m||ce&&$e(new ce)!=g||ue&&$e(new ue)!=y)&&($e=function(e){var t=G.call(e),n=t==h?e.constructor:void 0,r=n?qe(n):void 0;if(r)switch(r){case de:return x;case he:return f;case me:return m;case pe:return g;case ge:return y}return t});var Je=Xe(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(at(e))return ye?ye.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return _.test(e)&&n.push(""),e.replace(N,function(e,t,r,a){n.push(r?a.replace(S,"$1"):t||e)}),n});function Qe(e){if("string"==typeof e||at(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function qe(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Xe(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new(Xe.Cache||ke),n}function Ye(e,t){return e===t||e!=e&&t!=t}function Ke(e){return function(e){return rt(e)&&Ge(e)}(e)&&Z.call(e,"callee")&&(!re.call(e,"callee")||G.call(e)==a)}Xe.Cache=ke;var Ze=Array.isArray;function Ge(e){return null!=e&&tt(e.length)&&!et(e)}function et(e){var t=nt(e)?G.call(e):"";return t==u||"[object GeneratorFunction]"==t}function tt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function nt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function rt(e){return!!e&&"object"==typeof e}function at(e){return"symbol"==typeof e||rt(e)&&G.call(e)==b}var ot=D?function(e){return function(t){return e(t)}}(D):function(e){return rt(e)&&tt(e.length)&&!!T[G.call(e)]};function it(e){return Ge(e)?Ne(e):Ae(e)}function st(e){return e}e.exports=function(e,t){return(Ze(e)?L:Ie)(e,Fe(t))}}(th,th.exports)),th.exports),rh=s(nh);exports.Box=function(t){const{children:n,noPadding:r,className:a="",theme:o="dark"}=t,i=r?"":Vr.padding;return e.jsx("div",{className:`${Vr.box} ${i} ${a}`,"data-theme":o,children:n})},exports.DefaultPalette=ql,exports.Flamegraph=cs,exports.FlamegraphI18nProvider=rc,exports.FlamegraphRenderer=n=>{const{i18n:r,locale:a,colorMode:o="light",sandwich:i=!0,...s}=n,l=t.useMemo(()=>Xd(a,r),[a,r]),c=t.useMemo(()=>(e=>{switch(e){case"dark":return"ps-theme-dark";case"kylin":return"ps-theme-kylin";default:return"ps-theme-light"}})(o),[o]);return e.jsx("pyro-flamegraph",{className:c,children:e.jsx(rc,{messages:l,children:e.jsx(Qd,{...qd,enableSandwichView:i,...s})})})},exports.convertJaegerTraceToProfile=function(e){const t={numTicks:0,maxSelf:0,names:[],levels:[]},n={},r={children:[]};return e.spans.forEach(e=>{e.children=[],n[e.spanID]=e}),e.spans.forEach(e=>{let t=r;e.references&&e.references.length>0&&(t=n[e.references[0].spanID]||r),t.children.push(e)}),function e(t,n){(t.children||[]).forEach(t=>e(t));let r=0;const a=eh(t.children||[],e=>e.operationName);t.children=rh(a,e=>{const t=e[0];for(let n=1;n<e.length;n+=1)t.duration+=e[n].duration;return r+=t.duration,t}),t.total=t.duration||r,t.self=Math.max(0,t.total-r)}(r),function n(r,a,o){var i;return t.numTicks||(t.numTicks=r.total),(i=t.levels)[a]||(i[a]=[]),t.levels[a].push(o),t.levels[a].push(r.total),t.levels[a].push(r.self),t.names.push((r.processID?`${e.processes[r.processID].serviceName}: `:"")+(r.operationName||"total")),t.levels[a].push(t.names.length-1),(r.children||[]).forEach(e=>{o+=n(e,a+1,o)}),r.total}(r,0,0),t.levels=Wd("single",t.levels),{version:1,flamebearer:t,metadata:{format:"single",units:"trace_samples",spyName:"tracing",sampleRate:1e6}}},exports.diffTwoProfiles=function(e,t){e.flamebearer.levels=Ud("single",e.flamebearer.levels),t.flamebearer.levels=Ud("single",t.flamebearer.levels);const n=function(e,t){const n={format:"double",numTicks:e.numTicks+t.numTicks,leftTicks:e.numTicks,rightTicks:t.numTicks,maxSelf:100,sampleRate:e.sampleRate,names:[],levels:[],units:e.units,spyName:e.spyName},r=Md(e,t),a=(e,t,r,o)=>{var i;const{name:s,children:l,self:c,total:u}=e;n.names.push(s),(i=n.levels)[t]||(i[t]=[]),n.maxSelf=Math.max(n.maxSelf,c[0]||0,c[1]||0),n.levels[t]=n.levels[t].concat([r,u[0]||0,c[0]||0,o,u[1]||0,c[1]||0,n.names.length-1]);for(let e=0;e<l.length;e+=1){const[n,i]=a(l[e],t+1,r,o);r+=n,o+=i}return[u[0]||0,u[1]||0]};return a(r,0,0,0),n}(e.flamebearer,t.flamebearer);n.levels=Wd("double",n.levels);const r={...e.metadata};return r.format="double",{version:1,flamebearer:n,metadata:r,leftTicks:e.flamebearer.numTicks,rightTicks:t.flamebearer.numTicks}},exports.flamegraphDefaultMessages=Gl,exports.flamegraphZhCNMessages=ec;
17
+ */var Jc,Qc=(Wc||(Wc=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=a(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return n.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var r="";for(var o in e)t.call(e,o)&&e[o]&&(r=a(r,o));return r}function a(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(Uc)),Uc.exports),qc=l(Qc),Xc={};function Yc(){return Jc||(Jc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="crosshairs",n=[],r="f05b",a="M288-16c17.7 0 32 14.3 32 32l0 18.3c98.1 14 175.7 91.6 189.7 189.7l18.3 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-18.3 0c-14 98.1-91.6 175.7-189.7 189.7l0 18.3c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-18.3C157.9 463.7 80.3 386.1 66.3 288L48 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l18.3 0C80.3 125.9 157.9 48.3 256 34.3L256 16c0-17.7 14.3-32 32-32zM131.2 288c12.7 62.7 62.1 112.1 124.8 124.8l0-12.8c0-17.7 14.3-32 32-32s32 14.3 32 32l0 12.8c62.7-12.7 112.1-62.1 124.8-124.8L432 288c-17.7 0-32-14.3-32-32s14.3-32 32-32l12.8 0C432.1 161.3 382.7 111.9 320 99.2l0 12.8c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-12.8C193.3 111.9 143.9 161.3 131.2 224l12.8 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-12.8 0zM288 208a48 48 0 1 1 0 96 48 48 0 1 1 0-96z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,r,a]},e.faCrosshairs=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Xc)),Xc}var Kc,Zc=Yc(),Gc={};function eu(){return Kc||(Kc=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-left",n=[9001],r="f053",a="M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z";e.definition={prefix:"fas",iconName:t,icon:[320,512,n,r,a]},e.faChevronLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Gc)),Gc}var tu,nu=eu(),ru={};function au(){return tu||(tu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-right",n=[9002],r="f054",a="M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z";e.definition={prefix:"fas",iconName:t,icon:[320,512,n,r,a]},e.faChevronRight=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(ru)),ru}var ou=au(),iu="Table-module_table__6A8SM",su="Table-module_sortable__J6kyp",lu="Table-module_sortArrow__Nrncn",cu="Table-module_sortArrowUp__WmbEG",uu="Table-module_sortArrowDown__Gyue1",fu="Table-module_asc__tJDI9",du="Table-module_desc__fjVRY",hu="Table-module_isRowSelected__UhIAJ",mu="Table-module_isRowDisabled__sz3NJ",pu="Table-module_virtualSpacer__C1hxH",gu="Table-module_active__EShS8",vu="Table-module_loadingSpinner__SSjMK",bu="Table-module_pagination__VXgcO",yu="Button-module_button__Ed1ge",wu="Button-module_noIcon__Uzjvv",xu="Button-module_noBox__mLreC",ku="Button-module_customIcon__-slpC",ju="Button-module_iconWithText__DQRkr",_u="Button-module_default__HhXlQ",Nu="Button-module_outline__Flf4r",Su="Button-module_float__4marx",Mu="Button-module_primary__xByv0",Cu="Button-module_secondary__D0K-F",Tu="Button-module_danger__5-vIq",Ru="Button-module_grouped__j8KwB";const Ou=t.forwardRef(function({disabled:t=!1,kind:n="default",type:r="button",icon:a,iconNode:o,children:i,grouped:s,onClick:l,id:c,className:u,form:f,noBox:d,autoFocus:h,...m},p){return e.jsxs("button",{...m,id:c,ref:p,type:r,"data-testid":m["data-testid"],disabled:t,onClick:l,form:f,autoFocus:h,"aria-label":m["aria-label"],className:qc(yu,s?Ru:"",Eu(n),u,d&&xu,o&&ku,!a&&!o&&wu),children:[a?e.jsx(Vr,{icon:a,className:i?ju:""}):null,o,i]})});function Eu(e){switch(e){case"default":return _u;case"primary":return Mu;case"secondary":return Cu;case"danger":return Tu;case"outline":return Nu;case"float":return Su;default:throw Error(`Unsupported kind ${e}`)}}function Pu({row:n}){const{cells:r,isRowSelected:a,isRowDisabled:o,className:i,onClick:s,onDoubleClick:l,onContextMenu:c,...u}=n,f=t.useRef(Math.random()).current;return e.jsx("tr",{...u,onClick:s,onDoubleClick:l,onContextMenu:c,className:ds(i,{[hu]:a,[mu]:o}),children:r&&r.map(({style:t,value:n,...r},a)=>e.jsx("td",{style:t,...r,children:n},f+a))})}function Fu({sortByDirection:n,sortBy:r,updateSortParams:a,table:o,tableBodyRef:i,className:s,isLoading:l,itemsPerPage:c,virtualize:u,virtualizeRowHeight:f,virtualizeOverscan:d=6,scrollRef:h,disableSort:m}){const p=!m&&n&&r&&a,[g,v]=t.useState(0),[b,y]=t.useState(0),[w,x]=t.useState(null),[k,j]=t.useState(null),_=t.useRef(null),N=t.useRef(null);t.useLayoutEffect(()=>{(null==h?void 0:h.current)&&h.current!==k&&j(h.current)},[null==h?void 0:h.current,k]),t.useEffect(()=>{if(!k||!u)return()=>{};const e=()=>{_.current&&cancelAnimationFrame(_.current),_.current=requestAnimationFrame(()=>{y(k.scrollTop||0)})};return k.addEventListener("scroll",e,{passive:!0}),()=>{k.removeEventListener("scroll",e),_.current&&cancelAnimationFrame(_.current)}},[k,u]),t.useEffect(()=>{if(!u||w||!(null==i?void 0:i.current))return;const e=i.current.querySelectorAll("tr[data-row]");if(!e.length)return;const t=e[0].getBoundingClientRect();t.height&&x(t.height)},[u,w,null==i?void 0:i.current,o]);const S="filled"===o.type?Au(o.bodyRows,g,c):null,M="virtual"===o.type?o.rowCount:S?S.length:0,C=f||w||26,T=!!u&&!!k&&("filled"===o.type||"virtual"===o.type)&&C>0,R=T?(()=>{const e=k.clientHeight||0,t=Math.max(0,Math.floor(b/C)-d),n=Math.min(M,Math.ceil((b+e)/C)+d),r=t*C,a=Math.max(0,(M-n)*C),i="filled"===o.type&&S?S.slice(t,n):[];return{viewportHeight:e,totalRows:M,startIndex:t,endIndex:n,topSpacer:r,bottomSpacer:a,visibleRows:i}})():null,O=!!u&&!T&&"filled"===o.type,E=O?(S||[]).slice(0,Math.max(24,4*d)):null;t.useEffect(()=>{var e;"virtual"===o.type&&R&&(null===(e=o.onRangeChange)||void 0===e||e.call(o,R.startIndex,R.endIndex))},[o,null==R?void 0:R.startIndex,null==R?void 0:R.endIndex]);const P="virtual"===o.type&&R?Math.max(0,R.endIndex-R.startIndex):0,F="virtual"===o.type&&P>0?Array.from({length:P},()=>({cells:Array.from({length:o.headRow.length},()=>({value:" "}))})):[],A="virtual"===o.type&&R&&o.range&&o.range.start===R.startIndex&&o.range.end===R.endIndex;"virtual"===o.type&&A&&(N.current=o.rows);const I="virtual"===o.type?A?o.rows:N.current||F:F;return l?e.jsx("div",{className:vu}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:ds(iu,{[s||""]:s}),"data-testid":"table-ui",children:[e.jsx("thead",{children:e.jsx("tr",{children:o.headRow.map(({sortable:i,label:s,name:l,...c},u)=>i&&"not-filled"!==o.type&&p?t.createElement("th",{...c,key:u,className:su,onClick:()=>a(l)},s,e.jsxs("span",{className:ds(lu,{[gu]:r===l,[fu]:r===l&&"asc"===n,[du]:r===l&&"desc"===n}),children:[e.jsx("span",{className:cu}),e.jsx("span",{className:uu})]})):e.jsx("th",{...c,children:s},u))})}),e.jsx("tbody",{ref:i,children:"not-filled"===o.type?e.jsx("tr",{className:null==o?void 0:o.bodyClassName,children:e.jsx("td",{colSpan:o.headRow.length,children:o.value})}):R?e.jsxs(e.Fragment,{children:[R.topSpacer>0&&e.jsx("tr",{"aria-hidden":"true",className:pu,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:R.topSpacer,padding:0,border:0}})}),("virtual"===o.type?I:R.visibleRows).map((t,n)=>{var r;return e.jsx(Pu,{row:t},null!==(r=t["data-row"])&&void 0!==r?r:`row-${R.startIndex+n}`)}),R.bottomSpacer>0&&e.jsx("tr",{"aria-hidden":"true",className:pu,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:R.bottomSpacer,padding:0,border:0}})})]}):O?(E||[]).map((t,n)=>{var r;return e.jsx(Pu,{row:t},null!==(r=t["data-row"])&&void 0!==r?r:`row-${n}`)}):(S||[]).map((t,n)=>{var r;return e.jsx(Pu,{row:t},null!==(r=t["data-row"])&&void 0!==r?r:`row-${n}`)})})]}),e.jsx(Iu,{bodyRows:"filled"===o.type?o.bodyRows:void 0,itemsPerPage:c,currPage:g,setCurrPage:v})]})}function Au(e,t,n){return n?e.slice(t*n,n*(t+1)):e}function Iu({itemsPerPage:t,currPage:n,setCurrPage:r,bodyRows:a}){if(!t)return null;const o=!!a&&Au(a,n+1,t).length>0,i=!!a&&Au(a,n-1,t).length>0;return e.jsxs("nav",{className:bu,children:[e.jsx(Ou,{"aria-label":"Previous Page",disabled:!i,kind:"float",icon:nu.faChevronLeft,onClick:()=>r(n-1)}),e.jsx(Ou,{disabled:!o,"aria-label":"Next Page",kind:"float",icon:ou.faChevronRight,onClick:()=>r(n+1)})]})}function Du({numTicks:n,sampleRate:r,units:a,tableBodyRef:o,palette:i}){const s=Ia(n,r,a),l=s.format(n,r),c=oc(),u=t.useCallback((e,t,n)=>{var o;const u=null===(o=n.target.closest("tr"))||void 0===o?void 0:o.dataset.row;if(!u)return void t();const[f,d,...h]=u.split(";");switch(f){case"single":{const[t,n]=h,o=s.format(parseInt(t,10),r),i=s.format(parseInt(n,10),r),c=l.split(" "),u="<"===c[0]?c[1]:c[0],f=o.split(" "),m="<"===f[0]?f[1]:f[0],p=i.split(" "),g="<"===p[0]?p[1]:p[0];e({title:{text:d,diff:{text:"",color:""}},tooltipData:[{units:a,self:`${o}(${(parseFloat(m)/parseFloat(u)*100).toFixed(2)}%)`,total:`${i}(${(parseFloat(g)/parseFloat(u)*100).toFixed(2)}%)`,tooltipType:"table"}]});break}case"double":{const[t,n,o,l]=h,u=mc({formatter:s,sampleRate:r,totalLeft:parseInt(t,10),leftTicks:parseInt(n,10),totalRight:parseInt(o,10),rightTicks:parseInt(l,10),title:d,units:a},i,c);e({title:u.title,tooltipData:u.tooltipData});break}}},[s,r,a,l,i,c]);return e.jsx(uc,{dataSourceRef:o,shouldShowTitle:!1,clickInfoSide:"left",setTooltipContent:u,palette:i})}function Lu(){const e=new Blob([`(${(()=>{const e=e=>e||0,t={format:"single",jStep:4,jName:3,getBarTotal:(e,t)=>e[t+1],getBarSelf:(e,t)=>e[t+2],getBarName:(e,t)=>e[t+3]},n={format:"double",jStep:7,jName:6,getBarTotal:(e,t)=>e[t+4]+e[t+1],getBarTotalLeft:(e,t)=>e[t+1],getBarTotalRght:(e,t)=>e[t+4],getBarSelf:(e,t)=>e[t+5]+e[t+2],getBarSelfLeft:(e,t)=>e[t+2],getBarSelfRght:(e,t)=>e[t+5],getBarName:(e,t)=>e[t+6]},r=e=>Math.round(1e4*e)/100,a=(e,t)=>(t-e)/e*100,o={baseRows:[],rows:[],bestNodeByName:new Map,sortBy:"total",sortByDirection:"desc",highlightQuery:"",format:"single",leftTicks:0,rightTicks:0},i=()=>{const e=o.highlightQuery.trim().toLowerCase(),t=e?o.baseRows.filter(t=>t.name.toLowerCase().includes(e)):o.baseRows.slice(),n="asc"===o.sortByDirection?1:-1;t.sort((e,t)=>{if("name"===o.sortBy)return n*e.name.localeCompare(t.name);switch(o.sortBy){case"total":case"self":{const r=e[o.sortBy]||0,a=t[o.sortBy]||0;return n*(r-a)}case"baseline":{const r=e.leftTicks>0?e.totalLeft/e.leftTicks:0,a=t.leftTicks>0?t.totalLeft/t.leftTicks:0;return n*(r-a)}case"comparison":{const r=e.rightTicks>0?e.totalRght/e.rightTicks:0,a=t.rightTicks>0?t.totalRght/t.rightTicks:0;return n*(r-a)}case"diff":{const o=e.leftTicks>0?e.totalLeft/e.leftTicks:0,i=e.rightTicks>0?e.totalRght/e.rightTicks:0,s=t.leftTicks>0?t.totalLeft/t.leftTicks:0,l=t.rightTicks>0?t.totalRght/t.rightTicks:0,c=a(r(o),r(i)),u=a(r(s),r(l));return n*(c-u)}default:return 0}}),o.rows=t},s=r=>{const{rows:a,bestNodeByName:s,format:l,leftTicks:c,rightTicks:u}=(r=>{const{names:a,levels:o,format:i}=r,s=new Map,l=new Map,c=r.leftTicks||0,u=r.rightTicks||0;if("double"===i){const t=n;for(let n=0;n<o.length;n+=1){const r=o[n];for(let o=0;o<r.length;o+=t.jStep){const i=a[t.getBarName(r,o)]||"<empty>";s.has(i)||s.set(i,{type:"double",name:i,totalLeft:0,totalRght:0,leftTicks:c,rightTicks:u});const f=s.get(i);if(!f)continue;f.totalLeft=e(f.totalLeft)+t.getBarTotalLeft(r,o),f.totalRght=e(f.totalRght)+t.getBarTotalRght(r,o);const d=t.getBarTotal(r,o),h=l.get(i);(!h||d>h.total)&&l.set(i,{i:n,j:o,total:d})}}}else{const n=t;for(let t=0;t<o.length;t+=1){const r=o[t];for(let o=0;o<r.length;o+=n.jStep){const i=a[n.getBarName(r,o)]||"<empty>";s.has(i)||s.set(i,{type:"single",name:i,self:0,total:0});const c=s.get(i);if(!c)continue;c.self=e(c.self)+n.getBarSelf(r,o),c.total=e(c.total)+n.getBarTotal(r,o);const u=n.getBarTotal(r,o),f=l.get(i);(!f||u>f.total)&&l.set(i,{i:t,j:o,total:u})}}}return{rows:Array.from(s.values()),bestNodeByName:l,format:i,leftTicks:c,rightTicks:u}})(r.flamebearer);o.baseRows=a,o.bestNodeByName=s,o.format=l,o.leftTicks=c,o.rightTicks=u,o.sortBy=r.sortBy,o.sortByDirection=r.sortByDirection,o.highlightQuery=r.highlightQuery||"",i(),self.postMessage({type:"ready",payload:{rowCount:o.rows.length}})};self.onmessage=e=>{const t=e.data;var n;if(t&&t.type)switch(t.type){case"init":s(t.payload);break;case"update":n=t.payload,o.sortBy=n.sortBy,o.sortByDirection=n.sortByDirection,o.highlightQuery=n.highlightQuery||"",i(),self.postMessage({type:"ready",payload:{rowCount:o.rows.length}});break;case"range":(e=>{const{start:t,end:n,requestId:r}=e,a=Math.max(0,t),i=Math.min(o.rows.length,n),s=o.rows.slice(a,i);self.postMessage({type:"range",payload:{rows:s,start:a,end:i,requestId:r}})})(t.payload);break;case"findNode":(e=>{const{name:t,requestId:n}=e,r=o.bestNodeByName.get(t);self.postMessage({type:"findNode",payload:{node:r?{i:r.i,j:r.j}:null,requestId:n}})})(t.payload)}}}).toString()})()`],{type:"text/javascript"});return new Worker(URL.createObjectURL(e))}var Bu="ProfilerTable-module_tableContextMenu__7Svm8",zu="ProfilerTable-module_sandwichItem__b9Ipy";const $u=e=>e||0,Vu="undefined"!=typeof Worker&&"undefined"!=typeof Blob&&"undefined"!=typeof URL;function Hu(e,t,n,r){const a=t;return a.type="single",a.self=$u(a.self)+e.getBarSelf(n,r),a.total=$u(a.total)+e.getBarTotal(n,r),a}function Wu(e,t,n,r,a,o){const i=t;return i.type="double",i.self=$u(i.self)+e.getBarSelf(n,r),i.total=$u(i.total)+e.getBarTotal(n,r),i.selfLeft=$u(i.selfLeft)+e.getBarSelfLeft(n,r),i.selfRght=$u(i.selfRght)+e.getBarSelfRght(n,r),i.selfDiff=$u(i.selfDiff)+e.getBarSelfDiff(n,r),i.totalLeft=$u(i.totalLeft)+e.getBarTotalLeft(n,r),i.totalRght=$u(i.totalRght)+e.getBarTotalRght(n,r),i.totalDiff=$u(i.totalDiff)+e.getBarTotalDiff(n,r),i.leftTicks=a,i.rightTicks=o,i}const Uu=new WeakMap;function Ju(e){const t=Uu.get(e);if(t)return t;const n=function(e){if(!e)return[];const{names:t,levels:n,format:r}=e,a="double"!==r?wa:xa,o=new Map;for(let i=0;i<n.length;i++){const s=n[i];for(let n=0;n<s.length;n+=a.jStep){const i=t[a.getBarName(s,n)];o.has(i)||o.set(i,{name:i||"<empty>",self:0,total:0});const l=o.get(i);if(!l)break;"single"===r?Hu(wa,l,s,n):Wu(xa,l,s,n,e.leftTicks,e.rightTicks)}}return Array.from(o.values())}(e);return Uu.set(e,n),n}function Qu(e,t,n){const r=148-e/t*148,a=n.alpha(1);return{backgroundImage:`linear-gradient(${a}, ${a})`,backgroundPosition:`-${r}px 0px`,backgroundRepeat:"no-repeat"}}const qu=({flamebearer:t,sortBy:n,sortByDirection:r,fitMode:a,handleTableItemClick:o,highlightQuery:i,palette:s,selectedItem:l,messages:c,onRowContextMenu:u,onRowDoubleClick:f})=>{const{numTicks:d,maxSelf:h,sampleRate:m,spyName:p,units:g}=t,v=[...Ju(t)].sort((e,t)=>t.total-e.total),b="asc"===r?1:-1;let y;if("name"===n)y=v.sort((e,t)=>b*e[n].localeCompare(t[n]));else switch(n){case"total":case"self":y=v.sort((e,t)=>b*(e[n]-t[n]));break;case"baseline":y=v.sort((e,t)=>b*(e.totalLeft/e.leftTicks-t.totalLeft/t.leftTicks));break;case"comparison":y=v.sort((e,t)=>b*(e.totalRght/e.rightTicks-t.totalRght/t.rightTicks));break;case"diff":y=v.sort((e,t)=>{const n=Aa(Fa(e.totalLeft/e.leftTicks),Fa(e.totalRght/e.rightTicks)),r=Aa(Fa(t.totalLeft/t.leftTicks),Fa(t.totalRght/t.rightTicks));return b*(n-r)});break;default:y=v}const w=Ia(d,m,g),x=e=>!!l.isJust&&e===l.value,k=t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:Wa(a),children:e.jsx("bdi",{dir:"ltr",children:t.name})})}),j=y.filter(e=>{return!i||(t=i,e.name.toLowerCase().includes(t.toLowerCase()));var t}).map(e=>{if("double"===e.type)return(e=>{const t=Fa(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=Fa(e.rightTicks>0?e.totalRght/e.rightTicks:0);let r=Aa(t,n);Number.isFinite(r)||(r=0);let a="";r>0?a=s.badColor.rgb().string():r<0&&(a=s.goodColor.rgb().string());let i="";return 0===e.totalLeft&&e.totalRght>0?i=c.diffNew:0===e.totalRght&&e.totalLeft>0?i=c.diffRemoved:0===r?i="0%":r>0?i=`+${r.toFixed(2)}%`:r<0&&(i=`${r.toFixed(2)}%`),{"data-row":`${e.type};${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:x(e.name),onClick:()=>o(e),onContextMenu:t=>u(t,e.name),onDoubleClick:()=>f(e.name),cells:[{value:k(e)},{value:`${t} %`},{value:`${n} %`},{value:i,style:{color:a}}]}})(e);const t=Zi(p,e.name);return((e,t)=>({"data-row":`${e.type};${e.name};${e.self};${e.total}`,isRowSelected:x(e.name),onClick:()=>o(e),onContextMenu:t=>u(t,e.name),onDoubleClick:()=>f(e.name),cells:[{value:k(e)},{value:w.format(e.self,m),style:Qu(e.self,h,t)},{value:w.format(e.total,m),style:Qu(e.total,d,t)}]}))(e,Gi(s,t))});return j.length>0?{bodyRows:j,type:"filled"}:{value:e.jsx("div",{className:"unsupported-format",children:c.noItemsFound}),type:"not-filled"}};function Xu({tableBodyRef:n,flamebearer:r,isDoubles:a,fitMode:o,handleTableItemClick:i,highlightQuery:s,selectedItem:l,palette:c,onFocusOnNode:u,updateView:f,enableSandwichView:d=!0,virtualize:h,virtualizeRowHeight:m,virtualizeOverscan:p,scrollRef:g,menuPortalTarget:v}){const b=oc(),[y,w]=Sl({transition:!0}),[x,k]=t.useState({x:0,y:0}),[j,_]=t.useState(null),N=Vu,S=t.useRef(null),M=t.useRef(null),C=t.useRef(0),T=t.useRef(0),R=t.useRef(new Map),[O,E]=t.useState(!1),[P,F]=t.useState(0),[A,I]=t.useState([]),[D,L]=t.useState({start:0,end:0}),[B,z]=t.useState(null),[$,V]=t.useState(0),[H,W]=t.useState(0);t.useEffect(()=>{if(!N)return()=>{};const e=Lu();S.current=e,W(e=>e+1);const t=e=>{const t=e.data;if(t&&t.type)switch(t.type){case"ready":F(t.payload.rowCount),E(!0),V(e=>e+1);break;case"range":if(t.payload.requestId!==C.current)return;I(t.payload.rows),L({start:t.payload.start,end:t.payload.end});break;case"findNode":{const e=R.current.get(t.payload.requestId);e&&(R.current.delete(t.payload.requestId),e(t.payload.node));break}}};return e.addEventListener("message",t),()=>{e.removeEventListener("message",t),e.terminate(),S.current=null,R.current.clear()}},[N]);const U=t.useCallback(e=>{if(!N||!S.current)return Promise.resolve(function(e,t){if(!e||!e.levels)return null;const{names:n,levels:r,format:a}=e,o=ka(a);let i=null;for(let e=0;e<r.length;e++){const a=r[e];for(let r=0;r<a.length;r+=o.jStep)if(n[o.getBarName(a,r)]===t){const t=o.getBarTotal(a,r);(!i||t>i.total)&&(i={i:e,j:r,total:t})}}return i?{i:i.i,j:i.j}:null}(r,e));const t=++T.current;return new Promise(n=>{var r;R.current.set(t,n),null===(r=S.current)||void 0===r||r.postMessage({type:"findNode",payload:{name:e,requestId:t}})})},[r,N]),J=t.useCallback(e=>{u&&U(e).then(e=>{e&&u(e.i,e.j)})},[u,U]),Q=t.useCallback(e=>{l.isJust&&l.value===e||i({name:e}),J(e)},[J,l,i]),q=t.useCallback((e,t)=>{e.preventDefault(),k({x:e.clientX,y:e.clientY}),_(t),w(!0)},[w]),X=t.useCallback(()=>{w(!1),_(null)},[w]),Y=t.useCallback(()=>{j&&(J(j),X())},[j,J,X]),K=t.useCallback(()=>{j&&navigator.clipboard&&(navigator.clipboard.writeText(j),X())},[j,X]),Z=t.useCallback(()=>{j&&(i({name:j}),X())},[j,i,X]),G=t.useCallback(()=>{j&&f&&(f("sandwich"),i({name:j}),X())},[j,f,i,X]),ee=t.useMemo(()=>a?[{sortable:1,name:"name",label:b.location},{sortable:1,name:"baseline",label:b.baseline,default:!0},{sortable:1,name:"comparison",label:b.comparison},{sortable:1,name:"diff",label:b.diff}]:[{sortable:1,name:"name",label:b.location},{sortable:1,name:"self",label:b.self,default:!0},{sortable:1,name:"total",label:b.total}],[b,a]),te=(e=>{const n=e.filter(e=>null==e?void 0:e.default)[0]||e[0],[r,a]=t.useState(n.name),[o,i]=t.useState("desc");return{sortBy:r,sortByDirection:o,updateSortParams:e=>{let t=o;t=r===e?"asc"===t?"desc":"asc":"desc",a(e),i(t)}}})(ee);t.useEffect(()=>{if(!N||!S.current)return;const e=S.current,t={sortBy:te.sortBy,sortByDirection:te.sortByDirection,highlightQuery:s};M.current!==r?(M.current=r,E(!1),F(0),I([]),e.postMessage({type:"init",payload:{flamebearer:r,...t}})):e.postMessage({type:"update",payload:t})},[r,s,te.sortBy,te.sortByDirection,N,H]);const ne=t.useCallback((e,t)=>{z(n=>n&&n.start===e&&n.end===t?n:{start:e,end:t})},[]);t.useEffect(()=>{if(!N||!S.current||!B)return;const e=++C.current;S.current.postMessage({type:"range",payload:{start:B.start,end:B.end,requestId:e}})},[B,$,N]);const{numTicks:re,maxSelf:ae,sampleRate:oe,spyName:ie,units:se}=r,le=t.useMemo(()=>Ia(re,oe,se),[re,oe,se]),ce=t.useMemo(()=>Wa(o),[o]),ue=t.useCallback(e=>l.isJust&&l.value===e,[l]),fe=t.useCallback(t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:ce,children:e.jsx("bdi",{dir:"ltr",children:t})})}),[ce]),de=t.useCallback(e=>{const t=Zi(ie,e.name),n=Gi(c,t);return{"data-row":`single;${e.name};${e.self};${e.total}`,isRowSelected:ue(e.name),onClick:()=>{i({name:e.name})},onContextMenu:t=>q(t,e.name),onDoubleClick:()=>Q(e.name),cells:[{value:fe(e.name)},{value:le.format(e.self,oe),style:Qu(e.self,ae,n)},{value:le.format(e.total,oe),style:Qu(e.total,re,n)}]}},[le,q,Q,i,ue,ae,fe,re,c,oe,ie]),he=t.useCallback(e=>{const t=Fa(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=Fa(e.rightTicks>0?e.totalRght/e.rightTicks:0);let r=Aa(t,n);Number.isFinite(r)||(r=0);let a="";r>0?a=c.badColor.rgb().string():r<0&&(a=c.goodColor.rgb().string());let o="";return 0===e.totalLeft&&e.totalRght>0?o=b.diffNew:0===e.totalRght&&e.totalLeft>0?o=b.diffRemoved:0===r?o="0%":r>0?o=`+${r.toFixed(2)}%`:r<0&&(o=`${r.toFixed(2)}%`),{"data-row":`double;${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:ue(e.name),onClick:()=>{i({name:e.name})},onContextMenu:t=>q(t,e.name),onDoubleClick:()=>Q(e.name),cells:[{value:fe(e.name)},{value:`${t} %`},{value:`${n} %`},{value:o,style:{color:a}}]}},[q,Q,i,b,ue,fe,c]),me=t.useMemo(()=>N?A.map(e=>"double"===e.type?he(e):de(e)):[],[he,de,N,A]),pe=t.useMemo(()=>N?O&&0===P?{headRow:ee,type:"not-filled",value:e.jsx("div",{className:"unsupported-format",children:b.noItemsFound})}:{headRow:ee,type:"virtual",rowCount:P,rows:me,range:D,onRangeChange:ne}:{headRow:ee,...qu({flamebearer:r,sortBy:te.sortBy,sortByDirection:te.sortByDirection,fitMode:o,handleTableItemClick:i,highlightQuery:s,palette:c,selectedItem:l,messages:b,onRowContextMenu:q,onRowDoubleClick:Q})},[he,de,d,o,r,q,Q,ne,i,s,b,u,c,P,l,ee,te.sortBy,te.sortByDirection,f,N,me,D,O]),ge=l.isJust&&l.value===j;return e.jsxs(e.Fragment,{children:[e.jsx(Fu,{...te,tableBodyRef:n,table:pe,isLoading:N&&!O,className:qc("flamegraph-table",{"flamegraph-table-doubles":a}),virtualize:h,virtualizeRowHeight:m,virtualizeOverscan:p,scrollRef:g}),e.jsxs(wl,{...y,anchorPoint:x,onClose:X,className:Bu,portal:!v||{target:v},children:[u&&e.jsxs(Ol,{onClick:Y,children:[e.jsx(Vr,{icon:Zc.faCrosshairs}),b.focusOnThisFunction]}),e.jsxs(Ol,{onClick:K,children:[e.jsx(Vr,{icon:Ss.faCopy}),b.copyFunctionName]}),e.jsxs(Ol,{onClick:Z,children:[e.jsx(Vr,{icon:Os.faHighlighter}),ge?b.clearHighlight:b.highlightSimilarNodes]}),f&&d&&e.jsxs(Ol,{onClick:G,className:zu,children:[e.jsx(kc,{fill:"currentColor"}),b.openInSandwichView]})]})]})}const Yu=t.memo(function({flamebearer:n,fitMode:r,handleTableItemClick:a,highlightQuery:o,palette:i,selectedItem:s,onFocusOnNode:l,updateView:c,enableSandwichView:u}){const f=t.useRef(null),d=t.useRef(null),h=t.useRef(null),[m,p]=t.useState(0),[g,v]=t.useState(null),b="double"===n.format;return t.useEffect(()=>{const e=f.current;if(!e)return;const t=e.offsetWidth-e.clientWidth;Number.isFinite(t)&&t!==m&&p(t)},[f.current,b,m]),t.useEffect(()=>{const e=d.current;if(!e||"undefined"==typeof document)return;const t=e.closest("[data-theme], [data-flamegraph-color-mode]")||e,n=document.createElement("div");return n.className="flamegraph-menu-portal",t.appendChild(n),v(n),()=>{n.parentElement&&n.parentElement.removeChild(n)}},[]),e.jsxs("div",{"data-testid":"table-view",ref:d,style:{"--kylin-flamegraph-scrollbar-size":`${m}px`},className:b?"flamegraph-table-wrapper flamegraph-table-wrapper--double":"flamegraph-table-wrapper",children:[e.jsx("div",{className:"flamegraph-table-scroll",ref:h,children:e.jsx(Xu,{tableBodyRef:f,flamebearer:n,isDoubles:b,fitMode:r,highlightQuery:o,handleTableItemClick:a,palette:i,selectedItem:s,onFocusOnNode:l,updateView:c,enableSandwichView:u,virtualize:!0,virtualizeOverscan:8,scrollRef:h,menuPortalTarget:g})}),e.jsx(Du,{tableBodyRef:f,numTicks:n.numTicks,sampleRate:n.sampleRate,units:n.units,palette:i})]})});var Ku,Zu,Gu={},ef={};function tf(){return Ku||(Ku=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="arrow-rotate-left",n=[8634,"arrow-left-rotate","arrow-rotate-back","arrow-rotate-backward","undo"],r="f0e2",a="M256 64c-56.8 0-107.9 24.7-143.1 64l47.1 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 192c-17.7 0-32-14.3-32-32L0 32C0 14.3 14.3 0 32 0S64 14.3 64 32l0 54.7C110.9 33.6 179.5 0 256 0 397.4 0 512 114.6 512 256S397.4 512 256 512c-87 0-163.9-43.4-210.1-109.7-10.1-14.5-6.6-34.4 7.9-44.6s34.4-6.6 44.6 7.9c34.8 49.8 92.4 82.3 157.6 82.3 106 0 192-86 192-192S362 64 256 64z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faArrowRotateLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(ef)),ef}function nf(){return Zu||(Zu=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=tf();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faUndo=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Gu)),Gu}var rf,af,of=nf(),sf={},lf={};function cf(){return rf||(rf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="diagram-project",n=["project-diagram"],r="f542",a="M0 80C0 53.5 21.5 32 48 32l96 0c26.5 0 48 21.5 48 48l0 16 128 0 0-16c0-26.5 21.5-48 48-48l96 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-16-128 0 0 16c0 7.3-1.7 14.3-4.6 20.5l68.6 91.5 80 0c26.5 0 48 21.5 48 48l0 96c0 26.5-21.5 48-48 48l-96 0c-26.5 0-48-21.5-48-48l0-96c0-7.3 1.7-14.3 4.6-20.5L128 224 48 224c-26.5 0-48-21.5-48-48L0 80z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faDiagramProject=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(lf)),lf}function uf(){return af||(af=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=cf();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faProjectDiagram=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(sf)),sf}var ff,df,hf=uf(),mf={},pf={};function gf(){return ff||(ff=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="ellipsis-vertical",n=["ellipsis-v"],r="f142",a="M64 144a56 56 0 1 1 0-112 56 56 0 1 1 0 112zm0 224c30.9 0 56 25.1 56 56s-25.1 56-56 56-56-25.1-56-56 25.1-56 56-56zm56-112c0 30.9-25.1 56-56 56s-56-25.1-56-56 25.1-56 56-56 56 25.1 56 56z";e.definition={prefix:"fas",iconName:t,icon:[128,512,n,r,a]},e.faEllipsisVertical=e.definition,e.prefix="fas",e.iconName=t,e.width=128,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(pf)),pf}function vf(){return df||(df=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=gf();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faEllipsisV=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(mf)),mf}var bf=vf(),yf="Tooltip-module_tooltipWrapper__leDK-",wf="Tooltip-module_tooltipBubble__8vweF",xf="Tooltip-module_tooltipArrow__7wGyN";function kf(e){if(null!=e&&!1!==e){if("string"==typeof e||"number"==typeof e)return String(e);if(Array.isArray(e)){const t=e.map(e=>kf(e)).filter(e=>!!e);return t.length?t.join(" "):void 0}return t.isValidElement(e)?kf(e.props.children):void 0}}const jf=({placement:n,title:r,content:a,children:o})=>{const i=kf(null!=r?r:a),s=t.useRef(null),[l,c]=t.useState(!1);return t.useEffect(()=>{const e=s.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");c(!!t)},[]),i?e.jsxs("span",{ref:s,className:yf,"data-placement":n||"top","data-tooltip":l?i:void 0,title:l?void 0:i,children:[o,l?e.jsxs("span",{className:wf,role:"tooltip",children:[i,e.jsx("span",{className:xf})]}):null]}):e.jsx(e.Fragment,{children:o})};var _f,Nf={};function Sf(){return _f||(_f=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="link",n=[128279,"chain"],r="f0c1",a="M419.5 96c-16.6 0-32.7 4.5-46.8 12.7-15.8-16-34.2-29.4-54.5-39.5 28.2-24 64.1-37.2 101.3-37.2 86.4 0 156.5 70 156.5 156.5 0 41.5-16.5 81.3-45.8 110.6l-71.1 71.1c-29.3 29.3-69.1 45.8-110.6 45.8-86.4 0-156.5-70-156.5-156.5 0-1.5 0-3 .1-4.5 .5-17.7 15.2-31.6 32.9-31.1s31.6 15.2 31.1 32.9c0 .9 0 1.8 0 2.6 0 51.1 41.4 92.5 92.5 92.5 24.5 0 48-9.7 65.4-27.1l71.1-71.1c17.3-17.3 27.1-40.9 27.1-65.4 0-51.1-41.4-92.5-92.5-92.5zM275.2 173.3c-1.9-.8-3.8-1.9-5.5-3.1-12.6-6.5-27-10.2-42.1-10.2-24.5 0-48 9.7-65.4 27.1L91.1 258.2c-17.3 17.3-27.1 40.9-27.1 65.4 0 51.1 41.4 92.5 92.5 92.5 16.5 0 32.6-4.4 46.7-12.6 15.8 16 34.2 29.4 54.6 39.5-28.2 23.9-64 37.2-101.3 37.2-86.4 0-156.5-70-156.5-156.5 0-41.5 16.5-81.3 45.8-110.6l71.1-71.1c29.3-29.3 69.1-45.8 110.6-45.8 86.6 0 156.5 70.6 156.5 156.9 0 1.3 0 2.6 0 3.9-.4 17.7-15.1 31.6-32.8 31.2s-31.6-15.1-31.2-32.8c0-.8 0-1.5 0-2.3 0-33.7-18-63.3-44.8-79.6z";e.definition={prefix:"fas",iconName:t,icon:[576,512,n,r,a]},e.faLink=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Nf)),Nf}var Mf,Cf,Tf=Sf(),Rf={},Of={};function Ef(){return Mf||(Mf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="magnifying-glass",n=[128269,"search"],r="f002",a="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376C296.3 401.1 253.9 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z";e.definition={prefix:"fas",iconName:t,icon:[512,512,n,r,a]},e.faMagnifyingGlass=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=r,e.svgPathData=a,e.aliases=n}(Of)),Of}function Pf(){return Cf||(Cf=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ef();e.definition={prefix:t.prefix,iconName:t.iconName,icon:[t.width,t.height,t.aliases,t.unicode,t.svgPathData]},e.faSearch=e.definition,e.prefix=t.prefix,e.iconName=t.iconName,e.width=t.width,e.height=t.height,e.ligatures=t.aliases,e.unicode=t.unicode,e.svgPathData=t.svgPathData,e.aliases=t.aliases}(Rf)),Rf}var Ff,Af,If,Df=Pf(),Lf={};function Bf(){if(Ff)return Lf;function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}Ff=1,Object.defineProperty(Lf,"__esModule",{value:!0}),Lf.DebounceInput=void 0;var n=o(t),r=o(zl()),a=["element","onChange","value","minLength","debounceTimeout","forceNotifyByEnter","forceNotifyOnBlur","onKeyDown","onBlur","inputRef"];function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function s(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 l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return t&&function(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)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function f(t){var n=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 r,a=h(t);if(n){var o=h(this).constructor;r=Reflect.construct(a,arguments,o)}else r=a.apply(this,arguments);return function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}(this,r)}}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(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 p=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&&u(e,t)}(o,e);var t=f(o);function o(e){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),m(d(n=t.call(this,e)),"onChange",function(e){e.persist();var t=n.state.value,r=n.props.minLength;n.setState({value:e.target.value},function(){var a=n.state.value;a.length>=r?n.notify(e):t.length>a.length&&n.notify(l(l({},e),{},{target:l(l({},e.target),{},{value:""})}))})}),m(d(n),"onKeyDown",function(e){"Enter"===e.key&&n.forceNotify(e);var t=n.props.onKeyDown;t&&(e.persist(),t(e))}),m(d(n),"onBlur",function(e){n.forceNotify(e);var t=n.props.onBlur;t&&(e.persist(),t(e))}),m(d(n),"createNotifier",function(e){if(e<0)n.notify=function(){return null};else if(0===e)n.notify=n.doNotify;else{var t=(0,r.default)(function(e){n.isDebouncing=!1,n.doNotify(e)},e);n.notify=function(e){n.isDebouncing=!0,t(e)},n.flush=function(){return t.flush()},n.cancel=function(){n.isDebouncing=!1,t.cancel()}}}),m(d(n),"doNotify",function(){n.props.onChange.apply(void 0,arguments)}),m(d(n),"forceNotify",function(e){var t=n.props.debounceTimeout;if(n.isDebouncing||!(t>0)){n.cancel&&n.cancel();var r=n.state.value,a=n.props.minLength;r.length>=a?n.doNotify(e):n.doNotify(l(l({},e),{},{target:l(l({},e.target),{},{value:r})}))}}),n.isDebouncing=!1,n.state={value:void 0===e.value||null===e.value?"":e.value};var a=n.props.debounceTimeout;return n.createNotifier(a),n}return c(o,[{key:"componentDidUpdate",value:function(e){if(!this.isDebouncing){var t=this.props,n=t.value,r=t.debounceTimeout,a=e.debounceTimeout,o=e.value,i=this.state.value;void 0!==n&&o!==n&&i!==n&&this.setState({value:n}),r!==a&&this.createNotifier(r)}}},{key:"componentWillUnmount",value:function(){this.flush&&this.flush()}},{key:"render",value:function(){var e=this.props,t=e.element;e.onChange,e.value,e.minLength,e.debounceTimeout;var r,o,s=e.forceNotifyByEnter,c=e.forceNotifyOnBlur,u=e.onKeyDown,f=e.onBlur,d=e.inputRef,h=i(e,a),m=this.state.value;r=s?{onKeyDown:this.onKeyDown}:u?{onKeyDown:u}:{},o=c?{onBlur:this.onBlur}:f?{onBlur:f}:{};var p=d?{ref:d}:{};return n.default.createElement(t,l(l(l(l({},h),{},{onChange:this.onChange,value:m},r),o),p))}}]),o}(n.default.PureComponent);return Lf.DebounceInput=p,m(p,"defaultProps",{element:"input",type:"text",onKeyDown:void 0,onBlur:void 0,value:void 0,minLength:0,debounceTimeout:100,forceNotifyByEnter:!0,forceNotifyOnBlur:!0,inputRef:void 0}),Lf}var zf=function(){if(If)return Af;If=1;var e=Bf().DebounceInput;return e.DebounceInput=e,Af=e}(),$f="Input-module_input__ulQdV";const Vf=t.forwardRef(({testId:t,className:n,type:r,name:a,placeholder:o,minLength:i=0,debounceTimeout:s=100,onChange:l,value:c,htmlId:u},f)=>e.jsx(zf.DebounceInput,{inputRef:f,"data-testid":t,className:`${$f} ${n||""}`,type:r,name:a,placeholder:o,minLength:i,debounceTimeout:s,onChange:l,value:c,id:u}));var Hf="SharedQueryInput-module_wrapper__XRxrd",Wf="SharedQueryInput-module_search__XlzRv",Uf="SharedQueryInput-module_search-synced__J4T4b",Jf="SharedQueryInput-module_searchWithSync__ryuQa",Qf="SharedQueryInput-module_icon__Aq0Hv",qf="SharedQueryInput-module_checked__oRvod",Xf="SharedQueryInput-module_sync__0IO2N",Yf="SharedQueryInput-module_syncSelected__hstBI",Kf="SharedQueryInput-module_searchIcon__kfJxO";const Zf=({onHighlightChange:n,highlightQuery:r,sharedQuery:a,width:o})=>{const i=oc(),s=(e=>{const n=t.useRef();return t.useEffect(()=>{n.current=e},[e]),n.current})(null==a?void 0:a.syncEnabled),l=t.useRef(null),[c,u]=t.useState(!1);t.useEffect(()=>{"string"==typeof(null==a?void 0:a.searchQuery)&&(a.syncEnabled&&n(a.searchQuery),!a.syncEnabled&&s&&s!==(null==a?void 0:a.id)&&n(""))},[null==a?void 0:a.searchQuery,null==a?void 0:a.syncEnabled]),t.useEffect(()=>{const e=l.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");u(!!t)},[]);const f=t.useMemo(()=>a&&a.syncEnabled?a.searchQuery||"":r,[a,r]),d=t.useMemo(()=>`${a?Jf:Wf} ${(null==a?void 0:a.syncEnabled)?Uf:""}`,[a]),h=(null==a?void 0:a.syncEnabled)?i.unsyncSearchBars:i.syncSearchBars;return e.jsxs("div",{ref:l,className:Hf,style:{width:o},children:[e.jsx("span",{className:Kf,children:e.jsx(Vr,{icon:Df.faSearch})}),e.jsx(Vf,{testId:"flamegraph-search",className:d,type:"search",name:"flamegraph-search",placeholder:c?"搜索函数 / 过滤":i.searchPlaceholder,minLength:1,debounceTimeout:100,onChange:e=>{n(e.target.value),a&&a.syncEnabled&&a.onQueryChange(e.target.value)},value:f}),a?e.jsx(jf,{placement:"top",title:h,children:e.jsx("button",{className:a.syncEnabled?Yf:Xf,onClick:()=>{const e=!(null==a?void 0:a.syncEnabled)&&(null==a?void 0:a.id);null==a||a.toggleSync(e),e?null==a||a.onQueryChange(r):(n(r),null==a||a.onQueryChange(""))},children:e.jsx(Vr,{className:`${a.syncEnabled?qf:Qf}`,icon:Tf.faLink})})}):null]})};var Gf="DiffLegend-module_flamegraph-legend__Cywr1",ed="DiffLegend-module_flamegraph-legend-list__swdXj",td="DiffLegend-module_flamegraph-legend-item__0P-6g";function nd(t){const{palette:n,showMode:r}=t,a=function(e){switch(e){case"large":return[-100,-80,-60,-40,-20,-10,0,10,20,40,60,80,100];case"small":return[-100,-50,0,50,100];default:throw new Error(`Unsupported ${e}`)}}(r),o=es(n),i="small"===r?{"--legend-item-width":"32px","--legend-item-padding":"2px 2px","--legend-font-size":"10px","--legend-line-height":"1.1","--legend-item-height":"16px"}:void 0;return e.jsx("div",{"data-testid":"flamegraph-legend",className:`${Gf} ${ed}`,style:i,children:a.map(t=>e.jsxs("div",{className:td,style:{backgroundColor:o(t).rgb().toString()},children:[t>0?"+":"",t,"%"]},t))})}var rd="Dropdown-module_dropdownMenu__tbN8r",ad="Dropdown-module_dropdownMenuButton__Xy8M4";function od({id:t,children:n,className:r,disabled:a,value:o,label:i,onItemClick:s,overflow:l,position:c,direction:u,align:f,viewScroll:d,arrow:h,menuButtonClassName:m="",ariaLabel:p,portal:g,...v}){const b=v.menuButton||e.jsx(sd,{"aria-label":p,className:`${ad} ${m}`,disabled:a,type:"button",children:o||i});return e.jsxs(Cl,{id:t,"aria-label":p,className:qc(r,rd),"data-testid":v["data-testid"],onItemClick:s,overflow:l,position:c,direction:u,align:f,viewScroll:d,arrow:h,menuButton:b,portal:g,children:[e.jsx(El,{children:i}),n]})}const id=Ol,sd=cl;var ld="DiffLegendPaletteDropdown-module_container__h8Tts",cd="DiffLegendPaletteDropdown-module_triggerButton__oezA6",ud="DiffLegendPaletteDropdown-module_dropdownArrow__-Lu0w",fd="DiffLegendPaletteDropdown-module_menuItem__5iWry",dd="DiffLegendPaletteDropdown-module_menuItemText__a-tt0",hd="DiffLegendPaletteDropdown-module_dropdownMenu__G0NkR",md="DiffLegendPaletteDropdown-module_menuItemWrapper__vAw-Q",pd="DiffLegendPaletteDropdown-module_menuItemSelected__1gu9m";const gd=[Xl,Yl],vd=t=>{const{palette:n=Xl,onChange:r}=t,a=oc(),o=e=>"Default"===e.name?a.paletteDefaultName:"Color Blind"===e.name?a.paletteColorBlindName:e.name,i=e=>"Default"===e.name?a.paletteDefaultDesc:"Color Blind"===e.name?a.paletteColorBlindDesc:"";return e.jsx("div",{className:ld,children:e.jsx(od,{label:a.diffLegendSelectPalette,align:"end",className:hd,menuButton:e.jsxs(sd,{className:qc(ad,cd),children:[e.jsx(nd,{palette:n,showMode:"small"}),e.jsx("span",{className:ud})]}),onItemClick:e=>{e.value&&r(e.value)},children:gd.map(t=>e.jsx(id,{value:t,className:qc(md,t.name===n.name&&pd),children:e.jsx("div",{className:fd,children:e.jsxs("span",{className:dd,children:[o(t)," ",i(t)]})})},t.name))})})};var bd={navbar:"Toolbar-module_navbar__XN6xZ",searchWrapper:"Toolbar-module_searchWrapper__k--ua",rightSection:"Toolbar-module_rightSection__if7LO",viewType:"Toolbar-module_viewType__AKARg",toggleViewButton:"Toolbar-module_toggleViewButton__OQ9-U",fitModeButton:"Toolbar-module_fitModeButton__jOxve",selected:"Toolbar-module_selected__vwBQt",collapseNodeButton:"Toolbar-module_collapseNodeButton__bLdiw",resetViewButton:"Toolbar-module_resetViewButton__y2ebV",divider:"Toolbar-module_divider__dG6pE",itemsContainer:"Toolbar-module_itemsContainer__gSTMF",item:"Toolbar-module_item__o-hKc",moreButton:"Toolbar-module_moreButton__rhOdT",active:"Toolbar-module_active__36Kt-",navbarCollapsedItems:"Toolbar-module_navbarCollapsedItems__vojhw"};const yd=h.bind(bd),wd=(e,t,n)=>{const r=0===t?e-360-5:e-360-16-5;let a=0,o=0;return n.reverse().forEach(e=>{o+=e,r<=o&&(a+=1)}),a},xd=()=>e.jsx("div",{className:bd.divider}),kd=t.memo(({view:n,handleSearchChange:r,highlightQuery:a,isFlamegraphDirty:o,reset:i,updateFitMode:s,fitMode:l,updateView:c,selectedNode:u,onFocusOnSubtree:f,flamegraphType:d,enableChangingDisplay:h=!0,sharedQuery:m,ExportData:p,palette:g,setPalette:v})=>{const b=t.useRef(null),[y,w]=t.useState(!1),x=oc();t.useEffect(()=>{const e=b.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");w(!!t)},[]);const k=y?32:44,j=y?220:360,_="double"===d&&g&&v,N=[{el:e.jsxs(e.Fragment,{children:[e.jsx(Nd,{fitMode:l,updateFitMode:s}),e.jsx(xd,{})]}),width:2*k+5},{el:e.jsx(_d,{isFlamegraphDirty:o,reset:i}),width:k},{el:e.jsxs(e.Fragment,{children:[e.jsx(jd,{selectedNode:u,onFocusOnSubtree:f}),e.jsx(xd,{})]}),width:k+5},h?{el:e.jsx(Md,{flamegraphType:d,view:n,updateView:c}),width:k*("single"===d?5:3)}:null,t.isValidElement(p)?{el:e.jsxs(e.Fragment,{children:[e.jsx(xd,{}),p]}),width:k+5}:null].filter(e=>null!==e),S=N.reduce((e,t)=>[...e,t.width],[]),{isCollapsed:M,collapsedItemsNumber:C,handleMoreClick:T}=((e,n)=>{const[r,a]=t.useState(!0),[o,i]=t.useState(0);return t.useLayoutEffect(()=>{if(e.current){const{width:t}=e.current.getBoundingClientRect(),r=wd(t,o,n);i(r)}},[e.current,n]),Al(e,e=>{const{width:t}=e.target.getBoundingClientRect(),r=wd(t,o,n);i(r),a(!0)}),{isCollapsed:r,handleMoreClick:()=>{a(e=>!e)},collapsedItemsNumber:o}})(b,S),R=N.reduce((e,t,n)=>(n<C?e.hidden.push(t):e.visible.push(t),e),{visible:[],hidden:[]});return e.jsx("div",{role:"toolbar",ref:b,children:e.jsxs("div",{className:bd.navbar,children:[e.jsx("div",{className:bd.searchWrapper,children:e.jsx(Zf,{width:j,onHighlightChange:r,highlightQuery:a,sharedQuery:m})}),e.jsxs("div",{className:bd.rightSection,children:[_&&e.jsxs(e.Fragment,{children:[e.jsx(vd,{palette:g,onChange:v}),e.jsx(xd,{})]}),e.jsxs("div",{className:bd.itemsContainer,children:[R.visible.map((t,n)=>e.jsx("div",{className:bd.item,style:{width:t.width},children:t.el},n)),0!==C&&e.jsx(jf,{placement:"top",title:x.more,children:e.jsx("button",{onClick:T,className:yd({[bd.moreButton]:!0,[bd.active]:!M}),children:e.jsx(Vr,{icon:bf.faEllipsisV})})})]})]}),!M&&e.jsx("div",{className:bd.navbarCollapsedItems,children:R.hidden.map((t,n)=>e.jsx("div",{className:bd.item,style:{width:t.width},children:t.el},n))})]})})});function jd({onFocusOnSubtree:t,selectedNode:n}){const r=oc(),a=n.mapOr(()=>{},e=>()=>t(e.i,e.j));return e.jsx(jf,{placement:"top",title:r.collapseNodesAbove,children:e.jsx("div",{children:e.jsx(Ou,{disabled:!n.isJust,onClick:a,className:bd.collapseNodeButton,"aria-label":r.collapseNodesAbove,children:e.jsx(Vr,{icon:Is.faCompressAlt})})})})}function _d({isFlamegraphDirty:t,reset:n}){const r=oc();return e.jsx(jf,{placement:"top",title:r.resetView,children:e.jsx("span",{children:e.jsx(Ou,{id:"reset",disabled:!t,onClick:n,className:bd.resetViewButton,"aria-label":r.resetView,children:e.jsx(Vr,{icon:of.faUndo})})})})}function Nd({fitMode:t,updateFitMode:n}){const r=oc(),a=e=>t===e;return e.jsxs(e.Fragment,{children:[e.jsx(jf,{placement:"top",title:r.headFirst,children:e.jsx(Ou,{onClick:()=>n("HEAD"),className:yd({[bd.fitModeButton]:!0,[bd.selected]:a("HEAD")}),children:e.jsx(jc,{})})}),e.jsx(jf,{placement:"top",title:r.tailFirst,children:e.jsx(Ou,{onClick:()=>n("TAIL"),className:yd({[bd.fitModeButton]:!0,[bd.selected]:a("TAIL")}),children:e.jsx(_c,{})})})]})}const Sd=(t,n)=>"single"===t?[{label:n.viewFlamegraph,value:"flamegraph",Icon:xc},{label:n.viewTable,value:"table",Icon:yc},{label:n.viewTableAndFlamegraph,value:"both",Icon:wc},{label:n.viewSandwich,value:"sandwich",Icon:kc},{label:n.viewGraphviz,value:"graphviz",Icon:()=>e.jsx(Vr,{icon:hf.faProjectDiagram})}]:[{label:n.viewFlamegraph,value:"flamegraph",Icon:xc},{label:n.viewTable,value:"table",Icon:yc},{label:n.viewTableAndFlamegraph,value:"both",Icon:wc}];function Md({view:t,updateView:n,flamegraphType:r}){const a=oc(),o=Sd(r,a);return e.jsx("div",{className:bd.viewType,children:o.map(({label:r,value:a,Icon:o})=>e.jsx(jf,{placement:"top",title:r,children:e.jsx(Ou,{"data-testid":a,onClick:()=>n(a),className:yd({[bd.toggleViewButton]:!0,selected:t===a}),children:e.jsx(o,{})})},a))})}function Cd(e,t){const n={},r={};let a={name:"total",children:[],self:[],total:[],key:"/total"};return(t?[e,t]:[e]).forEach((e,t)=>{var o,i;for(let s=0;s<e.levels.length;s+=1)for(let l=0;l<e.levels[s].length;l+=4){const c=[t,s,l].join("/"),u=e.names[e.levels[s][l+3]],f=e.levels[s][l+0],d=e.levels[s][l+1],h=e.levels[s][l+2];let m="";if(0!==s){const n=s-1,a=e.levels[n];for(let e=0;e<a.length;e+=4){const o=a[e+0],i=a[e+1];if(f>=o&&f<o+i){const a=[t,n,e].join("/");m=r[a].key;break}}}const p=[m||"",u].join("/"),g=!n[p];n[p]||(n[p]={name:u,children:[],self:[],total:[],key:p});const v=n[p];(o=v.total)[t]||(o[t]=0),v.total[t]+=d,(i=v.self)[t]||(i[t]=0),v.self[t]+=h,r[c]=v,m&&g&&n[m].children.push(v),0===s&&(a=v)}}),a}const Td=e=>{const t={maxSelf:100,names:[],levels:[]},n=(e,r,a)=>{var o;const{name:i,children:s,self:l,total:c,offset:u}=e;t.names.push(i),(o=t.levels)[r]||(o[r]=[]),t.maxSelf=Math.max(t.maxSelf,l[0]||0),t.levels[r]=t.levels[r].concat([a,c[0]||0,l[0]||0,t.names.length-1]);for(let e=0;e<s.length;e+=1){a+=n(s[e],r+1,a)}return u||c[0]||0};return n(e,0,0),t};function Rd(e){const t=new Map;for(let n=0;n<e.children.length;n+=1)t.has(e.children[n].name)||t.set(e.children[n].name,e.children[n]);for(let n=0;n<e.children.length;n+=1){const r=e.children[n],a=t.get(e.children[n].name);a&&a!==r&&(a.total[0]+=r.total[0],a.self[0]+=r.self[0],a.children=a.children.concat(r.children))}e.children=Array.from(t.values());for(let t=0;t<e.children.length;t+=1)Rd(e.children[t])}function Od(e,t){const n=function(e,t){const n=Cd(e),r={format:"single",numTicks:0,maxSelf:100,sampleRate:100,names:[],levels:[],units:e.units,spyName:e.spyName},a={name:t,total:[],self:[0],children:[]},o=e=>{e.name===t&&(r.numTicks+=e.total[0],a.total=[r.numTicks],a.children=a.children.concat(e.children));for(let t=0;t<e.children.length;t+=1)o(e.children[t])};return o(n),Rd(a),{...r,...Td(a)}}(JSON.parse(JSON.stringify(e)),t);return n}function Ed(e,t){const n=function(e,t){const n=Cd(e),r={format:"single",maxSelf:100,sampleRate:100,numTicks:0,names:[],levels:[],units:e.units,spyName:e.spyName},a=[],o=[],i={name:t,total:[0],self:[0],children:[]},s=(e,n=[])=>{const i=n.concat([{...e,children:[]}]);e.name===t&&(o.push(i),a.push(e.total[0]),r.numTicks+=e.total[0]);for(let t=0;t<e.children.length;t+=1)s(e.children[t],i)};s(n),o.forEach((e,t)=>{i.children.push(((e,t)=>{const n={};let r=n;return e.forEach(({name:e,...n})=>{const a={name:e,...n,total:[t]};r.children=[a],r=a}),n.children[0]})(e.reverse(),a[t]))}),Rd(i);const l=Td(i);return l.levels=l.levels.reverse().slice(0,-1),{...r,...l}}(JSON.parse(JSON.stringify(e)),t);return n}var Pd={flamegraphContainer:"FlamegraphRenderer-module_flamegraphContainer__-7FRV",createdBy:"FlamegraphRenderer-module_createdBy__rHAOT",horizontal:"FlamegraphRenderer-module_horizontal__zs7--",vertical:"FlamegraphRenderer-module_vertical__fRcHg",panesWrapper:"FlamegraphRenderer-module_panesWrapper__L-mlA",tablePane:"FlamegraphRenderer-module_tablePane__Gin7Y",sandwichPane:"FlamegraphRenderer-module_sandwichPane__IEOyR",sandwichPaneInfo:"FlamegraphRenderer-module_sandwichPaneInfo__5hT4a",arrow:"FlamegraphRenderer-module_arrow__dPzpE",sandwichTop:"FlamegraphRenderer-module_sandwichTop__7N0ZY",sandwichBottom:"FlamegraphRenderer-module_sandwichBottom__Dc64g",name:"FlamegraphRenderer-module_name__XRbN9"};function Fd(e){const t=[];return Object.keys(e).forEach(n=>{var r;t.push(`${n}="${r=String(e[n]||""),r.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`)}),`[${t.join(" ")}]`}function Ad(e,t){return`${(100*e/t).toFixed(2)}%`}function Id(e,t){let n,r,a,o;t?(n=.1,r=.93):(n=1,r=.7),e=Math.max(-1,Math.min(1,e)),Math.abs(e)<.2&&(n*=Math.abs(e)/.2),e>0&&(e**=1-.7),e<0&&(e=-((-e)**(1-.7))),e<0?(o=r,a=r*(1+n*e)):(a=r,o=r*(1-n*e));const i=r*(1-n);return`#${Math.floor(255*a).toString(16).padStart(2,"0")}${Math.floor(255*o).toString(16).padStart(2,"0")}${Math.floor(255*i).toString(16).padStart(2,"0")}`}function Dd(e,t,n,r){const{self:a}=t,{total:o}=t,i=t.name.replace(/"/g,'\\"'),s=e(a),l=8+Math.ceil(16*Math.sqrt(a/n)),c=Id(o/r,!1),u=Id(o/r,!0),f=function(e,t,n,r,a){let o="";o=`${function(e){return e.replace(/.*\//,"")}(t)}\n`;const i=e(n);0!==n?o=`${o+i} (${Ad(n,a)})`:o+="0";let s=i;r!==n&&(o+=0!==n?"\n":" ",s=e(r),o=`${o}of ${s} (${Ad(r,a)})`);return o}(e,i,a,o,r),d={label:f,id:`node${t.index}`,fontsize:l,shape:"box",tooltip:`${i} (${s})`,color:c,fontcolor:"#000000",style:"filled",fontname:"",fillcolor:u};return`N${t.index} ${Fd(d)}`}function Ld(e){if("double"===e.metadata.format)return"diff flamegraphs are not supported";const t=Cd(e.flamebearer),n=[],r=[];const[a,o,,i]=function e(t,n,r,a,o){return t.children.forEach(t=>{const[i,s]=e(t,n,r,a,o);n=Math.max(n,i),r=Math.max(r,s)}),n=Math.max(n,t.self[0]),r=Math.max(r,t.total[0]),a+=t.self[0],o+=t.total[0],[n,r,a,o]}(t,0,0,0,0),{sampleRate:s,units:l}=e.metadata,c=Ia(o,s,l),u=e=>c.format(e,s,!0);let f={};const d={};let h=0;function m(e,t){return-1===t.indexOf(e.name)&&(f[e.name]?(f[e.name].self+=e.self[0],f[e.name].total+=e.total[0]):(h+=1,f[e.name]={index:h,name:e.name,self:e.self[0],total:e.total[0],parents:[],children:[]})),e.children.forEach(n=>{const r=m(n,t.concat([e.name])),a=`${e.name}/${n.name}`;n.name!==e.name&&(d[a]?d[a].weight+=n.total[0]:d[a]={from:f[e.name],to:r,weight:n.total[0],residual:!1},r.parents.push(d[a]),f[e.name].children.push(d[a]))}),f[e.name]}t.children.forEach(e=>{m(e,[])});const p=.005*i,g=.001*i;function v(e,t){let n=0,r=t;if(e.forEach(e=>{e.weight>0&&(r+=Math.abs(e.weight))}),0!==r&&(e.forEach(e=>{const t=Math.abs(e.weight)/r;n+=-t*Math.log2(t)}),t>0)){const e=Math.abs(t)/r;n+=-e*Math.log2(e)}return n}Object.keys(f).forEach(e=>{f[e].total<p&&delete f[e]});const b={};Object.keys(f).forEach(e=>{b[f[e].name]=function(e){let t=0;return 0===e.parents.length?t+=1:t+=v(e.parents,0),0===e.children.length?t+=1:t+=v(e.children,e.self),t*e.total+e.self}(f[e])});const y=Object.values(f).sort((e,t)=>{const n=b[e.name],r=b[t.name];return n!==r?r-n:e.name!==t.name?e.name<t.name?-1:1:e.self!==t.self?r-n:e.name<t.name?-1:1}),w={};function x(e){const[t,n]=[e.from,e.to],r={},a=[n];for(;a.length>0;){const n=a.shift();for(let o=0;o<n.parents.length;o+=1){const i=n.parents[o];if(e!==i&&!r[i.from.name]){if(i.from===t)return!0;r[i.from.name]=!0,a.push(i.from)}}}return!1}return y.forEach(e=>{w[e.name]=e}),y.slice(80).forEach(e=>{delete w[e.name]}),function e(t,n){const r=!w[t.name];t.children.forEach(a=>{const o=!w[a.name];if(e(a,r?n:t),!o&&n&&r){const e=`${n.name}/${a.name}`;d[e]||(d[e]={from:f[n.name],to:f[a.name],weight:0,residual:!0}),d[e].weight+=a.total[0],d[e].residual=!0}})}(t,null),f=w,y.reverse().forEach(e=>{const t=e.parents.sort((e,t)=>t.weight-e.weight),n=[];for(let e=0;e<t.length;e+=1){const r=t[e];if(!r.residual)break;x(r)&&(n.push(r),delete d[`${r.from.name}/${r.to.name}`])}n.forEach(e=>{e.from.children=e.from.children.filter(t=>t.to!==e.to),e.to.parents=e.to.parents.filter(t=>t.from!==e.from)})}),Object.keys(d).forEach(e=>{const t=d[e];f[t.from.name]||delete d[e],f[t.to.name]||delete d[e],t.weight<g&&delete d[e]}),Object.keys(f).forEach(e=>{n.push(Dd(u,f[e],a,o))}),Object.keys(d).forEach(e=>{r.push(function(e,t,n){const r=t.from.name.replace(/"/g,'\\"'),a=t.to.name.replace(/"/g,'\\"'),o=t.weight,i=e(t.weight),s=`${r} -> ${a} (${i})`,l={label:i,weight:1+100*o/n,penwidth:1+5*o/n,tooltip:s,labeltooltip:s,fontname:"",color:Id(o/n,!1),style:t.residual?"dotted":""};return`N${t.from.index} -> N${t.to.index} ${Fd(l)}`}(u,d[e],o))}),`digraph "unnamed" {\n fontname= ""\n ${n.join("\n")}\n ${r.join("\n")}\n }`}var Bd="GraphVizPanel-module_graphVizPane__B18cQ";const zd=()=>null;function $d({flamebearer:n}){var r,a;const o=n,i=(null===(r=o.metadata)||void 0===r?void 0:r.format)&&(null===(a=o.flamebearer)||void 0===a?void 0:a.levels),s=`graphviz-pane-${(null==o?void 0:o.appName)||String((new Date).valueOf())}`,l=t.useMemo(()=>Ld(o),[JSON.stringify(o)]);return e.jsx("div",{className:Bd,children:i?e.jsx(zd,{options:{zoom:!0,width:"150%",height:"100%",scale:1,useWorker:!1},dot:l}):e.jsx("div",{children:"NO DATA"})},s)}function Vd(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const r=[0,Math.floor(n/2),n-1];for(let n=0;n<r.length;n+=1){const a=e[r[n]];if(!a||0===a.length)continue;const o=Math.min(8,a.length);for(let e=0;e<o;e+=1)t^=0|a[e],t=Math.imul(t,16777619);for(let e=Math.max(0,a.length-o);e<a.length;e+=1)t^=0|a[e],t=Math.imul(t,16777619)}return t>>>0}function Hd(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const r=Math.min(32,n),a=[...Array.from({length:r},(e,t)=>t),...Array.from({length:r},(e,t)=>n-r+t)];for(let n=0;n<a.length;n+=1){const r=e[a[n]]||"";for(let e=0;e<r.length;e+=1)t^=r.charCodeAt(e),t=Math.imul(t,16777619)}return t>>>0}function Wd(e){var t,n,r,a,o,i;const s=e.__kylinSignature;if(s)return s;const l=e,c=[e.format,e.numTicks,e.sampleRate,e.units,e.maxSelf,null!==(n=null===(t=e.names)||void 0===t?void 0:t.length)&&void 0!==n?n:0,null!==(a=null===(r=e.levels)||void 0===r?void 0:r.length)&&void 0!==a?a:0,null!==(o=l.leftTicks)&&void 0!==o?o:"na",null!==(i=l.rightTicks)&&void 0!==i?i:"na",Vd(e.levels),Hd(e.names||[])].join("|");return e.__kylinSignature=c,c}function Ud(e,t){const n=[...t];function r(e,t,n){for(const r of e){let e=0;for(let a=t;a<r.length;a+=n)r[a]-=e,e+=r[a]+r[a+1]}}return"double"===e?(r(n,0,7),r(n,3,7)):r(n,0,4),n}function Jd(e,t){const n=[...t];function r(e,t,n){for(const r of e){let e=0;for(let a=t;a<r.length;a+=n)r[a]+=e,e=r[a]+r[a+1]}}return"double"===e?(r(n,0,7),r(n,3,7)):r(n,0,4),n}function Qd(e){if(e.profile&&e.flamebearer&&console.warn("'profile' and 'flamebearer' properties are mutually exclusive. Please use profile if possible."),e.profile){const n=e.profile,r={...n,flamebearer:{...n.flamebearer}};n.__kylinDecoded||((t=r).flamebearer.levels=Jd(t.metadata.format,t.flamebearer.levels),n.__kylinDecoded=!0,r.__kylinDecoded=!0);const a={...r,...r.metadata,...r.flamebearer,flamebearer:void 0,metadata:void 0};return delete a.flamebearer,delete a.metadata,a}var t;if(e.flamebearer)return e.flamebearer;return{format:"single",names:[],units:"unknown",levels:[[]],spyName:"unknown",numTicks:0,sampleRate:0,maxSelf:0}}class qd extends t.Component{constructor(t){super(t),this.resetFlamegraphState={focusedNode:ha.nothing(),zoom:ha.nothing()},this.initialFlamegraphState=this.resetFlamegraphState,this.calcNewConfigs=(e,t)=>{const n=this.state.flamegraphConfigs,r=(e,t,n)=>{const r=(e,t,n)=>e.names[ka(e.format).getBarName(e.levels[t],n)];if(n.isNothing)return!0;try{const a=n,o=r(e,a.value.i,a.value.j);return o===r(t,a.value.i,a.value.j)}catch{return!1}};r(e,t,this.state.flamegraphConfigs.zoom)||(n.zoom=this.resetFlamegraphState.zoom);return r(e,t,this.state.flamegraphConfigs.focusedNode)||(n.focusedNode=this.resetFlamegraphState.focusedNode),n},this.onSearchChange=e=>{this.setState({searchQuery:e})},this.isSameFlamebearer=(e,t)=>function(e,t){return Wd(e)===Wd(t)}(e,t),this.onReset=()=>{this.setState({...this.state,flamegraphConfigs:{...this.state.flamegraphConfigs,...this.initialFlamegraphState},selectedItem:ha.nothing()})},this.onFlamegraphZoom=e=>{e.isJust&&0===e.value.i&&0===e.value.j?this.onReset():this.setState({...this.state,flamegraphConfigs:{...this.state.flamegraphConfigs,zoom:e}})},this.onFocusOnNode=(e,t)=>{if(0===e&&0===t)return void this.onReset();let n={...this.state.flamegraphConfigs};const{zoom:r}=this.state.flamegraphConfigs;r.isJust&&r.value.i<=e&&(n={...n,zoom:this.initialFlamegraphState.zoom}),this.setState({...this.state,flamegraphConfigs:{...n,focusedNode:ha.just({i:e,j:t})}})},this.isNameInFocusedSubtree=e=>{const{focusedNode:t}=this.state.flamegraphConfigs;if(t.isNothing)return!0;const{flamebearer:n}=this.state;if(!n||!n.levels)return!0;const{names:r,levels:a,format:o}=n,i=ka(o),s=t.value.i,l=t.value.j,c=a[s];if(!c)return!0;const u=i.getBarOffset(c,l),f=u+i.getBarTotal(c,l);for(let t=s;t<a.length;t++){const n=a[t];for(let t=0;t<n.length;t+=i.jStep){const a=i.getBarOffset(n,t),o=i.getBarTotal(n,t);if(a>=u&&a+o<=f){if(r[i.getBarName(n,t)]===e)return!0}}}return!1},this.setActiveItem=e=>{const{name:t}=e;if(this.state.selectedItem.isJust&&t===this.state.selectedItem.value)return void this.setState({selectedItem:ha.nothing()});this.isNameInFocusedSubtree(t)?this.setState({selectedItem:ha.just(t)}):this.setState({selectedItem:ha.just(t),flamegraphConfigs:{...this.state.flamegraphConfigs,focusedNode:this.resetFlamegraphState.focusedNode}})},this.getHighlightQuery=()=>this.state.selectedItem.isJust?this.state.selectedItem.value:this.state.searchQuery,this.updateView=e=>{"sandwich"===e&&this.setState({searchQuery:"",flamegraphConfigs:this.resetFlamegraphState}),this.setState({view:e})},this.updateFlamegraphDirtiness=()=>{const e=this.isDirty();this.setState({isFlamegraphDirty:e})},this.updateFitMode=e=>{this.setState({fitMode:e})},this.clearFocus=()=>{this.setState(e=>({...e,flamegraphConfigs:{...e.flamegraphConfigs,...this.resetFlamegraphState}}))},this.getActiveRange=()=>{const{flamebearer:e}=this.state,{zoom:t,focusedNode:n}=this.state.flamegraphConfigs,r=e.numTicks;if(!r)return{rangeMin:0,rangeMax:1};const a=ka(e.format),o=t=>{const n=e.levels[t.i];if(!n)return{rangeMin:0,rangeMax:1};const o=a.getBarOffset(n,t.j),i=a.getBarTotal(n,t.j);return{rangeMin:o/r,rangeMax:(o+i)/r}};return t.match({Just:e=>n.match({Just:t=>{const n=o(t),r=o(e);return n.rangeMax-n.rangeMin<r.rangeMax-r.rangeMin?n:r},Nothing:()=>o(e)}),Nothing:()=>n.match({Just:e=>o(e),Nothing:()=>({rangeMin:0,rangeMax:1})})})},this.isDirty=()=>this.state.selectedItem.isJust||JSON.stringify(this.initialFlamegraphState)!==JSON.stringify(this.state.flamegraphConfigs),this.handleSetPalette=e=>{this.setState({palette:e})},this.render=()=>{var t;const n=e.jsx("div",{className:ds(Pd.tablePane,"vertical"===this.state.panesOrientation?Pd.vertical:Pd.horizontal),children:e.jsx(Yu,{"data-testid":"table-view",flamebearer:this.state.flamebearer,fitMode:this.state.fitMode,highlightQuery:this.state.searchQuery,selectedItem:this.state.selectedItem,handleTableItemClick:this.setActiveItem,palette:this.state.palette,onFocusOnNode:this.onFocusOnNode,updateView:this.props.onlyDisplay?void 0:this.updateView,enableSandwichView:this.props.enableSandwichView})},"table-pane"),r=this.shouldShowToolbar(),a=!this.state.flamebearer||this.state.flamebearer.names.length<=1,i=this.context,s="Location"!==i.location,l=this.state.flamebearer.numTicks,c=Ia(l,this.state.flamebearer.sampleRate,this.state.flamebearer.units).format(l,this.state.flamebearer.sampleRate),u=Ea(c,s)||c,f=function(e,t=Pa){const n=Math.abs(e);for(const{value:r,label:a}of t)if(n>=r)return`${(e/r).toFixed(2).replace(/\.?0+$/,"")} ${a}`;return Ra(e)}(l,i.sampleCountFormat),d=i.tooltipSamples.replace(/[::]\s*$/,""),h=(null===(t=i.tooltipUnitTitles[this.state.flamebearer.units])||void 0===t?void 0:t.formattedValue)||i.tooltipUnitTitles.unknown.formattedValue,m=this.getActiveRange(),p=m.rangeMin>0||m.rangeMax<1,g=Math.max(0,Math.min(l,(m.rangeMax-m.rangeMin)*l)),v=l>0?g/l*100:0,b=(()=>{const e=ka(this.state.flamebearer.format),t=this.state.flamegraphConfigs.focusedNode.mapOrElse(()=>this.state.flamegraphConfigs.zoom.mapOrElse(()=>null,e=>e),e=>e);if(!t)return"";const n=this.state.flamebearer.levels[t.i];if(!n)return"";const r=e.getBarName(n,t.j);return this.state.flamebearer.names[r]||""})(),y=e.jsx(Hc,{showCredit:this.props.showCredit,flamebearer:this.state.flamebearer,highlightQuery:this.getHighlightQuery(),setActiveItem:this.setActiveItem,selectedItem:this.state.selectedItem,updateView:this.props.onlyDisplay?void 0:this.updateView,fitMode:this.state.fitMode,updateFitMode:this.updateFitMode,zoom:this.state.flamegraphConfigs.zoom,focusedNode:this.state.flamegraphConfigs.focusedNode,onZoom:this.onFlamegraphZoom,onFocusOnNode:this.onFocusOnNode,onReset:this.onReset,isDirty:this.isDirty,palette:this.state.palette,toolbarVisible:r,setPalette:this.handleSetPalette,enableSandwichView:this.props.enableSandwichView,breadcrumb:a?void 0:{totalValueText:u,totalSamplesText:f,samplesLabel:d,unitLabel:h,hasFocus:p,focusPercent:v,focusLabel:b,ofTotalPlacement:s?"before":"after",ofTotalLabel:i.ofTotal,clearFocusLabel:i.clearFocus,onClearFocus:this.clearFocus}},"flamegraph-pane"),w=(()=>{if("sandwich"!==this.state.view)return e.jsx("div",{className:Pd.sandwichPane},"sandwich-pane");if(this.state.selectedItem.isNothing)return e.jsx("div",{className:Pd.sandwichPane,children:e.jsxs("div",{className:ds(Pd.sandwichPaneInfo,"vertical"===this.state.panesOrientation?Pd.vertical:Pd.horizontal),children:[e.jsx("div",{className:Pd.arrow}),"Select a function to view callers/callees sandwich view"]})},"sandwich-pane");const t=Ed(this.state.flamebearer,this.state.selectedItem.value),n=Od(this.state.flamebearer,this.state.selectedItem.value),a=t=>e.jsx(Hc,{disableClick:!0,showCredit:this.props.showCredit,highlightQuery:"",setActiveItem:this.setActiveItem,selectedItem:this.state.selectedItem,fitMode:this.state.fitMode,updateFitMode:this.updateFitMode,zoom:this.state.flamegraphConfigs.zoom,focusedNode:this.state.flamegraphConfigs.focusedNode,onZoom:this.onFlamegraphZoom,onFocusOnNode:this.onFocusOnNode,onReset:this.onReset,isDirty:this.isDirty,palette:this.state.palette,toolbarVisible:r,setPalette:this.handleSetPalette,...t});return e.jsxs("div",{className:Pd.sandwichPane,children:[e.jsxs("div",{className:Pd.sandwichTop,children:[e.jsx("span",{className:Pd.name,children:"Callers"}),a({flamebearer:t})]}),e.jsxs("div",{className:Pd.sandwichBottom,children:[e.jsx("span",{className:Pd.name,children:"Callees"}),a({flamebearer:n,headerVisible:!1,showSingleLevel:!0})]})]},"sandwich-pane")})(),x=function(e,t,n,r,a){switch(e){case"table":return[n];case"flamegraph":return[t];case"sandwich":return[n,r];case"both":return[n,t];case"graphviz":return[a];default:throw new Error(`Invalid view '${e}'`)}}(this.state.view,y,n,w,e.jsx($d,{flamebearer:this.state.flamebearer}));return e.jsxs("div",{children:[e.jsxs("div",{children:[r&&e.jsx(kd,{sharedQuery:this.props.sharedQuery,enableChangingDisplay:!this.props.onlyDisplay,flamegraphType:this.state.flamebearer.format,view:this.state.view,handleSearchChange:this.onSearchChange,reset:this.onReset,updateView:this.updateView,updateFitMode:this.updateFitMode,fitMode:this.state.fitMode,isFlamegraphDirty:this.isDirty(),selectedNode:this.state.flamegraphConfigs.zoom,highlightQuery:this.state.searchQuery,onFocusOnSubtree:this.onFocusOnNode,ExportData:this.props.ExportData,palette:this.state.palette,setPalette:this.handleSetPalette}),this.props.children,e.jsx("div",{className:`${Pd.flamegraphContainer} ${ds("vertical"===this.state.panesOrientation?Pd.vertical:Pd.horizontal,Pd[this.state.panesOrientation],Pd.panesWrapper)}`,children:a?e.jsx(ms,{}):x.map(e=>e)})]}),this.props.showPyroscopeLogo&&e.jsxs("div",{className:Pd.createdBy,children:["Created by",e.jsxs("a",{href:"https://twitter.com/PyroscopeIO",rel:"noreferrer",target:"_blank",children:[e.jsx(o,{width:"30",height:"30"}),"@PyroscopeIO"]})]})]})},this.state={isFlamegraphDirty:!1,view:this.props.onlyDisplay?this.props.onlyDisplay:"both",fitMode:"HEAD",flamebearer:Qd(t),panesOrientation:t.panesOrientation?t.panesOrientation:"horizontal",searchQuery:"",selectedItem:ha.nothing(),flamegraphConfigs:this.initialFlamegraphState,palette:Xl}}componentDidUpdate(e,t){if(e.profile!==this.props.profile||e.flamebearer!==this.props.flamebearer){const e=t.flamebearer,n=Qd(this.props);if(!this.isSameFlamebearer(e,n)){const t=this.calcNewConfigs(e,n);return void this.setState({flamebearer:n,flamegraphConfigs:{...this.state.flamegraphConfigs,...t},selectedItem:ha.nothing()})}}t.flamegraphConfigs!==this.state.flamegraphConfigs&&this.updateFlamegraphDirtiness()}shouldShowToolbar(){return void 0===this.props.showToolbar||this.props.showToolbar}}qd.contextType=rc,qd.defaultProps={showCredit:!1};const Xd={showPyroscopeLogo:!1},Yd=(e,t)=>{if(t)return t;const n=null!=e?e:"auto";return"zh-CN"===("auto"===n?"undefined"!=typeof navigator&&navigator.language&&navigator.language.toLowerCase().startsWith("zh")?"zh-CN":"en":n)?tc:ec};var Kd,Zd={exports:{}};var Gd,eh=(Kd||(Kd=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,a="[object Arguments]",o="[object Array]",i="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",m="[object Promise]",p="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",w="[object ArrayBuffer]",x="[object DataView]",k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j=/^\w*$/,_=/^\./,N=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S=/\\(\\)?/g,M=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[a]=T[o]=T[w]=T[i]=T[x]=T[l]=T[c]=T[u]=T[f]=T[d]=T[h]=T[p]=T[g]=T[v]=T[y]=!1;var R="object"==typeof s&&s&&s.Object===Object&&s,O="object"==typeof self&&self&&self.Object===Object&&self,E=R||O||Function("return this")(),P=t&&!t.nodeType&&t,F=P&&e&&!e.nodeType&&e,A=F&&F.exports===P&&R.process,I=function(){try{return A&&A.binding("util")}catch(e){}}(),D=I&&I.isTypedArray;function L(e,t,n,r){for(var a=-1,o=e?e.length:0;++a<o;){var i=e[a];t(r,i,n(i),e)}return r}function B(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function $(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var H,W,U,J=Array.prototype,Q=Function.prototype,q=Object.prototype,X=E["__core-js_shared__"],Y=(H=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",K=Q.toString,Z=q.hasOwnProperty,G=q.toString,ee=RegExp("^"+K.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=E.Symbol,ne=E.Uint8Array,re=q.propertyIsEnumerable,ae=J.splice,oe=(W=Object.keys,U=Object,function(e){return W(U(e))}),ie=ze(E,"DataView"),se=ze(E,"Map"),le=ze(E,"Promise"),ce=ze(E,"Set"),ue=ze(E,"WeakMap"),fe=ze(Object,"create"),de=qe(ie),he=qe(se),me=qe(le),pe=qe(ce),ge=qe(ue),ve=te?te.prototype:void 0,be=ve?ve.valueOf:void 0,ye=ve?ve.toString:void 0;function we(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function je(e){var t=-1,n=e?e.length:0;for(this.__data__=new ke;++t<n;)this.add(e[t])}function _e(e){this.__data__=new xe(e)}function Ne(e,t){var n=et(e)||Ge(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,a=!!r;for(var o in e)!Z.call(e,o)||a&&("length"==o||Ve(o,r))||n.push(o);return n}function Se(e,t){for(var n=e.length;n--;)if(Ze(e[n][0],t))return n;return-1}function Me(e,t,n,r){return Te(e,function(e,a,o){t(r,e,n(e),o)}),r}we.prototype.clear=function(){this.__data__=fe?fe(null):{}},we.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},we.prototype.get=function(e){var t=this.__data__;if(fe){var r=t[e];return r===n?void 0:r}return Z.call(t,e)?t[e]:void 0},we.prototype.has=function(e){var t=this.__data__;return fe?void 0!==t[e]:Z.call(t,e)},we.prototype.set=function(e,t){return this.__data__[e]=fe&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=Se(t,e);return!(n<0||(n==t.length-1?t.pop():ae.call(t,n,1),0))},xe.prototype.get=function(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return Se(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ke.prototype.clear=function(){this.__data__={hash:new we,map:new(se||xe),string:new we}},ke.prototype.delete=function(e){return Be(this,e).delete(e)},ke.prototype.get=function(e){return Be(this,e).get(e)},ke.prototype.has=function(e){return Be(this,e).has(e)},ke.prototype.set=function(e,t){return Be(this,e).set(e,t),this},je.prototype.add=je.prototype.push=function(e){return this.__data__.set(e,n),this},je.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new xe},_e.prototype.delete=function(e){return this.__data__.delete(e)},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!se||r.length<199)return r.push([e,t]),this;n=this.__data__=new ke(r)}return n.set(e,t),this};var Ce,Te=(Ce=function(e,t){return e&&Re(e,t,lt)},function(e,t){if(null==e)return e;if(!tt(e))return Ce(e,t);for(var n=e.length,r=-1,a=Object(e);++r<n&&!1!==t(a[r],r,a););return e}),Re=function(e,t,n){for(var r=-1,a=Object(e),o=n(e),i=o.length;i--;){var s=o[++r];if(!1===t(a[s],s,a))break}return e};function Oe(e,t){for(var n=0,r=(t=He(t,e)?[t]:De(t)).length;null!=e&&n<r;)e=e[Qe(t[n++])];return n&&n==r?e:void 0}function Ee(e,t){return null!=e&&t in Object(e)}function Pe(e,t,n,r,s){return e===t||(null==e||null==t||!at(e)&&!ot(t)?e!=e&&t!=t:function(e,t,n,r,s,u){var m=et(e),y=et(t),k=o,j=o;m||(k=(k=$e(e))==a?h:k),y||(j=(j=$e(t))==a?h:j);var _=k==h&&!z(e),N=j==h&&!z(t),S=k==j;if(S&&!_)return u||(u=new _e),m||st(e)?Le(e,t,n,r,s,u):function(e,t,n,r,a,o,s){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!r(new ne(e),new ne(t)));case i:case l:case d:return Ze(+e,+t);case c:return e.name==t.name&&e.message==t.message;case p:case v:return e==t+"";case f:var u=$;case g:var h=2&o;if(u||(u=V),e.size!=t.size&&!h)return!1;var m=s.get(e);if(m)return m==t;o|=1,s.set(e,t);var y=Le(u(e),u(t),r,a,o,s);return s.delete(e),y;case b:if(be)return be.call(e)==be.call(t)}return!1}(e,t,k,n,r,s,u);if(!(2&s)){var M=_&&Z.call(e,"__wrapped__"),C=N&&Z.call(t,"__wrapped__");if(M||C){var T=M?e.value():e,R=C?t.value():t;return u||(u=new _e),n(T,R,r,s,u)}}return!!S&&(u||(u=new _e),function(e,t,n,r,a,o){var i=2&a,s=lt(e),l=s.length,c=lt(t),u=c.length;if(l!=u&&!i)return!1;for(var f=l;f--;){var d=s[f];if(!(i?d in t:Z.call(t,d)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);for(var p=i;++f<l;){var g=e[d=s[f]],v=t[d];if(r)var b=i?r(v,g,d,t,e,o):r(g,v,d,e,t,o);if(!(void 0===b?g===v||n(g,v,r,a,o):b)){m=!1;break}p||(p="constructor"==d)}if(m&&!p){var y=e.constructor,w=t.constructor;y==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof w&&w instanceof w||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,r,s,u))}(e,t,Pe,n,r,s))}function Fe(e){return!(!at(e)||function(e){return!!Y&&Y in e}(e))&&(nt(e)||z(e)?ee:M).test(qe(e))}function Ae(e){return"function"==typeof e?e:null==e?ct:"object"==typeof e?et(e)?function(e,t){return He(e)&&We(t)?Ue(Qe(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Oe(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){t=He(t,e)?[t]:De(t);for(var r,a=-1,o=t.length;++a<o;){var i=Qe(t[a]);if(!(r=null!=e&&n(e,i)))break;e=e[i]}return r||!!(o=e?e.length:0)&&rt(o)&&Ve(i,o)&&(et(e)||Ge(e))}(e,t,Ee)}(n,e):Pe(t,r,void 0,3)}}(e[0],e[1]):(n=function(e){for(var t=lt(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,We(a)]}return t}(t=e),1==n.length&&n[0][2]?Ue(n[0][0],n[0][1]):function(e){return e===t||function(e,t,n,r){var a=n.length,o=a;if(null==e)return!o;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){var s=(i=n[a])[0],l=e[s],c=i[1];if(i[2]){if(void 0===l&&!(s in e))return!1}else if(!Pe(c,l,r,3,new _e))return!1}return!0}(e,0,n)}):He(r=e)?(a=Qe(r),function(e){return null==e?void 0:e[a]}):function(e){return function(t){return Oe(t,e)}}(r);var t,n,r,a}function Ie(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||q,t!==r)return oe(e);var t,n,r,a=[];for(var o in Object(e))Z.call(e,o)&&"constructor"!=o&&a.push(o);return a}function De(e){return et(e)?e:Je(e)}function Le(e,t,n,r,a,o){var i=2&a,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,f=!0,d=1&a?new je:void 0;for(o.set(e,t),o.set(t,e);++u<s;){var h=e[u],m=t[u];if(r)var p=i?r(m,h,u,t,e,o):r(h,m,u,e,t,o);if(void 0!==p){if(p)continue;f=!1;break}if(d){if(!B(t,function(e,t){if(!d.has(t)&&(h===e||n(h,e,r,a,o)))return d.add(t)})){f=!1;break}}else if(h!==m&&!n(h,m,r,a,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Be(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function ze(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Fe(n)?n:void 0}var $e=function(e){return G.call(e)};function Ve(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||C.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t){if(et(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!it(e))||j.test(e)||!k.test(e)||null!=t&&e in Object(t)}function We(e){return e==e&&!at(e)}function Ue(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}(ie&&$e(new ie(new ArrayBuffer(1)))!=x||se&&$e(new se)!=f||le&&$e(le.resolve())!=m||ce&&$e(new ce)!=g||ue&&$e(new ue)!=y)&&($e=function(e){var t=G.call(e),n=t==h?e.constructor:void 0,r=n?qe(n):void 0;if(r)switch(r){case de:return x;case he:return f;case me:return m;case pe:return g;case ge:return y}return t});var Je=Ke(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(it(e))return ye?ye.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return _.test(e)&&n.push(""),e.replace(N,function(e,t,r,a){n.push(r?a.replace(S,"$1"):t||e)}),n});function Qe(e){if("string"==typeof e||it(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function qe(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var Xe,Ye=(Xe=function(e,t,n){Z.call(e,n)?e[n].push(t):e[n]=[t]},function(e,t){return(et(e)?L:Me)(e,Xe,Ae(t),{})});function Ke(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new(Ke.Cache||ke),n}function Ze(e,t){return e===t||e!=e&&t!=t}function Ge(e){return function(e){return ot(e)&&tt(e)}(e)&&Z.call(e,"callee")&&(!re.call(e,"callee")||G.call(e)==a)}Ke.Cache=ke;var et=Array.isArray;function tt(e){return null!=e&&rt(e.length)&&!nt(e)}function nt(e){var t=at(e)?G.call(e):"";return t==u||"[object GeneratorFunction]"==t}function rt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function at(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ot(e){return!!e&&"object"==typeof e}function it(e){return"symbol"==typeof e||ot(e)&&G.call(e)==b}var st=D?function(e){return function(t){return e(t)}}(D):function(e){return ot(e)&&rt(e.length)&&!!T[G.call(e)]};function lt(e){return tt(e)?Ne(e):Ie(e)}function ct(e){return e}e.exports=Ye}(Zd,Zd.exports)),Zd.exports),th=l(eh),nh={exports:{}};var rh=(Gd||(Gd=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,a="[object Arguments]",o="[object Array]",i="[object Boolean]",l="[object Date]",c="[object Error]",u="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",m="[object Promise]",p="[object RegExp]",g="[object Set]",v="[object String]",b="[object Symbol]",y="[object WeakMap]",w="[object ArrayBuffer]",x="[object DataView]",k=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,j=/^\w*$/,_=/^\./,N=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S=/\\(\\)?/g,M=/^\[object .+?Constructor\]$/,C=/^(?:0|[1-9]\d*)$/,T={};T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T[a]=T[o]=T[w]=T[i]=T[x]=T[l]=T[c]=T[u]=T[f]=T[d]=T[h]=T[p]=T[g]=T[v]=T[y]=!1;var R="object"==typeof s&&s&&s.Object===Object&&s,O="object"==typeof self&&self&&self.Object===Object&&self,E=R||O||Function("return this")(),P=t&&!t.nodeType&&t,F=P&&e&&!e.nodeType&&e,A=F&&F.exports===P&&R.process,I=function(){try{return A&&A.binding("util")}catch(e){}}(),D=I&&I.isTypedArray;function L(e,t){for(var n=-1,r=e?e.length:0,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a}function B(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n,e))return!0;return!1}function z(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function $(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var H,W,U,J=Array.prototype,Q=Function.prototype,q=Object.prototype,X=E["__core-js_shared__"],Y=(H=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||""))?"Symbol(src)_1."+H:"",K=Q.toString,Z=q.hasOwnProperty,G=q.toString,ee=RegExp("^"+K.call(Z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),te=E.Symbol,ne=E.Uint8Array,re=q.propertyIsEnumerable,ae=J.splice,oe=(W=Object.keys,U=Object,function(e){return W(U(e))}),ie=ze(E,"DataView"),se=ze(E,"Map"),le=ze(E,"Promise"),ce=ze(E,"Set"),ue=ze(E,"WeakMap"),fe=ze(Object,"create"),de=qe(ie),he=qe(se),me=qe(le),pe=qe(ce),ge=qe(ue),ve=te?te.prototype:void 0,be=ve?ve.valueOf:void 0,ye=ve?ve.toString:void 0;function we(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ke(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function je(e){var t=-1,n=e?e.length:0;for(this.__data__=new ke;++t<n;)this.add(e[t])}function _e(e){this.__data__=new xe(e)}function Ne(e,t){var n=Ze(e)||Ke(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,a=!!r;for(var o in e)!Z.call(e,o)||a&&("length"==o||Ve(o,r))||n.push(o);return n}function Se(e,t){for(var n=e.length;n--;)if(Ye(e[n][0],t))return n;return-1}we.prototype.clear=function(){this.__data__=fe?fe(null):{}},we.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},we.prototype.get=function(e){var t=this.__data__;if(fe){var r=t[e];return r===n?void 0:r}return Z.call(t,e)?t[e]:void 0},we.prototype.has=function(e){var t=this.__data__;return fe?void 0!==t[e]:Z.call(t,e)},we.prototype.set=function(e,t){return this.__data__[e]=fe&&void 0===t?n:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,n=Se(t,e);return!(n<0||(n==t.length-1?t.pop():ae.call(t,n,1),0))},xe.prototype.get=function(e){var t=this.__data__,n=Se(t,e);return n<0?void 0:t[n][1]},xe.prototype.has=function(e){return Se(this.__data__,e)>-1},xe.prototype.set=function(e,t){var n=this.__data__,r=Se(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},ke.prototype.clear=function(){this.__data__={hash:new we,map:new(se||xe),string:new we}},ke.prototype.delete=function(e){return Be(this,e).delete(e)},ke.prototype.get=function(e){return Be(this,e).get(e)},ke.prototype.has=function(e){return Be(this,e).has(e)},ke.prototype.set=function(e,t){return Be(this,e).set(e,t),this},je.prototype.add=je.prototype.push=function(e){return this.__data__.set(e,n),this},je.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.clear=function(){this.__data__=new xe},_e.prototype.delete=function(e){return this.__data__.delete(e)},_e.prototype.get=function(e){return this.__data__.get(e)},_e.prototype.has=function(e){return this.__data__.has(e)},_e.prototype.set=function(e,t){var n=this.__data__;if(n instanceof xe){var r=n.__data__;if(!se||r.length<199)return r.push([e,t]),this;n=this.__data__=new ke(r)}return n.set(e,t),this};var Me,Ce=(Me=function(e,t){return e&&Te(e,t,it)},function(e,t){if(null==e)return e;if(!Ge(e))return Me(e,t);for(var n=e.length,r=-1,a=Object(e);++r<n&&!1!==t(a[r],r,a););return e}),Te=function(e,t,n){for(var r=-1,a=Object(e),o=n(e),i=o.length;i--;){var s=o[++r];if(!1===t(a[s],s,a))break}return e};function Re(e,t){for(var n=0,r=(t=He(t,e)?[t]:De(t)).length;null!=e&&n<r;)e=e[Qe(t[n++])];return n&&n==r?e:void 0}function Oe(e,t){return null!=e&&t in Object(e)}function Ee(e,t,n,r,s){return e===t||(null==e||null==t||!nt(e)&&!rt(t)?e!=e&&t!=t:function(e,t,n,r,s,u){var m=Ze(e),y=Ze(t),k=o,j=o;m||(k=(k=$e(e))==a?h:k),y||(j=(j=$e(t))==a?h:j);var _=k==h&&!z(e),N=j==h&&!z(t),S=k==j;if(S&&!_)return u||(u=new _e),m||ot(e)?Le(e,t,n,r,s,u):function(e,t,n,r,a,o,s){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!r(new ne(e),new ne(t)));case i:case l:case d:return Ye(+e,+t);case c:return e.name==t.name&&e.message==t.message;case p:case v:return e==t+"";case f:var u=$;case g:var h=2&o;if(u||(u=V),e.size!=t.size&&!h)return!1;var m=s.get(e);if(m)return m==t;o|=1,s.set(e,t);var y=Le(u(e),u(t),r,a,o,s);return s.delete(e),y;case b:if(be)return be.call(e)==be.call(t)}return!1}(e,t,k,n,r,s,u);if(!(2&s)){var M=_&&Z.call(e,"__wrapped__"),C=N&&Z.call(t,"__wrapped__");if(M||C){var T=M?e.value():e,R=C?t.value():t;return u||(u=new _e),n(T,R,r,s,u)}}return!!S&&(u||(u=new _e),function(e,t,n,r,a,o){var i=2&a,s=it(e),l=s.length,c=it(t),u=c.length;if(l!=u&&!i)return!1;for(var f=l;f--;){var d=s[f];if(!(i?d in t:Z.call(t,d)))return!1}var h=o.get(e);if(h&&o.get(t))return h==t;var m=!0;o.set(e,t),o.set(t,e);for(var p=i;++f<l;){var g=e[d=s[f]],v=t[d];if(r)var b=i?r(v,g,d,t,e,o):r(g,v,d,e,t,o);if(!(void 0===b?g===v||n(g,v,r,a,o):b)){m=!1;break}p||(p="constructor"==d)}if(m&&!p){var y=e.constructor,w=t.constructor;y==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof w&&w instanceof w||(m=!1)}return o.delete(e),o.delete(t),m}(e,t,n,r,s,u))}(e,t,Ee,n,r,s))}function Pe(e){return!(!nt(e)||function(e){return!!Y&&Y in e}(e))&&(et(e)||z(e)?ee:M).test(qe(e))}function Fe(e){return"function"==typeof e?e:null==e?st:"object"==typeof e?Ze(e)?function(e,t){return He(e)&&We(t)?Ue(Qe(e),t):function(n){var r=function(e,t,n){var r=null==e?void 0:Re(e,t);return void 0===r?n:r}(n,e);return void 0===r&&r===t?function(e,t){return null!=e&&function(e,t,n){t=He(t,e)?[t]:De(t);for(var r,a=-1,o=t.length;++a<o;){var i=Qe(t[a]);if(!(r=null!=e&&n(e,i)))break;e=e[i]}return r||!!(o=e?e.length:0)&&tt(o)&&Ve(i,o)&&(Ze(e)||Ke(e))}(e,t,Oe)}(n,e):Ee(t,r,void 0,3)}}(e[0],e[1]):(n=function(e){for(var t=it(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,We(a)]}return t}(t=e),1==n.length&&n[0][2]?Ue(n[0][0],n[0][1]):function(e){return e===t||function(e,t,n,r){var a=n.length,o=a;if(null==e)return!o;for(e=Object(e);a--;){var i=n[a];if(i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++a<o;){var s=(i=n[a])[0],l=e[s],c=i[1];if(i[2]){if(void 0===l&&!(s in e))return!1}else if(!Ee(c,l,r,3,new _e))return!1}return!0}(e,0,n)}):He(r=e)?(a=Qe(r),function(e){return null==e?void 0:e[a]}):function(e){return function(t){return Re(t,e)}}(r);var t,n,r,a}function Ae(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||q,t!==r)return oe(e);var t,n,r,a=[];for(var o in Object(e))Z.call(e,o)&&"constructor"!=o&&a.push(o);return a}function Ie(e,t){var n=-1,r=Ge(e)?Array(e.length):[];return Ce(e,function(e,a,o){r[++n]=t(e,a,o)}),r}function De(e){return Ze(e)?e:Je(e)}function Le(e,t,n,r,a,o){var i=2&a,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var u=-1,f=!0,d=1&a?new je:void 0;for(o.set(e,t),o.set(t,e);++u<s;){var h=e[u],m=t[u];if(r)var p=i?r(m,h,u,t,e,o):r(h,m,u,e,t,o);if(void 0!==p){if(p)continue;f=!1;break}if(d){if(!B(t,function(e,t){if(!d.has(t)&&(h===e||n(h,e,r,a,o)))return d.add(t)})){f=!1;break}}else if(h!==m&&!n(h,m,r,a,o)){f=!1;break}}return o.delete(e),o.delete(t),f}function Be(e,t){var n,r,a=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?a["string"==typeof t?"string":"hash"]:a.map}function ze(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Pe(n)?n:void 0}var $e=function(e){return G.call(e)};function Ve(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||C.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t){if(Ze(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!at(e))||j.test(e)||!k.test(e)||null!=t&&e in Object(t)}function We(e){return e==e&&!nt(e)}function Ue(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}(ie&&$e(new ie(new ArrayBuffer(1)))!=x||se&&$e(new se)!=f||le&&$e(le.resolve())!=m||ce&&$e(new ce)!=g||ue&&$e(new ue)!=y)&&($e=function(e){var t=G.call(e),n=t==h?e.constructor:void 0,r=n?qe(n):void 0;if(r)switch(r){case de:return x;case he:return f;case me:return m;case pe:return g;case ge:return y}return t});var Je=Xe(function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(at(e))return ye?ye.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var n=[];return _.test(e)&&n.push(""),e.replace(N,function(e,t,r,a){n.push(r?a.replace(S,"$1"):t||e)}),n});function Qe(e){if("string"==typeof e||at(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function qe(e){if(null!=e){try{return K.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Xe(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new(Xe.Cache||ke),n}function Ye(e,t){return e===t||e!=e&&t!=t}function Ke(e){return function(e){return rt(e)&&Ge(e)}(e)&&Z.call(e,"callee")&&(!re.call(e,"callee")||G.call(e)==a)}Xe.Cache=ke;var Ze=Array.isArray;function Ge(e){return null!=e&&tt(e.length)&&!et(e)}function et(e){var t=nt(e)?G.call(e):"";return t==u||"[object GeneratorFunction]"==t}function tt(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function nt(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function rt(e){return!!e&&"object"==typeof e}function at(e){return"symbol"==typeof e||rt(e)&&G.call(e)==b}var ot=D?function(e){return function(t){return e(t)}}(D):function(e){return rt(e)&&tt(e.length)&&!!T[G.call(e)]};function it(e){return Ge(e)?Ne(e):Ae(e)}function st(e){return e}e.exports=function(e,t){return(Ze(e)?L:Ie)(e,Fe(t))}}(nh,nh.exports)),nh.exports),ah=l(rh);exports.Box=function(t){const{children:n,noPadding:r,className:a="",theme:o="dark"}=t,i=r?"":Hr.padding;return e.jsx("div",{className:`${Hr.box} ${i} ${a}`,"data-theme":o,children:n})},exports.DefaultPalette=Xl,exports.Flamegraph=us,exports.FlamegraphI18nProvider=ac,exports.FlamegraphRenderer=n=>{const{i18n:r,locale:a,colorMode:o="light",sandwich:i=!0,...s}=n,l=t.useMemo(()=>Yd(a,r),[a,r]),c=t.useMemo(()=>(e=>{switch(e){case"dark":return"ps-theme-dark";case"kylin":return"ps-theme-kylin";default:return"ps-theme-light"}})(o),[o]);return e.jsx("pyro-flamegraph",{className:c,children:e.jsx(ac,{messages:l,children:e.jsx(qd,{...Xd,enableSandwichView:i,...s})})})},exports.convertJaegerTraceToProfile=function(e){const t={numTicks:0,maxSelf:0,names:[],levels:[]},n={},r={children:[]};return e.spans.forEach(e=>{e.children=[],n[e.spanID]=e}),e.spans.forEach(e=>{let t=r;e.references&&e.references.length>0&&(t=n[e.references[0].spanID]||r),t.children.push(e)}),function e(t,n){(t.children||[]).forEach(t=>e(t));let r=0;const a=th(t.children||[],e=>e.operationName);t.children=ah(a,e=>{const t=e[0];for(let n=1;n<e.length;n+=1)t.duration+=e[n].duration;return r+=t.duration,t}),t.total=t.duration||r,t.self=Math.max(0,t.total-r)}(r),function n(r,a,o){var i;return t.numTicks||(t.numTicks=r.total),(i=t.levels)[a]||(i[a]=[]),t.levels[a].push(o),t.levels[a].push(r.total),t.levels[a].push(r.self),t.names.push((r.processID?`${e.processes[r.processID].serviceName}: `:"")+(r.operationName||"total")),t.levels[a].push(t.names.length-1),(r.children||[]).forEach(e=>{o+=n(e,a+1,o)}),r.total}(r,0,0),t.levels=Ud("single",t.levels),{version:1,flamebearer:t,metadata:{format:"single",units:"trace_samples",spyName:"tracing",sampleRate:1e6}}},exports.diffTwoProfiles=function(e,t){e.flamebearer.levels=Jd("single",e.flamebearer.levels),t.flamebearer.levels=Jd("single",t.flamebearer.levels);const n=function(e,t){const n={format:"double",numTicks:e.numTicks+t.numTicks,leftTicks:e.numTicks,rightTicks:t.numTicks,maxSelf:100,sampleRate:e.sampleRate,names:[],levels:[],units:e.units,spyName:e.spyName},r=Cd(e,t),a=(e,t,r,o)=>{var i;const{name:s,children:l,self:c,total:u}=e;n.names.push(s),(i=n.levels)[t]||(i[t]=[]),n.maxSelf=Math.max(n.maxSelf,c[0]||0,c[1]||0),n.levels[t]=n.levels[t].concat([r,u[0]||0,c[0]||0,o,u[1]||0,c[1]||0,n.names.length-1]);for(let e=0;e<l.length;e+=1){const[n,i]=a(l[e],t+1,r,o);r+=n,o+=i}return[u[0]||0,u[1]||0]};return a(r,0,0,0),n}(e.flamebearer,t.flamebearer);n.levels=Ud("double",n.levels);const r={...e.metadata};return r.format="double",{version:1,flamebearer:n,metadata:r,leftTicks:e.flamebearer.numTicks,rightTicks:t.flamebearer.numTicks}},exports.flamegraphDefaultMessages=ec,exports.flamegraphZhCNMessages=tc;
18
18
  //# sourceMappingURL=index.node.cjs.js.map