@kylincloud/flamegraph 0.35.29 → 0.36.0
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.
- package/CHANGELOG.md +7 -0
- package/dist/FlameGraph/FlameGraphComponent/index.d.ts.map +1 -1
- package/dist/ProfilerTable.d.ts.map +1 -1
- package/dist/flamegraphRenderWorker.js +1 -1
- package/dist/flamegraphRenderWorker.js.map +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.node.cjs.js +2 -2
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.esm.js +4 -4
- package/dist/index.node.esm.js.map +1 -1
- package/dist/workers/createFlamegraphRenderWorker.d.ts.map +1 -1
- package/dist/workers/profilerTableWorker.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/FlameGraph/FlameGraphComponent/index.tsx +0 -31
- package/src/ProfilerTable.tsx +0 -42
- package/src/workers/createFlamegraphRenderWorker.ts +20 -4
- package/src/workers/flamegraphRenderWorker.ts +0 -6
- package/src/workers/profilerTableWorker.ts +0 -26
package/dist/index.node.cjs.js
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
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 x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function w(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,_(a.key),a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=M(e))||t){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r}}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 j(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function S(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach(function(t){j(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function C(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 a,r,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=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw r}}return s}}(e,t)||M(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 T(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||M(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 _(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}function M(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}var F=function(){},P={},I={},E=null,B={mark:F,measure:F};try{"undefined"!=typeof window&&(P=window),"undefined"!=typeof document&&(I=document),"undefined"!=typeof MutationObserver&&(E=MutationObserver),"undefined"!=typeof performance&&(B=performance)}catch(ie){}var D=(P.navigator||{}).userAgent,L=void 0===D?"":D,A=P,O=I,z=E,$=B;A.document;var V,H=!!O.documentElement&&!!O.head&&"function"==typeof O.addEventListener&&"function"==typeof O.createElement,W=~L.indexOf("MSIE")||~L.indexOf("Trident/"),U={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"}},Q=["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"],J="classic",q="duotone",X="sharp",Y="sharp-duotone",Z="chisel",G="etch",K="jelly",ee="jelly-duo",te="jelly-fill",ne="notdog",ae="notdog-duo",re="slab",oe="slab-press",ie="thumbprint",se="utility",le="utility-duo",ce="utility-fill",ue="whiteboard",fe=[J,q,X,Y,Z,G,K,ee,te,ne,ae,re,oe,ie,se,le,ce,ue];j(j(j(j(j(j(j(j(j(j(V={},J,"Classic"),q,"Duotone"),X,"Sharp"),Y,"Sharp Duotone"),Z,"Chisel"),G,"Etch"),K,"Jelly"),ee,"Jelly Duo"),te,"Jelly Fill"),ne,"Notdog"),j(j(j(j(j(j(j(j(V,ae,"Notdog Duo"),re,"Slab"),oe,"Slab Press"),ie,"Thumbprint"),se,"Utility"),le,"Utility Duo"),ce,"Utility Fill"),ue,"Whiteboard");var de=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}]]),he=["fak","fa-kit","fakd","fa-kit-duotone"],me={fak:"kit","fa-kit":"kit"},pe={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"};j(j({},"kit","Kit"),"kit-duotone","Kit Duotone");var ge,ve={kit:"fak"},be={"kit-duotone":"fakd"},ye="duotone-group",xe="swap-opacity",we="primary",ke="secondary";j(j(j(j(j(j(j(j(j(j(ge={},"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"),j(j(j(j(j(j(j(j(ge,"notdog-duo","Notdog Duo"),"slab","Slab"),"slab-press","Slab Press"),"thumbprint","Thumbprint"),"utility","Utility"),"utility-duo","Utility Duo"),"utility-fill","Utility Fill"),"whiteboard","Whiteboard");j(j({},"kit","Kit"),"kit-duotone","Kit Duotone");var je={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"}},Ne=["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"]),Se=[1,2,3,4,5,6,7,8,9,10],Ce=Se.concat([11,12,13,14,15,16,17,18,19,20]),Te=[].concat(T(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",ye,xe,we,ke]).concat(Se.map(function(e){return"".concat(e,"x")})).concat(Ce.map(function(e){return"w-".concat(e)})),_e="___FONT_AWESOME___",Re="svg-inline--fa",Me="data-fa-i2svg",Fe="data-fa-pseudo-element",Pe="data-prefix",Ie="data-icon",Ee="fontawesome-i2svg",Be=["HTML","HEAD","STYLE","SCRIPT"],De=["::before","::after",":before",":after"],Le=function(){try{return"production"===process.env.NODE_ENV}catch(e){return!1}}();function Ae(e){return new Proxy(e,{get:function(e,t){return t in e?e[t]:e[J]}})}var Oe=S({},U);Oe[J]=S(S(S(S({},{"fa-duotone":"duotone"}),U[J]),me),pe);var ze=Ae(Oe),$e=S({},{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"}});$e[J]=S(S(S(S({},{duotone:"fad"}),$e[J]),ve),be);var Ve=Ae($e),He=S({},je);He[J]=S(S({},He[J]),{fak:"fa-kit"});var We=Ae(He),Ue=S({},{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"}});Ue[J]=S(S({},Ue[J]),{"fa-kit":"fak"}),Ae(Ue);var Qe=/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)?[\-\ ]/,Je="fa-layers-text",qe=/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;Ae(S({},{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 Xe=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Ye={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Ze=[].concat(T(["kit"]),T(Te)),Ge=A.FontAwesomeConfig||{};if(O&&"function"==typeof O.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=C(e,2),n=t[0],a=t[1],r=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=O.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(n));null!=r&&(Ge[a]=r)})}var Ke={styleDefault:"solid",familyDefault:J,cssPrefix:"fa",replacementClass:Re,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Ge.familyPrefix&&(Ge.cssPrefix=Ge.familyPrefix);var et=S(S({},Ke),Ge);et.autoReplaceSvg||(et.observeMutations=!1);var tt={};Object.keys(Ke).forEach(function(e){Object.defineProperty(tt,e,{enumerable:!0,set:function(t){et[e]=t,nt.forEach(function(e){return e(tt)})},get:function(){return et[e]}})}),Object.defineProperty(tt,"familyPrefix",{enumerable:!0,set:function(e){et.cssPrefix=e,nt.forEach(function(e){return e(tt)})},get:function(){return et.cssPrefix}}),A.FontAwesomeConfig=tt;var nt=[];var at=16,rt={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function ot(){for(var e=12,t="";e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function it(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function st(e){return e.classList?it(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function lt(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function ct(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function ut(e){return e.size!==rt.size||e.x!==rt.x||e.y!==rt.y||e.rotate!==rt.rotate||e.flipX||e.flipY}function ft(){var e="fa",t=Re,n=tt.cssPrefix,a=tt.replacementClass,r=':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||a!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),i=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");r=r.replace(o,".".concat(n,"-")).replace(i,"--".concat(n,"-")).replace(s,".".concat(a))}return r}var dt=!1;function ht(){tt.autoAddCss&&!dt&&(!function(e){if(e&&H){var t=O.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=O.head.childNodes,a=null,r=n.length-1;r>-1;r--){var o=n[r],i=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(a=o)}O.head.insertBefore(t,a)}}(ft()),dt=!0)}var mt={mixout:function(){return{dom:{css:ft,insertCss:ht}}},hooks:function(){return{beforeDOMElementCreation:function(){ht()},beforeI2svg:function(){ht()}}}},pt=A||{};pt[_e]||(pt[_e]={}),pt[_e].styles||(pt[_e].styles={}),pt[_e].hooks||(pt[_e].hooks={}),pt[_e].shims||(pt[_e].shims=[]);var gt=pt[_e],vt=[],bt=function(){O.removeEventListener("DOMContentLoaded",bt),yt=1,vt.map(function(e){return e()})},yt=!1;function xt(e){var t=e.tag,n=e.attributes,a=void 0===n?{}:n,r=e.children,o=void 0===r?[]:r;return"string"==typeof e?lt(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(lt(e[n]),'" ')},"").trim()}(a),">").concat(o.map(xt).join(""),"</").concat(t,">")}function wt(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}H&&((yt=(O.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(O.readyState))||O.addEventListener("DOMContentLoaded",bt));var kt=function(e,t,n,a){var r,o,i,s=Object.keys(e),l=s.length,c=t;for(void 0===n?(r=1,i=e[s[0]]):(r=0,i=n);r<l;r++)i=c(i,e[o=s[r]],o,e);return i};function jt(e){return 1!==T(e).length?null:e.codePointAt(0).toString(16)}function Nt(e){return Object.keys(e).reduce(function(t,n){var a=e[n];return!!a.icon?t[a.iconName]=a.icon:t[n]=a,t},{})}function St(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).skipHooks,a=void 0!==n&&n,r=Nt(t);"function"!=typeof gt.hooks.addPack||a?gt.styles[e]=S(S({},gt.styles[e]||{}),r):gt.hooks.addPack(e,Nt(t)),"fas"===e&&St("fa",t)}var Ct=gt.styles,Tt=gt.shims,_t=Object.keys(We),Rt=_t.reduce(function(e,t){return e[t]=Object.keys(We[t]),e},{}),Mt=null,Ft={},Pt={},It={},Et={},Bt={};function Dt(e,t){var n,a=t.split("-"),r=a[0],o=a.slice(1).join("-");return r!==e||""===o||(n=o,~Ze.indexOf(n))?null:o}var Lt,At=function(){var e=function(e){return kt(Ct,function(t,n,a){return t[a]=kt(n,e,{}),t},{})};Ft=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}),Pt=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}),Bt=e(function(e,t,n){var a=t[2];return e[n]=n,a.forEach(function(t){e[t]=n}),e});var t="far"in Ct||tt.autoFetchSvg,n=kt(Tt,function(e,n){var a=n[0],r=n[1],o=n[2];return"far"!==r||t||(r="fas"),"string"==typeof a&&(e.names[a]={prefix:r,iconName:o}),"number"==typeof a&&(e.unicodes[a.toString(16)]={prefix:r,iconName:o}),e},{names:{},unicodes:{}});It=n.names,Et=n.unicodes,Mt=Ht(tt.styleDefault,{family:tt.familyDefault})};function Ot(e,t){return(Ft[e]||{})[t]}function zt(e,t){return(Bt[e]||{})[t]}function $t(e){return It[e]||{prefix:null,iconName:null}}function Vt(){return Mt}Lt=function(e){Mt=Ht(e.styleDefault,{family:tt.familyDefault})},nt.push(Lt),At();function Ht(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).family,n=void 0===t?J:t,a=ze[n][e];if(n===q&&!e)return"fad";var r=Ve[n][e]||Ve[n][a],o=e in gt.styles?e:null;return r||o||null}function Wt(e){return e.sort().filter(function(e,t,n){return n.indexOf(e)===t})}var Ut=Ne.concat(he);function Qt(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).skipLookups,n=void 0!==t&&t,a=null,r=Wt(e.filter(function(e){return Ut.includes(e)})),o=Wt(e.filter(function(e){return!Ut.includes(e)})),i=C(r.filter(function(e){return a=e,!Q.includes(e)}),1)[0],s=void 0===i?null:i,l=function(e){var t=J,n=_t.reduce(function(e,t){return e[t]="".concat(tt.cssPrefix,"-").concat(t),e},{});return fe.forEach(function(a){(e.includes(n[a])||e.some(function(e){return Rt[a].includes(e)}))&&(t=a)}),t}(r),c=S(S({},function(e){var t=[],n=null;return e.forEach(function(e){var a=Dt(tt.cssPrefix,e);a?n=a:e&&t.push(e)}),{iconName:n,rest:t}}(o)),{},{prefix:Ht(s,{family:l})});return S(S(S({},c),function(e){var t=e.values,n=e.family,a=e.canonical,r=e.givenPrefix,o=void 0===r?"":r,i=e.styles,s=void 0===i?{}:i,l=e.config,c=void 0===l?{}:l,u=n===q,f=t.includes("fa-duotone")||t.includes("fad"),d="duotone"===c.familyDefault,h="fad"===a.prefix||"fa-duotone"===a.prefix;!u&&(f||d||h)&&(a.prefix="fad");(t.includes("fa-brands")||t.includes("fab"))&&(a.prefix="fab");if(!a.prefix&&Jt.includes(n)){if(Object.keys(s).find(function(e){return qt.includes(e)})||c.autoFetchSvg){var m=de.get(n).defaultShortPrefixId;a.prefix=m,a.iconName=zt(a.prefix,a.iconName)||a.iconName}}"fa"!==a.prefix&&"fa"!==o||(a.prefix=Vt()||"fas");return a}({values:e,family:l,styles:Ct,config:tt,canonical:c,givenPrefix:a})),function(e,t,n){var a=n.prefix,r=n.iconName;if(e||!a||!r)return{prefix:a,iconName:r};var o="fa"===t?$t(r):{},i=zt(a,r);r=o.iconName||i||r,"far"!==(a=o.prefix||a)||Ct.far||!Ct.fas||tt.autoFetchSvg||(a="fas");return{prefix:a,iconName:r}}(n,a,c))}var Jt=fe.filter(function(e){return e!==J||e!==q}),qt=Object.keys(je).filter(function(e){return e!==J}).map(function(e){return Object.keys(je[e])}).flat();var Xt=function(){return w(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),a=0;a<t;a++)n[a]=arguments[a];var r=n.reduce(this._pullDefinitions,{});Object.keys(r).forEach(function(t){e.definitions[t]=S(S({},e.definitions[t]||{}),r[t]),St(t,r[t]);var n=We[J][t];n&&St(n,r[t]),At()})}},{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 a=n[t],r=a.prefix,o=a.iconName,i=a.icon,s=i[2];e[r]||(e[r]={}),s.length>0&&s.forEach(function(t){"string"==typeof t&&(e[r][t]=i)}),e[r][o]=i}),e}}])}(),Yt=[],Zt={},Gt={},Kt=Object.keys(Gt);function en(e,t){for(var n=arguments.length,a=new Array(n>2?n-2:0),r=2;r<n;r++)a[r-2]=arguments[r];return(Zt[e]||[]).forEach(function(e){t=e.apply(null,[t].concat(a))}),t}function tn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];(Zt[e]||[]).forEach(function(e){e.apply(null,n)})}function nn(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Gt[e]?Gt[e].apply(null,t):void 0}function an(e){"fa"===e.prefix&&(e.prefix="fas");var t=e.iconName,n=e.prefix||Vt();if(t)return t=zt(n,t)||t,wt(rn.definitions,n,t)||wt(gt.styles,n,t)}var rn=new Xt,on={i2svg:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return H?(tn("beforeI2svg",e),nn("pseudoElements2svg",e),nn("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===tt.autoReplaceSvg&&(tt.autoReplaceSvg=!0),tt.observeMutations=!0,e=function(){ln({autoReplaceSvgRoot:n}),tn("watch",t)},H&&(yt?setTimeout(e,0):vt.push(e))}},sn={noAuto:function(){tt.autoReplaceSvg=!1,tt.observeMutations=!1,tn("noAuto")},config:tt,dom:on,parse:{icon:function(e){if(null===e)return null;if("object"===R(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:zt(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=Ht(e[0]);return{prefix:n,iconName:zt(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(tt.cssPrefix,"-"))>-1||e.match(Qe))){var a=Qt(e.split(" "),{skipLookups:!0});return{prefix:a.prefix||Vt(),iconName:zt(a.prefix,a.iconName)||a.iconName}}if("string"==typeof e){var r=Vt();return{prefix:r,iconName:zt(r,e)||e}}}},library:rn,findIconDefinition:an,toHtml:xt},ln=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).autoReplaceSvgRoot,t=void 0===e?O:e;(Object.keys(gt.styles).length>0||tt.autoFetchSvg)&&H&&tt.autoReplaceSvg&&sn.dom.i2svg({node:t})};function cn(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return xt(e)})}}),Object.defineProperty(e,"node",{get:function(){if(H){var t=O.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function un(e){var t=e.icons,n=t.main,a=t.mask,r=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=a.found?a:n,h=d.width,m=d.height,p=[tt.replacementClass,o?"".concat(tt.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:S(S({},c.attributes),{},{"data-prefix":r,"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[Me]="");var v=S(S({},g),{},{prefix:r,iconName:o,main:n,mask:a,maskId:l,transform:i,symbol:s,styles:S({},c.styles)}),b=a.found&&n.found?nn("generateAbstractMask",v)||{children:[],attributes:{}}:nn("generateAbstractIcon",v)||{children:[],attributes:{}},y=b.children,x=b.attributes;return v.children=y,v.attributes=x,s?function(e){var t=e.prefix,n=e.iconName,a=e.children,r=e.attributes,o=e.symbol,i=!0===o?"".concat(t,"-").concat(tt.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:S(S({},r),{},{id:i}),children:a}]}]}(v):function(e){var t=e.children,n=e.main,a=e.mask,r=e.attributes,o=e.styles,i=e.transform;if(ut(i)&&n.found&&!a.found){var s={x:n.width/n.height/2,y:.5};r.style=ct(S(S({},o),{},{"transform-origin":"".concat(s.x+i.x/16,"em ").concat(s.y+i.y/16,"em")}))}return[{tag:"svg",attributes:r,children:t}]}(v)}function fn(e){var t=e.content,n=e.width,a=e.height,r=e.transform,o=e.extra,i=e.watchable,s=void 0!==i&&i,l=S(S({},o.attributes),{},{class:o.classes.join(" ")});s&&(l[Me]="");var c=S({},o.styles);ut(r)&&(c.transform=function(e){var t=e.transform,n=e.width,a=void 0===n?16:n,r=e.height,o=void 0===r?16:r,i="";return i+=W?"translate(".concat(t.x/at-a/2,"em, ").concat(t.y/at-o/2,"em) "):"translate(calc(-50% + ".concat(t.x/at,"em), calc(-50% + ").concat(t.y/at,"em)) "),i+="scale(".concat(t.size/at*(t.flipX?-1:1),", ").concat(t.size/at*(t.flipY?-1:1),") "),i+"rotate(".concat(t.rotate,"deg) ")}({transform:r,width:n,height:a}),c["-webkit-transform"]=c.transform);var u=ct(c);u.length>0&&(l.style=u);var f=[];return f.push({tag:"span",attributes:l,children:[t]}),f}var dn=gt.styles;function hn(e){var t=e[0],n=e[1],a=C(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(a)?{tag:"g",attributes:{class:"".concat(tt.cssPrefix,"-").concat(Ye.GROUP)},children:[{tag:"path",attributes:{class:"".concat(tt.cssPrefix,"-").concat(Ye.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(tt.cssPrefix,"-").concat(Ye.PRIMARY),fill:"currentColor",d:a[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:a}}}}var mn={found:!1,width:512,height:512};function pn(e,t){var n=t;return"fa"===t&&null!==tt.styleDefault&&(t=Vt()),new Promise(function(a,r){if("fa"===n){var o=$t(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&dn[t]&&dn[t][e])return a(hn(dn[t][e]));!function(e,t){Le||tt.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),a(S(S({},mn),{},{icon:tt.showMissingIcons&&e&&nn("missingIconAbstract")||{}}))})}var gn=function(){},vn=tt.measurePerformance&&$&&$.mark&&$.measure?$:{mark:gn,measure:gn},bn='FA "7.1.0"',yn=function(e){vn.mark("".concat(bn," ").concat(e," ends")),vn.measure("".concat(bn," ").concat(e),"".concat(bn," ").concat(e," begins"),"".concat(bn," ").concat(e," ends"))},xn=function(e){return vn.mark("".concat(bn," ").concat(e," begins")),function(){return yn(e)}},wn=function(){};function kn(e){return"string"==typeof(e.getAttribute?e.getAttribute(Me):null)}function jn(e){return O.createElementNS("http://www.w3.org/2000/svg",e)}function Nn(e){return O.createElement(e)}function Sn(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).ceFn,n=void 0===t?"svg"===e.tag?jn:Nn:t;if("string"==typeof e)return O.createTextNode(e);var a=n(e.tag);return Object.keys(e.attributes||[]).forEach(function(t){a.setAttribute(t,e.attributes[t])}),(e.children||[]).forEach(function(e){a.appendChild(Sn(e,{ceFn:n}))}),a}var Cn={replace:function(e){var t=e[0];if(t.parentNode)if(e[1].forEach(function(e){t.parentNode.insertBefore(Sn(e),t)}),null===t.getAttribute(Me)&&tt.keepOriginalSource){var n=O.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(~st(t).indexOf(tt.replacementClass))return Cn.replace(e);var a=new RegExp("".concat(tt.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var r=n[0].attributes.class.split(" ").reduce(function(e,t){return t===tt.replacementClass||t.match(a)?e.toSvg.push(t):e.toNode.push(t),e},{toNode:[],toSvg:[]});n[0].attributes.class=r.toSvg.join(" "),0===r.toNode.length?t.removeAttribute("class"):t.setAttribute("class",r.toNode.join(" "))}var o=n.map(function(e){return xt(e)}).join("\n");t.setAttribute(Me,""),t.innerHTML=o}};function Tn(e){e()}function _n(e,t){var n="function"==typeof t?t:wn;if(0===e.length)n();else{var a=Tn;"async"===tt.mutateApproach&&(a=A.requestAnimationFrame||Tn),a(function(){var t=!0===tt.autoReplaceSvg?Cn.replace:Cn[tt.autoReplaceSvg]||Cn.replace,a=xn("mutate");e.map(t),a(),n()})}}var Rn=!1;function Mn(){Rn=!0}function Fn(){Rn=!1}var Pn=null;function In(e){if(z&&tt.observeMutations){var t=e.treeCallback,n=void 0===t?wn:t,a=e.nodeCallback,r=void 0===a?wn:a,o=e.pseudoElementsCallback,i=void 0===o?wn:o,s=e.observeMutationsRoot,l=void 0===s?O:s;Pn=new z(function(e){if(!Rn){var t=Vt();it(e).forEach(function(e){if("childList"===e.type&&e.addedNodes.length>0&&!kn(e.addedNodes[0])&&(tt.searchPseudoElements&&i(e.target),n(e.target)),"attributes"===e.type&&e.target.parentNode&&tt.searchPseudoElements&&i([e.target],!0),"attributes"===e.type&&kn(e.target)&&~Xe.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){var t=e.getAttribute?e.getAttribute(Pe):null,n=e.getAttribute?e.getAttribute(Ie):null;return t&&n}(e.target)){var a=Qt(st(e.target)),o=a.prefix,s=a.iconName;e.target.setAttribute(Pe,o||t),s&&e.target.setAttribute(Ie,s)}else(l=e.target)&&l.classList&&l.classList.contains&&l.classList.contains(tt.replacementClass)&&r(e.target);var l})}}),H&&Pn.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function En(e){var t,n,a=e.getAttribute("data-prefix"),r=e.getAttribute("data-icon"),o=void 0!==e.innerText?e.innerText.trim():"",i=Qt(st(e));return i.prefix||(i.prefix=Vt()),a&&r&&(i.prefix=a,i.iconName=r),i.iconName&&i.prefix||(i.prefix&&o.length>0&&(i.iconName=(t=i.prefix,n=e.innerText,(Pt[t]||{})[n]||Ot(i.prefix,jt(e.innerText)))),!i.iconName&&tt.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function Bn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},n=En(e),a=n.iconName,r=n.prefix,o=n.rest,i=function(e){return it(e.attributes).reduce(function(e,t){return"class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e},{})}(e),s=en("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(":"),a=n[0],r=n.slice(1);return a&&r.length>0&&(e[a]=r.join(":").trim()),e},{})),n}(e):[];return S({iconName:a,prefix:r,transform:rt,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:i}},s)}var Dn=gt.styles;function Ln(e){var t="nest"===tt.autoReplaceSvg?Bn(e,{styleParser:!1}):Bn(e);return~t.extra.classes.indexOf(Je)?nn("generateLayersText",e,t):nn("generateSvgReplacementMutation",e,t)}function An(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!H)return Promise.resolve();var n=O.documentElement.classList,a=function(e){return n.add("".concat(Ee,"-").concat(e))},r=function(e){return n.remove("".concat(Ee,"-").concat(e))},o=tt.autoFetchSvg?[].concat(T(he),T(Ne)):Q.concat(Object.keys(Dn));o.includes("fa")||o.push("fa");var i=[".".concat(Je,":not([").concat(Me,"])")].concat(o.map(function(e){return".".concat(e,":not([").concat(Me,"])")})).join(", ");if(0===i.length)return Promise.resolve();var s=[];try{s=it(e.querySelectorAll(i))}catch(e){}if(!(s.length>0))return Promise.resolve();a("pending"),r("complete");var l=xn("onTree"),c=s.reduce(function(e,t){try{var n=Ln(t);n&&e.push(n)}catch(e){Le||"MissingIcon"===e.name&&console.error(e)}return e},[]);return new Promise(function(e,n){Promise.all(c).then(function(n){_n(n,function(){a("active"),a("complete"),r("pending"),"function"==typeof t&&t(),l(),e()})}).catch(function(e){l(),n(e)})})}function On(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Ln(e).then(function(e){e&&_n([e],t)})}var zn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,a=void 0===n?rt:n,r=t.symbol,o=void 0!==r&&r,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 cn(S({type:"icon"},e),function(){return tn("beforeDOMElementCreation",{iconDefinition:e,params:t}),un({icons:{main:hn(b),mask:s?hn(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:g,iconName:v,transform:S(S({},rt),a),symbol:o,maskId:c,extra:{attributes:h,styles:p,classes:f}})})}},$n={mixout:function(){return{icon:(e=zn,function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=(t||{}).icon?t:an(t||{}),r=n.mask;return r&&(r=(r||{}).icon?r:an(r||{})),e(a,S(S({},n),{},{mask:r}))})};var e},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=An,e.nodeCallback=On,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,n=void 0===t?O:t,a=e.callback;return An(n,void 0===a?function(){}:a)},e.generateSvgReplacementMutation=function(e,t){var n=t.iconName,a=t.prefix,r=t.transform,o=t.symbol,i=t.mask,s=t.maskId,l=t.extra;return new Promise(function(t,c){Promise.all([pn(n,a),i.iconName?pn(i.iconName,i.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(i){var c=C(i,2),u=c[0],f=c[1];t([e,un({icons:{main:u,mask:f},prefix:a,iconName:n,transform:r,symbol:o,maskId:s,extra:l,watchable:!0})])}).catch(c)})},e.generateAbstractIcon=function(e){var t,n=e.children,a=e.attributes,r=e.main,o=e.transform,i=ct(e.styles);return i.length>0&&(a.style=i),ut(o)&&(t=nn("generateAbstractTransformGrouping",{main:r,transform:o,containerWidth:r.width,iconWidth:r.width})),n.push(t||r.icon),{children:n,attributes:a}}}},Vn={mixout:function(){return{layer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.classes,a=void 0===n?[]:n;return cn({type:"layer"},function(){tn("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(tt.cssPrefix,"-layers")].concat(T(a)).join(" ")},children:n}]})}}}},Hn={mixout:function(){return{counter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.title;var n=t.classes,a=void 0===n?[]:n,r=t.attributes,o=void 0===r?{}:r,i=t.styles,s=void 0===i?{}:i;return cn({type:"counter",content:e},function(){return tn("beforeDOMElementCreation",{content:e,params:t}),function(e){var t=e.content,n=e.extra,a=S(S({},n.attributes),{},{class:n.classes.join(" ")}),r=ct(n.styles);r.length>0&&(a.style=r);var o=[];return o.push({tag:"span",attributes:a,children:[t]}),o}({content:e.toString(),extra:{attributes:o,styles:s,classes:["".concat(tt.cssPrefix,"-layers-counter")].concat(T(a))}})})}}}},Wn={mixout:function(){return{text:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,a=void 0===n?rt:n,r=t.classes,o=void 0===r?[]:r,i=t.attributes,s=void 0===i?{}:i,l=t.styles,c=void 0===l?{}:l;return cn({type:"text",content:e},function(){return tn("beforeDOMElementCreation",{content:e,params:t}),fn({content:e,transform:S(S({},rt),a),extra:{attributes:s,styles:c,classes:["".concat(tt.cssPrefix,"-layers-text")].concat(T(o))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var n=t.transform,a=t.extra,r=null,o=null;if(W){var i=parseInt(getComputedStyle(e).fontSize,10),s=e.getBoundingClientRect();r=s.width/i,o=s.height/i}return Promise.resolve([e,fn({content:e.innerHTML,width:r,height:o,transform:n,extra:a,watchable:!0})])}}},Un=new RegExp('"',"ug"),Qn=[1105920,1112319],Jn=S(S(S(S({},{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"}}),qn=Object.keys(Jn).reduce(function(e,t){return e[t.toLowerCase()]=Jn[t],e},{}),Xn=Object.keys(qn).reduce(function(e,t){var n=qn[t];return e[t]=n[900]||T(Object.entries(n))[0][1],e},{});function Yn(e,t){var n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(function(a,r){if(null!==e.getAttribute(n))return a();var o,i,s,l=it(e.children).filter(function(e){return e.getAttribute(Fe)===t})[0],c=A.getComputedStyle(e,t),u=c.getPropertyValue("font-family"),f=u.match(qe),d=c.getPropertyValue("font-weight"),h=c.getPropertyValue("content");if(l&&!f)return e.removeChild(l),a();if(f&&"none"!==h&&""!==h){var m=c.getPropertyValue("content"),p=function(e,t){var n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),a=parseInt(t),r=isNaN(a)?"normal":a;return(qn[n]||{})[r]||Xn[n]}(u,d),g=function(e){return jt(T(e.replace(Un,""))[0]||"")}(m),v=f[0].startsWith("FontAwesome"),b=function(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),n=e.getPropertyValue("content").replace(Un,""),a=n.codePointAt(0),r=a>=Qn[0]&&a<=Qn[1],o=2===n.length&&n[0]===n[1];return r||o||t}(c),y=Ot(p,g),x=y;if(v){var w=(i=Et[o=g],s=Ot("fas",o),i||(s?{prefix:"fas",iconName:s}:null)||{prefix:null,iconName:null});w.iconName&&w.prefix&&(y=w.iconName,p=w.prefix)}if(!y||b||l&&l.getAttribute(Pe)===p&&l.getAttribute(Ie)===x)a();else{e.setAttribute(n,x),l&&e.removeChild(l);var k={iconName:null,prefix:null,transform:rt,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},j=k.extra;j.attributes[Fe]=t,pn(y,p).then(function(r){var o=un(S(S({},k),{},{icons:{main:r,mask:{prefix:null,iconName:null,rest:[]}},prefix:p,iconName:x,extra:j,watchable:!0})),i=O.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 xt(e)}).join("\n"),e.removeAttribute(n),a()}).catch(r)}}else a()})}function Zn(e){return Promise.all([Yn(e,"::before"),Yn(e,"::after")])}function Gn(e){return!(e.parentNode===document.head||~Be.indexOf(e.tagName.toUpperCase())||e.getAttribute(Fe)||e.parentNode&&"svg"===e.parentNode.tagName)}var Kn=function(e){return!!e&&De.some(function(t){return e.includes(t)})},ea=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 a,r=k(n);try{for(r.s();!(a=r.n()).done;){var o=a.value;if(Kn(o)){var i=De.reduce(function(e,t){return e.replace(t,"")},o);""!==i&&"*"!==i&&t.add(i)}}}catch(e){r.e(e)}finally{r.f()}return t};function ta(e){if(H){var t;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])t=e;else if(tt.searchPseudoElementsFullScan)t=e.querySelectorAll("*");else{var n,a=new Set,r=k(document.styleSheets);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{var i,s=k(o.cssRules);try{for(s.s();!(i=s.n()).done;){var l,c=i.value,u=k(ea(c.selectorText));try{for(u.s();!(l=u.n()).done;){var f=l.value;a.add(f)}}catch(e){u.e(e)}finally{u.f()}}}catch(e){s.e(e)}finally{s.f()}}catch(e){tt.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){r.e(e)}finally{r.f()}if(!a.size)return;var d=Array.from(a).join(", ");try{t=e.querySelectorAll(d)}catch(e){}}return new Promise(function(e,n){var a=it(t).filter(Gn).map(Zn),r=xn("searchPseudoElements");Mn(),Promise.all(a).then(function(){r(),Fn(),e()}).catch(function(){r(),Fn(),n()})})}}var na={hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=ta,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node,n=void 0===t?O:t;tt.searchPseudoElements&&ta(n)}}},aa=!1,ra=function(e){return e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),a=n[0],r=n.slice(1).join("-");if(a&&"h"===r)return e.flipX=!0,e;if(a&&"v"===r)return e.flipY=!0,e;if(r=parseFloat(r),isNaN(r))return e;switch(a){case"grow":e.size=e.size+r;break;case"shrink":e.size=e.size-r;break;case"left":e.x=e.x-r;break;case"right":e.x=e.x+r;break;case"up":e.y=e.y-r;break;case"down":e.y=e.y+r;break;case"rotate":e.rotate=e.rotate+r}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},oa={mixout:function(){return{parse:{transform:function(e){return ra(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-transform");return n&&(e.transform=ra(n)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,n=e.transform,a=e.containerWidth,r=e.iconWidth,o={transform:"translate(".concat(a/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(r/2*-1," -256)")}};return{tag:"g",attributes:S({},c.outer),children:[{tag:"g",attributes:S({},c.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:S(S({},t.icon.attributes),c.path)}]}]}}}},ia={x:0,y:0,width:"100%",height:"100%"};function sa(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 la={hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-mask"),a=n?Qt(n.split(" ").map(function(e){return e.trim()})):{prefix:null,iconName:null,rest:[]};return a.prefix||(a.prefix=Vt()),e.mask=a,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var t,n=e.children,a=e.attributes,r=e.main,o=e.mask,i=e.maskId,s=e.transform,l=r.width,c=r.icon,u=o.width,f=o.icon,d=function(e){var t=e.transform,n=e.containerWidth,a=e.iconWidth,r={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:r,inner:{transform:"".concat(o," ").concat(i," ").concat(s)},path:{transform:"translate(".concat(a/2*-1," -256)")}}}({transform:s,containerWidth:u,iconWidth:l}),h={tag:"rect",attributes:S(S({},ia),{},{fill:"white"})},m=c.children?{children:c.children.map(sa)}:{},p={tag:"g",attributes:S({},d.inner),children:[sa(S({tag:c.tag,attributes:S(S({},c.attributes),d.path)},m))]},g={tag:"g",attributes:S({},d.outer),children:[p]},v="mask-".concat(i||ot()),b="clip-".concat(i||ot()),y={tag:"mask",attributes:S(S({},ia),{},{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])},y]};return n.push(x,{tag:"rect",attributes:S({fill:"currentColor","clip-path":"url(#".concat(b,")"),mask:"url(#".concat(v,")")},ia)}),{children:n,attributes:a}}}},ca={provides:function(e){var t=!1;A.matchMedia&&(t=A.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],n={fill:"currentColor"},a={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:S(S({},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 r=S(S({},a),{},{attributeName:"opacity"}),o={tag:"circle",attributes:S(S({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||o.children.push({tag:"animate",attributes:S(S({},a),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:S(S({},r),{},{values:"1;0;1;1;0;1;"})}),e.push(o),e.push({tag:"path",attributes:S(S({},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:S(S({},r),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:S(S({},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:S(S({},r),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}};!function(e,t){var n=t.mixoutsTo;Yt=e,Zt={},Object.keys(Gt).forEach(function(e){-1===Kt.indexOf(e)&&delete Gt[e]}),Yt.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"===R(t[e])&&Object.keys(t[e]).forEach(function(a){n[e]||(n[e]={}),n[e][a]=t[e][a]})}),e.hooks){var a=e.hooks();Object.keys(a).forEach(function(e){Zt[e]||(Zt[e]=[]),Zt[e].push(a[e])})}e.provides&&e.provides(Gt)})}([mt,$n,Vn,Hn,Wn,na,{mixout:function(){return{dom:{unwatch:function(){Mn(),aa=!0}}}},hooks:function(){return{bootstrap:function(){In(en("mutationObserverCallbacks",{}))},noAuto:function(){Pn&&Pn.disconnect()},watch:function(e){var t=e.observeMutationsRoot;aa?Fn():In(en("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},oa,la,ca,{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-symbol"),a=null!==n&&(""===n||n);return e.symbol=a,e}}}}],{mixoutsTo:sn});var ua=sn.config,fa=sn.parse,da=sn.icon;function ha(e){return t=e,(t-=0)==t?e:(e=e.replace(/[_-]+(.)?/g,(e,t)=>t?t.toUpperCase():"")).charAt(0).toLowerCase()+e.slice(1);var t}function ma(e){return e.charAt(0).toUpperCase()+e.slice(1)}var pa=new Map;function ga(e){if(pa.has(e))return pa.get(e);const t={};let n=0;const a=e.length;for(;n<a;){const r=e.indexOf(";",n),o=-1===r?a:r,i=e.slice(n,o).trim();if(i){const e=i.indexOf(":");if(e>0){const n=i.slice(0,e).trim(),a=i.slice(e+1).trim();if(n&&a){const e=ha(n);t[e.startsWith("webkit")?ma(e):e]=a}}}n=o+1}if(1e3===pa.size){const e=pa.keys().next().value;e&&pa.delete(e)}return pa.set(e,t),t}var va=function e(t,n,a={}){if("string"==typeof n)return n;const r=(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=ga(String(t));break;case e.startsWith("aria-"):case e.startsWith("data-"):i[e.toLowerCase()]=t;break;default:i[ha(e)]=t}const{style:s,role:l,"aria-label":c,...u}=a;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},...r)}.bind(null,t.createElement),ba=(e,n)=>{const a=t.useId();return e||(n?a:void 0)};"undefined"!=typeof process&&process.env.FA_VERSION;var ya="searchPseudoElementsFullScan"in ua?"7.0.0":"6.0.0",xa=Number.parseInt(ya)>=7,wa="fa",ka="fa-beat",ja="fa-fade",Na="fa-beat-fade",Sa="fa-bounce",Ca="fa-shake",Ta="fa-spin",_a="fa-spin-pulse",Ra="fa-spin-reverse",Ma="fa-pulse",Fa={left:"fa-pull-left",right:"fa-pull-right"},Pa={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},Ia={"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"},Ea="fa-border",Ba="fa-fw",Da="fa-flip",La="fa-flip-horizontal",Aa="fa-flip-vertical",Oa="fa-inverse",za="fa-rotate-by",$a="fa-swap-opacity",Va="fa-width-auto";function Ha(e){const t=ua.cssPrefix||ua.familyPrefix||wa;return t===wa?e:e.replace(new RegExp(String.raw`(?<=^|\s)${wa}-`,"g"),`${t}-`)}function Wa(e){if(e)return(e=>"object"==typeof e&&"icon"in e&&!!e.icon)(e)?e:fa.icon(e)}var Ua=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"),Qa={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},Ja=new Set(Object.keys(Qa)),qa=t.forwardRef((e,t)=>{const n={...Qa,...e},{icon:a,mask:r,symbol:o,title:i,titleId:s,maskId:l,transform:c}=n,u=ba(l,Boolean(r)),f=ba(s,Boolean(i)),d=Wa(a);if(!d)return Ua.error("Icon lookup is undefined",a),null;const h=function(e){const{beat:t,fade:n,beatFade:a,bounce:r,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:x}=e,w=[];return x&&w.push(...x.split(" ")),t&&w.push(ka),n&&w.push(ja),a&&w.push(Na),r&&w.push(Sa),o&&w.push(Ca),i&&w.push(Ta),l&&w.push(Ra),s&&w.push(_a),c&&w.push(Ma),u&&w.push(Ba),f&&w.push(Oa),d&&w.push(Ea),!0===h&&w.push(Da),"horizontal"!==h&&"both"!==h||w.push(La),"vertical"!==h&&"both"!==h||w.push(Aa),null!=m&&w.push(Ia[m]),null!=p&&0!==p&&w.push(Pa[p]),null!=g&&w.push(Fa[g]),v&&w.push($a),xa?(b&&w.push(za),y&&w.push(Va),(ua.cssPrefix||ua.familyPrefix||wa)===wa?w:w.map(Ha)):w}(n),m="string"==typeof c?fa.transform(c):c,p=Wa(r),g=da(d,{...h.length>0&&{classes:h},...m&&{transform:m},...p&&{mask:p},symbol:o,title:i,titleId:f,maskId:u});if(!g)return Ua.error("Could not find icon",d),null;const{abstract:v}=g,b={ref:t};for(const e of(y=n,Object.keys(y)))Ja.has(e)||(b[e]=n[e]);var y;return va(v[0],b)});qa.displayName="FontAwesomeIcon";var Xa={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"};y.bind(Xa);const Ya=["dotnetspy","ebpfspy","gospy","phpspy","pyspy","rbspy","nodespy","javaspy","pyroscope-rs","scrape","tracing","unknown"],Za=a.z.preprocess(e=>e&&Ya.includes(e)?e:"unknown",a.z.enum(Ya).default("unknown")),Ga=["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions"],Ka=a.z.preprocess(e=>"string"==typeof e&&Ga.includes(e)?e:"unknown",a.z.enum(["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions","unknown"])),er=a.z.object({names:a.z.array(a.z.preprocess(e=>e||"unknown",a.z.string().min(1))),levels:a.z.array(a.z.array(a.z.number())),numTicks:a.z.number(),maxSelf:a.z.number()}),tr=a.z.object({appName:a.z.string().optional(),name:a.z.string().optional(),startTime:a.z.number().optional(),endTime:a.z.number().optional(),query:a.z.string().optional(),maxNodes:a.z.number().optional(),format:a.z.enum(["single","double"]),sampleRate:a.z.number(),spyName:Za,units:Ka});a.z.object({version:a.z.number().min(1).max(1).default(1),flamebearer:er,metadata:tr,leftTicks:a.z.number().optional(),rightTicks:a.z.number().optional()});const nr={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]},ar={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 rr(e){switch(e){case"single":return nr;case"double":return ar;default:throw new Error(`Unsupported type: '${e}'`)}}const or=a.z.object({refType:a.z.string(),traceID:a.z.string(),spanID:a.z.string()}),ir=a.z.object({key:a.z.string(),type:a.z.string(),value:a.z.union([a.z.boolean(),a.z.number(),a.z.string()])}),sr=a.z.object({traceID:a.z.string(),spanID:a.z.string(),flags:a.z.string(),operationName:a.z.string(),references:a.z.array(or),startTime:a.z.number(),duration:a.z.number(),tags:a.z.array(ir),logs:a.z.object({timestamp:a.z.number(),fields:a.z.array(ir)}),processID:a.z.string(),warnings:a.z.any()}),lr=a.z.object({serviceName:a.z.string(),tags:a.z.array(ir)});a.z.object({traceID:a.z.string(),spans:a.z.array(sr),processes:a.z.record(lr),warnings:a.z.any()});const cr=a.z.object({watermark:a.z.object({}).optional(),startTime:a.z.number(),samples:a.z.array(a.z.number()),durationDelta:a.z.number()});a.z.record(a.z.string(),cr);const ur=22,fr=21.5;function dr(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function hr(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 a=t.match(/^([+\-]?)(\d*\.?\d+)\s*(.*)$/);if(!a)return null;const r=a[1]||"",o=a[2],i=(a[3]||"").trim(),s=parseFloat(o);return Number.isFinite(s)?{value:s,unit:i,hasLessThan:n,sign:r}:null}function mr(e,t=!1){if(!e||!t)return e;const n=hr(e);if(!n)return e;const{unit:a}=n;let r=a;const o=a.toLowerCase();"ms"===o?r="毫秒":"μs"===o||"µs"===o||"us"===o?r="微秒":"second"===o||"seconds"===o?r="秒":"minute"===o||"minutes"===o||"min"===o||"mins"===o?r="分钟":"hour"===o||"hours"===o?r="小时":"day"===o||"days"===o?r="天":"month"===o||"months"===o?r="月":"year"!==o&&"years"!==o||(r="年");const i=String(e).match(/^([<\s]*)([+\-]?\d*\.?\d+)(.*)$/);if(!i)return e;return`${i[1]||""}${i[2]||""} ${r}`.trim()}const pr=[{value:1e15,label:"Quad"},{value:1e12,label:"Tri"},{value:1e9,label:"B"},{value:1e6,label:"M"},{value:1e3,label:"K"}];function gr(e){return Math.round(1e4*e)/100}function vr(e,t){return(t-e)/e*100}function br(e,t,n){switch(n){case"samples":return new yr(e/t);case"objects":case"goroutines":case"lock_samples":case"exceptions":return new wr(e);case"bytes":return new kr(e);case"lock_nanoseconds":return new xr(e);case"trace_samples":return new yr(e/t,"",!0);default:return console.warn(`Unsupported unit: '${n}'. Defaulting to ''`),new yr(e/t," ")}}class yr{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 a=e/t/this.divider;let r=a.toFixed(2);return 0===a?r="0.00":(a>=0&&a<.01||a<=0&&a>-.01)&&(r="< 0.01"),n?`${r} ${this.units||`${this.suffix}${1===a||2===this.suffix.length?"":"s"}`}`:r}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 xr{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 wr{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 kr{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 jr="TAIL",Nr="HEAD";function Sr({mode:e,charSize:t,rectWidth:n,fullText:a,shortText:r}){if(e===jr){if(t*a.length<=n)return{mode:e,text:a,marginLeft:3};const o=t*r.length;return o<=n?{mode:e,text:r,marginLeft:3}:{mode:e,text:r,marginLeft:-(o-n+3)}}return{mode:e,text:a,marginLeft:3}}function Cr(e){return e===jr?{direction:"rtl",overflow:"hidden",textOverflow:"ellipsis"}:{overflow:"hidden",textOverflow:"ellipsis"}}function Tr(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 _r(e,t){return r.rgb(e,e,e).alpha(t)}function Rr(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),a=t.match(n);return a&&a.groups?a.groups.packageName||"":t}function Mr(e,t){const n=function(e,t=0){let n,a,r,o,i,s,l,c;for(n=3&e.length,a=e.length-n,r=t,i=3432918353,s=461845907,c=0;c<a;)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,r^=l,r=r<<13|r>>>19,o=5*(65535&r)+((5*(r>>>16)&65535)<<16)&4294967295,r=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,r^=l}return r^=e.length,r^=r>>>16,r=2246822507*(65535&r)+((2246822507*(r>>>16)&65535)<<16)&4294967295,r^=r>>>13,r=3266489909*(65535&r)+((3266489909*(r>>>16)&65535)<<16)&4294967295,r^=r>>>16,r>>>0}(t,0),a=n%e.colors.length,r=e.colors[a];return r||(console.warn("Could not calculate color. Defaulting to the first one"),e.colors[0])}function Fr(e){const{goodColor:t,neutralColor:n,badColor:a}=e,i=o.scaleLinear().domain([-100,0,100]).range([t.rgb().toString(),n.rgb().toString(),a.rgb().toString()]);return e=>r(i(e).toString())}r.rgb(148,142,142),r.rgb(200,0,0),r.rgb(0,170,0),r("#48CE73");const Pr=new WeakMap,Ir=new WeakMap,Er=new WeakMap,Br=new WeakMap;const Dr={collapsedLevelsSingular:"total (1 level collapsed)",collapsedLevelsPlural:"total ({n} levels collapsed)",isZh:!1};function Lr(e){var t,n,a,r,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:x,sampleRate:w,pxPerTick:k}=e,{rangeMin:j,rangeMax:N}=e,{focusedNode:S,zoom:C}=e,T=e.messages||Dr,_=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=_),j>=N)throw new Error("'rangeMin' should be strictly smaller than 'rangeMax'");const{format:R}=e,M=rr(R),F=m.getContext("2d");if(!F)throw new Error("Could not get ctx");const P=C.mapOrElse(()=>0,e=>e.i),I=br(x,w,g),E=S.isJust,B=S.mapOrElse(()=>0,e=>e.i),D=E?fr:0,L=!!e.highlightQuery&&e.highlightQuery.length>0,A=ur*(b.length-B)+(E?fr:0);e.skipCanvasResize||(m.height=A);const O="number"==typeof e.devicePixelRatio?e.devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1;!e.skipDprScale&&O>1&&(m.width*=O,m.height*=O,F.scale(O,O)),F.textBaseline="middle",F.font="400 11.5px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace";const z=F.measureText("a").width,{names:$}=e,V=function(e){const t=Pr.get(e);if(t)return t;const n=new Map;return Pr.set(e,n),n}(m),H=L?function(e,t){const n=Ir.get(e);if(n){const e=n.get(t);if(e)return e}const a=t.toLowerCase(),r=new Uint8Array(e.length);for(let t=1;t<e.length;t+=1){const n=e[t];n&&n.toLowerCase().includes(a)&&(r[t]=1)}const o=null!=n?n:new Map;return o.set(t,r),Ir.set(e,o),r}($,e.highlightQuery):null,W="single"===e.format?function(e,t,n){const a=`${t}|${n.name}`,r=Er.get(e);if(r){const e=r.get(a);if(e)return e}const o=new Array(e.length);for(let a=0;a<e.length;a+=1){const r=Rr(t,e[a]||"")||"";o[a]=Mr(n,r)}const i=null!=r?r:new Map;return i.set(a,o),Er.set(e,i),o}($,e.spyName,y):null,U="double"===e.format?Fr({name:y.name,goodColor:y.goodColor,neutralColor:y.neutralColor,badColor:y.badColor}):null,Q=(e,t)=>{const n=e[t+M.jName];return!(!n||n<0||!H)&&1===H[n]},J=null!==(n=e.startI)&&void 0!==n?n:0,q=null!==(a=e.startJ)&&void 0!==a?a:0;if(E&&"highlightOnly"!==d&&0===(null!==(r=e.levelStart)&&void 0!==r?r:0)&&0===J&&0===q){const e=x*k;u&&(F.beginPath(),F.rect(0,0,x*k,fr),F.fillStyle=_r(200,1).rgb().string(),F.fill());const t=S.mapOrElse(()=>"total",e=>function(e,t){return 1===e?t.collapsedLevelsSingular:t.collapsedLevelsPlural.replace("{n}",String(e))}(e.i-1,T)),n=Sr({mode:p,charSize:z,rectWidth:e,fullText:t,shortText:t}),a=0,r=0,o=fr;if(f){F.beginPath(),F.rect(0,0,e,fr),F.save(),F.clip(),F.fillStyle="black";const t=Math.round(Math.max(a,0));F.fillText(n.text,t+n.marginLeft,r+o/2+1),F.restore()}}const X=Math.max(0,null!==(o=e.levelStart)&&void 0!==o?o:0),Y=b.length-B,Z=Math.min(Y,null!==(i=e.levelEnd)&&void 0!==i?i:Y),G=Math.max(X,null!==(s=e.startI)&&void 0!==s?s:X),K=Math.max(0,null!==(l=e.startJ)&&void 0!==l?l:0),{spyName:ee}=e,te=(t,n,a,r,o)=>{const i={level:t,j:n,i:a+S.mapOrElse(()=>0,e=>e.i),names:$,collapsed:r,selectedLevel:P,highlightModeOn:L,isHighlighted:o,spyName:ee,palette:y,colorByNameIndex:W,diffColorFn:U};switch(R){case"single":return function(e){const t=zr(e);if(t)return t;const n=rr("single"),a=e.selectedLevel>e.i?.33:1;let r=e.level[e.j+n.jName];void 0===r&&(console.warn("Could nto find level",{l:e.j,jName:n.jName,level:e.level}),r=-1);if(e.colorByNameIndex&&r>=0&&e.colorByNameIndex[r])return e.colorByNameIndex[r].alpha(a);const o=e.names[r]||"",i=Rr(e.spyName,o)||"";return Mr(e.palette,i).alpha(a)}({...i});case"double":return function(e){const t=zr(e);if(t)return t;const n=e.selectedLevel>e.i?.33:1,{leftRatio:a,rightRatio:r}=function(e,t,n,a){const r=ar;return n&&a?{leftRatio:r.getBarTotalLeft(e,t)/n,rightRatio:r.getBarTotalRght(e,t)/a}:(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=gr(a),i=gr(r);if(e.diffColorFn)return e.diffColorFn(Tr(o,i)).alpha(n);return function(e,t,n){const a=Tr(t,n);return Fr(e)(a)}(e.palette,o,i).alpha(n)}({...i,leftTicks:e.leftTicks,rightTicks:e.rightTicks});default:throw new Error(`Unsupported format: ${R}`)}};if("highlightOnly"===d&&L&&u){const e=function(e,t){const n=Br.get(e);if(n)return n;const a=rr(t),r=new Map;for(let t=0;t<e.length;t+=1){const n=e[t];for(let e=0;e<n.length;e+=a.jStep){const o=a.getBarName(n,e);if(void 0===o||o<0)continue;const i=r.get(o);i?i.push({i:t,j:e}):r.set(o,[{i:t,j:e}])}}return Br.set(e,r),r}(b,R),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 a=t[n],r=e.get(a);if(r)for(let e=0;e<r.length;e+=1){const t=r[e],n=t.i-B;if(t.i<B||n<X||n>=Z)continue;const a=b[t.i],o=v(M.getBarOffset(a,t.j)),i=n*ur+D,s=fr,l=M.getBarTotal(a,t.j),c=l*k<=5,u=l*k-(c?0:.5);if(u<=0)continue;F.beginPath(),F.rect(o,i,u,s);const f=te(a,t.j,n,c,!0);F.fillStyle=f.string(),F.fill()}}return{done:!0,nextI:Z,nextJ:0}}for(let e=G;e<Z;e+=1){const t=b[B+e];if(!t)throw new Error(`Could not find level: ${B+e}`);let n=e===G?K:0;for(;n<t.length;n+=M.jStep){const a=M.getBarOffset(t,n),r=v(a),o=e*ur+D,i=fr,s=L&&Q(t,n);let l=M.getBarTotal(t,n);const m=l*k<=5;if(m)for(;n<t.length-M.jStep&&a+l===M.getBarOffset(t,n+M.jStep)&&M.getBarTotal(t,n+M.jStep)*k<=5&&s===(L&&Q(t,n+M.jStep));)n+=M.jStep,l+=M.getBarTotal(t,n);const g=l*k-(m?0:.5);if(F.beginPath(),F.rect(r,o,g,i),u){if("forceGrey"===d)F.fillStyle=_r(200,.66).rgb().string();else{const a=te(t,n,e,m,s);F.fillStyle=a.string()}F.fill()}if(!f||m||"forceGrey"===d){if(h&&performance.now()-c>h)return{done:!1,nextI:e,nextJ:n+M.jStep};continue}if(g<20)continue;const b=Ar($,n,R,t),y=Sr({mode:p,charSize:z,rectWidth:g,fullText:Or(b,l,w,I,T,V),shortText:b});F.save(),F.clip(),F.fillStyle="black";const x=Math.round(Math.max(r,0));if(F.fillText(y.text,x+y.marginLeft,o+i/2+1),F.restore(),h&&performance.now()-c>h)return{done:!1,nextI:e,nextJ:n+M.jStep}}if(h&&performance.now()-c>h)return{done:!1,nextI:e+1,nextJ:0}}return{done:!0,nextI:Z,nextJ:0}}function Ar(e,t,n,a){let r=a[t+rr(n).jName];void 0===r&&(r=-1);const o=e[r];return o||(console.warn("Could not find function name for",{j:t,format:n,level:a,names:e}),"")}function Or(e,t,n,a,r,o){let i=null==o?void 0:o.get(t);if(!i){const e=a.format(t,n);i=mr(e,!!r.isZh)||e,null==o||o.set(t,i)}return`${e} (${i})`}function zr({collapsed:e,highlightModeOn:t,isHighlighted:n}){return e||t&&!n?_r(200,.66):null}class $r{constructor(e,t,n,a,r,o,i,s){if(this.flamebearer=e,this.canvas=t,this.focusedNode=n,this.fitMode=a,this.highlightQuery=r,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,a=null!==(t=this.cachedPxPerTick)&&void 0!==t?t:this.pxPerTick();return(e-this.flamebearer.numTicks*n)*a},this.xyToBarPosition=e=>{const{ff:t}=this,{i:n,j:a}=this.xyToBarIndex(e.x,e.y),r=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,a)),0);return{x:i,y:Math.max((n-r)*ur,0),width:Math.min(this.tickToX(t.getBarOffset(o,a)+t.getBarTotal(o,a))-i,this.getCanvasWidth())}},this.xyToBarData=e=>{const{i:t,j:n}=this.xyToBarIndex(e.x,e.y),a=this.flamebearer.levels[t];if(!a)throw new Error(`Could not find level: '${t}'`);switch(this.flamebearer.format){case"single":{const e=nr;return{format:"single",name:this.flamebearer.names[e.getBarName(a,n)],self:e.getBarSelf(a,n),offset:e.getBarOffset(a,n),total:e.getBarTotal(a,n)}}case"double":{const e=ar;return{format:"double",barTotal:e.getBarTotal(a,n),totalLeft:e.getBarTotalLeft(a,n),totalRight:e.getBarTotalRght(a,n),totalDiff:e.getBarTotalDiff(a,n),name:this.flamebearer.names[e.getBarName(a,n)]}}default:throw new Error("Unsupported type")}},this.isWithinBounds=(e,t)=>{if(e<0||e>this.getCanvasWidth())return!1;try{const{i:n,j:a}=this.xyToBarIndex(e,t);if(-1===a||-1===n)return!1}catch(e){return!1}return!0},this.zoom=o,this.focusedNode=n,this.flamebearer=e,this.canvas=t,this.highlightQuery=r,this.ff=rr(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:a,pxPerTick:r}=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:a,fitMode:this.fitMode,highlightQuery:o,zoom:this.zoom,focusedNode:this.focusedNode,pxPerTick:r,tickToX:e=>(e-this.flamebearer.numTicks*n)*r,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 Lr({...i,format:"single"});case"double":return Lr({...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:a,focusedNode:r}=this;return a.match({Just:e=>r.match({Just:a=>{const r=n(a),o=t(e);return r.rangeMax-r.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(a)):t(e)},Nothing:()=>t(e)}),Nothing:()=>r.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 a=0,r=t.length-n.jStep;for(;a<=r;){const o=n.jStep*(a/n.jStep+r/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?r=o-n.jStep:a=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<=fr)return{i:0,j:0};const n=this.isFocused()?t-fr:t,a=this.focusedNode.mapOrElse(()=>0,e=>e.i<=0?0:e.i),r=this.zoom.match({Just:()=>this.focusedNode.match({Just:()=>a,Nothing:()=>0}),Nothing:()=>this.focusedNode.match({Just:()=>a,Nothing:()=>0})}),o=Math.floor(n/ur)+r;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 a={x:e,y:t};return this.isWithinBounds(e,t)?n.Maybe.of(a):n.Maybe.nothing()}xyToBar(e,t){return this.parseXY(e,t).map(n=>{const{i:a,j:r}=this.xyToBarIndex(e,t);return{i:a,j:r,...this.xyToBarPosition(n),...this.xyToBarData(n)}})}}function Vr(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Vr(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function Hr(){for(var e,t,n=0,a="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Vr(e))&&(a&&(a+=" "),a+=t);return a}var Wr="NoData-module_noData__WuuID";function Ur(){return e.jsx("div",{"data-testid":"no-data",className:Wr,children:e.jsx("span",{children:"No data available"})})}var Qr,Jr,qr={},Xr={};function Yr(){return Qr||(Qr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="arrow-rotate-right",n=[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],a="f01e",r="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,a,r]},e.faArrowRotateRight=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Xr)),Xr}function Zr(){return Jr||(Jr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Yr();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}(qr)),qr}var Gr,Kr=Zr(),eo={};function to(){return Gr||(Gr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="copy",n=[],a="f0c5",r="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,a,r]},e.faCopy=e.definition,e.prefix="fas",e.iconName=t,e.width=448,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(eo)),eo}var no,ao=to(),ro={};function oo(){return no||(no=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="highlighter",n=[],a="f591",r="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,a,r]},e.faHighlighter=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(ro)),ro}var io,so,lo=oo(),co={},uo={};function fo(){return io||(io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="down-left-and-up-right-to-center",n=["compress-alt"],a="f422",r="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,a,r]},e.faDownLeftAndUpRightToCenter=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(uo)),uo}function ho(){return so||(so=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=fo();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}(co)),co}var mo=ho();const po=e=>!!e&&"o"===e[0],go=l.unstable_batchedUpdates,vo=(e,t)=>!0===e||!(!e||!e[t]),bo=(e,t)=>"function"==typeof e?e(t):e,yo="_szhsinMenu",xo=(e,t)=>Object.defineProperty(t,yo,{value:e}),wo=(e,t)=>(t&&Object.keys(t).forEach(n=>{const a=e[n],r=t[n];e[n]="function"==typeof r&&a?(...e)=>{r(...e),a(...e)}:r}),e),ko=e=>{for(;e;){if(!(e=e.parentNode)||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:a}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+a+n))return e}};function jo(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function No(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}const So=({block:e,element:n,modifiers:a,className:r})=>t.useMemo(()=>{const t=n?`${e}__${n}`:e;let o=t;a&&Object.keys(a).forEach(e=>{const n=a[e];n&&(o+=` ${t}--${!0===n?e:`${e}-${n}`}`)});let i="function"==typeof r?r(a):r;return"string"==typeof i&&(i=i.trim(),i&&(o+=` ${i}`)),o},[e,n,a,r]),Co="szh-menu",To=t.createContext(),_o=t.createContext({}),Ro=t.createContext({}),Mo=t.createContext({}),Fo=t.createContext({}),Po=t.createContext({}),Io=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Eo=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),Bo=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Do=Object.freeze({FIRST:"first",LAST:"last"}),Lo=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Ao="absolute",Oo="none",zo={preventScroll:!0},$o=xo("MenuButton",t.forwardRef(function({className:n,isOpen:a,disabled:r,children:o,...i},s){const l=t.useMemo(()=>({open:a}),[a]);return e.jsx("button",{"aria-haspopup":!0,"aria-expanded":a,"aria-disabled":r||void 0,type:"button",disabled:r,...i,ref:s,className:So({block:"szh-menu-button",modifiers:l,className:n}),children:o})})),Vo=({className:n,containerRef:a,containerProps:r,children:o,isOpen:i,theming:s,transition:l,onClose:c})=>{const u=vo(l,"item");return e.jsx("div",{...wo({onKeyDown:({key:e})=>{if(e===Io.ESC)bo(c,{key:e,reason:Bo.CANCEL})},onBlur:e=>{i&&!e.currentTarget.contains(e.relatedTarget)&&bo(c,{reason:Bo.BLUR})}},r),className:So({block:"szh-menu-container",modifiers:t.useMemo(()=>({theme:s,itemTransition:u}),[s,u]),className:n}),style:{position:"absolute",...r?.style},ref:a,children:o})},Ho=()=>{let e,t=0;return{toggle:e=>{e?t++:t--,t=Math.max(t,0)},on:(n,a,r)=>{t?e||(e=setTimeout(()=>{e=0,a()},n)):r?.()},off:()=>{e&&(clearTimeout(e),e=0)}}},Wo=(e,t)=>Math.round(e)===t?e:t,Uo=(e,t,n,a)=>{const r=(e=>{const t=e.getBoundingClientRect();return t.width=Wo(t.width,e.offsetWidth),t.height=Wo(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],a=isNaN(t[1])?n:t[1];return{top:n,right:a,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?a:t[3]}})(a),l=e=>e+o.left-i.left-s.left,c=e=>e+o.left+r.width-i.right+s.right,u=e=>e+o.top-i.top-s.top,f=e=>e+o.top+r.height-i.bottom+s.bottom;return{menuRect:r,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}}},Qo=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:a,placeLeftX:r,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=a;"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=r,"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(r),(p>=0||-p<g)&&(m=r,v="left")))),"auto"===h&&(m=l(m));const y=f?(({arrowRef:e,menuY:t,anchorRect:n,containerRect:a,menuRect:r})=>{let o=n.top-a.top-t+n.height/2;const i=1.25*e.current.offsetHeight;return o=Math.max(i,o),o=Math.min(o,r.height-i),o})({menuY:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowY:y,x:m,y:b,computedDirection:v}},Jo=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:a,placeTopY:r,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=a;"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=r,"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(r),(p>=0||-p<g)&&(m=r,v="top")))),"auto"===h&&(m=c(m));const y=f?(({arrowRef:e,menuX:t,anchorRect:n,containerRect:a,menuRect:r})=>{let o=n.left-a.left-t+n.width/2;const i=1.25*e.current.offsetWidth;return o=Math.max(i,o),o=Math.min(o,r.width-i),o})({menuX:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowX:y,x:b,y:m,computedDirection:v}},qo="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function Xo(e,t){"function"==typeof e?e(t):e.current=t}const Yo=(e,n)=>t.useMemo(()=>e?n?t=>{Xo(e,t),Xo(n,t)}:e:n,[e,n]),Zo=({ariaLabel:n,menuClassName:a,menuStyle:r,arrow:o,arrowProps:i={},anchorPoint:s,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:x=!0,state:w,endTransition:k,isDisabled:j,menuItemFocus:N,gap:S=0,shift:C=0,children:T,onClose:_,focusProps:R,...M})=>{const[F,P]=t.useState({x:-9999,y:-9999}),[I,E]=t.useState({}),[B,D]=t.useState(),[L,A]=t.useState(p),[O]=t.useState(Ho),[z,$]=t.useReducer(e=>e+1,1),{transition:V,boundingBoxRef:H,boundingBoxPadding:W,rootMenuRef:U,rootAnchorRef:Q,scrollNodesRef:J,reposition:q,viewScroll:X,submenuCloseDelay:Y}=t.useContext(Po),{submenuCtx:Z,reposSubmenu:G=y}=t.useContext(Ro),K=t.useRef(),ee=t.useRef(),te=t.useRef(!1),{hoverItem:ne,dispatch:ae,updateItems:re}=(e=>{const[n,a]=t.useState(),r=t.useRef({items:[],hoverIndex:-1,sorted:!1}).current,o=t.useCallback((t,n)=>{const{items:o}=r;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(zo),a()))}else r.items=[];r.hoverIndex=-1,r.sorted=!1},[r,e]),i=t.useCallback((t,n,o)=>{const{items:i,hoverIndex:s}=r,l=()=>{if(r.sorted)return;const t=e.current.querySelectorAll(".szh-menu__item");i.sort((e,n)=>No(t,e)-No(t,n)),r.sorted=!0};let c,u=-1;switch(t){case Eo.RESET:break;case Eo.SET:c=n;break;case Eo.UNSET:c=e=>e===n?void 0:e;break;case Eo.FIRST:l(),u=0,c=i[u];break;case Eo.LAST:l(),u=i.length-1,c=i[u];break;case Eo.SET_INDEX:l(),u=o,c=i[u];break;case Eo.INCREASE:l(),u=s,u<0&&(u=i.indexOf(n)),u++,u>=i.length&&(u=0),c=i[u];break;case Eo.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),a(c),r.hoverIndex=u},[e,r]);return{hoverItem:n,dispatch:i,updateItems:o}})(K),oe=po(w),ie=vo(V,"open"),se=vo(V,"close"),le=J.current,ce=t.useCallback(e=>{const t=K.current,n=u.current;if(!t||!n)return;const a=c?c.current?.getBoundingClientRect():s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0,height:0}:null;if(!a)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:ko(U.current))||window);const r=Uo(n,t,le.menu,W);let{arrowX:i,arrowY:l,x:f,y:d,computedDirection:h}=(({arrow:e,align:t,direction:n,gap:a,shift:r,position:o,anchorRect:i,arrowRef:s,positionHelpers:l})=>{const{menuRect:c,containerRect:u}=l,f="left"===n||"right"===n;let d=f?a:r,h=f?r:a;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 x={...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 Qo(x);default:return Jo(x)}})({arrow:o,align:m,direction:p,gap:S,shift:C,position:g,anchorRect:a,arrowRef:ee,positionHelpers:r});const{menuRect:b}=r,y=b.height;if(!e&&"visible"!==v){const{getTopOverflow:e,getBottomOverflow:t}=r;let n,a;const o=t(d);if(o>0)n=y-o,a=o;else{const t=e(d);t<0&&(n=y+t,a=0-t,n>=0&&(d-=t))}n>=0&&D({height:n,overflowAmt:a})}o&&E({x:i,y:l}),P({x:f,y:d}),A(h)},[o,m,W,p,S,C,g,v,s,c,u,H,U,le]);qo(()=>{oe&&(ce(),te.current&&$()),te.current=oe},[oe,ce,G]),qo(()=>{B&&!b&&(K.current.scrollTop=0)},[B,b]),qo(()=>re,[re]),t.useEffect(()=>{let{menu:e}=le;if(!oe||!e)return;if(e=e.addEventListener?e:window,!le.anchors){le.anchors=[];let t=ko(Q&&Q.current);for(;t&&t!==e;)le.anchors.push(t),t=ko(t)}let t=X;if(le.anchors.length&&"initial"===t&&(t="auto"),"initial"===t)return;const n=()=>{"auto"===t?go(()=>ce(!0)):bo(_,{reason:Bo.SCROLL})},a=le.anchors.concat("initial"!==X?e:[]);return a.forEach(e=>e.addEventListener("scroll",n)),()=>a.forEach(e=>e.removeEventListener("scroll",n))},[Q,le,oe,_,X,ce]);const ue=!!B&&B.overflowAmt>0;t.useEffect(()=>{if(ue||!oe||!h)return;const e=()=>go(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):l.flushSync(()=>{ce(),$()})})),n={box:"border-box"};t.observe(K.current,n);const a=c?.current;return a&&t.observe(a,n),()=>t.disconnect()},[oe,q,c,ce]),t.useEffect(()=>{if(!oe)return ae(Eo.RESET),void(se||D());const{position:e,alwaysUpdate:t}=N||{},n=()=>{e===Do.FIRST?ae(Eo.FIRST):e===Do.LAST?ae(Eo.LAST):e>=-1&&ae(Eo.SET_INDEX,void 0,e)};if(t)n();else if(x){const e=setTimeout(()=>{const e=K.current;e&&!e.contains(document.activeElement)&&(e.focus(zo),n())},ie?170:100);return()=>clearTimeout(e)}},[oe,ie,se,x,N,ae]);const fe=t.useMemo(()=>({isParentOpen:oe,submenuCtx:O,dispatch:ae,updateItems:re}),[oe,O,ae,re]);let de,he;B&&(b?he=B.overflowAmt:de=B.height);const me=t.useMemo(()=>({reposSubmenu:z,submenuCtx:O,overflow:v,overflowAmt:he,parentMenuRef:K,parentDir:L}),[z,O,v,he,L]),pe=de>=0?{maxHeight:de,overflow:v}:void 0,ge=t.useMemo(()=>({state:w,align:m,dir:L}),[w,m,L]),ve=t.useMemo(()=>({dir:L}),[L]),be=So({block:Co,element:"arrow",modifiers:ve,className:i.className}),ye=e.jsxs("ul",{role:"menu","aria-label":n,...jo(j),...wo({onPointerEnter:Z?.off,onPointerMove:e=>{e.stopPropagation(),O.on(Y,()=>{ae(Eo.RESET),K.current.focus(zo)})},onPointerLeave:e=>{e.target===e.currentTarget&&O.off()},onKeyDown:e=>{switch(e.key){case Io.HOME:ae(Eo.FIRST);break;case Io.END:ae(Eo.LAST);break;case Io.UP:ae(Eo.DECREASE,ne);break;case Io.DOWN:ae(Eo.INCREASE,ne);break;case Io.SPACE:return void(e.target&&-1!==e.target.className.indexOf(Co)&&e.preventDefault());default:return}e.preventDefault(),e.stopPropagation()},onAnimationEnd:()=>{"closing"===w&&D(),bo(k)}},M),ref:Yo(d,K),className:So({block:Co,modifiers:ge,className:a}),style:{...r,...pe,margin:0,display:"closed"===w?"none":void 0,position:Ao,left:F.x,top:F.y},children:[o&&e.jsx("li",{"aria-hidden":!0,...i,className:be,style:{display:"block",position:Ao,left:I.x,top:I.y,...i.style},ref:ee}),e.jsx(Ro.Provider,{value:me,children:e.jsx(_o.Provider,{value:fe,children:e.jsx(To.Provider,{value:ne,children:bo(T,ge)})})})]});return f?e.jsx(Vo,{...f,isOpen:oe,children:ye}):ye},Go=t.forwardRef(function({"aria-label":n,className:a,containerProps:r,initialMounted:o,unmountOnClose:i,transition:s,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},x){const w=t.useRef(null),k=t.useRef({}),{anchorRef:j,state:N,onClose:S}=y,C=t.useMemo(()=>({initialMounted:o,unmountOnClose:i,transition:s,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:f,rootMenuRef:w,rootAnchorRef:j,scrollNodesRef:k,reposition:d,viewScroll:p,submenuOpenDelay:h,submenuCloseDelay:m}),[o,i,s,c,j,u,f,d,p,h,m]),T=t.useMemo(()=>({handleClick(e,t){e.stopPropagation||bo(b,e);let n=e.keepOpen;void 0===n&&(n=t&&e.key===Io.SPACE),n||bo(S,{value:e.value,key:e.key,reason:Bo.CLICK})},handleClose(e){bo(S,{key:e,reason:Bo.CLICK})}}),[b,S]);if(!N)return null;const _=e.jsx(Po.Provider,{value:C,children:e.jsx(Mo.Provider,{value:T,children:e.jsx(Zo,{...y,ariaLabel:n||"Menu",externalRef:x,containerRef:w,containerProps:{className:a,containerRef:w,containerProps:r,theming:v,transition:s,onClose:S}})})});return!0===g&&"undefined"!=typeof document?l.createPortal(_,document.body):g?g.target?l.createPortal(_,g.target):g.stablePosition?null:_:_}),Ko=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],ei=e=>({_s:e,status:Ko[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),ti=e=>e?6:5,ni=(e,t,n,a,r)=>{clearTimeout(a.current);const o=ei(e);t(o),n.current=o,r&&r({current:o})},ai=({enter:e=!0,exit:n=!0,preEnter:a,preExit:r,timeout:o,initialEntered:i,mountOnEnter:s,unmountOnExit:l,onStateChange:c}={})=>{const[u,f]=t.useState(()=>ei(i?2:ti(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 ti(t)}})(d.current._s,l);e&&ni(e,f,d,h,c)},[c,l]);return[u,t.useCallback(t=>{const o=e=>{switch(ni(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?a?0:1:2):i&&o(n?r?3:4:ti(l))},[g,c,e,n,a,r,m,p,l]),g]},ri=({initialOpen:e,initialMounted:n,unmountOnClose:a,transition:r,transitionTimeout:o=500,onMenuChange:i}={})=>{const s=vo(r,"open"),l=vo(r,"close"),[{status:c},u,f]=ai({initialEntered:e,mountOnEnter:!n,unmountOnExit:a,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:Lo[c],endTransition:f},u]},oi=parseInt(t.version)<19,ii=t.forwardRef(function({"aria-label":n,captureFocus:a,initialOpen:r,menuButton:o,instanceRef:i,onMenuChange:s,...l},c){const[u,f,d]=(e=>{const[n,a]=ri(e),[r,o]=t.useState();return[{menuItemFocus:r,...n},a,(e,t)=>{o({position:e,alwaysUpdate:t}),a(!0)}]})({...l,onMenuChange:s}),{state:h}=u,m=po(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[a]=t.useState({});return{onMouseDown:()=>{a.v=e&&"closed"!==e},onClick:e=>a.v?a.v=!1:n(!0,e)}})(h,(e,t)=>d(t.detail?void 0:Do.FIRST)),v=t.useCallback(e=>{f(!1),e.key&&p.current.focus()},[f]),b=bo(o,{open:m});if(!b||!b.type)throw new Error("Menu requires a menuButton prop.");const y={...wo({onKeyDown:e=>{switch(e.key){case Io.UP:d(Do.LAST);break;case Io.DOWN:d(Do.FIRST);break;default:return}e.preventDefault()},...g},b.props),ref:Yo(oi?b.ref:b.props.ref,p)};"MenuButton"===b.type[yo]&&(y.isOpen=m);const x=t.cloneElement(b,y);return t.useImperativeHandle(i,()=>({openMenu:d,closeMenu:()=>f(!1)})),e.jsxs(t.Fragment,{children:[x,e.jsx(Go,{...l,...u,"aria-label":n||("string"==typeof b.props.children?b.props.children:"Menu"),anchorRef:p,ref:c,onClose:v})]})}),si=(e,n,a,r)=>{const[o,i,s]=(e=>{const[n,a]=t.useState(!1);return t.useEffect(()=>{!e&&a(!1)},[e]),[n,()=>!n&&a(!0),()=>a(!1)]})(a),{submenuCloseDelay:l}=t.useContext(Po),{isParentOpen:c,submenuCtx:u,dispatch:f,updateItems:d}=t.useContext(_o),h=()=>{!a&&!r&&f(Eo.SET,e.current)},m=()=>{!r&&f(Eo.UNSET,e.current)};return((e,t,n)=>{qo(()=>{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 a=t.current;return n(a,!0),()=>{n(a)}},[e,t,n])})(r,e,d),t.useEffect(()=>{a&&c&&n.current&&n.current.focus()},[n,a,c]),{mouseOver:o,setHover:h,onBlur:e=>{a&&!e.currentTarget.contains(e.relatedTarget)&&m()},onPointerMove:e=>{r||(e.stopPropagation(),i(),u.on(l,h,h))},onPointerLeave:(e,t)=>{s(),u.off(),!t&&m()}}},li=((n,a)=>{const r=t.memo(a),o=t.forwardRef((n,a)=>{const o=t.useRef(null);return e.jsx(r,{...n,itemRef:o,externalRef:a,isHovering:t.useContext(To)===o.current})});return o.displayName=`WithHovering(${n})`,o})("MenuItem",function({className:n,value:a,href:r,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}=si(f,f,u,m),b=t.useContext(Mo),y=t.useContext(Fo),x="radio"===o,w="checkbox"===o,k=!(!r||m||x||w),j=x?y.value===a:!!w&&!!i,N=e=>{if(m)return e.stopPropagation(),void e.preventDefault();const t={value:a,syntheticEvent:e};void 0!==e.key&&(t.key=e.key),w&&(t.checked=!j),x&&(t.name=y.name),bo(c,t),x&&bo(y.onRadioChange,t),b.handleClick(t,w||x)},S=t.useMemo(()=>({type:o,disabled:m,hover:p||u,checked:j,anchor:k}),[o,m,p,u,j,k]),C=wo({...v,onPointerDown:g,onKeyDown:e=>{if(u)switch(e.key){case Io.ENTER:e.preventDefault();case Io.SPACE:k?f.current.click():N(e)}},onClick:N},h),T={role:x?"menuitemradio":w?"menuitemcheckbox":"menuitem","aria-checked":x||w?j:void 0,...jo(m,u),...C,ref:Yo(d,f),className:So({block:Co,element:"item",modifiers:S,className:n}),children:t.useMemo(()=>bo(l,S),[l,S])};return k?e.jsx("li",{role:Oo,children:e.jsx("a",{href:r,...T})}):e.jsx("li",{...T})}),ci=t.memo(t.forwardRef(function({className:t,...n},a){return e.jsx("li",{role:Oo,...n,ref:a,className:So({block:Co,element:"header",className:t})})}));var ui="canvas-module_canvas__Iiaz4",fi="canvas-module_textCanvas__eFxM4",di="Highlight-module_highlight__1VV-X";function hi(n){const{canvasRef:a,barHeight:r,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:`${r}px`,...t})}else m()})},m=()=>{d({...f.current||{},visibility:"hidden"})};return t.useEffect(()=>{const e=a.current;return e?(e.addEventListener("mousemove",h),e.addEventListener("mouseout",m),()=>{e.removeEventListener("mousemove",h),e.removeEventListener("mouseout",m),u.current&&cancelAnimationFrame(u.current)}):()=>{}},[a.current,h,m]),e.jsx("div",{ref:c,className:di,style:s,"data-testid":"flamegraph-highlight"})}var mi="ContextMenuHighlight-module_highlightContextMenu__WI1nK";const pi={height:"0px",visibility:"hidden"};function gi(n){const{node:a,barHeight:r}=n,[o,i]=t.useState(pi);return t.useEffect(()=>{a.match({Nothing:()=>i(pi),Just:e=>i({visibility:"visible",height:`${r}px`,...e})})},[a]),e.jsx("div",{className:mi,style:o,"data-testid":"flamegraph-highlight-contextmenu"})}const vi={name:"Default",goodColor:r.rgb(0,170,0),neutralColor:r.rgb(148,142,142),badColor:r.rgb(200,0,0),colors:[r.hsl(24,69,60),r.hsl(34,65,65),r.hsl(194,52,61),r.hsl(163,45,55),r.hsl(211,48,60),r.hsl(246,40,65),r.hsl(305,63,79),r.hsl(47,100,73),r.rgb(183,219,171),r.rgb(244,213,152),r.rgb(78,146,249),r.rgb(249,186,143),r.rgb(242,145,145),r.rgb(130,181,216),r.rgb(229,168,226),r.rgb(174,162,224),r.rgb(154,196,138),r.rgb(242,201,109),r.rgb(101,197,219),r.rgb(249,147,78),r.rgb(234,100,96),r.rgb(81,149,206),r.rgb(214,131,206),r.rgb(128,110,183)]},bi={...vi,name:"Color Blind",goodColor:r.rgb(26,133,255),neutralColor:r.rgb(148,142,142),badColor:r.rgb(220,50,32)};function yi(){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 xi(){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 wi={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 ki={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"}]},ji={...ki,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:"千"}]},Ni=t.createContext(ki),Si=Ni,Ci=({messages:n,children:a})=>{const r=t.useMemo(()=>{var e;return{...ki,...n,tooltipUnitTitles:{...ki.tooltipUnitTitles,...null!==(e=null==n?void 0:n.tooltipUnitTitles)&&void 0!==e?e:{}}}},[n]);return e.jsx(Ni.Provider,{value:r,children:a})},Ti=()=>t.useContext(Ni);function _i(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 Ri(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 Mi(e,t,n){return n<t?t:Math.max(t,Math.min(n,e))}function Fi(e,t,n,a){const r=window.innerWidth,o=window.innerHeight,i=Math.max(0,n||0),s=Math.max(0,a||0);let l=e+12,c=t+20;return l+i+8>r&&(l=e-i-12),c+s+8>o&&(c=t-s-20),l=Mi(l,8,r-i-8),c=Mi(c,8,o-s-8),{left:l,top:c}}function Pi({shouldShowFooter:n=!0,shouldShowTitle:a=!0,dataSourceRef:r,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 a=l.current.clientWidth||0,r=l.current.clientHeight||0,{left:o,top:s}=Fi(t,n,a,r);p({top:s,left:o,visibility:"visible"})})},[i]);return t.useEffect(()=>{const e=r.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)}},[r.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(),a=n.width,r=n.height,o=f.current;if(o&&Math.abs(o.w-a)<1&&Math.abs(o.h-r)<1)return;f.current={w:a,h:r};const{left:i,top:s}=Fi(e,t,a,r);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:Hr(wi.tooltip,{[wi.flamegraphDiffTooltip]:d.tooltipData.length>1}),style:{...m,textAlign:"center"},ref:l,children:d.tooltipData.length>0&&e.jsxs(e.Fragment,{children:[a&&e.jsx("div",{className:wi.tooltipName,"data-testid":"tooltip-title",children:d.title.text}),e.jsx("div",{className:wi.functionName,"data-testid":"tooltip-function-name",children:d.title.text}),d.title.diff.text.length>0?e.jsx(Ii,{data:d.tooltipData,diff:d.title.diff,palette:s}):e.jsx(Ii,{data:d.tooltipData,palette:s}),n&&e.jsx(Ei,{clickInfoSide:o})]})})}function Ii({data:t,diff:n,palette:a}){const r=Ti(),[o,i]=t,s="Location"!==r.location;if(!o)return null;let l;switch(o.tooltipType){case"flamegraph":l=()=>{const t=i&&function(e,t){const n=hr(e),a=hr(t);if(!n||!a)return"";const r=a.value-n.value;if(0===r)return"0";const o=r>0?"+":"-",i=Math.abs(r);let s;s=i>=100?i.toFixed(0):i>=10?i.toFixed(1):i.toFixed(2);const l=n.unit||a.unit;return l?`${o}${s} ${l}`:`${o}${s}`}(o.formattedValue,i.formattedValue),l=mr(t,s),c=i&&function(e,t){const n=_i(e),a=_i(t);if(null==n||null==a)return"";const r=a-n;return 0===r?"0":`${r>0?"+":"-"}${Math.abs(r).toLocaleString()}`}(o.samples,i.samples),u=mr(o.formattedValue,s),f=mr(null==i?void 0:i.formattedValue,s),d=null==n?void 0:n.color,h=Ri(t,a),m=Ri(c,a);return e.jsxs(e.Fragment,{children:[i&&e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{}),e.jsx("th",{children:r.baseline}),e.jsx("th",{children:r.comparison}),e.jsx("th",{children:r.diff})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsxs("td",{children:[r.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:[r.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:r.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:[r.self," (",r.tooltipUnitTitles[o.units].total,")"]}),e.jsxs("td",{children:[r.total," (",r.tooltipUnitTitles[o.units].total,")"]})]})}),e.jsx("tbody",{children:e.jsxs("tr",{children:[e.jsxs("td",{children:[r.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:Hr(wi.tooltipTable,{[wi[`${o.tooltipType}${i?"Diff":""}`]]:o.tooltipType}),style:{textAlign:"center",margin:"0 auto"},children:l()})}function Ei({clickInfoSide:t}){const n=Ti();let a;switch(t){case"right":a=e.jsxs(e.Fragment,{children:[e.jsx(yi,{}),e.jsx("span",{children:n.rightClickForMoreNodeOptions})]});break;case"left":a=e.jsxs(e.Fragment,{children:[e.jsx(xi,{}),e.jsx("span",{children:n.clickToHighlightNode})]});break;default:a=e.jsx(e.Fragment,{})}return e.jsx("div",{"data-testid":"tooltip-footer",className:wi.clickInfo,children:a})}function Bi(n){const{format:a,canvasRef:r,xyToData:o,numTicks:i,sampleRate:s,units:l,leftTicks:c,rightTicks:u,palette:f}=n,d=Ti(),h=t.useCallback((e,t,n)=>{const r=br(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,`${gr(p)}%`),samples:"trace_samples"===l?"":dr(m.total),units:l,formattedValue:r.format(m.total,s),tooltipType:"flamegraph"};e({title:{text:m.name,diff:{text:"",color:""}},tooltipData:[t]});break}case"double":{if("single"===a)throw new Error("props format is 'single' but it has been mapped to 'double'");const t=Di({formatter:r,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,a,d]);return e.jsx(Pi,{dataSourceRef:r,clickInfoSide:"right",setTooltipContent:h,palette:f})}function Di({formatter:e,sampleRate:t,totalLeft:n,leftTicks:a,totalRight:r,rightTicks:o,title:i,units:s},l=vi,c){var u,f;const d=o>0?r/o:0,h=gr(a>0?n/a:0),m=gr(d),p={percent:`${h}%`,samples:dr(n),units:s,formattedValue:e.format(n,t),tooltipType:"flamegraph"},g={percent:`${m}%`,samples:dr(r),units:s,formattedValue:e.format(r,t),tooltipType:"flamegraph"};let v=vr(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&&r>0?y=null!==(u=null==c?void 0:c.diffNew)&&void 0!==u?u:"新增":0===r&&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 Li="ContextMenu-module_dummy__5n2-N";function Ai(n){const[a,r]=ri({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(()=>{r(!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,a=e.clientY+20;i({x:n,y:a}),r(!0),d(e.offsetX,e.offsetY)};return e.addEventListener("contextmenu",t),()=>{e.removeEventListener("contextmenu",t)}},[u]),e.jsx(Go,{...a,className:Li,anchorPoint:o,onClose:()=>{r(!1),f()},children:l})}var Oi="LogoLink-module_logoLink__oWRri";function zi(){return e.jsxs("a",{className:Oi,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 $i=()=>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"})}),Vi=()=>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"})}),Hi=()=>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"})}),Wi=({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"})]})]}),Ui=()=>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"})})]}),Qi=()=>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 Ji="Header-module_flamegraphHeader__nIrXP",qi="Header-module_row__P7-2L",Xi="Header-module_flamegraphTitle__sjsvB";function Yi(t){const{format:n,units:a,toolbarVisible:r}=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=r&&"single"===n?e.jsx("div",{className:`${qi} ${Xi}`,role:"heading","aria-level":2,children:o[a]&&e.jsxs(e.Fragment,{children:["Frame width represents ",o[a]]})}):null;return i?e.jsx("div",{className:Ji,children:e.jsx("div",{children:i})}):null}var Zi="FlamegraphBreadcrumb-module_bar__v8uhn",Gi="FlamegraphBreadcrumb-module_chip__pdv1k",Ki="FlamegraphBreadcrumb-module_focusTooltip__nX30y",es="FlamegraphBreadcrumb-module_separator__Zj-rC",ts="FlamegraphBreadcrumb-module_chipSeparator__S-Gld",ns="FlamegraphBreadcrumb-module_unitLabel__bjHEA",as="FlamegraphBreadcrumb-module_focusIcon__aJBb6",rs="FlamegraphBreadcrumb-module_ofTotal__kk4dt",os="FlamegraphBreadcrumb-module_clearBtn__spimK";function is(t){const{totalValueText:n,totalSamplesText:a,samplesLabel:r,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:Zi,"aria-live":"polite",children:[e.jsxs("span",{className:Gi,children:[e.jsx("span",{children:n}),e.jsx("span",{className:es,children:"|"}),e.jsxs("span",{children:[a," ",r]}),e.jsxs("span",{className:ns,children:["(",o,")"]})]}),i&&void 0!==s&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:ts,children:">"}),e.jsxs("span",{className:`${Gi} ${Ki}`,"data-tooltip":h,children:[e.jsx("span",{className:as,"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:rs,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:rs,children:u})]}),e.jsx("button",{type:"button",className:os,"aria-label":f,onClick:e=>{e.preventDefault(),e.stopPropagation(),d()},children:"×"})]})]})]})}var ss="styles-module_flamegraphPane__ejguD",ls="styles-module_fitModeItem__0UBwN",cs="styles-module_sandwichItem__WYvnd",us="styles-module_flamegraphFrame__9ZW-z";function fs(a){const r=t.useRef(null),o=t.useRef(null),l=t.useRef(),c=t.useRef(),u=t.useRef(0),f=t.useRef(null),d=t.useRef(null),m=t.useRef(null),p=t.useRef({rect:!1,text:!1}),g=Ti(),v=t.useRef({lastWidth:0,lastHeight:0}),b="undefined"!=typeof window&&"undefined"!=typeof OffscreenCanvas&&"transferControlToOffscreen"in HTMLCanvasElement.prototype,y=t.useMemo(()=>({collapsedLevelsSingular:g.collapsedLevelsSingular,collapsedLevelsPlural:g.collapsedLevelsPlural,isZh:"Location"!==g.location}),[g.collapsedLevelsSingular,g.collapsedLevelsPlural,g.location]),x=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())}),[]),[w,k]=t.useState(n.Maybe.nothing()),{flamebearer:j,focusedNode:N,fitMode:S,updateFitMode:C,highlightQuery:T,zoom:_,toolbarVisible:R,headerVisible:M=!0,disableClick:F=!1,showSingleLevel:P=!1,showCredit:I,setActiveItem:E,selectedItem:B,updateView:D,enableSandwichView:L=!0,breadcrumb:A}=a,{onZoom:O,onReset:z,isDirty:$,onFocusOnNode:V}=a,{"data-testid":H}=a,{palette:W,setPalette:U}=a,Q=t.useCallback(s(()=>{G(),K()},50),[]);t.useEffect(()=>{if(!b)return()=>{};const e=function(){const e=("undefined"==typeof document?require("url").pathToFileURL(__filename).href:h&&"SCRIPT"===h.tagName.toUpperCase()&&h.src||new URL("index.node.cjs.js",document.baseURI).href).includes("/src/")?new URL("./flamegraphRenderWorker.ts","undefined"==typeof document?require("url").pathToFileURL(__filename).href:h&&"SCRIPT"===h.tagName.toUpperCase()&&h.src||new URL("index.node.cjs.js",document.baseURI).href):new URL("./flamegraphRenderWorker.js","undefined"==typeof document?require("url").pathToFileURL(__filename).href:h&&"SCRIPT"===h.tagName.toUpperCase()&&h.src||new URL("index.node.cjs.js",document.baseURI).href);return new Worker(e,{type:"module"})}();return f.current=e,console.debug("[flamegraph] render worker created"),setTimeout(()=>{G(),K()},0),()=>{e.terminate(),f.current=null,d.current=null,m.current=null,p.current={rect:!1,text:!1},console.debug("[flamegraph] render worker terminated")}},[b]),i(r,()=>{if(l){if(r.current){const e=r.current.clientWidth,t=r.current.clientHeight,n=v.current;if(!(Math.abs(e-n.lastWidth)>=2))return;n.lastWidth=e,n.lastHeight=t}Q()}});const J=(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 a=$(),r=ne().xyToBar(t,n),o=r.isJust?r.value.name:"";return[e.jsxs(li,{disabled:!a,onClick:z,children:[e.jsx(qa,{icon:Kr.faRedo}),g.resetView]},"reset"),(()=>{const t=r.mapOrElse(()=>!1,()=>!0),n=r.mapOrElse(()=>()=>{},e=>V.bind(null,e.i,e.j));return e.jsxs(li,{disabled:!t,onClick:n,children:[e.jsx(qa,{icon:mo.faCompressAlt}),g.collapseNodesAbove]},"focus")})(),e.jsxs(li,{onClick:()=>{navigator.clipboard&&navigator.clipboard.writeText(o)},children:[e.jsx(qa,{icon:ao.faCopy}),g.copyFunctionName]},"copy"),(()=>{const t=B.isJust&&B.value===o?g.clearHighlight:g.highlightSimilarNodes;return e.jsxs(li,{onClick:()=>{E({name:o})},children:[e.jsx(qa,{icon:lo.faHighlighter}),t]},"highlight-similar-nodes")})(),(()=>{if(!D||!L)return null;return e.jsxs(li,{className:cs,onClick:()=>{D("sandwich"),E({name:o})},children:[e.jsx(Wi,{fill:"black"}),g.openInSandwichView]},"open-in-sandwich-view")})(),(()=>{const t=S===Nr;return e.jsxs(li,{className:ls,onClick:()=>{C(t?jr:Nr)},children:[t?e.jsx(Qi,{}):e.jsx(Ui,{}),t?g.showTextTailFirst:g.showTextHeadFirst]},"fit-mode")})()].filter(Boolean)},[l,B,S,$,z,V,E,D,g,L]),X=()=>{const e=u.current+1;if(u.current=e,console.time(`[flamegraph] constructCanvas #${e}`),r.current){const e=new $r(j,r.current,N,S,T,_,W,y);l.current=e}if(o.current){const e=new $r(j,o.current,N,S,T,_,W,y);c.current=e}console.timeEnd(`[flamegraph] constructCanvas #${e}`)},Y=t.useCallback(()=>{if(!b||!f.current)return!1;const e=f.current;if(r.current&&!d.current)try{const t=r.current.transferControlToOffscreen();d.current=t,e.postMessage({type:"init",payload:{kind:"rect",canvas:t}},[t]),p.current.rect=!0}catch(e){console.debug("[flamegraph] rect transfer failed",e)}if(o.current&&!m.current)try{const t=o.current.transferControlToOffscreen();m.current=t,e.postMessage({type:"init",payload:{kind:"text",canvas:t}},[t]),p.current.text=!0}catch(e){console.debug("[flamegraph] text transfer failed",e)}return!0},[b]);t.useEffect(()=>{X(),G(),K()},[W,y]),t.useEffect(()=>{X(),G(),K()},[r.current,j,N,S,_]),t.useEffect(()=>{X(),G(),K()},[T]);const Z=(e,t)=>{if(!b)return!1;if(!f.current)return console.debug("[flamegraph] worker not ready yet"),!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:N.isJust?N.value:null,fitMode:S,highlightQuery:T,zoom:_.isJust?_.value:null,palette:x(W),messages:y,renderRects:t.renderRects,renderText:t.renderText,width:a,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1};return f.current.postMessage({type:"render",payload:i}),!0},G=()=>{var e,t,n;const a=u.current;Z("rect",{renderText:!1})?console.debug(`[flamegraph] renderRects via worker #${a}`):(console.time(`[flamegraph] renderRects #${a}`),null===(e=null==r?void 0:r.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==l?void 0:l.current)||void 0===t||t.render({renderText:!1}),null===(n=null==r?void 0:r.current)||void 0===n||n.setAttribute("data-state","rendered"),console.timeEnd(`[flamegraph] renderRects #${a}`))},K=()=>{var e,t,n;const a=u.current;Z("text",{renderRects:!1})?console.debug(`[flamegraph] renderText via worker #${a}`):(console.time(`[flamegraph] renderText #${a}`),null===(e=null==o?void 0:o.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==c?void 0:c.current)||void 0===t||t.render({renderRects:!1}),null===(n=null==o?void 0:o.current)||void 0===n||n.setAttribute("data-state","rendered"),console.timeEnd(`[flamegraph] renderText #${a}`))},ee=!j||j&&j.names.length<=1,te=()=>{if(!r.current)throw new Error("Missing canvas");return r.current},ne=()=>{if(!l.current)throw new Error("Missing canvas");return l.current};return e.jsxs("div",{"data-testid":"flamegraph-view",className:Hr(ss,{"vertical-orientation":"double"===j.format}),children:[e.jsxs("div",{className:us,children:[A&&e.jsx(is,{totalValueText:A.totalValueText,totalSamplesText:A.totalSamplesText,samplesLabel:A.samplesLabel,unitLabel:A.unitLabel,hasFocus:A.hasFocus,focusPercent:A.focusPercent,focusLabel:A.focusLabel,ofTotalPlacement:A.ofTotalPlacement,ofTotalLabel:A.ofTotalLabel,clearFocusLabel:A.clearFocusLabel,onClearFocus:A.onClearFocus}),M&&e.jsx(Yi,{format:j.format,units:j.units,toolbarVisible:R}),e.jsxs("div",{"data-testid":H,style:{position:"relative",opacity:ee&&!P?0:1},children:[e.jsx("canvas",{height:"0","data-testid":"flamegraph-canvas","data-highlightquery":T,className:Hr("flamegraph-canvas",ui),ref:r,onClick:F?void 0:e=>{const t=ne().xyToBar(e.nativeEvent.offsetX,e.nativeEvent.offsetY);t.match({Nothing:()=>{},Just:e=>{_.match({Nothing:()=>{O(t)},Just:a=>{e.i===a.i&&e.j===a.j?O(n.Maybe.nothing()):O(t)}})}})}}),e.jsx("canvas",{height:"0","data-testid":"flamegraph-text-canvas",className:Hr("flamegraph-text-canvas",fi),ref:o}),l&&r&&e.jsx(hi,{barHeight:ur,canvasRef:r,zoom:_,xyToHighlightData:J}),l&&e.jsx(gi,{barHeight:ur,node:w})]}),I?e.jsx(zi,{}):""]}),l&&e.jsx(Bi,{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}),!F&&l&&r&&e.jsx(Ai,{canvasRef:r,xyToMenuItems:q,onClose:()=>{k(n.Maybe.nothing())},onOpen:(e,t)=>{k(J(e,t))}})]})}var ds,hs={exports:{}};
|
|
12
|
+
function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function w(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,_(a.key),a)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=R(e))||t){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r}}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 j(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function N(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){j(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){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 a,r,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=(a=o.call(n)).done)&&(s.push(a.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw r}}return s}}(e,t)||R(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 T(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||R(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 _(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function M(e){return M="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},M(e)}function R(e,t){if(e){if("string"==typeof e)return x(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)?x(e,t):void 0}}var F=function(){},P={},I={},E=null,L={mark:F,measure:F};try{"undefined"!=typeof window&&(P=window),"undefined"!=typeof document&&(I=document),"undefined"!=typeof MutationObserver&&(E=MutationObserver),"undefined"!=typeof performance&&(L=performance)}catch(ie){}var D=(P.navigator||{}).userAgent,B=void 0===D?"":D,A=P,O=I,z=E,$=L;A.document;var V,H=!!O.documentElement&&!!O.head&&"function"==typeof O.addEventListener&&"function"==typeof O.createElement,W=~B.indexOf("MSIE")||~B.indexOf("Trident/"),U={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"}},J=["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"],Q="classic",X="duotone",q="sharp",Y="sharp-duotone",Z="chisel",G="etch",K="jelly",ee="jelly-duo",te="jelly-fill",ne="notdog",ae="notdog-duo",re="slab",oe="slab-press",ie="thumbprint",se="utility",le="utility-duo",ce="utility-fill",ue="whiteboard",fe=[Q,X,q,Y,Z,G,K,ee,te,ne,ae,re,oe,ie,se,le,ce,ue];j(j(j(j(j(j(j(j(j(j(V={},Q,"Classic"),X,"Duotone"),q,"Sharp"),Y,"Sharp Duotone"),Z,"Chisel"),G,"Etch"),K,"Jelly"),ee,"Jelly Duo"),te,"Jelly Fill"),ne,"Notdog"),j(j(j(j(j(j(j(j(V,ae,"Notdog Duo"),re,"Slab"),oe,"Slab Press"),ie,"Thumbprint"),se,"Utility"),le,"Utility Duo"),ce,"Utility Fill"),ue,"Whiteboard");var de=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}]]),he=["fak","fa-kit","fakd","fa-kit-duotone"],me={fak:"kit","fa-kit":"kit"},pe={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"};j(j({},"kit","Kit"),"kit-duotone","Kit Duotone");var ge,ve={kit:"fak"},be={"kit-duotone":"fakd"},ye="duotone-group",xe="swap-opacity",we="primary",ke="secondary";j(j(j(j(j(j(j(j(j(j(ge={},"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"),j(j(j(j(j(j(j(j(ge,"notdog-duo","Notdog Duo"),"slab","Slab"),"slab-press","Slab Press"),"thumbprint","Thumbprint"),"utility","Utility"),"utility-duo","Utility Duo"),"utility-fill","Utility Fill"),"whiteboard","Whiteboard");j(j({},"kit","Kit"),"kit-duotone","Kit Duotone");var je={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"}},Se=["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"]),Ne=[1,2,3,4,5,6,7,8,9,10],Ce=Ne.concat([11,12,13,14,15,16,17,18,19,20]),Te=[].concat(T(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",ye,xe,we,ke]).concat(Ne.map(function(e){return"".concat(e,"x")})).concat(Ce.map(function(e){return"w-".concat(e)})),_e="___FONT_AWESOME___",Me="svg-inline--fa",Re="data-fa-i2svg",Fe="data-fa-pseudo-element",Pe="data-prefix",Ie="data-icon",Ee="fontawesome-i2svg",Le=["HTML","HEAD","STYLE","SCRIPT"],De=["::before","::after",":before",":after"],Be=function(){try{return"production"===process.env.NODE_ENV}catch(e){return!1}}();function Ae(e){return new Proxy(e,{get:function(e,t){return t in e?e[t]:e[Q]}})}var Oe=N({},U);Oe[Q]=N(N(N(N({},{"fa-duotone":"duotone"}),U[Q]),me),pe);var ze=Ae(Oe),$e=N({},{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"}});$e[Q]=N(N(N(N({},{duotone:"fad"}),$e[Q]),ve),be);var Ve=Ae($e),He=N({},je);He[Q]=N(N({},He[Q]),{fak:"fa-kit"});var We=Ae(He),Ue=N({},{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"}});Ue[Q]=N(N({},Ue[Q]),{"fa-kit":"fak"}),Ae(Ue);var Je=/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)?[\-\ ]/,Qe="fa-layers-text",Xe=/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;Ae(N({},{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 qe=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Ye={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Ze=[].concat(T(["kit"]),T(Te)),Ge=A.FontAwesomeConfig||{};if(O&&"function"==typeof O.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=C(e,2),n=t[0],a=t[1],r=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=O.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(n));null!=r&&(Ge[a]=r)})}var Ke={styleDefault:"solid",familyDefault:Q,cssPrefix:"fa",replacementClass:Me,autoReplaceSvg:!0,autoAddCss:!0,searchPseudoElements:!1,searchPseudoElementsWarnings:!0,searchPseudoElementsFullScan:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Ge.familyPrefix&&(Ge.cssPrefix=Ge.familyPrefix);var et=N(N({},Ke),Ge);et.autoReplaceSvg||(et.observeMutations=!1);var tt={};Object.keys(Ke).forEach(function(e){Object.defineProperty(tt,e,{enumerable:!0,set:function(t){et[e]=t,nt.forEach(function(e){return e(tt)})},get:function(){return et[e]}})}),Object.defineProperty(tt,"familyPrefix",{enumerable:!0,set:function(e){et.cssPrefix=e,nt.forEach(function(e){return e(tt)})},get:function(){return et.cssPrefix}}),A.FontAwesomeConfig=tt;var nt=[];var at=16,rt={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function ot(){for(var e=12,t="";e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function it(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function st(e){return e.classList?it(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(e){return e})}function lt(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function ct(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function ut(e){return e.size!==rt.size||e.x!==rt.x||e.y!==rt.y||e.rotate!==rt.rotate||e.flipX||e.flipY}function ft(){var e="fa",t=Me,n=tt.cssPrefix,a=tt.replacementClass,r=':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||a!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),i=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");r=r.replace(o,".".concat(n,"-")).replace(i,"--".concat(n,"-")).replace(s,".".concat(a))}return r}var dt=!1;function ht(){tt.autoAddCss&&!dt&&(!function(e){if(e&&H){var t=O.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=O.head.childNodes,a=null,r=n.length-1;r>-1;r--){var o=n[r],i=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(a=o)}O.head.insertBefore(t,a)}}(ft()),dt=!0)}var mt={mixout:function(){return{dom:{css:ft,insertCss:ht}}},hooks:function(){return{beforeDOMElementCreation:function(){ht()},beforeI2svg:function(){ht()}}}},pt=A||{};pt[_e]||(pt[_e]={}),pt[_e].styles||(pt[_e].styles={}),pt[_e].hooks||(pt[_e].hooks={}),pt[_e].shims||(pt[_e].shims=[]);var gt=pt[_e],vt=[],bt=function(){O.removeEventListener("DOMContentLoaded",bt),yt=1,vt.map(function(e){return e()})},yt=!1;function xt(e){var t=e.tag,n=e.attributes,a=void 0===n?{}:n,r=e.children,o=void 0===r?[]:r;return"string"==typeof e?lt(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(lt(e[n]),'" ')},"").trim()}(a),">").concat(o.map(xt).join(""),"</").concat(t,">")}function wt(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}H&&((yt=(O.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(O.readyState))||O.addEventListener("DOMContentLoaded",bt));var kt=function(e,t,n,a){var r,o,i,s=Object.keys(e),l=s.length,c=t;for(void 0===n?(r=1,i=e[s[0]]):(r=0,i=n);r<l;r++)i=c(i,e[o=s[r]],o,e);return i};function jt(e){return 1!==T(e).length?null:e.codePointAt(0).toString(16)}function St(e){return Object.keys(e).reduce(function(t,n){var a=e[n];return!!a.icon?t[a.iconName]=a.icon:t[n]=a,t},{})}function Nt(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).skipHooks,a=void 0!==n&&n,r=St(t);"function"!=typeof gt.hooks.addPack||a?gt.styles[e]=N(N({},gt.styles[e]||{}),r):gt.hooks.addPack(e,St(t)),"fas"===e&&Nt("fa",t)}var Ct=gt.styles,Tt=gt.shims,_t=Object.keys(We),Mt=_t.reduce(function(e,t){return e[t]=Object.keys(We[t]),e},{}),Rt=null,Ft={},Pt={},It={},Et={},Lt={};function Dt(e,t){var n,a=t.split("-"),r=a[0],o=a.slice(1).join("-");return r!==e||""===o||(n=o,~Ze.indexOf(n))?null:o}var Bt,At=function(){var e=function(e){return kt(Ct,function(t,n,a){return t[a]=kt(n,e,{}),t},{})};Ft=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}),Pt=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}),Lt=e(function(e,t,n){var a=t[2];return e[n]=n,a.forEach(function(t){e[t]=n}),e});var t="far"in Ct||tt.autoFetchSvg,n=kt(Tt,function(e,n){var a=n[0],r=n[1],o=n[2];return"far"!==r||t||(r="fas"),"string"==typeof a&&(e.names[a]={prefix:r,iconName:o}),"number"==typeof a&&(e.unicodes[a.toString(16)]={prefix:r,iconName:o}),e},{names:{},unicodes:{}});It=n.names,Et=n.unicodes,Rt=Ht(tt.styleDefault,{family:tt.familyDefault})};function Ot(e,t){return(Ft[e]||{})[t]}function zt(e,t){return(Lt[e]||{})[t]}function $t(e){return It[e]||{prefix:null,iconName:null}}function Vt(){return Rt}Bt=function(e){Rt=Ht(e.styleDefault,{family:tt.familyDefault})},nt.push(Bt),At();function Ht(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).family,n=void 0===t?Q:t,a=ze[n][e];if(n===X&&!e)return"fad";var r=Ve[n][e]||Ve[n][a],o=e in gt.styles?e:null;return r||o||null}function Wt(e){return e.sort().filter(function(e,t,n){return n.indexOf(e)===t})}var Ut=Se.concat(he);function Jt(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).skipLookups,n=void 0!==t&&t,a=null,r=Wt(e.filter(function(e){return Ut.includes(e)})),o=Wt(e.filter(function(e){return!Ut.includes(e)})),i=C(r.filter(function(e){return a=e,!J.includes(e)}),1)[0],s=void 0===i?null:i,l=function(e){var t=Q,n=_t.reduce(function(e,t){return e[t]="".concat(tt.cssPrefix,"-").concat(t),e},{});return fe.forEach(function(a){(e.includes(n[a])||e.some(function(e){return Mt[a].includes(e)}))&&(t=a)}),t}(r),c=N(N({},function(e){var t=[],n=null;return e.forEach(function(e){var a=Dt(tt.cssPrefix,e);a?n=a:e&&t.push(e)}),{iconName:n,rest:t}}(o)),{},{prefix:Ht(s,{family:l})});return N(N(N({},c),function(e){var t=e.values,n=e.family,a=e.canonical,r=e.givenPrefix,o=void 0===r?"":r,i=e.styles,s=void 0===i?{}:i,l=e.config,c=void 0===l?{}:l,u=n===X,f=t.includes("fa-duotone")||t.includes("fad"),d="duotone"===c.familyDefault,h="fad"===a.prefix||"fa-duotone"===a.prefix;!u&&(f||d||h)&&(a.prefix="fad");(t.includes("fa-brands")||t.includes("fab"))&&(a.prefix="fab");if(!a.prefix&&Qt.includes(n)){if(Object.keys(s).find(function(e){return Xt.includes(e)})||c.autoFetchSvg){var m=de.get(n).defaultShortPrefixId;a.prefix=m,a.iconName=zt(a.prefix,a.iconName)||a.iconName}}"fa"!==a.prefix&&"fa"!==o||(a.prefix=Vt()||"fas");return a}({values:e,family:l,styles:Ct,config:tt,canonical:c,givenPrefix:a})),function(e,t,n){var a=n.prefix,r=n.iconName;if(e||!a||!r)return{prefix:a,iconName:r};var o="fa"===t?$t(r):{},i=zt(a,r);r=o.iconName||i||r,"far"!==(a=o.prefix||a)||Ct.far||!Ct.fas||tt.autoFetchSvg||(a="fas");return{prefix:a,iconName:r}}(n,a,c))}var Qt=fe.filter(function(e){return e!==Q||e!==X}),Xt=Object.keys(je).filter(function(e){return e!==Q}).map(function(e){return Object.keys(je[e])}).flat();var qt=function(){return w(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),a=0;a<t;a++)n[a]=arguments[a];var r=n.reduce(this._pullDefinitions,{});Object.keys(r).forEach(function(t){e.definitions[t]=N(N({},e.definitions[t]||{}),r[t]),Nt(t,r[t]);var n=We[Q][t];n&&Nt(n,r[t]),At()})}},{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 a=n[t],r=a.prefix,o=a.iconName,i=a.icon,s=i[2];e[r]||(e[r]={}),s.length>0&&s.forEach(function(t){"string"==typeof t&&(e[r][t]=i)}),e[r][o]=i}),e}}])}(),Yt=[],Zt={},Gt={},Kt=Object.keys(Gt);function en(e,t){for(var n=arguments.length,a=new Array(n>2?n-2:0),r=2;r<n;r++)a[r-2]=arguments[r];return(Zt[e]||[]).forEach(function(e){t=e.apply(null,[t].concat(a))}),t}function tn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];(Zt[e]||[]).forEach(function(e){e.apply(null,n)})}function nn(){var e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Gt[e]?Gt[e].apply(null,t):void 0}function an(e){"fa"===e.prefix&&(e.prefix="fas");var t=e.iconName,n=e.prefix||Vt();if(t)return t=zt(n,t)||t,wt(rn.definitions,n,t)||wt(gt.styles,n,t)}var rn=new qt,on={i2svg:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return H?(tn("beforeI2svg",e),nn("pseudoElements2svg",e),nn("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===tt.autoReplaceSvg&&(tt.autoReplaceSvg=!0),tt.observeMutations=!0,e=function(){ln({autoReplaceSvgRoot:n}),tn("watch",t)},H&&(yt?setTimeout(e,0):vt.push(e))}},sn={noAuto:function(){tt.autoReplaceSvg=!1,tt.observeMutations=!1,tn("noAuto")},config:tt,dom:on,parse:{icon:function(e){if(null===e)return null;if("object"===M(e)&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:zt(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=Ht(e[0]);return{prefix:n,iconName:zt(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(tt.cssPrefix,"-"))>-1||e.match(Je))){var a=Jt(e.split(" "),{skipLookups:!0});return{prefix:a.prefix||Vt(),iconName:zt(a.prefix,a.iconName)||a.iconName}}if("string"==typeof e){var r=Vt();return{prefix:r,iconName:zt(r,e)||e}}}},library:rn,findIconDefinition:an,toHtml:xt},ln=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).autoReplaceSvgRoot,t=void 0===e?O:e;(Object.keys(gt.styles).length>0||tt.autoFetchSvg)&&H&&tt.autoReplaceSvg&&sn.dom.i2svg({node:t})};function cn(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return xt(e)})}}),Object.defineProperty(e,"node",{get:function(){if(H){var t=O.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function un(e){var t=e.icons,n=t.main,a=t.mask,r=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=a.found?a:n,h=d.width,m=d.height,p=[tt.replacementClass,o?"".concat(tt.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:N(N({},c.attributes),{},{"data-prefix":r,"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[Re]="");var v=N(N({},g),{},{prefix:r,iconName:o,main:n,mask:a,maskId:l,transform:i,symbol:s,styles:N({},c.styles)}),b=a.found&&n.found?nn("generateAbstractMask",v)||{children:[],attributes:{}}:nn("generateAbstractIcon",v)||{children:[],attributes:{}},y=b.children,x=b.attributes;return v.children=y,v.attributes=x,s?function(e){var t=e.prefix,n=e.iconName,a=e.children,r=e.attributes,o=e.symbol,i=!0===o?"".concat(t,"-").concat(tt.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:N(N({},r),{},{id:i}),children:a}]}]}(v):function(e){var t=e.children,n=e.main,a=e.mask,r=e.attributes,o=e.styles,i=e.transform;if(ut(i)&&n.found&&!a.found){var s={x:n.width/n.height/2,y:.5};r.style=ct(N(N({},o),{},{"transform-origin":"".concat(s.x+i.x/16,"em ").concat(s.y+i.y/16,"em")}))}return[{tag:"svg",attributes:r,children:t}]}(v)}function fn(e){var t=e.content,n=e.width,a=e.height,r=e.transform,o=e.extra,i=e.watchable,s=void 0!==i&&i,l=N(N({},o.attributes),{},{class:o.classes.join(" ")});s&&(l[Re]="");var c=N({},o.styles);ut(r)&&(c.transform=function(e){var t=e.transform,n=e.width,a=void 0===n?16:n,r=e.height,o=void 0===r?16:r,i="";return i+=W?"translate(".concat(t.x/at-a/2,"em, ").concat(t.y/at-o/2,"em) "):"translate(calc(-50% + ".concat(t.x/at,"em), calc(-50% + ").concat(t.y/at,"em)) "),i+="scale(".concat(t.size/at*(t.flipX?-1:1),", ").concat(t.size/at*(t.flipY?-1:1),") "),i+"rotate(".concat(t.rotate,"deg) ")}({transform:r,width:n,height:a}),c["-webkit-transform"]=c.transform);var u=ct(c);u.length>0&&(l.style=u);var f=[];return f.push({tag:"span",attributes:l,children:[t]}),f}var dn=gt.styles;function hn(e){var t=e[0],n=e[1],a=C(e.slice(4),1)[0];return{found:!0,width:t,height:n,icon:Array.isArray(a)?{tag:"g",attributes:{class:"".concat(tt.cssPrefix,"-").concat(Ye.GROUP)},children:[{tag:"path",attributes:{class:"".concat(tt.cssPrefix,"-").concat(Ye.SECONDARY),fill:"currentColor",d:a[0]}},{tag:"path",attributes:{class:"".concat(tt.cssPrefix,"-").concat(Ye.PRIMARY),fill:"currentColor",d:a[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:a}}}}var mn={found:!1,width:512,height:512};function pn(e,t){var n=t;return"fa"===t&&null!==tt.styleDefault&&(t=Vt()),new Promise(function(a,r){if("fa"===n){var o=$t(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&dn[t]&&dn[t][e])return a(hn(dn[t][e]));!function(e,t){Be||tt.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),a(N(N({},mn),{},{icon:tt.showMissingIcons&&e&&nn("missingIconAbstract")||{}}))})}var gn=function(){},vn=tt.measurePerformance&&$&&$.mark&&$.measure?$:{mark:gn,measure:gn},bn='FA "7.1.0"',yn=function(e){vn.mark("".concat(bn," ").concat(e," ends")),vn.measure("".concat(bn," ").concat(e),"".concat(bn," ").concat(e," begins"),"".concat(bn," ").concat(e," ends"))},xn=function(e){return vn.mark("".concat(bn," ").concat(e," begins")),function(){return yn(e)}},wn=function(){};function kn(e){return"string"==typeof(e.getAttribute?e.getAttribute(Re):null)}function jn(e){return O.createElementNS("http://www.w3.org/2000/svg",e)}function Sn(e){return O.createElement(e)}function Nn(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).ceFn,n=void 0===t?"svg"===e.tag?jn:Sn:t;if("string"==typeof e)return O.createTextNode(e);var a=n(e.tag);return Object.keys(e.attributes||[]).forEach(function(t){a.setAttribute(t,e.attributes[t])}),(e.children||[]).forEach(function(e){a.appendChild(Nn(e,{ceFn:n}))}),a}var Cn={replace:function(e){var t=e[0];if(t.parentNode)if(e[1].forEach(function(e){t.parentNode.insertBefore(Nn(e),t)}),null===t.getAttribute(Re)&&tt.keepOriginalSource){var n=O.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(~st(t).indexOf(tt.replacementClass))return Cn.replace(e);var a=new RegExp("".concat(tt.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){var r=n[0].attributes.class.split(" ").reduce(function(e,t){return t===tt.replacementClass||t.match(a)?e.toSvg.push(t):e.toNode.push(t),e},{toNode:[],toSvg:[]});n[0].attributes.class=r.toSvg.join(" "),0===r.toNode.length?t.removeAttribute("class"):t.setAttribute("class",r.toNode.join(" "))}var o=n.map(function(e){return xt(e)}).join("\n");t.setAttribute(Re,""),t.innerHTML=o}};function Tn(e){e()}function _n(e,t){var n="function"==typeof t?t:wn;if(0===e.length)n();else{var a=Tn;"async"===tt.mutateApproach&&(a=A.requestAnimationFrame||Tn),a(function(){var t=!0===tt.autoReplaceSvg?Cn.replace:Cn[tt.autoReplaceSvg]||Cn.replace,a=xn("mutate");e.map(t),a(),n()})}}var Mn=!1;function Rn(){Mn=!0}function Fn(){Mn=!1}var Pn=null;function In(e){if(z&&tt.observeMutations){var t=e.treeCallback,n=void 0===t?wn:t,a=e.nodeCallback,r=void 0===a?wn:a,o=e.pseudoElementsCallback,i=void 0===o?wn:o,s=e.observeMutationsRoot,l=void 0===s?O:s;Pn=new z(function(e){if(!Mn){var t=Vt();it(e).forEach(function(e){if("childList"===e.type&&e.addedNodes.length>0&&!kn(e.addedNodes[0])&&(tt.searchPseudoElements&&i(e.target),n(e.target)),"attributes"===e.type&&e.target.parentNode&&tt.searchPseudoElements&&i([e.target],!0),"attributes"===e.type&&kn(e.target)&&~qe.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){var t=e.getAttribute?e.getAttribute(Pe):null,n=e.getAttribute?e.getAttribute(Ie):null;return t&&n}(e.target)){var a=Jt(st(e.target)),o=a.prefix,s=a.iconName;e.target.setAttribute(Pe,o||t),s&&e.target.setAttribute(Ie,s)}else(l=e.target)&&l.classList&&l.classList.contains&&l.classList.contains(tt.replacementClass)&&r(e.target);var l})}}),H&&Pn.observe(l,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function En(e){var t,n,a=e.getAttribute("data-prefix"),r=e.getAttribute("data-icon"),o=void 0!==e.innerText?e.innerText.trim():"",i=Jt(st(e));return i.prefix||(i.prefix=Vt()),a&&r&&(i.prefix=a,i.iconName=r),i.iconName&&i.prefix||(i.prefix&&o.length>0&&(i.iconName=(t=i.prefix,n=e.innerText,(Pt[t]||{})[n]||Ot(i.prefix,jt(e.innerText)))),!i.iconName&&tt.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function Ln(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0},n=En(e),a=n.iconName,r=n.prefix,o=n.rest,i=function(e){return it(e.attributes).reduce(function(e,t){return"class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e},{})}(e),s=en("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(":"),a=n[0],r=n.slice(1);return a&&r.length>0&&(e[a]=r.join(":").trim()),e},{})),n}(e):[];return N({iconName:a,prefix:r,transform:rt,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:l,attributes:i}},s)}var Dn=gt.styles;function Bn(e){var t="nest"===tt.autoReplaceSvg?Ln(e,{styleParser:!1}):Ln(e);return~t.extra.classes.indexOf(Qe)?nn("generateLayersText",e,t):nn("generateSvgReplacementMutation",e,t)}function An(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!H)return Promise.resolve();var n=O.documentElement.classList,a=function(e){return n.add("".concat(Ee,"-").concat(e))},r=function(e){return n.remove("".concat(Ee,"-").concat(e))},o=tt.autoFetchSvg?[].concat(T(he),T(Se)):J.concat(Object.keys(Dn));o.includes("fa")||o.push("fa");var i=[".".concat(Qe,":not([").concat(Re,"])")].concat(o.map(function(e){return".".concat(e,":not([").concat(Re,"])")})).join(", ");if(0===i.length)return Promise.resolve();var s=[];try{s=it(e.querySelectorAll(i))}catch(e){}if(!(s.length>0))return Promise.resolve();a("pending"),r("complete");var l=xn("onTree"),c=s.reduce(function(e,t){try{var n=Bn(t);n&&e.push(n)}catch(e){Be||"MissingIcon"===e.name&&console.error(e)}return e},[]);return new Promise(function(e,n){Promise.all(c).then(function(n){_n(n,function(){a("active"),a("complete"),r("pending"),"function"==typeof t&&t(),l(),e()})}).catch(function(e){l(),n(e)})})}function On(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Bn(e).then(function(e){e&&_n([e],t)})}var zn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,a=void 0===n?rt:n,r=t.symbol,o=void 0!==r&&r,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 cn(N({type:"icon"},e),function(){return tn("beforeDOMElementCreation",{iconDefinition:e,params:t}),un({icons:{main:hn(b),mask:s?hn(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:g,iconName:v,transform:N(N({},rt),a),symbol:o,maskId:c,extra:{attributes:h,styles:p,classes:f}})})}},$n={mixout:function(){return{icon:(e=zn,function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=(t||{}).icon?t:an(t||{}),r=n.mask;return r&&(r=(r||{}).icon?r:an(r||{})),e(a,N(N({},n),{},{mask:r}))})};var e},hooks:function(){return{mutationObserverCallbacks:function(e){return e.treeCallback=An,e.nodeCallback=On,e}}},provides:function(e){e.i2svg=function(e){var t=e.node,n=void 0===t?O:t,a=e.callback;return An(n,void 0===a?function(){}:a)},e.generateSvgReplacementMutation=function(e,t){var n=t.iconName,a=t.prefix,r=t.transform,o=t.symbol,i=t.mask,s=t.maskId,l=t.extra;return new Promise(function(t,c){Promise.all([pn(n,a),i.iconName?pn(i.iconName,i.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(i){var c=C(i,2),u=c[0],f=c[1];t([e,un({icons:{main:u,mask:f},prefix:a,iconName:n,transform:r,symbol:o,maskId:s,extra:l,watchable:!0})])}).catch(c)})},e.generateAbstractIcon=function(e){var t,n=e.children,a=e.attributes,r=e.main,o=e.transform,i=ct(e.styles);return i.length>0&&(a.style=i),ut(o)&&(t=nn("generateAbstractTransformGrouping",{main:r,transform:o,containerWidth:r.width,iconWidth:r.width})),n.push(t||r.icon),{children:n,attributes:a}}}},Vn={mixout:function(){return{layer:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.classes,a=void 0===n?[]:n;return cn({type:"layer"},function(){tn("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(tt.cssPrefix,"-layers")].concat(T(a)).join(" ")},children:n}]})}}}},Hn={mixout:function(){return{counter:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.title;var n=t.classes,a=void 0===n?[]:n,r=t.attributes,o=void 0===r?{}:r,i=t.styles,s=void 0===i?{}:i;return cn({type:"counter",content:e},function(){return tn("beforeDOMElementCreation",{content:e,params:t}),function(e){var t=e.content,n=e.extra,a=N(N({},n.attributes),{},{class:n.classes.join(" ")}),r=ct(n.styles);r.length>0&&(a.style=r);var o=[];return o.push({tag:"span",attributes:a,children:[t]}),o}({content:e.toString(),extra:{attributes:o,styles:s,classes:["".concat(tt.cssPrefix,"-layers-counter")].concat(T(a))}})})}}}},Wn={mixout:function(){return{text:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,a=void 0===n?rt:n,r=t.classes,o=void 0===r?[]:r,i=t.attributes,s=void 0===i?{}:i,l=t.styles,c=void 0===l?{}:l;return cn({type:"text",content:e},function(){return tn("beforeDOMElementCreation",{content:e,params:t}),fn({content:e,transform:N(N({},rt),a),extra:{attributes:s,styles:c,classes:["".concat(tt.cssPrefix,"-layers-text")].concat(T(o))}})})}}},provides:function(e){e.generateLayersText=function(e,t){var n=t.transform,a=t.extra,r=null,o=null;if(W){var i=parseInt(getComputedStyle(e).fontSize,10),s=e.getBoundingClientRect();r=s.width/i,o=s.height/i}return Promise.resolve([e,fn({content:e.innerHTML,width:r,height:o,transform:n,extra:a,watchable:!0})])}}},Un=new RegExp('"',"ug"),Jn=[1105920,1112319],Qn=N(N(N(N({},{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"}}),Xn=Object.keys(Qn).reduce(function(e,t){return e[t.toLowerCase()]=Qn[t],e},{}),qn=Object.keys(Xn).reduce(function(e,t){var n=Xn[t];return e[t]=n[900]||T(Object.entries(n))[0][1],e},{});function Yn(e,t){var n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(function(a,r){if(null!==e.getAttribute(n))return a();var o,i,s,l=it(e.children).filter(function(e){return e.getAttribute(Fe)===t})[0],c=A.getComputedStyle(e,t),u=c.getPropertyValue("font-family"),f=u.match(Xe),d=c.getPropertyValue("font-weight"),h=c.getPropertyValue("content");if(l&&!f)return e.removeChild(l),a();if(f&&"none"!==h&&""!==h){var m=c.getPropertyValue("content"),p=function(e,t){var n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),a=parseInt(t),r=isNaN(a)?"normal":a;return(Xn[n]||{})[r]||qn[n]}(u,d),g=function(e){return jt(T(e.replace(Un,""))[0]||"")}(m),v=f[0].startsWith("FontAwesome"),b=function(e){var t=e.getPropertyValue("font-feature-settings").includes("ss01"),n=e.getPropertyValue("content").replace(Un,""),a=n.codePointAt(0),r=a>=Jn[0]&&a<=Jn[1],o=2===n.length&&n[0]===n[1];return r||o||t}(c),y=Ot(p,g),x=y;if(v){var w=(i=Et[o=g],s=Ot("fas",o),i||(s?{prefix:"fas",iconName:s}:null)||{prefix:null,iconName:null});w.iconName&&w.prefix&&(y=w.iconName,p=w.prefix)}if(!y||b||l&&l.getAttribute(Pe)===p&&l.getAttribute(Ie)===x)a();else{e.setAttribute(n,x),l&&e.removeChild(l);var k={iconName:null,prefix:null,transform:rt,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},j=k.extra;j.attributes[Fe]=t,pn(y,p).then(function(r){var o=un(N(N({},k),{},{icons:{main:r,mask:{prefix:null,iconName:null,rest:[]}},prefix:p,iconName:x,extra:j,watchable:!0})),i=O.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 xt(e)}).join("\n"),e.removeAttribute(n),a()}).catch(r)}}else a()})}function Zn(e){return Promise.all([Yn(e,"::before"),Yn(e,"::after")])}function Gn(e){return!(e.parentNode===document.head||~Le.indexOf(e.tagName.toUpperCase())||e.getAttribute(Fe)||e.parentNode&&"svg"===e.parentNode.tagName)}var Kn=function(e){return!!e&&De.some(function(t){return e.includes(t)})},ea=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 a,r=k(n);try{for(r.s();!(a=r.n()).done;){var o=a.value;if(Kn(o)){var i=De.reduce(function(e,t){return e.replace(t,"")},o);""!==i&&"*"!==i&&t.add(i)}}}catch(e){r.e(e)}finally{r.f()}return t};function ta(e){if(H){var t;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1])t=e;else if(tt.searchPseudoElementsFullScan)t=e.querySelectorAll("*");else{var n,a=new Set,r=k(document.styleSheets);try{for(r.s();!(n=r.n()).done;){var o=n.value;try{var i,s=k(o.cssRules);try{for(s.s();!(i=s.n()).done;){var l,c=i.value,u=k(ea(c.selectorText));try{for(u.s();!(l=u.n()).done;){var f=l.value;a.add(f)}}catch(e){u.e(e)}finally{u.f()}}}catch(e){s.e(e)}finally{s.f()}}catch(e){tt.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){r.e(e)}finally{r.f()}if(!a.size)return;var d=Array.from(a).join(", ");try{t=e.querySelectorAll(d)}catch(e){}}return new Promise(function(e,n){var a=it(t).filter(Gn).map(Zn),r=xn("searchPseudoElements");Rn(),Promise.all(a).then(function(){r(),Fn(),e()}).catch(function(){r(),Fn(),n()})})}}var na={hooks:function(){return{mutationObserverCallbacks:function(e){return e.pseudoElementsCallback=ta,e}}},provides:function(e){e.pseudoElements2svg=function(e){var t=e.node,n=void 0===t?O:t;tt.searchPseudoElements&&ta(n)}}},aa=!1,ra=function(e){return e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),a=n[0],r=n.slice(1).join("-");if(a&&"h"===r)return e.flipX=!0,e;if(a&&"v"===r)return e.flipY=!0,e;if(r=parseFloat(r),isNaN(r))return e;switch(a){case"grow":e.size=e.size+r;break;case"shrink":e.size=e.size-r;break;case"left":e.x=e.x-r;break;case"right":e.x=e.x+r;break;case"up":e.y=e.y-r;break;case"down":e.y=e.y+r;break;case"rotate":e.rotate=e.rotate+r}return e},{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0})},oa={mixout:function(){return{parse:{transform:function(e){return ra(e)}}}},hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-transform");return n&&(e.transform=ra(n)),e}}},provides:function(e){e.generateAbstractTransformGrouping=function(e){var t=e.main,n=e.transform,a=e.containerWidth,r=e.iconWidth,o={transform:"translate(".concat(a/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(r/2*-1," -256)")}};return{tag:"g",attributes:N({},c.outer),children:[{tag:"g",attributes:N({},c.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:N(N({},t.icon.attributes),c.path)}]}]}}}},ia={x:0,y:0,width:"100%",height:"100%"};function sa(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 la={hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-mask"),a=n?Jt(n.split(" ").map(function(e){return e.trim()})):{prefix:null,iconName:null,rest:[]};return a.prefix||(a.prefix=Vt()),e.mask=a,e.maskId=t.getAttribute("data-fa-mask-id"),e}}},provides:function(e){e.generateAbstractMask=function(e){var t,n=e.children,a=e.attributes,r=e.main,o=e.mask,i=e.maskId,s=e.transform,l=r.width,c=r.icon,u=o.width,f=o.icon,d=function(e){var t=e.transform,n=e.containerWidth,a=e.iconWidth,r={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:r,inner:{transform:"".concat(o," ").concat(i," ").concat(s)},path:{transform:"translate(".concat(a/2*-1," -256)")}}}({transform:s,containerWidth:u,iconWidth:l}),h={tag:"rect",attributes:N(N({},ia),{},{fill:"white"})},m=c.children?{children:c.children.map(sa)}:{},p={tag:"g",attributes:N({},d.inner),children:[sa(N({tag:c.tag,attributes:N(N({},c.attributes),d.path)},m))]},g={tag:"g",attributes:N({},d.outer),children:[p]},v="mask-".concat(i||ot()),b="clip-".concat(i||ot()),y={tag:"mask",attributes:N(N({},ia),{},{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])},y]};return n.push(x,{tag:"rect",attributes:N({fill:"currentColor","clip-path":"url(#".concat(b,")"),mask:"url(#".concat(v,")")},ia)}),{children:n,attributes:a}}}},ca={provides:function(e){var t=!1;A.matchMedia&&(t=A.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){var e=[],n={fill:"currentColor"},a={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:N(N({},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 r=N(N({},a),{},{attributeName:"opacity"}),o={tag:"circle",attributes:N(N({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||o.children.push({tag:"animate",attributes:N(N({},a),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:N(N({},r),{},{values:"1;0;1;1;0;1;"})}),e.push(o),e.push({tag:"path",attributes:N(N({},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:N(N({},r),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:N(N({},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:N(N({},r),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}};!function(e,t){var n=t.mixoutsTo;Yt=e,Zt={},Object.keys(Gt).forEach(function(e){-1===Kt.indexOf(e)&&delete Gt[e]}),Yt.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"===M(t[e])&&Object.keys(t[e]).forEach(function(a){n[e]||(n[e]={}),n[e][a]=t[e][a]})}),e.hooks){var a=e.hooks();Object.keys(a).forEach(function(e){Zt[e]||(Zt[e]=[]),Zt[e].push(a[e])})}e.provides&&e.provides(Gt)})}([mt,$n,Vn,Hn,Wn,na,{mixout:function(){return{dom:{unwatch:function(){Rn(),aa=!0}}}},hooks:function(){return{bootstrap:function(){In(en("mutationObserverCallbacks",{}))},noAuto:function(){Pn&&Pn.disconnect()},watch:function(e){var t=e.observeMutationsRoot;aa?Fn():In(en("mutationObserverCallbacks",{observeMutationsRoot:t}))}}}},oa,la,ca,{hooks:function(){return{parseNodeAttributes:function(e,t){var n=t.getAttribute("data-fa-symbol"),a=null!==n&&(""===n||n);return e.symbol=a,e}}}}],{mixoutsTo:sn});var ua=sn.config,fa=sn.parse,da=sn.icon;function ha(e){return t=e,(t-=0)==t?e:(e=e.replace(/[_-]+(.)?/g,(e,t)=>t?t.toUpperCase():"")).charAt(0).toLowerCase()+e.slice(1);var t}function ma(e){return e.charAt(0).toUpperCase()+e.slice(1)}var pa=new Map;function ga(e){if(pa.has(e))return pa.get(e);const t={};let n=0;const a=e.length;for(;n<a;){const r=e.indexOf(";",n),o=-1===r?a:r,i=e.slice(n,o).trim();if(i){const e=i.indexOf(":");if(e>0){const n=i.slice(0,e).trim(),a=i.slice(e+1).trim();if(n&&a){const e=ha(n);t[e.startsWith("webkit")?ma(e):e]=a}}}n=o+1}if(1e3===pa.size){const e=pa.keys().next().value;e&&pa.delete(e)}return pa.set(e,t),t}var va=function e(t,n,a={}){if("string"==typeof n)return n;const r=(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=ga(String(t));break;case e.startsWith("aria-"):case e.startsWith("data-"):i[e.toLowerCase()]=t;break;default:i[ha(e)]=t}const{style:s,role:l,"aria-label":c,...u}=a;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},...r)}.bind(null,t.createElement),ba=(e,n)=>{const a=t.useId();return e||(n?a:void 0)};"undefined"!=typeof process&&process.env.FA_VERSION;var ya="searchPseudoElementsFullScan"in ua?"7.0.0":"6.0.0",xa=Number.parseInt(ya)>=7,wa="fa",ka="fa-beat",ja="fa-fade",Sa="fa-beat-fade",Na="fa-bounce",Ca="fa-shake",Ta="fa-spin",_a="fa-spin-pulse",Ma="fa-spin-reverse",Ra="fa-pulse",Fa={left:"fa-pull-left",right:"fa-pull-right"},Pa={90:"fa-rotate-90",180:"fa-rotate-180",270:"fa-rotate-270"},Ia={"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"},Ea="fa-border",La="fa-fw",Da="fa-flip",Ba="fa-flip-horizontal",Aa="fa-flip-vertical",Oa="fa-inverse",za="fa-rotate-by",$a="fa-swap-opacity",Va="fa-width-auto";function Ha(e){const t=ua.cssPrefix||ua.familyPrefix||wa;return t===wa?e:e.replace(new RegExp(String.raw`(?<=^|\s)${wa}-`,"g"),`${t}-`)}function Wa(e){if(e)return(e=>"object"==typeof e&&"icon"in e&&!!e.icon)(e)?e:fa.icon(e)}var Ua=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"),Ja={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},Qa=new Set(Object.keys(Ja)),Xa=t.forwardRef((e,t)=>{const n={...Ja,...e},{icon:a,mask:r,symbol:o,title:i,titleId:s,maskId:l,transform:c}=n,u=ba(l,Boolean(r)),f=ba(s,Boolean(i)),d=Wa(a);if(!d)return Ua.error("Icon lookup is undefined",a),null;const h=function(e){const{beat:t,fade:n,beatFade:a,bounce:r,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:x}=e,w=[];return x&&w.push(...x.split(" ")),t&&w.push(ka),n&&w.push(ja),a&&w.push(Sa),r&&w.push(Na),o&&w.push(Ca),i&&w.push(Ta),l&&w.push(Ma),s&&w.push(_a),c&&w.push(Ra),u&&w.push(La),f&&w.push(Oa),d&&w.push(Ea),!0===h&&w.push(Da),"horizontal"!==h&&"both"!==h||w.push(Ba),"vertical"!==h&&"both"!==h||w.push(Aa),null!=m&&w.push(Ia[m]),null!=p&&0!==p&&w.push(Pa[p]),null!=g&&w.push(Fa[g]),v&&w.push($a),xa?(b&&w.push(za),y&&w.push(Va),(ua.cssPrefix||ua.familyPrefix||wa)===wa?w:w.map(Ha)):w}(n),m="string"==typeof c?fa.transform(c):c,p=Wa(r),g=da(d,{...h.length>0&&{classes:h},...m&&{transform:m},...p&&{mask:p},symbol:o,title:i,titleId:f,maskId:u});if(!g)return Ua.error("Could not find icon",d),null;const{abstract:v}=g,b={ref:t};for(const e of(y=n,Object.keys(y)))Qa.has(e)||(b[e]=n[e]);var y;return va(v[0],b)});Xa.displayName="FontAwesomeIcon";var qa={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"};y.bind(qa);const Ya=["dotnetspy","ebpfspy","gospy","phpspy","pyspy","rbspy","nodespy","javaspy","pyroscope-rs","scrape","tracing","unknown"],Za=a.z.preprocess(e=>e&&Ya.includes(e)?e:"unknown",a.z.enum(Ya).default("unknown")),Ga=["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions"],Ka=a.z.preprocess(e=>"string"==typeof e&&Ga.includes(e)?e:"unknown",a.z.enum(["samples","objects","goroutines","bytes","lock_samples","lock_nanoseconds","trace_samples","exceptions","unknown"])),er=a.z.object({names:a.z.array(a.z.preprocess(e=>e||"unknown",a.z.string().min(1))),levels:a.z.array(a.z.array(a.z.number())),numTicks:a.z.number(),maxSelf:a.z.number()}),tr=a.z.object({appName:a.z.string().optional(),name:a.z.string().optional(),startTime:a.z.number().optional(),endTime:a.z.number().optional(),query:a.z.string().optional(),maxNodes:a.z.number().optional(),format:a.z.enum(["single","double"]),sampleRate:a.z.number(),spyName:Za,units:Ka});a.z.object({version:a.z.number().min(1).max(1).default(1),flamebearer:er,metadata:tr,leftTicks:a.z.number().optional(),rightTicks:a.z.number().optional()});const nr={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]},ar={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 rr(e){switch(e){case"single":return nr;case"double":return ar;default:throw new Error(`Unsupported type: '${e}'`)}}const or=a.z.object({refType:a.z.string(),traceID:a.z.string(),spanID:a.z.string()}),ir=a.z.object({key:a.z.string(),type:a.z.string(),value:a.z.union([a.z.boolean(),a.z.number(),a.z.string()])}),sr=a.z.object({traceID:a.z.string(),spanID:a.z.string(),flags:a.z.string(),operationName:a.z.string(),references:a.z.array(or),startTime:a.z.number(),duration:a.z.number(),tags:a.z.array(ir),logs:a.z.object({timestamp:a.z.number(),fields:a.z.array(ir)}),processID:a.z.string(),warnings:a.z.any()}),lr=a.z.object({serviceName:a.z.string(),tags:a.z.array(ir)});a.z.object({traceID:a.z.string(),spans:a.z.array(sr),processes:a.z.record(lr),warnings:a.z.any()});const cr=a.z.object({watermark:a.z.object({}).optional(),startTime:a.z.number(),samples:a.z.array(a.z.number()),durationDelta:a.z.number()});a.z.record(a.z.string(),cr);const ur=22,fr=21.5;function dr(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function hr(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 a=t.match(/^([+\-]?)(\d*\.?\d+)\s*(.*)$/);if(!a)return null;const r=a[1]||"",o=a[2],i=(a[3]||"").trim(),s=parseFloat(o);return Number.isFinite(s)?{value:s,unit:i,hasLessThan:n,sign:r}:null}function mr(e,t=!1){if(!e||!t)return e;const n=hr(e);if(!n)return e;const{unit:a}=n;let r=a;const o=a.toLowerCase();"ms"===o?r="毫秒":"μs"===o||"µs"===o||"us"===o?r="微秒":"second"===o||"seconds"===o?r="秒":"minute"===o||"minutes"===o||"min"===o||"mins"===o?r="分钟":"hour"===o||"hours"===o?r="小时":"day"===o||"days"===o?r="天":"month"===o||"months"===o?r="月":"year"!==o&&"years"!==o||(r="年");const i=String(e).match(/^([<\s]*)([+\-]?\d*\.?\d+)(.*)$/);if(!i)return e;return`${i[1]||""}${i[2]||""} ${r}`.trim()}const pr=[{value:1e15,label:"Quad"},{value:1e12,label:"Tri"},{value:1e9,label:"B"},{value:1e6,label:"M"},{value:1e3,label:"K"}];function gr(e){return Math.round(1e4*e)/100}function vr(e,t){return(t-e)/e*100}function br(e,t,n){switch(n){case"samples":return new yr(e/t);case"objects":case"goroutines":case"lock_samples":case"exceptions":return new wr(e);case"bytes":return new kr(e);case"lock_nanoseconds":return new xr(e);case"trace_samples":return new yr(e/t,"",!0);default:return console.warn(`Unsupported unit: '${n}'. Defaulting to ''`),new yr(e/t," ")}}class yr{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 a=e/t/this.divider;let r=a.toFixed(2);return 0===a?r="0.00":(a>=0&&a<.01||a<=0&&a>-.01)&&(r="< 0.01"),n?`${r} ${this.units||`${this.suffix}${1===a||2===this.suffix.length?"":"s"}`}`:r}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 xr{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 wr{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 kr{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 jr="TAIL",Sr="HEAD";function Nr({mode:e,charSize:t,rectWidth:n,fullText:a,shortText:r}){if(e===jr){if(t*a.length<=n)return{mode:e,text:a,marginLeft:3};const o=t*r.length;return o<=n?{mode:e,text:r,marginLeft:3}:{mode:e,text:r,marginLeft:-(o-n+3)}}return{mode:e,text:a,marginLeft:3}}function Cr(e){return e===jr?{direction:"rtl",overflow:"hidden",textOverflow:"ellipsis"}:{overflow:"hidden",textOverflow:"ellipsis"}}function Tr(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 _r(e,t){return r.rgb(e,e,e).alpha(t)}function Mr(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),a=t.match(n);return a&&a.groups?a.groups.packageName||"":t}function Rr(e,t){const n=function(e,t=0){let n,a,r,o,i,s,l,c;for(n=3&e.length,a=e.length-n,r=t,i=3432918353,s=461845907,c=0;c<a;)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,r^=l,r=r<<13|r>>>19,o=5*(65535&r)+((5*(r>>>16)&65535)<<16)&4294967295,r=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,r^=l}return r^=e.length,r^=r>>>16,r=2246822507*(65535&r)+((2246822507*(r>>>16)&65535)<<16)&4294967295,r^=r>>>13,r=3266489909*(65535&r)+((3266489909*(r>>>16)&65535)<<16)&4294967295,r^=r>>>16,r>>>0}(t,0),a=n%e.colors.length,r=e.colors[a];return r||(console.warn("Could not calculate color. Defaulting to the first one"),e.colors[0])}function Fr(e){const{goodColor:t,neutralColor:n,badColor:a}=e,i=o.scaleLinear().domain([-100,0,100]).range([t.rgb().toString(),n.rgb().toString(),a.rgb().toString()]);return e=>r(i(e).toString())}r.rgb(148,142,142),r.rgb(200,0,0),r.rgb(0,170,0),r("#48CE73");const Pr=new WeakMap,Ir=new WeakMap,Er=new WeakMap,Lr=new WeakMap;const Dr={collapsedLevelsSingular:"total (1 level collapsed)",collapsedLevelsPlural:"total ({n} levels collapsed)",isZh:!1};function Br(e){var t,n,a,r,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:x,sampleRate:w,pxPerTick:k}=e,{rangeMin:j,rangeMax:S}=e,{focusedNode:N,zoom:C}=e,T=e.messages||Dr,_=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=_),j>=S)throw new Error("'rangeMin' should be strictly smaller than 'rangeMax'");const{format:M}=e,R=rr(M),F=m.getContext("2d");if(!F)throw new Error("Could not get ctx");const P=C.mapOrElse(()=>0,e=>e.i),I=br(x,w,g),E=N.isJust,L=N.mapOrElse(()=>0,e=>e.i),D=E?fr:0,B=!!e.highlightQuery&&e.highlightQuery.length>0,A=ur*(b.length-L)+(E?fr:0);e.skipCanvasResize||(m.height=A);const O="number"==typeof e.devicePixelRatio?e.devicePixelRatio:"undefined"!=typeof devicePixelRatio?devicePixelRatio:1;!e.skipDprScale&&O>1&&(m.width*=O,m.height*=O,F.scale(O,O)),F.textBaseline="middle",F.font="400 11.5px SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace";const z=F.measureText("a").width,{names:$}=e,V=function(e){const t=Pr.get(e);if(t)return t;const n=new Map;return Pr.set(e,n),n}(m),H=B?function(e,t){const n=Ir.get(e);if(n){const e=n.get(t);if(e)return e}const a=t.toLowerCase(),r=new Uint8Array(e.length);for(let t=1;t<e.length;t+=1){const n=e[t];n&&n.toLowerCase().includes(a)&&(r[t]=1)}const o=null!=n?n:new Map;return o.set(t,r),Ir.set(e,o),r}($,e.highlightQuery):null,W="single"===e.format?function(e,t,n){const a=`${t}|${n.name}`,r=Er.get(e);if(r){const e=r.get(a);if(e)return e}const o=new Array(e.length);for(let a=0;a<e.length;a+=1){const r=Mr(t,e[a]||"")||"";o[a]=Rr(n,r)}const i=null!=r?r:new Map;return i.set(a,o),Er.set(e,i),o}($,e.spyName,y):null,U="double"===e.format?Fr({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,X=null!==(a=e.startJ)&&void 0!==a?a:0;if(E&&"highlightOnly"!==d&&0===(null!==(r=e.levelStart)&&void 0!==r?r:0)&&0===Q&&0===X){const e=x*k;u&&(F.beginPath(),F.rect(0,0,x*k,fr),F.fillStyle=_r(200,1).rgb().string(),F.fill());const t=N.mapOrElse(()=>"total",e=>function(e,t){return 1===e?t.collapsedLevelsSingular:t.collapsedLevelsPlural.replace("{n}",String(e))}(e.i-1,T)),n=Nr({mode:p,charSize:z,rectWidth:e,fullText:t,shortText:t}),a=0,r=0,o=fr;if(f){F.beginPath(),F.rect(0,0,e,fr),F.save(),F.clip(),F.fillStyle="black";const t=Math.round(Math.max(a,0));F.fillText(n.text,t+n.marginLeft,r+o/2+1),F.restore()}}const q=Math.max(0,null!==(o=e.levelStart)&&void 0!==o?o:0),Y=b.length-L,Z=Math.min(Y,null!==(i=e.levelEnd)&&void 0!==i?i:Y),G=Math.max(q,null!==(s=e.startI)&&void 0!==s?s:q),K=Math.max(0,null!==(l=e.startJ)&&void 0!==l?l:0),{spyName:ee}=e,te=(t,n,a,r,o)=>{const i={level:t,j:n,i:a+N.mapOrElse(()=>0,e=>e.i),names:$,collapsed:r,selectedLevel:P,highlightModeOn:B,isHighlighted:o,spyName:ee,palette:y,colorByNameIndex:W,diffColorFn:U};switch(M){case"single":return function(e){const t=zr(e);if(t)return t;const n=rr("single"),a=e.selectedLevel>e.i?.33:1;let r=e.level[e.j+n.jName];void 0===r&&(console.warn("Could nto find level",{l:e.j,jName:n.jName,level:e.level}),r=-1);if(e.colorByNameIndex&&r>=0&&e.colorByNameIndex[r])return e.colorByNameIndex[r].alpha(a);const o=e.names[r]||"",i=Mr(e.spyName,o)||"";return Rr(e.palette,i).alpha(a)}({...i});case"double":return function(e){const t=zr(e);if(t)return t;const n=e.selectedLevel>e.i?.33:1,{leftRatio:a,rightRatio:r}=function(e,t,n,a){const r=ar;return n&&a?{leftRatio:r.getBarTotalLeft(e,t)/n,rightRatio:r.getBarTotalRght(e,t)/a}:(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=gr(a),i=gr(r);if(e.diffColorFn)return e.diffColorFn(Tr(o,i)).alpha(n);return function(e,t,n){const a=Tr(t,n);return Fr(e)(a)}(e.palette,o,i).alpha(n)}({...i,leftTicks:e.leftTicks,rightTicks:e.rightTicks});default:throw new Error(`Unsupported format: ${M}`)}};if("highlightOnly"===d&&B&&u){const e=function(e,t){const n=Lr.get(e);if(n)return n;const a=rr(t),r=new Map;for(let t=0;t<e.length;t+=1){const n=e[t];for(let e=0;e<n.length;e+=a.jStep){const o=a.getBarName(n,e);if(void 0===o||o<0)continue;const i=r.get(o);i?i.push({i:t,j:e}):r.set(o,[{i:t,j:e}])}}return Lr.set(e,r),r}(b,M),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 a=t[n],r=e.get(a);if(r)for(let e=0;e<r.length;e+=1){const t=r[e],n=t.i-L;if(t.i<L||n<q||n>=Z)continue;const a=b[t.i],o=v(R.getBarOffset(a,t.j)),i=n*ur+D,s=fr,l=R.getBarTotal(a,t.j),c=l*k<=5,u=l*k-(c?0:.5);if(u<=0)continue;F.beginPath(),F.rect(o,i,u,s);const f=te(a,t.j,n,c,!0);F.fillStyle=f.string(),F.fill()}}return{done:!0,nextI:Z,nextJ:0}}for(let e=G;e<Z;e+=1){const t=b[L+e];if(!t)throw new Error(`Could not find level: ${L+e}`);let n=e===G?K:0;for(;n<t.length;n+=R.jStep){const a=R.getBarOffset(t,n),r=v(a),o=e*ur+D,i=fr,s=B&&J(t,n);let l=R.getBarTotal(t,n);const m=l*k<=5;if(m)for(;n<t.length-R.jStep&&a+l===R.getBarOffset(t,n+R.jStep)&&R.getBarTotal(t,n+R.jStep)*k<=5&&s===(B&&J(t,n+R.jStep));)n+=R.jStep,l+=R.getBarTotal(t,n);const g=l*k-(m?0:.5);if(F.beginPath(),F.rect(r,o,g,i),u){if("forceGrey"===d)F.fillStyle=_r(200,.66).rgb().string();else{const a=te(t,n,e,m,s);F.fillStyle=a.string()}F.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=Ar($,n,M,t),y=Nr({mode:p,charSize:z,rectWidth:g,fullText:Or(b,l,w,I,T,V),shortText:b});F.save(),F.clip(),F.fillStyle="black";const x=Math.round(Math.max(r,0));if(F.fillText(y.text,x+y.marginLeft,o+i/2+1),F.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:Z,nextJ:0}}function Ar(e,t,n,a){let r=a[t+rr(n).jName];void 0===r&&(r=-1);const o=e[r];return o||(console.warn("Could not find function name for",{j:t,format:n,level:a,names:e}),"")}function Or(e,t,n,a,r,o){let i=null==o?void 0:o.get(t);if(!i){const e=a.format(t,n);i=mr(e,!!r.isZh)||e,null==o||o.set(t,i)}return`${e} (${i})`}function zr({collapsed:e,highlightModeOn:t,isHighlighted:n}){return e||t&&!n?_r(200,.66):null}class $r{constructor(e,t,n,a,r,o,i,s){if(this.flamebearer=e,this.canvas=t,this.focusedNode=n,this.fitMode=a,this.highlightQuery=r,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,a=null!==(t=this.cachedPxPerTick)&&void 0!==t?t:this.pxPerTick();return(e-this.flamebearer.numTicks*n)*a},this.xyToBarPosition=e=>{const{ff:t}=this,{i:n,j:a}=this.xyToBarIndex(e.x,e.y),r=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,a)),0);return{x:i,y:Math.max((n-r)*ur,0),width:Math.min(this.tickToX(t.getBarOffset(o,a)+t.getBarTotal(o,a))-i,this.getCanvasWidth())}},this.xyToBarData=e=>{const{i:t,j:n}=this.xyToBarIndex(e.x,e.y),a=this.flamebearer.levels[t];if(!a)throw new Error(`Could not find level: '${t}'`);switch(this.flamebearer.format){case"single":{const e=nr;return{format:"single",name:this.flamebearer.names[e.getBarName(a,n)],self:e.getBarSelf(a,n),offset:e.getBarOffset(a,n),total:e.getBarTotal(a,n)}}case"double":{const e=ar;return{format:"double",barTotal:e.getBarTotal(a,n),totalLeft:e.getBarTotalLeft(a,n),totalRight:e.getBarTotalRght(a,n),totalDiff:e.getBarTotalDiff(a,n),name:this.flamebearer.names[e.getBarName(a,n)]}}default:throw new Error("Unsupported type")}},this.isWithinBounds=(e,t)=>{if(e<0||e>this.getCanvasWidth())return!1;try{const{i:n,j:a}=this.xyToBarIndex(e,t);if(-1===a||-1===n)return!1}catch(e){return!1}return!0},this.zoom=o,this.focusedNode=n,this.flamebearer=e,this.canvas=t,this.highlightQuery=r,this.ff=rr(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:a,pxPerTick:r}=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:a,fitMode:this.fitMode,highlightQuery:o,zoom:this.zoom,focusedNode:this.focusedNode,pxPerTick:r,tickToX:e=>(e-this.flamebearer.numTicks*n)*r,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 Br({...i,format:"single"});case"double":return Br({...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:a,focusedNode:r}=this;return a.match({Just:e=>r.match({Just:a=>{const r=n(a),o=t(e);return r.rangeMax-r.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(a)):t(e)},Nothing:()=>t(e)}),Nothing:()=>r.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 a=0,r=t.length-n.jStep;for(;a<=r;){const o=n.jStep*(a/n.jStep+r/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?r=o-n.jStep:a=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<=fr)return{i:0,j:0};const n=this.isFocused()?t-fr:t,a=this.focusedNode.mapOrElse(()=>0,e=>e.i<=0?0:e.i),r=this.zoom.match({Just:()=>this.focusedNode.match({Just:()=>a,Nothing:()=>0}),Nothing:()=>this.focusedNode.match({Just:()=>a,Nothing:()=>0})}),o=Math.floor(n/ur)+r;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 a={x:e,y:t};return this.isWithinBounds(e,t)?n.Maybe.of(a):n.Maybe.nothing()}xyToBar(e,t){return this.parseXY(e,t).map(n=>{const{i:a,j:r}=this.xyToBarIndex(e,t);return{i:a,j:r,...this.xyToBarPosition(n),...this.xyToBarData(n)}})}}function Vr(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Vr(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function Hr(){for(var e,t,n=0,a="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Vr(e))&&(a&&(a+=" "),a+=t);return a}var Wr="NoData-module_noData__WuuID";function Ur(){return e.jsx("div",{"data-testid":"no-data",className:Wr,children:e.jsx("span",{children:"No data available"})})}var Jr,Qr,Xr={},qr={};function Yr(){return Jr||(Jr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="arrow-rotate-right",n=[8635,"arrow-right-rotate","arrow-rotate-forward","redo"],a="f01e",r="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,a,r]},e.faArrowRotateRight=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(qr)),qr}function Zr(){return Qr||(Qr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Yr();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}(Xr)),Xr}var Gr,Kr=Zr(),eo={};function to(){return Gr||(Gr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="copy",n=[],a="f0c5",r="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,a,r]},e.faCopy=e.definition,e.prefix="fas",e.iconName=t,e.width=448,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(eo)),eo}var no,ao=to(),ro={};function oo(){return no||(no=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="highlighter",n=[],a="f591",r="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,a,r]},e.faHighlighter=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(ro)),ro}var io,so,lo=oo(),co={},uo={};function fo(){return io||(io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="down-left-and-up-right-to-center",n=["compress-alt"],a="f422",r="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,a,r]},e.faDownLeftAndUpRightToCenter=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(uo)),uo}function ho(){return so||(so=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=fo();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}(co)),co}var mo=ho();const po=e=>!!e&&"o"===e[0],go=l.unstable_batchedUpdates,vo=(e,t)=>!0===e||!(!e||!e[t]),bo=(e,t)=>"function"==typeof e?e(t):e,yo="_szhsinMenu",xo=(e,t)=>Object.defineProperty(t,yo,{value:e}),wo=(e,t)=>(t&&Object.keys(t).forEach(n=>{const a=e[n],r=t[n];e[n]="function"==typeof r&&a?(...e)=>{r(...e),a(...e)}:r}),e),ko=e=>{for(;e;){if(!(e=e.parentNode)||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:a}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+a+n))return e}};function jo(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function So(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}const No=({block:e,element:n,modifiers:a,className:r})=>t.useMemo(()=>{const t=n?`${e}__${n}`:e;let o=t;a&&Object.keys(a).forEach(e=>{const n=a[e];n&&(o+=` ${t}--${!0===n?e:`${e}-${n}`}`)});let i="function"==typeof r?r(a):r;return"string"==typeof i&&(i=i.trim(),i&&(o+=` ${i}`)),o},[e,n,a,r]),Co="szh-menu",To=t.createContext(),_o=t.createContext({}),Mo=t.createContext({}),Ro=t.createContext({}),Fo=t.createContext({}),Po=t.createContext({}),Io=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Eo=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),Lo=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Do=Object.freeze({FIRST:"first",LAST:"last"}),Bo=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Ao="absolute",Oo="none",zo={preventScroll:!0},$o=xo("MenuButton",t.forwardRef(function({className:n,isOpen:a,disabled:r,children:o,...i},s){const l=t.useMemo(()=>({open:a}),[a]);return e.jsx("button",{"aria-haspopup":!0,"aria-expanded":a,"aria-disabled":r||void 0,type:"button",disabled:r,...i,ref:s,className:No({block:"szh-menu-button",modifiers:l,className:n}),children:o})})),Vo=({className:n,containerRef:a,containerProps:r,children:o,isOpen:i,theming:s,transition:l,onClose:c})=>{const u=vo(l,"item");return e.jsx("div",{...wo({onKeyDown:({key:e})=>{if(e===Io.ESC)bo(c,{key:e,reason:Lo.CANCEL})},onBlur:e=>{i&&!e.currentTarget.contains(e.relatedTarget)&&bo(c,{reason:Lo.BLUR})}},r),className:No({block:"szh-menu-container",modifiers:t.useMemo(()=>({theme:s,itemTransition:u}),[s,u]),className:n}),style:{position:"absolute",...r?.style},ref:a,children:o})},Ho=()=>{let e,t=0;return{toggle:e=>{e?t++:t--,t=Math.max(t,0)},on:(n,a,r)=>{t?e||(e=setTimeout(()=>{e=0,a()},n)):r?.()},off:()=>{e&&(clearTimeout(e),e=0)}}},Wo=(e,t)=>Math.round(e)===t?e:t,Uo=(e,t,n,a)=>{const r=(e=>{const t=e.getBoundingClientRect();return t.width=Wo(t.width,e.offsetWidth),t.height=Wo(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],a=isNaN(t[1])?n:t[1];return{top:n,right:a,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?a:t[3]}})(a),l=e=>e+o.left-i.left-s.left,c=e=>e+o.left+r.width-i.right+s.right,u=e=>e+o.top-i.top-s.top,f=e=>e+o.top+r.height-i.bottom+s.bottom;return{menuRect:r,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}}},Jo=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:a,placeLeftX:r,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=a;"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=r,"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(r),(p>=0||-p<g)&&(m=r,v="left")))),"auto"===h&&(m=l(m));const y=f?(({arrowRef:e,menuY:t,anchorRect:n,containerRect:a,menuRect:r})=>{let o=n.top-a.top-t+n.height/2;const i=1.25*e.current.offsetHeight;return o=Math.max(i,o),o=Math.min(o,r.height-i),o})({menuY:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowY:y,x:m,y:b,computedDirection:v}},Qo=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:a,placeTopY:r,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=a;"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=r,"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(r),(p>=0||-p<g)&&(m=r,v="top")))),"auto"===h&&(m=c(m));const y=f?(({arrowRef:e,menuX:t,anchorRect:n,containerRect:a,menuRect:r})=>{let o=n.left-a.left-t+n.width/2;const i=1.25*e.current.offsetWidth;return o=Math.max(i,o),o=Math.min(o,r.width-i),o})({menuX:b,arrowRef:u,anchorRect:e,containerRect:t,menuRect:n}):void 0;return{arrowX:y,x:b,y:m,computedDirection:v}},Xo="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function qo(e,t){"function"==typeof e?e(t):e.current=t}const Yo=(e,n)=>t.useMemo(()=>e?n?t=>{qo(e,t),qo(n,t)}:e:n,[e,n]),Zo=({ariaLabel:n,menuClassName:a,menuStyle:r,arrow:o,arrowProps:i={},anchorPoint:s,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:x=!0,state:w,endTransition:k,isDisabled:j,menuItemFocus:S,gap:N=0,shift:C=0,children:T,onClose:_,focusProps:M,...R})=>{const[F,P]=t.useState({x:-9999,y:-9999}),[I,E]=t.useState({}),[L,D]=t.useState(),[B,A]=t.useState(p),[O]=t.useState(Ho),[z,$]=t.useReducer(e=>e+1,1),{transition:V,boundingBoxRef:H,boundingBoxPadding:W,rootMenuRef:U,rootAnchorRef:J,scrollNodesRef:Q,reposition:X,viewScroll:q,submenuCloseDelay:Y}=t.useContext(Po),{submenuCtx:Z,reposSubmenu:G=y}=t.useContext(Mo),K=t.useRef(),ee=t.useRef(),te=t.useRef(!1),{hoverItem:ne,dispatch:ae,updateItems:re}=(e=>{const[n,a]=t.useState(),r=t.useRef({items:[],hoverIndex:-1,sorted:!1}).current,o=t.useCallback((t,n)=>{const{items:o}=r;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(zo),a()))}else r.items=[];r.hoverIndex=-1,r.sorted=!1},[r,e]),i=t.useCallback((t,n,o)=>{const{items:i,hoverIndex:s}=r,l=()=>{if(r.sorted)return;const t=e.current.querySelectorAll(".szh-menu__item");i.sort((e,n)=>So(t,e)-So(t,n)),r.sorted=!0};let c,u=-1;switch(t){case Eo.RESET:break;case Eo.SET:c=n;break;case Eo.UNSET:c=e=>e===n?void 0:e;break;case Eo.FIRST:l(),u=0,c=i[u];break;case Eo.LAST:l(),u=i.length-1,c=i[u];break;case Eo.SET_INDEX:l(),u=o,c=i[u];break;case Eo.INCREASE:l(),u=s,u<0&&(u=i.indexOf(n)),u++,u>=i.length&&(u=0),c=i[u];break;case Eo.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),a(c),r.hoverIndex=u},[e,r]);return{hoverItem:n,dispatch:i,updateItems:o}})(K),oe=po(w),ie=vo(V,"open"),se=vo(V,"close"),le=Q.current,ce=t.useCallback(e=>{const t=K.current,n=u.current;if(!t||!n)return;const a=c?c.current?.getBoundingClientRect():s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0,height:0}:null;if(!a)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:ko(U.current))||window);const r=Uo(n,t,le.menu,W);let{arrowX:i,arrowY:l,x:f,y:d,computedDirection:h}=(({arrow:e,align:t,direction:n,gap:a,shift:r,position:o,anchorRect:i,arrowRef:s,positionHelpers:l})=>{const{menuRect:c,containerRect:u}=l,f="left"===n||"right"===n;let d=f?a:r,h=f?r:a;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 x={...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 Jo(x);default:return Qo(x)}})({arrow:o,align:m,direction:p,gap:N,shift:C,position:g,anchorRect:a,arrowRef:ee,positionHelpers:r});const{menuRect:b}=r,y=b.height;if(!e&&"visible"!==v){const{getTopOverflow:e,getBottomOverflow:t}=r;let n,a;const o=t(d);if(o>0)n=y-o,a=o;else{const t=e(d);t<0&&(n=y+t,a=0-t,n>=0&&(d-=t))}n>=0&&D({height:n,overflowAmt:a})}o&&E({x:i,y:l}),P({x:f,y:d}),A(h)},[o,m,W,p,N,C,g,v,s,c,u,H,U,le]);Xo(()=>{oe&&(ce(),te.current&&$()),te.current=oe},[oe,ce,G]),Xo(()=>{L&&!b&&(K.current.scrollTop=0)},[L,b]),Xo(()=>re,[re]),t.useEffect(()=>{let{menu:e}=le;if(!oe||!e)return;if(e=e.addEventListener?e:window,!le.anchors){le.anchors=[];let t=ko(J&&J.current);for(;t&&t!==e;)le.anchors.push(t),t=ko(t)}let t=q;if(le.anchors.length&&"initial"===t&&(t="auto"),"initial"===t)return;const n=()=>{"auto"===t?go(()=>ce(!0)):bo(_,{reason:Lo.SCROLL})},a=le.anchors.concat("initial"!==q?e:[]);return a.forEach(e=>e.addEventListener("scroll",n)),()=>a.forEach(e=>e.removeEventListener("scroll",n))},[J,le,oe,_,q,ce]);const ue=!!L&&L.overflowAmt>0;t.useEffect(()=>{if(ue||!oe||!h)return;const e=()=>go(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"===X)return;const e=[],t=new ResizeObserver(t=>t.forEach(({target:t})=>{e.indexOf(t)<0?e.push(t):l.flushSync(()=>{ce(),$()})})),n={box:"border-box"};t.observe(K.current,n);const a=c?.current;return a&&t.observe(a,n),()=>t.disconnect()},[oe,X,c,ce]),t.useEffect(()=>{if(!oe)return ae(Eo.RESET),void(se||D());const{position:e,alwaysUpdate:t}=S||{},n=()=>{e===Do.FIRST?ae(Eo.FIRST):e===Do.LAST?ae(Eo.LAST):e>=-1&&ae(Eo.SET_INDEX,void 0,e)};if(t)n();else if(x){const e=setTimeout(()=>{const e=K.current;e&&!e.contains(document.activeElement)&&(e.focus(zo),n())},ie?170:100);return()=>clearTimeout(e)}},[oe,ie,se,x,S,ae]);const fe=t.useMemo(()=>({isParentOpen:oe,submenuCtx:O,dispatch:ae,updateItems:re}),[oe,O,ae,re]);let de,he;L&&(b?he=L.overflowAmt:de=L.height);const me=t.useMemo(()=>({reposSubmenu:z,submenuCtx:O,overflow:v,overflowAmt:he,parentMenuRef:K,parentDir:B}),[z,O,v,he,B]),pe=de>=0?{maxHeight:de,overflow:v}:void 0,ge=t.useMemo(()=>({state:w,align:m,dir:B}),[w,m,B]),ve=t.useMemo(()=>({dir:B}),[B]),be=No({block:Co,element:"arrow",modifiers:ve,className:i.className}),ye=e.jsxs("ul",{role:"menu","aria-label":n,...jo(j),...wo({onPointerEnter:Z?.off,onPointerMove:e=>{e.stopPropagation(),O.on(Y,()=>{ae(Eo.RESET),K.current.focus(zo)})},onPointerLeave:e=>{e.target===e.currentTarget&&O.off()},onKeyDown:e=>{switch(e.key){case Io.HOME:ae(Eo.FIRST);break;case Io.END:ae(Eo.LAST);break;case Io.UP:ae(Eo.DECREASE,ne);break;case Io.DOWN:ae(Eo.INCREASE,ne);break;case Io.SPACE:return void(e.target&&-1!==e.target.className.indexOf(Co)&&e.preventDefault());default:return}e.preventDefault(),e.stopPropagation()},onAnimationEnd:()=>{"closing"===w&&D(),bo(k)}},R),ref:Yo(d,K),className:No({block:Co,modifiers:ge,className:a}),style:{...r,...pe,margin:0,display:"closed"===w?"none":void 0,position:Ao,left:F.x,top:F.y},children:[o&&e.jsx("li",{"aria-hidden":!0,...i,className:be,style:{display:"block",position:Ao,left:I.x,top:I.y,...i.style},ref:ee}),e.jsx(Mo.Provider,{value:me,children:e.jsx(_o.Provider,{value:fe,children:e.jsx(To.Provider,{value:ne,children:bo(T,ge)})})})]});return f?e.jsx(Vo,{...f,isOpen:oe,children:ye}):ye},Go=t.forwardRef(function({"aria-label":n,className:a,containerProps:r,initialMounted:o,unmountOnClose:i,transition:s,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},x){const w=t.useRef(null),k=t.useRef({}),{anchorRef:j,state:S,onClose:N}=y,C=t.useMemo(()=>({initialMounted:o,unmountOnClose:i,transition:s,transitionTimeout:c,boundingBoxRef:u,boundingBoxPadding:f,rootMenuRef:w,rootAnchorRef:j,scrollNodesRef:k,reposition:d,viewScroll:p,submenuOpenDelay:h,submenuCloseDelay:m}),[o,i,s,c,j,u,f,d,p,h,m]),T=t.useMemo(()=>({handleClick(e,t){e.stopPropagation||bo(b,e);let n=e.keepOpen;void 0===n&&(n=t&&e.key===Io.SPACE),n||bo(N,{value:e.value,key:e.key,reason:Lo.CLICK})},handleClose(e){bo(N,{key:e,reason:Lo.CLICK})}}),[b,N]);if(!S)return null;const _=e.jsx(Po.Provider,{value:C,children:e.jsx(Ro.Provider,{value:T,children:e.jsx(Zo,{...y,ariaLabel:n||"Menu",externalRef:x,containerRef:w,containerProps:{className:a,containerRef:w,containerProps:r,theming:v,transition:s,onClose:N}})})});return!0===g&&"undefined"!=typeof document?l.createPortal(_,document.body):g?g.target?l.createPortal(_,g.target):g.stablePosition?null:_:_}),Ko=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],ei=e=>({_s:e,status:Ko[e],isEnter:e<3,isMounted:6!==e,isResolved:2===e||e>4}),ti=e=>e?6:5,ni=(e,t,n,a,r)=>{clearTimeout(a.current);const o=ei(e);t(o),n.current=o,r&&r({current:o})},ai=({enter:e=!0,exit:n=!0,preEnter:a,preExit:r,timeout:o,initialEntered:i,mountOnEnter:s,unmountOnExit:l,onStateChange:c}={})=>{const[u,f]=t.useState(()=>ei(i?2:ti(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 ti(t)}})(d.current._s,l);e&&ni(e,f,d,h,c)},[c,l]);return[u,t.useCallback(t=>{const o=e=>{switch(ni(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?a?0:1:2):i&&o(n?r?3:4:ti(l))},[g,c,e,n,a,r,m,p,l]),g]},ri=({initialOpen:e,initialMounted:n,unmountOnClose:a,transition:r,transitionTimeout:o=500,onMenuChange:i}={})=>{const s=vo(r,"open"),l=vo(r,"close"),[{status:c},u,f]=ai({initialEntered:e,mountOnEnter:!n,unmountOnExit:a,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:Bo[c],endTransition:f},u]},oi=parseInt(t.version)<19,ii=t.forwardRef(function({"aria-label":n,captureFocus:a,initialOpen:r,menuButton:o,instanceRef:i,onMenuChange:s,...l},c){const[u,f,d]=(e=>{const[n,a]=ri(e),[r,o]=t.useState();return[{menuItemFocus:r,...n},a,(e,t)=>{o({position:e,alwaysUpdate:t}),a(!0)}]})({...l,onMenuChange:s}),{state:h}=u,m=po(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[a]=t.useState({});return{onMouseDown:()=>{a.v=e&&"closed"!==e},onClick:e=>a.v?a.v=!1:n(!0,e)}})(h,(e,t)=>d(t.detail?void 0:Do.FIRST)),v=t.useCallback(e=>{f(!1),e.key&&p.current.focus()},[f]),b=bo(o,{open:m});if(!b||!b.type)throw new Error("Menu requires a menuButton prop.");const y={...wo({onKeyDown:e=>{switch(e.key){case Io.UP:d(Do.LAST);break;case Io.DOWN:d(Do.FIRST);break;default:return}e.preventDefault()},...g},b.props),ref:Yo(oi?b.ref:b.props.ref,p)};"MenuButton"===b.type[yo]&&(y.isOpen=m);const x=t.cloneElement(b,y);return t.useImperativeHandle(i,()=>({openMenu:d,closeMenu:()=>f(!1)})),e.jsxs(t.Fragment,{children:[x,e.jsx(Go,{...l,...u,"aria-label":n||("string"==typeof b.props.children?b.props.children:"Menu"),anchorRef:p,ref:c,onClose:v})]})}),si=(e,n,a,r)=>{const[o,i,s]=(e=>{const[n,a]=t.useState(!1);return t.useEffect(()=>{!e&&a(!1)},[e]),[n,()=>!n&&a(!0),()=>a(!1)]})(a),{submenuCloseDelay:l}=t.useContext(Po),{isParentOpen:c,submenuCtx:u,dispatch:f,updateItems:d}=t.useContext(_o),h=()=>{!a&&!r&&f(Eo.SET,e.current)},m=()=>{!r&&f(Eo.UNSET,e.current)};return((e,t,n)=>{Xo(()=>{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 a=t.current;return n(a,!0),()=>{n(a)}},[e,t,n])})(r,e,d),t.useEffect(()=>{a&&c&&n.current&&n.current.focus()},[n,a,c]),{mouseOver:o,setHover:h,onBlur:e=>{a&&!e.currentTarget.contains(e.relatedTarget)&&m()},onPointerMove:e=>{r||(e.stopPropagation(),i(),u.on(l,h,h))},onPointerLeave:(e,t)=>{s(),u.off(),!t&&m()}}},li=((n,a)=>{const r=t.memo(a),o=t.forwardRef((n,a)=>{const o=t.useRef(null);return e.jsx(r,{...n,itemRef:o,externalRef:a,isHovering:t.useContext(To)===o.current})});return o.displayName=`WithHovering(${n})`,o})("MenuItem",function({className:n,value:a,href:r,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}=si(f,f,u,m),b=t.useContext(Ro),y=t.useContext(Fo),x="radio"===o,w="checkbox"===o,k=!(!r||m||x||w),j=x?y.value===a:!!w&&!!i,S=e=>{if(m)return e.stopPropagation(),void e.preventDefault();const t={value:a,syntheticEvent:e};void 0!==e.key&&(t.key=e.key),w&&(t.checked=!j),x&&(t.name=y.name),bo(c,t),x&&bo(y.onRadioChange,t),b.handleClick(t,w||x)},N=t.useMemo(()=>({type:o,disabled:m,hover:p||u,checked:j,anchor:k}),[o,m,p,u,j,k]),C=wo({...v,onPointerDown:g,onKeyDown:e=>{if(u)switch(e.key){case Io.ENTER:e.preventDefault();case Io.SPACE:k?f.current.click():S(e)}},onClick:S},h),T={role:x?"menuitemradio":w?"menuitemcheckbox":"menuitem","aria-checked":x||w?j:void 0,...jo(m,u),...C,ref:Yo(d,f),className:No({block:Co,element:"item",modifiers:N,className:n}),children:t.useMemo(()=>bo(l,N),[l,N])};return k?e.jsx("li",{role:Oo,children:e.jsx("a",{href:r,...T})}):e.jsx("li",{...T})}),ci=t.memo(t.forwardRef(function({className:t,...n},a){return e.jsx("li",{role:Oo,...n,ref:a,className:No({block:Co,element:"header",className:t})})}));var ui="canvas-module_canvas__Iiaz4",fi="canvas-module_textCanvas__eFxM4",di="Highlight-module_highlight__1VV-X";function hi(n){const{canvasRef:a,barHeight:r,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:`${r}px`,...t})}else m()})},m=()=>{d({...f.current||{},visibility:"hidden"})};return t.useEffect(()=>{const e=a.current;return e?(e.addEventListener("mousemove",h),e.addEventListener("mouseout",m),()=>{e.removeEventListener("mousemove",h),e.removeEventListener("mouseout",m),u.current&&cancelAnimationFrame(u.current)}):()=>{}},[a.current,h,m]),e.jsx("div",{ref:c,className:di,style:s,"data-testid":"flamegraph-highlight"})}var mi="ContextMenuHighlight-module_highlightContextMenu__WI1nK";const pi={height:"0px",visibility:"hidden"};function gi(n){const{node:a,barHeight:r}=n,[o,i]=t.useState(pi);return t.useEffect(()=>{a.match({Nothing:()=>i(pi),Just:e=>i({visibility:"visible",height:`${r}px`,...e})})},[a]),e.jsx("div",{className:mi,style:o,"data-testid":"flamegraph-highlight-contextmenu"})}const vi={name:"Default",goodColor:r.rgb(0,170,0),neutralColor:r.rgb(148,142,142),badColor:r.rgb(200,0,0),colors:[r.hsl(24,69,60),r.hsl(34,65,65),r.hsl(194,52,61),r.hsl(163,45,55),r.hsl(211,48,60),r.hsl(246,40,65),r.hsl(305,63,79),r.hsl(47,100,73),r.rgb(183,219,171),r.rgb(244,213,152),r.rgb(78,146,249),r.rgb(249,186,143),r.rgb(242,145,145),r.rgb(130,181,216),r.rgb(229,168,226),r.rgb(174,162,224),r.rgb(154,196,138),r.rgb(242,201,109),r.rgb(101,197,219),r.rgb(249,147,78),r.rgb(234,100,96),r.rgb(81,149,206),r.rgb(214,131,206),r.rgb(128,110,183)]},bi={...vi,name:"Color Blind",goodColor:r.rgb(26,133,255),neutralColor:r.rgb(148,142,142),badColor:r.rgb(220,50,32)};function yi(){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 xi(){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 wi={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 ki={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"}]},ji={...ki,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:"千"}]},Si=t.createContext(ki),Ni=Si,Ci=({messages:n,children:a})=>{const r=t.useMemo(()=>{var e;return{...ki,...n,tooltipUnitTitles:{...ki.tooltipUnitTitles,...null!==(e=null==n?void 0:n.tooltipUnitTitles)&&void 0!==e?e:{}}}},[n]);return e.jsx(Si.Provider,{value:r,children:a})},Ti=()=>t.useContext(Si);function _i(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 Mi(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 Ri(e,t,n){return n<t?t:Math.max(t,Math.min(n,e))}function Fi(e,t,n,a){const r=window.innerWidth,o=window.innerHeight,i=Math.max(0,n||0),s=Math.max(0,a||0);let l=e+12,c=t+20;return l+i+8>r&&(l=e-i-12),c+s+8>o&&(c=t-s-20),l=Ri(l,8,r-i-8),c=Ri(c,8,o-s-8),{left:l,top:c}}function Pi({shouldShowFooter:n=!0,shouldShowTitle:a=!0,dataSourceRef:r,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 a=l.current.clientWidth||0,r=l.current.clientHeight||0,{left:o,top:s}=Fi(t,n,a,r);p({top:s,left:o,visibility:"visible"})})},[i]);return t.useEffect(()=>{const e=r.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)}},[r.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(),a=n.width,r=n.height,o=f.current;if(o&&Math.abs(o.w-a)<1&&Math.abs(o.h-r)<1)return;f.current={w:a,h:r};const{left:i,top:s}=Fi(e,t,a,r);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:Hr(wi.tooltip,{[wi.flamegraphDiffTooltip]:d.tooltipData.length>1}),style:{...m,textAlign:"center"},ref:l,children:d.tooltipData.length>0&&e.jsxs(e.Fragment,{children:[a&&e.jsx("div",{className:wi.tooltipName,"data-testid":"tooltip-title",children:d.title.text}),e.jsx("div",{className:wi.functionName,"data-testid":"tooltip-function-name",children:d.title.text}),d.title.diff.text.length>0?e.jsx(Ii,{data:d.tooltipData,diff:d.title.diff,palette:s}):e.jsx(Ii,{data:d.tooltipData,palette:s}),n&&e.jsx(Ei,{clickInfoSide:o})]})})}function Ii({data:t,diff:n,palette:a}){const r=Ti(),[o,i]=t,s="Location"!==r.location;if(!o)return null;let l;switch(o.tooltipType){case"flamegraph":l=()=>{const t=i&&function(e,t){const n=hr(e),a=hr(t);if(!n||!a)return"";const r=a.value-n.value;if(0===r)return"0";const o=r>0?"+":"-",i=Math.abs(r);let s;s=i>=100?i.toFixed(0):i>=10?i.toFixed(1):i.toFixed(2);const l=n.unit||a.unit;return l?`${o}${s} ${l}`:`${o}${s}`}(o.formattedValue,i.formattedValue),l=mr(t,s),c=i&&function(e,t){const n=_i(e),a=_i(t);if(null==n||null==a)return"";const r=a-n;return 0===r?"0":`${r>0?"+":"-"}${Math.abs(r).toLocaleString()}`}(o.samples,i.samples),u=mr(o.formattedValue,s),f=mr(null==i?void 0:i.formattedValue,s),d=null==n?void 0:n.color,h=Mi(t,a),m=Mi(c,a);return e.jsxs(e.Fragment,{children:[i&&e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{}),e.jsx("th",{children:r.baseline}),e.jsx("th",{children:r.comparison}),e.jsx("th",{children:r.diff})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{children:[e.jsxs("td",{children:[r.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:[r.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:r.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:[r.self," (",r.tooltipUnitTitles[o.units].total,")"]}),e.jsxs("td",{children:[r.total," (",r.tooltipUnitTitles[o.units].total,")"]})]})}),e.jsx("tbody",{children:e.jsxs("tr",{children:[e.jsxs("td",{children:[r.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:Hr(wi.tooltipTable,{[wi[`${o.tooltipType}${i?"Diff":""}`]]:o.tooltipType}),style:{textAlign:"center",margin:"0 auto"},children:l()})}function Ei({clickInfoSide:t}){const n=Ti();let a;switch(t){case"right":a=e.jsxs(e.Fragment,{children:[e.jsx(yi,{}),e.jsx("span",{children:n.rightClickForMoreNodeOptions})]});break;case"left":a=e.jsxs(e.Fragment,{children:[e.jsx(xi,{}),e.jsx("span",{children:n.clickToHighlightNode})]});break;default:a=e.jsx(e.Fragment,{})}return e.jsx("div",{"data-testid":"tooltip-footer",className:wi.clickInfo,children:a})}function Li(n){const{format:a,canvasRef:r,xyToData:o,numTicks:i,sampleRate:s,units:l,leftTicks:c,rightTicks:u,palette:f}=n,d=Ti(),h=t.useCallback((e,t,n)=>{const r=br(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,`${gr(p)}%`),samples:"trace_samples"===l?"":dr(m.total),units:l,formattedValue:r.format(m.total,s),tooltipType:"flamegraph"};e({title:{text:m.name,diff:{text:"",color:""}},tooltipData:[t]});break}case"double":{if("single"===a)throw new Error("props format is 'single' but it has been mapped to 'double'");const t=Di({formatter:r,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,a,d]);return e.jsx(Pi,{dataSourceRef:r,clickInfoSide:"right",setTooltipContent:h,palette:f})}function Di({formatter:e,sampleRate:t,totalLeft:n,leftTicks:a,totalRight:r,rightTicks:o,title:i,units:s},l=vi,c){var u,f;const d=o>0?r/o:0,h=gr(a>0?n/a:0),m=gr(d),p={percent:`${h}%`,samples:dr(n),units:s,formattedValue:e.format(n,t),tooltipType:"flamegraph"},g={percent:`${m}%`,samples:dr(r),units:s,formattedValue:e.format(r,t),tooltipType:"flamegraph"};let v=vr(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&&r>0?y=null!==(u=null==c?void 0:c.diffNew)&&void 0!==u?u:"新增":0===r&&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 Bi="ContextMenu-module_dummy__5n2-N";function Ai(n){const[a,r]=ri({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(()=>{r(!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,a=e.clientY+20;i({x:n,y:a}),r(!0),d(e.offsetX,e.offsetY)};return e.addEventListener("contextmenu",t),()=>{e.removeEventListener("contextmenu",t)}},[u]),e.jsx(Go,{...a,className:Bi,anchorPoint:o,onClose:()=>{r(!1),f()},children:l})}var Oi="LogoLink-module_logoLink__oWRri";function zi(){return e.jsxs("a",{className:Oi,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 $i=()=>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"})}),Vi=()=>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"})}),Hi=()=>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"})}),Wi=({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"})]})]}),Ui=()=>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"})})]}),Ji=()=>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 Qi="Header-module_flamegraphHeader__nIrXP",Xi="Header-module_row__P7-2L",qi="Header-module_flamegraphTitle__sjsvB";function Yi(t){const{format:n,units:a,toolbarVisible:r}=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=r&&"single"===n?e.jsx("div",{className:`${Xi} ${qi}`,role:"heading","aria-level":2,children:o[a]&&e.jsxs(e.Fragment,{children:["Frame width represents ",o[a]]})}):null;return i?e.jsx("div",{className:Qi,children:e.jsx("div",{children:i})}):null}var Zi="FlamegraphBreadcrumb-module_bar__v8uhn",Gi="FlamegraphBreadcrumb-module_chip__pdv1k",Ki="FlamegraphBreadcrumb-module_focusTooltip__nX30y",es="FlamegraphBreadcrumb-module_separator__Zj-rC",ts="FlamegraphBreadcrumb-module_chipSeparator__S-Gld",ns="FlamegraphBreadcrumb-module_unitLabel__bjHEA",as="FlamegraphBreadcrumb-module_focusIcon__aJBb6",rs="FlamegraphBreadcrumb-module_ofTotal__kk4dt",os="FlamegraphBreadcrumb-module_clearBtn__spimK";function is(t){const{totalValueText:n,totalSamplesText:a,samplesLabel:r,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:Zi,"aria-live":"polite",children:[e.jsxs("span",{className:Gi,children:[e.jsx("span",{children:n}),e.jsx("span",{className:es,children:"|"}),e.jsxs("span",{children:[a," ",r]}),e.jsxs("span",{className:ns,children:["(",o,")"]})]}),i&&void 0!==s&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:ts,children:">"}),e.jsxs("span",{className:`${Gi} ${Ki}`,"data-tooltip":h,children:[e.jsx("span",{className:as,"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:rs,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:rs,children:u})]}),e.jsx("button",{type:"button",className:os,"aria-label":f,onClick:e=>{e.preventDefault(),e.stopPropagation(),d()},children:"×"})]})]})]})}var ss="styles-module_flamegraphPane__ejguD",ls="styles-module_fitModeItem__0UBwN",cs="styles-module_sandwichItem__WYvnd",us="styles-module_flamegraphFrame__9ZW-z";function fs(a){const r=t.useRef(null),o=t.useRef(null),l=t.useRef(),c=t.useRef(),u=t.useRef(null),f=t.useRef(null),d=t.useRef(null),m=t.useRef({rect:!1,text:!1}),p=Ti(),g=t.useRef({lastWidth:0,lastHeight:0}),v="undefined"!=typeof window&&"undefined"!=typeof OffscreenCanvas&&"transferControlToOffscreen"in HTMLCanvasElement.prototype,b=t.useMemo(()=>({collapsedLevelsSingular:p.collapsedLevelsSingular,collapsedLevelsPlural:p.collapsedLevelsPlural,isZh:"Location"!==p.location}),[p.collapsedLevelsSingular,p.collapsedLevelsPlural,p.location]),y=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,w]=t.useState(n.Maybe.nothing()),{flamebearer:k,focusedNode:j,fitMode:S,updateFitMode:N,highlightQuery:C,zoom:T,toolbarVisible:_,headerVisible:M=!0,disableClick:R=!1,showSingleLevel:F=!1,showCredit:P,setActiveItem:I,selectedItem:E,updateView:L,enableSandwichView:D=!0,breadcrumb:B}=a,{onZoom:A,onReset:O,isDirty:z,onFocusOnNode:$}=a,{"data-testid":V}=a,{palette:H,setPalette:W}=a,U=t.useCallback(s(()=>{Z(),G()},50),[]);t.useEffect(()=>{if(!v)return()=>{};const e=function(){const e=new URL("undefined"==typeof document?require("url").pathToFileURL(__filename).href:h&&"SCRIPT"===h.tagName.toUpperCase()&&h.src||new URL("index.node.cjs.js",document.baseURI).href),t=e.pathname,n=t.includes("/src/");if(t.includes("/dist/"),t.includes("/node_modules/.vite/deps/")){const t=new URL("../../@kylincloud/flamegraph/dist/flamegraphRenderWorker.js",e);return new Worker(t,{type:"module"})}const a=n?new URL("./flamegraphRenderWorker.ts",e):new URL("./flamegraphRenderWorker.js",e);return new Worker(a,{type:"module"})}();return u.current=e,setTimeout(()=>{Z(),G()},0),()=>{e.terminate(),u.current=null,f.current=null,d.current=null,m.current={rect:!1,text:!1}}},[v]),i(r,()=>{if(l){if(r.current){const e=r.current.clientWidth,t=r.current.clientHeight,n=g.current;if(!(Math.abs(e-n.lastWidth)>=2))return;n.lastWidth=e,n.lastHeight=t}U()}});const J=(e,t)=>te().xyToBar(e,t).map(e=>({left:ee().offsetLeft+e.x,top:ee().offsetTop+e.y,width:e.width})),Q=t.useCallback((t,n)=>{const a=z(),r=te().xyToBar(t,n),o=r.isJust?r.value.name:"";return[e.jsxs(li,{disabled:!a,onClick:O,children:[e.jsx(Xa,{icon:Kr.faRedo}),p.resetView]},"reset"),(()=>{const t=r.mapOrElse(()=>!1,()=>!0),n=r.mapOrElse(()=>()=>{},e=>$.bind(null,e.i,e.j));return e.jsxs(li,{disabled:!t,onClick:n,children:[e.jsx(Xa,{icon:mo.faCompressAlt}),p.collapseNodesAbove]},"focus")})(),e.jsxs(li,{onClick:()=>{navigator.clipboard&&navigator.clipboard.writeText(o)},children:[e.jsx(Xa,{icon:ao.faCopy}),p.copyFunctionName]},"copy"),(()=>{const t=E.isJust&&E.value===o?p.clearHighlight:p.highlightSimilarNodes;return e.jsxs(li,{onClick:()=>{I({name:o})},children:[e.jsx(Xa,{icon:lo.faHighlighter}),t]},"highlight-similar-nodes")})(),(()=>{if(!L||!D)return null;return e.jsxs(li,{className:cs,onClick:()=>{L("sandwich"),I({name:o})},children:[e.jsx(Wi,{fill:"black"}),p.openInSandwichView]},"open-in-sandwich-view")})(),(()=>{const t=S===Sr;return e.jsxs(li,{className:ls,onClick:()=>{N(t?jr:Sr)},children:[t?e.jsx(Ji,{}):e.jsx(Ui,{}),t?p.showTextTailFirst:p.showTextHeadFirst]},"fit-mode")})()].filter(Boolean)},[l,E,S,z,O,$,I,L,p,D]),X=()=>{if(r.current){const e=new $r(k,r.current,j,S,C,T,H,b);l.current=e}if(o.current){const e=new $r(k,o.current,j,S,C,T,H,b);c.current=e}},q=t.useCallback(()=>{if(!v||!u.current)return!1;const e=u.current;if(r.current&&!f.current)try{const t=r.current.transferControlToOffscreen();f.current=t,e.postMessage({type:"init",payload:{kind:"rect",canvas:t}},[t]),m.current.rect=!0}catch(e){}if(o.current&&!d.current)try{const t=o.current.transferControlToOffscreen();d.current=t,e.postMessage({type:"init",payload:{kind:"text",canvas:t}},[t]),m.current.text=!0}catch(e){}return!0},[v]);t.useEffect(()=>{X(),Z(),G()},[H,b]),t.useEffect(()=>{X(),Z(),G()},[r.current,k,j,S,T]),t.useEffect(()=>{X(),Z(),G()},[C]);const Y=(e,t)=>{if(!v)return!1;if(!u.current)return!0;if(!q())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:k,focusedNode:j.isJust?j.value:null,fitMode:S,highlightQuery:C,zoom:T.isJust?T.value:null,palette:y(H),messages:b,renderRects:t.renderRects,renderText:t.renderText,width:a,devicePixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1};return u.current.postMessage({type:"render",payload:i}),!0},Z=()=>{var e,t,n;Y("rect",{renderText:!1})||(null===(e=null==r?void 0:r.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==l?void 0:l.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;Y("text",{renderRects:!1})||(null===(e=null==o?void 0:o.current)||void 0===e||e.setAttribute("data-state","rendering"),null===(t=null==c?void 0:c.current)||void 0===t||t.render({renderRects:!1}),null===(n=null==o?void 0:o.current)||void 0===n||n.setAttribute("data-state","rendered"))},K=!k||k&&k.names.length<=1,ee=()=>{if(!r.current)throw new Error("Missing canvas");return r.current},te=()=>{if(!l.current)throw new Error("Missing canvas");return l.current};return e.jsxs("div",{"data-testid":"flamegraph-view",className:Hr(ss,{"vertical-orientation":"double"===k.format}),children:[e.jsxs("div",{className:us,children:[B&&e.jsx(is,{totalValueText:B.totalValueText,totalSamplesText:B.totalSamplesText,samplesLabel:B.samplesLabel,unitLabel:B.unitLabel,hasFocus:B.hasFocus,focusPercent:B.focusPercent,focusLabel:B.focusLabel,ofTotalPlacement:B.ofTotalPlacement,ofTotalLabel:B.ofTotalLabel,clearFocusLabel:B.clearFocusLabel,onClearFocus:B.onClearFocus}),M&&e.jsx(Yi,{format:k.format,units:k.units,toolbarVisible:_}),e.jsxs("div",{"data-testid":V,style:{position:"relative",opacity:K&&!F?0:1},children:[e.jsx("canvas",{height:"0","data-testid":"flamegraph-canvas","data-highlightquery":C,className:Hr("flamegraph-canvas",ui),ref:r,onClick:R?void 0:e=>{const t=te().xyToBar(e.nativeEvent.offsetX,e.nativeEvent.offsetY);t.match({Nothing:()=>{},Just:e=>{T.match({Nothing:()=>{A(t)},Just:a=>{e.i===a.i&&e.j===a.j?A(n.Maybe.nothing()):A(t)}})}})}}),e.jsx("canvas",{height:"0","data-testid":"flamegraph-text-canvas",className:Hr("flamegraph-text-canvas",fi),ref:o}),l&&r&&e.jsx(hi,{barHeight:ur,canvasRef:r,zoom:T,xyToHighlightData:J}),l&&e.jsx(gi,{barHeight:ur,node:x})]}),P?e.jsx(zi,{}):""]}),l&&e.jsx(Li,{format:k.format,canvasRef:r,xyToData:(e,t)=>te().xyToBar(e,t),numTicks:k.numTicks,sampleRate:k.sampleRate,leftTicks:"double"===k.format?k.leftTicks:0,rightTicks:"double"===k.format?k.rightTicks:0,units:k.units,palette:H}),!R&&l&&r&&e.jsx(Ai,{canvasRef:r,xyToMenuItems:Q,onClose:()=>{w(n.Maybe.nothing())},onOpen:(e,t)=>{w(J(e,t))}})]})}var ds,hs={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 ms,ps=(ds||(ds=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=r(e,a(n)))}return e}function a(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 a="";for(var o in e)t.call(e,o)&&e[o]&&(a=r(a,o));return a}function r(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(hs)),hs.exports),gs=m(ps),vs={};function bs(){return ms||(ms=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="crosshairs",n=[],a="f05b",r="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,a,r]},e.faCrosshairs=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(vs)),vs}var ys,xs=bs(),ws={};function ks(){return ys||(ys=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-left",n=[9001],a="f053",r="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,a,r]},e.faChevronLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(ws)),ws}var js,Ns=ks(),Ss={};function Cs(){return js||(js=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-right",n=[9002],a="f054",r="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,a,r]},e.faChevronRight=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Ss)),Ss}var Ts=Cs(),_s="Table-module_table__6A8SM",Rs="Table-module_sortable__J6kyp",Ms="Table-module_sortArrow__Nrncn",Fs="Table-module_sortArrowUp__WmbEG",Ps="Table-module_sortArrowDown__Gyue1",Is="Table-module_asc__tJDI9",Es="Table-module_desc__fjVRY",Bs="Table-module_isRowSelected__UhIAJ",Ds="Table-module_isRowDisabled__sz3NJ",Ls="Table-module_virtualSpacer__C1hxH",As="Table-module_active__EShS8",Os="Table-module_loadingSpinner__SSjMK",zs="Table-module_pagination__VXgcO",$s="Button-module_button__Ed1ge",Vs="Button-module_noIcon__Uzjvv",Hs="Button-module_noBox__mLreC",Ws="Button-module_customIcon__-slpC",Us="Button-module_iconWithText__DQRkr",Qs="Button-module_default__HhXlQ",Js="Button-module_outline__Flf4r",qs="Button-module_float__4marx",Xs="Button-module_primary__xByv0",Ys="Button-module_secondary__D0K-F",Zs="Button-module_danger__5-vIq",Gs="Button-module_grouped__j8KwB";const Ks=t.forwardRef(function({disabled:t=!1,kind:n="default",type:a="button",icon:r,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:a,"data-testid":m["data-testid"],disabled:t,onClick:l,form:f,autoFocus:h,"aria-label":m["aria-label"],className:gs($s,s?Gs:"",el(n),u,d&&Hs,o&&Ws,!r&&!o&&Vs),children:[r?e.jsx(qa,{icon:r,className:i?Us:""}):null,o,i]})});function el(e){switch(e){case"default":return Qs;case"primary":return Xs;case"secondary":return Ys;case"danger":return Zs;case"outline":return Js;case"float":return qs;default:throw Error(`Unsupported kind ${e}`)}}function tl({row:n}){const{cells:a,isRowSelected:r,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:Hr(i,{[Bs]:r,[Ds]:o}),children:a&&a.map(({style:t,value:n,...a},r)=>e.jsx("td",{style:t,...a,children:n},f+r))})}function nl({sortByDirection:n,sortBy:a,updateSortParams:r,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&&a&&r,[g,v]=t.useState(0),[b,y]=t.useState(0),[x,w]=t.useState(null),[k,j]=t.useState(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=()=>{N.current&&cancelAnimationFrame(N.current),N.current=requestAnimationFrame(()=>{y(k.scrollTop||0)})};return k.addEventListener("scroll",e,{passive:!0}),()=>{k.removeEventListener("scroll",e),N.current&&cancelAnimationFrame(N.current)}},[k,u]),t.useEffect(()=>{if(!u||x||!(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&&w(t.height)},[u,x,null==i?void 0:i.current,o]);const S="filled"===o.type?al(o.bodyRows,g,c):null,C="virtual"===o.type?o.rowCount:S?S.length:0,T=f||x||0,_=!!u&&!!k&&("filled"===o.type||"virtual"===o.type)&&T>0,R=_?(()=>{const e=k.clientHeight||0,t=Math.max(0,Math.floor(b/T)-d),n=Math.min(C,Math.ceil((b+e)/T)+d),a=t*T,r=Math.max(0,(C-n)*T),i="filled"===o.type&&S?S.slice(t,n):[];return{viewportHeight:e,totalRows:C,startIndex:t,endIndex:n,topSpacer:a,bottomSpacer:r,visibleRows:i}})():null,M=!!u&&!_&&"filled"===o.type,F=M?(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,I="virtual"===o.type&&P>0?Array.from({length:P},()=>({cells:Array.from({length:o.headRow.length},()=>({value:" "}))})):[],E="virtual"===o.type&&R&&o.range&&o.range.start===R.startIndex&&o.range.end===R.endIndex?o.rows:I;return l?e.jsx("div",{className:Os}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:Hr(_s,{[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:Rs,onClick:()=>r(l)},s,e.jsxs("span",{className:Hr(Ms,{[As]:a===l,[Is]:a===l&&"asc"===n,[Es]:a===l&&"desc"===n}),children:[e.jsx("span",{className:Fs}),e.jsx("span",{className:Ps})]})):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:Ls,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:R.topSpacer,padding:0,border:0}})}),("virtual"===o.type?E:R.visibleRows).map((t,n)=>{var a;return e.jsx(tl,{row:t},null!==(a=t["data-row"])&&void 0!==a?a:`row-${R.startIndex+n}`)}),R.bottomSpacer>0&&e.jsx("tr",{"aria-hidden":"true",className:Ls,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:R.bottomSpacer,padding:0,border:0}})})]}):M?(F||[]).map((t,n)=>{var a;return e.jsx(tl,{row:t},null!==(a=t["data-row"])&&void 0!==a?a:`row-${n}`)}):(S||[]).map((t,n)=>{var a;return e.jsx(tl,{row:t},null!==(a=t["data-row"])&&void 0!==a?a:`row-${n}`)})})]}),e.jsx(rl,{bodyRows:"filled"===o.type?o.bodyRows:void 0,itemsPerPage:c,currPage:g,setCurrPage:v})]})}function al(e,t,n){return n?e.slice(t*n,n*(t+1)):e}function rl({itemsPerPage:t,currPage:n,setCurrPage:a,bodyRows:r}){if(!t)return null;const o=!!r&&al(r,n+1,t).length>0,i=!!r&&al(r,n-1,t).length>0;return e.jsxs("nav",{className:zs,children:[e.jsx(Ks,{"aria-label":"Previous Page",disabled:!i,kind:"float",icon:Ns.faChevronLeft,onClick:()=>a(n-1)}),e.jsx(Ks,{disabled:!o,"aria-label":"Next Page",kind:"float",icon:Ts.faChevronRight,onClick:()=>a(n+1)})]})}function ol({numTicks:n,sampleRate:a,units:r,tableBodyRef:o,palette:i}){const s=br(n,a,r),l=s.format(n,a),c=Ti(),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),a),i=s.format(parseInt(n,10),a),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:r,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=Di({formatter:s,sampleRate:a,totalLeft:parseInt(t,10),leftTicks:parseInt(n,10),totalRight:parseInt(o,10),rightTicks:parseInt(l,10),title:d,units:r},i,c);e({title:u.title,tooltipData:u.tooltipData});break}}},[s,a,r,l,i,c]);return e.jsx(Pi,{dataSourceRef:o,shouldShowTitle:!1,clickInfoSide:"left",setTooltipContent:u,palette:i})}function il(){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]},a=e=>Math.round(1e4*e)/100,r=(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 a=e[o.sortBy]||0,r=t[o.sortBy]||0;return n*(a-r)}case"baseline":{const a=e.leftTicks>0?e.totalLeft/e.leftTicks:0,r=t.leftTicks>0?t.totalLeft/t.leftTicks:0;return n*(a-r)}case"comparison":{const a=e.rightTicks>0?e.totalRght/e.rightTicks:0,r=t.rightTicks>0?t.totalRght/t.rightTicks:0;return n*(a-r)}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=r(a(o),a(i)),u=r(a(s),a(l));return n*(c-u)}default:return 0}}),o.rows=t},s=a=>{const{rows:r,bestNodeByName:s,format:l,leftTicks:c,rightTicks:u}=(a=>{const{names:r,levels:o,format:i}=a,s=new Map,l=new Map,c=a.leftTicks||0,u=a.rightTicks||0;if("double"===i){const t=n;for(let n=0;n<o.length;n+=1){const a=o[n];for(let o=0;o<a.length;o+=t.jStep){const i=r[t.getBarName(a,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(a,o),f.totalRght=e(f.totalRght)+t.getBarTotalRght(a,o);const d=t.getBarTotal(a,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 a=o[t];for(let o=0;o<a.length;o+=n.jStep){const i=r[n.getBarName(a,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(a,o),c.total=e(c.total)+n.getBarTotal(a,o);const u=n.getBarTotal(a,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}})(a.flamebearer);o.baseRows=r,o.bestNodeByName=s,o.format=l,o.leftTicks=c,o.rightTicks=u,o.sortBy=a.sortBy,o.sortByDirection=a.sortByDirection,o.highlightQuery=a.highlightQuery||"",i(),console.debug("[profiler-table-worker] init ready",{rowCount:o.rows.length,sortBy:o.sortBy,sortByDirection:o.sortByDirection,highlightQuery:o.highlightQuery}),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(),console.debug("[profiler-table-worker] update ready",{rowCount:o.rows.length,sortBy:o.sortBy,sortByDirection:o.sortByDirection,highlightQuery:o.highlightQuery}),self.postMessage({type:"ready",payload:{rowCount:o.rows.length}});break;case"range":(e=>{const{start:t,end:n,requestId:a}=e,r=Math.max(0,t),i=Math.min(o.rows.length,n),s=o.rows.slice(r,i);console.debug("[profiler-table-worker] range",{start:r,end:i,requestId:a}),self.postMessage({type:"range",payload:{rows:s,start:r,end:i,requestId:a}})})(t.payload);break;case"findNode":(e=>{const{name:t,requestId:n}=e,a=o.bestNodeByName.get(t);console.debug("[profiler-table-worker] findNode",{name:t,found:!!a,requestId:n}),self.postMessage({type:"findNode",payload:{node:a?{i:a.i,j:a.j}:null,requestId:n}})})(t.payload)}}}).toString()})()`],{type:"text/javascript"});return new Worker(URL.createObjectURL(e))}var sl="ProfilerTable-module_tableContextMenu__7Svm8",ll="ProfilerTable-module_sandwichItem__b9Ipy";const cl=e=>e||0,ul="undefined"!=typeof Worker&&"undefined"!=typeof Blob&&"undefined"!=typeof URL;function fl(e,t,n,a){const r=t;return r.type="single",r.self=cl(r.self)+e.getBarSelf(n,a),r.total=cl(r.total)+e.getBarTotal(n,a),r}function dl(e,t,n,a,r,o){const i=t;return i.type="double",i.self=cl(i.self)+e.getBarSelf(n,a),i.total=cl(i.total)+e.getBarTotal(n,a),i.selfLeft=cl(i.selfLeft)+e.getBarSelfLeft(n,a),i.selfRght=cl(i.selfRght)+e.getBarSelfRght(n,a),i.selfDiff=cl(i.selfDiff)+e.getBarSelfDiff(n,a),i.totalLeft=cl(i.totalLeft)+e.getBarTotalLeft(n,a),i.totalRght=cl(i.totalRght)+e.getBarTotalRght(n,a),i.totalDiff=cl(i.totalDiff)+e.getBarTotalDiff(n,a),i.leftTicks=r,i.rightTicks=o,i}const hl=new WeakMap;function ml(e){const t=hl.get(e);if(t)return t;const n=function(e){if(!e)return[];const{names:t,levels:n,format:a}=e,r="double"!==a?nr:ar,o=new Map;for(let i=0;i<n.length;i++){const s=n[i];for(let n=0;n<s.length;n+=r.jStep){const i=t[r.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"===a?fl(nr,l,s,n):dl(ar,l,s,n,e.leftTicks,e.rightTicks)}}return Array.from(o.values())}(e);return hl.set(e,n),n}function pl(e,t,n){const a=148-e/t*148,r=n.alpha(1);return{backgroundImage:`linear-gradient(${r}, ${r})`,backgroundPosition:`-${a}px 0px`,backgroundRepeat:"no-repeat"}}const gl=({flamebearer:t,sortBy:n,sortByDirection:a,fitMode:r,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=[...ml(t)].sort((e,t)=>t.total-e.total),b="asc"===a?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=vr(gr(e.totalLeft/e.leftTicks),gr(e.totalRght/e.rightTicks)),a=vr(gr(t.totalLeft/t.leftTicks),gr(t.totalRght/t.rightTicks));return b*(n-a)});break;default:y=v}const x=br(d,m,g),w=e=>!!l.isJust&&e===l.value,k=t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:Cr(r),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=gr(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=gr(e.rightTicks>0?e.totalRght/e.rightTicks:0);let a=vr(t,n);Number.isFinite(a)||(a=0);let r="";a>0?r=s.badColor.rgb().string():a<0&&(r=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===a?i="0%":a>0?i=`+${a.toFixed(2)}%`:a<0&&(i=`${a.toFixed(2)}%`),{"data-row":`${e.type};${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:w(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:r}}]}})(e);const t=Rr(p,e.name);return((e,t)=>({"data-row":`${e.type};${e.name};${e.self};${e.total}`,isRowSelected:w(e.name),onClick:()=>o(e),onContextMenu:t=>u(t,e.name),onDoubleClick:()=>f(e.name),cells:[{value:k(e)},{value:x.format(e.self,m),style:pl(e.self,h,t)},{value:x.format(e.total,m),style:pl(e.total,d,t)}]}))(e,Mr(s,t))});return j.length>0?{bodyRows:j,type:"filled"}:{value:e.jsx("div",{className:"unsupported-format",children:c.noItemsFound}),type:"not-filled"}};function vl({tableBodyRef:n,flamebearer:a,isDoubles:r,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}){const v=Ti(),[b,y]=ri({transition:!0}),[x,w]=t.useState({x:0,y:0}),[k,j]=t.useState(null),N=ul,S=t.useRef(null),C=t.useRef(null),T=t.useRef(0),_=t.useRef(0),R=t.useRef(new Map),[M,F]=t.useState(!1),[P,I]=t.useState(0),[E,B]=t.useState([]),[D,L]=t.useState({start:0,end:0}),[A,O]=t.useState(null),[z,$]=t.useState(0),[V,H]=t.useState(0);t.useEffect(()=>{if(!N)return()=>{};const e=il();S.current=e,H(e=>e+1),console.debug("[profiler-table] worker created");const t=e=>{const t=e.data;if(t&&t.type)switch(t.type){case"ready":I(t.payload.rowCount),F(!0),$(e=>e+1),console.debug("[profiler-table] worker ready",{rowCount:t.payload.rowCount});break;case"range":if(t.payload.requestId!==T.current)return;B(t.payload.rows),L({start:t.payload.start,end:t.payload.end}),console.debug("[profiler-table] range received",{start:t.payload.start,end:t.payload.end,rows:t.payload.rows.length});break;case"findNode":{const e=R.current.get(t.payload.requestId);e&&(R.current.delete(t.payload.requestId),e(t.payload.node)),console.debug("[profiler-table] findNode response",{found:!!t.payload.node});break}}};return e.addEventListener("message",t),()=>{e.removeEventListener("message",t),e.terminate(),S.current=null,R.current.clear(),console.debug("[profiler-table] worker terminated")}},[N]);const W=t.useCallback(e=>{if(!N||!S.current)return Promise.resolve(function(e,t){if(!e||!e.levels)return null;const{names:n,levels:a,format:r}=e,o=rr(r);let i=null;for(let e=0;e<a.length;e++){const r=a[e];for(let a=0;a<r.length;a+=o.jStep)if(n[o.getBarName(r,a)]===t){const t=o.getBarTotal(r,a);(!i||t>i.total)&&(i={i:e,j:a,total:t})}}return i?{i:i.i,j:i.j}:null}(a,e));const t=++_.current;return console.debug("[profiler-table] findNode request",{name:e,requestId:t}),new Promise(n=>{var a;R.current.set(t,n),null===(a=S.current)||void 0===a||a.postMessage({type:"findNode",payload:{name:e,requestId:t}})})},[a,N]),U=t.useCallback(e=>{u&&W(e).then(e=>{e&&u(e.i,e.j)})},[u,W]),Q=t.useCallback(e=>{l.isJust&&l.value===e||(console.time(`[profiler-table] dblclick highlight ${e}`),i({name:e}),console.timeEnd(`[profiler-table] dblclick highlight ${e}`)),console.time(`[profiler-table] dblclick focus ${e}`),U(e),console.timeEnd(`[profiler-table] dblclick focus ${e}`)},[U,l,i]),J=t.useCallback((e,t)=>{e.preventDefault(),w({x:e.clientX,y:e.clientY}),j(t),y(!0)},[y]),q=t.useCallback(()=>{y(!1),j(null)},[y]),X=t.useCallback(()=>{k&&(console.time(`[profiler-table] menu focus ${k}`),U(k),console.timeEnd(`[profiler-table] menu focus ${k}`),q())},[k,U,q]),Y=t.useCallback(()=>{k&&navigator.clipboard&&(navigator.clipboard.writeText(k),q())},[k,q]),Z=t.useCallback(()=>{k&&(i({name:k}),q())},[k,i,q]),G=t.useCallback(()=>{k&&f&&(f("sandwich"),i({name:k}),q())},[k,f,i,q]),K=t.useMemo(()=>r?[{sortable:1,name:"name",label:v.location},{sortable:1,name:"baseline",label:v.baseline,default:!0},{sortable:1,name:"comparison",label:v.comparison},{sortable:1,name:"diff",label:v.diff}]:[{sortable:1,name:"name",label:v.location},{sortable:1,name:"self",label:v.self,default:!0},{sortable:1,name:"total",label:v.total}],[v,r]),ee=(e=>{const n=e.filter(e=>null==e?void 0:e.default)[0]||e[0],[a,r]=t.useState(n.name),[o,i]=t.useState("desc");return{sortBy:a,sortByDirection:o,updateSortParams:e=>{let t=o;t=a===e?"asc"===t?"desc":"asc":"desc",r(e),i(t)}}})(K);t.useEffect(()=>{if(!N||!S.current)return;const e=S.current,t={sortBy:ee.sortBy,sortByDirection:ee.sortByDirection,highlightQuery:s};C.current!==a?(C.current=a,F(!1),I(0),B([]),e.postMessage({type:"init",payload:{flamebearer:a,...t}})):(F(!1),B([]),e.postMessage({type:"update",payload:t}))},[a,s,ee.sortBy,ee.sortByDirection,N,V]);const te=t.useCallback((e,t)=>{console.debug("[profiler-table] range requested",{start:e,end:t}),O(n=>n&&n.start===e&&n.end===t?n:{start:e,end:t})},[]);t.useEffect(()=>{if(!N||!S.current||!A)return;const e=++T.current;S.current.postMessage({type:"range",payload:{start:A.start,end:A.end,requestId:e}})},[A,z,N]);const{numTicks:ne,maxSelf:ae,sampleRate:re,spyName:oe,units:ie}=a,se=t.useMemo(()=>br(ne,re,ie),[ne,re,ie]),le=t.useMemo(()=>Cr(o),[o]),ce=t.useCallback(e=>l.isJust&&l.value===e,[l]),ue=t.useCallback(t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:le,children:e.jsx("bdi",{dir:"ltr",children:t})})}),[le]),fe=t.useCallback(e=>{const t=Rr(oe,e.name),n=Mr(c,t);return{"data-row":`single;${e.name};${e.self};${e.total}`,isRowSelected:ce(e.name),onClick:()=>{console.time(`[profiler-table] click ${e.name}`),i({name:e.name}),console.timeEnd(`[profiler-table] click ${e.name}`)},onContextMenu:t=>J(t,e.name),onDoubleClick:()=>Q(e.name),cells:[{value:ue(e.name)},{value:se.format(e.self,re),style:pl(e.self,ae,n)},{value:se.format(e.total,re),style:pl(e.total,ne,n)}]}},[se,J,Q,i,ce,ae,ue,ne,c,re,oe]),de=t.useCallback(e=>{const t=gr(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=gr(e.rightTicks>0?e.totalRght/e.rightTicks:0);let a=vr(t,n);Number.isFinite(a)||(a=0);let r="";a>0?r=c.badColor.rgb().string():a<0&&(r=c.goodColor.rgb().string());let o="";return 0===e.totalLeft&&e.totalRght>0?o=v.diffNew:0===e.totalRght&&e.totalLeft>0?o=v.diffRemoved:0===a?o="0%":a>0?o=`+${a.toFixed(2)}%`:a<0&&(o=`${a.toFixed(2)}%`),{"data-row":`double;${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:ce(e.name),onClick:()=>{console.time(`[profiler-table] click ${e.name}`),i({name:e.name}),console.timeEnd(`[profiler-table] click ${e.name}`)},onContextMenu:t=>J(t,e.name),onDoubleClick:()=>Q(e.name),cells:[{value:ue(e.name)},{value:`${t} %`},{value:`${n} %`},{value:o,style:{color:r}}]}},[J,Q,i,v,ce,ue,c]),he=t.useMemo(()=>N?E.map(e=>"double"===e.type?de(e):fe(e)):[],[de,fe,N,E]),me=t.useMemo(()=>N?M&&0===P?{headRow:K,type:"not-filled",value:e.jsx("div",{className:"unsupported-format",children:v.noItemsFound})}:{headRow:K,type:"virtual",rowCount:P,rows:he,range:D,onRangeChange:te}:{headRow:K,...gl({flamebearer:a,sortBy:ee.sortBy,sortByDirection:ee.sortByDirection,fitMode:o,handleTableItemClick:i,highlightQuery:s,palette:c,selectedItem:l,messages:v,onRowContextMenu:J,onRowDoubleClick:Q})},[de,fe,d,o,a,J,Q,te,i,s,v,u,c,P,l,K,ee.sortBy,ee.sortByDirection,f,N,he,D,M]),pe=l.isJust&&l.value===k;return e.jsxs(e.Fragment,{children:[e.jsx(nl,{...ee,tableBodyRef:n,table:me,isLoading:N&&!M,className:gs("flamegraph-table",{"flamegraph-table-doubles":r}),virtualize:h,virtualizeRowHeight:m,virtualizeOverscan:p,scrollRef:g}),e.jsxs(Go,{...b,anchorPoint:x,onClose:q,className:sl,children:[u&&e.jsxs(li,{onClick:X,children:[e.jsx(qa,{icon:xs.faCrosshairs}),v.focusOnThisFunction]}),e.jsxs(li,{onClick:Y,children:[e.jsx(qa,{icon:ao.faCopy}),v.copyFunctionName]}),e.jsxs(li,{onClick:Z,children:[e.jsx(qa,{icon:lo.faHighlighter}),pe?v.clearHighlight:v.highlightSimilarNodes]}),f&&d&&e.jsxs(li,{onClick:G,className:ll,children:[e.jsx(Wi,{fill:"currentColor"}),v.openInSandwichView]})]})]})}const bl=t.memo(function({flamebearer:n,fitMode:a,handleTableItemClick:r,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="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,g,m]),e.jsxs("div",{"data-testid":"table-view",ref:d,style:{"--kylin-flamegraph-scrollbar-size":`${m}px`},className:g?"flamegraph-table-wrapper flamegraph-table-wrapper--double":"flamegraph-table-wrapper",children:[e.jsx("div",{className:"flamegraph-table-scroll",ref:h,children:e.jsx(vl,{tableBodyRef:f,flamebearer:n,isDoubles:g,fitMode:a,highlightQuery:o,handleTableItemClick:r,palette:i,selectedItem:s,onFocusOnNode:l,updateView:c,enableSandwichView:u,virtualize:!0,virtualizeRowHeight:26,virtualizeOverscan:8,scrollRef:h})}),e.jsx(ol,{tableBodyRef:f,numTicks:n.numTicks,sampleRate:n.sampleRate,units:n.units,palette:i})]})});var yl,xl,wl={},kl={};function jl(){return yl||(yl=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"],a="f0e2",r="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,a,r]},e.faArrowRotateLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(kl)),kl}function Nl(){return xl||(xl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=jl();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}(wl)),wl}var Sl,Cl,Tl=Nl(),_l={},Rl={};function Ml(){return Sl||(Sl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="diagram-project",n=["project-diagram"],a="f542",r="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,a,r]},e.faDiagramProject=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Rl)),Rl}function Fl(){return Cl||(Cl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ml();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}(_l)),_l}var Pl,Il,El=Fl(),Bl={},Dl={};function Ll(){return Pl||(Pl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="ellipsis-vertical",n=["ellipsis-v"],a="f142",r="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,a,r]},e.faEllipsisVertical=e.definition,e.prefix="fas",e.iconName=t,e.width=128,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Dl)),Dl}function Al(){return Il||(Il=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Ll();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}(Bl)),Bl}var Ol=Al(),zl="Tooltip-module_tooltipWrapper__leDK-",$l="Tooltip-module_tooltipBubble__8vweF",Vl="Tooltip-module_tooltipArrow__7wGyN";function Hl(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=>Hl(e)).filter(e=>!!e);return t.length?t.join(" "):void 0}return t.isValidElement(e)?Hl(e.props.children):void 0}}const Wl=({placement:n,title:a,content:r,children:o})=>{const i=Hl(null!=a?a:r),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:zl,"data-placement":n||"top","data-tooltip":l?i:void 0,title:l?void 0:i,children:[o,l?e.jsxs("span",{className:$l,role:"tooltip",children:[i,e.jsx("span",{className:Vl})]}):null]}):e.jsx(e.Fragment,{children:o})};var Ul,Ql={};function Jl(){return Ul||(Ul=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="link",n=[128279,"chain"],a="f0c1",r="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,a,r]},e.faLink=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Ql)),Ql}var ql,Xl,Yl=Jl(),Zl={},Gl={};function Kl(){return ql||(ql=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="magnifying-glass",n=[128269,"search"],a="f002",r="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,a,r]},e.faMagnifyingGlass=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Gl)),Gl}function ec(){return Xl||(Xl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Kl();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}(Zl)),Zl}var tc=ec(),nc="Input-module_input__ulQdV";const ac=t.forwardRef(({testId:t,className:n,type:a,name:r,placeholder:o,minLength:i=0,debounceTimeout:s=100,onChange:l,value:u,htmlId:f},d)=>e.jsx(c.DebounceInput,{inputRef:d,"data-testid":t,className:`${nc} ${n||""}`,type:a,name:r,placeholder:o,minLength:i,debounceTimeout:s,onChange:l,value:u,id:f}));var rc="SharedQueryInput-module_wrapper__XRxrd",oc="SharedQueryInput-module_search__XlzRv",ic="SharedQueryInput-module_search-synced__J4T4b",sc="SharedQueryInput-module_searchWithSync__ryuQa",lc="SharedQueryInput-module_icon__Aq0Hv",cc="SharedQueryInput-module_checked__oRvod",uc="SharedQueryInput-module_sync__0IO2N",fc="SharedQueryInput-module_syncSelected__hstBI",dc="SharedQueryInput-module_searchIcon__kfJxO";const hc=({onHighlightChange:n,highlightQuery:a,sharedQuery:r,width:o})=>{const i=Ti(),s=(e=>{const n=t.useRef();return t.useEffect(()=>{n.current=e},[e]),n.current})(null==r?void 0:r.syncEnabled),l=t.useRef(null),[c,u]=t.useState(!1);t.useEffect(()=>{"string"==typeof(null==r?void 0:r.searchQuery)&&(r.syncEnabled&&n(r.searchQuery),!r.syncEnabled&&s&&s!==(null==r?void 0:r.id)&&n(""))},[null==r?void 0:r.searchQuery,null==r?void 0:r.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(()=>r&&r.syncEnabled?r.searchQuery||"":a,[r,a]),d=t.useMemo(()=>`${r?sc:oc} ${(null==r?void 0:r.syncEnabled)?ic:""}`,[r]),h=(null==r?void 0:r.syncEnabled)?i.unsyncSearchBars:i.syncSearchBars;return e.jsxs("div",{ref:l,className:rc,style:{width:o},children:[e.jsx("span",{className:dc,children:e.jsx(qa,{icon:tc.faSearch})}),e.jsx(ac,{testId:"flamegraph-search",className:d,type:"search",name:"flamegraph-search",placeholder:c?"搜索函数 / 过滤":i.searchPlaceholder,minLength:1,debounceTimeout:100,onChange:e=>{n(e.target.value),r&&r.syncEnabled&&r.onQueryChange(e.target.value)},value:f}),r?e.jsx(Wl,{placement:"top",title:h,children:e.jsx("button",{className:r.syncEnabled?fc:uc,onClick:()=>{const e=!(null==r?void 0:r.syncEnabled)&&(null==r?void 0:r.id);null==r||r.toggleSync(e),e?null==r||r.onQueryChange(a):(n(a),null==r||r.onQueryChange(""))},children:e.jsx(qa,{className:`${r.syncEnabled?cc:lc}`,icon:Yl.faLink})})}):null]})};var mc="DiffLegend-module_flamegraph-legend__Cywr1",pc="DiffLegend-module_flamegraph-legend-list__swdXj",gc="DiffLegend-module_flamegraph-legend-item__0P-6g";function vc(t){const{palette:n,showMode:a}=t,r=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}`)}}(a),o=Fr(n),i="small"===a?{"--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:`${mc} ${pc}`,style:i,children:r.map(t=>e.jsxs("div",{className:gc,style:{backgroundColor:o(t).rgb().toString()},children:[t>0?"+":"",t,"%"]},t))})}var bc="Dropdown-module_dropdownMenu__tbN8r",yc="Dropdown-module_dropdownMenuButton__Xy8M4";function xc({id:t,children:n,className:a,disabled:r,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(kc,{"aria-label":p,className:`${yc} ${m}`,disabled:r,type:"button",children:o||i});return e.jsxs(ii,{id:t,"aria-label":p,className:gs(a,bc),"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(ci,{children:i}),n]})}const wc=li,kc=$o;var jc="DiffLegendPaletteDropdown-module_container__h8Tts",Nc="DiffLegendPaletteDropdown-module_triggerButton__oezA6",Sc="DiffLegendPaletteDropdown-module_dropdownArrow__-Lu0w",Cc="DiffLegendPaletteDropdown-module_menuItem__5iWry",Tc="DiffLegendPaletteDropdown-module_menuItemText__a-tt0",_c="DiffLegendPaletteDropdown-module_dropdownMenu__G0NkR",Rc="DiffLegendPaletteDropdown-module_menuItemWrapper__vAw-Q",Mc="DiffLegendPaletteDropdown-module_menuItemSelected__1gu9m";const Fc=[vi,bi],Pc=t=>{const{palette:n=vi,onChange:a}=t,r=Ti(),o=e=>"Default"===e.name?r.paletteDefaultName:"Color Blind"===e.name?r.paletteColorBlindName:e.name,i=e=>"Default"===e.name?r.paletteDefaultDesc:"Color Blind"===e.name?r.paletteColorBlindDesc:"";return e.jsx("div",{className:jc,children:e.jsx(xc,{label:r.diffLegendSelectPalette,align:"end",className:_c,menuButton:e.jsxs(kc,{className:gs(yc,Nc),children:[e.jsx(vc,{palette:n,showMode:"small"}),e.jsx("span",{className:Sc})]}),onItemClick:e=>{e.value&&a(e.value)},children:Fc.map(t=>e.jsx(wc,{value:t,className:gs(Rc,t.name===n.name&&Mc),children:e.jsx("div",{className:Cc,children:e.jsxs("span",{className:Tc,children:[o(t)," ",i(t)]})})},t.name))})})};var Ic={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 Ec=y.bind(Ic),Bc=(e,t,n)=>{const a=0===t?e-360-5:e-360-16-5;let r=0,o=0;return n.reverse().forEach(e=>{o+=e,a<=o&&(r+=1)}),r},Dc=()=>e.jsx("div",{className:Ic.divider}),Lc=t.memo(({view:n,handleSearchChange:a,highlightQuery:r,isFlamegraphDirty:o,reset:s,updateFitMode:l,fitMode:c,updateView:u,selectedNode:f,onFocusOnSubtree:d,flamegraphType:h,enableChangingDisplay:m=!0,sharedQuery:p,ExportData:g,palette:v,setPalette:b})=>{const y=t.useRef(null),[x,w]=t.useState(!1),k=Ti();t.useEffect(()=>{const e=y.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");w(!!t)},[]);const j=x?32:44,N=x?220:360,S="double"===h&&v&&b,C=[{el:e.jsxs(e.Fragment,{children:[e.jsx(zc,{fitMode:c,updateFitMode:l}),e.jsx(Dc,{})]}),width:2*j+5},{el:e.jsx(Oc,{isFlamegraphDirty:o,reset:s}),width:j},{el:e.jsxs(e.Fragment,{children:[e.jsx(Ac,{selectedNode:f,onFocusOnSubtree:d}),e.jsx(Dc,{})]}),width:j+5},m?{el:e.jsx(Vc,{flamegraphType:h,view:n,updateView:u}),width:j*("single"===h?5:3)}:null,t.isValidElement(g)?{el:e.jsxs(e.Fragment,{children:[e.jsx(Dc,{}),g]}),width:j+5}:null].filter(e=>null!==e),T=C.reduce((e,t)=>[...e,t.width],[]),{isCollapsed:_,collapsedItemsNumber:R,handleMoreClick:M}=((e,n)=>{const[a,r]=t.useState(!0),[o,s]=t.useState(0);return t.useLayoutEffect(()=>{if(e.current){const{width:t}=e.current.getBoundingClientRect(),a=Bc(t,o,n);s(a)}},[e.current,n]),i(e,e=>{const{width:t}=e.target.getBoundingClientRect(),a=Bc(t,o,n);s(a),r(!0)}),{isCollapsed:a,handleMoreClick:()=>{r(e=>!e)},collapsedItemsNumber:o}})(y,T),F=C.reduce((e,t,n)=>(n<R?e.hidden.push(t):e.visible.push(t),e),{visible:[],hidden:[]});return e.jsx("div",{role:"toolbar",ref:y,children:e.jsxs("div",{className:Ic.navbar,children:[e.jsx("div",{className:Ic.searchWrapper,children:e.jsx(hc,{width:N,onHighlightChange:a,highlightQuery:r,sharedQuery:p})}),e.jsxs("div",{className:Ic.rightSection,children:[S&&e.jsxs(e.Fragment,{children:[e.jsx(Pc,{palette:v,onChange:b}),e.jsx(Dc,{})]}),e.jsxs("div",{className:Ic.itemsContainer,children:[F.visible.map((t,n)=>e.jsx("div",{className:Ic.item,style:{width:t.width},children:t.el},n)),0!==R&&e.jsx(Wl,{placement:"top",title:k.more,children:e.jsx("button",{onClick:M,className:Ec({[Ic.moreButton]:!0,[Ic.active]:!_}),children:e.jsx(qa,{icon:Ol.faEllipsisV})})})]})]}),!_&&e.jsx("div",{className:Ic.navbarCollapsedItems,children:F.hidden.map((t,n)=>e.jsx("div",{className:Ic.item,style:{width:t.width},children:t.el},n))})]})})});function Ac({onFocusOnSubtree:t,selectedNode:n}){const a=Ti(),r=n.mapOr(()=>{},e=>()=>t(e.i,e.j));return e.jsx(Wl,{placement:"top",title:a.collapseNodesAbove,children:e.jsx("div",{children:e.jsx(Ks,{disabled:!n.isJust,onClick:r,className:Ic.collapseNodeButton,"aria-label":a.collapseNodesAbove,children:e.jsx(qa,{icon:mo.faCompressAlt})})})})}function Oc({isFlamegraphDirty:t,reset:n}){const a=Ti();return e.jsx(Wl,{placement:"top",title:a.resetView,children:e.jsx("span",{children:e.jsx(Ks,{id:"reset",disabled:!t,onClick:n,className:Ic.resetViewButton,"aria-label":a.resetView,children:e.jsx(qa,{icon:Tl.faUndo})})})})}function zc({fitMode:t,updateFitMode:n}){const a=Ti(),r=e=>t===e;return e.jsxs(e.Fragment,{children:[e.jsx(Wl,{placement:"top",title:a.headFirst,children:e.jsx(Ks,{onClick:()=>n("HEAD"),className:Ec({[Ic.fitModeButton]:!0,[Ic.selected]:r("HEAD")}),children:e.jsx(Ui,{})})}),e.jsx(Wl,{placement:"top",title:a.tailFirst,children:e.jsx(Ks,{onClick:()=>n("TAIL"),className:Ec({[Ic.fitModeButton]:!0,[Ic.selected]:r("TAIL")}),children:e.jsx(Qi,{})})})]})}const $c=(t,n)=>"single"===t?[{label:n.viewFlamegraph,value:"flamegraph",Icon:Hi},{label:n.viewTable,value:"table",Icon:$i},{label:n.viewTableAndFlamegraph,value:"both",Icon:Vi},{label:n.viewSandwich,value:"sandwich",Icon:Wi},{label:n.viewGraphviz,value:"graphviz",Icon:()=>e.jsx(qa,{icon:El.faProjectDiagram})}]:[{label:n.viewFlamegraph,value:"flamegraph",Icon:Hi},{label:n.viewTable,value:"table",Icon:$i},{label:n.viewTableAndFlamegraph,value:"both",Icon:Vi}];function Vc({view:t,updateView:n,flamegraphType:a}){const r=Ti(),o=$c(a,r);return e.jsx("div",{className:Ic.viewType,children:o.map(({label:a,value:r,Icon:o})=>e.jsx(Wl,{placement:"top",title:a,children:e.jsx(Ks,{"data-testid":r,onClick:()=>n(r),className:Ec({[Ic.toggleViewButton]:!0,selected:t===r}),children:e.jsx(o,{})})},r))})}function Hc(e,t){const n={},a={};let r={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,r=e.levels[n];for(let e=0;e<r.length;e+=4){const o=r[e+0],i=r[e+1];if(f>=o&&f<o+i){const r=[t,n,e].join("/");m=a[r].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,a[c]=v,m&&g&&n[m].children.push(v),0===s&&(r=v)}}),r}const Wc=e=>{const t={maxSelf:100,names:[],levels:[]},n=(e,a,r)=>{var o;const{name:i,children:s,self:l,total:c,offset:u}=e;t.names.push(i),(o=t.levels)[a]||(o[a]=[]),t.maxSelf=Math.max(t.maxSelf,l[0]||0),t.levels[a]=t.levels[a].concat([r,c[0]||0,l[0]||0,t.names.length-1]);for(let e=0;e<s.length;e+=1){r+=n(s[e],a+1,r)}return u||c[0]||0};return n(e,0,0),t};function Uc(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 a=e.children[n],r=t.get(e.children[n].name);r&&r!==a&&(r.total[0]+=a.total[0],r.self[0]+=a.self[0],r.children=r.children.concat(a.children))}e.children=Array.from(t.values());for(let t=0;t<e.children.length;t+=1)Uc(e.children[t])}function Qc(e,t){const n=function(e,t){const n=Hc(e),a={format:"single",numTicks:0,maxSelf:100,sampleRate:100,names:[],levels:[],units:e.units,spyName:e.spyName},r={name:t,total:[],self:[0],children:[]},o=e=>{e.name===t&&(a.numTicks+=e.total[0],r.total=[a.numTicks],r.children=r.children.concat(e.children));for(let t=0;t<e.children.length;t+=1)o(e.children[t])};return o(n),Uc(r),{...a,...Wc(r)}}(JSON.parse(JSON.stringify(e)),t);return n}function Jc(e,t){const n=function(e,t){const n=Hc(e),a={format:"single",maxSelf:100,sampleRate:100,numTicks:0,names:[],levels:[],units:e.units,spyName:e.spyName},r=[],o=[],i={name:t,total:[0],self:[0],children:[]},s=(e,n=[])=>{const i=n.concat([{...e,children:[]}]);e.name===t&&(o.push(i),r.push(e.total[0]),a.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 a=n;return e.forEach(({name:e,...n})=>{const r={name:e,...n,total:[t]};a.children=[r],a=r}),n.children[0]})(e.reverse(),r[t]))}),Uc(i);const l=Wc(i);return l.levels=l.levels.reverse().slice(0,-1),{...a,...l}}(JSON.parse(JSON.stringify(e)),t);return n}var qc={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 Xc(e){const t=[];return Object.keys(e).forEach(n=>{var a;t.push(`${n}="${a=String(e[n]||""),a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`)}),`[${t.join(" ")}]`}function Yc(e,t){return`${(100*e/t).toFixed(2)}%`}function Zc(e,t){let n,a,r,o;t?(n=.1,a=.93):(n=1,a=.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=a,r=a*(1+n*e)):(r=a,o=a*(1-n*e));const i=a*(1-n);return`#${Math.floor(255*r).toString(16).padStart(2,"0")}${Math.floor(255*o).toString(16).padStart(2,"0")}${Math.floor(255*i).toString(16).padStart(2,"0")}`}function Gc(e,t,n,a){const{self:r}=t,{total:o}=t,i=t.name.replace(/"/g,'\\"'),s=e(r),l=8+Math.ceil(16*Math.sqrt(r/n)),c=Zc(o/a,!1),u=Zc(o/a,!0),f=function(e,t,n,a,r){let o="";o=`${function(e){return e.replace(/.*\//,"")}(t)}\n`;const i=e(n);0!==n?o=`${o+i} (${Yc(n,r)})`:o+="0";let s=i;a!==n&&(o+=0!==n?"\n":" ",s=e(a),o=`${o}of ${s} (${Yc(a,r)})`);return o}(e,i,r,o,a),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} ${Xc(d)}`}function Kc(e){if("double"===e.metadata.format)return"diff flamegraphs are not supported";const t=Hc(e.flamebearer),n=[],a=[];const[r,o,,i]=function e(t,n,a,r,o){return t.children.forEach(t=>{const[i,s]=e(t,n,a,r,o);n=Math.max(n,i),a=Math.max(a,s)}),n=Math.max(n,t.self[0]),a=Math.max(a,t.total[0]),r+=t.self[0],o+=t.total[0],[n,a,r,o]}(t,0,0,0,0),{sampleRate:s,units:l}=e.metadata,c=br(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 a=m(n,t.concat([e.name])),r=`${e.name}/${n.name}`;n.name!==e.name&&(d[r]?d[r].weight+=n.total[0]:d[r]={from:f[e.name],to:a,weight:n.total[0],residual:!1},a.parents.push(d[r]),f[e.name].children.push(d[r]))}),f[e.name]}t.children.forEach(e=>{m(e,[])});const p=.005*i,g=.001*i;function v(e,t){let n=0,a=t;if(e.forEach(e=>{e.weight>0&&(a+=Math.abs(e.weight))}),0!==a&&(e.forEach(e=>{const t=Math.abs(e.weight)/a;n+=-t*Math.log2(t)}),t>0)){const e=Math.abs(t)/a;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],a=b[t.name];return n!==a?a-n:e.name!==t.name?e.name<t.name?-1:1:e.self!==t.self?a-n:e.name<t.name?-1:1}),x={};function w(e){const[t,n]=[e.from,e.to],a={},r=[n];for(;r.length>0;){const n=r.shift();for(let o=0;o<n.parents.length;o+=1){const i=n.parents[o];if(e!==i&&!a[i.from.name]){if(i.from===t)return!0;a[i.from.name]=!0,r.push(i.from)}}}return!1}return y.forEach(e=>{x[e.name]=e}),y.slice(80).forEach(e=>{delete x[e.name]}),function e(t,n){const a=!x[t.name];t.children.forEach(r=>{const o=!x[r.name];if(e(r,a?n:t),!o&&n&&a){const e=`${n.name}/${r.name}`;d[e]||(d[e]={from:f[n.name],to:f[r.name],weight:0,residual:!0}),d[e].weight+=r.total[0],d[e].residual=!0}})}(t,null),f=x,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 a=t[e];if(!a.residual)break;w(a)&&(n.push(a),delete d[`${a.from.name}/${a.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(Gc(u,f[e],r,o))}),Object.keys(d).forEach(e=>{a.push(function(e,t,n){const a=t.from.name.replace(/"/g,'\\"'),r=t.to.name.replace(/"/g,'\\"'),o=t.weight,i=e(t.weight),s=`${a} -> ${r} (${i})`,l={label:i,weight:1+100*o/n,penwidth:1+5*o/n,tooltip:s,labeltooltip:s,fontname:"",color:Zc(o/n,!1),style:t.residual?"dotted":""};return`N${t.from.index} -> N${t.to.index} ${Xc(l)}`}(u,d[e],o))}),`digraph "unnamed" {\n fontname= ""\n ${n.join("\n")}\n ${a.join("\n")}\n }`}var eu="GraphVizPanel-module_graphVizPane__B18cQ";const tu=()=>null;function nu({flamebearer:n}){var a,r;const o=n,i=(null===(a=o.metadata)||void 0===a?void 0:a.format)&&(null===(r=o.flamebearer)||void 0===r?void 0:r.levels),s=`graphviz-pane-${(null==o?void 0:o.appName)||String((new Date).valueOf())}`,l=t.useMemo(()=>Kc(o),[JSON.stringify(o)]);return e.jsx("div",{className:eu,children:i?e.jsx(tu,{options:{zoom:!0,width:"150%",height:"100%",scale:1,useWorker:!1},dot:l}):e.jsx("div",{children:"NO DATA"})},s)}function au(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const a=[0,Math.floor(n/2),n-1];for(let n=0;n<a.length;n+=1){const r=e[a[n]];if(!r||0===r.length)continue;const o=Math.min(8,r.length);for(let e=0;e<o;e+=1)t^=0|r[e],t=Math.imul(t,16777619);for(let e=Math.max(0,r.length-o);e<r.length;e+=1)t^=0|r[e],t=Math.imul(t,16777619)}return t>>>0}function ru(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const a=Math.min(32,n),r=[...Array.from({length:a},(e,t)=>t),...Array.from({length:a},(e,t)=>n-a+t)];for(let n=0;n<r.length;n+=1){const a=e[r[n]]||"";for(let e=0;e<a.length;e+=1)t^=a.charCodeAt(e),t=Math.imul(t,16777619)}return t>>>0}function ou(e){var t,n,a,r,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!==(r=null===(a=e.levels)||void 0===a?void 0:a.length)&&void 0!==r?r:0,null!==(o=l.leftTicks)&&void 0!==o?o:"na",null!==(i=l.rightTicks)&&void 0!==i?i:"na",au(e.levels),ru(e.names||[])].join("|");return e.__kylinSignature=c,c}function iu(e,t){const n=[...t];function a(e,t,n){for(const a of e){let e=0;for(let r=t;r<a.length;r+=n)a[r]-=e,e+=a[r]+a[r+1]}}return"double"===e?(a(n,0,7),a(n,3,7)):a(n,0,4),n}function su(e,t){const n=[...t];function a(e,t,n){for(const a of e){let e=0;for(let r=t;r<a.length;r+=n)a[r]+=e,e=a[r]+a[r+1]}}return"double"===e?(a(n,0,7),a(n,3,7)):a(n,0,4),n}function lu(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,a={...n,flamebearer:{...n.flamebearer}};n.__kylinDecoded||((t=a).flamebearer.levels=su(t.metadata.format,t.flamebearer.levels),n.__kylinDecoded=!0,a.__kylinDecoded=!0);const r={...a,...a.metadata,...a.flamebearer,flamebearer:void 0,metadata:void 0};return delete r.flamebearer,delete r.metadata,r}var t;if(e.flamebearer)return e.flamebearer;return{format:"single",names:[],units:"unknown",levels:[[]],spyName:"unknown",numTicks:0,sampleRate:0,maxSelf:0}}class cu extends t.Component{constructor(t){super(t),this.resetFlamegraphState={focusedNode:n.Maybe.nothing(),zoom:n.Maybe.nothing()},this.initialFlamegraphState=this.resetFlamegraphState,this.calcNewConfigs=(e,t)=>{const n=this.state.flamegraphConfigs,a=(e,t,n)=>{const a=(e,t,n)=>e.names[rr(e.format).getBarName(e.levels[t],n)];if(n.isNothing)return!0;try{const r=n,o=a(e,r.value.i,r.value.j);return o===a(t,r.value.i,r.value.j)}catch{return!1}};a(e,t,this.state.flamegraphConfigs.zoom)||(n.zoom=this.resetFlamegraphState.zoom);return a(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 ou(e)===ou(t)}(e,t),this.onReset=()=>{this.setState({...this.state,flamegraphConfigs:{...this.state.flamegraphConfigs,...this.initialFlamegraphState},selectedItem:n.Maybe.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 a={...this.state.flamegraphConfigs};const{zoom:r}=this.state.flamegraphConfigs;r.isJust&&r.value.i<=e&&(a={...a,zoom:this.initialFlamegraphState.zoom}),this.setState({...this.state,flamegraphConfigs:{...a,focusedNode:n.Maybe.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:a,levels:r,format:o}=n,i=rr(o),s=t.value.i,l=t.value.j,c=r[s];if(!c)return!0;const u=i.getBarOffset(c,l),f=u+i.getBarTotal(c,l);for(let t=s;t<r.length;t++){const n=r[t];for(let t=0;t<n.length;t+=i.jStep){const r=i.getBarOffset(n,t),o=i.getBarTotal(n,t);if(r>=u&&r+o<=f){if(a[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:n.Maybe.nothing()});this.isNameInFocusedSubtree(t)?this.setState({selectedItem:n.Maybe.just(t)}):this.setState({selectedItem:n.Maybe.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,a=e.numTicks;if(!a)return{rangeMin:0,rangeMax:1};const r=rr(e.format),o=t=>{const n=e.levels[t.i];if(!n)return{rangeMin:0,rangeMax:1};const o=r.getBarOffset(n,t.j),i=r.getBarTotal(n,t.j);return{rangeMin:o/a,rangeMax:(o+i)/a}};return t.match({Just:e=>n.match({Just:t=>{const n=o(t),a=o(e);return n.rangeMax-n.rangeMin<a.rangeMax-a.rangeMin?n:a},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:Hr(qc.tablePane,"vertical"===this.state.panesOrientation?qc.vertical:qc.horizontal),children:e.jsx(bl,{"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"),a=this.shouldShowToolbar(),r=!this.state.flamebearer||this.state.flamebearer.names.length<=1,o=this.context,i="Location"!==o.location,s=this.state.flamebearer.numTicks,l=br(s,this.state.flamebearer.sampleRate,this.state.flamebearer.units).format(s,this.state.flamebearer.sampleRate),c=mr(l,i)||l,f=function(e,t=pr){const n=Math.abs(e);for(const{value:a,label:r}of t)if(n>=a)return`${(e/a).toFixed(2).replace(/\.?0+$/,"")} ${r}`;return dr(e)}(s,o.sampleCountFormat),d=o.tooltipSamples.replace(/[::]\s*$/,""),h=(null===(t=o.tooltipUnitTitles[this.state.flamebearer.units])||void 0===t?void 0:t.formattedValue)||o.tooltipUnitTitles.unknown.formattedValue,m=this.getActiveRange(),p=m.rangeMin>0||m.rangeMax<1,g=Math.max(0,Math.min(s,(m.rangeMax-m.rangeMin)*s)),v=s>0?g/s*100:0,b=(()=>{const e=rr(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 a=e.getBarName(n,t.j);return this.state.flamebearer.names[a]||""})(),y=e.jsx(fs,{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:a,setPalette:this.handleSetPalette,enableSandwichView:this.props.enableSandwichView,breadcrumb:r?void 0:{totalValueText:c,totalSamplesText:f,samplesLabel:d,unitLabel:h,hasFocus:p,focusPercent:v,focusLabel:b,ofTotalPlacement:i?"before":"after",ofTotalLabel:o.ofTotal,clearFocusLabel:o.clearFocus,onClearFocus:this.clearFocus}},"flamegraph-pane"),x=(()=>{if("sandwich"!==this.state.view)return e.jsx("div",{className:qc.sandwichPane},"sandwich-pane");if(this.state.selectedItem.isNothing)return e.jsx("div",{className:qc.sandwichPane,children:e.jsxs("div",{className:Hr(qc.sandwichPaneInfo,"vertical"===this.state.panesOrientation?qc.vertical:qc.horizontal),children:[e.jsx("div",{className:qc.arrow}),"Select a function to view callers/callees sandwich view"]})},"sandwich-pane");const t=Jc(this.state.flamebearer,this.state.selectedItem.value),n=Qc(this.state.flamebearer,this.state.selectedItem.value),r=t=>e.jsx(fs,{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:a,setPalette:this.handleSetPalette,...t});return e.jsxs("div",{className:qc.sandwichPane,children:[e.jsxs("div",{className:qc.sandwichTop,children:[e.jsx("span",{className:qc.name,children:"Callers"}),r({flamebearer:t})]}),e.jsxs("div",{className:qc.sandwichBottom,children:[e.jsx("span",{className:qc.name,children:"Callees"}),r({flamebearer:n,headerVisible:!1,showSingleLevel:!0})]})]},"sandwich-pane")})(),w=function(e,t,n,a,r){switch(e){case"table":return[n];case"flamegraph":return[t];case"sandwich":return[n,a];case"both":return[n,t];case"graphviz":return[r];default:throw new Error(`Invalid view '${e}'`)}}(this.state.view,y,n,x,e.jsx(nu,{flamebearer:this.state.flamebearer}));return e.jsxs("div",{children:[e.jsxs("div",{children:[a&&e.jsx(Lc,{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:`${qc.flamegraphContainer} ${Hr("vertical"===this.state.panesOrientation?qc.vertical:qc.horizontal,qc[this.state.panesOrientation],qc.panesWrapper)}`,children:r?e.jsx(Ur,{}):w.map(e=>e)})]}),this.props.showPyroscopeLogo&&e.jsxs("div",{className:qc.createdBy,children:["Created by",e.jsxs("a",{href:"https://twitter.com/PyroscopeIO",rel:"noreferrer",target:"_blank",children:[e.jsx(u,{width:"30",height:"30"}),"@PyroscopeIO"]})]})]})},this.state={isFlamegraphDirty:!1,view:this.props.onlyDisplay?this.props.onlyDisplay:"both",fitMode:"HEAD",flamebearer:lu(t),panesOrientation:t.panesOrientation?t.panesOrientation:"horizontal",searchQuery:"",selectedItem:n.Maybe.nothing(),flamegraphConfigs:this.initialFlamegraphState,palette:vi}}componentDidUpdate(e,t){if(e.profile!==this.props.profile||e.flamebearer!==this.props.flamebearer){const e=t.flamebearer,a=lu(this.props);if(!this.isSameFlamebearer(e,a)){const t=this.calcNewConfigs(e,a);return void this.setState({flamebearer:a,flamegraphConfigs:{...this.state.flamegraphConfigs,...t},selectedItem:n.Maybe.nothing()})}}t.flamegraphConfigs!==this.state.flamegraphConfigs&&this.updateFlamegraphDirtiness()}shouldShowToolbar(){return void 0===this.props.showToolbar||this.props.showToolbar}}cu.contextType=Si,cu.defaultProps={showCredit:!1};const uu={showPyroscopeLogo:!1},fu=(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)?ji:ki};exports.Box=function(t){const{children:n,noPadding:a,className:r="",theme:o="dark"}=t,i=a?"":Xa.padding;return e.jsx("div",{className:`${Xa.box} ${i} ${r}`,"data-theme":o,children:n})},exports.DefaultPalette=vi,exports.Flamegraph=$r,exports.FlamegraphI18nProvider=Ci,exports.FlamegraphRenderer=n=>{const{i18n:a,locale:r,colorMode:o="light",sandwich:i=!0,...s}=n,l=t.useMemo(()=>fu(r,a),[r,a]),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(Ci,{messages:l,children:e.jsx(cu,{...uu,enableSandwichView:i,...s})})})},exports.convertJaegerTraceToProfile=function(e){const t={numTicks:0,maxSelf:0,names:[],levels:[]},n={},a={children:[]};return e.spans.forEach(e=>{e.children=[],n[e.spanID]=e}),e.spans.forEach(e=>{let t=a;e.references&&e.references.length>0&&(t=n[e.references[0].spanID]||a),t.children.push(e)}),function e(t,n){(t.children||[]).forEach(t=>e(t));let a=0;const r=f(t.children||[],e=>e.operationName);t.children=d(r,e=>{const t=e[0];for(let n=1;n<e.length;n+=1)t.duration+=e[n].duration;return a+=t.duration,t}),t.total=t.duration||a,t.self=Math.max(0,t.total-a)}(a),function n(a,r,o){var i;return t.numTicks||(t.numTicks=a.total),(i=t.levels)[r]||(i[r]=[]),t.levels[r].push(o),t.levels[r].push(a.total),t.levels[r].push(a.self),t.names.push((a.processID?`${e.processes[a.processID].serviceName}: `:"")+(a.operationName||"total")),t.levels[r].push(t.names.length-1),(a.children||[]).forEach(e=>{o+=n(e,r+1,o)}),a.total}(a,0,0),t.levels=iu("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=su("single",e.flamebearer.levels),t.flamebearer.levels=su("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},a=Hc(e,t),r=(e,t,a,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([a,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]=r(l[e],t+1,a,o);a+=n,o+=i}return[u[0]||0,u[1]||0]};return r(a,0,0,0),n}(e.flamebearer,t.flamebearer);n.levels=iu("double",n.levels);const a={...e.metadata};return a.format="double",{version:1,flamebearer:n,metadata:a,leftTicks:e.flamebearer.numTicks,rightTicks:t.flamebearer.numTicks}},exports.flamegraphDefaultMessages=ki,exports.flamegraphZhCNMessages=ji;
|
|
17
|
+
*/var ms,ps=(ds||(ds=1,function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=r(e,a(n)))}return e}function a(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 a="";for(var o in e)t.call(e,o)&&e[o]&&(a=r(a,o));return a}function r(e,t){return t?e?e+" "+t:e+t:e}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(hs)),hs.exports),gs=m(ps),vs={};function bs(){return ms||(ms=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="crosshairs",n=[],a="f05b",r="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,a,r]},e.faCrosshairs=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(vs)),vs}var ys,xs=bs(),ws={};function ks(){return ys||(ys=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-left",n=[9001],a="f053",r="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,a,r]},e.faChevronLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(ws)),ws}var js,Ss=ks(),Ns={};function Cs(){return js||(js=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="chevron-right",n=[9002],a="f054",r="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,a,r]},e.faChevronRight=e.definition,e.prefix="fas",e.iconName=t,e.width=320,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Ns)),Ns}var Ts=Cs(),_s="Table-module_table__6A8SM",Ms="Table-module_sortable__J6kyp",Rs="Table-module_sortArrow__Nrncn",Fs="Table-module_sortArrowUp__WmbEG",Ps="Table-module_sortArrowDown__Gyue1",Is="Table-module_asc__tJDI9",Es="Table-module_desc__fjVRY",Ls="Table-module_isRowSelected__UhIAJ",Ds="Table-module_isRowDisabled__sz3NJ",Bs="Table-module_virtualSpacer__C1hxH",As="Table-module_active__EShS8",Os="Table-module_loadingSpinner__SSjMK",zs="Table-module_pagination__VXgcO",$s="Button-module_button__Ed1ge",Vs="Button-module_noIcon__Uzjvv",Hs="Button-module_noBox__mLreC",Ws="Button-module_customIcon__-slpC",Us="Button-module_iconWithText__DQRkr",Js="Button-module_default__HhXlQ",Qs="Button-module_outline__Flf4r",Xs="Button-module_float__4marx",qs="Button-module_primary__xByv0",Ys="Button-module_secondary__D0K-F",Zs="Button-module_danger__5-vIq",Gs="Button-module_grouped__j8KwB";const Ks=t.forwardRef(function({disabled:t=!1,kind:n="default",type:a="button",icon:r,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:a,"data-testid":m["data-testid"],disabled:t,onClick:l,form:f,autoFocus:h,"aria-label":m["aria-label"],className:gs($s,s?Gs:"",el(n),u,d&&Hs,o&&Ws,!r&&!o&&Vs),children:[r?e.jsx(Xa,{icon:r,className:i?Us:""}):null,o,i]})});function el(e){switch(e){case"default":return Js;case"primary":return qs;case"secondary":return Ys;case"danger":return Zs;case"outline":return Qs;case"float":return Xs;default:throw Error(`Unsupported kind ${e}`)}}function tl({row:n}){const{cells:a,isRowSelected:r,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:Hr(i,{[Ls]:r,[Ds]:o}),children:a&&a.map(({style:t,value:n,...a},r)=>e.jsx("td",{style:t,...a,children:n},f+r))})}function nl({sortByDirection:n,sortBy:a,updateSortParams:r,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&&a&&r,[g,v]=t.useState(0),[b,y]=t.useState(0),[x,w]=t.useState(null),[k,j]=t.useState(null),S=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=()=>{S.current&&cancelAnimationFrame(S.current),S.current=requestAnimationFrame(()=>{y(k.scrollTop||0)})};return k.addEventListener("scroll",e,{passive:!0}),()=>{k.removeEventListener("scroll",e),S.current&&cancelAnimationFrame(S.current)}},[k,u]),t.useEffect(()=>{if(!u||x||!(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&&w(t.height)},[u,x,null==i?void 0:i.current,o]);const N="filled"===o.type?al(o.bodyRows,g,c):null,C="virtual"===o.type?o.rowCount:N?N.length:0,T=f||x||0,_=!!u&&!!k&&("filled"===o.type||"virtual"===o.type)&&T>0,M=_?(()=>{const e=k.clientHeight||0,t=Math.max(0,Math.floor(b/T)-d),n=Math.min(C,Math.ceil((b+e)/T)+d),a=t*T,r=Math.max(0,(C-n)*T),i="filled"===o.type&&N?N.slice(t,n):[];return{viewportHeight:e,totalRows:C,startIndex:t,endIndex:n,topSpacer:a,bottomSpacer:r,visibleRows:i}})():null,R=!!u&&!_&&"filled"===o.type,F=R?(N||[]).slice(0,Math.max(24,4*d)):null;t.useEffect(()=>{var e;"virtual"===o.type&&M&&(null===(e=o.onRangeChange)||void 0===e||e.call(o,M.startIndex,M.endIndex))},[o,null==M?void 0:M.startIndex,null==M?void 0:M.endIndex]);const P="virtual"===o.type&&M?Math.max(0,M.endIndex-M.startIndex):0,I="virtual"===o.type&&P>0?Array.from({length:P},()=>({cells:Array.from({length:o.headRow.length},()=>({value:" "}))})):[],E="virtual"===o.type&&M&&o.range&&o.range.start===M.startIndex&&o.range.end===M.endIndex?o.rows:I;return l?e.jsx("div",{className:Os}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:Hr(_s,{[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:Ms,onClick:()=>r(l)},s,e.jsxs("span",{className:Hr(Rs,{[As]:a===l,[Is]:a===l&&"asc"===n,[Es]:a===l&&"desc"===n}),children:[e.jsx("span",{className:Fs}),e.jsx("span",{className:Ps})]})):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})}):M?e.jsxs(e.Fragment,{children:[M.topSpacer>0&&e.jsx("tr",{"aria-hidden":"true",className:Bs,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:M.topSpacer,padding:0,border:0}})}),("virtual"===o.type?E:M.visibleRows).map((t,n)=>{var a;return e.jsx(tl,{row:t},null!==(a=t["data-row"])&&void 0!==a?a:`row-${M.startIndex+n}`)}),M.bottomSpacer>0&&e.jsx("tr",{"aria-hidden":"true",className:Bs,children:e.jsx("td",{colSpan:o.headRow.length,style:{height:M.bottomSpacer,padding:0,border:0}})})]}):R?(F||[]).map((t,n)=>{var a;return e.jsx(tl,{row:t},null!==(a=t["data-row"])&&void 0!==a?a:`row-${n}`)}):(N||[]).map((t,n)=>{var a;return e.jsx(tl,{row:t},null!==(a=t["data-row"])&&void 0!==a?a:`row-${n}`)})})]}),e.jsx(rl,{bodyRows:"filled"===o.type?o.bodyRows:void 0,itemsPerPage:c,currPage:g,setCurrPage:v})]})}function al(e,t,n){return n?e.slice(t*n,n*(t+1)):e}function rl({itemsPerPage:t,currPage:n,setCurrPage:a,bodyRows:r}){if(!t)return null;const o=!!r&&al(r,n+1,t).length>0,i=!!r&&al(r,n-1,t).length>0;return e.jsxs("nav",{className:zs,children:[e.jsx(Ks,{"aria-label":"Previous Page",disabled:!i,kind:"float",icon:Ss.faChevronLeft,onClick:()=>a(n-1)}),e.jsx(Ks,{disabled:!o,"aria-label":"Next Page",kind:"float",icon:Ts.faChevronRight,onClick:()=>a(n+1)})]})}function ol({numTicks:n,sampleRate:a,units:r,tableBodyRef:o,palette:i}){const s=br(n,a,r),l=s.format(n,a),c=Ti(),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),a),i=s.format(parseInt(n,10),a),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:r,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=Di({formatter:s,sampleRate:a,totalLeft:parseInt(t,10),leftTicks:parseInt(n,10),totalRight:parseInt(o,10),rightTicks:parseInt(l,10),title:d,units:r},i,c);e({title:u.title,tooltipData:u.tooltipData});break}}},[s,a,r,l,i,c]);return e.jsx(Pi,{dataSourceRef:o,shouldShowTitle:!1,clickInfoSide:"left",setTooltipContent:u,palette:i})}function il(){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]},a=e=>Math.round(1e4*e)/100,r=(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 a=e[o.sortBy]||0,r=t[o.sortBy]||0;return n*(a-r)}case"baseline":{const a=e.leftTicks>0?e.totalLeft/e.leftTicks:0,r=t.leftTicks>0?t.totalLeft/t.leftTicks:0;return n*(a-r)}case"comparison":{const a=e.rightTicks>0?e.totalRght/e.rightTicks:0,r=t.rightTicks>0?t.totalRght/t.rightTicks:0;return n*(a-r)}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=r(a(o),a(i)),u=r(a(s),a(l));return n*(c-u)}default:return 0}}),o.rows=t},s=a=>{const{rows:r,bestNodeByName:s,format:l,leftTicks:c,rightTicks:u}=(a=>{const{names:r,levels:o,format:i}=a,s=new Map,l=new Map,c=a.leftTicks||0,u=a.rightTicks||0;if("double"===i){const t=n;for(let n=0;n<o.length;n+=1){const a=o[n];for(let o=0;o<a.length;o+=t.jStep){const i=r[t.getBarName(a,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(a,o),f.totalRght=e(f.totalRght)+t.getBarTotalRght(a,o);const d=t.getBarTotal(a,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 a=o[t];for(let o=0;o<a.length;o+=n.jStep){const i=r[n.getBarName(a,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(a,o),c.total=e(c.total)+n.getBarTotal(a,o);const u=n.getBarTotal(a,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}})(a.flamebearer);o.baseRows=r,o.bestNodeByName=s,o.format=l,o.leftTicks=c,o.rightTicks=u,o.sortBy=a.sortBy,o.sortByDirection=a.sortByDirection,o.highlightQuery=a.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:a}=e,r=Math.max(0,t),i=Math.min(o.rows.length,n),s=o.rows.slice(r,i);self.postMessage({type:"range",payload:{rows:s,start:r,end:i,requestId:a}})})(t.payload);break;case"findNode":(e=>{const{name:t,requestId:n}=e,a=o.bestNodeByName.get(t);self.postMessage({type:"findNode",payload:{node:a?{i:a.i,j:a.j}:null,requestId:n}})})(t.payload)}}}).toString()})()`],{type:"text/javascript"});return new Worker(URL.createObjectURL(e))}var sl="ProfilerTable-module_tableContextMenu__7Svm8",ll="ProfilerTable-module_sandwichItem__b9Ipy";const cl=e=>e||0,ul="undefined"!=typeof Worker&&"undefined"!=typeof Blob&&"undefined"!=typeof URL;function fl(e,t,n,a){const r=t;return r.type="single",r.self=cl(r.self)+e.getBarSelf(n,a),r.total=cl(r.total)+e.getBarTotal(n,a),r}function dl(e,t,n,a,r,o){const i=t;return i.type="double",i.self=cl(i.self)+e.getBarSelf(n,a),i.total=cl(i.total)+e.getBarTotal(n,a),i.selfLeft=cl(i.selfLeft)+e.getBarSelfLeft(n,a),i.selfRght=cl(i.selfRght)+e.getBarSelfRght(n,a),i.selfDiff=cl(i.selfDiff)+e.getBarSelfDiff(n,a),i.totalLeft=cl(i.totalLeft)+e.getBarTotalLeft(n,a),i.totalRght=cl(i.totalRght)+e.getBarTotalRght(n,a),i.totalDiff=cl(i.totalDiff)+e.getBarTotalDiff(n,a),i.leftTicks=r,i.rightTicks=o,i}const hl=new WeakMap;function ml(e){const t=hl.get(e);if(t)return t;const n=function(e){if(!e)return[];const{names:t,levels:n,format:a}=e,r="double"!==a?nr:ar,o=new Map;for(let i=0;i<n.length;i++){const s=n[i];for(let n=0;n<s.length;n+=r.jStep){const i=t[r.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"===a?fl(nr,l,s,n):dl(ar,l,s,n,e.leftTicks,e.rightTicks)}}return Array.from(o.values())}(e);return hl.set(e,n),n}function pl(e,t,n){const a=148-e/t*148,r=n.alpha(1);return{backgroundImage:`linear-gradient(${r}, ${r})`,backgroundPosition:`-${a}px 0px`,backgroundRepeat:"no-repeat"}}const gl=({flamebearer:t,sortBy:n,sortByDirection:a,fitMode:r,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=[...ml(t)].sort((e,t)=>t.total-e.total),b="asc"===a?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=vr(gr(e.totalLeft/e.leftTicks),gr(e.totalRght/e.rightTicks)),a=vr(gr(t.totalLeft/t.leftTicks),gr(t.totalRght/t.rightTicks));return b*(n-a)});break;default:y=v}const x=br(d,m,g),w=e=>!!l.isJust&&e===l.value,k=t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:Cr(r),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=gr(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=gr(e.rightTicks>0?e.totalRght/e.rightTicks:0);let a=vr(t,n);Number.isFinite(a)||(a=0);let r="";a>0?r=s.badColor.rgb().string():a<0&&(r=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===a?i="0%":a>0?i=`+${a.toFixed(2)}%`:a<0&&(i=`${a.toFixed(2)}%`),{"data-row":`${e.type};${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:w(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:r}}]}})(e);const t=Mr(p,e.name);return((e,t)=>({"data-row":`${e.type};${e.name};${e.self};${e.total}`,isRowSelected:w(e.name),onClick:()=>o(e),onContextMenu:t=>u(t,e.name),onDoubleClick:()=>f(e.name),cells:[{value:k(e)},{value:x.format(e.self,m),style:pl(e.self,h,t)},{value:x.format(e.total,m),style:pl(e.total,d,t)}]}))(e,Rr(s,t))});return j.length>0?{bodyRows:j,type:"filled"}:{value:e.jsx("div",{className:"unsupported-format",children:c.noItemsFound}),type:"not-filled"}};function vl({tableBodyRef:n,flamebearer:a,isDoubles:r,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}){const v=Ti(),[b,y]=ri({transition:!0}),[x,w]=t.useState({x:0,y:0}),[k,j]=t.useState(null),S=ul,N=t.useRef(null),C=t.useRef(null),T=t.useRef(0),_=t.useRef(0),M=t.useRef(new Map),[R,F]=t.useState(!1),[P,I]=t.useState(0),[E,L]=t.useState([]),[D,B]=t.useState({start:0,end:0}),[A,O]=t.useState(null),[z,$]=t.useState(0),[V,H]=t.useState(0);t.useEffect(()=>{if(!S)return()=>{};const e=il();N.current=e,H(e=>e+1);const t=e=>{const t=e.data;if(t&&t.type)switch(t.type){case"ready":I(t.payload.rowCount),F(!0),$(e=>e+1);break;case"range":if(t.payload.requestId!==T.current)return;L(t.payload.rows),B({start:t.payload.start,end:t.payload.end});break;case"findNode":{const e=M.current.get(t.payload.requestId);e&&(M.current.delete(t.payload.requestId),e(t.payload.node));break}}};return e.addEventListener("message",t),()=>{e.removeEventListener("message",t),e.terminate(),N.current=null,M.current.clear()}},[S]);const W=t.useCallback(e=>{if(!S||!N.current)return Promise.resolve(function(e,t){if(!e||!e.levels)return null;const{names:n,levels:a,format:r}=e,o=rr(r);let i=null;for(let e=0;e<a.length;e++){const r=a[e];for(let a=0;a<r.length;a+=o.jStep)if(n[o.getBarName(r,a)]===t){const t=o.getBarTotal(r,a);(!i||t>i.total)&&(i={i:e,j:a,total:t})}}return i?{i:i.i,j:i.j}:null}(a,e));const t=++_.current;return new Promise(n=>{var a;M.current.set(t,n),null===(a=N.current)||void 0===a||a.postMessage({type:"findNode",payload:{name:e,requestId:t}})})},[a,S]),U=t.useCallback(e=>{u&&W(e).then(e=>{e&&u(e.i,e.j)})},[u,W]),J=t.useCallback(e=>{l.isJust&&l.value===e||i({name:e}),U(e)},[U,l,i]),Q=t.useCallback((e,t)=>{e.preventDefault(),w({x:e.clientX,y:e.clientY}),j(t),y(!0)},[y]),X=t.useCallback(()=>{y(!1),j(null)},[y]),q=t.useCallback(()=>{k&&(U(k),X())},[k,U,X]),Y=t.useCallback(()=>{k&&navigator.clipboard&&(navigator.clipboard.writeText(k),X())},[k,X]),Z=t.useCallback(()=>{k&&(i({name:k}),X())},[k,i,X]),G=t.useCallback(()=>{k&&f&&(f("sandwich"),i({name:k}),X())},[k,f,i,X]),K=t.useMemo(()=>r?[{sortable:1,name:"name",label:v.location},{sortable:1,name:"baseline",label:v.baseline,default:!0},{sortable:1,name:"comparison",label:v.comparison},{sortable:1,name:"diff",label:v.diff}]:[{sortable:1,name:"name",label:v.location},{sortable:1,name:"self",label:v.self,default:!0},{sortable:1,name:"total",label:v.total}],[v,r]),ee=(e=>{const n=e.filter(e=>null==e?void 0:e.default)[0]||e[0],[a,r]=t.useState(n.name),[o,i]=t.useState("desc");return{sortBy:a,sortByDirection:o,updateSortParams:e=>{let t=o;t=a===e?"asc"===t?"desc":"asc":"desc",r(e),i(t)}}})(K);t.useEffect(()=>{if(!S||!N.current)return;const e=N.current,t={sortBy:ee.sortBy,sortByDirection:ee.sortByDirection,highlightQuery:s};C.current!==a?(C.current=a,F(!1),I(0),L([]),e.postMessage({type:"init",payload:{flamebearer:a,...t}})):(F(!1),L([]),e.postMessage({type:"update",payload:t}))},[a,s,ee.sortBy,ee.sortByDirection,S,V]);const te=t.useCallback((e,t)=>{O(n=>n&&n.start===e&&n.end===t?n:{start:e,end:t})},[]);t.useEffect(()=>{if(!S||!N.current||!A)return;const e=++T.current;N.current.postMessage({type:"range",payload:{start:A.start,end:A.end,requestId:e}})},[A,z,S]);const{numTicks:ne,maxSelf:ae,sampleRate:re,spyName:oe,units:ie}=a,se=t.useMemo(()=>br(ne,re,ie),[ne,re,ie]),le=t.useMemo(()=>Cr(o),[o]),ce=t.useCallback(e=>l.isJust&&l.value===e,[l]),ue=t.useCallback(t=>e.jsx("button",{className:"table-item-button",children:e.jsx("div",{className:"symbol-name",style:le,children:e.jsx("bdi",{dir:"ltr",children:t})})}),[le]),fe=t.useCallback(e=>{const t=Mr(oe,e.name),n=Rr(c,t);return{"data-row":`single;${e.name};${e.self};${e.total}`,isRowSelected:ce(e.name),onClick:()=>{i({name:e.name})},onContextMenu:t=>Q(t,e.name),onDoubleClick:()=>J(e.name),cells:[{value:ue(e.name)},{value:se.format(e.self,re),style:pl(e.self,ae,n)},{value:se.format(e.total,re),style:pl(e.total,ne,n)}]}},[se,Q,J,i,ce,ae,ue,ne,c,re,oe]),de=t.useCallback(e=>{const t=gr(e.leftTicks>0?e.totalLeft/e.leftTicks:0),n=gr(e.rightTicks>0?e.totalRght/e.rightTicks:0);let a=vr(t,n);Number.isFinite(a)||(a=0);let r="";a>0?r=c.badColor.rgb().string():a<0&&(r=c.goodColor.rgb().string());let o="";return 0===e.totalLeft&&e.totalRght>0?o=v.diffNew:0===e.totalRght&&e.totalLeft>0?o=v.diffRemoved:0===a?o="0%":a>0?o=`+${a.toFixed(2)}%`:a<0&&(o=`${a.toFixed(2)}%`),{"data-row":`double;${e.name};${e.totalLeft};${e.leftTicks};${e.totalRght};${e.rightTicks}`,isRowSelected:ce(e.name),onClick:()=>{i({name:e.name})},onContextMenu:t=>Q(t,e.name),onDoubleClick:()=>J(e.name),cells:[{value:ue(e.name)},{value:`${t} %`},{value:`${n} %`},{value:o,style:{color:r}}]}},[Q,J,i,v,ce,ue,c]),he=t.useMemo(()=>S?E.map(e=>"double"===e.type?de(e):fe(e)):[],[de,fe,S,E]),me=t.useMemo(()=>S?R&&0===P?{headRow:K,type:"not-filled",value:e.jsx("div",{className:"unsupported-format",children:v.noItemsFound})}:{headRow:K,type:"virtual",rowCount:P,rows:he,range:D,onRangeChange:te}:{headRow:K,...gl({flamebearer:a,sortBy:ee.sortBy,sortByDirection:ee.sortByDirection,fitMode:o,handleTableItemClick:i,highlightQuery:s,palette:c,selectedItem:l,messages:v,onRowContextMenu:Q,onRowDoubleClick:J})},[de,fe,d,o,a,Q,J,te,i,s,v,u,c,P,l,K,ee.sortBy,ee.sortByDirection,f,S,he,D,R]),pe=l.isJust&&l.value===k;return e.jsxs(e.Fragment,{children:[e.jsx(nl,{...ee,tableBodyRef:n,table:me,isLoading:S&&!R,className:gs("flamegraph-table",{"flamegraph-table-doubles":r}),virtualize:h,virtualizeRowHeight:m,virtualizeOverscan:p,scrollRef:g}),e.jsxs(Go,{...b,anchorPoint:x,onClose:X,className:sl,children:[u&&e.jsxs(li,{onClick:q,children:[e.jsx(Xa,{icon:xs.faCrosshairs}),v.focusOnThisFunction]}),e.jsxs(li,{onClick:Y,children:[e.jsx(Xa,{icon:ao.faCopy}),v.copyFunctionName]}),e.jsxs(li,{onClick:Z,children:[e.jsx(Xa,{icon:lo.faHighlighter}),pe?v.clearHighlight:v.highlightSimilarNodes]}),f&&d&&e.jsxs(li,{onClick:G,className:ll,children:[e.jsx(Wi,{fill:"currentColor"}),v.openInSandwichView]})]})]})}const bl=t.memo(function({flamebearer:n,fitMode:a,handleTableItemClick:r,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="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,g,m]),e.jsxs("div",{"data-testid":"table-view",ref:d,style:{"--kylin-flamegraph-scrollbar-size":`${m}px`},className:g?"flamegraph-table-wrapper flamegraph-table-wrapper--double":"flamegraph-table-wrapper",children:[e.jsx("div",{className:"flamegraph-table-scroll",ref:h,children:e.jsx(vl,{tableBodyRef:f,flamebearer:n,isDoubles:g,fitMode:a,highlightQuery:o,handleTableItemClick:r,palette:i,selectedItem:s,onFocusOnNode:l,updateView:c,enableSandwichView:u,virtualize:!0,virtualizeRowHeight:26,virtualizeOverscan:8,scrollRef:h})}),e.jsx(ol,{tableBodyRef:f,numTicks:n.numTicks,sampleRate:n.sampleRate,units:n.units,palette:i})]})});var yl,xl,wl={},kl={};function jl(){return yl||(yl=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"],a="f0e2",r="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,a,r]},e.faArrowRotateLeft=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(kl)),kl}function Sl(){return xl||(xl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=jl();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}(wl)),wl}var Nl,Cl,Tl=Sl(),_l={},Ml={};function Rl(){return Nl||(Nl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="diagram-project",n=["project-diagram"],a="f542",r="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,a,r]},e.faDiagramProject=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Ml)),Ml}function Fl(){return Cl||(Cl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Rl();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}(_l)),_l}var Pl,Il,El=Fl(),Ll={},Dl={};function Bl(){return Pl||(Pl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="ellipsis-vertical",n=["ellipsis-v"],a="f142",r="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,a,r]},e.faEllipsisVertical=e.definition,e.prefix="fas",e.iconName=t,e.width=128,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Dl)),Dl}function Al(){return Il||(Il=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Bl();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}(Ll)),Ll}var Ol=Al(),zl="Tooltip-module_tooltipWrapper__leDK-",$l="Tooltip-module_tooltipBubble__8vweF",Vl="Tooltip-module_tooltipArrow__7wGyN";function Hl(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=>Hl(e)).filter(e=>!!e);return t.length?t.join(" "):void 0}return t.isValidElement(e)?Hl(e.props.children):void 0}}const Wl=({placement:n,title:a,content:r,children:o})=>{const i=Hl(null!=a?a:r),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:zl,"data-placement":n||"top","data-tooltip":l?i:void 0,title:l?void 0:i,children:[o,l?e.jsxs("span",{className:$l,role:"tooltip",children:[i,e.jsx("span",{className:Vl})]}):null]}):e.jsx(e.Fragment,{children:o})};var Ul,Jl={};function Ql(){return Ul||(Ul=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="link",n=[128279,"chain"],a="f0c1",r="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,a,r]},e.faLink=e.definition,e.prefix="fas",e.iconName=t,e.width=576,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Jl)),Jl}var Xl,ql,Yl=Ql(),Zl={},Gl={};function Kl(){return Xl||(Xl=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t="magnifying-glass",n=[128269,"search"],a="f002",r="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,a,r]},e.faMagnifyingGlass=e.definition,e.prefix="fas",e.iconName=t,e.width=512,e.height=512,e.ligatures=n,e.unicode=a,e.svgPathData=r,e.aliases=n}(Gl)),Gl}function ec(){return ql||(ql=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Kl();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}(Zl)),Zl}var tc=ec(),nc="Input-module_input__ulQdV";const ac=t.forwardRef(({testId:t,className:n,type:a,name:r,placeholder:o,minLength:i=0,debounceTimeout:s=100,onChange:l,value:u,htmlId:f},d)=>e.jsx(c.DebounceInput,{inputRef:d,"data-testid":t,className:`${nc} ${n||""}`,type:a,name:r,placeholder:o,minLength:i,debounceTimeout:s,onChange:l,value:u,id:f}));var rc="SharedQueryInput-module_wrapper__XRxrd",oc="SharedQueryInput-module_search__XlzRv",ic="SharedQueryInput-module_search-synced__J4T4b",sc="SharedQueryInput-module_searchWithSync__ryuQa",lc="SharedQueryInput-module_icon__Aq0Hv",cc="SharedQueryInput-module_checked__oRvod",uc="SharedQueryInput-module_sync__0IO2N",fc="SharedQueryInput-module_syncSelected__hstBI",dc="SharedQueryInput-module_searchIcon__kfJxO";const hc=({onHighlightChange:n,highlightQuery:a,sharedQuery:r,width:o})=>{const i=Ti(),s=(e=>{const n=t.useRef();return t.useEffect(()=>{n.current=e},[e]),n.current})(null==r?void 0:r.syncEnabled),l=t.useRef(null),[c,u]=t.useState(!1);t.useEffect(()=>{"string"==typeof(null==r?void 0:r.searchQuery)&&(r.syncEnabled&&n(r.searchQuery),!r.syncEnabled&&s&&s!==(null==r?void 0:r.id)&&n(""))},[null==r?void 0:r.searchQuery,null==r?void 0:r.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(()=>r&&r.syncEnabled?r.searchQuery||"":a,[r,a]),d=t.useMemo(()=>`${r?sc:oc} ${(null==r?void 0:r.syncEnabled)?ic:""}`,[r]),h=(null==r?void 0:r.syncEnabled)?i.unsyncSearchBars:i.syncSearchBars;return e.jsxs("div",{ref:l,className:rc,style:{width:o},children:[e.jsx("span",{className:dc,children:e.jsx(Xa,{icon:tc.faSearch})}),e.jsx(ac,{testId:"flamegraph-search",className:d,type:"search",name:"flamegraph-search",placeholder:c?"搜索函数 / 过滤":i.searchPlaceholder,minLength:1,debounceTimeout:100,onChange:e=>{n(e.target.value),r&&r.syncEnabled&&r.onQueryChange(e.target.value)},value:f}),r?e.jsx(Wl,{placement:"top",title:h,children:e.jsx("button",{className:r.syncEnabled?fc:uc,onClick:()=>{const e=!(null==r?void 0:r.syncEnabled)&&(null==r?void 0:r.id);null==r||r.toggleSync(e),e?null==r||r.onQueryChange(a):(n(a),null==r||r.onQueryChange(""))},children:e.jsx(Xa,{className:`${r.syncEnabled?cc:lc}`,icon:Yl.faLink})})}):null]})};var mc="DiffLegend-module_flamegraph-legend__Cywr1",pc="DiffLegend-module_flamegraph-legend-list__swdXj",gc="DiffLegend-module_flamegraph-legend-item__0P-6g";function vc(t){const{palette:n,showMode:a}=t,r=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}`)}}(a),o=Fr(n),i="small"===a?{"--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:`${mc} ${pc}`,style:i,children:r.map(t=>e.jsxs("div",{className:gc,style:{backgroundColor:o(t).rgb().toString()},children:[t>0?"+":"",t,"%"]},t))})}var bc="Dropdown-module_dropdownMenu__tbN8r",yc="Dropdown-module_dropdownMenuButton__Xy8M4";function xc({id:t,children:n,className:a,disabled:r,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(kc,{"aria-label":p,className:`${yc} ${m}`,disabled:r,type:"button",children:o||i});return e.jsxs(ii,{id:t,"aria-label":p,className:gs(a,bc),"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(ci,{children:i}),n]})}const wc=li,kc=$o;var jc="DiffLegendPaletteDropdown-module_container__h8Tts",Sc="DiffLegendPaletteDropdown-module_triggerButton__oezA6",Nc="DiffLegendPaletteDropdown-module_dropdownArrow__-Lu0w",Cc="DiffLegendPaletteDropdown-module_menuItem__5iWry",Tc="DiffLegendPaletteDropdown-module_menuItemText__a-tt0",_c="DiffLegendPaletteDropdown-module_dropdownMenu__G0NkR",Mc="DiffLegendPaletteDropdown-module_menuItemWrapper__vAw-Q",Rc="DiffLegendPaletteDropdown-module_menuItemSelected__1gu9m";const Fc=[vi,bi],Pc=t=>{const{palette:n=vi,onChange:a}=t,r=Ti(),o=e=>"Default"===e.name?r.paletteDefaultName:"Color Blind"===e.name?r.paletteColorBlindName:e.name,i=e=>"Default"===e.name?r.paletteDefaultDesc:"Color Blind"===e.name?r.paletteColorBlindDesc:"";return e.jsx("div",{className:jc,children:e.jsx(xc,{label:r.diffLegendSelectPalette,align:"end",className:_c,menuButton:e.jsxs(kc,{className:gs(yc,Sc),children:[e.jsx(vc,{palette:n,showMode:"small"}),e.jsx("span",{className:Nc})]}),onItemClick:e=>{e.value&&a(e.value)},children:Fc.map(t=>e.jsx(wc,{value:t,className:gs(Mc,t.name===n.name&&Rc),children:e.jsx("div",{className:Cc,children:e.jsxs("span",{className:Tc,children:[o(t)," ",i(t)]})})},t.name))})})};var Ic={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 Ec=y.bind(Ic),Lc=(e,t,n)=>{const a=0===t?e-360-5:e-360-16-5;let r=0,o=0;return n.reverse().forEach(e=>{o+=e,a<=o&&(r+=1)}),r},Dc=()=>e.jsx("div",{className:Ic.divider}),Bc=t.memo(({view:n,handleSearchChange:a,highlightQuery:r,isFlamegraphDirty:o,reset:s,updateFitMode:l,fitMode:c,updateView:u,selectedNode:f,onFocusOnSubtree:d,flamegraphType:h,enableChangingDisplay:m=!0,sharedQuery:p,ExportData:g,palette:v,setPalette:b})=>{const y=t.useRef(null),[x,w]=t.useState(!1),k=Ti();t.useEffect(()=>{const e=y.current;if(!e)return;const t=e.closest("[data-theme='kylin'], [data-flamegraph-color-mode='kylin']");w(!!t)},[]);const j=x?32:44,S=x?220:360,N="double"===h&&v&&b,C=[{el:e.jsxs(e.Fragment,{children:[e.jsx(zc,{fitMode:c,updateFitMode:l}),e.jsx(Dc,{})]}),width:2*j+5},{el:e.jsx(Oc,{isFlamegraphDirty:o,reset:s}),width:j},{el:e.jsxs(e.Fragment,{children:[e.jsx(Ac,{selectedNode:f,onFocusOnSubtree:d}),e.jsx(Dc,{})]}),width:j+5},m?{el:e.jsx(Vc,{flamegraphType:h,view:n,updateView:u}),width:j*("single"===h?5:3)}:null,t.isValidElement(g)?{el:e.jsxs(e.Fragment,{children:[e.jsx(Dc,{}),g]}),width:j+5}:null].filter(e=>null!==e),T=C.reduce((e,t)=>[...e,t.width],[]),{isCollapsed:_,collapsedItemsNumber:M,handleMoreClick:R}=((e,n)=>{const[a,r]=t.useState(!0),[o,s]=t.useState(0);return t.useLayoutEffect(()=>{if(e.current){const{width:t}=e.current.getBoundingClientRect(),a=Lc(t,o,n);s(a)}},[e.current,n]),i(e,e=>{const{width:t}=e.target.getBoundingClientRect(),a=Lc(t,o,n);s(a),r(!0)}),{isCollapsed:a,handleMoreClick:()=>{r(e=>!e)},collapsedItemsNumber:o}})(y,T),F=C.reduce((e,t,n)=>(n<M?e.hidden.push(t):e.visible.push(t),e),{visible:[],hidden:[]});return e.jsx("div",{role:"toolbar",ref:y,children:e.jsxs("div",{className:Ic.navbar,children:[e.jsx("div",{className:Ic.searchWrapper,children:e.jsx(hc,{width:S,onHighlightChange:a,highlightQuery:r,sharedQuery:p})}),e.jsxs("div",{className:Ic.rightSection,children:[N&&e.jsxs(e.Fragment,{children:[e.jsx(Pc,{palette:v,onChange:b}),e.jsx(Dc,{})]}),e.jsxs("div",{className:Ic.itemsContainer,children:[F.visible.map((t,n)=>e.jsx("div",{className:Ic.item,style:{width:t.width},children:t.el},n)),0!==M&&e.jsx(Wl,{placement:"top",title:k.more,children:e.jsx("button",{onClick:R,className:Ec({[Ic.moreButton]:!0,[Ic.active]:!_}),children:e.jsx(Xa,{icon:Ol.faEllipsisV})})})]})]}),!_&&e.jsx("div",{className:Ic.navbarCollapsedItems,children:F.hidden.map((t,n)=>e.jsx("div",{className:Ic.item,style:{width:t.width},children:t.el},n))})]})})});function Ac({onFocusOnSubtree:t,selectedNode:n}){const a=Ti(),r=n.mapOr(()=>{},e=>()=>t(e.i,e.j));return e.jsx(Wl,{placement:"top",title:a.collapseNodesAbove,children:e.jsx("div",{children:e.jsx(Ks,{disabled:!n.isJust,onClick:r,className:Ic.collapseNodeButton,"aria-label":a.collapseNodesAbove,children:e.jsx(Xa,{icon:mo.faCompressAlt})})})})}function Oc({isFlamegraphDirty:t,reset:n}){const a=Ti();return e.jsx(Wl,{placement:"top",title:a.resetView,children:e.jsx("span",{children:e.jsx(Ks,{id:"reset",disabled:!t,onClick:n,className:Ic.resetViewButton,"aria-label":a.resetView,children:e.jsx(Xa,{icon:Tl.faUndo})})})})}function zc({fitMode:t,updateFitMode:n}){const a=Ti(),r=e=>t===e;return e.jsxs(e.Fragment,{children:[e.jsx(Wl,{placement:"top",title:a.headFirst,children:e.jsx(Ks,{onClick:()=>n("HEAD"),className:Ec({[Ic.fitModeButton]:!0,[Ic.selected]:r("HEAD")}),children:e.jsx(Ui,{})})}),e.jsx(Wl,{placement:"top",title:a.tailFirst,children:e.jsx(Ks,{onClick:()=>n("TAIL"),className:Ec({[Ic.fitModeButton]:!0,[Ic.selected]:r("TAIL")}),children:e.jsx(Ji,{})})})]})}const $c=(t,n)=>"single"===t?[{label:n.viewFlamegraph,value:"flamegraph",Icon:Hi},{label:n.viewTable,value:"table",Icon:$i},{label:n.viewTableAndFlamegraph,value:"both",Icon:Vi},{label:n.viewSandwich,value:"sandwich",Icon:Wi},{label:n.viewGraphviz,value:"graphviz",Icon:()=>e.jsx(Xa,{icon:El.faProjectDiagram})}]:[{label:n.viewFlamegraph,value:"flamegraph",Icon:Hi},{label:n.viewTable,value:"table",Icon:$i},{label:n.viewTableAndFlamegraph,value:"both",Icon:Vi}];function Vc({view:t,updateView:n,flamegraphType:a}){const r=Ti(),o=$c(a,r);return e.jsx("div",{className:Ic.viewType,children:o.map(({label:a,value:r,Icon:o})=>e.jsx(Wl,{placement:"top",title:a,children:e.jsx(Ks,{"data-testid":r,onClick:()=>n(r),className:Ec({[Ic.toggleViewButton]:!0,selected:t===r}),children:e.jsx(o,{})})},r))})}function Hc(e,t){const n={},a={};let r={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,r=e.levels[n];for(let e=0;e<r.length;e+=4){const o=r[e+0],i=r[e+1];if(f>=o&&f<o+i){const r=[t,n,e].join("/");m=a[r].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,a[c]=v,m&&g&&n[m].children.push(v),0===s&&(r=v)}}),r}const Wc=e=>{const t={maxSelf:100,names:[],levels:[]},n=(e,a,r)=>{var o;const{name:i,children:s,self:l,total:c,offset:u}=e;t.names.push(i),(o=t.levels)[a]||(o[a]=[]),t.maxSelf=Math.max(t.maxSelf,l[0]||0),t.levels[a]=t.levels[a].concat([r,c[0]||0,l[0]||0,t.names.length-1]);for(let e=0;e<s.length;e+=1){r+=n(s[e],a+1,r)}return u||c[0]||0};return n(e,0,0),t};function Uc(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 a=e.children[n],r=t.get(e.children[n].name);r&&r!==a&&(r.total[0]+=a.total[0],r.self[0]+=a.self[0],r.children=r.children.concat(a.children))}e.children=Array.from(t.values());for(let t=0;t<e.children.length;t+=1)Uc(e.children[t])}function Jc(e,t){const n=function(e,t){const n=Hc(e),a={format:"single",numTicks:0,maxSelf:100,sampleRate:100,names:[],levels:[],units:e.units,spyName:e.spyName},r={name:t,total:[],self:[0],children:[]},o=e=>{e.name===t&&(a.numTicks+=e.total[0],r.total=[a.numTicks],r.children=r.children.concat(e.children));for(let t=0;t<e.children.length;t+=1)o(e.children[t])};return o(n),Uc(r),{...a,...Wc(r)}}(JSON.parse(JSON.stringify(e)),t);return n}function Qc(e,t){const n=function(e,t){const n=Hc(e),a={format:"single",maxSelf:100,sampleRate:100,numTicks:0,names:[],levels:[],units:e.units,spyName:e.spyName},r=[],o=[],i={name:t,total:[0],self:[0],children:[]},s=(e,n=[])=>{const i=n.concat([{...e,children:[]}]);e.name===t&&(o.push(i),r.push(e.total[0]),a.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 a=n;return e.forEach(({name:e,...n})=>{const r={name:e,...n,total:[t]};a.children=[r],a=r}),n.children[0]})(e.reverse(),r[t]))}),Uc(i);const l=Wc(i);return l.levels=l.levels.reverse().slice(0,-1),{...a,...l}}(JSON.parse(JSON.stringify(e)),t);return n}var Xc={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 qc(e){const t=[];return Object.keys(e).forEach(n=>{var a;t.push(`${n}="${a=String(e[n]||""),a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`)}),`[${t.join(" ")}]`}function Yc(e,t){return`${(100*e/t).toFixed(2)}%`}function Zc(e,t){let n,a,r,o;t?(n=.1,a=.93):(n=1,a=.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=a,r=a*(1+n*e)):(r=a,o=a*(1-n*e));const i=a*(1-n);return`#${Math.floor(255*r).toString(16).padStart(2,"0")}${Math.floor(255*o).toString(16).padStart(2,"0")}${Math.floor(255*i).toString(16).padStart(2,"0")}`}function Gc(e,t,n,a){const{self:r}=t,{total:o}=t,i=t.name.replace(/"/g,'\\"'),s=e(r),l=8+Math.ceil(16*Math.sqrt(r/n)),c=Zc(o/a,!1),u=Zc(o/a,!0),f=function(e,t,n,a,r){let o="";o=`${function(e){return e.replace(/.*\//,"")}(t)}\n`;const i=e(n);0!==n?o=`${o+i} (${Yc(n,r)})`:o+="0";let s=i;a!==n&&(o+=0!==n?"\n":" ",s=e(a),o=`${o}of ${s} (${Yc(a,r)})`);return o}(e,i,r,o,a),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} ${qc(d)}`}function Kc(e){if("double"===e.metadata.format)return"diff flamegraphs are not supported";const t=Hc(e.flamebearer),n=[],a=[];const[r,o,,i]=function e(t,n,a,r,o){return t.children.forEach(t=>{const[i,s]=e(t,n,a,r,o);n=Math.max(n,i),a=Math.max(a,s)}),n=Math.max(n,t.self[0]),a=Math.max(a,t.total[0]),r+=t.self[0],o+=t.total[0],[n,a,r,o]}(t,0,0,0,0),{sampleRate:s,units:l}=e.metadata,c=br(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 a=m(n,t.concat([e.name])),r=`${e.name}/${n.name}`;n.name!==e.name&&(d[r]?d[r].weight+=n.total[0]:d[r]={from:f[e.name],to:a,weight:n.total[0],residual:!1},a.parents.push(d[r]),f[e.name].children.push(d[r]))}),f[e.name]}t.children.forEach(e=>{m(e,[])});const p=.005*i,g=.001*i;function v(e,t){let n=0,a=t;if(e.forEach(e=>{e.weight>0&&(a+=Math.abs(e.weight))}),0!==a&&(e.forEach(e=>{const t=Math.abs(e.weight)/a;n+=-t*Math.log2(t)}),t>0)){const e=Math.abs(t)/a;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],a=b[t.name];return n!==a?a-n:e.name!==t.name?e.name<t.name?-1:1:e.self!==t.self?a-n:e.name<t.name?-1:1}),x={};function w(e){const[t,n]=[e.from,e.to],a={},r=[n];for(;r.length>0;){const n=r.shift();for(let o=0;o<n.parents.length;o+=1){const i=n.parents[o];if(e!==i&&!a[i.from.name]){if(i.from===t)return!0;a[i.from.name]=!0,r.push(i.from)}}}return!1}return y.forEach(e=>{x[e.name]=e}),y.slice(80).forEach(e=>{delete x[e.name]}),function e(t,n){const a=!x[t.name];t.children.forEach(r=>{const o=!x[r.name];if(e(r,a?n:t),!o&&n&&a){const e=`${n.name}/${r.name}`;d[e]||(d[e]={from:f[n.name],to:f[r.name],weight:0,residual:!0}),d[e].weight+=r.total[0],d[e].residual=!0}})}(t,null),f=x,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 a=t[e];if(!a.residual)break;w(a)&&(n.push(a),delete d[`${a.from.name}/${a.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(Gc(u,f[e],r,o))}),Object.keys(d).forEach(e=>{a.push(function(e,t,n){const a=t.from.name.replace(/"/g,'\\"'),r=t.to.name.replace(/"/g,'\\"'),o=t.weight,i=e(t.weight),s=`${a} -> ${r} (${i})`,l={label:i,weight:1+100*o/n,penwidth:1+5*o/n,tooltip:s,labeltooltip:s,fontname:"",color:Zc(o/n,!1),style:t.residual?"dotted":""};return`N${t.from.index} -> N${t.to.index} ${qc(l)}`}(u,d[e],o))}),`digraph "unnamed" {\n fontname= ""\n ${n.join("\n")}\n ${a.join("\n")}\n }`}var eu="GraphVizPanel-module_graphVizPane__B18cQ";const tu=()=>null;function nu({flamebearer:n}){var a,r;const o=n,i=(null===(a=o.metadata)||void 0===a?void 0:a.format)&&(null===(r=o.flamebearer)||void 0===r?void 0:r.levels),s=`graphviz-pane-${(null==o?void 0:o.appName)||String((new Date).valueOf())}`,l=t.useMemo(()=>Kc(o),[JSON.stringify(o)]);return e.jsx("div",{className:eu,children:i?e.jsx(tu,{options:{zoom:!0,width:"150%",height:"100%",scale:1,useWorker:!1},dot:l}):e.jsx("div",{children:"NO DATA"})},s)}function au(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const a=[0,Math.floor(n/2),n-1];for(let n=0;n<a.length;n+=1){const r=e[a[n]];if(!r||0===r.length)continue;const o=Math.min(8,r.length);for(let e=0;e<o;e+=1)t^=0|r[e],t=Math.imul(t,16777619);for(let e=Math.max(0,r.length-o);e<r.length;e+=1)t^=0|r[e],t=Math.imul(t,16777619)}return t>>>0}function ru(e){let t=2166136261;const n=e.length;if(0===n)return t>>>0;const a=Math.min(32,n),r=[...Array.from({length:a},(e,t)=>t),...Array.from({length:a},(e,t)=>n-a+t)];for(let n=0;n<r.length;n+=1){const a=e[r[n]]||"";for(let e=0;e<a.length;e+=1)t^=a.charCodeAt(e),t=Math.imul(t,16777619)}return t>>>0}function ou(e){var t,n,a,r,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!==(r=null===(a=e.levels)||void 0===a?void 0:a.length)&&void 0!==r?r:0,null!==(o=l.leftTicks)&&void 0!==o?o:"na",null!==(i=l.rightTicks)&&void 0!==i?i:"na",au(e.levels),ru(e.names||[])].join("|");return e.__kylinSignature=c,c}function iu(e,t){const n=[...t];function a(e,t,n){for(const a of e){let e=0;for(let r=t;r<a.length;r+=n)a[r]-=e,e+=a[r]+a[r+1]}}return"double"===e?(a(n,0,7),a(n,3,7)):a(n,0,4),n}function su(e,t){const n=[...t];function a(e,t,n){for(const a of e){let e=0;for(let r=t;r<a.length;r+=n)a[r]+=e,e=a[r]+a[r+1]}}return"double"===e?(a(n,0,7),a(n,3,7)):a(n,0,4),n}function lu(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,a={...n,flamebearer:{...n.flamebearer}};n.__kylinDecoded||((t=a).flamebearer.levels=su(t.metadata.format,t.flamebearer.levels),n.__kylinDecoded=!0,a.__kylinDecoded=!0);const r={...a,...a.metadata,...a.flamebearer,flamebearer:void 0,metadata:void 0};return delete r.flamebearer,delete r.metadata,r}var t;if(e.flamebearer)return e.flamebearer;return{format:"single",names:[],units:"unknown",levels:[[]],spyName:"unknown",numTicks:0,sampleRate:0,maxSelf:0}}class cu extends t.Component{constructor(t){super(t),this.resetFlamegraphState={focusedNode:n.Maybe.nothing(),zoom:n.Maybe.nothing()},this.initialFlamegraphState=this.resetFlamegraphState,this.calcNewConfigs=(e,t)=>{const n=this.state.flamegraphConfigs,a=(e,t,n)=>{const a=(e,t,n)=>e.names[rr(e.format).getBarName(e.levels[t],n)];if(n.isNothing)return!0;try{const r=n,o=a(e,r.value.i,r.value.j);return o===a(t,r.value.i,r.value.j)}catch{return!1}};a(e,t,this.state.flamegraphConfigs.zoom)||(n.zoom=this.resetFlamegraphState.zoom);return a(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 ou(e)===ou(t)}(e,t),this.onReset=()=>{this.setState({...this.state,flamegraphConfigs:{...this.state.flamegraphConfigs,...this.initialFlamegraphState},selectedItem:n.Maybe.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 a={...this.state.flamegraphConfigs};const{zoom:r}=this.state.flamegraphConfigs;r.isJust&&r.value.i<=e&&(a={...a,zoom:this.initialFlamegraphState.zoom}),this.setState({...this.state,flamegraphConfigs:{...a,focusedNode:n.Maybe.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:a,levels:r,format:o}=n,i=rr(o),s=t.value.i,l=t.value.j,c=r[s];if(!c)return!0;const u=i.getBarOffset(c,l),f=u+i.getBarTotal(c,l);for(let t=s;t<r.length;t++){const n=r[t];for(let t=0;t<n.length;t+=i.jStep){const r=i.getBarOffset(n,t),o=i.getBarTotal(n,t);if(r>=u&&r+o<=f){if(a[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:n.Maybe.nothing()});this.isNameInFocusedSubtree(t)?this.setState({selectedItem:n.Maybe.just(t)}):this.setState({selectedItem:n.Maybe.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,a=e.numTicks;if(!a)return{rangeMin:0,rangeMax:1};const r=rr(e.format),o=t=>{const n=e.levels[t.i];if(!n)return{rangeMin:0,rangeMax:1};const o=r.getBarOffset(n,t.j),i=r.getBarTotal(n,t.j);return{rangeMin:o/a,rangeMax:(o+i)/a}};return t.match({Just:e=>n.match({Just:t=>{const n=o(t),a=o(e);return n.rangeMax-n.rangeMin<a.rangeMax-a.rangeMin?n:a},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:Hr(Xc.tablePane,"vertical"===this.state.panesOrientation?Xc.vertical:Xc.horizontal),children:e.jsx(bl,{"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"),a=this.shouldShowToolbar(),r=!this.state.flamebearer||this.state.flamebearer.names.length<=1,o=this.context,i="Location"!==o.location,s=this.state.flamebearer.numTicks,l=br(s,this.state.flamebearer.sampleRate,this.state.flamebearer.units).format(s,this.state.flamebearer.sampleRate),c=mr(l,i)||l,f=function(e,t=pr){const n=Math.abs(e);for(const{value:a,label:r}of t)if(n>=a)return`${(e/a).toFixed(2).replace(/\.?0+$/,"")} ${r}`;return dr(e)}(s,o.sampleCountFormat),d=o.tooltipSamples.replace(/[::]\s*$/,""),h=(null===(t=o.tooltipUnitTitles[this.state.flamebearer.units])||void 0===t?void 0:t.formattedValue)||o.tooltipUnitTitles.unknown.formattedValue,m=this.getActiveRange(),p=m.rangeMin>0||m.rangeMax<1,g=Math.max(0,Math.min(s,(m.rangeMax-m.rangeMin)*s)),v=s>0?g/s*100:0,b=(()=>{const e=rr(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 a=e.getBarName(n,t.j);return this.state.flamebearer.names[a]||""})(),y=e.jsx(fs,{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:a,setPalette:this.handleSetPalette,enableSandwichView:this.props.enableSandwichView,breadcrumb:r?void 0:{totalValueText:c,totalSamplesText:f,samplesLabel:d,unitLabel:h,hasFocus:p,focusPercent:v,focusLabel:b,ofTotalPlacement:i?"before":"after",ofTotalLabel:o.ofTotal,clearFocusLabel:o.clearFocus,onClearFocus:this.clearFocus}},"flamegraph-pane"),x=(()=>{if("sandwich"!==this.state.view)return e.jsx("div",{className:Xc.sandwichPane},"sandwich-pane");if(this.state.selectedItem.isNothing)return e.jsx("div",{className:Xc.sandwichPane,children:e.jsxs("div",{className:Hr(Xc.sandwichPaneInfo,"vertical"===this.state.panesOrientation?Xc.vertical:Xc.horizontal),children:[e.jsx("div",{className:Xc.arrow}),"Select a function to view callers/callees sandwich view"]})},"sandwich-pane");const t=Qc(this.state.flamebearer,this.state.selectedItem.value),n=Jc(this.state.flamebearer,this.state.selectedItem.value),r=t=>e.jsx(fs,{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:a,setPalette:this.handleSetPalette,...t});return e.jsxs("div",{className:Xc.sandwichPane,children:[e.jsxs("div",{className:Xc.sandwichTop,children:[e.jsx("span",{className:Xc.name,children:"Callers"}),r({flamebearer:t})]}),e.jsxs("div",{className:Xc.sandwichBottom,children:[e.jsx("span",{className:Xc.name,children:"Callees"}),r({flamebearer:n,headerVisible:!1,showSingleLevel:!0})]})]},"sandwich-pane")})(),w=function(e,t,n,a,r){switch(e){case"table":return[n];case"flamegraph":return[t];case"sandwich":return[n,a];case"both":return[n,t];case"graphviz":return[r];default:throw new Error(`Invalid view '${e}'`)}}(this.state.view,y,n,x,e.jsx(nu,{flamebearer:this.state.flamebearer}));return e.jsxs("div",{children:[e.jsxs("div",{children:[a&&e.jsx(Bc,{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:`${Xc.flamegraphContainer} ${Hr("vertical"===this.state.panesOrientation?Xc.vertical:Xc.horizontal,Xc[this.state.panesOrientation],Xc.panesWrapper)}`,children:r?e.jsx(Ur,{}):w.map(e=>e)})]}),this.props.showPyroscopeLogo&&e.jsxs("div",{className:Xc.createdBy,children:["Created by",e.jsxs("a",{href:"https://twitter.com/PyroscopeIO",rel:"noreferrer",target:"_blank",children:[e.jsx(u,{width:"30",height:"30"}),"@PyroscopeIO"]})]})]})},this.state={isFlamegraphDirty:!1,view:this.props.onlyDisplay?this.props.onlyDisplay:"both",fitMode:"HEAD",flamebearer:lu(t),panesOrientation:t.panesOrientation?t.panesOrientation:"horizontal",searchQuery:"",selectedItem:n.Maybe.nothing(),flamegraphConfigs:this.initialFlamegraphState,palette:vi}}componentDidUpdate(e,t){if(e.profile!==this.props.profile||e.flamebearer!==this.props.flamebearer){const e=t.flamebearer,a=lu(this.props);if(!this.isSameFlamebearer(e,a)){const t=this.calcNewConfigs(e,a);return void this.setState({flamebearer:a,flamegraphConfigs:{...this.state.flamegraphConfigs,...t},selectedItem:n.Maybe.nothing()})}}t.flamegraphConfigs!==this.state.flamegraphConfigs&&this.updateFlamegraphDirtiness()}shouldShowToolbar(){return void 0===this.props.showToolbar||this.props.showToolbar}}cu.contextType=Ni,cu.defaultProps={showCredit:!1};const uu={showPyroscopeLogo:!1},fu=(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)?ji:ki};exports.Box=function(t){const{children:n,noPadding:a,className:r="",theme:o="dark"}=t,i=a?"":qa.padding;return e.jsx("div",{className:`${qa.box} ${i} ${r}`,"data-theme":o,children:n})},exports.DefaultPalette=vi,exports.Flamegraph=$r,exports.FlamegraphI18nProvider=Ci,exports.FlamegraphRenderer=n=>{const{i18n:a,locale:r,colorMode:o="light",sandwich:i=!0,...s}=n,l=t.useMemo(()=>fu(r,a),[r,a]),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(Ci,{messages:l,children:e.jsx(cu,{...uu,enableSandwichView:i,...s})})})},exports.convertJaegerTraceToProfile=function(e){const t={numTicks:0,maxSelf:0,names:[],levels:[]},n={},a={children:[]};return e.spans.forEach(e=>{e.children=[],n[e.spanID]=e}),e.spans.forEach(e=>{let t=a;e.references&&e.references.length>0&&(t=n[e.references[0].spanID]||a),t.children.push(e)}),function e(t,n){(t.children||[]).forEach(t=>e(t));let a=0;const r=f(t.children||[],e=>e.operationName);t.children=d(r,e=>{const t=e[0];for(let n=1;n<e.length;n+=1)t.duration+=e[n].duration;return a+=t.duration,t}),t.total=t.duration||a,t.self=Math.max(0,t.total-a)}(a),function n(a,r,o){var i;return t.numTicks||(t.numTicks=a.total),(i=t.levels)[r]||(i[r]=[]),t.levels[r].push(o),t.levels[r].push(a.total),t.levels[r].push(a.self),t.names.push((a.processID?`${e.processes[a.processID].serviceName}: `:"")+(a.operationName||"total")),t.levels[r].push(t.names.length-1),(a.children||[]).forEach(e=>{o+=n(e,r+1,o)}),a.total}(a,0,0),t.levels=iu("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=su("single",e.flamebearer.levels),t.flamebearer.levels=su("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},a=Hc(e,t),r=(e,t,a,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([a,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]=r(l[e],t+1,a,o);a+=n,o+=i}return[u[0]||0,u[1]||0]};return r(a,0,0,0),n}(e.flamebearer,t.flamebearer);n.levels=iu("double",n.levels);const a={...e.metadata};return a.format="double",{version:1,flamebearer:n,metadata:a,leftTicks:e.flamebearer.numTicks,rightTicks:t.flamebearer.numTicks}},exports.flamegraphDefaultMessages=ki,exports.flamegraphZhCNMessages=ji;
|
|
18
18
|
//# sourceMappingURL=index.node.cjs.js.map
|