UNPKG

jsroot

Version:
2 lines 1.34 MB
// https://root.cern/js/ v7.10.1 !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).JSROOT=t.JSROOT||{})}(this,function(t){"use strict";var e="undefined"!=typeof document?document.currentScript:null;const i="7.10.1 26/11/2025",n=Boolean("object"==typeof process&&process.versions?.node&&process.versions.v8),r={id_counter:1},s="undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("hist.min.js",document.baseURI).href,a="$jsrootsys";function o(t){return t&&"object"==typeof t}function l(t){return"function"==typeof t}function h(t){return"string"==typeof t}function c(t){return o(t)&&l(t.then)}function d(t,e){return new Promise(i=>{setTimeout(()=>{const e=l(t)?t():t;i(e)},e)})}function u(t){return c(t)?t:Promise.resolve(t)}let f="";if("$"!==a[0])f=a;else if(s&&h(s)){let t=s.indexOf("modules/core.mjs");t<0&&(t=s.indexOf("build/jsroot.js")),t<0&&(t=s.indexOf("build/jsroot.min.js")),t>=0?f=s.slice(0,t):r.ignore_v6=!0}n||(f?console.log(`Set jsroot source_dir to ${f}, ${i}`):console.log(`jsroot bundle, ${i}`));let p=n;function m(){return p}function g(){return n}const x=g()?t=>Buffer.from(t,"base64").toString("latin1"):globalThis?.atob,_=g()?t=>Buffer.from(t,"latin1").toString("base64"):globalThis?.btoa,y={isFirefox:!0,isSafari:!1,isChrome:!1,isWin:!1,touches:!1,screenWidth:1200};function v(t){if(t.length<14||t.indexOf("[object "))return 0;const e=t.indexOf("Array]");return e<0||e!==t.length-6?0:14===t.length?1:2}"undefined"!=typeof document&&"undefined"!=typeof window&&"undefined"!=typeof navigator&&(navigator.userAgentData?.brands?.forEach(t=>{"HeadlessChrome"===t.brand?(y.isChromeHeadless=!0,y.chromeVersion=parseInt(t.version)):"Chromium"===t.brand&&(y.isChrome=!0,y.chromeVersion=parseInt(t.version))}),y.chromeVersion?(y.isFirefox=!1,y.isWin="Windows"===navigator.userAgentData.platform):(y.isFirefox=navigator.userAgent.indexOf("Firefox")>=0,y.isSafari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,y.isChrome=Boolean(window.chrome),y.isChromeHeadless=navigator.userAgent.indexOf("HeadlessChrome")>=0,y.chromeVersion=y.isChrome||y.isChromeHeadless?navigator.userAgent.indexOf("Chrom")>0?parseInt(navigator.userAgent.match(/Chrom(?:e|ium)\/([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)/)[1]):134:0,y.isWin=navigator.userAgent.indexOf("Windows")>=0),y.android=/android/i.test(navigator.userAgent),y.touches="ontouchend"in document,y.screenWidth=window.screen?.width??1200);const b={Render3D:{Default:0,WebGL:1,WebGLImage:2,SVG:3,None:4,fromString(t){return"webgl"===t||"gl"===t?this.WebGL:"img"===t?this.WebGLImage:"svg"===t?this.SVG:"none"===t?this.None:this.Default}},Embed3D:{Default:0,Overlay:1,Embed:2,EmbedSVG:3},Latex:{Off:0,Symbols:1,Normal:2,MathJax:3,AlwaysMathJax:4}},M={Render3D:b.Render3D.Default,Render3DBatch:b.Render3D.Default,Embed3D:b.Embed3D.Default,CanvasWidth:1200,CanvasHeight:800,CanvasScale:1,Tooltip:!n,TooltipAnimation:500,ContextMenu:!n,Zooming:!n,ZoomMouse:!n,ZoomWheel:!n,ZoomTouch:!n,MoveResize:!y.touches&&!n,HandleKeys:!n,DragAndDrop:!n,DragGraphs:!0,UserSelect:"none",ProgressBox:!n,ToolBar:!n&&"popup",ToolBarSide:"left",ToolBarVert:!1,CanEnlarge:!0,CanAdjustFrame:!1,ApproxTextSize:!1,LoadSymbolTtf:!1,OptimizeDraw:1,AutoStat:!0,FrameNDC:{},SmallPad:{width:150,height:100},Palette:57,Latex:b.Latex.Normal,GeoGradPerSegm:6,GeoCompressComp:!0,IgnoreUrlOptions:!1,HierarchyLimit:250,DislpayKind:"simple",BrowserWidth:250,XValuesFormat:void 0,YValuesFormat:void 0,ZValuesFormat:void 0,HandleWrongHttpResponse:!1,UseStamp:!n,MaxRanges:200,TreeReadBunchSize:1e6,FilesTimeout:0,FilesRemap:{"https://root.cern/":"https://root-eos.web.cern.ch/"},WithCredentials:!1,SkipStreamerInfos:!1,OnlyLastCycle:!1,DarkMode:!1,PreferSavedPoints:!1,AxisTiltAngle:25,StripAxisLabels:!0,CutAxisLabels:!1,FuncAsCurve:!1,TimeZone:"",NewTabUrl:"",NewTabUrlPars:"",NewTabUrlExportSettings:!1,Debug:!1},w={fName:"Modern",fOptLogx:0,fOptLogy:0,fOptLogz:0,fOptDate:0,fOptFile:0,fDateX:.01,fDateY:.01,fOptTitle:1,fCanvasColor:0,fPadColor:0,fPadBottomMargin:.1,fPadTopMargin:.1,fPadLeftMargin:.1,fPadRightMargin:.1,fPadGridX:!1,fPadGridY:!1,fPadTickX:0,fPadTickY:0,fPadBorderSize:2,fPadBorderMode:0,fCanvasBorderSize:2,fCanvasBorderMode:0,fStatColor:0,fStatStyle:1e3,fStatTextColor:1,fStatFontSize:0,fStatFont:42,fStatBorderSize:1,fStatFormat:"6.4g",fStatX:.98,fStatY:.935,fStatW:.2,fStatH:.16,fTitleAlign:23,fTitleColor:0,fTitleTextColor:1,fTitleBorderSize:0,fTitleFont:42,fTitleFontSize:.05,fTitleStyle:0,fTitleX:.5,fTitleY:.995,fTitleW:0,fTitleH:0,fFitFormat:"5.4g",fOptStat:1111,fOptFit:0,fNumberContours:20,fGridColor:0,fGridStyle:3,fGridWidth:1,fFrameFillColor:0,fFrameFillStyle:1001,fFrameLineColor:1,fFrameLineWidth:1,fFrameLineStyle:1,fFrameBorderSize:1,fFrameBorderMode:0,fEndErrorSize:2,fErrorX:.5,fHistMinimumZero:!1,fHistTopMargin:.05,fHistFillColor:0,fHistFillStyle:1001,fHistLineColor:602,fHistLineStyle:1,fHistLineWidth:1,fPaintTextFormat:"g",fTimeOffset:788918400,fLegendBorderSize:1,fLegendFont:42,fLegendTextSize:0,fLegendFillColor:0,fLegendFillStyle:1001,fHatchesLineWidth:1,fHatchesSpacing:1,fCandleWhiskerRange:1,fCandleBoxRange:.5,fCandleScaled:!1,fViolinScaled:!0,fCandleCircleLineWidth:1,fCandleCrossLineWidth:1,fOrthoCamera:!1,fXAxisExpXOffset:0,fXAxisExpYOffset:0,fYAxisExpXOffset:0,fYAxisExpYOffset:0,fAxisMaxDigits:5,fStripDecimals:!0,fBarWidth:1,fBarOffset:0};function S(){return n?r.nodejs_document:"undefined"!=typeof document?document:"object"==typeof window?window.document:void 0}let T=null;function C(t){return 1<<t}function E(t,e,i){if(!t)return null;if(e){const i=e.obj.indexOf(t);if(i>=0)return e.clones[i]}else e={obj:[],clones:[],nofunc:i};const n=v(Object.prototype.toString.apply(t));if(1===n){const i=[];e.obj.push(t),e.clones.push(i);for(let n=0;n<t.length;++n)i.push(o(t[n])?E(t[n],e):t[n]);return i}if(2===n){const i=[];e.obj.push(t),e.clones.push(i);for(let e=0;e<t.length;++e)i.push(t[e]);return i}const r={};e.obj.push(t),e.clones.push(r);for(const i in t)o(t[i])?r[i]=E(t[i],e):e.nofunc&&l(t[i])||(r[i]=t[i]);return r}const P=Object.assign;let A=null;function z(t){if(!t)return null;const e=h(t)?JSON.parse(t):t,i=[];let n;const r=t=>{if(null==t)return;if(h(t)){if(n||t.length<6||t.indexOf("$ref:"))return;const e=parseInt(t.slice(5));if(!Number.isInteger(e)||e<0||e>=i.length)return;return n=!1,i[e]}if("object"!=typeof t)return;if(v(Object.prototype.toString.apply(t))>0){for(let e=0;e<t.length;++e){const i=r(t[e]);void 0!==i&&(t[e]=i)}return}const e=Object.keys(t),s=e.length;if(!1!==n&&1===s&&"$ref"===e[0]){const e=parseInt(t.$ref);if(!Number.isInteger(e)||e<0||e>=i.length)return;return n=!0,i[e]}if(!1!==n&&s>1&&"$arr"===e[0]&&"len"===e[1]){let i;switch(t.$arr){case"Int8":i=new Int8Array(t.len);break;case"Uint8":i=new Uint8Array(t.len);break;case"Int16":i=new Int16Array(t.len);break;case"Uint16":i=new Uint16Array(t.len);break;case"Int32":i=new Int32Array(t.len);break;case"Uint32":i=new Uint32Array(t.len);break;case"Float32":i=new Float32Array(t.len);break;case"Int64":case"Uint64":case"Float64":i=new Float64Array(t.len);break;default:i=new Array(t.len)}if(i.fill("Bool"!==t.$arr&&0),void 0!==t.b){const e=x(t.b);if(!i.buffer)throw new Error("base64 coding supported only for native arrays with binary data");{const n=new DataView(i.buffer,t.o||0),r=Math.min(e.length,n.byteLength);for(let t=0;t<r;++t)n.setUint8(t,e.charCodeAt(t))}}else{let n=2,r=0;for(;n<s;){if("p"===e[n][0]&&(r=t[e[n++]]),"v"!==e[n][0])throw new Error(`Unexpected member ${e[n]} in array decoding`);const a=t[e[n++]];if("object"==typeof a)for(let t=0;t<a.length;++t)i[r++]=a[t];else if(i[r++]=a,n<s&&"n"===e[n][0]){let s=t[e[n++]];for(;--s;)i[r++]=a}}}return i}if(!1!==n&&3===s&&"$pair"===e[0]&&"first"===e[1]&&"second"===e[2]){n=!0;const e=r(t.first),i=r(t.second);return void 0!==e&&(t.first=e),void 0!==i&&(t.second=i),t._typename=t.$pair,void delete t.$pair}if(!(i.indexOf(t)>=0)){i.push(t),t._typename&&A(t);for(let i=0;i<s;++i){const n=e[i],s=r(t[n]);void 0!==s&&(t[n]=s)}}};return r(e),e}function R(t,e){if(!o(t))return"";const i=[],n=t=>{if(l(t))return;if(null==t||!o(t))return t;if(v(Object.prototype.toString.apply(t))>0){const e=new Array(t.length);for(let i=0;i<t.length;++i)e[i]=n(t[i]);return e}const e=i.indexOf(t);if(e>=0)return{$ref:e};const r=Object.keys(t),s=r.length,a={};if(3===s&&"$pair"===r[0]&&"first"===r[1]&&"second"===r[2])return a.$pair=t.$pair,a.first=n(t.first),a.second=n(t.second),a;i.push(t);for(let e=0;e<s;++e){const i=r[e];i&&"$"!==i[0]&&(a[i]=n(t[i]))}return a},r=n(t);return JSON.stringify(r,null,e)}function L(t,e,i,r,s){function a(s){s.http_callback=l(i)?i.bind(s):()=>{},s.error_callback=l(r)?r.bind(s):function(t){console.warn(t.message),this.http_callback(null)}.bind(s),e||(e="buf");let a="GET",o=!0;const h=e.indexOf(";sync");switch(h>0&&(e=e.slice(0,h),o=!1),e){case"head":a="HEAD";break;case"posttext":a="POST",e="text";break;case"postbuf":a="POST",e="buf";break;case"post":case"multi":a="POST"}return s.kind=e,M.WithCredentials&&(s.withCredentials=!0),M.HandleWrongHttpResponse&&"GET"===a&&l(s.addEventListener)&&s.addEventListener("progress",function(t){t.lengthComputable&&this.expected_size&&t.loaded>this.expected_size&&(this.did_abort=!0,this.abort(),this.error_callback(Error(`Server sends more bytes ${t.loaded} than expected ${this.expected_size}. Abort I/O operation`),598))}.bind(s)),s.onreadystatechange=function(){if(!this.did_abort){if(2===this.readyState&&this.expected_size){const t=parseInt(this.getResponseHeader("Content-Length"));if(Number.isInteger(t)&&t>this.expected_size&&!M.HandleWrongHttpResponse)return this.did_abort="large",this.abort(),this.error_callback(Error(`Server response size ${t} larger than expected ${this.expected_size}. Abort I/O operation`),599)}if(4===this.readyState){if(200!==this.status&&206!==this.status&&!y.qt6&&(0!==this.status||0!==t.indexOf("file://")&&0!==t.indexOf("blob:")))return this.error_callback(Error(`Fail to load url ${t}`),this.status);if(this.nodejs_checkzip&&"gzip"===this.getResponseHeader("content-encoding"))return Promise.resolve().then(function(){return ET}).then(t=>{const e=t.unzipSync(Buffer.from(this.response)),i=JSON.parse(e);return this.http_callback(z(i))});switch(this.kind){case"xml":return this.http_callback(this.responseXML);case"text":return this.http_callback(this.responseText);case"object":return this.http_callback(z(this.responseText));case"multi":return this.http_callback(function(t){if(!t)return null;const e=JSON.parse(t);if(e?.length)for(let t=0;t<e.length;++t)e[t]=z(e[t]);return e}(this.responseText));case"head":return this.http_callback(this)}if(void 0===this.responseType)return this.http_callback(this.responseText);if("bin"===this.kind&&"byteLength"in this.response){const t=new Uint8Array(this.response);let e="";for(let i=0;i<t.length;++i)e+=String.fromCharCode(t[i]);return this.http_callback(e)}this.http_callback(this.response)}}},s.open(a,t,o),"bin"!==e&&"buf"!==e||(s.responseType="arraybuffer"),n&&"GET"===a&&"object"===e&&t.indexOf(".json.gz")>0&&(s.nodejs_checkzip=!0,s.responseType="arraybuffer"),s}if(g())return Promise.resolve().then(function(){return ET}).then(t=>a(new t.default));const o=a(new XMLHttpRequest);return s?Promise.resolve(o):o}async function D(t,e,i){return new Promise((i,n)=>{L(t,e,i,n,!0).then(t=>t.send(null))})}async function N(t){if(n){let e,i;return Promise.resolve().then(function(){return ET}).then(t=>(e=t.tmpNameSync()+".js",Promise.resolve().then(function(){return ET}))).then(n=>(i=n,i.writeFileSync(e,t),import("file://"+e))).finally(()=>i.unlinkSync(e))}if("undefined"!=typeof document){const e=document.getElementsByTagName("script");for(let i=0;i<e.length;++i)if(e[i].innerText===t)return!0;const i=t.indexOf("JSROOT.require")>=0,n=!i&&t.indexOf("import {")>0&&t.indexOf("} from '")>0,s=!i&&!n&&t.indexOf("JSROOT.ObjectPainter")>=0,a=i?T():Promise.resolve(!0);return s&&!globalThis.JSROOT&&(globalThis.JSROOT=r.jsroot),a.then(()=>{const e=document.createElement("script");return e.setAttribute("type",n?"module":"text/javascript"),e.innerText=t,document.head.appendChild(e),!!m()||d(!0,10)})}return!1}async function k(t){return h(t)&&(t=t.split(";")),!t.length||import(t.shift()).then(()=>k(t))}async function O(t){if(!t)return!0;if(h(t)&&t.indexOf(";")>=0&&(t=t.split(";")),!h(t)){const e=t,i=()=>!e.length||O(e.shift()).then(i,i);return i()}0===t.indexOf("$$$")&&(0===(t=t.slice(3)).indexOf("style/")&&t.indexOf(".css")<0&&(t+=".css"),t=f+t);const e=t.indexOf(".css")>0;if(n)return e?null:0===t.indexOf("http:")||0===t.indexOf("https:")?D(t,"text").then(t=>N(t)):0===t.indexOf("./")?Promise.resolve().then(function(){return ET}).then(e=>N(e.readFileSync(t))):import(t);const i=e=>{if(e===t)return!0;const i=e.indexOf(t);return i>0&&i+t.length===e.length&&"/"===e[i-1]};if(e){const t=document.getElementsByTagName("link");for(let e=0;e<t.length;++e)if(t[e].href&&"text/css"===t[e].type&&"stylesheet"===t[e].rel&&i(t[e].href))return!0}else{const t=document.getElementsByTagName("script");for(let e=0;e<t.length;++e)if(i(t[e].src))return!0}let r;return e?(r=document.createElement("link"),r.setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),r.setAttribute("href",t)):(r=document.createElement("script"),r.setAttribute("type","text/javascript"),r.setAttribute("src",t)),new Promise((e,i)=>{r.onload=()=>e(!0),r.onerror=()=>{r.remove(),i(Error(`Fail to load ${t}`))},document.head.appendChild(r)})}T=async function(){return(globalThis.JSROOT?Promise.resolve(!0):O(f+"scripts/JSRoot.core.js")).then(()=>{if(globalThis.JSROOT?._complete_loading)return globalThis.JSROOT._complete_loading()}).then(()=>globalThis.JSROOT)};const I="TObject",F="TNamed",B="TList",q="THashList",U="TObjArray",$="TAttLine",H="TAttFill",G="TAttMarker",j="TAttText",X="THStack",V="TGraph",W="TMultiGraph",Y="TCutG",Z="TGraphPolargram",K="TPave",J="TPaveText",Q="TPaveStats",tt="TPavesText",et="TPaveLabel",it="TPaveClass",nt="TDiamond",rt="TLegend",st="TLegendEntry",at="TPaletteAxis",ot="TText",lt="TLatex",ht="TColor",ct="TLine",dt="TBox",ut="TPolyLine",ft="TAttPad",pt="TPad",mt="TCanvas",gt="TFrame",xt="TAttCanvas",_t="TGaxis",yt="TAttAxis",vt="TAxis",bt="TH1",Mt="TH1F",wt="TH1D",St="TH2",Tt="TH2F",Ct="TH3",Et="TF1",Pt="TF2",At="TF3",zt="TProfile",Rt="TProfile2D",Lt="TProfile3D",Dt="TGeoNode",Nt="ROOT::",kt="http://www.w3.org/2000/svg",Ot=-1111,It=C(9),Ft="inspect",Bt="title",qt="https://root.cern/doc/master/class";function Ut(t,e){const i=e||{};switch(t){case I:P(i,{fUniqueID:0,fBits:0});break;case F:P(i,{fUniqueID:0,fBits:0,fName:"",fTitle:""});break;case B:case q:P(i,{name:t,arr:[],opt:[]});break;case U:P(i,{name:t,arr:[]});break;case yt:P(i,{fNdivisions:510,fAxisColor:1,fLabelColor:1,fLabelFont:42,fLabelOffset:.005,fLabelSize:.035,fTickLength:.03,fTitleOffset:1,fTitleSize:.035,fTitleColor:1,fTitleFont:42});break;case vt:Ut(F,i),Ut(yt,i),P(i,{fNbins:1,fXmin:0,fXmax:1,fXbins:[],fFirst:0,fLast:0,fBits2:0,fTimeDisplay:!1,fTimeFormat:"",fLabels:null,fModLabs:null});break;case $:P(i,{fLineColor:1,fLineStyle:1,fLineWidth:1});break;case H:P(i,{fFillColor:0,fFillStyle:0});break;case G:P(i,{fMarkerColor:1,fMarkerStyle:1,fMarkerSize:1});break;case ct:Ut(I,i),Ut($,i),P(i,{fX1:0,fX2:1,fY1:0,fY2:1});break;case"TMarker":Ut(I,i),Ut(G,i),P(i,{fX:0,fY:0});break;case dt:Ut(I,i),Ut($,i),Ut(H,i),P(i,{fX1:0,fX2:1,fY1:0,fY2:1});break;case K:Ut(dt,i),P(i,{fX1NDC:0,fY1NDC:0,fX2NDC:0,fY2NDC:0,fBorderSize:0,fInit:1,fShadowColor:1,fCornerRadius:0,fOption:"brNDC",fName:""});break;case j:P(i,{fTextAngle:0,fTextSize:0,fTextAlign:22,fTextColor:1,fTextFont:42});break;case J:Ut(K,i),Ut(j,i),P(i,{fLabel:"",fLongest:27,fMargin:.05,fLines:Ut(B)});break;case Q:Ut(J,i),P(i,{fFillColor:w.fStatColor,fFillStyle:w.fStatStyle,fTextFont:w.fStatFont,fTextSize:w.fStatFontSize,fTextColor:w.fStatTextColor,fBorderSize:w.fStatBorderSize,fOptFit:w.fOptFit,fOptStat:w.fOptStat,fFitFormat:w.fFitFormat,fStatFormat:w.fStatFormat,fParent:null});break;case rt:Ut(K,i),Ut(j,i),P(i,{fColumnSeparation:0,fEntrySeparation:.1,fMargin:.25,fNColumns:1,fPrimitives:Ut(B),fName:K,fBorderSize:w.fLegendBorderSize,fTextFont:w.fLegendFont,fTextSize:w.fLegendTextSize,fFillColor:w.fLegendFillColor,fFillStyle:w.fLegendFillStyle});break;case at:Ut(K,i),P(i,{fAxis:Ut(_t),fH:null,fName:K});break;case st:Ut(I,i),Ut(j,i),Ut($,i),Ut(H,i),Ut(G,i),P(i,{fLabel:"",fObject:null,fOption:"",fTextAlign:0,fTextColor:0,fTextFont:0});break;case ot:Ut(F,i),Ut(j,i),P(i,{fX:0,fY:0});break;case lt:Ut(ot,i),Ut($,i),P(i,{fLimitFactorSize:3,fOriginSize:.04});break;case"TObjString":Ut(I,i),P(i,{fString:""});break;case bt:Ut(F,i),Ut($,i),Ut(H,i),Ut(G,i),P(i,{fBits:8,fNcells:0,fXaxis:Ut(vt),fYaxis:Ut(vt),fZaxis:Ut(vt),fFillColor:w.fHistFillColor,fFillStyle:w.fHistFillStyle,fLineColor:w.fHistLineColor,fLineStyle:w.fHistLineStyle,fLineWidth:w.fHistLineWidth,fBarOffset:0,fBarWidth:1e3,fEntries:0,fTsumw:0,fTsumw2:0,fTsumwx:0,fTsumwx2:0,fMaximum:Ot,fMinimum:Ot,fNormFactor:0,fContour:[],fSumw2:[],fOption:"",fFunctions:Ut(B),fBufferSize:0,fBuffer:[],fBinStatErrOpt:0,fStatOverflows:2});break;case"TH1I":case wt:case"TH1L64":case"TH1F":case"TH1S":case"TH1C":Ut(bt,i),i.fArray=[];break;case St:Ut(bt,i),P(i,{fScalefactor:1,fTsumwy:0,fTsumwy2:0,fTsumwxy:0});break;case"TH2I":case"TH2L64":case Tt:case"TH2D":case"TH2S":case"TH2C":Ut(St,i),i.fArray=[];break;case Ct:Ut(bt,i),P(i,{fTsumwy:0,fTsumwy2:0,fTsumwz:0,fTsumwz2:0,fTsumwxy:0,fTsumwxz:0,fTsumwyz:0});break;case"TH3I":case"TH3L64":case"TH3F":case"TH3D":case"TH3S":case"TH3C":Ut(Ct,i),i.fArray=[];break;case X:Ut(F,i),P(i,{fHists:Ut(B),fHistogram:null,fMaximum:Ot,fMinimum:Ot});break;case V:Ut(F,i),Ut($,i),Ut(H,i),Ut(G,i),P(i,{fFunctions:Ut(B),fHistogram:null,fMaxSize:0,fMaximum:Ot,fMinimum:Ot,fNpoints:0,fX:[],fY:[]});break;case"TGraphAsymmErrors":Ut(V,i),P(i,{fEXlow:[],fEXhigh:[],fEYlow:[],fEYhigh:[]});break;case W:Ut(F,i),P(i,{fFunctions:Ut(B),fGraphs:Ut(B),fHistogram:null,fMaximum:Ot,fMinimum:Ot});break;case Z:Ut(F,i),Ut(j,i),Ut($,i),P(i,{fRadian:!1,fDegree:!1,fGrad:!1,fPolarLabelColor:1,fRadialLabelColor:1,fAxisAngle:0,fPolarOffset:.04,fPolarTextSize:.04,fRadialOffset:.025,fRadialTextSize:.035,fRwrmin:0,fRwrmax:1,fRwtmin:0,fRwtmax:2*Math.PI,fTickpolarSize:.02,fPolarLabelFont:62,fRadialLabelFont:62,fCutRadial:0,fNdivRad:508,fNdivPol:508});break;case ut:Ut(I,i),Ut($,i),Ut(H,i),P(i,{fLastPoint:-1,fN:0,fOption:"",fX:null,fY:null});break;case _t:Ut(ct,i),Ut(j,i),P(i,{fChopt:"",fFunctionName:"",fGridLength:0,fLabelColor:1,fLabelFont:42,fLabelOffset:.005,fLabelSize:.035,fName:"",fNdiv:12,fTickSize:.02,fTimeFormat:"",fTitle:"",fTitleOffset:1,fTitleSize:.035,fWmax:100,fWmin:0});break;case ft:P(i,{fLeftMargin:w.fPadLeftMargin,fRightMargin:w.fPadRightMargin,fBottomMargin:w.fPadBottomMargin,fTopMargin:w.fPadTopMargin,fXfile:2,fYfile:2,fAfile:1,fXstat:.99,fYstat:.99,fAstat:2,fFrameFillColor:w.fFrameFillColor,fFrameFillStyle:w.fFrameFillStyle,fFrameLineColor:w.fFrameLineColor,fFrameLineWidth:w.fFrameLineWidth,fFrameLineStyle:w.fFrameLineStyle,fFrameBorderSize:w.fFrameBorderSize,fFrameBorderMode:w.fFrameBorderMode});break;case pt:Ut(I,i),Ut($,i),Ut(H,i),Ut(ft,i),P(i,{fFillColor:w.fPadColor,fFillStyle:1001,fX1:0,fY1:0,fX2:1,fY2:1,fXtoAbsPixelk:1,fXtoPixelk:1,fXtoPixel:1,fYtoAbsPixelk:1,fYtoPixelk:1,fYtoPixel:1,fUtoAbsPixelk:1,fUtoPixelk:1,fUtoPixel:1,fVtoAbsPixelk:1,fVtoPixelk:1,fVtoPixel:1,fAbsPixeltoXk:1,fPixeltoXk:1,fPixeltoX:1,fAbsPixeltoYk:1,fPixeltoYk:1,fPixeltoY:1,fXlowNDC:0,fYlowNDC:0,fXUpNDC:0,fYUpNDC:0,fWNDC:1,fHNDC:1,fAbsXlowNDC:0,fAbsYlowNDC:0,fAbsWNDC:1,fAbsHNDC:1,fUxmin:0,fUymin:0,fUxmax:0,fUymax:0,fTheta:30,fPhi:30,fAspectRatio:0,fNumber:0,fLogx:w.fOptLogx,fLogy:w.fOptLogy,fLogz:w.fOptLogz,fTickx:w.fPadTickX,fTicky:w.fPadTickY,fPadPaint:0,fCrosshair:0,fCrosshairPos:0,fBorderSize:w.fPadBorderSize,fBorderMode:w.fPadBorderMode,fModified:!1,fGridx:w.fPadGridX,fGridy:w.fPadGridY,fAbsCoord:!1,fEditable:!0,fFixedAspectRatio:!1,fPrimitives:Ut(B),fExecs:null,fName:"pad",fTitle:"canvas"});break;case xt:P(i,{fXBetween:2,fYBetween:2,fTitleFromTop:1.2,fXdate:.2,fYdate:.3,fAdate:1});break;case mt:Ut(pt,i),P(i,{fFillColor:w.fCanvasColor,fFillStyle:1001,fNumPaletteColor:0,fNextPaletteColor:0,fDISPLAY:"$DISPLAY",fDoubleBuffer:0,fRetained:!0,fXsizeUser:0,fYsizeUser:0,fXsizeReal:20,fYsizeReal:10,fWindowTopX:0,fWindowTopY:0,fWindowWidth:0,fWindowHeight:0,fBorderSize:w.fCanvasBorderSize,fBorderMode:w.fCanvasBorderMode,fCw:M.CanvasWidth,fCh:M.CanvasHeight,fCatt:Ut(xt),kMoveOpaque:!0,kResizeOpaque:!0,fHighLightColor:5,fBatch:!0,kShowEventStatus:!1,kAutoExec:!0,kMenuBar:!0});break;case"TGeoVolume":Ut(F,i),Ut($,i),Ut(H,i),P(i,{fGeoAtt:0,fFinder:null,fMedium:null,fNodes:null,fNtotal:0,fNumber:0,fRefCount:0,fShape:null,fVoxels:null});break;case Dt:Ut(F,i),P(i,{fGeoAtt:0,fMother:null,fNovlp:0,fNumber:0,fOverlaps:null,fVolume:null});break;case"TGeoNodeMatrix":Ut(Dt,i),P(i,{fMatrix:null});break;case"TGeoTrack":Ut(I,i),Ut($,i),Ut(G,i),P(i,{fGeoAtt:0,fNpoints:0,fPoints:[]});break;case"TPolyLine3D":Ut(I,i),Ut($,i),P(i,{fLastPoint:-1,fN:0,fOption:"",fP:[]});break;case"TPolyMarker3D":Ut(I,i),Ut(G,i),P(i,{fLastPoint:-1,fN:0,fName:"",fOption:"",fP:[]})}return i._typename=t,A(i,t),i}function $t(t,e,i,n){const r=Ut(t);if(!r.fXaxis||!r.fYaxis||!r.fZaxis)return null;switch(r.fName="hist",r.fTitle="title",e&&P(r.fXaxis,{fNbins:e,fXmin:0,fXmax:e}),i&&P(r.fYaxis,{fNbins:i,fXmin:0,fXmax:i}),parseInt(t[2])){case 1:e&&(r.fNcells=e+2);break;case 2:e&&i&&(r.fNcells=(e+2)*(i+2))}if(r.fNcells>0){switch(t[3]){case"C":r.fArray=new Int8Array(r.fNcells);break;case"S":r.fArray=new Int16Array(r.fNcells);break;case"I":r.fArray=new Int32Array(r.fNcells);break;case"F":r.fArray=new Float32Array(r.fNcells);break;case"L":case"D":r.fArray=new Float64Array(r.fNcells);break;default:r.fArray=new Array(r.fNcells)}r.fArray.fill(0)}return r}function Ht(t,e){if(t&&h(e))if(e.indexOf(";")<0)t.fTitle=e;else{const i=e.split(";");t.fTitle=i[0],i.length>1&&(t.fXaxis.fTitle=i[1]),i.length>2&&(t.fYaxis.fTitle=i[2]),i.length>3&&(t.fZaxis.fTitle=i[3])}}function Gt(t,e){const i=Ut(ut);return i.fN=t,i.fX=new Int32Array(t),i.fY=new Int32Array(t),i}const jt={};function Xt(t,e,i){t.prototype=e.prototype=i,i.constructor=t}function Vt(t,e){var i=Object.create(t.prototype);for(var n in e)i[n]=e[n];return i}function Wt(){}A=function(t,e){P(t,function(t,e){let i=jt[t];const n=void 0!==i;return n||(i={}),t!==I&&t!==F&&void 0===e?.fBits||void 0===i.TestBit&&(i.TestBit=function(t){return Boolean(this.fBits&t)},i.InvertBit=function(t){this.fBits^=16777215&t},i.SetBit=function(t,e=!0){this.fBits=e?this.fBits|t:this.fBits&~t}),n||(t!==B&&t!==q||(i.Clear=function(){this.arr=[],this.opt=[]},i.Add=function(t,e){this.arr.push(t),this.opt.push(h(e)?e:"")},i.AddFirst=function(t,e){this.arr.unshift(t),this.opt.unshift(h(e)?e:"")},i.RemoveAt=function(t){this.arr.splice(t,1),this.opt.splice(t,1)}),t!==J&&t!==Q||(i.AddText=function(t){const e=Ut(lt);e.fTitle=t,e.fTextAlign=0,e.fTextColor=0,e.fTextFont=0,e.fTextSize=0,this.fLines.Add(e)},i.Clear=function(){this.fLines.Clear()}),0!==t.indexOf(Et)&&"TF12"!==t&&t!==Pt&&t!==At||(i.addFormula=function(t){t&&(void 0===this.formulas&&(this.formulas=[]),this.formulas.push(t))},i.GetParName=function(t){if(this.fParams?.fParNames)return this.fParams.fParNames[t];if(this.fFormula?.fParams)for(let e=0,i=this.fFormula.fParams;e<i.length;++e)if(i[e].second===t)return i[e].first;return this.fNames&&this.fNames[t]?this.fNames[t]:`p${t}`},i.GetParValue=function(t){return this.fParams?.fParameters?this.fParams.fParameters[t]:this.fFormula?.fClingParameters?this.fFormula.fClingParameters[t]:this.fParams?this.fParams[t]:void 0},i.GetParError=function(t){return this.fParErrors?this.fParErrors[t]:void 0},i.GetNumPars=function(){return this.fNpar}),0!==t.indexOf(V)&&t!==Y||t===Z||"TGraphTime"===t||(i.IsInside=function(t,e){const i=this.fX,n=this.fY;let r=0,s=this.fNpoints-1,a=!1;for(;r<this.fNpoints;++r)(n[r]<e&&n[s]>=e||n[s]<e&&n[r]>=e)&&i[r]+(e-n[r])/(n[s]-n[r])*(i[s]-i[r])<t&&(a=!a),s=r;return a}),0!==t.indexOf(bt)&&0!==t.indexOf(St)&&0!==t.indexOf(Ct)||(i.getBinError=function(t){return t>=this.fNcells&&(t=this.fNcells-1),t<0&&(t=0),t<this.fSumw2.length?Math.sqrt(this.fSumw2[t]):Math.sqrt(Math.abs(this.fArray[t]))},i.setBinContent=function(t,e){this.fEntries++,this.fTsumw=0,t>=0&&t<this.fArray.length&&(this.fArray[t]=e)}),0===t.indexOf(bt)&&(i.getBin=function(t){return t},i.getBinContent=function(t){return this.fArray[t]},i.Fill=function(t,e){const i=this.fXaxis,n=Math.max(0,1+Math.min(i.fNbins,Math.floor((t-i.fXmin)/(i.fXmax-i.fXmin)*i.fNbins)));this.fArray[n]+=e??1,this.fEntries++}),0===t.indexOf(St)&&(i.getBin=function(t,e){return t+(this.fXaxis.fNbins+2)*e},i.getBinContent=function(t,e){return this.fArray[this.getBin(t,e)]},i.Fill=function(t,e,i){const n=this.fXaxis,r=this.fYaxis,s=Math.max(0,1+Math.min(n.fNbins,Math.floor((t-n.fXmin)/(n.fXmax-n.fXmin)*n.fNbins))),a=Math.max(0,1+Math.min(r.fNbins,Math.floor((e-r.fXmin)/(r.fXmax-r.fXmin)*r.fNbins)));this.fArray[s+(n.fNbins+2)*a]+=i??1,this.fEntries++}),0===t.indexOf(Ct)&&(i.getBin=function(t,e,i){return t+(this.fXaxis.fNbins+2)*(e+(this.fYaxis.fNbins+2)*i)},i.getBinContent=function(t,e,i){return this.fArray[this.getBin(t,e,i)]},i.Fill=function(t,e,i,n){const r=this.fXaxis,s=this.fYaxis,a=this.fZaxis,o=Math.max(0,1+Math.min(r.fNbins,Math.floor((t-r.fXmin)/(r.fXmax-r.fXmin)*r.fNbins))),l=Math.max(0,1+Math.min(s.fNbins,Math.floor((e-s.fXmin)/(s.fXmax-s.fXmin)*s.fNbins))),h=Math.max(0,1+Math.min(a.fNbins,Math.floor((i-a.fXmin)/(a.fXmax-a.fXmin)*a.fNbins)));this.fArray[o+(r.fNbins+2)*(l+(s.fNbins+2)*h)]+=n??1,this.fEntries++}),t!==pt&&t!==mt||(i.Divide=function(t,e,i=.01,n=.01,r=0){if(!e){const i=t;if(i<2)return this;(t=e=Math.round(Math.sqrt(i)))*e<i&&(t+=1)}if(t*e<2)return 0;this.fPrimitives.Clear();const s=1/e,a=1/t;let o=0;for(let l=0;l<e;l++){const e=1-l*s-n,h=Math.max(0,e-s+2*n);if(!(h>e))for(let n=0;n<t;n++){const t=n*a+i,s=t+a-2*i;if(t>s)continue;o++;const l=Ut(pt);l.fName=l.fTitle=`${this.fName}_${o}`,l.fNumber=o,this._typename!==mt?(l.fAbsWNDC=(s-t)*this.fAbsWNDC,l.fAbsHNDC=(e-h)*this.fAbsHNDC,l.fAbsXlowNDC=this.fAbsXlowNDC+t*this.fAbsWNDC,l.fAbsYlowNDC=this.fAbsYlowNDC+h*this.fAbsHNDC):(l.fAbsWNDC=s-t,l.fAbsHNDC=e-h,l.fAbsXlowNDC=t,l.fAbsYlowNDC=h),l.fFillColor=r||this.fFillColor,this.fPrimitives.Add(l)}}return t*e},i.GetPad=function(t){return this.fPrimitives.arr.find(e=>e._typename===pt&&e.fNumber===t)}),0===t.indexOf(zt)&&(t===Lt?(i.getBin=function(t,e,i){return t+(this.fXaxis.fNbins+2)*(e+(this.fYaxis.fNbins+2)*i)},i.getBinContent=function(t,e,i){const n=this.getBin(t,e,i);return n<0||n>=this.fNcells||this.fBinEntries[n]<1e-300?0:this.fArray?this.fArray[n]/this.fBinEntries[n]:0},i.getBinEntries=function(t,e,i){const n=this.getBin(t,e,i);return n<0||n>=this.fNcells?0:this.fBinEntries[n]}):t===Rt?(i.getBin=function(t,e){return t+(this.fXaxis.fNbins+2)*e},i.getBinContent=function(t,e){const i=this.getBin(t,e);return i<0||i>=this.fNcells||this.fBinEntries[i]<1e-300?0:this.fArray?this.fArray[i]/this.fBinEntries[i]:0},i.getBinEntries=function(t,e){const i=this.getBin(t,e);return i<0||i>=this.fNcells?0:this.fBinEntries[i]}):(i.getBin=function(t){return t},i.getBinContent=function(t){return t<0||t>=this.fNcells||this.fBinEntries[t]<1e-300?0:this.fArray?this.fArray[t]/this.fBinEntries[t]:0},i.getBinEntries=function(t){return t<0||t>=this.fNcells?0:this.fBinEntries[t]}),i.getBinEffectiveEntries=function(t){if(t<0||t>=this.fNcells)return 0;const e=this.fBinEntries[t];if(!this.fBinSumw2||this.fBinSumw2.length!==this.fNcells)return e;const i=this.fBinSumw2[t];return i>0?e*e/i:0},i.getBinError=function(t){if(t<0||t>=this.fNcells)return 0;const e=this.fArray[t],i=this.fBinEntries[t],n=this.fSumw2[t],r=this.getBinEffectiveEntries(t);if(i<1e-300)return 0;const s=1,a=2,o=3;if(this.fErrorMode===o)return 1/Math.sqrt(i);const l=e/i,h=Math.sqrt(Math.abs(n/i-l**2));return this.fErrorMode===a?h?h/Math.sqrt(r):1/Math.sqrt(12*r):this.fErrorMode===s?h:h/Math.sqrt(r)}),t===vt&&(i.GetBinLowEdge=function(t){return this.fNbins<=0?0:this.fXbins.length?t>0&&t<=this.fNbins+1?this.fXbins[t-1]:0===t?2*this.fXbins[0]-this.fXbins[1]:t===this.fNbins+2?2*this.fXbins[t-2]-this.fXbins[t-3]:0:this.fXmin+(t-1)*(this.fXmax-this.fXmin)/this.fNbins},i.GetBinCenter=function(t){return this.fNbins<=0?0:this.fXbins.length?t>0&&t<=this.fNbins?(this.fXbins[t-1]+this.fXbins[t])/2:0===t?1.5*this.fXbins[0]-.5*this.fXbins[1]:t===this.fNbins+1?1.5*this.fXbins[t-1]-.5*this.fXbins[t-2]:0:this.fXmin+(t-.5)*(this.fXmax-this.fXmin)/this.fNbins}),0===t.indexOf(Nt+"Math::LorentzVector")&&(i.Px=i.X=function(){return this.fCoordinates.Px()},i.Py=i.Y=function(){return this.fCoordinates.Py()},i.Pz=i.Z=function(){return this.fCoordinates.Pz()},i.E=i.T=function(){return this.fCoordinates.E()},i.M2=function(){return this.fCoordinates.M2()},i.M=function(){return this.fCoordinates.M()},i.R=i.P=function(){return this.fCoordinates.R()},i.P2=function(){return this.P()*this.P()},i.Pt=i.pt=function(){return Math.sqrt(this.P2())},i.Phi=i.phi=function(){return Math.atan2(this.fCoordinates.Py(),this.fCoordinates.Px())},i.Eta=i.eta=function(){return Math.atanh(this.Pz()/this.P())}),0===t.indexOf(Nt+"Math::PxPyPzE4D")&&(i.Px=i.X=function(){return this.fX},i.Py=i.Y=function(){return this.fY},i.Pz=i.Z=function(){return this.fZ},i.E=i.T=function(){return this.fT},i.P2=function(){return this.fX**2+this.fY**2+this.fZ**2},i.R=i.P=function(){return Math.sqrt(this.P2())},i.Mag2=i.M2=function(){return this.fT**2-this.fX**2-this.fY**2-this.fZ**2},i.Mag=i.M=function(){return this.M2()>=0?Math.sqrt(this.M2()):-Math.sqrt(-this.M2())},i.Perp2=i.Pt2=function(){return this.fX**2+this.fY**2},i.Pt=i.pt=function(){return Math.sqrt(this.P2())},i.Phi=i.phi=function(){return Math.atan2(this.fY,this.fX)},i.Eta=i.eta=function(){return Math.atanh(this.Pz/this.P())}),jt[t]=i),i}(e||t._typename,t))},w.fXaxis=Ut(yt),w.fYaxis=Ut(yt),w.fZaxis=Ut(yt),r.jsroot={version:i,source_dir:f,settings:M,gStyle:w,parse:z,isBatchMode:m};var Yt=.7,Zt=1/Yt,Kt="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",te=/^#([0-9a-f]{3,8})$/,ee=new RegExp(`^rgb\\(${Kt},${Kt},${Kt}\\)$`),ie=new RegExp(`^rgb\\(${Qt},${Qt},${Qt}\\)$`),ne=new RegExp(`^rgba\\(${Kt},${Kt},${Kt},${Jt}\\)$`),re=new RegExp(`^rgba\\(${Qt},${Qt},${Qt},${Jt}\\)$`),se=new RegExp(`^hsl\\(${Jt},${Qt},${Qt}\\)$`),ae=new RegExp(`^hsla\\(${Jt},${Qt},${Qt},${Jt}\\)$`),oe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function le(){return this.rgb().formatHex()}function he(){return this.rgb().formatRgb()}function ce(t){var e,i;return t=(t+"").trim().toLowerCase(),(e=te.exec(t))?(i=e[1].length,e=parseInt(e[1],16),6===i?de(e):3===i?new me(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===i?ue(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===i?ue(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ee.exec(t))?new me(e[1],e[2],e[3],1):(e=ie.exec(t))?new me(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ne.exec(t))?ue(e[1],e[2],e[3],e[4]):(e=re.exec(t))?ue(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=se.exec(t))?be(e[1],e[2]/100,e[3]/100,1):(e=ae.exec(t))?be(e[1],e[2]/100,e[3]/100,e[4]):oe.hasOwnProperty(t)?de(oe[t]):"transparent"===t?new me(NaN,NaN,NaN,0):null}function de(t){return new me(t>>16&255,t>>8&255,255&t,1)}function ue(t,e,i,n){return n<=0&&(t=e=i=NaN),new me(t,e,i,n)}function fe(t){return t instanceof Wt||(t=ce(t)),t?new me((t=t.rgb()).r,t.g,t.b,t.opacity):new me}function pe(t,e,i,n){return 1===arguments.length?fe(t):new me(t,e,i,null==n?1:n)}function me(t,e,i,n){this.r=+t,this.g=+e,this.b=+i,this.opacity=+n}function ge(){return`#${ve(this.r)}${ve(this.g)}${ve(this.b)}`}function xe(){const t=_e(this.opacity);return`${1===t?"rgb(":"rgba("}${ye(this.r)}, ${ye(this.g)}, ${ye(this.b)}${1===t?")":`, ${t})`}`}function _e(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ye(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ve(t){return((t=ye(t))<16?"0":"")+t.toString(16)}function be(t,e,i,n){return n<=0?t=e=i=NaN:i<=0||i>=1?t=e=NaN:e<=0&&(t=NaN),new we(t,e,i,n)}function Me(t){if(t instanceof we)return new we(t.h,t.s,t.l,t.opacity);if(t instanceof Wt||(t=ce(t)),!t)return new we;if(t instanceof we)return t;var e=(t=t.rgb()).r/255,i=t.g/255,n=t.b/255,r=Math.min(e,i,n),s=Math.max(e,i,n),a=NaN,o=s-r,l=(s+r)/2;return o?(a=e===s?(i-n)/o+6*(i<n):i===s?(n-e)/o+2:(e-i)/o+4,o/=l<.5?s+r:2-s-r,a*=60):o=l>0&&l<1?0:a,new we(a,o,l,t.opacity)}function we(t,e,i,n){this.h=+t,this.s=+e,this.l=+i,this.opacity=+n}function Se(t){return(t=(t||0)%360)<0?t+360:t}function Te(t){return Math.max(0,Math.min(1,t||0))}function Ce(t,e,i){return 255*(t<60?e+(i-e)*t/60:t<180?i:t<240?e+(i-e)*(240-t)/60:e)}Xt(Wt,ce,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:le,formatHex:le,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Me(this).formatHsl()},formatRgb:he,toString:he}),Xt(me,pe,Vt(Wt,{brighter(t){return t=null==t?Zt:Math.pow(Zt,t),new me(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Yt:Math.pow(Yt,t),new me(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new me(ye(this.r),ye(this.g),ye(this.b),_e(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ge,formatHex:ge,formatHex8:function(){return`#${ve(this.r)}${ve(this.g)}${ve(this.b)}${ve(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:xe,toString:xe})),Xt(we,function(t,e,i,n){return 1===arguments.length?Me(t):new we(t,e,i,null==n?1:n)},Vt(Wt,{brighter(t){return t=null==t?Zt:Math.pow(Zt,t),new we(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Yt:Math.pow(Yt,t),new we(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,n=i+(i<.5?i:1-i)*e,r=2*i-n;return new me(Ce(t>=240?t-240:t+120,r,n),Ce(t,r,n),Ce(t<120?t+240:t-120,r,n),this.opacity)},clamp(){return new we(Se(this.h),Te(this.s),Te(this.l),_e(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=_e(this.opacity);return`${1===t?"hsl(":"hsla("}${Se(this.h)}, ${100*Te(this.s)}%, ${100*Te(this.l)}%${1===t?")":`, ${t})`}`}}));const Ee=Math.PI/180,Pe=180/Math.PI,Ae=.96422,ze=.82521,Re=4/29,Le=6/29,De=3*Le*Le,Ne=Le*Le*Le;function ke(t){if(t instanceof Oe)return new Oe(t.l,t.a,t.b,t.opacity);if(t instanceof Ue)return $e(t);t instanceof me||(t=fe(t));var e,i,n=qe(t.r),r=qe(t.g),s=qe(t.b),a=Ie((.2225045*n+.7168786*r+.0606169*s)/1);return n===r&&r===s?e=i=a:(e=Ie((.4360747*n+.3850649*r+.1430804*s)/Ae),i=Ie((.0139322*n+.0971045*r+.7141733*s)/ze)),new Oe(116*a-16,500*(e-a),200*(a-i),t.opacity)}function Oe(t,e,i,n){this.l=+t,this.a=+e,this.b=+i,this.opacity=+n}function Ie(t){return t>Ne?Math.pow(t,1/3):t/De+Re}function Fe(t){return t>Le?t*t*t:De*(t-Re)}function Be(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function qe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ue(t,e,i,n){this.h=+t,this.c=+e,this.l=+i,this.opacity=+n}function $e(t){if(isNaN(t.h))return new Oe(t.l,0,0,t.opacity);var e=t.h*Ee;return new Oe(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Xt(Oe,function(t,e,i,n){return 1===arguments.length?ke(t):new Oe(t,e,i,null==n?1:n)},Vt(Wt,{brighter(t){return new Oe(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Oe(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,i=isNaN(this.b)?t:t-this.b/200;return new me(Be(3.1338561*(e=Ae*Fe(e))-1.6168667*(t=1*Fe(t))-.4906146*(i=ze*Fe(i))),Be(-.9787684*e+1.9161415*t+.033454*i),Be(.0719453*e-.2289914*t+1.4052427*i),this.opacity)}})),Xt(Ue,function(t,e,i,n){return 1===arguments.length?function(t){if(t instanceof Ue)return new Ue(t.h,t.c,t.l,t.opacity);if(t instanceof Oe||(t=ke(t)),0===t.a&&0===t.b)return new Ue(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*Pe;return new Ue(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new Ue(t,e,i,null==n?1:n)},Vt(Wt,{brighter(t){return new Ue(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new Ue(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return $e(this).rgb()}}));var He=-.14861,Ge=1.78277,je=-.29227,Xe=-.90649,Ve=1.97294,We=Ve*Xe,Ye=Ve*Ge,Ze=Ge*je-Xe*He;function Ke(t,e,i,n){this.h=+t,this.s=+e,this.l=+i,this.opacity=+n}Xt(Ke,function(t,e,i,n){return 1===arguments.length?function(t){if(t instanceof Ke)return new Ke(t.h,t.s,t.l,t.opacity);t instanceof me||(t=fe(t));var e=t.r/255,i=t.g/255,n=t.b/255,r=(Ze*n+We*e-Ye*i)/(Ze+We-Ye),s=n-r,a=(Ve*(i-r)-je*s)/Xe,o=Math.sqrt(a*a+s*s)/(Ve*r*(1-r)),l=o?Math.atan2(a,s)*Pe-120:NaN;return new Ke(l<0?l+360:l,o,r,t.opacity)}(t):new Ke(t,e,i,null==n?1:n)},Vt(Wt,{brighter(t){return t=null==t?Zt:Math.pow(Zt,t),new Ke(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Yt:Math.pow(Yt,t),new Ke(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Ee,e=+this.l,i=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),r=Math.sin(t);return new me(255*(e+i*(He*n+Ge*r)),255*(e+i*(je*n+Xe*r)),255*(e+i*(Ve*n)),this.opacity)}}));var Je=Math.abs,Qe=Math.cos,ti=Math.sin,ei=Math.PI,ii=ei/2,ni=2*ei,ri=Math.max,si=1e-12;function ai(t,e){return Array.from({length:e-t},(e,i)=>t+i)}function oi(){return function(t){var e=0,i=null,n=null,r=null;function s(s){var a,o=s.length,l=new Array(o),h=ai(0,o),c=new Array(o*o),d=new Array(o),u=0;s=Float64Array.from({length:o*o},(t,e)=>s[e/o|0][e%o]);for(let e=0;e<o;++e){let i=0;for(let n=0;n<o;++n)i+=s[e*o+n]+t*s[n*o+e];u+=l[e]=i}a=(u=ri(0,ni-e*o)/u)?e:ni/o;{let t=0;i&&h.sort((t,e)=>i(l[t],l[e]));for(const e of h){const i=t;{const r=ai(0,o).filter(t=>s[e*o+t]||s[t*o+e]);n&&r.sort((t,i)=>n(s[e*o+t],s[e*o+i]));for(const i of r){let n;if(e<i?(n=c[e*o+i]||(c[e*o+i]={source:null,target:null}),n.source={index:e,startAngle:t,endAngle:t+=s[e*o+i]*u,value:s[e*o+i]}):(n=c[i*o+e]||(c[i*o+e]={source:null,target:null}),n.target={index:e,startAngle:t,endAngle:t+=s[e*o+i]*u,value:s[e*o+i]},e===i&&(n.source=n.target)),n.source&&n.target&&n.source.value<n.target.value){const t=n.source;n.source=n.target,n.target=t}}d[e]={index:e,startAngle:i,endAngle:t,value:l[e]}}t+=a}}return(c=Object.values(c)).groups=d,r?c.sort(r):c}return s.padAngle=function(t){return arguments.length?(e=ri(0,t),s):e},s.sortGroups=function(t){return arguments.length?(i=t,s):i},s.sortSubgroups=function(t){return arguments.length?(n=t,s):n},s.sortChords=function(t){return arguments.length?(null==t?r=null:(e=t,r=function(t,i){return e(t.source.value+t.target.value,i.source.value+i.target.value)})._=t,s):r&&r._;var e},s}(!1)}const li=Math.PI,hi=2*li,ci=1e-6,di=hi-ci;function ui(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=arguments[e]+t[e]}let fi=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?ui:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return ui;const i=10**e;return function(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=Math.round(arguments[e]*i)/i+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,i,n){this._append`Q${+t},${+e},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(t,e,i,n,r,s){this._append`C${+t},${+e},${+i},${+n},${this._x1=+r},${this._y1=+s}`}arcTo(t,e,i,n,r){if(t=+t,e=+e,i=+i,n=+n,(r=+r)<0)throw new Error(`negative radius: ${r}`);let s=this._x1,a=this._y1,o=i-t,l=n-e,h=s-t,c=a-e,d=h*h+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(d>ci)if(Math.abs(c*o-l*h)>ci&&r){let u=i-s,f=n-a,p=o*o+l*l,m=u*u+f*f,g=Math.sqrt(p),x=Math.sqrt(d),_=r*Math.tan((li-Math.acos((p+d-m)/(2*g*x)))/2),y=_/x,v=_/g;Math.abs(y-1)>ci&&this._append`L${t+y*h},${e+y*c}`,this._append`A${r},${r},0,0,${+(c*u>h*f)},${this._x1=t+v*o},${this._y1=e+v*l}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,i,n,r,s){if(t=+t,e=+e,s=!!s,(i=+i)<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(n),o=i*Math.sin(n),l=t+a,h=e+o,c=1^s,d=s?n-r:r-n;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>ci||Math.abs(this._y1-h)>ci)&&this._append`L${l},${h}`,i&&(d<0&&(d=d%hi+hi),d>di?this._append`A${i},${i},0,1,${c},${t-a},${e-o}A${i},${i},0,1,${c},${this._x1=l},${this._y1=h}`:d>ci&&this._append`A${i},${i},0,${+(d>=li)},${c},${this._x1=t+i*Math.cos(r)},${this._y1=e+i*Math.sin(r)}`)}rect(t,e,i,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}};function pi(){return new fi}pi.prototype=fi.prototype;var mi=Array.prototype.slice;function gi(t){return function(){return t}}function xi(t){return t.source}function _i(t){return t.target}function yi(t){return t.radius}function vi(t){return t.startAngle}function bi(t){return t.endAngle}function Mi(){return 0}function wi(){return function(){var t=xi,e=_i,i=yi,n=yi,r=vi,s=bi,a=Mi,o=null;function l(){var l,h=t.apply(this,arguments),c=e.apply(this,arguments),d=a.apply(this,arguments)/2,u=mi.call(arguments),f=+i.apply(this,(u[0]=h,u)),p=r.apply(this,u)-ii,m=s.apply(this,u)-ii,g=+n.apply(this,(u[0]=c,u)),x=r.apply(this,u)-ii,_=s.apply(this,u)-ii;if(o||(o=l=pi()),d>si&&(Je(m-p)>2*d+si?m>p?(p+=d,m-=d):(p-=d,m+=d):p=m=(p+m)/2,Je(_-x)>2*d+si?_>x?(x+=d,_-=d):(x-=d,_+=d):x=_=(x+_)/2),o.moveTo(f*Qe(p),f*ti(p)),o.arc(0,0,f,p,m),p===x&&m===_||(o.quadraticCurveTo(0,0,g*Qe(x),g*ti(x)),o.arc(0,0,g,x,_)),o.quadraticCurveTo(0,0,f*Qe(p),f*ti(p)),o.closePath(),l)return o=null,l+""||null}return l.radius=function(t){return arguments.length?(i=n="function"==typeof t?t:gi(+t),l):i},l.sourceRadius=function(t){return arguments.length?(i="function"==typeof t?t:gi(+t),l):i},l.targetRadius=function(t){return arguments.length?(n="function"==typeof t?t:gi(+t),l):n},l.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:gi(+t),l):r},l.endAngle=function(t){return arguments.length?(s="function"==typeof t?t:gi(+t),l):s},l.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:gi(+t),l):a},l.source=function(e){return arguments.length?(t=e,l):t},l.target=function(t){return arguments.length?(e=t,l):e},l.context=function(t){return arguments.length?(o=null==t?null:t,l):o},l}()}var Si={value:()=>{}};function Ti(){for(var t,e=0,i=arguments.length,n={};e<i;++e){if(!(t=arguments[e]+"")||t in n||/[\s.]/.test(t))throw new Error("illegal type: "+t);n[t]=[]}return new Ci(n)}function Ci(t){this._=t}function Ei(t,e){for(var i,n=0,r=t.length;n<r;++n)if((i=t[n]).name===e)return i.value}function Pi(t,e,i){for(var n=0,r=t.length;n<r;++n)if(t[n].name===e){t[n]=Si,t=t.slice(0,n).concat(t.slice(n+1));break}return null!=i&&t.push({name:e,value:i}),t}Ci.prototype=Ti.prototype={constructor:Ci,on:function(t,e){var i,n,r=this._,s=(n=r,(t+"").trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");if(i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),a=-1,o=s.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(i=(t=s[a]).type)r[i]=Pi(r[i],t.name,e);else if(null==e)for(i in r)r[i]=Pi(r[i],t.name,null);return this}for(;++a<o;)if((i=(t=s[a]).type)&&(i=Ei(r[i],t.name)))return i},copy:function(){var t={},e=this._;for(var i in e)t[i]=e[i].slice();return new Ci(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var i,n,r=new Array(i),s=0;s<i;++s)r[s]=arguments[s+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=0,i=(n=this._[t]).length;s<i;++s)n[s].value.apply(e,r)},apply:function(t,e,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],r=0,s=n.length;r<s;++r)n[r].value.apply(e,i)}};var Ai="http://www.w3.org/1999/xhtml",zi={svg:"http://www.w3.org/2000/svg",xhtml:Ai,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ri(t){var e=t+="",i=e.indexOf(":");return i>=0&&"xmlns"!==(e=t.slice(0,i))&&(t=t.slice(i+1)),zi.hasOwnProperty(e)?{space:zi[e],local:t}:t}function Li(t){return function(){var e=this.ownerDocument,i=this.namespaceURI;return i===Ai&&e.documentElement.namespaceURI===Ai?e.createElement(t):e.createElementNS(i,t)}}function Di(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ni(t){var e=Ri(t);return(e.local?Di:Li)(e)}function ki(){}function Oi(t){return null==t?ki:function(){return this.querySelector(t)}}function Ii(){return[]}function Fi(t){return null==t?Ii:function(){return this.querySelectorAll(t)}}function Bi(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function qi(t){return function(){return this.matches(t)}}function Ui(t){return function(e){return e.matches(t)}}var $i=Array.prototype.find;function Hi(){return this.firstElementChild}var Gi=Array.prototype.filter;function ji(){return Array.from(this.children)}function Xi(t){return new Array(t.length)}function Vi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Wi(t,e,i,n,r,s){for(var a,o=0,l=e.length,h=s.length;o<h;++o)(a=e[o])?(a.__data__=s[o],n[o]=a):i[o]=new Vi(t,s[o]);for(;o<l;++o)(a=e[o])&&(r[o]=a)}function Yi(t,e,i,n,r,s,a){var o,l,h,c=new Map,d=e.length,u=s.length,f=new Array(d);for(o=0;o<d;++o)(l=e[o])&&(f[o]=h=a.call(l,l.__data__,o,e)+"",c.has(h)?r[o]=l:c.set(h,l));for(o=0;o<u;++o)h=a.call(t,s[o],o,s)+"",(l=c.get(h))?(n[o]=l,l.__data__=s[o],c.delete(h)):i[o]=new Vi(t,s[o]);for(o=0;o<d;++o)(l=e[o])&&c.get(f[o])===l&&(r[o]=l)}function Zi(t){return t.__data__}function Ki(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Ji(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Qi(t){return function(){this.removeAttribute(t)}}function tn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function en(t,e){return function(){this.setAttribute(t,e)}}function nn(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function rn(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttribute(t):this.setAttribute(t,i)}}function sn(t,e){return function(){var i=e.apply(this,arguments);null==i?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function an(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function on(t){return function(){this.style.removeProperty(t)}}function ln(t,e,i){return function(){this.style.setProperty(t,e,i)}}function hn(t,e,i){return function(){var n=e.apply(this,arguments);null==n?this.style.removeProperty(t):this.style.setProperty(t,n,i)}}function cn(t,