diff --git a/src/evidently/ui/assets/index.html b/src/evidently/ui/assets/index.html index ce96444078..784c5cd4c3 100644 --- a/src/evidently/ui/assets/index.html +++ b/src/evidently/ui/assets/index.html @@ -11,8 +11,8 @@ content="Evidently - ML Monitoring Demo. Hosted example to monitor the performance of a demand forecasting model on a toy dataset." /> Evidently - ML Monitoring Demo - - + + diff --git a/src/evidently/ui/assets/static/js/ContentCopy-DfRDJjMT.js b/src/evidently/ui/assets/static/js/ContentCopy-bqrH-e3i.js similarity index 68% rename from src/evidently/ui/assets/static/js/ContentCopy-DfRDJjMT.js rename to src/evidently/ui/assets/static/js/ContentCopy-bqrH-e3i.js index ab5680f03e..1a52d9b5b1 100644 --- a/src/evidently/ui/assets/static/js/ContentCopy-DfRDJjMT.js +++ b/src/evidently/ui/assets/static/js/ContentCopy-bqrH-e3i.js @@ -1 +1 @@ -import{r as t,i as r}from"./createSvgIcon-Cky3vhEa.js";import{j as a}from"./vendor-DRRvL2bZ.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,v=o(t()),i=a,n=(0,v.default)((0,i.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"}),"ContentCopy");u=e.default=n;export{u as d}; +import{r as t,i as r}from"./createSvgIcon-BCx0yKii.js";import{j as a}from"./vendor-Bhc2M4pH.js";var e={},o=r;Object.defineProperty(e,"__esModule",{value:!0});var u=e.default=void 0,v=o(t()),i=a,n=(0,v.default)((0,i.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"}),"ContentCopy");u=e.default=n;export{u as d}; diff --git a/src/evidently/ui/assets/static/js/DashboardContent-Bltq1_up.js b/src/evidently/ui/assets/static/js/DashboardContent-COLUGp6z.js similarity index 99% rename from src/evidently/ui/assets/static/js/DashboardContent-Bltq1_up.js rename to src/evidently/ui/assets/static/js/DashboardContent-COLUGp6z.js index cc56e709e7..e6c5837eca 100644 --- a/src/evidently/ui/assets/static/js/DashboardContent-Bltq1_up.js +++ b/src/evidently/ui/assets/static/js/DashboardContent-COLUGp6z.js @@ -1,4 +1,4 @@ -var JD=Object.defineProperty;var QD=(e,t,r)=>t in e?JD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Lc=(e,t,r)=>(QD(e,typeof t!="symbol"?t+"":t,r),r);import{r as $e,j as je,$ as Z5,T as Cr,ak as K5,al as J5,am as Q5,A as dy,a as hy,an as e9,ao as t9,G as Jn,R as et,B as Qr,O as n9,ap as ir,aq as Or,Y as eS,Z as S0,ar as r9,ac as tS,ad as nS,ae as Af,af as Hi,ah as rS,as as qn,at as a9,au as i9,av as o9,aw as Ma,ax as l9,ay as s9,az as u9,aA as c9,aB as f9,aC as d9,aD as h9,aE as p9,aF as g9,aG as m9,aH as v9,aI as y9,aJ as b9,aK as x9,aL as w9,aM as xn,aN as _r,aO as Tr,aP as _n,aQ as Gt,aR as Pf,aS as Vn,aT as Md,aU as yr,aV as fr,aW as _9,aX as Sd,aY as Cd,aZ as aS,a_ as iS,a$ as T9,b0 as xl,b1 as k9,a3 as Od,b2 as no,I as Fl,b3 as M9,b4 as oS,b5 as S9,b6 as oe,U as di,b7 as C9,a7 as O9,b8 as A9,b9 as lg,a8 as P9,ba as D9,bb as E9,bc as B2,bd as R9,be as py,bf as L9,bg as I9,bh as F9,bi as N9,bj as j9,bk as $9,bl as B9,bm as z9,bn as q9,bo as W9,bp as z2,bq as U9,br as gy,h as H9,bs as V9,bt as Y9,bu as G9,bv as X9,bw as Z9,bx as K9,by as J9,bz as Q9,bA as eE,bB as tE,p as my,o as nE}from"./vendor-DRRvL2bZ.js";import{u as lS}from"./DashboardViewParams-CtX565DS.js";import{i as vn,r as Xr}from"./createSvgIcon-Cky3vhEa.js";import{E as rE}from"./Edit-CBY3z5Ql.js";var cf=(e=>(e[e.Small=0]="Small",e[e.Medium=1]="Medium",e[e.Big=2]="Big",e))(cf||{});function Ic(e){return e.palette.mode==="dark"?J5:Q5}function Fc(e){return e.palette.mode==="light"?Q5:J5}const C0=e=>{const[t,r]=$e.useState({open:!1});return je.jsxs(Z5,{elevation:0,onClick:i=>r(u=>({open:!u.open,anchorEl:i.currentTarget})),sx:[{color:i=>Fc(i)(i.palette.info.main,.6),backgroundColor:i=>Ic(i)(i.palette.info.main,.9)},e.data.state==="success"&&{color:i=>Fc(i)(i.palette.success.main,.6),backgroundColor:i=>Ic(i)(i.palette.success.main,.9)},e.data.state==="warning"&&{color:i=>Fc(i)(i.palette.warning.main,.6),backgroundColor:i=>Ic(i)(i.palette.warning.main,.9)},e.data.state==="error"&&{color:i=>Fc(i)(i.palette.error.main,.6),backgroundColor:i=>Ic(i)(i.palette.error.main,.9)}],children:[je.jsx(Cr,{align:"center",variant:"h6",component:"div",children:e.data.value}),je.jsx(Cr,{align:"center",variant:"body1",component:"div",children:e.data.text}),je.jsx(K5,{open:t.open,anchorEl:t.anchorEl,anchorOrigin:{horizontal:"left",vertical:"bottom"},children:e.customPopup??je.jsx(Cr,{padding:1,children:e.data.longText})})]})},sS=e=>je.jsxs(dy,{severity:e.data.severity,children:[je.jsx(hy,{children:e.data.title}),e.data.text]}),q2=e=>{const{alertStats:t}=e;return je.jsx(C0,{data:{value:`${t.triggered.last_24h}`,state:"info",text:"alerts in the last 24 hours",longText:"alerts triggered in the period / alerts triggered in 24 hours / alerts active "},customPopup:je.jsx(Cr,{sx:{pr:1},children:je.jsxs("ul",{children:[je.jsxs("li",{children:[t.triggered.period," alerts triggered in the period"]}),je.jsxs("li",{children:[t.triggered.last_24h," alerts triggered in 24 hours"]}),je.jsxs("li",{children:[t.active," total active alerts"]})]})})})};function aE(e){return e===12?{xs:12,sm:12,md:12,lg:12}:e===6?{xs:12,sm:12,md:6,lg:6}:e===3?{xs:12,sm:6,md:3,lg:3}:{xs:6,sm:3,md:1,lg:1}}const iE=e=>{const{size:t,ItemWrapper:r}=e,i=e.children.alertsPosition??"row",{id:u,title:o,details:a,content:n,alerts:l,alertStats:f,insights:s}=e.children,c=l===void 0?!1:l.length>0,d=s===void 0?!1:s.length>0,h=je.jsx(e9,{sx:{border:"1px solid",borderColor:"#d6d6d6",borderRadius:"4px"},elevation:0,children:je.jsx(t9,{children:je.jsxs(Jn,{container:!0,spacing:1,direction:"column",children:[i==="row"?je.jsxs(Jn,{container:!0,spacing:1,item:!0,children:[je.jsxs(Jn,{item:!0,xs:c&&i==="row"?9:12,children:[o?je.jsx(Cr,{fontWeight:500,variant:"h5",children:o}):je.jsx("div",{}),je.jsx("div",{children:n}),a?je.jsx(Cr,{variant:"subtitle1",children:a}):je.jsx("div",{})]}),c?je.jsx(Jn,{container:!0,spacing:1,direction:"column",justifyContent:"center",item:!0,xs:3,children:l?je.jsxs(et.Fragment,{children:[f?je.jsx(Jn,{item:!0,children:je.jsx(q2,{alertStats:f})}):je.jsx("div",{}),l.map(p=>je.jsx(Jn,{item:!0,children:je.jsx(C0,{data:p})}))]}):je.jsx("div",{})}):je.jsx("div",{})]}):je.jsxs(et.Fragment,{children:[je.jsxs(Jn,{item:!0,children:[o?je.jsx(Cr,{variant:"h5",children:o}):je.jsx("div",{}),je.jsx("div",{children:n}),a?je.jsx(Cr,{variant:"subtitle1",children:a}):je.jsx("div",{})]}),c?je.jsx(Jn,{item:!0,xs:!0,children:je.jsx(Jn,{container:!0,direction:"row",spacing:1,children:l?je.jsxs(et.Fragment,{children:[f?je.jsx(Jn,{item:!0,xs:!0,children:je.jsx(q2,{alertStats:f})}):je.jsx("div",{}),l.map(p=>je.jsx(Jn,{item:!0,xs:!0,children:je.jsx(C0,{data:p})}))]}):je.jsx("div",{})})}):je.jsx("div",{})]}),d?s.map(p=>je.jsx(Jn,{item:!0,xs:!0,sm:!0,md:!0,children:je.jsx(sS,{data:p})})):je.jsx("div",{})]})})});return je.jsx(Jn,{item:!0,...aE(t),children:r?r({id:u,children:h}):h})},W2=e=>je.jsxs("div",{children:[je.jsx(Cr,{align:"center",fontWeight:500,sx:{fontSize:36},children:e.value}),je.jsx(Cr,{align:"center",variant:"h5",fontWeight:500,children:e.label})]}),oE=e=>je.jsx(et.Fragment,{children:e.counters.length===1?je.jsx(W2,{...e.counters[0]}):je.jsx(Jn,{container:!0,spacing:1,direction:"row",alignItems:"center",children:e.counters.map((t,r)=>je.jsx(Jn,{item:!0,xs:!0,component:Qr,height:"100%",children:je.jsx(Qr,{children:je.jsx(W2,{...t})})},r))})}),lE=e=>je.jsxs("div",{children:[je.jsxs(Qr,{display:"flex",alignItems:"center",children:[je.jsx(Qr,{width:"100%",mr:1,children:je.jsx(n9,{variant:"determinate",value:e.value/e.maxValue*100})}),je.jsx(Qr,{minWidth:35,children:je.jsx(Cr,{variant:"body2",color:"textSecondary",children:`${Math.round(e.value/e.maxValue*100)}%`})})]}),je.jsx(Qr,{width:"100%",children:je.jsx(Cr,{variant:"body2",color:"textSecondary",children:e.details??""})})]});var uS={exports:{}};(function(e,t){/*! For license information please see plotly-cartesian.min.js.LICENSE.txt */(function(r,i){e.exports=i()})(self,function(){return function(){var r={98847:function(o,a,n){var l=n(71828),f={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var s in f){var c=s.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");l.addStyleRule(c,f[s])}},98222:function(o,a,n){o.exports=n(82887)},27206:function(o,a,n){o.exports=n(60822)},5224:function(o,a,n){o.exports=n(83832)},59509:function(o,a,n){o.exports=n(72201)},49866:function(o,a,n){o.exports=n(99442)},19548:function(o,a,n){o.exports=n(8729)},61039:function(o,a,n){o.exports=n(14382)},24296:function(o,a,n){o.exports=n(43102)},58872:function(o,a,n){o.exports=n(92165)},65591:function(o,a,n){o.exports=n(36071)},69738:function(o,a,n){o.exports=n(43905)},92650:function(o,a,n){o.exports=n(35902)},73434:function(o,a,n){o.exports=n(94507)},760:function(o,a,n){var l=n(19548);l.register([n(27206),n(5224),n(58872),n(65591),n(69738),n(92650),n(49866),n(25743),n(6197),n(73434),n(54201),n(98222),n(61039),n(24296),n(66398),n(59509)]),o.exports=l},54201:function(o,a,n){o.exports=n(58810)},25743:function(o,a,n){o.exports=n(52979)},66398:function(o,a,n){o.exports=n(32275)},6197:function(o,a,n){o.exports=n(47462)},82884:function(o){o.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},50215:function(o,a,n){var l=n(82884),f=n(41940),s=n(85555),c=n(44467).templatedArray;n(24695),o.exports=c("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:f({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:l.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:l.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",s.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",s.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",s.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",s.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:f({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(o,a,n){var l=n(71828),f=n(89298),s=n(92605).draw;function c(h){var p=h._fullLayout;l.filterVisible(p.annotations).forEach(function(m){var y=f.getFromId(h,m.xref),v=f.getFromId(h,m.yref),g=f.getRefType(m.xref),b=f.getRefType(m.yref);m._extremes={},g==="range"&&d(m,y),b==="range"&&d(m,v)})}function d(h,p){var m,y=p._id,v=y.charAt(0),g=h[v],b=h["a"+v],x=h[v+"ref"],_=h["a"+v+"ref"],w=h["_"+v+"padplus"],k=h["_"+v+"padminus"],T={x:1,y:-1}[v]*h[v+"shift"],M=3*h.arrowsize*h.arrowwidth||0,S=M+T,C=M-T,P=3*h.startarrowsize*h.arrowwidth||0,D=P+T,O=P-T;if(_===x){var R=f.findExtremes(p,[p.r2c(g)],{ppadplus:S,ppadminus:C}),F=f.findExtremes(p,[p.r2c(b)],{ppadplus:Math.max(w,D),ppadminus:Math.max(k,O)});m={min:[R.min[0],F.min[0]],max:[R.max[0],F.max[0]]}}else D=b?D+b:D,O=b?O-b:O,m=f.findExtremes(p,[p.r2c(g)],{ppadplus:Math.max(w,S,D),ppadminus:Math.max(k,C,O)});h._extremes[y]=m}o.exports=function(h){var p=h._fullLayout;if(l.filterVisible(p.annotations).length&&h._fullData.length)return l.syncOrAsync([s,c],h)}},44317:function(o,a,n){var l=n(71828),f=n(73972),s=n(44467).arrayEditor;function c(h,p){var m,y,v,g,b,x,_,w=h._fullLayout.annotations,k=[],T=[],M=[],S=(p||[]).length;for(m=0;m0||m.explicitOff.length>0},onClick:function(h,p){var m,y,v=c(h,p),g=v.on,b=v.off.concat(v.explicitOff),x={},_=h._fullLayout.annotations;if(g.length||b.length){for(m=0;m.6666666666666666?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[nt]}for(var we=!1,ke=["x","y"],Ae=0;Ae1)&&(Ye===qe?((Je=at.r2fraction(S["a"+Ue]))<0||Je>1)&&(we=!0):we=!0),Ee=at._offset+at.r2p(S[Ue]),Ie=.5}else{var ut=kt==="domain";Ue==="x"?(Re=S[Ue],Ee=ut?at._offset+at._length*Re:Ee=z.l+z.w*Re):(Re=1-S[Ue],Ee=ut?at._offset+at._length*Re:Ee=z.t+z.h*Re),Ie=S.showarrow?.5:Re}if(S.showarrow){it.head=Ee;var pt=S["a"+Ue];if(Be=ct*be(.5,S.xanchor)-bt*be(.5,S.yanchor),Ye===qe){var It=h.getRefType(Ye);It==="domain"?(Ue==="y"&&(pt=1-pt),it.tail=at._offset+at._length*pt):It==="paper"?Ue==="y"?(pt=1-pt,it.tail=z.t+z.h*pt):it.tail=z.l+z.w*pt:it.tail=at._offset+at.r2p(pt),De=Be}else it.tail=Ee+pt,De=Be+pt;it.text=it.tail+Be;var Mt=A[Ue==="x"?"width":"height"];if(qe==="paper"&&(it.head=c.constrain(it.head,1,Mt-1)),Ye==="pixel"){var zt=-Math.max(it.tail-3,it.text),wt=Math.min(it.tail+3,it.text)-Mt;zt>0?(it.tail+=zt,it.text+=zt):wt>0&&(it.tail-=wt,it.text-=wt)}it.tail+=Qe,it.head+=Qe}else De=Be=ze*be(Ie,Ne),it.text=Ee+Be;it.text+=Qe,Be+=Qe,De+=Qe,S["_"+Ue+"padplus"]=ze/2+De,S["_"+Ue+"padminus"]=ze/2-De,S["_"+Ue+"size"]=ze,S["_"+Ue+"shift"]=Be}if(we)ee.remove();else{var ve=0,_e=0;if(S.align!=="left"&&(ve=(de-J)*(S.align==="center"?.5:1)),S.valign!=="top"&&(_e=(xe-ne)*(S.valign==="middle"?.5:1)),ce)Me.select("svg").attr({x:Y+ve-1,y:Y+_e}).call(m.setClipUrl,X?W:null,M);else{var Ve=Y+_e-ye.top,We=Y+ve-ye.left;se.call(v.positionText,We,Ve).call(m.setClipUrl,X?W:null,M)}re.select("rect").call(m.setRect,Y,Y,de,xe),Z.call(m.setRect,U/2,U/2,ue-U,ge-U),ee.call(m.setTranslate,Math.round(G.x.text-ue/2),Math.round(G.y.text-ge/2)),H.attr({transform:"rotate("+L+","+G.x.text+","+G.y.text+")"});var Ze,Ge=function(Ke,nt){q.selectAll(".annotation-arrow-g").remove();var st=G.x.head,mt=G.y.head,tt=G.x.tail+Ke,Ft=G.y.tail+nt,Vt=G.x.text+Ke,St=G.y.text+nt,Nt=c.rotationXYMatrix(L,Vt,St),Dt=c.apply2DTransform(Nt),gt=c.apply2DTransform2(Nt),ht=+Z.attr("width"),yt=+Z.attr("height"),qt=Vt-.5*ht,Et=qt+ht,jt=St-.5*yt,Tt=jt+yt,Ot=[[qt,jt,qt,Tt],[qt,Tt,Et,Tt],[Et,Tt,Et,jt],[Et,jt,qt,jt]].map(gt);if(!Ot.reduce(function(an,sn){return an^!!c.segmentsIntersect(st,mt,st+1e6,mt+1e6,sn[0],sn[1],sn[2],sn[3])},!1)){Ot.forEach(function(an){var sn=c.segmentsIntersect(tt,Ft,st,mt,an[0],an[1],an[2],an[3]);sn&&(tt=sn.x,Ft=sn.y)});var At=S.arrowwidth,Lt=S.arrowcolor,Rt=S.arrowside,$t=q.append("g").style({opacity:p.opacity(Lt)}).classed("annotation-arrow-g",!0),Yt=$t.append("path").attr("d","M"+tt+","+Ft+"L"+st+","+mt).style("stroke-width",At+"px").call(p.stroke,p.rgb(Lt));if(_(Yt,Rt,S),B.annotationPosition&&Yt.node().parentNode&&!P){var Xt=st,Bt=mt;if(S.standoff){var Wt=Math.sqrt(Math.pow(st-tt,2)+Math.pow(mt-Ft,2));Xt+=S.standoff*(tt-st)/Wt,Bt+=S.standoff*(Ft-mt)/Wt}var tn,cn,ln=$t.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(tt-Xt)+","+(Ft-Bt),transform:d(Xt,Bt)}).style("stroke-width",At+6+"px").call(p.stroke,"rgba(0,0,0,0)").call(p.fill,"rgba(0,0,0,0)");b.init({element:ln.node(),gd:M,prepFn:function(){var an=m.getTranslate(ee);tn=an.x,cn=an.y,D&&D.autorange&&j(D._name+".autorange",!0),O&&O.autorange&&j(O._name+".autorange",!0)},moveFn:function(an,sn){var Zt=Dt(tn,cn),pn=Zt[0]+an,nn=Zt[1]+sn;ee.call(m.setTranslate,pn,nn),N("x",k(D,an,"x",z,S)),N("y",k(O,sn,"y",z,S)),S.axref===S.xref&&N("ax",k(D,an,"ax",z,S)),S.ayref===S.yref&&N("ay",k(O,sn,"ay",z,S)),$t.attr("transform",d(an,sn)),H.attr({transform:"rotate("+L+","+pn+","+nn+")"})},doneFn:function(){f.call("_guiRelayout",M,E());var an=document.querySelector(".js-notes-box-panel");an&&an.redraw(an.selectedObj)}})}}};S.showarrow&&Ge(0,0),V&&b.init({element:ee.node(),gd:M,prepFn:function(){Ze=H.attr("transform")},moveFn:function(Ke,nt){var st="pointer";if(S.showarrow)S.axref===S.xref?N("ax",k(D,Ke,"ax",z,S)):N("ax",S.ax+Ke),S.ayref===S.yref?N("ay",k(O,nt,"ay",z.w,S)):N("ay",S.ay+nt),Ge(Ke,nt);else{if(P)return;var mt,tt;if(D)mt=k(D,Ke,"x",z,S);else{var Ft=S._xsize/z.w,Vt=S.x+(S._xshift-S.xshift)/z.w-Ft/2;mt=b.align(Vt+Ke/z.w,Ft,0,1,S.xanchor)}if(O)tt=k(O,nt,"y",z,S);else{var St=S._ysize/z.h,Nt=S.y-(S._yshift+S.yshift)/z.h-St/2;tt=b.align(Nt-nt/z.h,St,0,1,S.yanchor)}N("x",mt),N("y",tt),D&&O||(st=b.getCursor(D?.5:mt,O?.5:tt,S.xanchor,S.yanchor))}H.attr({transform:d(Ke,nt)+Ze}),g(ee,st)},clickFn:function(Ke,nt){S.captureevents&&M.emit("plotly_clickannotation",pe(nt))},doneFn:function(){g(ee),f.call("_guiRelayout",M,E());var Ke=document.querySelector(".js-notes-box-panel");Ke&&Ke.redraw(Ke.selectedObj)}})}}}o.exports={draw:function(M){var S=M._fullLayout;S._infolayer.selectAll(".annotation").remove();for(var C=0;C=0,P=y.indexOf("end")>=0,D=k.backoff*M+v.standoff,O=T.backoff*S+v.startstandoff;if(w.nodeName==="line"){g={x:+m.attr("x1"),y:+m.attr("y1")},b={x:+m.attr("x2"),y:+m.attr("y2")};var R=g.x-b.x,F=g.y-b.y;if(_=(x=Math.atan2(F,R))+Math.PI,D&&O&&D+O>Math.sqrt(R*R+F*F))return void q();if(D){if(D*D>R*R+F*F)return void q();var A=D*Math.cos(x),z=D*Math.sin(x);b.x+=A,b.y+=z,m.attr({x2:b.x,y2:b.y})}if(O){if(O*O>R*R+F*F)return void q();var B=O*Math.cos(x),$=O*Math.sin(x);g.x-=B,g.y-=$,m.attr({x1:g.x,y1:g.y})}}else if(w.nodeName==="path"){var j=w.getTotalLength(),N="";if(j1){v=!0;break}}v?c.fullLayout._infolayer.select(".annotation-"+c.id+'[data-index="'+m+'"]').remove():(y._pdata=f(c.glplot.cameraParams,[d.xaxis.r2l(y.x)*h[0],d.yaxis.r2l(y.y)*h[1],d.zaxis.r2l(y.z)*h[2]]),l(c.graphDiv,y,m,c.id,y._xa,y._ya))}}},2468:function(o,a,n){var l=n(73972),f=n(71828);o.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:n(26997)}}},layoutAttributes:n(26997),handleDefaults:n(20226),includeBasePlot:function(s,c){var d=l.subplotsRegistry.gl3d;if(d)for(var h=d.attrRegex,p=Object.keys(s),m=0;m=0)))return y;if(_===3)b[_]>1&&(b[_]=1);else if(b[_]>=1)return y}var w=Math.round(255*b[0])+", "+Math.round(255*b[1])+", "+Math.round(255*b[2]);return x?"rgba("+w+", "+b[3]+")":"rgb("+w+")"}c.tinyRGB=function(y){var v=y.toRgb();return"rgb("+Math.round(v.r)+", "+Math.round(v.g)+", "+Math.round(v.b)+")"},c.rgb=function(y){return c.tinyRGB(l(y))},c.opacity=function(y){return y?l(y).getAlpha():0},c.addOpacity=function(y,v){var g=l(y).toRgb();return"rgba("+Math.round(g.r)+", "+Math.round(g.g)+", "+Math.round(g.b)+", "+v+")"},c.combine=function(y,v){var g=l(y).toRgb();if(g.a===1)return l(y).toRgbString();var b=l(v||p).toRgb(),x=b.a===1?b:{r:255*(1-b.a)+b.r*b.a,g:255*(1-b.a)+b.g*b.a,b:255*(1-b.a)+b.b*b.a},_={r:x.r*(1-g.a)+g.r*g.a,g:x.g*(1-g.a)+g.g*g.a,b:x.b*(1-g.a)+g.b*g.a};return l(_).toRgbString()},c.contrast=function(y,v,g){var b=l(y);return b.getAlpha()!==1&&(b=l(c.combine(y,p))),(b.isDark()?v?b.lighten(v):p:g?b.darken(g):h).toString()},c.stroke=function(y,v){var g=l(v);y.style({stroke:c.tinyRGB(g),"stroke-opacity":g.getAlpha()})},c.fill=function(y,v){var g=l(v);y.style({fill:c.tinyRGB(g),"fill-opacity":g.getAlpha()})},c.clean=function(y){if(y&&typeof y=="object"){var v,g,b,x,_=Object.keys(y);for(v=0;v<_.length;v++)if(x=y[b=_[v]],b.substr(b.length-5)==="color")if(Array.isArray(x))for(g=0;g0?wt>=Ze:wt<=Ze));ve++)wt>Ke&&wt0?wt>=Ze:wt<=Ze));ve++)wt>zt[0]&&wt1){var bt=Math.pow(10,Math.floor(Math.log(ct)/Math.LN10));at*=bt*p.roundUp(ct/bt,[2,5,10]),(Math.abs(J.start)/J.size+1e-6)%1<2e-6&&(qe.tick0=0)}qe.dtick=at}qe.domain=E?[Be+Y/se.h,Be+we-Y/se.h]:[Be+Q/se.w,Be+we-Q/se.w],qe.setScale(),$.attr("transform",m(Math.round(se.l),Math.round(se.t)));var ze,Ne=$.select("."+O.cbtitleunshift).attr("transform",m(-Math.round(se.l),-Math.round(se.t))),Qe=qe.ticklabelposition,it=qe.title.font.size,kt=$.select("."+O.cbaxis),Je=0,ut=0;function pt(It,Mt){var zt={propContainer:qe,propName:j._propPrefix+"title",traceIndex:j._traceIndex,_meta:j._meta,placeholder:le._dfltTitle.colorbar,containerGroup:$.select("."+O.cbtitle)},wt=It.charAt(0)==="h"?It.substr(1):"h"+It;$.selectAll("."+wt+",."+wt+"-math-group").remove(),x.draw(N,It,y(zt,Mt||{}))}return p.syncOrAsync([s.previousPromises,function(){var It,Mt;(E&&Ye||!E&&!Ye)&&(Oe==="top"&&(It=Q+se.l+ke*Z,Mt=Y+se.t+Ae*(1-Be-we)+3+.75*it),Oe==="bottom"&&(It=Q+se.l+ke*Z,Mt=Y+se.t+Ae*(1-Be)-3-.25*it),Oe==="right"&&(Mt=Y+se.t+Ae*X+3+.75*it,It=Q+se.l+ke*Be),pt(qe._id+"title",{attributes:{x:It,y:Mt,"text-anchor":E?"start":"middle"}}))},function(){if(!E&&!Ye||E&&Ye){var It,Mt=$.select("."+O.cbtitle),zt=Mt.select("text"),wt=[-H/2,H/2],ve=Mt.select(".h"+qe._id+"title-math-group").node(),_e=15.6;if(zt.node()&&(_e=parseInt(zt.node().style.fontSize,10)*C),ve?(It=g.bBox(ve),ut=It.width,(Je=It.height)>_e&&(wt[1]-=(Je-_e)/2)):zt.node()&&!zt.classed(O.jsPlaceholder)&&(It=g.bBox(zt.node()),ut=It.width,Je=It.height),E){if(Je){if(Je+=5,Oe==="top")qe.domain[1]-=Je/se.h,wt[1]*=-1;else{qe.domain[0]+=Je/se.h;var Ve=_.lineCount(zt);wt[1]+=(1-Ve)*_e}Mt.attr("transform",m(wt[0],wt[1])),qe.setScale()}}else ut&&(Oe==="right"&&(qe.domain[0]+=(ut+it/2)/se.w),Mt.attr("transform",m(wt[0],wt[1])),qe.setScale())}$.selectAll("."+O.cbfills+",."+O.cblines).attr("transform",E?m(0,Math.round(se.h*(1-qe.domain[1]))):m(Math.round(se.w*qe.domain[0]),0)),kt.attr("transform",E?m(0,Math.round(-se.t)):m(Math.round(-se.l),0));var We=$.select("."+O.cbfills).selectAll("rect."+O.cbfill).attr("style","").data(de);We.enter().append("rect").classed(O.cbfill,!0).attr("style",""),We.exit().remove();var Ze=Me.map(qe.c2p).map(Math.round).sort(function(mt,tt){return mt-tt});We.each(function(mt,tt){var Ft=[tt===0?Me[0]:(de[tt]+de[tt-1])/2,tt===de.length-1?Me[1]:(de[tt]+de[tt+1])/2].map(qe.c2p).map(Math.round);E&&(Ft[1]=p.constrain(Ft[1]+(Ft[1]>Ft[0])?1:-1,Ze[0],Ze[1]));var Vt=l.select(this).attr(E?"x":"y",Ee).attr(E?"y":"x",l.min(Ft)).attr(E?"width":"height",Math.max(ue,2)).attr(E?"height":"width",Math.max(l.max(Ft)-l.min(Ft),2));if(j._fillgradient)g.gradient(Vt,N,j._id,E?"vertical":"horizontalreversed",j._fillgradient,"fill");else{var St=ye(mt).replace("e-","");Vt.attr("fill",f(St).toHexString())}});var Ge=$.select("."+O.cblines).selectAll("path."+O.cbline).data(Te.color&&Te.width?xe:[]);Ge.enter().append("path").classed(O.cbline,!0),Ge.exit().remove(),Ge.each(function(mt){var tt=Ee,Ft=Math.round(qe.c2p(mt))+Te.width/2%1;l.select(this).attr("d","M"+(E?tt+","+Ft:Ft+","+tt)+(E?"h":"v")+ue).call(g.lineGroupStyle,Te.width,ce(mt),Te.dash)}),kt.selectAll("g."+qe._id+"tick,path").remove();var Ke=Ee+ue+(H||0)/2-(j.ticks==="outside"?1:0),nt=d.calcTicks(qe),st=d.getTickSigns(qe)[2];return d.drawTicks(N,qe,{vals:qe.ticks==="inside"?d.clipEnds(qe,nt):nt,layer:kt,path:d.makeTickPath(qe,Ke,st),transFn:d.makeTransTickFn(qe)}),d.drawLabels(N,qe,{vals:nt,layer:kt,transFn:d.makeTransTickLabelFn(qe),labelFns:d.makeLabelFns(qe,Ke)})},function(){if(E&&!Ye||!E&&Ye){var It,Mt,zt=qe.position||0,wt=qe._offset+qe._length/2;if(Oe==="right")Mt=wt,It=se.l+ke*zt+10+it*(qe.showticklabels?1:.5);else if(It=wt,Oe==="bottom"&&(Mt=se.t+Ae*zt+10+(Qe.indexOf("inside")===-1?qe.tickfont.size:0)+(qe.ticks!=="intside"&&j.ticklen||0)),Oe==="top"){var ve=Se.text.split("
").length;Mt=se.t+Ae*zt+10-ue-C*it*ve}pt((E?"h":"v")+qe._id+"title",{avoid:{selection:l.select(N).selectAll("g."+qe._id+"tick"),side:Oe,offsetTop:E?0:se.t,offsetLeft:E?se.l:0,maxShift:E?le.width:le.height},attributes:{x:It,y:Mt,"text-anchor":"middle"},transform:{rotate:E?-90:0,offset:0}})}},s.previousPromises,function(){var It,Mt=ue+H/2;Qe.indexOf("inside")===-1&&(It=g.bBox(kt.node()),Mt+=E?It.width:It.height),ze=Ne.select("text");var zt=0,wt=E&&Oe==="top",ve=!E&&Oe==="right",_e=0;if(ze.node()&&!ze.classed(O.jsPlaceholder)){var Ve,We=Ne.select(".h"+qe._id+"title-math-group").node();We&&(E&&Ye||!E&&!Ye)?(zt=(It=g.bBox(We)).width,Ve=It.height):(zt=(It=g.bBox(Ne.node())).right-se.l-(E?Ee:Ue),Ve=It.bottom-se.t-(E?Ue:Ee),E||Oe!=="top"||(Mt+=It.height,_e=It.height)),ve&&(ze.attr("transform",m(zt/2+it/2,0)),zt*=2),Mt=Math.max(Mt,E?zt:Ve)}var Ze=2*(E?Q:Y)+Mt+V+H/2,Ge=0;!E&&Se.text&&U==="bottom"&&X<=0&&(Ze+=Ge=Ze/2,_e+=Ge),le._hColorbarMoveTitle=Ge,le._hColorbarMoveCBTitle=_e;var Ke=V+H,nt=(E?Ee:Ue)-Ke/2-(E?Q:0),st=(E?Ue:Ee)-(E?be:Y+_e-Ge);$.select("."+O.cbbg).attr("x",nt).attr("y",st).attr(E?"width":"height",Math.max(Ze-Ge,2)).attr(E?"height":"width",Math.max(be+Ke,2)).call(b.fill,te).call(b.stroke,j.bordercolor).style("stroke-width",V);var mt=ve?Math.max(zt-10,0):0;$.selectAll("."+O.cboutline).attr("x",(E?Ee:Ue+Q)+mt).attr("y",(E?Ue+Y-be:Ee)+(wt?Je:0)).attr(E?"width":"height",Math.max(ue,2)).attr(E?"height":"width",Math.max(be-(E?2*Y+Je:2*Q+mt),2)).call(b.stroke,j.outlinecolor).style({fill:"none","stroke-width":H});var tt=E?De*Ze:0,Ft=E?0:(1-Re)*Ze-_e;if(tt=ie?se.l-tt:-tt,Ft=re?se.t-Ft:-Ft,$.attr("transform",m(tt,Ft)),!E&&(V||f(te).getAlpha()&&!f.equals(le.paper_bgcolor,te))){var Vt=kt.selectAll("text"),St=Vt[0].length,Nt=$.select("."+O.cbbg).node(),Dt=g.bBox(Nt),gt=g.getTranslate($);Vt.each(function(Rt,$t){var Yt=St-1;if($t===0||$t===Yt){var Xt,Bt=g.bBox(this),Wt=g.getTranslate(this);if($t===Yt){var tn=Bt.right+Wt.x;(Xt=Dt.right+gt.x+Ue-V-2+Z-tn)>0&&(Xt=0)}else if($t===0){var cn=Bt.left+Wt.x;(Xt=Dt.left+gt.x+Ue+V+2-cn)<0&&(Xt=0)}Xt&&(St<3?this.setAttribute("transform","translate("+Xt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ht={},yt=P[ee],qt=D[ee],Et=P[U],jt=D[U],Tt=Ze-ue;E?(G==="pixels"?(ht.y=X,ht.t=be*Et,ht.b=be*jt):(ht.t=ht.b=0,ht.yt=X+W*Et,ht.yb=X-W*jt),q==="pixels"?(ht.x=Z,ht.l=Ze*yt,ht.r=Ze*qt):(ht.l=Tt*yt,ht.r=Tt*qt,ht.xl=Z-L*yt,ht.xr=Z+L*qt)):(G==="pixels"?(ht.x=Z,ht.l=be*yt,ht.r=be*qt):(ht.l=ht.r=0,ht.xl=Z+W*yt,ht.xr=Z-W*qt),q==="pixels"?(ht.y=1-X,ht.t=Ze*Et,ht.b=Ze*jt):(ht.t=Tt*Et,ht.b=Tt*jt,ht.yt=X-L*Et,ht.yb=X+L*jt));var Ot=j.y<.5?"b":"t",At=j.x<.5?"l":"r";N._fullLayout._reservedMargin[j._id]={};var Lt={r:le.width-nt-tt,l:nt+ht.r,b:le.height-st-Ft,t:st+ht.b};ie&&re?s.autoMargin(N,j._id,ht):ie?N._fullLayout._reservedMargin[j._id][Ot]=Lt[Ot]:re||E?N._fullLayout._reservedMargin[j._id][At]=Lt[At]:N._fullLayout._reservedMargin[j._id][Ot]=Lt[Ot]}],N)}(z,A,R);B&&B.then&&(R._promises||[]).push(B),R._context.edits.colorbarPosition&&function($,j,N){var E,W,G,L=j.orientation==="v",q=N._fullLayout._size;h.init({element:$.node(),gd:N,prepFn:function(){E=$.attr("transform"),v($)},moveFn:function(H,V){$.attr("transform",E+m(H,V)),W=h.align((L?j._uFrac:j._vFrac)+H/q.w,L?j._thickFrac:j._lenFrac,0,1,j.xanchor),G=h.align((L?j._vFrac:1-j._uFrac)-V/q.h,L?j._lenFrac:j._thickFrac,0,1,j.yanchor);var te=h.getCursor(W,G,j.xanchor,j.yanchor);v($,te)},doneFn:function(){if(v($),W!==void 0&&G!==void 0){var H={};H[j._propPrefix+"x"]=W,H[j._propPrefix+"y"]=G,j._traceIndex!==void 0?c.call("_guiRestyle",N,H,j._traceIndex):c.call("_guiRelayout",N,H)}}})}(z,A,R)}),F.exit().each(function(A){s.autoMargin(R,A._id)}).remove(),F.order()}}},76228:function(o,a,n){var l=n(71828);o.exports=function(f){return l.isPlainObject(f.colorbar)}},12311:function(o,a,n){o.exports={moduleType:"component",name:"colorbar",attributes:n(63583),supplyDefaults:n(62499),draw:n(98981).draw,hasColorbar:n(76228)}},50693:function(o,a,n){var l=n(63583),f=n(30587).counter,s=n(78607),c=n(63282).scales;function d(h){return"`"+h+"`"}s(c),o.exports=function(h,p){h=h||"";var m,y=(p=p||{}).cLetter||"c",v=("onlyIfNumerical"in p&&p.onlyIfNumerical,"noScale"in p?p.noScale:h==="marker.line"),g="showScaleDflt"in p?p.showScaleDflt:y==="z",b=typeof p.colorscaleDflt=="string"?c[p.colorscaleDflt]:null,x=p.editTypeOverride||"",_=h?h+".":"";"colorAttr"in p?(m=p.colorAttr,p.colorAttr):d(_+(m={z:"z",c:"color"}[y]));var w=y+"auto",k=y+"min",T=y+"max",M=y+"mid",S={};S[k]=S[T]=void 0;var C={};C[w]=!1;var P={};return m==="color"&&(P.color={valType:"color",arrayOk:!0,editType:x||"style"},p.anim&&(P.color.anim=!0)),P[w]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:S},P[k]={valType:"number",dflt:null,editType:x||"plot",impliedEdits:C},P[T]={valType:"number",dflt:null,editType:x||"plot",impliedEdits:C},P[M]={valType:"number",dflt:null,editType:"calc",impliedEdits:S},P.colorscale={valType:"colorscale",editType:"calc",dflt:b,impliedEdits:{autocolorscale:!1}},P.autocolorscale={valType:"boolean",dflt:p.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},P.reversescale={valType:"boolean",dflt:!1,editType:"plot"},v||(P.showscale={valType:"boolean",dflt:g,editType:"calc"},P.colorbar=l),p.noColorAxis||(P.coloraxis={valType:"subplotid",regex:f("coloraxis"),dflt:null,editType:"calc"}),P}},78803:function(o,a,n){var l=n(92770),f=n(71828),s=n(52075).extractOpts;o.exports=function(c,d,h){var p,m=c._fullLayout,y=h.vals,v=h.containerStr,g=v?f.nestedProperty(d,v).get():d,b=s(g),x=b.auto!==!1,_=b.min,w=b.max,k=b.mid,T=function(){return f.aggNums(Math.min,null,y)},M=function(){return f.aggNums(Math.max,null,y)};_===void 0?_=T():x&&(_=g._colorAx&&l(_)?Math.min(_,T()):T()),w===void 0?w=M():x&&(w=g._colorAx&&l(w)?Math.max(w,M()):M()),x&&k!==void 0&&(w-k>k-_?_=k-(w-k):w-k=0?m.colorscale.sequential:m.colorscale.sequentialminus,b._sync("colorscale",p))}},33046:function(o,a,n){var l=n(71828),f=n(52075).hasColorscale,s=n(52075).extractOpts;o.exports=function(c,d){function h(x,_){var w=x["_"+_];w!==void 0&&(x[_]=w)}function p(x,_){var w=_.container?l.nestedProperty(x,_.container).get():x;if(w)if(w.coloraxis)w._colorAx=d[w.coloraxis];else{var k=s(w),T=k.auto;(T||k.min===void 0)&&h(w,_.min),(T||k.max===void 0)&&h(w,_.max),k.autocolorscale&&h(w,"colorscale")}}for(var m=0;m=0;T--,M++){var S=_[T];k[M]=[1-S[0],S[1]]}return k}function b(_,w){w=w||{};for(var k=_.domain,T=_.range,M=T.length,S=new Array(M),C=0;C1.3333333333333333-h?d:h}},70461:function(o,a,n){var l=n(71828),f=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];o.exports=function(s,c,d,h){return s=d==="left"?0:d==="center"?1:d==="right"?2:l.constrain(Math.floor(3*s),0,2),c=h==="bottom"?0:h==="middle"?1:h==="top"?2:l.constrain(Math.floor(3*c),0,2),f[c][s]}},64505:function(o,a){a.selectMode=function(n){return n==="lasso"||n==="select"},a.drawMode=function(n){return n==="drawclosedpath"||n==="drawopenpath"||n==="drawline"||n==="drawrect"||n==="drawcircle"},a.openMode=function(n){return n==="drawline"||n==="drawopenpath"},a.rectMode=function(n){return n==="select"||n==="drawline"||n==="drawrect"||n==="drawcircle"},a.freeMode=function(n){return n==="lasso"||n==="drawclosedpath"||n==="drawopenpath"},a.selectingOrDrawing=function(n){return a.freeMode(n)||a.rectMode(n)}},28569:function(o,a,n){var l=n(48956),f=n(57035),s=n(38520),c=n(71828).removeElement,d=n(85555),h=o.exports={};h.align=n(92807),h.getCursor=n(70461);var p=n(26041);function m(){var v=document.createElement("div");v.className="dragcover";var g=v.style;return g.position="fixed",g.left=0,g.right=0,g.top=0,g.bottom=0,g.zIndex=999999999,g.background="none",document.body.appendChild(v),v}function y(v){return l(v.changedTouches?v.changedTouches[0]:v,document.body)}h.unhover=p.wrapped,h.unhoverRaw=p.raw,h.init=function(v){var g,b,x,_,w,k,T,M,S=v.gd,C=1,P=S._context.doubleClickDelay,D=v.element;S._mouseDownTime||(S._mouseDownTime=0),D.style.pointerEvents="all",D.onmousedown=R,s?(D._ontouchstart&&D.removeEventListener("touchstart",D._ontouchstart),D._ontouchstart=R,D.addEventListener("touchstart",R,{passive:!1})):D.ontouchstart=R;var O=v.clampFn||function(z,B,$){return Math.abs(z)<$&&(z=0),Math.abs(B)<$&&(B=0),[z,B]};function R(z){S._dragged=!1,S._dragging=!0;var B=y(z);g=B[0],b=B[1],T=z.target,k=z,M=z.buttons===2||z.ctrlKey,z.clientX===void 0&&z.clientY===void 0&&(z.clientX=g,z.clientY=b),(x=new Date().getTime())-S._mouseDownTimeP&&(C=Math.max(C-1,1)),S._dragged)v.doneFn&&v.doneFn();else if(v.clickFn&&v.clickFn(C,k),!M){var B;try{B=new MouseEvent("click",z)}catch{var $=y(z);(B=document.createEvent("MouseEvents")).initMouseEvent("click",z.bubbles,z.cancelable,z.view,z.detail,z.screenX,z.screenY,$[0],$[1],z.ctrlKey,z.altKey,z.shiftKey,z.metaKey,z.button,z.relatedTarget)}T.dispatchEvent(B)}S._dragging=!1,S._dragged=!1}else S._dragged=!1}},h.coverSlip=m},26041:function(o,a,n){var l=n(11086),f=n(79990),s=n(24401).getGraphDiv,c=n(26675),d=o.exports={};d.wrapped=function(h,p,m){(h=s(h))._fullLayout&&f.clear(h._fullLayout._uid+c.HOVERID),d.raw(h,p,m)},d.raw=function(h,p){var m=h._fullLayout,y=h._hoverdata;p||(p={}),p.target&&!h._dragged&&l.triggerHandler(h,"plotly_beforehover",p)===!1||(m._hoverlayer.selectAll("g").remove(),m._hoverlayer.selectAll("line").remove(),m._hoverlayer.selectAll("circle").remove(),h._hoverdata=void 0,p.target&&y&&h.emit("plotly_unhover",{event:p,points:y}))}},79952:function(o,a){a.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},a.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},91424:function(o,a,n){var l=n(39898),f=n(71828),s=f.numberFormat,c=n(92770),d=n(84267),h=n(73972),p=n(7901),m=n(21081),y=f.strTranslate,v=n(63893),g=n(77922),b=n(18783).LINE_SPACING,x=n(37822).DESELECTDIM,_=n(34098),w=n(39984),k=n(23469).appendArrayPointValue,T=o.exports={};function M(ce,ye,J){var ne=ye.fillpattern,de=ne&&T.getPatternAttr(ne.shape,0,"");if(de){var xe=T.getPatternAttr(ne.bgcolor,0,null),ue=T.getPatternAttr(ne.fgcolor,0,null),ge=ne.fgopacity,be=T.getPatternAttr(ne.size,0,8),we=T.getPatternAttr(ne.solidity,0,.3),ke=ye.uid;T.pattern(ce,"point",J,ke,de,be,we,void 0,ne.fillmode,xe,ue,ge)}else ye.fillcolor&&ce.call(p.fill,ye.fillcolor)}T.font=function(ce,ye,J,ne){f.isPlainObject(ye)&&(ne=ye.color,J=ye.size,ye=ye.family),ye&&ce.style("font-family",ye),J+1&&ce.style("font-size",J+"px"),ne&&ce.call(p.fill,ne)},T.setPosition=function(ce,ye,J){ce.attr("x",ye).attr("y",J)},T.setSize=function(ce,ye,J){ce.attr("width",ye).attr("height",J)},T.setRect=function(ce,ye,J,ne,de){ce.call(T.setPosition,ye,J).call(T.setSize,ne,de)},T.translatePoint=function(ce,ye,J,ne){var de=J.c2p(ce.x),xe=ne.c2p(ce.y);return!!(c(de)&&c(xe)&&ye.node())&&(ye.node().nodeName==="text"?ye.attr("x",de).attr("y",xe):ye.attr("transform",y(de,xe)),!0)},T.translatePoints=function(ce,ye,J){ce.each(function(ne){var de=l.select(this);T.translatePoint(ne,de,ye,J)})},T.hideOutsideRangePoint=function(ce,ye,J,ne,de,xe){ye.attr("display",J.isPtWithinRange(ce,de)&&ne.isPtWithinRange(ce,xe)?null:"none")},T.hideOutsideRangePoints=function(ce,ye){if(ye._hasClipOnAxisFalse){var J=ye.xaxis,ne=ye.yaxis;ce.each(function(de){var xe=de[0].trace,ue=xe.xcalendar,ge=xe.ycalendar,be=h.traceIs(xe,"bar-like")?".bartext":".point,.textpoint";ce.selectAll(be).each(function(we){T.hideOutsideRangePoint(we,l.select(this),J,ne,ue,ge)})})}},T.crispRound=function(ce,ye,J){return ye&&c(ye)?ce._context.staticPlot?ye:ye<1?1:Math.round(ye):J||0},T.singleLineStyle=function(ce,ye,J,ne,de){ye.style("fill","none");var xe=(((ce||[])[0]||{}).trace||{}).line||{},ue=J||xe.width||0,ge=de||xe.dash||"";p.stroke(ye,ne||xe.color),T.dashLine(ye,ge,ue)},T.lineGroupStyle=function(ce,ye,J,ne){ce.style("fill","none").each(function(de){var xe=(((de||[])[0]||{}).trace||{}).line||{},ue=ye||xe.width||0,ge=ne||xe.dash||"";l.select(this).call(p.stroke,J||xe.color).call(T.dashLine,ge,ue)})},T.dashLine=function(ce,ye,J){J=+J||0,ye=T.dashStyle(ye,J),ce.style({"stroke-dasharray":ye,"stroke-width":J+"px"})},T.dashStyle=function(ce,ye){ye=+ye||1;var J=Math.max(ye,3);return ce==="solid"?ce="":ce==="dot"?ce=J+"px,"+J+"px":ce==="dash"?ce=3*J+"px,"+3*J+"px":ce==="longdash"?ce=5*J+"px,"+5*J+"px":ce==="dashdot"?ce=3*J+"px,"+J+"px,"+J+"px,"+J+"px":ce==="longdashdot"&&(ce=5*J+"px,"+2*J+"px,"+J+"px,"+2*J+"px"),ce},T.singleFillStyle=function(ce,ye){var J=l.select(ce.node());M(ce,((J.data()[0]||[])[0]||{}).trace||{},ye)},T.fillGroupStyle=function(ce,ye){ce.style("stroke-width",0).each(function(J){var ne=l.select(this);J[0].trace&&M(ne,J[0].trace,ye)})};var S=n(90998);T.symbolNames=[],T.symbolFuncs=[],T.symbolBackOffs=[],T.symbolNeedLines={},T.symbolNoDot={},T.symbolNoFill={},T.symbolList=[],Object.keys(S).forEach(function(ce){var ye=S[ce],J=ye.n;T.symbolList.push(J,String(J),ce,J+100,String(J+100),ce+"-open"),T.symbolNames[J]=ce,T.symbolFuncs[J]=ye.f,T.symbolBackOffs[J]=ye.backoff||0,ye.needLine&&(T.symbolNeedLines[J]=!0),ye.noDot?T.symbolNoDot[J]=!0:T.symbolList.push(J+200,String(J+200),ce+"-dot",J+300,String(J+300),ce+"-open-dot"),ye.noFill&&(T.symbolNoFill[J]=!0)});var C=T.symbolNames.length;function P(ce,ye,J,ne){var de=ce%100;return T.symbolFuncs[de](ye,J,ne)+(ce>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}T.symbolNumber=function(ce){if(c(ce))ce=+ce;else if(typeof ce=="string"){var ye=0;ce.indexOf("-open")>0&&(ye=100,ce=ce.replace("-open","")),ce.indexOf("-dot")>0&&(ye+=200,ce=ce.replace("-dot","")),(ce=T.symbolNames.indexOf(ce))>=0&&(ce+=ye)}return ce%100>=C||ce>=400?0:Math.floor(Math.max(ce,0))};var D={x1:1,x2:0,y1:0,y2:0},O={x1:0,x2:0,y1:1,y2:0},R=s("~f"),F={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:D},horizontalreversed:{node:"linearGradient",attrs:D,reversed:!0},vertical:{node:"linearGradient",attrs:O},verticalreversed:{node:"linearGradient",attrs:O,reversed:!0}};T.gradient=function(ce,ye,J,ne,de,xe){for(var ue=de.length,ge=F[ne],be=new Array(ue),we=0;we=0&&ce.i===void 0&&(ce.i=xe.i),ye.style("opacity",ne.selectedOpacityFn?ne.selectedOpacityFn(ce):ce.mo===void 0?ue.opacity:ce.mo),ne.ms2mrc){var be;be=ce.ms==="various"||ue.size==="various"?3:ne.ms2mrc(ce.ms),ce.mrc=be,ne.selectedSizeFn&&(be=ce.mrc=ne.selectedSizeFn(ce));var we=T.symbolNumber(ce.mx||ue.symbol)||0;ce.om=we%200>=100;var ke=Me(ce,J),Ae=Y(ce,J);ye.attr("d",P(we,be,ke,Ae))}var Ee,De,Re,Ie=!1;if(ce.so)Re=ge.outlierwidth,De=ge.outliercolor,Ee=ue.outliercolor;else{var Be=(ge||{}).width;Re=(ce.mlw+1||Be+1||(ce.trace?(ce.trace.marker.line||{}).width:0)+1)-1||0,De="mlc"in ce?ce.mlcc=ne.lineScale(ce.mlc):f.isArrayOrTypedArray(ge.color)?p.defaultLine:ge.color,f.isArrayOrTypedArray(ue.color)&&(Ee=p.defaultLine,Ie=!0),Ee="mc"in ce?ce.mcc=ne.markerScale(ce.mc):ue.color||ue.colors||"rgba(0,0,0,0)",ne.selectedColorFn&&(Ee=ne.selectedColorFn(ce))}if(ce.om)ye.call(p.stroke,Ee).style({"stroke-width":(Re||1)+"px",fill:"none"});else{ye.style("stroke-width",(ce.isBlank?0:Re)+"px");var Ue=ue.gradient,qe=ce.mgt;qe?Ie=!0:qe=Ue&&Ue.type,f.isArrayOrTypedArray(qe)&&(qe=qe[0],F[qe]||(qe=0));var Ye=ue.pattern,at=Ye&&T.getPatternAttr(Ye.shape,ce.i,"");if(qe&&qe!=="none"){var lt=ce.mgc;lt?Ie=!0:lt=Ue.color;var ct=J.uid;Ie&&(ct+="-"+ce.i),T.gradient(ye,de,ct,qe,[[0,lt],[1,Ee]],"fill")}else if(at){var bt=!1,ze=Ye.fgcolor;!ze&&xe&&xe.color&&(ze=xe.color,bt=!0);var Ne=T.getPatternAttr(ze,ce.i,xe&&xe.color||null),Qe=T.getPatternAttr(Ye.bgcolor,ce.i,null),it=Ye.fgopacity,kt=T.getPatternAttr(Ye.size,ce.i,8),Je=T.getPatternAttr(Ye.solidity,ce.i,.3);bt=bt||ce.mcc||f.isArrayOrTypedArray(Ye.shape)||f.isArrayOrTypedArray(Ye.bgcolor)||f.isArrayOrTypedArray(Ye.fgcolor)||f.isArrayOrTypedArray(Ye.size)||f.isArrayOrTypedArray(Ye.solidity);var ut=J.uid;bt&&(ut+="-"+ce.i),T.pattern(ye,"point",de,ut,at,kt,Je,ce.mcc,Ye.fillmode,Qe,Ne,it)}else f.isArrayOrTypedArray(Ee)?p.fill(ye,Ee[ce.i]):p.fill(ye,Ee);Re&&p.stroke(ye,De)}},T.makePointStyleFns=function(ce){var ye={},J=ce.marker;return ye.markerScale=T.tryColorscale(J,""),ye.lineScale=T.tryColorscale(J,"line"),h.traceIs(ce,"symbols")&&(ye.ms2mrc=_.isBubble(ce)?w(ce):function(){return(J.size||6)/2}),ce.selectedpoints&&f.extendFlat(ye,T.makeSelectedPointStyleFns(ce)),ye},T.makeSelectedPointStyleFns=function(ce){var ye={},J=ce.selected||{},ne=ce.unselected||{},de=ce.marker||{},xe=J.marker||{},ue=ne.marker||{},ge=de.opacity,be=xe.opacity,we=ue.opacity,ke=be!==void 0,Ae=we!==void 0;(f.isArrayOrTypedArray(ge)||ke||Ae)&&(ye.selectedOpacityFn=function(at){var lt=at.mo===void 0?de.opacity:at.mo;return at.selected?ke?be:lt:Ae?we:x*lt});var Ee=de.color,De=xe.color,Re=ue.color;(De||Re)&&(ye.selectedColorFn=function(at){var lt=at.mcc||Ee;return at.selected?De||lt:Re||lt});var Ie=de.size,Be=xe.size,Ue=ue.size,qe=Be!==void 0,Ye=Ue!==void 0;return h.traceIs(ce,"symbols")&&(qe||Ye)&&(ye.selectedSizeFn=function(at){var lt=at.mrc||Ie/2;return at.selected?qe?Be/2:lt:Ye?Ue/2:lt}),ye},T.makeSelectedTextStyleFns=function(ce){var ye={},J=ce.selected||{},ne=ce.unselected||{},de=ce.textfont||{},xe=J.textfont||{},ue=ne.textfont||{},ge=de.color,be=xe.color,we=ue.color;return ye.selectedTextColorFn=function(ke){var Ae=ke.tc||ge;return ke.selected?be||Ae:we||(be?Ae:p.addOpacity(Ae,x))},ye},T.selectedPointStyle=function(ce,ye){if(ce.size()&&ye.selectedpoints){var J=T.makeSelectedPointStyleFns(ye),ne=ye.marker||{},de=[];J.selectedOpacityFn&&de.push(function(xe,ue){xe.style("opacity",J.selectedOpacityFn(ue))}),J.selectedColorFn&&de.push(function(xe,ue){p.fill(xe,J.selectedColorFn(ue))}),J.selectedSizeFn&&de.push(function(xe,ue){var ge=ue.mx||ne.symbol||0,be=J.selectedSizeFn(ue);xe.attr("d",P(T.symbolNumber(ge),be,Me(ue,ye),Y(ue,ye))),ue.mrc2=be}),de.length&&ce.each(function(xe){for(var ue=l.select(this),ge=0;ge0?J:0}function N(ce,ye,J){return J&&(ce=H(ce)),ye?W(ce[1]):E(ce[0])}function E(ce){var ye=l.round(ce,2);return A=ye,ye}function W(ce){var ye=l.round(ce,2);return z=ye,ye}function G(ce,ye,J,ne){var de=ce[0]-ye[0],xe=ce[1]-ye[1],ue=J[0]-ye[0],ge=J[1]-ye[1],be=Math.pow(de*de+xe*xe,.25),we=Math.pow(ue*ue+ge*ge,.25),ke=(we*we*de-be*be*ue)*ne,Ae=(we*we*xe-be*be*ge)*ne,Ee=3*we*(be+we),De=3*be*(be+we);return[[E(ye[0]+(Ee&&ke/Ee)),W(ye[1]+(Ee&&Ae/Ee))],[E(ye[0]-(De&&ke/De)),W(ye[1]-(De&&Ae/De))]]}T.textPointStyle=function(ce,ye,J){if(ce.size()){var ne;if(ye.selectedpoints){var de=T.makeSelectedTextStyleFns(ye);ne=de.selectedTextColorFn}var xe=ye.texttemplate,ue=J._fullLayout;ce.each(function(ge){var be=l.select(this),we=xe?f.extractOption(ge,ye,"txt","texttemplate"):f.extractOption(ge,ye,"tx","text");if(we||we===0){if(xe){var ke=ye._module.formatLabels,Ae=ke?ke(ge,ye,ue):{},Ee={};k(Ee,ye,ge.i);var De=ye._meta||{};we=f.texttemplateString(we,Ae,ue._d3locale,Ee,ge,De)}var Re=ge.tp||ye.textposition,Ie=j(ge,ye),Be=ne?ne(ge):ge.tc||ye.textfont.color;be.call(T.font,ge.tf||ye.textfont.family,Ie,Be).text(we).call(v.convertToTspans,J).call($,Re,Ie,ge.mrc)}else be.remove()})}},T.selectedTextStyle=function(ce,ye){if(ce.size()&&ye.selectedpoints){var J=T.makeSelectedTextStyleFns(ye);ce.each(function(ne){var de=l.select(this),xe=J.selectedTextColorFn(ne),ue=ne.tp||ye.textposition,ge=j(ne,ye);p.fill(de,xe);var be=h.traceIs(ye,"bar-like");$(de,ue,ge,ne.mrc2||ne.mrc,be)})}},T.smoothopen=function(ce,ye){if(ce.length<3)return"M"+ce.join("L");var J,ne="M"+ce[0],de=[];for(J=1;J=be||at>=ke&&at<=be)&&(lt<=Ae&<>=we||lt>=Ae&<<=we)&&(ce=[at,lt])}return ce}T.steps=function(ce){var ye=L[ce]||q;return function(J){for(var ne="M"+E(J[0][0])+","+W(J[0][1]),de=J.length,xe=1;xe=1e4&&(T.savedBBoxes={},V=0),J&&(T.savedBBoxes[J]=De),V++,f.extendFlat({},De)},T.setClipUrl=function(ce,ye,J){ce.attr("clip-path",ee(ye,J))},T.getTranslate=function(ce){var ye=(ce[ce.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(J,ne,de){return[ne,de].join(" ")}).split(" ");return{x:+ye[0]||0,y:+ye[1]||0}},T.setTranslate=function(ce,ye,J){var ne=ce.attr?"attr":"getAttribute",de=ce.attr?"attr":"setAttribute",xe=ce[ne]("transform")||"";return ye=ye||0,J=J||0,xe=xe.replace(/(\btranslate\(.*?\);?)/,"").trim(),xe=(xe+=y(ye,J)).trim(),ce[de]("transform",xe),xe},T.getScale=function(ce){var ye=(ce[ce.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(J,ne,de){return[ne,de].join(" ")}).split(" ");return{x:+ye[0]||1,y:+ye[1]||1}},T.setScale=function(ce,ye,J){var ne=ce.attr?"attr":"getAttribute",de=ce.attr?"attr":"setAttribute",xe=ce[ne]("transform")||"";return ye=ye||1,J=J||1,xe=xe.replace(/(\bscale\(.*?\);?)/,"").trim(),xe=(xe+="scale("+ye+","+J+")").trim(),ce[de]("transform",xe),xe};var U=/\s*sc.*/;T.setPointGroupScale=function(ce,ye,J){if(ye=ye||1,J=J||1,ce){var ne=ye===1&&J===1?"":"scale("+ye+","+J+")";ce.each(function(){var de=(this.getAttribute("transform")||"").replace(U,"");de=(de+=ne).trim(),this.setAttribute("transform",de)})}};var Q=/translate\([^)]*\)\s*$/;function Y(ce,ye){var J;return ce&&(J=ce.mf),J===void 0&&(J=ye.marker&&ye.marker.standoff||0),ye._geo||ye._xA?J:-J}T.setTextPointsScale=function(ce,ye,J){ce&&ce.each(function(){var ne,de=l.select(this),xe=de.select("text");if(xe.node()){var ue=parseFloat(xe.attr("x")||0),ge=parseFloat(xe.attr("y")||0),be=(de.attr("transform")||"").match(Q);ne=ye===1&&J===1?[]:[y(ue,ge),"scale("+ye+","+J+")",y(-ue,-ge)],be&&ne.push(be),de.attr("transform",ne.join(""))}})},T.getMarkerStandoff=Y;var Z,X,re,ie,le,se,pe=Math.atan2,Te=Math.cos,Se=Math.sin;function Oe(ce,ye){var J=ye[0],ne=ye[1];return[J*Te(ce)-ne*Se(ce),J*Se(ce)+ne*Te(ce)]}function Me(ce,ye){var J,ne,de=ce.ma;de===void 0&&(de=ye.marker.angle||0);var xe=ye.marker.angleref;if(xe==="previous"||xe==="north"){if(ye._geo){var ue=ye._geo.project(ce.lonlat);J=ue[0],ne=ue[1]}else{var ge=ye._xA,be=ye._yA;if(!ge||!be)return 90;J=ge.c2p(ce.x),ne=be.c2p(ce.y)}if(ye._geo){var we,ke=ce.lonlat[0],Ae=ce.lonlat[1],Ee=ye._geo.project([ke,Ae+1e-5]),De=ye._geo.project([ke+1e-5,Ae]),Re=pe(De[1]-ne,De[0]-J),Ie=pe(Ee[1]-ne,Ee[0]-J);if(xe==="north")we=de/180*Math.PI;else if(xe==="previous"){var Be=ke/180*Math.PI,Ue=Ae/180*Math.PI,qe=Z/180*Math.PI,Ye=X/180*Math.PI,at=qe-Be,lt=Te(Ye)*Se(at),ct=Se(Ye)*Te(Ue)-Te(Ye)*Se(Ue)*Te(at);we=-pe(lt,ct)-Math.PI,Z=ke,X=Ae}var bt=Oe(Re,[Te(we),0]),ze=Oe(Ie,[Se(we),0]);de=pe(bt[1]+ze[1],bt[0]+ze[0])/Math.PI*180,xe!=="previous"||se===ye.uid&&ce.i===le+1||(de=null)}if(xe==="previous"&&!ye._geo)if(se===ye.uid&&ce.i===le+1&&c(J)&&c(ne)){var Ne=J-re,Qe=ne-ie,it=ye.line&&ye.line.shape||"",kt=it.slice(it.length-1);kt==="h"&&(Qe=0),kt==="v"&&(Ne=0),de+=pe(Qe,Ne)/Math.PI*180+90}else de=null}return re=J,ie=ne,le=ce.i,se=ye.uid,de}T.getMarkerAngle=Me},90998:function(o,a,n){var l,f,s,c,d=n(95616),h=n(39898).round,p="M0,0Z",m=Math.sqrt(2),y=Math.sqrt(3),v=Math.PI,g=Math.cos,b=Math.sin;function x(w){return w===null}function _(w,k,T){if(!(w&&w%360!=0||k))return T;if(s===w&&c===k&&l===T)return f;function M(N,E){var W=g(N),G=b(N),L=E[0],q=E[1]+(k||0);return[L*W-q*G,L*G+q*W]}s=w,c=k,l=T;for(var S=w/180*v,C=0,P=0,D=d(T),O="",R=0;R0,b=d._context.staticPlot;h.each(function(x){var _,w=x[0].trace,k=w.error_x||{},T=w.error_y||{};w.ids&&(_=function(P){return P.id});var M=c.hasMarkers(w)&&w.marker.maxdisplayed>0;T.visible||k.visible||(x=[]);var S=l.select(this).selectAll("g.errorbar").data(x,_);if(S.exit().remove(),x.length){k.visible||S.selectAll("path.xerror").remove(),T.visible||S.selectAll("path.yerror").remove(),S.style("opacity",1);var C=S.enter().append("g").classed("errorbar",!0);g&&C.style("opacity",0).transition().duration(m.duration).style("opacity",1),s.setClipUrl(S,p.layerClipId,d),S.each(function(P){var D=l.select(this),O=function($,j,N){var E={x:j.c2p($.x),y:N.c2p($.y)};return $.yh!==void 0&&(E.yh=N.c2p($.yh),E.ys=N.c2p($.ys),f(E.ys)||(E.noYS=!0,E.ys=N.c2p($.ys,!0))),$.xh!==void 0&&(E.xh=j.c2p($.xh),E.xs=j.c2p($.xs),f(E.xs)||(E.noXS=!0,E.xs=j.c2p($.xs,!0))),E}(P,y,v);if(!M||P.vis){var R,F=D.select("path.yerror");if(T.visible&&f(O.x)&&f(O.yh)&&f(O.ys)){var A=T.width;R="M"+(O.x-A)+","+O.yh+"h"+2*A+"m-"+A+",0V"+O.ys,O.noYS||(R+="m-"+A+",0h"+2*A),F.size()?g&&(F=F.transition().duration(m.duration).ease(m.easing)):F=D.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("yerror",!0),F.attr("d",R)}else F.remove();var z=D.select("path.xerror");if(k.visible&&f(O.y)&&f(O.xh)&&f(O.xs)){var B=(k.copy_ystyle?T:k).width;R="M"+O.xh+","+(O.y-B)+"v"+2*B+"m0,-"+B+"H"+O.xs,O.noXS||(R+="m0,-"+B+"v"+2*B),z.size()?g&&(z=z.transition().duration(m.duration).ease(m.easing)):z=D.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("xerror",!0),z.attr("d",R)}else z.remove()}})}})}},62662:function(o,a,n){var l=n(39898),f=n(7901);o.exports=function(s){s.each(function(c){var d=c[0].trace,h=d.error_y||{},p=d.error_x||{},m=l.select(this);m.selectAll("path.yerror").style("stroke-width",h.thickness+"px").call(f.stroke,h.color),p.copy_ystyle&&(p=h),m.selectAll("path.xerror").style("stroke-width",p.thickness+"px").call(f.stroke,p.color)})}},77914:function(o,a,n){var l=n(41940),f=n(528).hoverlabel,s=n(1426).extendFlat;o.exports={hoverlabel:{bgcolor:s({},f.bgcolor,{arrayOk:!0}),bordercolor:s({},f.bordercolor,{arrayOk:!0}),font:l({arrayOk:!0,editType:"none"}),align:s({},f.align,{arrayOk:!0}),namelength:s({},f.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(o,a,n){var l=n(71828),f=n(73972);function s(c,d,h,p){p=p||l.identity,Array.isArray(c)&&(d[0][h]=p(c))}o.exports=function(c){var d=c.calcdata,h=c._fullLayout;function p(b){return function(x){return l.coerceHoverinfo({hoverinfo:x},{_module:b._module},h)}}for(var m=0;m=0&&y.indexde[0]._length||pt<0||pt>xe[0]._length)return b.unhoverRaw(ie,le)}else ut="xpx"in le?le.xpx:de[0]._length/2,pt="ypx"in le?le.ypx:xe[0]._length/2;if(le.pointerX=ut+de[0]._offset,le.pointerY=pt+xe[0]._offset,De="xval"in le?w.flat(Se,le.xval):w.p2c(de,ut),Re="yval"in le?w.flat(Se,le.yval):w.p2c(xe,pt),!f(De[0])||!f(Re[0]))return c.warn("Fx.hover failed",le,ie),b.unhoverRaw(ie,le)}var zt=1/0;function wt(Zt,pn){for(Be=0;BeNe&&(Qe.splice(0,Ne),zt=Qe[0].distance),ye&&Ee!==0&&Qe.length===0){ze.distance=Ee,ze.index=!1;var Dn=qe._module.hoverPoints(ze,ct,bt,"closest",{hoverLayer:Oe._hoverlayer});if(Dn&&(Dn=Dn.filter(function(lr){return lr.spikeDistance<=Ee})),Dn&&Dn.length){var wn,En=Dn.filter(function(lr){return lr.xa.showspikes&&lr.xa.spikesnap!=="hovered data"});if(En.length){var tr=En[0];f(tr.x0)&&f(tr.y0)&&(wn=_e(tr),(!kt.vLinePoint||kt.vLinePoint.spikeDistance>wn.spikeDistance)&&(kt.vLinePoint=wn))}var oa=Dn.filter(function(lr){return lr.ya.showspikes&&lr.ya.spikesnap!=="hovered data"});if(oa.length){var da=oa[0];f(da.x0)&&f(da.y0)&&(wn=_e(da),(!kt.hLinePoint||kt.hLinePoint.spikeDistance>wn.spikeDistance)&&(kt.hLinePoint=wn))}}}}}function ve(Zt,pn,nn){for(var Kt,On=null,Tn=1/0,Dn=0;Dn0&&Math.abs(Zt.distance)Ft-1;Vt--)gt(Qe[Vt]);Qe=St,Ze()}var ht=ie._hoverdata,yt=[],qt=te(ie),Et=ee(ie);for(Ie=0;Ie1||Qe.length>1)||ke==="closest"&&Je&&Qe.length>1,cn=g.combine(Oe.plot_bgcolor||g.background,Oe.paper_bgcolor),ln=j(Qe,{gd:ie,hovermode:ke,rotateLabels:tn,bgColor:cn,container:Oe._hoverlayer,outerContainer:Oe._paper.node(),commonLabelOpts:Oe.hoverlabel,hoverdistance:Oe.hoverdistance}),an=ln.hoverLabels;if(w.isUnifiedHover(ke)||(function(Zt,pn,nn,Kt){var On,Tn,Dn,wn,En,tr,oa,da=pn?"xa":"ya",lr=pn?"ya":"xa",ti=0,Ar=1,ur=Zt.size(),kr=new Array(ur),la=0,An=Kt.minX,on=Kt.maxX,$n=Kt.minY,Pr=Kt.maxY,Ln=function(kn){return kn*nn._invScaleX},Bn=function(kn){return kn*nn._invScaleY};function jn(kn){var Dr=kn[0],Aa=kn[kn.length-1];if(Tn=Dr.pmin-Dr.pos-Dr.dp+Dr.size,Dn=Aa.pos+Aa.dp+Aa.size-Dr.pmax,Tn>.01){for(En=kn.length-1;En>=0;En--)kn[En].dp+=Tn;On=!1}if(!(Dn<.01)){if(Tn<-.01){for(En=kn.length-1;En>=0;En--)kn[En].dp-=Dn;On=!1}if(On){var Br=0;for(wn=0;wnDr.pmax&&Br++;for(wn=kn.length-1;wn>=0&&!(Br<=0);wn--)(tr=kn[wn]).pos>Dr.pmax-1&&(tr.del=!0,Br--);for(wn=0;wn=0;En--)kn[En].dp-=Dn;for(wn=kn.length-1;wn>=0&&!(Br<=0);wn--)(tr=kn[wn]).pos+tr.dp+tr.size>Dr.pmax&&(tr.del=!0,Br--)}}}for(Zt.each(function(kn){var Dr=kn[da],Aa=kn[lr],Br=Dr._id.charAt(0)==="x",Fi=Dr.range;la===0&&Fi&&Fi[0]>Fi[1]!==Br&&(Ar=-1);var Ni=0,mi=Br?nn.width:nn.height;if(nn.hovermode==="x"||nn.hovermode==="y"){var ni,Ga,vi=E(kn,pn),us=kn.anchor,nl=us==="end"?-1:1;if(us==="middle")Ga=(ni=kn.crossPos+(Br?Bn(vi.y-kn.by/2):Ln(kn.bx/2+kn.tx2width/2)))+(Br?Bn(kn.by):Ln(kn.bx));else if(Br)Ga=(ni=kn.crossPos+Bn(R+vi.y)-Bn(kn.by/2-R))+Bn(kn.by);else{var cs=Ln(nl*R+vi.x),oo=cs+Ln(nl*kn.bx);ni=kn.crossPos+Math.min(cs,oo),Ga=kn.crossPos+Math.max(cs,oo)}Br?$n!==void 0&&Pr!==void 0&&Math.min(Ga,Pr)-Math.max(ni,$n)>1&&(Aa.side==="left"?(Ni=Aa._mainLinePosition,mi=nn.width):mi=Aa._mainLinePosition):An!==void 0&&on!==void 0&&Math.min(Ga,on)-Math.max(ni,An)>1&&(Aa.side==="top"?(Ni=Aa._mainLinePosition,mi=nn.height):mi=Aa._mainLinePosition)}kr[la++]=[{datum:kn,traceIndex:kn.trace.index,dp:0,pos:kn.pos,posref:kn.posref,size:kn.by*(Br?P:1)/2,pmin:Ni,pmax:mi}]}),kr.sort(function(kn,Dr){return kn[0].posref-Dr[0].posref||Ar*(Dr[0].traceIndex-kn[0].traceIndex)});!On&&ti<=ur;){for(ti++,On=!0,wn=0;wn.01&&xr.pmin===Mr.pmin&&xr.pmax===Mr.pmax){for(En=Lr.length-1;En>=0;En--)Lr[En].dp+=Tn;for(Un.push.apply(Un,Lr),kr.splice(wn+1,1),oa=0,En=Un.length-1;En>=0;En--)oa+=Un[En].dp;for(Dn=oa/Un.length,En=Un.length-1;En>=0;En--)Un[En].dp-=Dn;On=!1}else wn++}kr.forEach(jn)}for(wn=kr.length-1;wn>=0;wn--){var Na=kr[wn];for(En=Na.length-1;En>=0;En--){var wa=Na[En],sa=wa.datum;sa.offset=wa.dp,sa.del=wa.del}}}(an,tn,Oe,ln.commonLabelBoundingBox),W(an,tn,Oe._invScaleX,Oe._invScaleY)),Te&&Te.tagName){var sn=_.getComponentMethod("annotations","hasClickToShow")(ie,yt);y(l.select(Te),sn?"pointer":"")}Te&&!pe&&function(Zt,pn,nn){if(!nn||nn.length!==Zt._hoverdata.length)return!0;for(var Kt=nn.length-1;Kt>=0;Kt--){var On=nn[Kt],Tn=Zt._hoverdata[Kt];if(On.curveNumber!==Tn.curveNumber||String(On.pointNumber)!==String(Tn.pointNumber)||String(On.pointNumbers)!==String(Tn.pointNumbers))return!0}return!1}(ie,0,ht)&&(ht&&ie.emit("plotly_unhover",{event:le,points:ht}),ie.emit("plotly_hover",{event:le,points:ie._hoverdata,xaxes:de,yaxes:xe,xvals:De,yvals:Re}))})(Q,Y,Z,X,re)})},a.loneHover=function(Q,Y){var Z=!0;Array.isArray(Q)||(Z=!1,Q=[Q]);var X=Y.gd,re=te(X),ie=ee(X),le=j(Q.map(function(Te){var Se=Te._x0||Te.x0||Te.x||0,Oe=Te._x1||Te.x1||Te.x||0,Me=Te._y0||Te.y0||Te.y||0,ce=Te._y1||Te.y1||Te.y||0,ye=Te.eventData;if(ye){var J=Math.min(Se,Oe),ne=Math.max(Se,Oe),de=Math.min(Me,ce),xe=Math.max(Me,ce),ue=Te.trace;if(_.traceIs(ue,"gl3d")){var ge=X._fullLayout[ue.scene]._scene.container,be=ge.offsetLeft,we=ge.offsetTop;J+=be,ne+=be,de+=we,xe+=we}ye.bbox={x0:J+ie,x1:ne+ie,y0:de+re,y1:xe+re},Y.inOut_bbox&&Y.inOut_bbox.push(ye.bbox)}else ye=!1;return{color:Te.color||g.defaultLine,x0:Te.x0||Te.x||0,x1:Te.x1||Te.x||0,y0:Te.y0||Te.y||0,y1:Te.y1||Te.y||0,xLabel:Te.xLabel,yLabel:Te.yLabel,zLabel:Te.zLabel,text:Te.text,name:Te.name,idealAlign:Te.idealAlign,borderColor:Te.borderColor,fontFamily:Te.fontFamily,fontSize:Te.fontSize,fontColor:Te.fontColor,nameLength:Te.nameLength,textAlign:Te.textAlign,trace:Te.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Te.hovertemplate||!1,hovertemplateLabels:Te.hovertemplateLabels||!1,eventData:ye}}),{gd:X,hovermode:"closest",rotateLabels:!1,bgColor:Y.bgColor||g.background,container:l.select(Y.container),outerContainer:Y.outerContainer||Y.container}).hoverLabels,se=0,pe=0;return le.sort(function(Te,Se){return Te.y0-Se.y0}).each(function(Te,Se){var Oe=Te.y0-Te.by/2;Te.offset=Oe-5([\s\S]*)<\/extra>/;function j(Q,Y){var Z=Y.gd,X=Z._fullLayout,re=Y.hovermode,ie=Y.rotateLabels,le=Y.bgColor,se=Y.container,pe=Y.outerContainer,Te=Y.commonLabelOpts||{};if(Q.length===0)return[[]];var Se=Y.fontFamily||k.HOVERFONT,Oe=Y.fontSize||k.HOVERFONTSIZE,Me=Q[0],ce=Me.xa,ye=Me.ya,J=re.charAt(0),ne=J+"Label",de=Me[ne];if(de===void 0&&ce.type==="multicategory")for(var xe=0;xeX.width-jt?(ht=X.width-jt,Ft.attr("d","M"+(jt-R)+",0L"+jt+","+Et+R+"v"+Et+(2*F+qt.height)+"H-"+jt+"V"+Et+R+"H"+(jt-2*R)+"Z")):Ft.attr("d","M0,0L"+R+","+Et+R+"H"+jt+"v"+Et+(2*F+qt.height)+"H-"+jt+"V"+Et+R+"H-"+R+"Z"),Be.minX=ht-jt,Be.maxX=ht+jt,ce.side==="top"?(Be.minY=yt-(2*F+qt.height),Be.maxY=yt-F):(Be.minY=yt+F,Be.maxY=yt+(2*F+qt.height))}else{var Tt,Ot,At;ye.side==="right"?(Tt="start",Ot=1,At="",ht=ce._offset+ce._length):(Tt="end",Ot=-1,At="-",ht=ce._offset),yt=ye._offset+(Me.y0+Me.y1)/2,Vt.attr("text-anchor",Tt),Ft.attr("d","M0,0L"+At+R+","+R+"V"+(F+qt.height/2)+"h"+At+(2*F+qt.width)+"V-"+(F+qt.height/2)+"H"+At+R+"V-"+R+"Z"),Be.minY=yt-(F+qt.height/2),Be.maxY=yt+(F+qt.height/2),ye.side==="right"?(Be.minX=ht+R,Be.maxX=ht+R+(2*F+qt.width)):(Be.minX=ht-R-(2*F+qt.width),Be.maxX=ht-R);var Lt,Rt=qt.height/2,$t=ge-qt.top-Rt,Yt="clip"+X._uid+"commonlabel"+ye._id;if(ht=0?pt:It+wt=0?It:nt+wt=0?Je:ut+ve=0?ut:st+ve=0,tt.idealAlign!=="top"&&tn||!cn?tn?(Rt+=Yt/2,tt.anchor="start"):tt.anchor="middle":(Rt-=Yt/2,tt.anchor="end"),tt.crossPos=Rt;else{if(tt.pos=Rt,tn=Lt+$t/2+ln<=be,cn=Lt-$t/2-ln>=0,tt.idealAlign!=="left"&&tn||!cn)if(tn)Lt+=$t/2,tt.anchor="start";else{tt.anchor="middle";var an=ln/2,sn=Lt+an-be,Zt=Lt-an;sn>0&&(Lt-=sn),Zt<0&&(Lt+=-Zt)}else Lt-=$t/2,tt.anchor="end";tt.crossPos=Lt}Et.attr("text-anchor",tt.anchor),Tt&&jt.attr("text-anchor",tt.anchor),Ft.attr("transform",d(Lt,Rt)+(ie?h(S):""))}),{hoverLabels:mt,commonLabelBoundingBox:Be}}function N(Q,Y,Z,X,re,ie){var le="",se="";Q.nameOverride!==void 0&&(Q.name=Q.nameOverride),Q.name&&(Q.trace._meta&&(Q.name=c.templateString(Q.name,Q.trace._meta)),le=H(Q.name,Q.nameLength));var pe=Z.charAt(0),Te=pe==="x"?"y":"x";Q.zLabel!==void 0?(Q.xLabel!==void 0&&(se+="x: "+Q.xLabel+"
"),Q.yLabel!==void 0&&(se+="y: "+Q.yLabel+"
"),Q.trace.type!=="choropleth"&&Q.trace.type!=="choroplethmapbox"&&(se+=(se?"z: ":"")+Q.zLabel)):Y&&Q[pe+"Label"]===re?se=Q[Te+"Label"]||"":Q.xLabel===void 0?Q.yLabel!==void 0&&Q.trace.type!=="scattercarpet"&&(se=Q.yLabel):se=Q.yLabel===void 0?Q.xLabel:"("+Q.xLabel+", "+Q.yLabel+")",!Q.text&&Q.text!==0||Array.isArray(Q.text)||(se+=(se?"
":"")+Q.text),Q.extraText!==void 0&&(se+=(se?"
":"")+Q.extraText),ie&&se===""&&!Q.hovertemplate&&(le===""&&ie.remove(),se=le);var Se=Q.hovertemplate||!1;if(Se){var Oe=Q.hovertemplateLabels||Q;Q[pe+"Label"]!==re&&(Oe[pe+"other"]=Oe[pe+"Val"],Oe[pe+"otherLabel"]=Oe[pe+"Label"]),se=(se=c.hovertemplateString(Se,Oe,X._d3locale,Q.eventData[0]||{},Q.trace._meta)).replace($,function(Me,ce){return le=H(ce,Q.nameLength),""})}return[se,le]}function E(Q,Y){var Z=0,X=Q.offset;return Y&&(X*=-O,Z=Q.offset*D),{x:Z,y:X}}function W(Q,Y,Z,X){var re=function(le){return le*Z},ie=function(le){return le*X};Q.each(function(le){var se=l.select(this);if(le.del)return se.remove();var pe,Te,Se,Oe,Me=se.select("text.nums"),ce=le.anchor,ye=ce==="end"?-1:1,J=(Oe=(Se=(Te={start:1,end:-1,middle:0}[(pe=le).anchor])*(R+F))+Te*(pe.txwidth+F),pe.anchor==="middle"&&(Se-=pe.tx2width/2,Oe+=pe.txwidth/2+F),{alignShift:Te,textShiftX:Se,text2ShiftX:Oe}),ne=E(le,Y),de=ne.x,xe=ne.y,ue=ce==="middle";se.select("path").attr("d",ue?"M-"+re(le.bx/2+le.tx2width/2)+","+ie(xe-le.by/2)+"h"+re(le.bx)+"v"+ie(le.by)+"h-"+re(le.bx)+"Z":"M0,0L"+re(ye*R+de)+","+ie(R+xe)+"v"+ie(le.by/2-R)+"h"+re(ye*le.bx)+"v-"+ie(le.by)+"H"+re(ye*R+de)+"V"+ie(xe-R)+"Z");var ge=de+J.textShiftX,be=xe+le.ty0-le.by/2+F,we=le.textAlign||"auto";we!=="auto"&&(we==="left"&&ce!=="start"?(Me.attr("text-anchor","start"),ge=ue?-le.bx/2-le.tx2width/2+F:-le.bx-F):we==="right"&&ce!=="end"&&(Me.attr("text-anchor","end"),ge=ue?le.bx/2-le.tx2width/2-F:le.bx+F)),Me.call(m.positionText,re(ge),ie(be)),le.tx2width&&(se.select("text.name").call(m.positionText,re(J.text2ShiftX+J.alignShift*F+de),ie(xe+le.ty0-le.by/2+F)),se.select("rect").call(v.setRect,re(J.text2ShiftX+(J.alignShift-1)*le.tx2width/2+de),ie(xe-le.by/2-1),re(le.tx2width),ie(le.by+2)))})}function G(Q,Y){var Z=Q.index,X=Q.trace||{},re=Q.cd[0],ie=Q.cd[Z]||{};function le(Me){return Me||f(Me)&&Me===0}var se=Array.isArray(Z)?function(Me,ce){var ye=c.castOption(re,Z,Me);return le(ye)?ye:c.extractOption({},X,"",ce)}:function(Me,ce){return c.extractOption(ie,X,Me,ce)};function pe(Me,ce,ye){var J=se(ce,ye);le(J)&&(Q[Me]=J)}if(pe("hoverinfo","hi","hoverinfo"),pe("bgcolor","hbg","hoverlabel.bgcolor"),pe("borderColor","hbc","hoverlabel.bordercolor"),pe("fontFamily","htf","hoverlabel.font.family"),pe("fontSize","hts","hoverlabel.font.size"),pe("fontColor","htc","hoverlabel.font.color"),pe("nameLength","hnl","hoverlabel.namelength"),pe("textAlign","hta","hoverlabel.align"),Q.posref=Y==="y"||Y==="closest"&&X.orientation==="h"?Q.xa._offset+(Q.x0+Q.x1)/2:Q.ya._offset+(Q.y0+Q.y1)/2,Q.x0=c.constrain(Q.x0,0,Q.xa._length),Q.x1=c.constrain(Q.x1,0,Q.xa._length),Q.y0=c.constrain(Q.y0,0,Q.ya._length),Q.y1=c.constrain(Q.y1,0,Q.ya._length),Q.xLabelVal!==void 0&&(Q.xLabel="xLabel"in Q?Q.xLabel:x.hoverLabelText(Q.xa,Q.xLabelVal,X.xhoverformat),Q.xVal=Q.xa.c2d(Q.xLabelVal)),Q.yLabelVal!==void 0&&(Q.yLabel="yLabel"in Q?Q.yLabel:x.hoverLabelText(Q.ya,Q.yLabelVal,X.yhoverformat),Q.yVal=Q.ya.c2d(Q.yLabelVal)),Q.zLabelVal!==void 0&&Q.zLabel===void 0&&(Q.zLabel=String(Q.zLabelVal)),!(isNaN(Q.xerr)||Q.xa.type==="log"&&Q.xerr<=0)){var Te=x.tickText(Q.xa,Q.xa.c2l(Q.xerr),"hover").text;Q.xerrneg!==void 0?Q.xLabel+=" +"+Te+" / -"+x.tickText(Q.xa,Q.xa.c2l(Q.xerrneg),"hover").text:Q.xLabel+=" ± "+Te,Y==="x"&&(Q.distance+=1)}if(!(isNaN(Q.yerr)||Q.ya.type==="log"&&Q.yerr<=0)){var Se=x.tickText(Q.ya,Q.ya.c2l(Q.yerr),"hover").text;Q.yerrneg!==void 0?Q.yLabel+=" +"+Se+" / -"+x.tickText(Q.ya,Q.ya.c2l(Q.yerrneg),"hover").text:Q.yLabel+=" ± "+Se,Y==="y"&&(Q.distance+=1)}var Oe=Q.hoverinfo||Q.trace.hoverinfo;return Oe&&Oe!=="all"&&((Oe=Array.isArray(Oe)?Oe:Oe.split("+")).indexOf("x")===-1&&(Q.xLabel=void 0),Oe.indexOf("y")===-1&&(Q.yLabel=void 0),Oe.indexOf("z")===-1&&(Q.zLabel=void 0),Oe.indexOf("text")===-1&&(Q.text=void 0),Oe.indexOf("name")===-1&&(Q.name=void 0)),Q}function L(Q,Y,Z){var X,re,ie=Z.container,le=Z.fullLayout,se=le._size,pe=Z.event,Te=!!Y.hLinePoint,Se=!!Y.vLinePoint;if(ie.selectAll(".spikeline").remove(),Se||Te){var Oe=g.combine(le.plot_bgcolor,le.paper_bgcolor);if(Te){var Me,ce,ye=Y.hLinePoint;X=ye&&ye.xa,(re=ye&&ye.ya).spikesnap==="cursor"?(Me=pe.pointerX,ce=pe.pointerY):(Me=X._offset+ye.x,ce=re._offset+ye.y);var J,ne,de=s.readability(ye.color,Oe)<1.5?g.contrast(Oe):ye.color,xe=re.spikemode,ue=re.spikethickness,ge=re.spikecolor||de,be=x.getPxPosition(Q,re);if(xe.indexOf("toaxis")!==-1||xe.indexOf("across")!==-1){if(xe.indexOf("toaxis")!==-1&&(J=be,ne=Me),xe.indexOf("across")!==-1){var we=re._counterDomainMin,ke=re._counterDomainMax;re.anchor==="free"&&(we=Math.min(we,re.position),ke=Math.max(ke,re.position)),J=se.l+we*se.w,ne=se.l+ke*se.w}ie.insert("line",":first-child").attr({x1:J,x2:ne,y1:ce,y2:ce,"stroke-width":ue,stroke:ge,"stroke-dasharray":v.dashStyle(re.spikedash,ue)}).classed("spikeline",!0).classed("crisp",!0),ie.insert("line",":first-child").attr({x1:J,x2:ne,y1:ce,y2:ce,"stroke-width":ue+2,stroke:Oe}).classed("spikeline",!0).classed("crisp",!0)}xe.indexOf("marker")!==-1&&ie.insert("circle",":first-child").attr({cx:be+(re.side!=="right"?ue:-ue),cy:ce,r:ue,fill:ge}).classed("spikeline",!0)}if(Se){var Ae,Ee,De=Y.vLinePoint;X=De&&De.xa,re=De&&De.ya,X.spikesnap==="cursor"?(Ae=pe.pointerX,Ee=pe.pointerY):(Ae=X._offset+De.x,Ee=re._offset+De.y);var Re,Ie,Be=s.readability(De.color,Oe)<1.5?g.contrast(Oe):De.color,Ue=X.spikemode,qe=X.spikethickness,Ye=X.spikecolor||Be,at=x.getPxPosition(Q,X);if(Ue.indexOf("toaxis")!==-1||Ue.indexOf("across")!==-1){if(Ue.indexOf("toaxis")!==-1&&(Re=at,Ie=Ee),Ue.indexOf("across")!==-1){var lt=X._counterDomainMin,ct=X._counterDomainMax;X.anchor==="free"&&(lt=Math.min(lt,X.position),ct=Math.max(ct,X.position)),Re=se.t+(1-ct)*se.h,Ie=se.t+(1-lt)*se.h}ie.insert("line",":first-child").attr({x1:Ae,x2:Ae,y1:Re,y2:Ie,"stroke-width":qe,stroke:Ye,"stroke-dasharray":v.dashStyle(X.spikedash,qe)}).classed("spikeline",!0).classed("crisp",!0),ie.insert("line",":first-child").attr({x1:Ae,x2:Ae,y1:Re,y2:Ie,"stroke-width":qe+2,stroke:Oe}).classed("spikeline",!0).classed("crisp",!0)}Ue.indexOf("marker")!==-1&&ie.insert("circle",":first-child").attr({cx:Ae,cy:at-(X.side!=="top"?qe:-qe),r:qe,fill:Ye}).classed("spikeline",!0)}}}function q(Q,Y){return!Y}function H(Q,Y){return m.plainText(Q||"",{len:Y,allowedTags:["br","sub","sup","b","i","em"]})}function V(Q,Y,Z){var X=Y[Q+"a"],re=Y[Q+"Val"],ie=Y.cd[0];if(X.type==="category"||X.type==="multicategory")re=X._categoriesMap[re];else if(X.type==="date"){var le=Y.trace[Q+"periodalignment"];if(le){var se=Y.cd[Y.index],pe=se[Q+"Start"];pe===void 0&&(pe=se[Q]);var Te=se[Q+"End"];Te===void 0&&(Te=se[Q]);var Se=Te-pe;le==="end"?re+=Se:le==="middle"&&(re+=Se/2)}re=X.d2c(re)}return ie&&ie.t&&ie.t.posLetter===X._id&&(Z.boxmode!=="group"&&Z.violinmode!=="group"||(re+=ie.t.dPos)),re}function te(Q){return Q.offsetTop+Q.clientTop}function ee(Q){return Q.offsetLeft+Q.clientLeft}function U(Q,Y){var Z=Q._fullLayout,X=Y.getBoundingClientRect(),re=X.left,ie=X.top,le=re+X.width,se=ie+X.height,pe=c.apply3DTransform(Z._invTransform)(re,ie),Te=c.apply3DTransform(Z._invTransform)(le,se),Se=pe[0],Oe=pe[1],Me=Te[0],ce=Te[1];return{x:Se,y:Oe,width:Me-Se,height:ce-Oe,top:Math.min(Oe,ce),left:Math.min(Se,Me),right:Math.max(Se,Me),bottom:Math.max(Oe,ce)}}},38048:function(o,a,n){var l=n(71828),f=n(7901),s=n(23469).isUnifiedHover;o.exports=function(c,d,h,p){p=p||{};var m=d.legend;function y(v){p.font[v]||(p.font[v]=m?d.legend.font[v]:d.font[v])}d&&s(d.hovermode)&&(p.font||(p.font={}),y("size"),y("family"),y("color"),m?(p.bgcolor||(p.bgcolor=f.combine(d.legend.bgcolor,d.paper_bgcolor)),p.bordercolor||(p.bordercolor=d.legend.bordercolor)):p.bgcolor||(p.bgcolor=d.paper_bgcolor)),h("hoverlabel.bgcolor",p.bgcolor),h("hoverlabel.bordercolor",p.bordercolor),h("hoverlabel.namelength",p.namelength),l.coerceFont(h,"hoverlabel.font",p.font),h("hoverlabel.align",p.align)}},98212:function(o,a,n){var l=n(71828),f=n(528);o.exports=function(s,c){function d(h,p){return c[h]!==void 0?c[h]:l.coerce(s,c,f,h,p)}return d("clickmode"),d("hovermode")}},30211:function(o,a,n){var l=n(39898),f=n(71828),s=n(28569),c=n(23469),d=n(528),h=n(88335);o.exports={moduleType:"component",name:"fx",constants:n(26675),schema:{layout:d},attributes:n(77914),layoutAttributes:d,supplyLayoutGlobalDefaults:n(22774),supplyDefaults:n(54268),supplyLayoutDefaults:n(34938),calc:n(30732),getDistanceFunction:c.getDistanceFunction,getClosest:c.getClosest,inbox:c.inbox,quadrature:c.quadrature,appendArrayPointValue:c.appendArrayPointValue,castHoverOption:function(p,m,y){return f.castOption(p,m,"hoverlabel."+y)},castHoverinfo:function(p,m,y){return f.castOption(p,y,"hoverinfo",function(v){return f.coerceHoverinfo({hoverinfo:v},{_module:p._module},m)})},hover:h.hover,unhover:s.unhover,loneHover:h.loneHover,loneUnhover:function(p){var m=f.isD3Selection(p)?p:l.select(p);m.selectAll("g.hovertext").remove(),m.selectAll(".spikeline").remove()},click:n(75914)}},528:function(o,a,n){var l=n(26675),f=n(41940),s=f({editType:"none"});s.family.dflt=l.HOVERFONT,s.size.dflt=l.HOVERFONTSIZE,o.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:s,grouptitlefont:f({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},34938:function(o,a,n){var l=n(71828),f=n(528),s=n(98212),c=n(38048);o.exports=function(d,h){function p(g,b){return l.coerce(d,h,f,g,b)}s(d,h)&&(p("hoverdistance"),p("spikedistance")),p("dragmode")==="select"&&p("selectdirection");var m=h._has("mapbox"),y=h._has("geo"),v=h._basePlotModules.length;h.dragmode==="zoom"&&((m||y)&&v===1||m&&y&&v===2)&&(h.dragmode="pan"),c(d,h,p),l.coerceFont(p,"hoverlabel.grouptitlefont",h.hoverlabel.font)}},22774:function(o,a,n){var l=n(71828),f=n(38048),s=n(528);o.exports=function(c,d){f(c,d,function(h,p){return l.coerce(c,d,s,h,p)})}},83312:function(o,a,n){var l=n(71828),f=n(30587).counter,s=n(27670).Y,c=n(85555).idRegex,d=n(44467),h={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[f("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:s({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function p(v,g,b){var x=g[b+"axes"],_=Object.keys((v._splomAxes||{})[b]||{});return Array.isArray(x)?x:_.length?_:void 0}function m(v,g,b,x,_,w){var k=g(v+"gap",b),T=g("domain."+v);g(v+"side",x);for(var M=new Array(_),S=T[0],C=(T[1]-S)/(_-k),P=C*(1-k),D=0;D<_;D++){var O=S+C*D;M[w?_-1-D:D]=[O,O+P]}return M}function y(v,g,b,x,_){var w,k=new Array(b);function T(M,S){g.indexOf(S)!==-1&&x[S]===void 0?(k[M]=S,x[S]=M):k[M]=""}if(Array.isArray(v))for(w=0;w1){T||M||S||$("pattern")==="independent"&&(T=!0),P._hasSubplotGrid=T;var R,F,A=$("roworder")==="top to bottom",z=T?.2:.1,B=T?.3:.1;C&&g._splomGridDflt&&(R=g._splomGridDflt.xside,F=g._splomGridDflt.yside),P._domains={x:m("x",$,z,R,O),y:m("y",$,B,F,D,A)}}else delete g.grid}function $(j,N){return l.coerce(b,P,h,j,N)}},contentDefaults:function(v,g){var b=g.grid;if(b&&b._domains){var x,_,w,k,T,M,S,C=v.grid||{},P=g._subplots,D=b._hasSubplotGrid,O=b.rows,R=b.columns,F=b.pattern==="independent",A=b._axisMap={};if(D){var z=C.subplots||[];M=b.subplots=new Array(O);var B=1;for(x=0;x(y==="legend"?1:0));if(B===!1&&(g[y]=void 0),(B!==!1||x.uirevision)&&(w("uirevision",g.uirevision),B!==!1)){w("borderwidth");var $,j,N,E=w("orientation")==="h",W=w("yref")==="paper",G=w("xref")==="paper",L="left";if(E?($=0,l.getComponentMethod("rangeslider","isVisible")(v.xaxis)?W?(j=1.1,N="bottom"):(j=1,N="top"):W?(j=-.1,N="top"):(j=0,N="bottom")):(j=1,N="auto",G?$=1.02:($=1,L="right")),f.coerce(x,_,{x:{valType:"number",editType:"legend",min:G?-2:0,max:G?3:1,dflt:$}},"x"),f.coerce(x,_,{y:{valType:"number",editType:"legend",min:W?-2:0,max:W?3:1,dflt:j}},"y"),w("traceorder",O),p.isGrouped(g[y])&&w("tracegroupgap"),w("entrywidth"),w("entrywidthmode"),w("itemsizing"),w("itemwidth"),w("itemclick"),w("itemdoubleclick"),w("groupclick"),w("xanchor",L),w("yanchor",N),w("valign"),f.noneOrAll(x,_,["x","y"]),w("title.text")){w("title.side",E?"left":"top");var q=f.extendFlat({},k,{size:f.bigFont(k.size)});f.coerceFont(w,"title.font",q)}}}}o.exports=function(y,v,g){var b,x=g.slice(),_=v.shapes;if(_)for(b=0;b<_.length;b++){var w=_[b];if(w.showlegend){var k={_input:w._input,visible:w.visible,showlegend:w.showlegend,legend:w.legend};x.push(k)}}var T=["legend"];for(b=0;b1)}var X=q.hiddenlabels||[];if(!(V||q.showlegend&&te.length))return G.selectAll("."+H).remove(),q._topdefs.select("#"+W).remove(),s.autoMargin(N,H);var re=f.ensureSingle(G,"g",H,function(ce){V||ce.attr("pointer-events","all")}),ie=f.ensureSingleById(q._topdefs,"clipPath",W,function(ce){ce.append("rect")}),le=f.ensureSingle(re,"rect","bg",function(ce){ce.attr("shape-rendering","crispEdges")});le.call(m.stroke,L.bordercolor).call(m.fill,L.bgcolor).style("stroke-width",L.borderwidth+"px");var se,pe=f.ensureSingle(re,"g","scrollbox"),Te=L.title;L._titleWidth=0,L._titleHeight=0,Te.text?((se=f.ensureSingle(pe,"text",H+"titletext")).attr("text-anchor","start").call(p.font,Te.font).text(Te.text),z(se,pe,N,L,S)):pe.selectAll("."+H+"titletext").remove();var Se=f.ensureSingle(re,"rect","scrollbar",function(ce){ce.attr(g.scrollBarEnterAttrs).call(m.fill,g.scrollBarColor)}),Oe=pe.selectAll("g.groups").data(te);Oe.enter().append("g").attr("class","groups"),Oe.exit().remove();var Me=Oe.selectAll("g.traces").data(f.identity);Me.enter().append("g").attr("class","traces"),Me.exit().remove(),Me.style("opacity",function(ce){var ye=ce[0].trace;return c.traceIs(ye,"pie-like")?X.indexOf(ce[0].label)!==-1?.5:1:ye.visible==="legendonly"?.5:1}).each(function(){l.select(this).call(R,N,L)}).call(T,N,L).each(function(){V||l.select(this).call(A,N,H)}),f.syncOrAsync([s.previousPromises,function(){return function(ce,ye,J,ne){var de=ce._fullLayout,xe=j(ne);ne||(ne=de[xe]);var ue=de._size,ge=M.isVertical(ne),be=M.isGrouped(ne),we=ne.entrywidthmode==="fraction",ke=ne.borderwidth,Ae=2*ke,Ee=g.itemGap,De=ne.itemwidth+2*Ee,Re=2*(ke+Ee),Ie=$(ne),Be=ne.y<0||ne.y===0&&Ie==="top",Ue=ne.y>1||ne.y===1&&Ie==="bottom",qe=ne.tracegroupgap,Ye={};ne._maxHeight=Math.max(Be||Ue?de.height/2:ue.h,30);var at=0;ne._width=0,ne._height=0;var lt=function(Ge){var Ke=0,nt=0,st=Ge.title.side;return st&&(st.indexOf("left")!==-1&&(Ke=Ge._titleWidth),st.indexOf("top")!==-1&&(nt=Ge._titleHeight)),[Ke,nt]}(ne);if(ge)J.each(function(Ge){var Ke=Ge[0].height;p.setTranslate(this,ke+lt[0],ke+lt[1]+ne._height+Ke/2+Ee),ne._height+=Ke,ne._width=Math.max(ne._width,Ge[0].width)}),at=De+ne._width,ne._width+=Ee+De+Ae,ne._height+=Re,be&&(ye.each(function(Ge,Ke){p.setTranslate(this,0,Ke*ne.tracegroupgap)}),ne._height+=(ne._lgroupsLength-1)*ne.tracegroupgap);else{var ct=B(ne),bt=ne.x<0||ne.x===0&&ct==="right",ze=ne.x>1||ne.x===1&&ct==="left",Ne=Ue||Be,Qe=de.width/2;ne._maxWidth=Math.max(bt?Ne&&ct==="left"?ue.l+ue.w:Qe:ze?Ne&&ct==="right"?ue.r+ue.w:Qe:ue.w,2*De);var it=0,kt=0;J.each(function(Ge){var Ke=D(Ge,ne,De);it=Math.max(it,Ke),kt+=Ke}),at=null;var Je=0;if(be){var ut=0,pt=0,It=0;ye.each(function(){var Ge=0,Ke=0;l.select(this).selectAll("g.traces").each(function(st){var mt=D(st,ne,De),tt=st[0].height;p.setTranslate(this,lt[0],lt[1]+ke+Ee+tt/2+Ke),Ke+=tt,Ge=Math.max(Ge,mt),Ye[st[0].trace.legendgroup]=Ge});var nt=Ge+Ee;pt>0&&nt+ke+pt>ne._maxWidth?(Je=Math.max(Je,pt),pt=0,It+=ut+qe,ut=Ke):ut=Math.max(ut,Ke),p.setTranslate(this,pt,It),pt+=nt}),ne._width=Math.max(Je,pt)+ke,ne._height=It+ut+Re}else{var Mt=J.size(),zt=kt+Ae+(Mt-1)*Ee=ne._maxWidth&&(Je=Math.max(Je,Ve),ve=0,_e+=wt,ne._height+=wt,wt=0),p.setTranslate(this,lt[0]+ke+ve,lt[1]+ke+_e+Ke/2+Ee),Ve=ve+nt+Ee,ve+=st,wt=Math.max(wt,Ke)}),zt?(ne._width=ve+Ae,ne._height=wt+Re):(ne._width=Math.max(Je,Ve)+Ae,ne._height+=wt+Re)}}ne._width=Math.ceil(Math.max(ne._width+lt[0],ne._titleWidth+2*(ke+g.titlePad))),ne._height=Math.ceil(Math.max(ne._height+lt[1],ne._titleHeight+2*(ke+g.itemGap))),ne._effHeight=Math.min(ne._height,ne._maxHeight);var We=ce._context.edits,Ze=We.legendText||We.legendPosition;J.each(function(Ge){var Ke=l.select(this).select("."+xe+"toggle"),nt=Ge[0].height,st=Ge[0].trace.legendgroup,mt=D(Ge,ne,De);be&&st!==""&&(mt=Ye[st]);var tt=Ze?De:at||mt;ge||we||(tt+=Ee/2),p.setRect(Ke,0,-nt/2,tt,nt)})}(N,Oe,Me,L)},function(){var ce,ye,J,ne,de=q._size,xe=L.borderwidth,ue=L.xref==="paper",ge=L.yref==="paper";if(Te.text&&function(Ne,Qe,it){if(Qe.title.side==="top center"||Qe.title.side==="top right"){var kt=Qe.title.font.size*x,Je=0,ut=Ne.node(),pt=p.bBox(ut).width;Qe.title.side==="top center"?Je=.5*(Qe._width-2*it-2*g.titlePad-pt):Qe.title.side==="top right"&&(Je=Qe._width-2*it-2*g.titlePad-pt),y.positionText(Ne,it+g.titlePad+Je,it+kt)}}(se,L,xe),!V){var be,we;be=ue?de.l+de.w*L.x-_[B(L)]*L._width:q.width*L.x-_[B(L)]*L._width,we=ge?de.t+de.h*(1-L.y)-_[$(L)]*L._effHeight:q.height*(1-L.y)-_[$(L)]*L._effHeight;var ke=function(Ne,Qe,it,kt){var Je=Ne._fullLayout,ut=Je[Qe],pt=B(ut),It=$(ut),Mt=ut.xref==="paper",zt=ut.yref==="paper";Ne._fullLayout._reservedMargin[Qe]={};var wt=ut.y<.5?"b":"t",ve=ut.x<.5?"l":"r",_e={r:Je.width-it,l:it+ut._width,b:Je.height-kt,t:kt+ut._effHeight};if(Mt&&zt)return s.autoMargin(Ne,Qe,{x:ut.x,y:ut.y,l:ut._width*_[pt],r:ut._width*w[pt],b:ut._effHeight*w[It],t:ut._effHeight*_[It]});Mt?Ne._fullLayout._reservedMargin[Qe][wt]=_e[wt]:zt||ut.orientation==="v"?Ne._fullLayout._reservedMargin[Qe][ve]=_e[ve]:Ne._fullLayout._reservedMargin[Qe][wt]=_e[wt]}(N,H,be,we);if(ke)return;if(q.margin.autoexpand){var Ae=be,Ee=we;be=ue?f.constrain(be,0,q.width-L._width):Ae,we=ge?f.constrain(we,0,q.height-L._effHeight):Ee,be!==Ae&&f.log("Constrain "+H+".x to make legend fit inside graph"),we!==Ee&&f.log("Constrain "+H+".y to make legend fit inside graph")}p.setTranslate(re,be,we)}if(Se.on(".drag",null),re.on("wheel",null),V||L._height<=L._maxHeight||N._context.staticPlot){var De=L._effHeight;V&&(De=L._height),le.attr({width:L._width-xe,height:De-xe,x:xe/2,y:xe/2}),p.setTranslate(pe,0,0),ie.select("rect").attr({width:L._width-2*xe,height:De-2*xe,x:xe,y:xe}),p.setClipUrl(pe,W,N),p.setRect(Se,0,0,0,0),delete L._scrollY}else{var Re,Ie,Be,Ue=Math.max(g.scrollBarMinHeight,L._effHeight*L._effHeight/L._height),qe=L._effHeight-Ue-2*g.scrollBarMargin,Ye=L._height-L._effHeight,at=qe/Ye,lt=Math.min(L._scrollY||0,Ye);le.attr({width:L._width-2*xe+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-xe,x:xe/2,y:xe/2}),ie.select("rect").attr({width:L._width-2*xe+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-2*xe,x:xe,y:xe+lt}),p.setClipUrl(pe,W,N),ze(lt,Ue,at),re.on("wheel",function(){ze(lt=f.constrain(L._scrollY+l.event.deltaY/qe*Ye,0,Ye),Ue,at),lt!==0&<!==Ye&&l.event.preventDefault()});var ct=l.behavior.drag().on("dragstart",function(){var Ne=l.event.sourceEvent;Re=Ne.type==="touchstart"?Ne.changedTouches[0].clientY:Ne.clientY,Be=lt}).on("drag",function(){var Ne=l.event.sourceEvent;Ne.buttons===2||Ne.ctrlKey||(Ie=Ne.type==="touchmove"?Ne.changedTouches[0].clientY:Ne.clientY,lt=function(Qe,it,kt){var Je=(kt-it)/at+Qe;return f.constrain(Je,0,Ye)}(Be,Re,Ie),ze(lt,Ue,at))});Se.call(ct);var bt=l.behavior.drag().on("dragstart",function(){var Ne=l.event.sourceEvent;Ne.type==="touchstart"&&(Re=Ne.changedTouches[0].clientY,Be=lt)}).on("drag",function(){var Ne=l.event.sourceEvent;Ne.type==="touchmove"&&(Ie=Ne.changedTouches[0].clientY,lt=function(Qe,it,kt){var Je=(it-kt)/at+Qe;return f.constrain(Je,0,Ye)}(Be,Re,Ie),ze(lt,Ue,at))});pe.call(bt)}function ze(Ne,Qe,it){L._scrollY=N._fullLayout[H]._scrollY=Ne,p.setTranslate(pe,0,-Ne),p.setRect(Se,L._width,g.scrollBarMargin+Ne*it,g.scrollBarWidth,Qe),ie.select("rect").attr("y",xe+Ne)}N._context.edits.legendPosition&&(re.classed("cursor-move",!0),h.init({element:re.node(),gd:N,prepFn:function(){var Ne=p.getTranslate(re);J=Ne.x,ne=Ne.y},moveFn:function(Ne,Qe){var it=J+Ne,kt=ne+Qe;p.setTranslate(re,it,kt),ce=h.align(it,L._width,de.l,de.l+de.w,L.xanchor),ye=h.align(kt+L._height,-L._height,de.t+de.h,de.t,L.yanchor)},doneFn:function(){if(ce!==void 0&&ye!==void 0){var Ne={};Ne[H+".x"]=ce,Ne[H+".y"]=ye,c.call("_guiRelayout",N,Ne)}},clickFn:function(Ne,Qe){var it=G.selectAll("g.traces").filter(function(){var kt=this.getBoundingClientRect();return Qe.clientX>=kt.left&&Qe.clientX<=kt.right&&Qe.clientY>=kt.top&&Qe.clientY<=kt.bottom});it.size()>0&&O(N,re,it,Ne,Qe)}}))}],N)}}function D(N,E,W){var G=N[0],L=G.width,q=E.entrywidthmode,H=G.trace.legendwidth||E.entrywidth;return q==="fraction"?E._maxWidth*H:W+(H||L)}function O(N,E,W,G,L){var q=W.data()[0][0].trace,H={event:L,node:W.node(),curveNumber:q.index,expandedIndex:q._expandedIndex,data:N.data,layout:N.layout,frames:N._transitionData._frames,config:N._context,fullData:N._fullData,fullLayout:N._fullLayout};q._group&&(H.group=q._group),c.traceIs(q,"pie-like")&&(H.label=W.datum()[0].label);var V=d.triggerHandler(N,"plotly_legendclick",H);if(G===1){if(V===!1)return;E._clickTimeout=setTimeout(function(){N._fullLayout&&v(W,N,G)},N._context.doubleClickDelay)}else G===2&&(E._clickTimeout&&clearTimeout(E._clickTimeout),N._legendMouseDownTime=0,d.triggerHandler(N,"plotly_legenddoubleclick",H)!==!1&&V!==!1&&v(W,N,G))}function R(N,E,W){var G,L,q=j(W),H=N.data()[0][0],V=H.trace,te=c.traceIs(V,"pie-like"),ee=!W._inHover&&E._context.edits.legendText&&!te,U=W._maxNameLength;H.groupTitle?(G=H.groupTitle.text,L=H.groupTitle.font):(L=W.font,W.entries?G=H.text:(G=te?H.label:V.name,V._meta&&(G=f.templateString(G,V._meta))));var Q=f.ensureSingle(N,"text",q+"text");Q.attr("text-anchor","start").call(p.font,L).text(ee?F(G,U):G);var Y=W.itemwidth+2*g.itemGap;y.positionText(Q,Y,0),ee?Q.call(y.makeEditable,{gd:E,text:G}).call(z,N,E,W).on("edit",function(Z){this.text(F(Z,U)).call(z,N,E,W);var X=H.trace._fullInput||{},re={};if(c.hasTransform(X,"groupby")){var ie=c.getTransformIndices(X,"groupby"),le=ie[ie.length-1],se=f.keyedContainer(X,"transforms["+le+"].styles","target","value.name");se.set(H.trace._group,Z),re=se.constructUpdate()}else re.name=Z;return X._isShape?c.call("_guiRelayout",E,"shapes["+V.index+"].name",re.name):c.call("_guiRestyle",E,re,V.index)}):z(Q,N,E,W)}function F(N,E){var W=Math.max(4,E);if(N&&N.trim().length>=W/2)return N;for(var G=W-(N=N||"").length;G>0;G--)N+=" ";return N}function A(N,E,W){var G,L=E._context.doubleClickDelay,q=1,H=f.ensureSingle(N,"rect",W+"toggle",function(V){E._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(m.fill,"rgba(0,0,0,0)")});E._context.staticPlot||(H.on("mousedown",function(){(G=new Date().getTime())-E._legendMouseDownTimeL&&(q=Math.max(q-1,1)),O(E,V,N,q,l.event)}}))}function z(N,E,W,G,L){G._inHover&&N.attr("data-notex",!0),y.convertToTspans(N,W,function(){(function(q,H,V,te){var ee=q.data()[0][0];if(V._inHover||!ee||ee.trace.showlegend){var U=q.select("g[class*=math-group]"),Q=U.node(),Y=j(V);V||(V=H._fullLayout[Y]);var Z,X,re=V.borderwidth,ie=(te===S?V.title.font:ee.groupTitle?ee.groupTitle.font:V.font).size*x;if(Q){var le=p.bBox(Q);Z=le.height,X=le.width,te===S?p.setTranslate(U,re,re+.75*Z):p.setTranslate(U,0,.25*Z)}else{var se="."+Y+(te===S?"title":"")+"text",pe=q.select(se),Te=y.lineCount(pe),Se=pe.node();if(Z=ie*Te,X=Se?p.bBox(Se).width:0,te===S)V.title.side==="left"&&(X+=2*g.itemGap),y.positionText(pe,re+g.titlePad,re+ie);else{var Oe=2*g.itemGap+V.itemwidth;ee.groupTitle&&(Oe=g.itemGap,X-=V.itemwidth),y.positionText(pe,Oe,-ie*((Te-1)/2-.3))}}te===S?(V._titleWidth=X,V._titleHeight=Z):(ee.lineHeight=ie,ee.height=Math.max(Z,16)+3,ee.width=X)}else q.remove()})(E,W,G,L)})}function B(N){return f.isRightAnchor(N)?"right":f.isCenterAnchor(N)?"center":"left"}function $(N){return f.isBottomAnchor(N)?"bottom":f.isMiddleAnchor(N)?"middle":"top"}function j(N){return N._id||"legend"}o.exports=function(N,E){if(E)P(N,E);else{var W=N._fullLayout,G=W._legends;W._infolayer.selectAll('[class^="legend"]').each(function(){var H=l.select(this),V=H.attr("class").split(" ")[0];V.match(C)&&G.indexOf(V)===-1&&H.remove()});for(var L=0;LB&&(z=B)}F[h][0]._groupMinRank=z,F[h][0]._preGroupSort=h}var $=function(G,L){return G.trace.legendrank-L.trace.legendrank||G._preSort-L._preSort};for(F.forEach(function(G,L){G[0]._preGroupSort=L}),F.sort(function(G,L){return G[0]._groupMinRank-L[0]._groupMinRank||G[0]._preGroupSort-L[0]._preGroupSort}),h=0;hT?T:w}o.exports=function(w,k,T){var M=k._fullLayout;T||(T=M.legend);var S=T.itemsizing==="constant",C=T.itemwidth,P=(C+2*g.itemGap)/2,D=c(P,0),O=function(A,z,B,$){var j;if(A+1)j=A;else{if(!(z&&z.width>0))return 0;j=z.width}return S?$:Math.min(j,B)};function R(A,z,B){var $=A[0].trace,j=$.marker||{},N=j.line||{},E=B?$.visible&&$.type===B:f.traceIs($,"bar"),W=l.select(z).select("g.legendpoints").selectAll("path.legend"+B).data(E?[A]:[]);W.enter().append("path").classed("legend"+B,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),W.exit().remove(),W.each(function(G){var L=l.select(this),q=G[0],H=O(q.mlw,j.line,5,2);L.style("stroke-width",H+"px");var V=q.mcc;if(!T._inHover&&"mc"in q){var te=p(j),ee=te.mid;ee===void 0&&(ee=(te.max+te.min)/2),V=d.tryColorscale(j,"")(ee)}var U=V||q.mc||j.color,Q=j.pattern,Y=Q&&d.getPatternAttr(Q.shape,0,"");if(Y){var Z=d.getPatternAttr(Q.bgcolor,0,null),X=d.getPatternAttr(Q.fgcolor,0,null),re=Q.fgopacity,ie=_(Q.size,8,10),le=_(Q.solidity,.5,1),se="legend-"+$.uid;L.call(d.pattern,"legend",k,se,Y,ie,le,V,Q.fillmode,Z,X,re)}else L.call(h.fill,U);H&&h.stroke(L,q.mlc||N.color)})}function F(A,z,B){var $=A[0],j=$.trace,N=B?j.visible&&j.type===B:f.traceIs(j,B),E=l.select(z).select("g.legendpoints").selectAll("path.legend"+B).data(N?[A]:[]);if(E.enter().append("path").classed("legend"+B,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),E.exit().remove(),E.size()){var W=j.marker||{},G=O(v(W.line.width,$.pts),W.line,5,2),L="pieLike",q=s.minExtend(j,{marker:{line:{width:G}}},L),H=s.minExtend($,{trace:q},L);y(E,H,q,k)}}w.each(function(A){var z=l.select(this),B=s.ensureSingle(z,"g","layers");B.style("opacity",A[0].trace.opacity);var $=T.valign,j=A[0].lineHeight,N=A[0].height;if($!=="middle"&&j&&N){var E={top:1,bottom:-1}[$]*(.5*(j-N+3));B.attr("transform",c(0,E))}else B.attr("transform",null);B.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill",!0),B.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines",!0);var W=B.selectAll("g.legendsymbols").data([A]);W.enter().append("g").classed("legendsymbols",!0),W.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(function(A){var z,B=A[0].trace,$=[];if(B.visible)switch(B.type){case"histogram2d":case"heatmap":$=[["M-15,-2V4H15V-2Z"]],z=!0;break;case"choropleth":case"choroplethmapbox":$=[["M-6,-6V6H6V-6Z"]],z=!0;break;case"densitymapbox":$=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],z="radial";break;case"cone":$=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],z=!1;break;case"streamtube":$=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],z=!1;break;case"surface":$=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],z=!0;break;case"mesh3d":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!1;break;case"volume":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!0;break;case"isosurface":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],z=!1}var j=l.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data($);j.enter().append("path").classed("legend3dandfriends",!0).attr("transform",D).style("stroke-miterlimit",1),j.exit().remove(),j.each(function(N,E){var W,G=l.select(this),L=p(B),q=L.colorscale,H=L.reversescale;if(q){if(!z){var V=q.length;W=E===0?q[H?V-1:0][1]:E===1?q[H?0:V-1][1]:q[Math.floor((V-1)/2)][1]}}else{var te=B.vertexcolor||B.facecolor||B.color;W=s.isArrayOrTypedArray(te)?te[E]||te[0]:te}G.attr("d",N[0]),W?G.call(h.fill,W):G.call(function(ee){if(ee.size()){var U="legendfill-"+B.uid;d.gradient(ee,k,U,b(H,z==="radial"),q,"fill")}})})}).each(function(A){var z=A[0].trace,B=z.type==="waterfall";if(A[0]._distinct&&B){var $=A[0].trace[A[0].dir].marker;return A[0].mc=$.color,A[0].mlw=$.line.width,A[0].mlc=$.line.color,R(A,this,"waterfall")}var j=[];z.visible&&B&&(j=A[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var N=l.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(j);N.enter().append("path").classed("legendwaterfall",!0).attr("transform",D).style("stroke-miterlimit",1),N.exit().remove(),N.each(function(E){var W=l.select(this),G=z[E[0]].marker,L=O(void 0,G.line,5,2);W.attr("d",E[1]).style("stroke-width",L+"px").call(h.fill,G.color),L&&W.call(h.stroke,G.line.color)})}).each(function(A){R(A,this,"funnel")}).each(function(A){R(A,this)}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendbox").data(z.visible&&f.traceIs(z,"box-violin")?[A]:[]);B.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),B.exit().remove(),B.each(function(){var $=l.select(this);if(z.boxpoints!=="all"&&z.points!=="all"||h.opacity(z.fillcolor)!==0||h.opacity((z.line||{}).color)!==0){var j=O(void 0,z.line,5,2);$.style("stroke-width",j+"px").call(h.fill,z.fillcolor),j&&h.stroke($,z.line.color)}else{var N=s.minExtend(z,{marker:{size:S?12:s.constrain(z.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});B.call(d.pointStyle,N,k)}})}).each(function(A){F(A,this,"funnelarea")}).each(function(A){F(A,this,"pie")}).each(function(A){var z,B,$=x(A),j=$.showFill,N=$.showLine,E=$.showGradientLine,W=$.showGradientFill,G=$.anyFill,L=$.anyLine,q=A[0],H=q.trace,V=p(H),te=V.colorscale,ee=V.reversescale,U=m.hasMarkers(H)||!G?"M5,0":L?"M5,-2":"M5,-3",Q=l.select(this),Y=Q.select(".legendfill").selectAll("path").data(j||W?[A]:[]);if(Y.enter().append("path").classed("js-fill",!0),Y.exit().remove(),Y.attr("d",U+"h"+C+"v6h-"+C+"z").call(function(re){if(re.size())if(j)d.fillGroupStyle(re,k);else{var ie="legendfill-"+H.uid;d.gradient(re,k,ie,b(ee),te,"fill")}}),N||E){var Z=O(void 0,H.line,10,5);B=s.minExtend(H,{line:{width:Z}}),z=[s.minExtend(q,{trace:B})]}var X=Q.select(".legendlines").selectAll("path").data(N||E?[z]:[]);X.enter().append("path").classed("js-line",!0),X.exit().remove(),X.attr("d",U+(E?"l"+C+",0.0001":"h"+C)).call(N?d.lineGroupStyle:function(re){if(re.size()){var ie="legendline-"+H.uid;d.lineGroupStyle(re),d.gradient(re,k,ie,b(ee),te,"stroke")}})}).each(function(A){var z,B,$=x(A),j=$.anyFill,N=$.anyLine,E=$.showLine,W=$.showMarker,G=A[0],L=G.trace,q=!W&&!N&&!j&&m.hasText(L);function H(X,re,ie,le){var se=s.nestedProperty(L,X).get(),pe=s.isArrayOrTypedArray(se)&&re?re(se):se;if(S&&pe&&le!==void 0&&(pe=le),ie){if(peie[1])return ie[1]}return pe}function V(X){return G._distinct&&G.index&&X[G.index]?X[G.index]:X[0]}if(W||q||E){var te={},ee={};if(W){te.mc=H("marker.color",V),te.mx=H("marker.symbol",V),te.mo=H("marker.opacity",s.mean,[.2,1]),te.mlc=H("marker.line.color",V),te.mlw=H("marker.line.width",s.mean,[0,5],2),ee.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var U=H("marker.size",s.mean,[2,16],12);te.ms=U,ee.marker.size=U}E&&(ee.line={width:H("line.width",V,[0,10],5)}),q&&(te.tx="Aa",te.tp=H("textposition",V),te.ts=10,te.tc=H("textfont.color",V),te.tf=H("textfont.family",V)),z=[s.minExtend(G,te)],(B=s.minExtend(L,ee)).selectedpoints=null,B.texttemplate=null}var Q=l.select(this).select("g.legendpoints"),Y=Q.selectAll("path.scatterpts").data(W?z:[]);Y.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",D),Y.exit().remove(),Y.call(d.pointStyle,B,k),W&&(z[0].mrc=3);var Z=Q.selectAll("g.pointtext").data(q?z:[]);Z.enter().append("g").classed("pointtext",!0).append("text").attr("transform",D),Z.exit().remove(),Z.selectAll("text").call(d.textPointStyle,B,k)}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(z.visible&&z.type==="candlestick"?[A,A]:[]);B.enter().append("path").classed("legendcandle",!0).attr("d",function($,j){return j?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",D).style("stroke-miterlimit",1),B.exit().remove(),B.each(function($,j){var N=l.select(this),E=z[j?"increasing":"decreasing"],W=O(void 0,E.line,5,2);N.style("stroke-width",W+"px").call(h.fill,E.fillcolor),W&&h.stroke(N,E.line.color)})}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(z.visible&&z.type==="ohlc"?[A,A]:[]);B.enter().append("path").classed("legendohlc",!0).attr("d",function($,j){return j?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",D).style("stroke-miterlimit",1),B.exit().remove(),B.each(function($,j){var N=l.select(this),E=z[j?"increasing":"decreasing"],W=O(void 0,E.line,5,2);N.style("fill","none").call(d.dashLine,E.line.dash,W),W&&h.stroke(N,E.line.color)})})}},42068:function(o,a,n){n(93348),o.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},26023:function(o,a,n){var l=n(73972),f=n(74875),s=n(41675),c=n(24255),d=n(34031).eraseActiveShape,h=n(71828),p=h._,m=o.exports={};function y(M,S){var C,P,D=S.currentTarget,O=D.getAttribute("data-attr"),R=D.getAttribute("data-val")||!0,F=M._fullLayout,A={},z=s.list(M,null,!0),B=F._cartesianSpikesEnabled;if(O==="zoom"){var $,j=R==="in"?.5:2,N=(1+j)/2,E=(1-j)/2;for(P=0;P1?(U=["toggleHover"],Q=["resetViews"]):A?(ee=["zoomInGeo","zoomOutGeo"],U=["hoverClosestGeo"],Q=["resetGeo"]):F?(U=["hoverClosest3d"],Q=["resetCameraDefault3d","resetCameraLastSave3d"]):N?(ee=["zoomInMapbox","zoomOutMapbox"],U=["toggleHover"],Q=["resetViewMapbox"]):$?U=["hoverClosestGl2d"]:z?U=["hoverClosestPie"]:G?(U=["hoverClosestCartesian","hoverCompareCartesian"],Q=["resetViewSankey"]):U=["toggleHover"],R&&(U=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(se){for(var pe=0;pe0)){var k=function(M,S,C){for(var P=C.filter(function(F){return S[F].anchor===M._id}),D=0,O=0;O=Se.max)pe=re[Te+1];else if(se=Se.pmax)pe=re[Te+1];else if(seTe._length||ge+Ie<0)return;Ee=ue+Ie,De=ge+Ie;break;case Me:if(Re="col-resize",ue+Ie>Te._length)return;Ee=ue+Ie,De=ge;break;case ce:if(Re="col-resize",ge+Ie<0)return;Ee=ue,De=ge+Ie;break;default:Re="ew-resize",Ee=xe,De=xe+Ie}if(De=0;$--){var j=S.append("path").attr(P).style("opacity",$?.1:D).call(c.stroke,R).call(c.fill,O).call(d.dashLine,$?"solid":A,$?4+F:F);if(b(j,_,T),z){var N=h(_.layout,"selections",T);j.style({cursor:"move"});var E={element:j.node(),plotinfo:M,gd:_,editHelpers:N,isActiveSelection:!0},W=l(C,_);f(W,j,E)}else j.style("pointer-events",$?"all":"none");B[$]=j}var G=B[0];B[1].node().addEventListener("click",function(){return function(L,q){if(v(L)){var H=+q.node().getAttribute("data-index");if(H>=0){if(H===L._fullLayout._activeSelectionIndex)return void x(L);L._fullLayout._activeSelectionIndex=H,L._fullLayout._deactivateSelection=x,y(L)}}}(_,G)})}(_._fullLayout._selectionLayer)}function b(_,w,k){var T=k.xref+k.yref;d.setClipUrl(_,"clip"+w._fullLayout._uid+T,w)}function x(_){v(_)&&_._fullLayout._activeSelectionIndex>=0&&(s(_),delete _._fullLayout._activeSelectionIndex,y(_))}o.exports={draw:y,drawOne:g,activateLastSelection:function(_){if(v(_)){var w=_._fullLayout.selections.length-1;_._fullLayout._activeSelectionIndex=w,_._fullLayout._deactivateSelection=x,y(_)}}}},53777:function(o,a,n){var l=n(79952).P,f=n(1426).extendFlat;o.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:f({},l,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},90849:function(o){o.exports=function(a,n,l){l("newselection.mode"),l("newselection.line.width")&&(l("newselection.line.color"),l("newselection.line.dash")),l("activeselection.fillcolor"),l("activeselection.opacity")}},35855:function(o,a,n){var l=n(64505).selectMode,f=n(51873).clearOutline,s=n(60165),c=s.readPaths,d=s.writePaths,h=s.fixDatesForPaths;o.exports=function(p,m){if(p.length){var y=p[0][0];if(y){var v=y.getAttribute("d"),g=m.gd,b=g._fullLayout.newselection,x=m.plotinfo,_=x.xaxis,w=x.yaxis,k=m.isActiveSelection,T=m.dragmode,M=(g.layout||{}).selections||[];if(!l(T)&&k!==void 0){var S=g._fullLayout._activeSelectionIndex;if(S-1,kt=[];if(function(Mt){return Mt&&Array.isArray(Mt)&&Mt[0].hoverOnBox!==!0}(Qe)){Z(ke,Ae,Ie);var Je=function(Mt,zt){var wt,ve,_e=Mt[0],Ve=-1,We=[];for(ve=0;ve0?function(Mt,zt){var wt,ve,_e,Ve=[];for(_e=0;_e0&&Ve.push(wt);if(Ve.length===1&&Ve[0]===zt.searchInfo&&(ve=zt.searchInfo.cd[0].trace).selectedpoints.length===zt.pointNumbers.length){for(_e=0;_e1||(ve+=zt.selectedpoints.length)>1))return!1;return ve===1}(Ue)&&(ct=se(Je))){for(Be&&Be.remove(),Ne=0;Ne=0})(Re)&&Re._fullLayout._deactivateShape(Re),function(lt){return lt._fullLayout._activeSelectionIndex>=0}(Re)&&Re._fullLayout._deactivateSelection(Re);var Ie=Re._fullLayout._zoomlayer,Be=g(Ee),Ue=x(Ee);if(Be||Ue){var qe,Ye,at=Ie.selectAll(".select-outline-"+De.id);at&&Re._fullLayout._outlining&&(Be&&(qe=P(at,ke)),qe&&s.call("_guiRelayout",Re,{shapes:qe}),Ue&&!te(ke)&&(Ye=D(at,ke)),Ye&&(Re._fullLayout._noEmitSelectedAtStart=!0,s.call("_guiRelayout",Re,{selections:Ye}).then(function(){Ae&&O(Re)})),Re._fullLayout._outlining=!1)}De.selection={},De.selection.selectionDefs=ke.selectionDefs=[],De.selection.mergedPolygons=ke.mergedPolygons=[]}function re(ke){return ke._id}function ie(ke,Ae,Ee,De){if(!ke.calcdata)return[];var Re,Ie,Be,Ue=[],qe=Ae.map(re),Ye=Ee.map(re);for(Be=0;Be0?De[0]:Ee;return!!Ae.selectedpoints&&Ae.selectedpoints.indexOf(Re)>-1}function pe(ke,Ae,Ee){var De,Re;for(De=0;De-1&&Ae;if(!Ie&&Ae){var Ot=ne(ke,!0);if(Ot.length){var At=Ot[0].xref,Lt=Ot[0].yref;if(At&&Lt){var Rt=ue(Ot);ge([B(ke,At,"x"),B(ke,Lt,"y")])(jt,Rt)}}ke._fullLayout._noEmitSelectedAtStart?ke._fullLayout._noEmitSelectedAtStart=!1:Tt&&be(ke,jt),ct._reselect=!1}if(!Ie&&ct._deselect){var $t=ct._deselect;(function(Yt,Xt,Bt){for(var Wt=0;Wt=0)bt._fullLayout._deactivateShape(bt);else if(!Ye){var Rt=ze.clickmode;z.done(Et).then(function(){if(z.clear(Et),At===2){for(Nt.remove(),_e=0;_e-1&&ee(Lt,bt,De.xaxes,De.yaxes,De.subplot,De,Nt),Rt==="event"&&be(bt,void 0);h.click(bt,Lt,kt.id)}).catch(R.error)}},De.doneFn=function(){yt.remove(),z.done(Et).then(function(){z.clear(Et),!Ne&&ve&&De.selectionDefs&&(ve.subtract=St,De.selectionDefs.push(ve),De.mergedPolygons.length=0,[].push.apply(De.mergedPolygons,wt)),(Ne||Ye)&&X(De,Ne),De.doneFnCompleted&&De.doneFnCompleted(jt),at&&be(bt,We)}).catch(R.error)}},clearOutline:T,clearSelectionsCache:X,selectOnClick:ee}},89827:function(o,a,n){var l=n(50215),f=n(41940),s=n(82196).line,c=n(79952).P,d=n(1426).extendFlat,h=n(44467).templatedArray,p=(n(24695),n(9012)),m=n(5386).R,y=n(37281);o.exports=h("shape",{visible:d({},p.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:d({},p.legend,{editType:"calc+arraydraw"}),legendgroup:d({},p.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:d({},p.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:f({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:d({},p.legendrank,{editType:"calc+arraydraw"}),legendwidth:d({},p.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:d({},l.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:d({},l.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:d({},s.color,{editType:"arraydraw"}),width:d({},s.width,{editType:"calc+arraydraw"}),dash:d({},c,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:m({},{keys:Object.keys(y)}),font:f({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},5627:function(o,a,n){var l=n(71828),f=n(89298),s=n(21459),c=n(30477);function d(y){return p(y.line.width,y.xsizemode,y.x0,y.x1,y.path,!1)}function h(y){return p(y.line.width,y.ysizemode,y.y0,y.y1,y.path,!0)}function p(y,v,g,b,x,_){var w=y/2,k=_;if(v==="pixel"){var T=x?c.extractPathCoords(x,_?s.paramIsY:s.paramIsX):[g,b],M=l.aggNums(Math.max,null,T),S=l.aggNums(Math.min,null,T),C=S<0?Math.abs(S)+w:w,P=M>0?M+w:w;return{ppad:w,ppadplus:k?C:P,ppadminus:k?P:C}}return{ppad:w}}function m(y,v,g,b,x){var _=y.type==="category"||y.type==="multicategory"?y.r2c:y.d2c;if(v!==void 0)return[_(v),_(g)];if(b){var w,k,T,M,S=1/0,C=-1/0,P=b.match(s.segmentRE);for(y.type==="date"&&(_=c.decodeDate(_)),w=0;wC&&(C=M)));return C>=S?[S,C]:void 0}}o.exports=function(y){var v=y._fullLayout,g=l.filterVisible(v.shapes);if(g.length&&y._fullData.length)for(var b=0;b=re?ie-se:se-ie,-180/Math.PI*Math.atan2(pe,Te)}(C,D,P,O):0),A.call(function(re){return re.call(c.font,F).attr({}),s.convertToTspans(re,v),re});var Q=function(re,ie,le,se,pe,Te,Se){var Oe,Me,ce,ye,J=pe.label.textposition,ne=pe.label.textangle,de=pe.label.padding,xe=pe.type,ue=Math.PI/180*Te,ge=Math.sin(ue),be=Math.cos(ue),we=pe.label.xanchor,ke=pe.label.yanchor;if(xe==="line"){J==="start"?(Oe=re,Me=ie):J==="end"?(Oe=le,Me=se):(Oe=(re+le)/2,Me=(ie+se)/2),we==="auto"&&(we=J==="start"?ne==="auto"?le>re?"left":lere?"right":lere?"right":lere?"left":le1&&(Oe.length!==2||Oe[1][0]!=="Z")&&(G===0&&(Oe[0][0]="M"),R[W]=Oe,$(),j())}}()}}function re(pe,Te){(function(Se,Oe){if(R.length)for(var Me=0;MeMe?(J=Se,ue="y0",ne=Me,ge="y1"):(J=Me,ue="y1",ne=Se,ge="y0"),ut(wt),Mt(se,ie),function(ve,_e,Ve){var We=_e.xref,Ze=_e.yref,Ge=c.getFromId(Ve,We),Ke=c.getFromId(Ve,Ze),nt="";We==="paper"||Ge.autorange||(nt+=We),Ze==="paper"||Ke.autorange||(nt+=Ze),v.setClipUrl(ve,nt?"clip"+Ve._fullLayout._uid+nt:null,Ve)}(re,ie,X),Je.moveFn=Ae==="move"?pt:It,Je.altKey=wt.altKey)},doneFn:function(){M(X)||(x(re),zt(se),P(re,X,ie),f.call("_guiRelayout",X,pe.getUpdateObj()))},clickFn:function(){M(X)||zt(se)}};function ut(wt){if(M(X))Ae=null;else if(Be)Ae=wt.target.tagName==="path"?"move":wt.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ve=Je.element.getBoundingClientRect(),_e=ve.right-ve.left,Ve=ve.bottom-ve.top,We=wt.clientX-ve.left,Ze=wt.clientY-ve.top,Ge=!Ue&&_e>Ee&&Ve>De&&!wt.shiftKey?b.getCursor(We/_e,1-Ze/Ve):"move";x(re,Ge),Ae=Ge.split("-")[0]}}function pt(wt,ve){if(ie.type==="path"){var _e=function(Ze){return Ze},Ve=_e,We=_e;Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(Ve=function(Ze){return Qe(ze(Ze)+wt)},at&&at.type==="date"&&(Ve=w.encodeDate(Ve))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(We=function(Ze){return it(Ne(Ze)+ve)},ct&&ct.type==="date"&&(We=w.encodeDate(We))),qe("path",ie.path=D(ke,Ve,We))}else Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(qe("x0",ie.x0=Qe(Te+wt)),qe("x1",ie.x1=Qe(Oe+wt))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(qe("y0",ie.y0=it(Se+ve)),qe("y1",ie.y1=it(Me+ve)));re.attr("d",k(X,ie)),Mt(se,ie),p(X,le,ie,Ye)}function It(wt,ve){if(Ue){var _e=function(ht){return ht},Ve=_e,We=_e;Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(Ve=function(ht){return Qe(ze(ht)+wt)},at&&at.type==="date"&&(Ve=w.encodeDate(Ve))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(We=function(ht){return it(Ne(ht)+ve)},ct&&ct.type==="date"&&(We=w.encodeDate(We))),qe("path",ie.path=D(ke,Ve,We))}else if(Be){if(Ae==="resize-over-start-point"){var Ze=Te+wt,Ge=Ie?Se-ve:Se+ve;qe("x0",ie.x0=Re?Ze:Qe(Ze)),qe("y0",ie.y0=Ie?Ge:it(Ge))}else if(Ae==="resize-over-end-point"){var Ke=Oe+wt,nt=Ie?Me-ve:Me+ve;qe("x1",ie.x1=Re?Ke:Qe(Ke)),qe("y1",ie.y1=Ie?nt:it(nt))}}else{var st=function(ht){return Ae.indexOf(ht)!==-1},mt=st("n"),tt=st("s"),Ft=st("w"),Vt=st("e"),St=mt?J+ve:J,Nt=tt?ne+ve:ne,Dt=Ft?de+wt:de,gt=Vt?xe+wt:xe;Ie&&(mt&&(St=J-ve),tt&&(Nt=ne-ve)),(!Ie&&Nt-St>De||Ie&&St-Nt>De)&&(qe(ue,ie[ue]=Ie?St:it(St)),qe(ge,ie[ge]=Ie?Nt:it(Nt))),gt-Dt>Ee&&(qe(be,ie[be]=Re?Dt:Qe(Dt)),qe(we,ie[we]=Re?gt:Qe(gt)))}re.attr("d",k(X,ie)),Mt(se,ie),p(X,le,ie,Ye)}function Mt(wt,ve){(Re||Ie)&&function(){var _e=ve.type!=="path",Ve=wt.selectAll(".visual-cue").data([0]);Ve.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var We=ze(Re?ve.xanchor:s.midRange(_e?[ve.x0,ve.x1]:w.extractPathCoords(ve.path,_.paramIsX))),Ze=Ne(Ie?ve.yanchor:s.midRange(_e?[ve.y0,ve.y1]:w.extractPathCoords(ve.path,_.paramIsY)));if(We=w.roundPositionForSharpStrokeRendering(We,1),Ze=w.roundPositionForSharpStrokeRendering(Ze,1),Re&&Ie){var Ge="M"+(We-1-1)+","+(Ze-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ve.attr("d",Ge)}else if(Re){var Ke="M"+(We-1-1)+","+(Ze-9-1)+"v18 h2 v-18 Z";Ve.attr("d",Ke)}else{var nt="M"+(We-9-1)+","+(Ze-1-1)+"h18 v2 h-18 Z";Ve.attr("d",nt)}}()}function zt(wt){wt.selectAll(".visual-cue").remove()}b.init(Je),kt.node().onmousemove=ut}(R,Q,z,F,j,ee):z.editable===!0&&Q.style("pointer-events",V||y.opacity(G)*W<=.5?"stroke":"all");Q.node().addEventListener("click",function(){return function(X,re){if(S(X)){var ie=+re.node().getAttribute("data-index");if(ie>=0){if(ie===X._fullLayout._activeShapeIndex)return void O(X);X._fullLayout._activeShapeIndex=ie,X._fullLayout._deactivateShape=O,T(X)}}}(R,Q)})}z._input&&z.visible===!0&&(z.layer!=="below"?$(R._fullLayout._shapeUpperLayer):z.xref==="paper"||z.yref==="paper"?$(R._fullLayout._shapeLowerLayer):B._hadPlotinfo?$((B.mainplotinfo||B).shapelayer):$(R._fullLayout._shapeLowerLayer))}function P(R,F,A){var z=(A.xref+A.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");v.setClipUrl(R,z?"clip"+F._fullLayout._uid+z:null,F)}function D(R,F,A){return R.replace(_.segmentRE,function(z){var B=0,$=z.charAt(0),j=_.paramIsX[$],N=_.paramIsY[$],E=_.numParams[$];return $+z.substr(1).replace(_.paramRE,function(W){return B>=E||(j[B]?W=F(W):N[B]&&(W=A(W)),B++),W})})}function O(R){S(R)&&R._fullLayout._activeShapeIndex>=0&&(m(R),delete R._fullLayout._activeShapeIndex,T(R))}o.exports={draw:T,drawOne:C,eraseActiveShape:function(R){if(S(R)){m(R);var F=R._fullLayout._activeShapeIndex,A=(R.layout||{}).shapes||[];if(F0&&CU&&(Y="X"),Y});return H>U&&(Q=Q.replace(/[\s,]*X.*/,""),f.log("Ignoring extra params in segment "+q)),V+Q})}(d,p,y);if(d.xsizemode==="pixel"){var C=p(d.xanchor);v=C+d.x0,g=C+d.x1}else v=p(d.x0),g=p(d.x1);if(d.ysizemode==="pixel"){var P=y(d.yanchor);b=P-d.y0,x=P-d.y1}else b=y(d.y0),x=y(d.y1);if(_==="line")return"M"+v+","+b+"L"+g+","+x;if(_==="rect")return"M"+v+","+b+"H"+g+"V"+x+"H"+v+"Z";var D=(v+g)/2,O=(b+x)/2,R=Math.abs(D-v),F=Math.abs(O-b),A="A"+R+","+F,z=D+R+","+O;return"M"+z+A+" 0 1,1 "+D+","+(O-F)+A+" 0 0,1 "+z+"Z"}},89853:function(o,a,n){var l=n(34031);o.exports={moduleType:"component",name:"shapes",layoutAttributes:n(89827),supplyLayoutDefaults:n(84726),supplyDrawNewShapeDefaults:n(45547),includeBasePlot:n(76325)("shapes"),calcAutorange:n(5627),draw:l.draw,drawOne:l.drawOne}},37281:function(o){function a(s,c){return c?c.d2l(s):s}function n(s,c){return c?c.l2d(s):s}function l(s,c){return a(s.x1,c)-a(s.x0,c)}function f(s,c,d){return a(s.y1,d)-a(s.y0,d)}o.exports={x0:function(s){return s.x0},x1:function(s){return s.x1},y0:function(s){return s.y0},y1:function(s){return s.y1},slope:function(s,c,d){return s.type!=="line"?void 0:f(s,0,d)/l(s,c)},dx:l,dy:f,width:function(s,c){return Math.abs(l(s,c))},height:function(s,c,d){return Math.abs(f(s,0,d))},length:function(s,c,d){return s.type!=="line"?void 0:Math.sqrt(Math.pow(l(s,c),2)+Math.pow(f(s,0,d),2))},xcenter:function(s,c){return n((a(s.x1,c)+a(s.x0,c))/2,c)},ycenter:function(s,c,d){return n((a(s.y1,d)+a(s.y0,d))/2,d)}}},75067:function(o,a,n){var l=n(41940),f=n(35025),s=n(1426).extendDeepAll,c=n(30962).overrideAll,d=n(85594),h=n(44467).templatedArray,p=n(98292),m=h("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});o.exports=c(h("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:m,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:s(f({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:d.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:l({})},font:l({}),activebgcolor:{valType:"color",dflt:p.gripBgActiveColor},bgcolor:{valType:"color",dflt:p.railBgColor},bordercolor:{valType:"color",dflt:p.railBorderColor},borderwidth:{valType:"number",min:0,dflt:p.railBorderWidth},ticklen:{valType:"number",min:0,dflt:p.tickLength},tickcolor:{valType:"color",dflt:p.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:p.minorTickLength}}),"arraydraw","from-root")},98292:function(o){o.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},12343:function(o,a,n){var l=n(71828),f=n(85501),s=n(75067),c=n(98292).name,d=s.steps;function h(m,y,v){function g(k,T){return l.coerce(m,y,s,k,T)}for(var b=f(m,y,{name:"steps",handleItemDefaults:p}),x=0,_=0;_0&&(H=H.transition().duration(N.transition.duration).ease(N.transition.easing)),H.attr("transform",h(q-.5*y.gripWidth,N._dims.currentValueTotalHeight))}}function A(j,N){var E=j._dims;return E.inputAreaStart+y.stepInset+(E.inputAreaLength-2*y.stepInset)*Math.min(1,Math.max(0,N))}function z(j,N){var E=j._dims;return Math.min(1,Math.max(0,(N-y.stepInset-E.inputAreaStart)/(E.inputAreaLength-2*y.stepInset-2*E.inputAreaStart)))}function B(j,N,E){var W=E._dims,G=d.ensureSingle(j,"rect",y.railTouchRectClass,function(L){L.call(O,N,j,E).style("pointer-events","all")});G.attr({width:W.inputAreaLength,height:Math.max(W.inputAreaWidth,y.tickOffset+E.ticklen+W.labelHeight)}).call(s.fill,E.bgcolor).attr("opacity",0),c.setTranslate(G,0,W.currentValueTotalHeight)}function $(j,N){var E=N._dims,W=E.inputAreaLength-2*y.railInset,G=d.ensureSingle(j,"rect",y.railRectClass);G.attr({width:W,height:y.railWidth,rx:y.railRadius,ry:y.railRadius,"shape-rendering":"crispEdges"}).call(s.stroke,N.bordercolor).call(s.fill,N.bgcolor).style("stroke-width",N.borderwidth+"px"),c.setTranslate(G,y.railInset,.5*(E.inputAreaWidth-y.railWidth)+E.currentValueTotalHeight)}o.exports=function(j){var N=j._context.staticPlot,E=j._fullLayout,W=function(te,ee){for(var U=te[y.name],Q=[],Y=0;Y0?[0]:[]);function L(te){te._commandObserver&&(te._commandObserver.remove(),delete te._commandObserver),f.autoMargin(j,_(te))}if(G.enter().append("g").classed(y.containerClassName,!0).style("cursor",N?null:"ew-resize"),G.exit().each(function(){l.select(this).selectAll("g."+y.groupClassName).each(L)}).remove(),W.length!==0){var q=G.selectAll("g."+y.groupClassName).data(W,w);q.enter().append("g").classed(y.groupClassName,!0),q.exit().each(L).remove();for(var H=0;H0||Oe<0){var J={left:[-Me,0],right:[Me,0],top:[0,-Me],bottom:[0,Me]}[P.side];Q.attr("transform",h(J[0],J[1]))}}}return H.call(V),G&&($?H.on(".opacity",null):(A=0,z=!0,H.text(S).on("mouseover.opacity",function(){l.select(this).transition().duration(v.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){l.select(this).transition().duration(v.HIDE_PLACEHOLDER).style("opacity",0)})),H.call(y.makeEditable,{gd:x}).on("edit",function(U){C!==void 0?c.call("_guiRestyle",x,M,U,C):c.call("_guiRelayout",x,M,U)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(V)}).on("input",function(U){this.text(U||" ").call(y.positionText,D.x,D.y)})),H.classed("js-placeholder",z),R}}},7163:function(o,a,n){var l=n(41940),f=n(22399),s=n(1426).extendFlat,c=n(30962).overrideAll,d=n(35025),h=n(44467).templatedArray,p=h("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});o.exports=c(h("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:p,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:s(d({editType:"arraydraw"}),{}),font:l({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:f.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(o){o.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},64897:function(o,a,n){var l=n(71828),f=n(85501),s=n(7163),c=n(75909).name,d=s.buttons;function h(m,y,v){function g(b,x){return l.coerce(m,y,s,b,x)}g("visible",f(m,y,{name:"buttons",handleItemDefaults:p}).length>0)&&(g("active"),g("direction"),g("type"),g("showactive"),g("x"),g("y"),l.noneOrAll(m,y,["x","y"]),g("xanchor"),g("yanchor"),g("pad.t"),g("pad.r"),g("pad.b"),g("pad.l"),l.coerceFont(g,"font",v.font),g("bgcolor",v.paper_bgcolor),g("bordercolor"),g("borderwidth"))}function p(m,y){function v(g,b){return l.coerce(m,y,d,g,b)}v("visible",m.method==="skip"||Array.isArray(m.args))&&(v("method"),v("args"),v("args2"),v("label"),v("execute"))}o.exports=function(m,y){f(m,y,{name:c,handleItemDefaults:h})}},13689:function(o,a,n){var l=n(39898),f=n(74875),s=n(7901),c=n(91424),d=n(71828),h=n(63893),p=n(44467).arrayEditor,m=n(18783).LINE_SPACING,y=n(75909),v=n(25849);function g(A){return A._index}function b(A,z){return+A.attr(y.menuIndexAttrName)===z._index}function x(A,z,B,$,j,N,E,W){z.active=E,p(A.layout,y.name,z).applyUpdate("active",E),z.type==="buttons"?w(A,$,null,null,z):z.type==="dropdown"&&(j.attr(y.menuIndexAttrName,"-1"),_(A,$,j,N,z),W||w(A,$,j,N,z))}function _(A,z,B,$,j){var N=d.ensureSingle(z,"g",y.headerClassName,function(H){H.style("pointer-events","all")}),E=j._dims,W=j.active,G=j.buttons[W]||y.blankHeaderOpts,L={y:j.pad.t,yPad:0,x:j.pad.l,xPad:0,index:0},q={width:E.headerWidth,height:E.headerHeight};N.call(k,j,G,A).call(R,j,L,q),d.ensureSingle(z,"text",y.headerArrowClassName,function(H){H.attr("text-anchor","end").call(c.font,j.font).text(y.arrowSymbol[j.direction])}).attr({x:E.headerWidth-y.arrowOffsetX+j.pad.l,y:E.headerHeight/2+y.textOffsetY+j.pad.t}),N.on("click",function(){B.call(F,String(b(B,j)?-1:j._index)),w(A,z,B,$,j)}),N.on("mouseover",function(){N.call(C)}),N.on("mouseout",function(){N.call(P,j)}),c.setTranslate(z,E.lx,E.ly)}function w(A,z,B,$,j){B||(B=z).attr("pointer-events","all");var N=function(Q){return+Q.attr(y.menuIndexAttrName)==-1}(B)&&j.type!=="buttons"?[]:j.buttons,E=j.type==="dropdown"?y.dropdownButtonClassName:y.buttonClassName,W=B.selectAll("g."+E).data(d.filterVisible(N)),G=W.enter().append("g").classed(E,!0),L=W.exit();j.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),L.transition().attr("opacity","0").remove()):L.remove();var q=0,H=0,V=j._dims,te=["up","down"].indexOf(j.direction)!==-1;j.type==="dropdown"&&(te?H=V.headerHeight+y.gapButtonHeader:q=V.headerWidth+y.gapButtonHeader),j.type==="dropdown"&&j.direction==="up"&&(H=-y.gapButtonHeader+y.gapButton-V.openHeight),j.type==="dropdown"&&j.direction==="left"&&(q=-y.gapButtonHeader+y.gapButton-V.openWidth);var ee={x:V.lx+q+j.pad.l,y:V.ly+H+j.pad.t,yPad:y.gapButton,xPad:y.gapButton,index:0},U={l:ee.x+j.borderwidth,t:ee.y+j.borderwidth};W.each(function(Q,Y){var Z=l.select(this);Z.call(k,j,Q,A).call(R,j,ee),Z.on("click",function(){l.event.defaultPrevented||(Q.execute&&(Q.args2&&j.active===Y?(x(A,j,0,z,B,$,-1),f.executeAPICommand(A,Q.method,Q.args2)):(x(A,j,0,z,B,$,Y),f.executeAPICommand(A,Q.method,Q.args))),A.emit("plotly_buttonclicked",{menu:j,button:Q,active:j.active}))}),Z.on("mouseover",function(){Z.call(C)}),Z.on("mouseout",function(){Z.call(P,j),W.call(S,j)})}),W.call(S,j),te?(U.w=Math.max(V.openWidth,V.headerWidth),U.h=ee.y-U.t):(U.w=ee.x-U.l,U.h=Math.max(V.openHeight,V.headerHeight)),U.direction=j.direction,$&&(W.size()?function(Q,Y,Z,X,re,ie){var le,se,pe,Te=re.direction,Se=Te==="up"||Te==="down",Oe=re._dims,Me=re.active;if(Se)for(se=0,pe=0;pe0?[0]:[]);if(j.enter().append("g").classed(y.containerClassName,!0).style("cursor","pointer"),j.exit().each(function(){l.select(this).selectAll("g."+y.headerGroupClassName).each($)}).remove(),B.length!==0){var N=j.selectAll("g."+y.headerGroupClassName).data(B,g);N.enter().append("g").classed(y.headerGroupClassName,!0);for(var E=d.ensureSingle(j,"g",y.dropdownButtonGroupClassName,function(H){H.style("pointer-events","all")}),W=0;WR,z=d.barLength+2*d.barPad,B=d.barWidth+2*d.barPad,$=k,j=M+S;j+B>g&&(j=g-B);var N=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-horizontal",!0).call(f.fill,d.barColor),A?(this.hbar=N.attr({rx:d.barRadius,ry:d.barRadius,x:$,y:j,width:z,height:B}),this._hbarXMin=$+z/2,this._hbarTranslateMax=R-z):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var E=S>F,W=d.barWidth+2*d.barPad,G=d.barLength+2*d.barPad,L=k+T,q=M;L+W>v&&(L=v-W);var H=this.container.selectAll("rect.scrollbar-vertical").data(E?[0]:[]);H.exit().on(".drag",null).remove(),H.enter().append("rect").classed("scrollbar-vertical",!0).call(f.fill,d.barColor),E?(this.vbar=H.attr({rx:d.barRadius,ry:d.barRadius,x:L,y:q,width:W,height:G}),this._vbarYMin=q+G/2,this._vbarTranslateMax=F-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var V=this.id,te=b-.5,ee=E?x+W+.5:x+.5,U=_-.5,Q=A?w+B+.5:w+.5,Y=y._topdefs.selectAll("#"+V).data(A||E?[0]:[]);if(Y.exit().remove(),Y.enter().append("clipPath").attr("id",V).append("rect"),A||E?(this._clipRect=Y.select("rect").attr({x:Math.floor(te),y:Math.floor(U),width:Math.ceil(ee)-Math.floor(te),height:Math.ceil(Q)-Math.floor(U)}),this.container.call(s.setClipUrl,V,this.gd),this.bg.attr({x:k,y:M,width:T,height:S})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),A||E){var Z=l.behavior.drag().on("dragstart",function(){l.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Z);var X=l.behavior.drag().on("dragstart",function(){l.event.sourceEvent.preventDefault(),l.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(X),E&&this.vbar.on(".drag",null).call(X)}this.setTranslate(p,m)},d.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},d.prototype._onBoxDrag=function(){var h=this.translateX,p=this.translateY;this.hbar&&(h-=l.event.dx),this.vbar&&(p-=l.event.dy),this.setTranslate(h,p)},d.prototype._onBoxWheel=function(){var h=this.translateX,p=this.translateY;this.hbar&&(h+=l.event.deltaY),this.vbar&&(p+=l.event.deltaY),this.setTranslate(h,p)},d.prototype._onBarDrag=function(){var h=this.translateX,p=this.translateY;if(this.hbar){var m=h+this._hbarXMin,y=m+this._hbarTranslateMax;h=(c.constrain(l.event.x,m,y)-m)/(y-m)*(this.position.w-this._box.w)}if(this.vbar){var v=p+this._vbarYMin,g=v+this._vbarTranslateMax;p=(c.constrain(l.event.y,v,g)-v)/(g-v)*(this.position.h-this._box.h)}this.setTranslate(h,p)},d.prototype.setTranslate=function(h,p){var m=this.position.w-this._box.w,y=this.position.h-this._box.h;if(h=c.constrain(h||0,0,m),p=c.constrain(p||0,0,y),this.translateX=h,this.translateY=p,this.container.call(s.setTranslate,this._box.l-this.position.l-h,this._box.t-this.position.t-p),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+h-.5),y:Math.floor(this.position.t+p-.5)}),this.hbar){var v=h/m;this.hbar.call(s.setTranslate,h+v*this._hbarTranslateMax,p)}if(this.vbar){var g=p/y;this.vbar.call(s.setTranslate,h,p+g*this._vbarTranslateMax)}}},18783:function(o){o.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},24695:function(o){o.exports={axisRefDescription:function(a,n,l){return["If set to a",a,"axis id (e.g. *"+a+"* or","*"+a+"2*), the `"+a+"` position refers to a",a,"coordinate. If set to *paper*, the `"+a+"`","position refers to the distance from the",n,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",n,"("+l+"). If set to a",a,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",n,"of the domain of that axis: e.g.,","*"+a+"2 domain* refers to the domain of the second",a," axis and a",a,"position of 0.5 refers to the","point between the",n,"and the",l,"of the domain of the","second",a,"axis."].join(" ")}}},31562:function(o){o.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},74808:function(o){o.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},37822:function(o){o.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(o){o.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},32396:function(o,a){a.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],a.STYLE=a.CSS_DECLARATIONS.map(function(n){return n.join(": ")+"; "}).join("")},77922:function(o,a){a.xmlns="http://www.w3.org/2000/xmlns/",a.svg="http://www.w3.org/2000/svg",a.xlink="http://www.w3.org/1999/xlink",a.svgAttrs={xmlns:a.svg,"xmlns:xlink":a.xlink}},8729:function(o,a,n){a.version=n(11506).version,n(7417),n(98847);for(var l=n(73972),f=a.register=l.register,s=n(10641),c=Object.keys(s),d=0;d",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(o,a){a.isLeftAnchor=function(n){return n.xanchor==="left"||n.xanchor==="auto"&&n.x<=.3333333333333333},a.isCenterAnchor=function(n){return n.xanchor==="center"||n.xanchor==="auto"&&n.x>.3333333333333333&&n.x<.6666666666666666},a.isRightAnchor=function(n){return n.xanchor==="right"||n.xanchor==="auto"&&n.x>=.6666666666666666},a.isTopAnchor=function(n){return n.yanchor==="top"||n.yanchor==="auto"&&n.y>=.6666666666666666},a.isMiddleAnchor=function(n){return n.yanchor==="middle"||n.yanchor==="auto"&&n.y>.3333333333333333&&n.y<.6666666666666666},a.isBottomAnchor=function(n){return n.yanchor==="bottom"||n.yanchor==="auto"&&n.y<=.3333333333333333}},26348:function(o,a,n){var l=n(64872),f=l.mod,s=l.modHalf,c=Math.PI,d=2*c;function h(v){return Math.abs(v[1]-v[0])>d-1e-14}function p(v,g){return s(g-v,d)}function m(v,g){if(h(g))return!0;var b,x;g[0](x=f(x,d))&&(x+=d);var _=f(v,d),w=_+d;return _>=b&&_<=x||w>=b&&w<=x}function y(v,g,b,x,_,w,k){_=_||0,w=w||0;var T,M,S,C,P,D=h([b,x]);function O(z,B){return[z*Math.cos(B)+_,w-z*Math.sin(B)]}D?(T=0,M=c,S=d):b=_&&v<=w);var _,w},pathArc:function(v,g,b,x,_){return y(null,v,g,b,x,_,0)},pathSector:function(v,g,b,x,_){return y(null,v,g,b,x,_,1)},pathAnnulus:function(v,g,b,x,_,w){return y(v,g,b,x,_,w,1)}}},73627:function(o,a){var n=Array.isArray,l=ArrayBuffer,f=DataView;function s(h){return l.isView(h)&&!(h instanceof f)}function c(h){return n(h)||s(h)}function d(h,p,m){if(c(h)){if(c(h[0])){for(var y=m,v=0;vw.max?x.set(_):x.set(+b)}},integer:{coerceFunction:function(b,x,_,w){b%1||!l(b)||w.min!==void 0&&bw.max?x.set(_):x.set(+b)}},string:{coerceFunction:function(b,x,_,w){if(typeof b!="string"){var k=typeof b=="number";w.strict!==!0&&k?x.set(String(b)):x.set(_)}else w.noBlank&&!b?x.set(_):x.set(b)}},color:{coerceFunction:function(b,x,_){f(b).isValid()?x.set(b):x.set(_)}},colorlist:{coerceFunction:function(b,x,_){Array.isArray(b)&&b.length&&b.every(function(w){return f(w).isValid()})?x.set(b):x.set(_)}},colorscale:{coerceFunction:function(b,x,_){x.set(c.get(b,_))}},angle:{coerceFunction:function(b,x,_){b==="auto"?x.set("auto"):l(b)?x.set(y(+b,360)):x.set(_)}},subplotid:{coerceFunction:function(b,x,_,w){var k=w.regex||m(_);typeof b=="string"&&k.test(b)?x.set(b):x.set(_)},validateFunction:function(b,x){var _=x.dflt;return b===_||typeof b=="string"&&!!m(_).test(b)}},flaglist:{coerceFunction:function(b,x,_,w){if((w.extras||[]).indexOf(b)===-1)if(typeof b=="string"){for(var k=b.split("+"),T=0;T=l&&N<=f?N:m}if(typeof N!="string"&&typeof N!="number")return m;N=String(N);var q=S(E),H=N.charAt(0);!q||H!=="G"&&H!=="g"||(N=N.substr(1),E="");var V=q&&E.substr(0,7)==="chinese",te=N.match(V?T:k);if(!te)return m;var ee=te[1],U=te[3]||"1",Q=Number(te[5]||1),Y=Number(te[7]||0),Z=Number(te[9]||0),X=Number(te[11]||0);if(q){if(ee.length===2)return m;var re;ee=Number(ee);try{var ie=_.getComponentMethod("calendars","getCal")(E);if(V){var le=U.charAt(U.length-1)==="i";U=parseInt(U,10),re=ie.newDate(ee,ie.toMonthIndex(ee,U,le),Q)}else re=ie.newDate(ee,Number(U),Q)}catch{return m}return re?(re.toJD()-x)*y+Y*v+Z*g+X*b:m}ee=ee.length===2?(Number(ee)+2e3-M)%100+M:Number(ee),U-=1;var se=new Date(Date.UTC(2e3,U,Q,Y,Z));return se.setUTCFullYear(ee),se.getUTCMonth()!==U||se.getUTCDate()!==Q?m:se.getTime()+X*b},l=a.MIN_MS=a.dateTime2ms("-9999"),f=a.MAX_MS=a.dateTime2ms("9999-12-31 23:59:59.9999"),a.isDateTime=function(N,E){return a.dateTime2ms(N,E)!==m};var P=90*y,D=3*v,O=5*g;function R(N,E,W,G,L){if((E||W||G||L)&&(N+=" "+C(E,2)+":"+C(W,2),(G||L)&&(N+=":"+C(G,2),L))){for(var q=4;L%10==0;)q-=1,L/=10;N+="."+C(L,q)}return N}a.ms2DateTime=function(N,E,W){if(typeof N!="number"||!(N>=l&&N<=f))return m;E||(E=0);var G,L,q,H,V,te,ee=Math.floor(10*h(N+.05,1)),U=Math.round(N-ee/10);if(S(W)){var Q=Math.floor(U/y)+x,Y=Math.floor(h(N,y));try{G=_.getComponentMethod("calendars","getCal")(W).fromJD(Q).formatDate("yyyy-mm-dd")}catch{G=w("G%Y-%m-%d")(new Date(U))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;L=E=l+y&&N<=f-y))return m;var E=Math.floor(10*h(N+.05,1)),W=new Date(Math.round(N-E/10));return R(s("%Y-%m-%d")(W),W.getHours(),W.getMinutes(),W.getSeconds(),10*W.getUTCMilliseconds()+E)},a.cleanDate=function(N,E,W){if(N===m)return E;if(a.isJSDate(N)||typeof N=="number"&&isFinite(N)){if(S(W))return d.error("JS Dates and milliseconds are incompatible with world calendars",N),E;if(!(N=a.ms2DateTimeLocal(+N))&&E!==void 0)return E}else if(!a.isDateTime(N,W))return d.error("unrecognized date",N),E;return N};var F=/%\d?f/g,A=/%h/g,z={1:"1",2:"1",3:"2",4:"2"};function B(N,E,W,G){N=N.replace(F,function(q){var H=Math.min(+q.charAt(1)||6,6);return(E/1e3%1+2).toFixed(H).substr(2).replace(/0+$/,"")||"0"});var L=new Date(Math.floor(E+.05));if(N=N.replace(A,function(){return z[W("%q")(L)]}),S(G))try{N=_.getComponentMethod("calendars","worldCalFmt")(N,E,G)}catch{return"Invalid"}return W(N)(L)}var $=[59,59.9,59.99,59.999,59.9999];a.formatDate=function(N,E,W,G,L,q){if(L=S(L)&&L,!E)if(W==="y")E=q.year;else if(W==="m")E=q.month;else{if(W!=="d")return function(H,V){var te=h(H+.05,y),ee=C(Math.floor(te/v),2)+":"+C(h(Math.floor(te/g),60),2);if(V!=="M"){c(V)||(V=0);var U=(100+Math.min(h(H/b,60),$[V])).toFixed(V).substr(1);V>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),ee+=":"+U}return ee}(N,W)+` +var JD=Object.defineProperty;var QD=(e,t,r)=>t in e?JD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Lc=(e,t,r)=>(QD(e,typeof t!="symbol"?t+"":t,r),r);import{r as $e,j as je,$ as Z5,T as Cr,ak as K5,al as J5,am as Q5,A as dy,a as hy,an as e9,ao as t9,G as Jn,R as et,B as Qr,O as n9,ap as ir,aq as Or,Y as eS,Z as S0,ar as r9,ac as tS,ad as nS,ae as Af,af as Hi,ah as rS,as as qn,at as a9,au as i9,av as o9,aw as Ma,ax as l9,ay as s9,az as u9,aA as c9,aB as f9,aC as d9,aD as h9,aE as p9,aF as g9,aG as m9,aH as v9,aI as y9,aJ as b9,aK as x9,aL as w9,aM as xn,aN as _r,aO as Tr,aP as _n,aQ as Gt,aR as Pf,aS as Vn,aT as Md,aU as yr,aV as fr,aW as _9,aX as Sd,aY as Cd,aZ as aS,a_ as iS,a$ as T9,b0 as xl,b1 as k9,a3 as Od,b2 as no,I as Fl,b3 as M9,b4 as oS,b5 as S9,b6 as oe,U as di,b7 as C9,a7 as O9,b8 as A9,b9 as lg,a8 as P9,ba as D9,bb as E9,bc as B2,bd as R9,be as py,bf as L9,bg as I9,bh as F9,bi as N9,bj as j9,bk as $9,bl as B9,bm as z9,bn as q9,bo as W9,bp as z2,bq as U9,br as gy,h as H9,bs as V9,bt as Y9,bu as G9,bv as X9,bw as Z9,bx as K9,by as J9,bz as Q9,bA as eE,bB as tE,p as my,o as nE}from"./vendor-Bhc2M4pH.js";import{u as lS}from"./DashboardViewParams-BHBduMXd.js";import{i as vn,r as Xr}from"./createSvgIcon-BCx0yKii.js";import{E as rE}from"./Edit-BLuUL5Mi.js";var cf=(e=>(e[e.Small=0]="Small",e[e.Medium=1]="Medium",e[e.Big=2]="Big",e))(cf||{});function Ic(e){return e.palette.mode==="dark"?J5:Q5}function Fc(e){return e.palette.mode==="light"?Q5:J5}const C0=e=>{const[t,r]=$e.useState({open:!1});return je.jsxs(Z5,{elevation:0,onClick:i=>r(u=>({open:!u.open,anchorEl:i.currentTarget})),sx:[{color:i=>Fc(i)(i.palette.info.main,.6),backgroundColor:i=>Ic(i)(i.palette.info.main,.9)},e.data.state==="success"&&{color:i=>Fc(i)(i.palette.success.main,.6),backgroundColor:i=>Ic(i)(i.palette.success.main,.9)},e.data.state==="warning"&&{color:i=>Fc(i)(i.palette.warning.main,.6),backgroundColor:i=>Ic(i)(i.palette.warning.main,.9)},e.data.state==="error"&&{color:i=>Fc(i)(i.palette.error.main,.6),backgroundColor:i=>Ic(i)(i.palette.error.main,.9)}],children:[je.jsx(Cr,{align:"center",variant:"h6",component:"div",children:e.data.value}),je.jsx(Cr,{align:"center",variant:"body1",component:"div",children:e.data.text}),je.jsx(K5,{open:t.open,anchorEl:t.anchorEl,anchorOrigin:{horizontal:"left",vertical:"bottom"},children:e.customPopup??je.jsx(Cr,{padding:1,children:e.data.longText})})]})},sS=e=>je.jsxs(dy,{severity:e.data.severity,children:[je.jsx(hy,{children:e.data.title}),e.data.text]}),q2=e=>{const{alertStats:t}=e;return je.jsx(C0,{data:{value:`${t.triggered.last_24h}`,state:"info",text:"alerts in the last 24 hours",longText:"alerts triggered in the period / alerts triggered in 24 hours / alerts active "},customPopup:je.jsx(Cr,{sx:{pr:1},children:je.jsxs("ul",{children:[je.jsxs("li",{children:[t.triggered.period," alerts triggered in the period"]}),je.jsxs("li",{children:[t.triggered.last_24h," alerts triggered in 24 hours"]}),je.jsxs("li",{children:[t.active," total active alerts"]})]})})})};function aE(e){return e===12?{xs:12,sm:12,md:12,lg:12}:e===6?{xs:12,sm:12,md:6,lg:6}:e===3?{xs:12,sm:6,md:3,lg:3}:{xs:6,sm:3,md:1,lg:1}}const iE=e=>{const{size:t,ItemWrapper:r}=e,i=e.children.alertsPosition??"row",{id:u,title:o,details:a,content:n,alerts:l,alertStats:f,insights:s}=e.children,c=l===void 0?!1:l.length>0,d=s===void 0?!1:s.length>0,h=je.jsx(e9,{sx:{border:"1px solid",borderColor:"#d6d6d6",borderRadius:"4px"},elevation:0,children:je.jsx(t9,{children:je.jsxs(Jn,{container:!0,spacing:1,direction:"column",children:[i==="row"?je.jsxs(Jn,{container:!0,spacing:1,item:!0,children:[je.jsxs(Jn,{item:!0,xs:c&&i==="row"?9:12,children:[o?je.jsx(Cr,{fontWeight:500,variant:"h5",children:o}):je.jsx("div",{}),je.jsx("div",{children:n}),a?je.jsx(Cr,{variant:"subtitle1",children:a}):je.jsx("div",{})]}),c?je.jsx(Jn,{container:!0,spacing:1,direction:"column",justifyContent:"center",item:!0,xs:3,children:l?je.jsxs(et.Fragment,{children:[f?je.jsx(Jn,{item:!0,children:je.jsx(q2,{alertStats:f})}):je.jsx("div",{}),l.map(p=>je.jsx(Jn,{item:!0,children:je.jsx(C0,{data:p})}))]}):je.jsx("div",{})}):je.jsx("div",{})]}):je.jsxs(et.Fragment,{children:[je.jsxs(Jn,{item:!0,children:[o?je.jsx(Cr,{variant:"h5",children:o}):je.jsx("div",{}),je.jsx("div",{children:n}),a?je.jsx(Cr,{variant:"subtitle1",children:a}):je.jsx("div",{})]}),c?je.jsx(Jn,{item:!0,xs:!0,children:je.jsx(Jn,{container:!0,direction:"row",spacing:1,children:l?je.jsxs(et.Fragment,{children:[f?je.jsx(Jn,{item:!0,xs:!0,children:je.jsx(q2,{alertStats:f})}):je.jsx("div",{}),l.map(p=>je.jsx(Jn,{item:!0,xs:!0,children:je.jsx(C0,{data:p})}))]}):je.jsx("div",{})})}):je.jsx("div",{})]}),d?s.map(p=>je.jsx(Jn,{item:!0,xs:!0,sm:!0,md:!0,children:je.jsx(sS,{data:p})})):je.jsx("div",{})]})})});return je.jsx(Jn,{item:!0,...aE(t),children:r?r({id:u,children:h}):h})},W2=e=>je.jsxs("div",{children:[je.jsx(Cr,{align:"center",fontWeight:500,sx:{fontSize:36},children:e.value}),je.jsx(Cr,{align:"center",variant:"h5",fontWeight:500,children:e.label})]}),oE=e=>je.jsx(et.Fragment,{children:e.counters.length===1?je.jsx(W2,{...e.counters[0]}):je.jsx(Jn,{container:!0,spacing:1,direction:"row",alignItems:"center",children:e.counters.map((t,r)=>je.jsx(Jn,{item:!0,xs:!0,component:Qr,height:"100%",children:je.jsx(Qr,{children:je.jsx(W2,{...t})})},r))})}),lE=e=>je.jsxs("div",{children:[je.jsxs(Qr,{display:"flex",alignItems:"center",children:[je.jsx(Qr,{width:"100%",mr:1,children:je.jsx(n9,{variant:"determinate",value:e.value/e.maxValue*100})}),je.jsx(Qr,{minWidth:35,children:je.jsx(Cr,{variant:"body2",color:"textSecondary",children:`${Math.round(e.value/e.maxValue*100)}%`})})]}),je.jsx(Qr,{width:"100%",children:je.jsx(Cr,{variant:"body2",color:"textSecondary",children:e.details??""})})]});var uS={exports:{}};(function(e,t){/*! For license information please see plotly-cartesian.min.js.LICENSE.txt */(function(r,i){e.exports=i()})(self,function(){return function(){var r={98847:function(o,a,n){var l=n(71828),f={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var s in f){var c=s.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");l.addStyleRule(c,f[s])}},98222:function(o,a,n){o.exports=n(82887)},27206:function(o,a,n){o.exports=n(60822)},5224:function(o,a,n){o.exports=n(83832)},59509:function(o,a,n){o.exports=n(72201)},49866:function(o,a,n){o.exports=n(99442)},19548:function(o,a,n){o.exports=n(8729)},61039:function(o,a,n){o.exports=n(14382)},24296:function(o,a,n){o.exports=n(43102)},58872:function(o,a,n){o.exports=n(92165)},65591:function(o,a,n){o.exports=n(36071)},69738:function(o,a,n){o.exports=n(43905)},92650:function(o,a,n){o.exports=n(35902)},73434:function(o,a,n){o.exports=n(94507)},760:function(o,a,n){var l=n(19548);l.register([n(27206),n(5224),n(58872),n(65591),n(69738),n(92650),n(49866),n(25743),n(6197),n(73434),n(54201),n(98222),n(61039),n(24296),n(66398),n(59509)]),o.exports=l},54201:function(o,a,n){o.exports=n(58810)},25743:function(o,a,n){o.exports=n(52979)},66398:function(o,a,n){o.exports=n(32275)},6197:function(o,a,n){o.exports=n(47462)},82884:function(o){o.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},50215:function(o,a,n){var l=n(82884),f=n(41940),s=n(85555),c=n(44467).templatedArray;n(24695),o.exports=c("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:f({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:l.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:l.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",s.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",s.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",s.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",s.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:f({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(o,a,n){var l=n(71828),f=n(89298),s=n(92605).draw;function c(h){var p=h._fullLayout;l.filterVisible(p.annotations).forEach(function(m){var y=f.getFromId(h,m.xref),v=f.getFromId(h,m.yref),g=f.getRefType(m.xref),b=f.getRefType(m.yref);m._extremes={},g==="range"&&d(m,y),b==="range"&&d(m,v)})}function d(h,p){var m,y=p._id,v=y.charAt(0),g=h[v],b=h["a"+v],x=h[v+"ref"],_=h["a"+v+"ref"],w=h["_"+v+"padplus"],k=h["_"+v+"padminus"],T={x:1,y:-1}[v]*h[v+"shift"],M=3*h.arrowsize*h.arrowwidth||0,S=M+T,C=M-T,P=3*h.startarrowsize*h.arrowwidth||0,D=P+T,O=P-T;if(_===x){var R=f.findExtremes(p,[p.r2c(g)],{ppadplus:S,ppadminus:C}),F=f.findExtremes(p,[p.r2c(b)],{ppadplus:Math.max(w,D),ppadminus:Math.max(k,O)});m={min:[R.min[0],F.min[0]],max:[R.max[0],F.max[0]]}}else D=b?D+b:D,O=b?O-b:O,m=f.findExtremes(p,[p.r2c(g)],{ppadplus:Math.max(w,S,D),ppadminus:Math.max(k,C,O)});h._extremes[y]=m}o.exports=function(h){var p=h._fullLayout;if(l.filterVisible(p.annotations).length&&h._fullData.length)return l.syncOrAsync([s,c],h)}},44317:function(o,a,n){var l=n(71828),f=n(73972),s=n(44467).arrayEditor;function c(h,p){var m,y,v,g,b,x,_,w=h._fullLayout.annotations,k=[],T=[],M=[],S=(p||[]).length;for(m=0;m0||m.explicitOff.length>0},onClick:function(h,p){var m,y,v=c(h,p),g=v.on,b=v.off.concat(v.explicitOff),x={},_=h._fullLayout.annotations;if(g.length||b.length){for(m=0;m.6666666666666666?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[nt]}for(var we=!1,ke=["x","y"],Ae=0;Ae1)&&(Ye===qe?((Je=at.r2fraction(S["a"+Ue]))<0||Je>1)&&(we=!0):we=!0),Ee=at._offset+at.r2p(S[Ue]),Ie=.5}else{var ut=kt==="domain";Ue==="x"?(Re=S[Ue],Ee=ut?at._offset+at._length*Re:Ee=z.l+z.w*Re):(Re=1-S[Ue],Ee=ut?at._offset+at._length*Re:Ee=z.t+z.h*Re),Ie=S.showarrow?.5:Re}if(S.showarrow){it.head=Ee;var pt=S["a"+Ue];if(Be=ct*be(.5,S.xanchor)-bt*be(.5,S.yanchor),Ye===qe){var It=h.getRefType(Ye);It==="domain"?(Ue==="y"&&(pt=1-pt),it.tail=at._offset+at._length*pt):It==="paper"?Ue==="y"?(pt=1-pt,it.tail=z.t+z.h*pt):it.tail=z.l+z.w*pt:it.tail=at._offset+at.r2p(pt),De=Be}else it.tail=Ee+pt,De=Be+pt;it.text=it.tail+Be;var Mt=A[Ue==="x"?"width":"height"];if(qe==="paper"&&(it.head=c.constrain(it.head,1,Mt-1)),Ye==="pixel"){var zt=-Math.max(it.tail-3,it.text),wt=Math.min(it.tail+3,it.text)-Mt;zt>0?(it.tail+=zt,it.text+=zt):wt>0&&(it.tail-=wt,it.text-=wt)}it.tail+=Qe,it.head+=Qe}else De=Be=ze*be(Ie,Ne),it.text=Ee+Be;it.text+=Qe,Be+=Qe,De+=Qe,S["_"+Ue+"padplus"]=ze/2+De,S["_"+Ue+"padminus"]=ze/2-De,S["_"+Ue+"size"]=ze,S["_"+Ue+"shift"]=Be}if(we)ee.remove();else{var ve=0,_e=0;if(S.align!=="left"&&(ve=(de-J)*(S.align==="center"?.5:1)),S.valign!=="top"&&(_e=(xe-ne)*(S.valign==="middle"?.5:1)),ce)Me.select("svg").attr({x:Y+ve-1,y:Y+_e}).call(m.setClipUrl,X?W:null,M);else{var Ve=Y+_e-ye.top,We=Y+ve-ye.left;se.call(v.positionText,We,Ve).call(m.setClipUrl,X?W:null,M)}re.select("rect").call(m.setRect,Y,Y,de,xe),Z.call(m.setRect,U/2,U/2,ue-U,ge-U),ee.call(m.setTranslate,Math.round(G.x.text-ue/2),Math.round(G.y.text-ge/2)),H.attr({transform:"rotate("+L+","+G.x.text+","+G.y.text+")"});var Ze,Ge=function(Ke,nt){q.selectAll(".annotation-arrow-g").remove();var st=G.x.head,mt=G.y.head,tt=G.x.tail+Ke,Ft=G.y.tail+nt,Vt=G.x.text+Ke,St=G.y.text+nt,Nt=c.rotationXYMatrix(L,Vt,St),Dt=c.apply2DTransform(Nt),gt=c.apply2DTransform2(Nt),ht=+Z.attr("width"),yt=+Z.attr("height"),qt=Vt-.5*ht,Et=qt+ht,jt=St-.5*yt,Tt=jt+yt,Ot=[[qt,jt,qt,Tt],[qt,Tt,Et,Tt],[Et,Tt,Et,jt],[Et,jt,qt,jt]].map(gt);if(!Ot.reduce(function(an,sn){return an^!!c.segmentsIntersect(st,mt,st+1e6,mt+1e6,sn[0],sn[1],sn[2],sn[3])},!1)){Ot.forEach(function(an){var sn=c.segmentsIntersect(tt,Ft,st,mt,an[0],an[1],an[2],an[3]);sn&&(tt=sn.x,Ft=sn.y)});var At=S.arrowwidth,Lt=S.arrowcolor,Rt=S.arrowside,$t=q.append("g").style({opacity:p.opacity(Lt)}).classed("annotation-arrow-g",!0),Yt=$t.append("path").attr("d","M"+tt+","+Ft+"L"+st+","+mt).style("stroke-width",At+"px").call(p.stroke,p.rgb(Lt));if(_(Yt,Rt,S),B.annotationPosition&&Yt.node().parentNode&&!P){var Xt=st,Bt=mt;if(S.standoff){var Wt=Math.sqrt(Math.pow(st-tt,2)+Math.pow(mt-Ft,2));Xt+=S.standoff*(tt-st)/Wt,Bt+=S.standoff*(Ft-mt)/Wt}var tn,cn,ln=$t.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(tt-Xt)+","+(Ft-Bt),transform:d(Xt,Bt)}).style("stroke-width",At+6+"px").call(p.stroke,"rgba(0,0,0,0)").call(p.fill,"rgba(0,0,0,0)");b.init({element:ln.node(),gd:M,prepFn:function(){var an=m.getTranslate(ee);tn=an.x,cn=an.y,D&&D.autorange&&j(D._name+".autorange",!0),O&&O.autorange&&j(O._name+".autorange",!0)},moveFn:function(an,sn){var Zt=Dt(tn,cn),pn=Zt[0]+an,nn=Zt[1]+sn;ee.call(m.setTranslate,pn,nn),N("x",k(D,an,"x",z,S)),N("y",k(O,sn,"y",z,S)),S.axref===S.xref&&N("ax",k(D,an,"ax",z,S)),S.ayref===S.yref&&N("ay",k(O,sn,"ay",z,S)),$t.attr("transform",d(an,sn)),H.attr({transform:"rotate("+L+","+pn+","+nn+")"})},doneFn:function(){f.call("_guiRelayout",M,E());var an=document.querySelector(".js-notes-box-panel");an&&an.redraw(an.selectedObj)}})}}};S.showarrow&&Ge(0,0),V&&b.init({element:ee.node(),gd:M,prepFn:function(){Ze=H.attr("transform")},moveFn:function(Ke,nt){var st="pointer";if(S.showarrow)S.axref===S.xref?N("ax",k(D,Ke,"ax",z,S)):N("ax",S.ax+Ke),S.ayref===S.yref?N("ay",k(O,nt,"ay",z.w,S)):N("ay",S.ay+nt),Ge(Ke,nt);else{if(P)return;var mt,tt;if(D)mt=k(D,Ke,"x",z,S);else{var Ft=S._xsize/z.w,Vt=S.x+(S._xshift-S.xshift)/z.w-Ft/2;mt=b.align(Vt+Ke/z.w,Ft,0,1,S.xanchor)}if(O)tt=k(O,nt,"y",z,S);else{var St=S._ysize/z.h,Nt=S.y-(S._yshift+S.yshift)/z.h-St/2;tt=b.align(Nt-nt/z.h,St,0,1,S.yanchor)}N("x",mt),N("y",tt),D&&O||(st=b.getCursor(D?.5:mt,O?.5:tt,S.xanchor,S.yanchor))}H.attr({transform:d(Ke,nt)+Ze}),g(ee,st)},clickFn:function(Ke,nt){S.captureevents&&M.emit("plotly_clickannotation",pe(nt))},doneFn:function(){g(ee),f.call("_guiRelayout",M,E());var Ke=document.querySelector(".js-notes-box-panel");Ke&&Ke.redraw(Ke.selectedObj)}})}}}o.exports={draw:function(M){var S=M._fullLayout;S._infolayer.selectAll(".annotation").remove();for(var C=0;C=0,P=y.indexOf("end")>=0,D=k.backoff*M+v.standoff,O=T.backoff*S+v.startstandoff;if(w.nodeName==="line"){g={x:+m.attr("x1"),y:+m.attr("y1")},b={x:+m.attr("x2"),y:+m.attr("y2")};var R=g.x-b.x,F=g.y-b.y;if(_=(x=Math.atan2(F,R))+Math.PI,D&&O&&D+O>Math.sqrt(R*R+F*F))return void q();if(D){if(D*D>R*R+F*F)return void q();var A=D*Math.cos(x),z=D*Math.sin(x);b.x+=A,b.y+=z,m.attr({x2:b.x,y2:b.y})}if(O){if(O*O>R*R+F*F)return void q();var B=O*Math.cos(x),$=O*Math.sin(x);g.x-=B,g.y-=$,m.attr({x1:g.x,y1:g.y})}}else if(w.nodeName==="path"){var j=w.getTotalLength(),N="";if(j1){v=!0;break}}v?c.fullLayout._infolayer.select(".annotation-"+c.id+'[data-index="'+m+'"]').remove():(y._pdata=f(c.glplot.cameraParams,[d.xaxis.r2l(y.x)*h[0],d.yaxis.r2l(y.y)*h[1],d.zaxis.r2l(y.z)*h[2]]),l(c.graphDiv,y,m,c.id,y._xa,y._ya))}}},2468:function(o,a,n){var l=n(73972),f=n(71828);o.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:n(26997)}}},layoutAttributes:n(26997),handleDefaults:n(20226),includeBasePlot:function(s,c){var d=l.subplotsRegistry.gl3d;if(d)for(var h=d.attrRegex,p=Object.keys(s),m=0;m=0)))return y;if(_===3)b[_]>1&&(b[_]=1);else if(b[_]>=1)return y}var w=Math.round(255*b[0])+", "+Math.round(255*b[1])+", "+Math.round(255*b[2]);return x?"rgba("+w+", "+b[3]+")":"rgb("+w+")"}c.tinyRGB=function(y){var v=y.toRgb();return"rgb("+Math.round(v.r)+", "+Math.round(v.g)+", "+Math.round(v.b)+")"},c.rgb=function(y){return c.tinyRGB(l(y))},c.opacity=function(y){return y?l(y).getAlpha():0},c.addOpacity=function(y,v){var g=l(y).toRgb();return"rgba("+Math.round(g.r)+", "+Math.round(g.g)+", "+Math.round(g.b)+", "+v+")"},c.combine=function(y,v){var g=l(y).toRgb();if(g.a===1)return l(y).toRgbString();var b=l(v||p).toRgb(),x=b.a===1?b:{r:255*(1-b.a)+b.r*b.a,g:255*(1-b.a)+b.g*b.a,b:255*(1-b.a)+b.b*b.a},_={r:x.r*(1-g.a)+g.r*g.a,g:x.g*(1-g.a)+g.g*g.a,b:x.b*(1-g.a)+g.b*g.a};return l(_).toRgbString()},c.contrast=function(y,v,g){var b=l(y);return b.getAlpha()!==1&&(b=l(c.combine(y,p))),(b.isDark()?v?b.lighten(v):p:g?b.darken(g):h).toString()},c.stroke=function(y,v){var g=l(v);y.style({stroke:c.tinyRGB(g),"stroke-opacity":g.getAlpha()})},c.fill=function(y,v){var g=l(v);y.style({fill:c.tinyRGB(g),"fill-opacity":g.getAlpha()})},c.clean=function(y){if(y&&typeof y=="object"){var v,g,b,x,_=Object.keys(y);for(v=0;v<_.length;v++)if(x=y[b=_[v]],b.substr(b.length-5)==="color")if(Array.isArray(x))for(g=0;g0?wt>=Ze:wt<=Ze));ve++)wt>Ke&&wt0?wt>=Ze:wt<=Ze));ve++)wt>zt[0]&&wt1){var bt=Math.pow(10,Math.floor(Math.log(ct)/Math.LN10));at*=bt*p.roundUp(ct/bt,[2,5,10]),(Math.abs(J.start)/J.size+1e-6)%1<2e-6&&(qe.tick0=0)}qe.dtick=at}qe.domain=E?[Be+Y/se.h,Be+we-Y/se.h]:[Be+Q/se.w,Be+we-Q/se.w],qe.setScale(),$.attr("transform",m(Math.round(se.l),Math.round(se.t)));var ze,Ne=$.select("."+O.cbtitleunshift).attr("transform",m(-Math.round(se.l),-Math.round(se.t))),Qe=qe.ticklabelposition,it=qe.title.font.size,kt=$.select("."+O.cbaxis),Je=0,ut=0;function pt(It,Mt){var zt={propContainer:qe,propName:j._propPrefix+"title",traceIndex:j._traceIndex,_meta:j._meta,placeholder:le._dfltTitle.colorbar,containerGroup:$.select("."+O.cbtitle)},wt=It.charAt(0)==="h"?It.substr(1):"h"+It;$.selectAll("."+wt+",."+wt+"-math-group").remove(),x.draw(N,It,y(zt,Mt||{}))}return p.syncOrAsync([s.previousPromises,function(){var It,Mt;(E&&Ye||!E&&!Ye)&&(Oe==="top"&&(It=Q+se.l+ke*Z,Mt=Y+se.t+Ae*(1-Be-we)+3+.75*it),Oe==="bottom"&&(It=Q+se.l+ke*Z,Mt=Y+se.t+Ae*(1-Be)-3-.25*it),Oe==="right"&&(Mt=Y+se.t+Ae*X+3+.75*it,It=Q+se.l+ke*Be),pt(qe._id+"title",{attributes:{x:It,y:Mt,"text-anchor":E?"start":"middle"}}))},function(){if(!E&&!Ye||E&&Ye){var It,Mt=$.select("."+O.cbtitle),zt=Mt.select("text"),wt=[-H/2,H/2],ve=Mt.select(".h"+qe._id+"title-math-group").node(),_e=15.6;if(zt.node()&&(_e=parseInt(zt.node().style.fontSize,10)*C),ve?(It=g.bBox(ve),ut=It.width,(Je=It.height)>_e&&(wt[1]-=(Je-_e)/2)):zt.node()&&!zt.classed(O.jsPlaceholder)&&(It=g.bBox(zt.node()),ut=It.width,Je=It.height),E){if(Je){if(Je+=5,Oe==="top")qe.domain[1]-=Je/se.h,wt[1]*=-1;else{qe.domain[0]+=Je/se.h;var Ve=_.lineCount(zt);wt[1]+=(1-Ve)*_e}Mt.attr("transform",m(wt[0],wt[1])),qe.setScale()}}else ut&&(Oe==="right"&&(qe.domain[0]+=(ut+it/2)/se.w),Mt.attr("transform",m(wt[0],wt[1])),qe.setScale())}$.selectAll("."+O.cbfills+",."+O.cblines).attr("transform",E?m(0,Math.round(se.h*(1-qe.domain[1]))):m(Math.round(se.w*qe.domain[0]),0)),kt.attr("transform",E?m(0,Math.round(-se.t)):m(Math.round(-se.l),0));var We=$.select("."+O.cbfills).selectAll("rect."+O.cbfill).attr("style","").data(de);We.enter().append("rect").classed(O.cbfill,!0).attr("style",""),We.exit().remove();var Ze=Me.map(qe.c2p).map(Math.round).sort(function(mt,tt){return mt-tt});We.each(function(mt,tt){var Ft=[tt===0?Me[0]:(de[tt]+de[tt-1])/2,tt===de.length-1?Me[1]:(de[tt]+de[tt+1])/2].map(qe.c2p).map(Math.round);E&&(Ft[1]=p.constrain(Ft[1]+(Ft[1]>Ft[0])?1:-1,Ze[0],Ze[1]));var Vt=l.select(this).attr(E?"x":"y",Ee).attr(E?"y":"x",l.min(Ft)).attr(E?"width":"height",Math.max(ue,2)).attr(E?"height":"width",Math.max(l.max(Ft)-l.min(Ft),2));if(j._fillgradient)g.gradient(Vt,N,j._id,E?"vertical":"horizontalreversed",j._fillgradient,"fill");else{var St=ye(mt).replace("e-","");Vt.attr("fill",f(St).toHexString())}});var Ge=$.select("."+O.cblines).selectAll("path."+O.cbline).data(Te.color&&Te.width?xe:[]);Ge.enter().append("path").classed(O.cbline,!0),Ge.exit().remove(),Ge.each(function(mt){var tt=Ee,Ft=Math.round(qe.c2p(mt))+Te.width/2%1;l.select(this).attr("d","M"+(E?tt+","+Ft:Ft+","+tt)+(E?"h":"v")+ue).call(g.lineGroupStyle,Te.width,ce(mt),Te.dash)}),kt.selectAll("g."+qe._id+"tick,path").remove();var Ke=Ee+ue+(H||0)/2-(j.ticks==="outside"?1:0),nt=d.calcTicks(qe),st=d.getTickSigns(qe)[2];return d.drawTicks(N,qe,{vals:qe.ticks==="inside"?d.clipEnds(qe,nt):nt,layer:kt,path:d.makeTickPath(qe,Ke,st),transFn:d.makeTransTickFn(qe)}),d.drawLabels(N,qe,{vals:nt,layer:kt,transFn:d.makeTransTickLabelFn(qe),labelFns:d.makeLabelFns(qe,Ke)})},function(){if(E&&!Ye||!E&&Ye){var It,Mt,zt=qe.position||0,wt=qe._offset+qe._length/2;if(Oe==="right")Mt=wt,It=se.l+ke*zt+10+it*(qe.showticklabels?1:.5);else if(It=wt,Oe==="bottom"&&(Mt=se.t+Ae*zt+10+(Qe.indexOf("inside")===-1?qe.tickfont.size:0)+(qe.ticks!=="intside"&&j.ticklen||0)),Oe==="top"){var ve=Se.text.split("
").length;Mt=se.t+Ae*zt+10-ue-C*it*ve}pt((E?"h":"v")+qe._id+"title",{avoid:{selection:l.select(N).selectAll("g."+qe._id+"tick"),side:Oe,offsetTop:E?0:se.t,offsetLeft:E?se.l:0,maxShift:E?le.width:le.height},attributes:{x:It,y:Mt,"text-anchor":"middle"},transform:{rotate:E?-90:0,offset:0}})}},s.previousPromises,function(){var It,Mt=ue+H/2;Qe.indexOf("inside")===-1&&(It=g.bBox(kt.node()),Mt+=E?It.width:It.height),ze=Ne.select("text");var zt=0,wt=E&&Oe==="top",ve=!E&&Oe==="right",_e=0;if(ze.node()&&!ze.classed(O.jsPlaceholder)){var Ve,We=Ne.select(".h"+qe._id+"title-math-group").node();We&&(E&&Ye||!E&&!Ye)?(zt=(It=g.bBox(We)).width,Ve=It.height):(zt=(It=g.bBox(Ne.node())).right-se.l-(E?Ee:Ue),Ve=It.bottom-se.t-(E?Ue:Ee),E||Oe!=="top"||(Mt+=It.height,_e=It.height)),ve&&(ze.attr("transform",m(zt/2+it/2,0)),zt*=2),Mt=Math.max(Mt,E?zt:Ve)}var Ze=2*(E?Q:Y)+Mt+V+H/2,Ge=0;!E&&Se.text&&U==="bottom"&&X<=0&&(Ze+=Ge=Ze/2,_e+=Ge),le._hColorbarMoveTitle=Ge,le._hColorbarMoveCBTitle=_e;var Ke=V+H,nt=(E?Ee:Ue)-Ke/2-(E?Q:0),st=(E?Ue:Ee)-(E?be:Y+_e-Ge);$.select("."+O.cbbg).attr("x",nt).attr("y",st).attr(E?"width":"height",Math.max(Ze-Ge,2)).attr(E?"height":"width",Math.max(be+Ke,2)).call(b.fill,te).call(b.stroke,j.bordercolor).style("stroke-width",V);var mt=ve?Math.max(zt-10,0):0;$.selectAll("."+O.cboutline).attr("x",(E?Ee:Ue+Q)+mt).attr("y",(E?Ue+Y-be:Ee)+(wt?Je:0)).attr(E?"width":"height",Math.max(ue,2)).attr(E?"height":"width",Math.max(be-(E?2*Y+Je:2*Q+mt),2)).call(b.stroke,j.outlinecolor).style({fill:"none","stroke-width":H});var tt=E?De*Ze:0,Ft=E?0:(1-Re)*Ze-_e;if(tt=ie?se.l-tt:-tt,Ft=re?se.t-Ft:-Ft,$.attr("transform",m(tt,Ft)),!E&&(V||f(te).getAlpha()&&!f.equals(le.paper_bgcolor,te))){var Vt=kt.selectAll("text"),St=Vt[0].length,Nt=$.select("."+O.cbbg).node(),Dt=g.bBox(Nt),gt=g.getTranslate($);Vt.each(function(Rt,$t){var Yt=St-1;if($t===0||$t===Yt){var Xt,Bt=g.bBox(this),Wt=g.getTranslate(this);if($t===Yt){var tn=Bt.right+Wt.x;(Xt=Dt.right+gt.x+Ue-V-2+Z-tn)>0&&(Xt=0)}else if($t===0){var cn=Bt.left+Wt.x;(Xt=Dt.left+gt.x+Ue+V+2-cn)<0&&(Xt=0)}Xt&&(St<3?this.setAttribute("transform","translate("+Xt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var ht={},yt=P[ee],qt=D[ee],Et=P[U],jt=D[U],Tt=Ze-ue;E?(G==="pixels"?(ht.y=X,ht.t=be*Et,ht.b=be*jt):(ht.t=ht.b=0,ht.yt=X+W*Et,ht.yb=X-W*jt),q==="pixels"?(ht.x=Z,ht.l=Ze*yt,ht.r=Ze*qt):(ht.l=Tt*yt,ht.r=Tt*qt,ht.xl=Z-L*yt,ht.xr=Z+L*qt)):(G==="pixels"?(ht.x=Z,ht.l=be*yt,ht.r=be*qt):(ht.l=ht.r=0,ht.xl=Z+W*yt,ht.xr=Z-W*qt),q==="pixels"?(ht.y=1-X,ht.t=Ze*Et,ht.b=Ze*jt):(ht.t=Tt*Et,ht.b=Tt*jt,ht.yt=X-L*Et,ht.yb=X+L*jt));var Ot=j.y<.5?"b":"t",At=j.x<.5?"l":"r";N._fullLayout._reservedMargin[j._id]={};var Lt={r:le.width-nt-tt,l:nt+ht.r,b:le.height-st-Ft,t:st+ht.b};ie&&re?s.autoMargin(N,j._id,ht):ie?N._fullLayout._reservedMargin[j._id][Ot]=Lt[Ot]:re||E?N._fullLayout._reservedMargin[j._id][At]=Lt[At]:N._fullLayout._reservedMargin[j._id][Ot]=Lt[Ot]}],N)}(z,A,R);B&&B.then&&(R._promises||[]).push(B),R._context.edits.colorbarPosition&&function($,j,N){var E,W,G,L=j.orientation==="v",q=N._fullLayout._size;h.init({element:$.node(),gd:N,prepFn:function(){E=$.attr("transform"),v($)},moveFn:function(H,V){$.attr("transform",E+m(H,V)),W=h.align((L?j._uFrac:j._vFrac)+H/q.w,L?j._thickFrac:j._lenFrac,0,1,j.xanchor),G=h.align((L?j._vFrac:1-j._uFrac)-V/q.h,L?j._lenFrac:j._thickFrac,0,1,j.yanchor);var te=h.getCursor(W,G,j.xanchor,j.yanchor);v($,te)},doneFn:function(){if(v($),W!==void 0&&G!==void 0){var H={};H[j._propPrefix+"x"]=W,H[j._propPrefix+"y"]=G,j._traceIndex!==void 0?c.call("_guiRestyle",N,H,j._traceIndex):c.call("_guiRelayout",N,H)}}})}(z,A,R)}),F.exit().each(function(A){s.autoMargin(R,A._id)}).remove(),F.order()}}},76228:function(o,a,n){var l=n(71828);o.exports=function(f){return l.isPlainObject(f.colorbar)}},12311:function(o,a,n){o.exports={moduleType:"component",name:"colorbar",attributes:n(63583),supplyDefaults:n(62499),draw:n(98981).draw,hasColorbar:n(76228)}},50693:function(o,a,n){var l=n(63583),f=n(30587).counter,s=n(78607),c=n(63282).scales;function d(h){return"`"+h+"`"}s(c),o.exports=function(h,p){h=h||"";var m,y=(p=p||{}).cLetter||"c",v=("onlyIfNumerical"in p&&p.onlyIfNumerical,"noScale"in p?p.noScale:h==="marker.line"),g="showScaleDflt"in p?p.showScaleDflt:y==="z",b=typeof p.colorscaleDflt=="string"?c[p.colorscaleDflt]:null,x=p.editTypeOverride||"",_=h?h+".":"";"colorAttr"in p?(m=p.colorAttr,p.colorAttr):d(_+(m={z:"z",c:"color"}[y]));var w=y+"auto",k=y+"min",T=y+"max",M=y+"mid",S={};S[k]=S[T]=void 0;var C={};C[w]=!1;var P={};return m==="color"&&(P.color={valType:"color",arrayOk:!0,editType:x||"style"},p.anim&&(P.color.anim=!0)),P[w]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:S},P[k]={valType:"number",dflt:null,editType:x||"plot",impliedEdits:C},P[T]={valType:"number",dflt:null,editType:x||"plot",impliedEdits:C},P[M]={valType:"number",dflt:null,editType:"calc",impliedEdits:S},P.colorscale={valType:"colorscale",editType:"calc",dflt:b,impliedEdits:{autocolorscale:!1}},P.autocolorscale={valType:"boolean",dflt:p.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},P.reversescale={valType:"boolean",dflt:!1,editType:"plot"},v||(P.showscale={valType:"boolean",dflt:g,editType:"calc"},P.colorbar=l),p.noColorAxis||(P.coloraxis={valType:"subplotid",regex:f("coloraxis"),dflt:null,editType:"calc"}),P}},78803:function(o,a,n){var l=n(92770),f=n(71828),s=n(52075).extractOpts;o.exports=function(c,d,h){var p,m=c._fullLayout,y=h.vals,v=h.containerStr,g=v?f.nestedProperty(d,v).get():d,b=s(g),x=b.auto!==!1,_=b.min,w=b.max,k=b.mid,T=function(){return f.aggNums(Math.min,null,y)},M=function(){return f.aggNums(Math.max,null,y)};_===void 0?_=T():x&&(_=g._colorAx&&l(_)?Math.min(_,T()):T()),w===void 0?w=M():x&&(w=g._colorAx&&l(w)?Math.max(w,M()):M()),x&&k!==void 0&&(w-k>k-_?_=k-(w-k):w-k=0?m.colorscale.sequential:m.colorscale.sequentialminus,b._sync("colorscale",p))}},33046:function(o,a,n){var l=n(71828),f=n(52075).hasColorscale,s=n(52075).extractOpts;o.exports=function(c,d){function h(x,_){var w=x["_"+_];w!==void 0&&(x[_]=w)}function p(x,_){var w=_.container?l.nestedProperty(x,_.container).get():x;if(w)if(w.coloraxis)w._colorAx=d[w.coloraxis];else{var k=s(w),T=k.auto;(T||k.min===void 0)&&h(w,_.min),(T||k.max===void 0)&&h(w,_.max),k.autocolorscale&&h(w,"colorscale")}}for(var m=0;m=0;T--,M++){var S=_[T];k[M]=[1-S[0],S[1]]}return k}function b(_,w){w=w||{};for(var k=_.domain,T=_.range,M=T.length,S=new Array(M),C=0;C1.3333333333333333-h?d:h}},70461:function(o,a,n){var l=n(71828),f=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];o.exports=function(s,c,d,h){return s=d==="left"?0:d==="center"?1:d==="right"?2:l.constrain(Math.floor(3*s),0,2),c=h==="bottom"?0:h==="middle"?1:h==="top"?2:l.constrain(Math.floor(3*c),0,2),f[c][s]}},64505:function(o,a){a.selectMode=function(n){return n==="lasso"||n==="select"},a.drawMode=function(n){return n==="drawclosedpath"||n==="drawopenpath"||n==="drawline"||n==="drawrect"||n==="drawcircle"},a.openMode=function(n){return n==="drawline"||n==="drawopenpath"},a.rectMode=function(n){return n==="select"||n==="drawline"||n==="drawrect"||n==="drawcircle"},a.freeMode=function(n){return n==="lasso"||n==="drawclosedpath"||n==="drawopenpath"},a.selectingOrDrawing=function(n){return a.freeMode(n)||a.rectMode(n)}},28569:function(o,a,n){var l=n(48956),f=n(57035),s=n(38520),c=n(71828).removeElement,d=n(85555),h=o.exports={};h.align=n(92807),h.getCursor=n(70461);var p=n(26041);function m(){var v=document.createElement("div");v.className="dragcover";var g=v.style;return g.position="fixed",g.left=0,g.right=0,g.top=0,g.bottom=0,g.zIndex=999999999,g.background="none",document.body.appendChild(v),v}function y(v){return l(v.changedTouches?v.changedTouches[0]:v,document.body)}h.unhover=p.wrapped,h.unhoverRaw=p.raw,h.init=function(v){var g,b,x,_,w,k,T,M,S=v.gd,C=1,P=S._context.doubleClickDelay,D=v.element;S._mouseDownTime||(S._mouseDownTime=0),D.style.pointerEvents="all",D.onmousedown=R,s?(D._ontouchstart&&D.removeEventListener("touchstart",D._ontouchstart),D._ontouchstart=R,D.addEventListener("touchstart",R,{passive:!1})):D.ontouchstart=R;var O=v.clampFn||function(z,B,$){return Math.abs(z)<$&&(z=0),Math.abs(B)<$&&(B=0),[z,B]};function R(z){S._dragged=!1,S._dragging=!0;var B=y(z);g=B[0],b=B[1],T=z.target,k=z,M=z.buttons===2||z.ctrlKey,z.clientX===void 0&&z.clientY===void 0&&(z.clientX=g,z.clientY=b),(x=new Date().getTime())-S._mouseDownTimeP&&(C=Math.max(C-1,1)),S._dragged)v.doneFn&&v.doneFn();else if(v.clickFn&&v.clickFn(C,k),!M){var B;try{B=new MouseEvent("click",z)}catch{var $=y(z);(B=document.createEvent("MouseEvents")).initMouseEvent("click",z.bubbles,z.cancelable,z.view,z.detail,z.screenX,z.screenY,$[0],$[1],z.ctrlKey,z.altKey,z.shiftKey,z.metaKey,z.button,z.relatedTarget)}T.dispatchEvent(B)}S._dragging=!1,S._dragged=!1}else S._dragged=!1}},h.coverSlip=m},26041:function(o,a,n){var l=n(11086),f=n(79990),s=n(24401).getGraphDiv,c=n(26675),d=o.exports={};d.wrapped=function(h,p,m){(h=s(h))._fullLayout&&f.clear(h._fullLayout._uid+c.HOVERID),d.raw(h,p,m)},d.raw=function(h,p){var m=h._fullLayout,y=h._hoverdata;p||(p={}),p.target&&!h._dragged&&l.triggerHandler(h,"plotly_beforehover",p)===!1||(m._hoverlayer.selectAll("g").remove(),m._hoverlayer.selectAll("line").remove(),m._hoverlayer.selectAll("circle").remove(),h._hoverdata=void 0,p.target&&y&&h.emit("plotly_unhover",{event:p,points:y}))}},79952:function(o,a){a.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},a.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},91424:function(o,a,n){var l=n(39898),f=n(71828),s=f.numberFormat,c=n(92770),d=n(84267),h=n(73972),p=n(7901),m=n(21081),y=f.strTranslate,v=n(63893),g=n(77922),b=n(18783).LINE_SPACING,x=n(37822).DESELECTDIM,_=n(34098),w=n(39984),k=n(23469).appendArrayPointValue,T=o.exports={};function M(ce,ye,J){var ne=ye.fillpattern,de=ne&&T.getPatternAttr(ne.shape,0,"");if(de){var xe=T.getPatternAttr(ne.bgcolor,0,null),ue=T.getPatternAttr(ne.fgcolor,0,null),ge=ne.fgopacity,be=T.getPatternAttr(ne.size,0,8),we=T.getPatternAttr(ne.solidity,0,.3),ke=ye.uid;T.pattern(ce,"point",J,ke,de,be,we,void 0,ne.fillmode,xe,ue,ge)}else ye.fillcolor&&ce.call(p.fill,ye.fillcolor)}T.font=function(ce,ye,J,ne){f.isPlainObject(ye)&&(ne=ye.color,J=ye.size,ye=ye.family),ye&&ce.style("font-family",ye),J+1&&ce.style("font-size",J+"px"),ne&&ce.call(p.fill,ne)},T.setPosition=function(ce,ye,J){ce.attr("x",ye).attr("y",J)},T.setSize=function(ce,ye,J){ce.attr("width",ye).attr("height",J)},T.setRect=function(ce,ye,J,ne,de){ce.call(T.setPosition,ye,J).call(T.setSize,ne,de)},T.translatePoint=function(ce,ye,J,ne){var de=J.c2p(ce.x),xe=ne.c2p(ce.y);return!!(c(de)&&c(xe)&&ye.node())&&(ye.node().nodeName==="text"?ye.attr("x",de).attr("y",xe):ye.attr("transform",y(de,xe)),!0)},T.translatePoints=function(ce,ye,J){ce.each(function(ne){var de=l.select(this);T.translatePoint(ne,de,ye,J)})},T.hideOutsideRangePoint=function(ce,ye,J,ne,de,xe){ye.attr("display",J.isPtWithinRange(ce,de)&&ne.isPtWithinRange(ce,xe)?null:"none")},T.hideOutsideRangePoints=function(ce,ye){if(ye._hasClipOnAxisFalse){var J=ye.xaxis,ne=ye.yaxis;ce.each(function(de){var xe=de[0].trace,ue=xe.xcalendar,ge=xe.ycalendar,be=h.traceIs(xe,"bar-like")?".bartext":".point,.textpoint";ce.selectAll(be).each(function(we){T.hideOutsideRangePoint(we,l.select(this),J,ne,ue,ge)})})}},T.crispRound=function(ce,ye,J){return ye&&c(ye)?ce._context.staticPlot?ye:ye<1?1:Math.round(ye):J||0},T.singleLineStyle=function(ce,ye,J,ne,de){ye.style("fill","none");var xe=(((ce||[])[0]||{}).trace||{}).line||{},ue=J||xe.width||0,ge=de||xe.dash||"";p.stroke(ye,ne||xe.color),T.dashLine(ye,ge,ue)},T.lineGroupStyle=function(ce,ye,J,ne){ce.style("fill","none").each(function(de){var xe=(((de||[])[0]||{}).trace||{}).line||{},ue=ye||xe.width||0,ge=ne||xe.dash||"";l.select(this).call(p.stroke,J||xe.color).call(T.dashLine,ge,ue)})},T.dashLine=function(ce,ye,J){J=+J||0,ye=T.dashStyle(ye,J),ce.style({"stroke-dasharray":ye,"stroke-width":J+"px"})},T.dashStyle=function(ce,ye){ye=+ye||1;var J=Math.max(ye,3);return ce==="solid"?ce="":ce==="dot"?ce=J+"px,"+J+"px":ce==="dash"?ce=3*J+"px,"+3*J+"px":ce==="longdash"?ce=5*J+"px,"+5*J+"px":ce==="dashdot"?ce=3*J+"px,"+J+"px,"+J+"px,"+J+"px":ce==="longdashdot"&&(ce=5*J+"px,"+2*J+"px,"+J+"px,"+2*J+"px"),ce},T.singleFillStyle=function(ce,ye){var J=l.select(ce.node());M(ce,((J.data()[0]||[])[0]||{}).trace||{},ye)},T.fillGroupStyle=function(ce,ye){ce.style("stroke-width",0).each(function(J){var ne=l.select(this);J[0].trace&&M(ne,J[0].trace,ye)})};var S=n(90998);T.symbolNames=[],T.symbolFuncs=[],T.symbolBackOffs=[],T.symbolNeedLines={},T.symbolNoDot={},T.symbolNoFill={},T.symbolList=[],Object.keys(S).forEach(function(ce){var ye=S[ce],J=ye.n;T.symbolList.push(J,String(J),ce,J+100,String(J+100),ce+"-open"),T.symbolNames[J]=ce,T.symbolFuncs[J]=ye.f,T.symbolBackOffs[J]=ye.backoff||0,ye.needLine&&(T.symbolNeedLines[J]=!0),ye.noDot?T.symbolNoDot[J]=!0:T.symbolList.push(J+200,String(J+200),ce+"-dot",J+300,String(J+300),ce+"-open-dot"),ye.noFill&&(T.symbolNoFill[J]=!0)});var C=T.symbolNames.length;function P(ce,ye,J,ne){var de=ce%100;return T.symbolFuncs[de](ye,J,ne)+(ce>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}T.symbolNumber=function(ce){if(c(ce))ce=+ce;else if(typeof ce=="string"){var ye=0;ce.indexOf("-open")>0&&(ye=100,ce=ce.replace("-open","")),ce.indexOf("-dot")>0&&(ye+=200,ce=ce.replace("-dot","")),(ce=T.symbolNames.indexOf(ce))>=0&&(ce+=ye)}return ce%100>=C||ce>=400?0:Math.floor(Math.max(ce,0))};var D={x1:1,x2:0,y1:0,y2:0},O={x1:0,x2:0,y1:1,y2:0},R=s("~f"),F={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:D},horizontalreversed:{node:"linearGradient",attrs:D,reversed:!0},vertical:{node:"linearGradient",attrs:O},verticalreversed:{node:"linearGradient",attrs:O,reversed:!0}};T.gradient=function(ce,ye,J,ne,de,xe){for(var ue=de.length,ge=F[ne],be=new Array(ue),we=0;we=0&&ce.i===void 0&&(ce.i=xe.i),ye.style("opacity",ne.selectedOpacityFn?ne.selectedOpacityFn(ce):ce.mo===void 0?ue.opacity:ce.mo),ne.ms2mrc){var be;be=ce.ms==="various"||ue.size==="various"?3:ne.ms2mrc(ce.ms),ce.mrc=be,ne.selectedSizeFn&&(be=ce.mrc=ne.selectedSizeFn(ce));var we=T.symbolNumber(ce.mx||ue.symbol)||0;ce.om=we%200>=100;var ke=Me(ce,J),Ae=Y(ce,J);ye.attr("d",P(we,be,ke,Ae))}var Ee,De,Re,Ie=!1;if(ce.so)Re=ge.outlierwidth,De=ge.outliercolor,Ee=ue.outliercolor;else{var Be=(ge||{}).width;Re=(ce.mlw+1||Be+1||(ce.trace?(ce.trace.marker.line||{}).width:0)+1)-1||0,De="mlc"in ce?ce.mlcc=ne.lineScale(ce.mlc):f.isArrayOrTypedArray(ge.color)?p.defaultLine:ge.color,f.isArrayOrTypedArray(ue.color)&&(Ee=p.defaultLine,Ie=!0),Ee="mc"in ce?ce.mcc=ne.markerScale(ce.mc):ue.color||ue.colors||"rgba(0,0,0,0)",ne.selectedColorFn&&(Ee=ne.selectedColorFn(ce))}if(ce.om)ye.call(p.stroke,Ee).style({"stroke-width":(Re||1)+"px",fill:"none"});else{ye.style("stroke-width",(ce.isBlank?0:Re)+"px");var Ue=ue.gradient,qe=ce.mgt;qe?Ie=!0:qe=Ue&&Ue.type,f.isArrayOrTypedArray(qe)&&(qe=qe[0],F[qe]||(qe=0));var Ye=ue.pattern,at=Ye&&T.getPatternAttr(Ye.shape,ce.i,"");if(qe&&qe!=="none"){var lt=ce.mgc;lt?Ie=!0:lt=Ue.color;var ct=J.uid;Ie&&(ct+="-"+ce.i),T.gradient(ye,de,ct,qe,[[0,lt],[1,Ee]],"fill")}else if(at){var bt=!1,ze=Ye.fgcolor;!ze&&xe&&xe.color&&(ze=xe.color,bt=!0);var Ne=T.getPatternAttr(ze,ce.i,xe&&xe.color||null),Qe=T.getPatternAttr(Ye.bgcolor,ce.i,null),it=Ye.fgopacity,kt=T.getPatternAttr(Ye.size,ce.i,8),Je=T.getPatternAttr(Ye.solidity,ce.i,.3);bt=bt||ce.mcc||f.isArrayOrTypedArray(Ye.shape)||f.isArrayOrTypedArray(Ye.bgcolor)||f.isArrayOrTypedArray(Ye.fgcolor)||f.isArrayOrTypedArray(Ye.size)||f.isArrayOrTypedArray(Ye.solidity);var ut=J.uid;bt&&(ut+="-"+ce.i),T.pattern(ye,"point",de,ut,at,kt,Je,ce.mcc,Ye.fillmode,Qe,Ne,it)}else f.isArrayOrTypedArray(Ee)?p.fill(ye,Ee[ce.i]):p.fill(ye,Ee);Re&&p.stroke(ye,De)}},T.makePointStyleFns=function(ce){var ye={},J=ce.marker;return ye.markerScale=T.tryColorscale(J,""),ye.lineScale=T.tryColorscale(J,"line"),h.traceIs(ce,"symbols")&&(ye.ms2mrc=_.isBubble(ce)?w(ce):function(){return(J.size||6)/2}),ce.selectedpoints&&f.extendFlat(ye,T.makeSelectedPointStyleFns(ce)),ye},T.makeSelectedPointStyleFns=function(ce){var ye={},J=ce.selected||{},ne=ce.unselected||{},de=ce.marker||{},xe=J.marker||{},ue=ne.marker||{},ge=de.opacity,be=xe.opacity,we=ue.opacity,ke=be!==void 0,Ae=we!==void 0;(f.isArrayOrTypedArray(ge)||ke||Ae)&&(ye.selectedOpacityFn=function(at){var lt=at.mo===void 0?de.opacity:at.mo;return at.selected?ke?be:lt:Ae?we:x*lt});var Ee=de.color,De=xe.color,Re=ue.color;(De||Re)&&(ye.selectedColorFn=function(at){var lt=at.mcc||Ee;return at.selected?De||lt:Re||lt});var Ie=de.size,Be=xe.size,Ue=ue.size,qe=Be!==void 0,Ye=Ue!==void 0;return h.traceIs(ce,"symbols")&&(qe||Ye)&&(ye.selectedSizeFn=function(at){var lt=at.mrc||Ie/2;return at.selected?qe?Be/2:lt:Ye?Ue/2:lt}),ye},T.makeSelectedTextStyleFns=function(ce){var ye={},J=ce.selected||{},ne=ce.unselected||{},de=ce.textfont||{},xe=J.textfont||{},ue=ne.textfont||{},ge=de.color,be=xe.color,we=ue.color;return ye.selectedTextColorFn=function(ke){var Ae=ke.tc||ge;return ke.selected?be||Ae:we||(be?Ae:p.addOpacity(Ae,x))},ye},T.selectedPointStyle=function(ce,ye){if(ce.size()&&ye.selectedpoints){var J=T.makeSelectedPointStyleFns(ye),ne=ye.marker||{},de=[];J.selectedOpacityFn&&de.push(function(xe,ue){xe.style("opacity",J.selectedOpacityFn(ue))}),J.selectedColorFn&&de.push(function(xe,ue){p.fill(xe,J.selectedColorFn(ue))}),J.selectedSizeFn&&de.push(function(xe,ue){var ge=ue.mx||ne.symbol||0,be=J.selectedSizeFn(ue);xe.attr("d",P(T.symbolNumber(ge),be,Me(ue,ye),Y(ue,ye))),ue.mrc2=be}),de.length&&ce.each(function(xe){for(var ue=l.select(this),ge=0;ge0?J:0}function N(ce,ye,J){return J&&(ce=H(ce)),ye?W(ce[1]):E(ce[0])}function E(ce){var ye=l.round(ce,2);return A=ye,ye}function W(ce){var ye=l.round(ce,2);return z=ye,ye}function G(ce,ye,J,ne){var de=ce[0]-ye[0],xe=ce[1]-ye[1],ue=J[0]-ye[0],ge=J[1]-ye[1],be=Math.pow(de*de+xe*xe,.25),we=Math.pow(ue*ue+ge*ge,.25),ke=(we*we*de-be*be*ue)*ne,Ae=(we*we*xe-be*be*ge)*ne,Ee=3*we*(be+we),De=3*be*(be+we);return[[E(ye[0]+(Ee&&ke/Ee)),W(ye[1]+(Ee&&Ae/Ee))],[E(ye[0]-(De&&ke/De)),W(ye[1]-(De&&Ae/De))]]}T.textPointStyle=function(ce,ye,J){if(ce.size()){var ne;if(ye.selectedpoints){var de=T.makeSelectedTextStyleFns(ye);ne=de.selectedTextColorFn}var xe=ye.texttemplate,ue=J._fullLayout;ce.each(function(ge){var be=l.select(this),we=xe?f.extractOption(ge,ye,"txt","texttemplate"):f.extractOption(ge,ye,"tx","text");if(we||we===0){if(xe){var ke=ye._module.formatLabels,Ae=ke?ke(ge,ye,ue):{},Ee={};k(Ee,ye,ge.i);var De=ye._meta||{};we=f.texttemplateString(we,Ae,ue._d3locale,Ee,ge,De)}var Re=ge.tp||ye.textposition,Ie=j(ge,ye),Be=ne?ne(ge):ge.tc||ye.textfont.color;be.call(T.font,ge.tf||ye.textfont.family,Ie,Be).text(we).call(v.convertToTspans,J).call($,Re,Ie,ge.mrc)}else be.remove()})}},T.selectedTextStyle=function(ce,ye){if(ce.size()&&ye.selectedpoints){var J=T.makeSelectedTextStyleFns(ye);ce.each(function(ne){var de=l.select(this),xe=J.selectedTextColorFn(ne),ue=ne.tp||ye.textposition,ge=j(ne,ye);p.fill(de,xe);var be=h.traceIs(ye,"bar-like");$(de,ue,ge,ne.mrc2||ne.mrc,be)})}},T.smoothopen=function(ce,ye){if(ce.length<3)return"M"+ce.join("L");var J,ne="M"+ce[0],de=[];for(J=1;J=be||at>=ke&&at<=be)&&(lt<=Ae&<>=we||lt>=Ae&<<=we)&&(ce=[at,lt])}return ce}T.steps=function(ce){var ye=L[ce]||q;return function(J){for(var ne="M"+E(J[0][0])+","+W(J[0][1]),de=J.length,xe=1;xe=1e4&&(T.savedBBoxes={},V=0),J&&(T.savedBBoxes[J]=De),V++,f.extendFlat({},De)},T.setClipUrl=function(ce,ye,J){ce.attr("clip-path",ee(ye,J))},T.getTranslate=function(ce){var ye=(ce[ce.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(J,ne,de){return[ne,de].join(" ")}).split(" ");return{x:+ye[0]||0,y:+ye[1]||0}},T.setTranslate=function(ce,ye,J){var ne=ce.attr?"attr":"getAttribute",de=ce.attr?"attr":"setAttribute",xe=ce[ne]("transform")||"";return ye=ye||0,J=J||0,xe=xe.replace(/(\btranslate\(.*?\);?)/,"").trim(),xe=(xe+=y(ye,J)).trim(),ce[de]("transform",xe),xe},T.getScale=function(ce){var ye=(ce[ce.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(J,ne,de){return[ne,de].join(" ")}).split(" ");return{x:+ye[0]||1,y:+ye[1]||1}},T.setScale=function(ce,ye,J){var ne=ce.attr?"attr":"getAttribute",de=ce.attr?"attr":"setAttribute",xe=ce[ne]("transform")||"";return ye=ye||1,J=J||1,xe=xe.replace(/(\bscale\(.*?\);?)/,"").trim(),xe=(xe+="scale("+ye+","+J+")").trim(),ce[de]("transform",xe),xe};var U=/\s*sc.*/;T.setPointGroupScale=function(ce,ye,J){if(ye=ye||1,J=J||1,ce){var ne=ye===1&&J===1?"":"scale("+ye+","+J+")";ce.each(function(){var de=(this.getAttribute("transform")||"").replace(U,"");de=(de+=ne).trim(),this.setAttribute("transform",de)})}};var Q=/translate\([^)]*\)\s*$/;function Y(ce,ye){var J;return ce&&(J=ce.mf),J===void 0&&(J=ye.marker&&ye.marker.standoff||0),ye._geo||ye._xA?J:-J}T.setTextPointsScale=function(ce,ye,J){ce&&ce.each(function(){var ne,de=l.select(this),xe=de.select("text");if(xe.node()){var ue=parseFloat(xe.attr("x")||0),ge=parseFloat(xe.attr("y")||0),be=(de.attr("transform")||"").match(Q);ne=ye===1&&J===1?[]:[y(ue,ge),"scale("+ye+","+J+")",y(-ue,-ge)],be&&ne.push(be),de.attr("transform",ne.join(""))}})},T.getMarkerStandoff=Y;var Z,X,re,ie,le,se,pe=Math.atan2,Te=Math.cos,Se=Math.sin;function Oe(ce,ye){var J=ye[0],ne=ye[1];return[J*Te(ce)-ne*Se(ce),J*Se(ce)+ne*Te(ce)]}function Me(ce,ye){var J,ne,de=ce.ma;de===void 0&&(de=ye.marker.angle||0);var xe=ye.marker.angleref;if(xe==="previous"||xe==="north"){if(ye._geo){var ue=ye._geo.project(ce.lonlat);J=ue[0],ne=ue[1]}else{var ge=ye._xA,be=ye._yA;if(!ge||!be)return 90;J=ge.c2p(ce.x),ne=be.c2p(ce.y)}if(ye._geo){var we,ke=ce.lonlat[0],Ae=ce.lonlat[1],Ee=ye._geo.project([ke,Ae+1e-5]),De=ye._geo.project([ke+1e-5,Ae]),Re=pe(De[1]-ne,De[0]-J),Ie=pe(Ee[1]-ne,Ee[0]-J);if(xe==="north")we=de/180*Math.PI;else if(xe==="previous"){var Be=ke/180*Math.PI,Ue=Ae/180*Math.PI,qe=Z/180*Math.PI,Ye=X/180*Math.PI,at=qe-Be,lt=Te(Ye)*Se(at),ct=Se(Ye)*Te(Ue)-Te(Ye)*Se(Ue)*Te(at);we=-pe(lt,ct)-Math.PI,Z=ke,X=Ae}var bt=Oe(Re,[Te(we),0]),ze=Oe(Ie,[Se(we),0]);de=pe(bt[1]+ze[1],bt[0]+ze[0])/Math.PI*180,xe!=="previous"||se===ye.uid&&ce.i===le+1||(de=null)}if(xe==="previous"&&!ye._geo)if(se===ye.uid&&ce.i===le+1&&c(J)&&c(ne)){var Ne=J-re,Qe=ne-ie,it=ye.line&&ye.line.shape||"",kt=it.slice(it.length-1);kt==="h"&&(Qe=0),kt==="v"&&(Ne=0),de+=pe(Qe,Ne)/Math.PI*180+90}else de=null}return re=J,ie=ne,le=ce.i,se=ye.uid,de}T.getMarkerAngle=Me},90998:function(o,a,n){var l,f,s,c,d=n(95616),h=n(39898).round,p="M0,0Z",m=Math.sqrt(2),y=Math.sqrt(3),v=Math.PI,g=Math.cos,b=Math.sin;function x(w){return w===null}function _(w,k,T){if(!(w&&w%360!=0||k))return T;if(s===w&&c===k&&l===T)return f;function M(N,E){var W=g(N),G=b(N),L=E[0],q=E[1]+(k||0);return[L*W-q*G,L*G+q*W]}s=w,c=k,l=T;for(var S=w/180*v,C=0,P=0,D=d(T),O="",R=0;R0,b=d._context.staticPlot;h.each(function(x){var _,w=x[0].trace,k=w.error_x||{},T=w.error_y||{};w.ids&&(_=function(P){return P.id});var M=c.hasMarkers(w)&&w.marker.maxdisplayed>0;T.visible||k.visible||(x=[]);var S=l.select(this).selectAll("g.errorbar").data(x,_);if(S.exit().remove(),x.length){k.visible||S.selectAll("path.xerror").remove(),T.visible||S.selectAll("path.yerror").remove(),S.style("opacity",1);var C=S.enter().append("g").classed("errorbar",!0);g&&C.style("opacity",0).transition().duration(m.duration).style("opacity",1),s.setClipUrl(S,p.layerClipId,d),S.each(function(P){var D=l.select(this),O=function($,j,N){var E={x:j.c2p($.x),y:N.c2p($.y)};return $.yh!==void 0&&(E.yh=N.c2p($.yh),E.ys=N.c2p($.ys),f(E.ys)||(E.noYS=!0,E.ys=N.c2p($.ys,!0))),$.xh!==void 0&&(E.xh=j.c2p($.xh),E.xs=j.c2p($.xs),f(E.xs)||(E.noXS=!0,E.xs=j.c2p($.xs,!0))),E}(P,y,v);if(!M||P.vis){var R,F=D.select("path.yerror");if(T.visible&&f(O.x)&&f(O.yh)&&f(O.ys)){var A=T.width;R="M"+(O.x-A)+","+O.yh+"h"+2*A+"m-"+A+",0V"+O.ys,O.noYS||(R+="m-"+A+",0h"+2*A),F.size()?g&&(F=F.transition().duration(m.duration).ease(m.easing)):F=D.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("yerror",!0),F.attr("d",R)}else F.remove();var z=D.select("path.xerror");if(k.visible&&f(O.y)&&f(O.xh)&&f(O.xs)){var B=(k.copy_ystyle?T:k).width;R="M"+O.xh+","+(O.y-B)+"v"+2*B+"m0,-"+B+"H"+O.xs,O.noXS||(R+="m0,-"+B+"v"+2*B),z.size()?g&&(z=z.transition().duration(m.duration).ease(m.easing)):z=D.append("path").style("vector-effect",b?"none":"non-scaling-stroke").classed("xerror",!0),z.attr("d",R)}else z.remove()}})}})}},62662:function(o,a,n){var l=n(39898),f=n(7901);o.exports=function(s){s.each(function(c){var d=c[0].trace,h=d.error_y||{},p=d.error_x||{},m=l.select(this);m.selectAll("path.yerror").style("stroke-width",h.thickness+"px").call(f.stroke,h.color),p.copy_ystyle&&(p=h),m.selectAll("path.xerror").style("stroke-width",p.thickness+"px").call(f.stroke,p.color)})}},77914:function(o,a,n){var l=n(41940),f=n(528).hoverlabel,s=n(1426).extendFlat;o.exports={hoverlabel:{bgcolor:s({},f.bgcolor,{arrayOk:!0}),bordercolor:s({},f.bordercolor,{arrayOk:!0}),font:l({arrayOk:!0,editType:"none"}),align:s({},f.align,{arrayOk:!0}),namelength:s({},f.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(o,a,n){var l=n(71828),f=n(73972);function s(c,d,h,p){p=p||l.identity,Array.isArray(c)&&(d[0][h]=p(c))}o.exports=function(c){var d=c.calcdata,h=c._fullLayout;function p(b){return function(x){return l.coerceHoverinfo({hoverinfo:x},{_module:b._module},h)}}for(var m=0;m=0&&y.indexde[0]._length||pt<0||pt>xe[0]._length)return b.unhoverRaw(ie,le)}else ut="xpx"in le?le.xpx:de[0]._length/2,pt="ypx"in le?le.ypx:xe[0]._length/2;if(le.pointerX=ut+de[0]._offset,le.pointerY=pt+xe[0]._offset,De="xval"in le?w.flat(Se,le.xval):w.p2c(de,ut),Re="yval"in le?w.flat(Se,le.yval):w.p2c(xe,pt),!f(De[0])||!f(Re[0]))return c.warn("Fx.hover failed",le,ie),b.unhoverRaw(ie,le)}var zt=1/0;function wt(Zt,pn){for(Be=0;BeNe&&(Qe.splice(0,Ne),zt=Qe[0].distance),ye&&Ee!==0&&Qe.length===0){ze.distance=Ee,ze.index=!1;var Dn=qe._module.hoverPoints(ze,ct,bt,"closest",{hoverLayer:Oe._hoverlayer});if(Dn&&(Dn=Dn.filter(function(lr){return lr.spikeDistance<=Ee})),Dn&&Dn.length){var wn,En=Dn.filter(function(lr){return lr.xa.showspikes&&lr.xa.spikesnap!=="hovered data"});if(En.length){var tr=En[0];f(tr.x0)&&f(tr.y0)&&(wn=_e(tr),(!kt.vLinePoint||kt.vLinePoint.spikeDistance>wn.spikeDistance)&&(kt.vLinePoint=wn))}var oa=Dn.filter(function(lr){return lr.ya.showspikes&&lr.ya.spikesnap!=="hovered data"});if(oa.length){var da=oa[0];f(da.x0)&&f(da.y0)&&(wn=_e(da),(!kt.hLinePoint||kt.hLinePoint.spikeDistance>wn.spikeDistance)&&(kt.hLinePoint=wn))}}}}}function ve(Zt,pn,nn){for(var Kt,On=null,Tn=1/0,Dn=0;Dn0&&Math.abs(Zt.distance)Ft-1;Vt--)gt(Qe[Vt]);Qe=St,Ze()}var ht=ie._hoverdata,yt=[],qt=te(ie),Et=ee(ie);for(Ie=0;Ie1||Qe.length>1)||ke==="closest"&&Je&&Qe.length>1,cn=g.combine(Oe.plot_bgcolor||g.background,Oe.paper_bgcolor),ln=j(Qe,{gd:ie,hovermode:ke,rotateLabels:tn,bgColor:cn,container:Oe._hoverlayer,outerContainer:Oe._paper.node(),commonLabelOpts:Oe.hoverlabel,hoverdistance:Oe.hoverdistance}),an=ln.hoverLabels;if(w.isUnifiedHover(ke)||(function(Zt,pn,nn,Kt){var On,Tn,Dn,wn,En,tr,oa,da=pn?"xa":"ya",lr=pn?"ya":"xa",ti=0,Ar=1,ur=Zt.size(),kr=new Array(ur),la=0,An=Kt.minX,on=Kt.maxX,$n=Kt.minY,Pr=Kt.maxY,Ln=function(kn){return kn*nn._invScaleX},Bn=function(kn){return kn*nn._invScaleY};function jn(kn){var Dr=kn[0],Aa=kn[kn.length-1];if(Tn=Dr.pmin-Dr.pos-Dr.dp+Dr.size,Dn=Aa.pos+Aa.dp+Aa.size-Dr.pmax,Tn>.01){for(En=kn.length-1;En>=0;En--)kn[En].dp+=Tn;On=!1}if(!(Dn<.01)){if(Tn<-.01){for(En=kn.length-1;En>=0;En--)kn[En].dp-=Dn;On=!1}if(On){var Br=0;for(wn=0;wnDr.pmax&&Br++;for(wn=kn.length-1;wn>=0&&!(Br<=0);wn--)(tr=kn[wn]).pos>Dr.pmax-1&&(tr.del=!0,Br--);for(wn=0;wn=0;En--)kn[En].dp-=Dn;for(wn=kn.length-1;wn>=0&&!(Br<=0);wn--)(tr=kn[wn]).pos+tr.dp+tr.size>Dr.pmax&&(tr.del=!0,Br--)}}}for(Zt.each(function(kn){var Dr=kn[da],Aa=kn[lr],Br=Dr._id.charAt(0)==="x",Fi=Dr.range;la===0&&Fi&&Fi[0]>Fi[1]!==Br&&(Ar=-1);var Ni=0,mi=Br?nn.width:nn.height;if(nn.hovermode==="x"||nn.hovermode==="y"){var ni,Ga,vi=E(kn,pn),us=kn.anchor,nl=us==="end"?-1:1;if(us==="middle")Ga=(ni=kn.crossPos+(Br?Bn(vi.y-kn.by/2):Ln(kn.bx/2+kn.tx2width/2)))+(Br?Bn(kn.by):Ln(kn.bx));else if(Br)Ga=(ni=kn.crossPos+Bn(R+vi.y)-Bn(kn.by/2-R))+Bn(kn.by);else{var cs=Ln(nl*R+vi.x),oo=cs+Ln(nl*kn.bx);ni=kn.crossPos+Math.min(cs,oo),Ga=kn.crossPos+Math.max(cs,oo)}Br?$n!==void 0&&Pr!==void 0&&Math.min(Ga,Pr)-Math.max(ni,$n)>1&&(Aa.side==="left"?(Ni=Aa._mainLinePosition,mi=nn.width):mi=Aa._mainLinePosition):An!==void 0&&on!==void 0&&Math.min(Ga,on)-Math.max(ni,An)>1&&(Aa.side==="top"?(Ni=Aa._mainLinePosition,mi=nn.height):mi=Aa._mainLinePosition)}kr[la++]=[{datum:kn,traceIndex:kn.trace.index,dp:0,pos:kn.pos,posref:kn.posref,size:kn.by*(Br?P:1)/2,pmin:Ni,pmax:mi}]}),kr.sort(function(kn,Dr){return kn[0].posref-Dr[0].posref||Ar*(Dr[0].traceIndex-kn[0].traceIndex)});!On&&ti<=ur;){for(ti++,On=!0,wn=0;wn.01&&xr.pmin===Mr.pmin&&xr.pmax===Mr.pmax){for(En=Lr.length-1;En>=0;En--)Lr[En].dp+=Tn;for(Un.push.apply(Un,Lr),kr.splice(wn+1,1),oa=0,En=Un.length-1;En>=0;En--)oa+=Un[En].dp;for(Dn=oa/Un.length,En=Un.length-1;En>=0;En--)Un[En].dp-=Dn;On=!1}else wn++}kr.forEach(jn)}for(wn=kr.length-1;wn>=0;wn--){var Na=kr[wn];for(En=Na.length-1;En>=0;En--){var wa=Na[En],sa=wa.datum;sa.offset=wa.dp,sa.del=wa.del}}}(an,tn,Oe,ln.commonLabelBoundingBox),W(an,tn,Oe._invScaleX,Oe._invScaleY)),Te&&Te.tagName){var sn=_.getComponentMethod("annotations","hasClickToShow")(ie,yt);y(l.select(Te),sn?"pointer":"")}Te&&!pe&&function(Zt,pn,nn){if(!nn||nn.length!==Zt._hoverdata.length)return!0;for(var Kt=nn.length-1;Kt>=0;Kt--){var On=nn[Kt],Tn=Zt._hoverdata[Kt];if(On.curveNumber!==Tn.curveNumber||String(On.pointNumber)!==String(Tn.pointNumber)||String(On.pointNumbers)!==String(Tn.pointNumbers))return!0}return!1}(ie,0,ht)&&(ht&&ie.emit("plotly_unhover",{event:le,points:ht}),ie.emit("plotly_hover",{event:le,points:ie._hoverdata,xaxes:de,yaxes:xe,xvals:De,yvals:Re}))})(Q,Y,Z,X,re)})},a.loneHover=function(Q,Y){var Z=!0;Array.isArray(Q)||(Z=!1,Q=[Q]);var X=Y.gd,re=te(X),ie=ee(X),le=j(Q.map(function(Te){var Se=Te._x0||Te.x0||Te.x||0,Oe=Te._x1||Te.x1||Te.x||0,Me=Te._y0||Te.y0||Te.y||0,ce=Te._y1||Te.y1||Te.y||0,ye=Te.eventData;if(ye){var J=Math.min(Se,Oe),ne=Math.max(Se,Oe),de=Math.min(Me,ce),xe=Math.max(Me,ce),ue=Te.trace;if(_.traceIs(ue,"gl3d")){var ge=X._fullLayout[ue.scene]._scene.container,be=ge.offsetLeft,we=ge.offsetTop;J+=be,ne+=be,de+=we,xe+=we}ye.bbox={x0:J+ie,x1:ne+ie,y0:de+re,y1:xe+re},Y.inOut_bbox&&Y.inOut_bbox.push(ye.bbox)}else ye=!1;return{color:Te.color||g.defaultLine,x0:Te.x0||Te.x||0,x1:Te.x1||Te.x||0,y0:Te.y0||Te.y||0,y1:Te.y1||Te.y||0,xLabel:Te.xLabel,yLabel:Te.yLabel,zLabel:Te.zLabel,text:Te.text,name:Te.name,idealAlign:Te.idealAlign,borderColor:Te.borderColor,fontFamily:Te.fontFamily,fontSize:Te.fontSize,fontColor:Te.fontColor,nameLength:Te.nameLength,textAlign:Te.textAlign,trace:Te.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Te.hovertemplate||!1,hovertemplateLabels:Te.hovertemplateLabels||!1,eventData:ye}}),{gd:X,hovermode:"closest",rotateLabels:!1,bgColor:Y.bgColor||g.background,container:l.select(Y.container),outerContainer:Y.outerContainer||Y.container}).hoverLabels,se=0,pe=0;return le.sort(function(Te,Se){return Te.y0-Se.y0}).each(function(Te,Se){var Oe=Te.y0-Te.by/2;Te.offset=Oe-5([\s\S]*)<\/extra>/;function j(Q,Y){var Z=Y.gd,X=Z._fullLayout,re=Y.hovermode,ie=Y.rotateLabels,le=Y.bgColor,se=Y.container,pe=Y.outerContainer,Te=Y.commonLabelOpts||{};if(Q.length===0)return[[]];var Se=Y.fontFamily||k.HOVERFONT,Oe=Y.fontSize||k.HOVERFONTSIZE,Me=Q[0],ce=Me.xa,ye=Me.ya,J=re.charAt(0),ne=J+"Label",de=Me[ne];if(de===void 0&&ce.type==="multicategory")for(var xe=0;xeX.width-jt?(ht=X.width-jt,Ft.attr("d","M"+(jt-R)+",0L"+jt+","+Et+R+"v"+Et+(2*F+qt.height)+"H-"+jt+"V"+Et+R+"H"+(jt-2*R)+"Z")):Ft.attr("d","M0,0L"+R+","+Et+R+"H"+jt+"v"+Et+(2*F+qt.height)+"H-"+jt+"V"+Et+R+"H-"+R+"Z"),Be.minX=ht-jt,Be.maxX=ht+jt,ce.side==="top"?(Be.minY=yt-(2*F+qt.height),Be.maxY=yt-F):(Be.minY=yt+F,Be.maxY=yt+(2*F+qt.height))}else{var Tt,Ot,At;ye.side==="right"?(Tt="start",Ot=1,At="",ht=ce._offset+ce._length):(Tt="end",Ot=-1,At="-",ht=ce._offset),yt=ye._offset+(Me.y0+Me.y1)/2,Vt.attr("text-anchor",Tt),Ft.attr("d","M0,0L"+At+R+","+R+"V"+(F+qt.height/2)+"h"+At+(2*F+qt.width)+"V-"+(F+qt.height/2)+"H"+At+R+"V-"+R+"Z"),Be.minY=yt-(F+qt.height/2),Be.maxY=yt+(F+qt.height/2),ye.side==="right"?(Be.minX=ht+R,Be.maxX=ht+R+(2*F+qt.width)):(Be.minX=ht-R-(2*F+qt.width),Be.maxX=ht-R);var Lt,Rt=qt.height/2,$t=ge-qt.top-Rt,Yt="clip"+X._uid+"commonlabel"+ye._id;if(ht=0?pt:It+wt=0?It:nt+wt=0?Je:ut+ve=0?ut:st+ve=0,tt.idealAlign!=="top"&&tn||!cn?tn?(Rt+=Yt/2,tt.anchor="start"):tt.anchor="middle":(Rt-=Yt/2,tt.anchor="end"),tt.crossPos=Rt;else{if(tt.pos=Rt,tn=Lt+$t/2+ln<=be,cn=Lt-$t/2-ln>=0,tt.idealAlign!=="left"&&tn||!cn)if(tn)Lt+=$t/2,tt.anchor="start";else{tt.anchor="middle";var an=ln/2,sn=Lt+an-be,Zt=Lt-an;sn>0&&(Lt-=sn),Zt<0&&(Lt+=-Zt)}else Lt-=$t/2,tt.anchor="end";tt.crossPos=Lt}Et.attr("text-anchor",tt.anchor),Tt&&jt.attr("text-anchor",tt.anchor),Ft.attr("transform",d(Lt,Rt)+(ie?h(S):""))}),{hoverLabels:mt,commonLabelBoundingBox:Be}}function N(Q,Y,Z,X,re,ie){var le="",se="";Q.nameOverride!==void 0&&(Q.name=Q.nameOverride),Q.name&&(Q.trace._meta&&(Q.name=c.templateString(Q.name,Q.trace._meta)),le=H(Q.name,Q.nameLength));var pe=Z.charAt(0),Te=pe==="x"?"y":"x";Q.zLabel!==void 0?(Q.xLabel!==void 0&&(se+="x: "+Q.xLabel+"
"),Q.yLabel!==void 0&&(se+="y: "+Q.yLabel+"
"),Q.trace.type!=="choropleth"&&Q.trace.type!=="choroplethmapbox"&&(se+=(se?"z: ":"")+Q.zLabel)):Y&&Q[pe+"Label"]===re?se=Q[Te+"Label"]||"":Q.xLabel===void 0?Q.yLabel!==void 0&&Q.trace.type!=="scattercarpet"&&(se=Q.yLabel):se=Q.yLabel===void 0?Q.xLabel:"("+Q.xLabel+", "+Q.yLabel+")",!Q.text&&Q.text!==0||Array.isArray(Q.text)||(se+=(se?"
":"")+Q.text),Q.extraText!==void 0&&(se+=(se?"
":"")+Q.extraText),ie&&se===""&&!Q.hovertemplate&&(le===""&&ie.remove(),se=le);var Se=Q.hovertemplate||!1;if(Se){var Oe=Q.hovertemplateLabels||Q;Q[pe+"Label"]!==re&&(Oe[pe+"other"]=Oe[pe+"Val"],Oe[pe+"otherLabel"]=Oe[pe+"Label"]),se=(se=c.hovertemplateString(Se,Oe,X._d3locale,Q.eventData[0]||{},Q.trace._meta)).replace($,function(Me,ce){return le=H(ce,Q.nameLength),""})}return[se,le]}function E(Q,Y){var Z=0,X=Q.offset;return Y&&(X*=-O,Z=Q.offset*D),{x:Z,y:X}}function W(Q,Y,Z,X){var re=function(le){return le*Z},ie=function(le){return le*X};Q.each(function(le){var se=l.select(this);if(le.del)return se.remove();var pe,Te,Se,Oe,Me=se.select("text.nums"),ce=le.anchor,ye=ce==="end"?-1:1,J=(Oe=(Se=(Te={start:1,end:-1,middle:0}[(pe=le).anchor])*(R+F))+Te*(pe.txwidth+F),pe.anchor==="middle"&&(Se-=pe.tx2width/2,Oe+=pe.txwidth/2+F),{alignShift:Te,textShiftX:Se,text2ShiftX:Oe}),ne=E(le,Y),de=ne.x,xe=ne.y,ue=ce==="middle";se.select("path").attr("d",ue?"M-"+re(le.bx/2+le.tx2width/2)+","+ie(xe-le.by/2)+"h"+re(le.bx)+"v"+ie(le.by)+"h-"+re(le.bx)+"Z":"M0,0L"+re(ye*R+de)+","+ie(R+xe)+"v"+ie(le.by/2-R)+"h"+re(ye*le.bx)+"v-"+ie(le.by)+"H"+re(ye*R+de)+"V"+ie(xe-R)+"Z");var ge=de+J.textShiftX,be=xe+le.ty0-le.by/2+F,we=le.textAlign||"auto";we!=="auto"&&(we==="left"&&ce!=="start"?(Me.attr("text-anchor","start"),ge=ue?-le.bx/2-le.tx2width/2+F:-le.bx-F):we==="right"&&ce!=="end"&&(Me.attr("text-anchor","end"),ge=ue?le.bx/2-le.tx2width/2-F:le.bx+F)),Me.call(m.positionText,re(ge),ie(be)),le.tx2width&&(se.select("text.name").call(m.positionText,re(J.text2ShiftX+J.alignShift*F+de),ie(xe+le.ty0-le.by/2+F)),se.select("rect").call(v.setRect,re(J.text2ShiftX+(J.alignShift-1)*le.tx2width/2+de),ie(xe-le.by/2-1),re(le.tx2width),ie(le.by+2)))})}function G(Q,Y){var Z=Q.index,X=Q.trace||{},re=Q.cd[0],ie=Q.cd[Z]||{};function le(Me){return Me||f(Me)&&Me===0}var se=Array.isArray(Z)?function(Me,ce){var ye=c.castOption(re,Z,Me);return le(ye)?ye:c.extractOption({},X,"",ce)}:function(Me,ce){return c.extractOption(ie,X,Me,ce)};function pe(Me,ce,ye){var J=se(ce,ye);le(J)&&(Q[Me]=J)}if(pe("hoverinfo","hi","hoverinfo"),pe("bgcolor","hbg","hoverlabel.bgcolor"),pe("borderColor","hbc","hoverlabel.bordercolor"),pe("fontFamily","htf","hoverlabel.font.family"),pe("fontSize","hts","hoverlabel.font.size"),pe("fontColor","htc","hoverlabel.font.color"),pe("nameLength","hnl","hoverlabel.namelength"),pe("textAlign","hta","hoverlabel.align"),Q.posref=Y==="y"||Y==="closest"&&X.orientation==="h"?Q.xa._offset+(Q.x0+Q.x1)/2:Q.ya._offset+(Q.y0+Q.y1)/2,Q.x0=c.constrain(Q.x0,0,Q.xa._length),Q.x1=c.constrain(Q.x1,0,Q.xa._length),Q.y0=c.constrain(Q.y0,0,Q.ya._length),Q.y1=c.constrain(Q.y1,0,Q.ya._length),Q.xLabelVal!==void 0&&(Q.xLabel="xLabel"in Q?Q.xLabel:x.hoverLabelText(Q.xa,Q.xLabelVal,X.xhoverformat),Q.xVal=Q.xa.c2d(Q.xLabelVal)),Q.yLabelVal!==void 0&&(Q.yLabel="yLabel"in Q?Q.yLabel:x.hoverLabelText(Q.ya,Q.yLabelVal,X.yhoverformat),Q.yVal=Q.ya.c2d(Q.yLabelVal)),Q.zLabelVal!==void 0&&Q.zLabel===void 0&&(Q.zLabel=String(Q.zLabelVal)),!(isNaN(Q.xerr)||Q.xa.type==="log"&&Q.xerr<=0)){var Te=x.tickText(Q.xa,Q.xa.c2l(Q.xerr),"hover").text;Q.xerrneg!==void 0?Q.xLabel+=" +"+Te+" / -"+x.tickText(Q.xa,Q.xa.c2l(Q.xerrneg),"hover").text:Q.xLabel+=" ± "+Te,Y==="x"&&(Q.distance+=1)}if(!(isNaN(Q.yerr)||Q.ya.type==="log"&&Q.yerr<=0)){var Se=x.tickText(Q.ya,Q.ya.c2l(Q.yerr),"hover").text;Q.yerrneg!==void 0?Q.yLabel+=" +"+Se+" / -"+x.tickText(Q.ya,Q.ya.c2l(Q.yerrneg),"hover").text:Q.yLabel+=" ± "+Se,Y==="y"&&(Q.distance+=1)}var Oe=Q.hoverinfo||Q.trace.hoverinfo;return Oe&&Oe!=="all"&&((Oe=Array.isArray(Oe)?Oe:Oe.split("+")).indexOf("x")===-1&&(Q.xLabel=void 0),Oe.indexOf("y")===-1&&(Q.yLabel=void 0),Oe.indexOf("z")===-1&&(Q.zLabel=void 0),Oe.indexOf("text")===-1&&(Q.text=void 0),Oe.indexOf("name")===-1&&(Q.name=void 0)),Q}function L(Q,Y,Z){var X,re,ie=Z.container,le=Z.fullLayout,se=le._size,pe=Z.event,Te=!!Y.hLinePoint,Se=!!Y.vLinePoint;if(ie.selectAll(".spikeline").remove(),Se||Te){var Oe=g.combine(le.plot_bgcolor,le.paper_bgcolor);if(Te){var Me,ce,ye=Y.hLinePoint;X=ye&&ye.xa,(re=ye&&ye.ya).spikesnap==="cursor"?(Me=pe.pointerX,ce=pe.pointerY):(Me=X._offset+ye.x,ce=re._offset+ye.y);var J,ne,de=s.readability(ye.color,Oe)<1.5?g.contrast(Oe):ye.color,xe=re.spikemode,ue=re.spikethickness,ge=re.spikecolor||de,be=x.getPxPosition(Q,re);if(xe.indexOf("toaxis")!==-1||xe.indexOf("across")!==-1){if(xe.indexOf("toaxis")!==-1&&(J=be,ne=Me),xe.indexOf("across")!==-1){var we=re._counterDomainMin,ke=re._counterDomainMax;re.anchor==="free"&&(we=Math.min(we,re.position),ke=Math.max(ke,re.position)),J=se.l+we*se.w,ne=se.l+ke*se.w}ie.insert("line",":first-child").attr({x1:J,x2:ne,y1:ce,y2:ce,"stroke-width":ue,stroke:ge,"stroke-dasharray":v.dashStyle(re.spikedash,ue)}).classed("spikeline",!0).classed("crisp",!0),ie.insert("line",":first-child").attr({x1:J,x2:ne,y1:ce,y2:ce,"stroke-width":ue+2,stroke:Oe}).classed("spikeline",!0).classed("crisp",!0)}xe.indexOf("marker")!==-1&&ie.insert("circle",":first-child").attr({cx:be+(re.side!=="right"?ue:-ue),cy:ce,r:ue,fill:ge}).classed("spikeline",!0)}if(Se){var Ae,Ee,De=Y.vLinePoint;X=De&&De.xa,re=De&&De.ya,X.spikesnap==="cursor"?(Ae=pe.pointerX,Ee=pe.pointerY):(Ae=X._offset+De.x,Ee=re._offset+De.y);var Re,Ie,Be=s.readability(De.color,Oe)<1.5?g.contrast(Oe):De.color,Ue=X.spikemode,qe=X.spikethickness,Ye=X.spikecolor||Be,at=x.getPxPosition(Q,X);if(Ue.indexOf("toaxis")!==-1||Ue.indexOf("across")!==-1){if(Ue.indexOf("toaxis")!==-1&&(Re=at,Ie=Ee),Ue.indexOf("across")!==-1){var lt=X._counterDomainMin,ct=X._counterDomainMax;X.anchor==="free"&&(lt=Math.min(lt,X.position),ct=Math.max(ct,X.position)),Re=se.t+(1-ct)*se.h,Ie=se.t+(1-lt)*se.h}ie.insert("line",":first-child").attr({x1:Ae,x2:Ae,y1:Re,y2:Ie,"stroke-width":qe,stroke:Ye,"stroke-dasharray":v.dashStyle(X.spikedash,qe)}).classed("spikeline",!0).classed("crisp",!0),ie.insert("line",":first-child").attr({x1:Ae,x2:Ae,y1:Re,y2:Ie,"stroke-width":qe+2,stroke:Oe}).classed("spikeline",!0).classed("crisp",!0)}Ue.indexOf("marker")!==-1&&ie.insert("circle",":first-child").attr({cx:Ae,cy:at-(X.side!=="top"?qe:-qe),r:qe,fill:Ye}).classed("spikeline",!0)}}}function q(Q,Y){return!Y}function H(Q,Y){return m.plainText(Q||"",{len:Y,allowedTags:["br","sub","sup","b","i","em"]})}function V(Q,Y,Z){var X=Y[Q+"a"],re=Y[Q+"Val"],ie=Y.cd[0];if(X.type==="category"||X.type==="multicategory")re=X._categoriesMap[re];else if(X.type==="date"){var le=Y.trace[Q+"periodalignment"];if(le){var se=Y.cd[Y.index],pe=se[Q+"Start"];pe===void 0&&(pe=se[Q]);var Te=se[Q+"End"];Te===void 0&&(Te=se[Q]);var Se=Te-pe;le==="end"?re+=Se:le==="middle"&&(re+=Se/2)}re=X.d2c(re)}return ie&&ie.t&&ie.t.posLetter===X._id&&(Z.boxmode!=="group"&&Z.violinmode!=="group"||(re+=ie.t.dPos)),re}function te(Q){return Q.offsetTop+Q.clientTop}function ee(Q){return Q.offsetLeft+Q.clientLeft}function U(Q,Y){var Z=Q._fullLayout,X=Y.getBoundingClientRect(),re=X.left,ie=X.top,le=re+X.width,se=ie+X.height,pe=c.apply3DTransform(Z._invTransform)(re,ie),Te=c.apply3DTransform(Z._invTransform)(le,se),Se=pe[0],Oe=pe[1],Me=Te[0],ce=Te[1];return{x:Se,y:Oe,width:Me-Se,height:ce-Oe,top:Math.min(Oe,ce),left:Math.min(Se,Me),right:Math.max(Se,Me),bottom:Math.max(Oe,ce)}}},38048:function(o,a,n){var l=n(71828),f=n(7901),s=n(23469).isUnifiedHover;o.exports=function(c,d,h,p){p=p||{};var m=d.legend;function y(v){p.font[v]||(p.font[v]=m?d.legend.font[v]:d.font[v])}d&&s(d.hovermode)&&(p.font||(p.font={}),y("size"),y("family"),y("color"),m?(p.bgcolor||(p.bgcolor=f.combine(d.legend.bgcolor,d.paper_bgcolor)),p.bordercolor||(p.bordercolor=d.legend.bordercolor)):p.bgcolor||(p.bgcolor=d.paper_bgcolor)),h("hoverlabel.bgcolor",p.bgcolor),h("hoverlabel.bordercolor",p.bordercolor),h("hoverlabel.namelength",p.namelength),l.coerceFont(h,"hoverlabel.font",p.font),h("hoverlabel.align",p.align)}},98212:function(o,a,n){var l=n(71828),f=n(528);o.exports=function(s,c){function d(h,p){return c[h]!==void 0?c[h]:l.coerce(s,c,f,h,p)}return d("clickmode"),d("hovermode")}},30211:function(o,a,n){var l=n(39898),f=n(71828),s=n(28569),c=n(23469),d=n(528),h=n(88335);o.exports={moduleType:"component",name:"fx",constants:n(26675),schema:{layout:d},attributes:n(77914),layoutAttributes:d,supplyLayoutGlobalDefaults:n(22774),supplyDefaults:n(54268),supplyLayoutDefaults:n(34938),calc:n(30732),getDistanceFunction:c.getDistanceFunction,getClosest:c.getClosest,inbox:c.inbox,quadrature:c.quadrature,appendArrayPointValue:c.appendArrayPointValue,castHoverOption:function(p,m,y){return f.castOption(p,m,"hoverlabel."+y)},castHoverinfo:function(p,m,y){return f.castOption(p,y,"hoverinfo",function(v){return f.coerceHoverinfo({hoverinfo:v},{_module:p._module},m)})},hover:h.hover,unhover:s.unhover,loneHover:h.loneHover,loneUnhover:function(p){var m=f.isD3Selection(p)?p:l.select(p);m.selectAll("g.hovertext").remove(),m.selectAll(".spikeline").remove()},click:n(75914)}},528:function(o,a,n){var l=n(26675),f=n(41940),s=f({editType:"none"});s.family.dflt=l.HOVERFONT,s.size.dflt=l.HOVERFONTSIZE,o.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:s,grouptitlefont:f({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},34938:function(o,a,n){var l=n(71828),f=n(528),s=n(98212),c=n(38048);o.exports=function(d,h){function p(g,b){return l.coerce(d,h,f,g,b)}s(d,h)&&(p("hoverdistance"),p("spikedistance")),p("dragmode")==="select"&&p("selectdirection");var m=h._has("mapbox"),y=h._has("geo"),v=h._basePlotModules.length;h.dragmode==="zoom"&&((m||y)&&v===1||m&&y&&v===2)&&(h.dragmode="pan"),c(d,h,p),l.coerceFont(p,"hoverlabel.grouptitlefont",h.hoverlabel.font)}},22774:function(o,a,n){var l=n(71828),f=n(38048),s=n(528);o.exports=function(c,d){f(c,d,function(h,p){return l.coerce(c,d,s,h,p)})}},83312:function(o,a,n){var l=n(71828),f=n(30587).counter,s=n(27670).Y,c=n(85555).idRegex,d=n(44467),h={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[f("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[c.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:s({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function p(v,g,b){var x=g[b+"axes"],_=Object.keys((v._splomAxes||{})[b]||{});return Array.isArray(x)?x:_.length?_:void 0}function m(v,g,b,x,_,w){var k=g(v+"gap",b),T=g("domain."+v);g(v+"side",x);for(var M=new Array(_),S=T[0],C=(T[1]-S)/(_-k),P=C*(1-k),D=0;D<_;D++){var O=S+C*D;M[w?_-1-D:D]=[O,O+P]}return M}function y(v,g,b,x,_){var w,k=new Array(b);function T(M,S){g.indexOf(S)!==-1&&x[S]===void 0?(k[M]=S,x[S]=M):k[M]=""}if(Array.isArray(v))for(w=0;w1){T||M||S||$("pattern")==="independent"&&(T=!0),P._hasSubplotGrid=T;var R,F,A=$("roworder")==="top to bottom",z=T?.2:.1,B=T?.3:.1;C&&g._splomGridDflt&&(R=g._splomGridDflt.xside,F=g._splomGridDflt.yside),P._domains={x:m("x",$,z,R,O),y:m("y",$,B,F,D,A)}}else delete g.grid}function $(j,N){return l.coerce(b,P,h,j,N)}},contentDefaults:function(v,g){var b=g.grid;if(b&&b._domains){var x,_,w,k,T,M,S,C=v.grid||{},P=g._subplots,D=b._hasSubplotGrid,O=b.rows,R=b.columns,F=b.pattern==="independent",A=b._axisMap={};if(D){var z=C.subplots||[];M=b.subplots=new Array(O);var B=1;for(x=0;x(y==="legend"?1:0));if(B===!1&&(g[y]=void 0),(B!==!1||x.uirevision)&&(w("uirevision",g.uirevision),B!==!1)){w("borderwidth");var $,j,N,E=w("orientation")==="h",W=w("yref")==="paper",G=w("xref")==="paper",L="left";if(E?($=0,l.getComponentMethod("rangeslider","isVisible")(v.xaxis)?W?(j=1.1,N="bottom"):(j=1,N="top"):W?(j=-.1,N="top"):(j=0,N="bottom")):(j=1,N="auto",G?$=1.02:($=1,L="right")),f.coerce(x,_,{x:{valType:"number",editType:"legend",min:G?-2:0,max:G?3:1,dflt:$}},"x"),f.coerce(x,_,{y:{valType:"number",editType:"legend",min:W?-2:0,max:W?3:1,dflt:j}},"y"),w("traceorder",O),p.isGrouped(g[y])&&w("tracegroupgap"),w("entrywidth"),w("entrywidthmode"),w("itemsizing"),w("itemwidth"),w("itemclick"),w("itemdoubleclick"),w("groupclick"),w("xanchor",L),w("yanchor",N),w("valign"),f.noneOrAll(x,_,["x","y"]),w("title.text")){w("title.side",E?"left":"top");var q=f.extendFlat({},k,{size:f.bigFont(k.size)});f.coerceFont(w,"title.font",q)}}}}o.exports=function(y,v,g){var b,x=g.slice(),_=v.shapes;if(_)for(b=0;b<_.length;b++){var w=_[b];if(w.showlegend){var k={_input:w._input,visible:w.visible,showlegend:w.showlegend,legend:w.legend};x.push(k)}}var T=["legend"];for(b=0;b1)}var X=q.hiddenlabels||[];if(!(V||q.showlegend&&te.length))return G.selectAll("."+H).remove(),q._topdefs.select("#"+W).remove(),s.autoMargin(N,H);var re=f.ensureSingle(G,"g",H,function(ce){V||ce.attr("pointer-events","all")}),ie=f.ensureSingleById(q._topdefs,"clipPath",W,function(ce){ce.append("rect")}),le=f.ensureSingle(re,"rect","bg",function(ce){ce.attr("shape-rendering","crispEdges")});le.call(m.stroke,L.bordercolor).call(m.fill,L.bgcolor).style("stroke-width",L.borderwidth+"px");var se,pe=f.ensureSingle(re,"g","scrollbox"),Te=L.title;L._titleWidth=0,L._titleHeight=0,Te.text?((se=f.ensureSingle(pe,"text",H+"titletext")).attr("text-anchor","start").call(p.font,Te.font).text(Te.text),z(se,pe,N,L,S)):pe.selectAll("."+H+"titletext").remove();var Se=f.ensureSingle(re,"rect","scrollbar",function(ce){ce.attr(g.scrollBarEnterAttrs).call(m.fill,g.scrollBarColor)}),Oe=pe.selectAll("g.groups").data(te);Oe.enter().append("g").attr("class","groups"),Oe.exit().remove();var Me=Oe.selectAll("g.traces").data(f.identity);Me.enter().append("g").attr("class","traces"),Me.exit().remove(),Me.style("opacity",function(ce){var ye=ce[0].trace;return c.traceIs(ye,"pie-like")?X.indexOf(ce[0].label)!==-1?.5:1:ye.visible==="legendonly"?.5:1}).each(function(){l.select(this).call(R,N,L)}).call(T,N,L).each(function(){V||l.select(this).call(A,N,H)}),f.syncOrAsync([s.previousPromises,function(){return function(ce,ye,J,ne){var de=ce._fullLayout,xe=j(ne);ne||(ne=de[xe]);var ue=de._size,ge=M.isVertical(ne),be=M.isGrouped(ne),we=ne.entrywidthmode==="fraction",ke=ne.borderwidth,Ae=2*ke,Ee=g.itemGap,De=ne.itemwidth+2*Ee,Re=2*(ke+Ee),Ie=$(ne),Be=ne.y<0||ne.y===0&&Ie==="top",Ue=ne.y>1||ne.y===1&&Ie==="bottom",qe=ne.tracegroupgap,Ye={};ne._maxHeight=Math.max(Be||Ue?de.height/2:ue.h,30);var at=0;ne._width=0,ne._height=0;var lt=function(Ge){var Ke=0,nt=0,st=Ge.title.side;return st&&(st.indexOf("left")!==-1&&(Ke=Ge._titleWidth),st.indexOf("top")!==-1&&(nt=Ge._titleHeight)),[Ke,nt]}(ne);if(ge)J.each(function(Ge){var Ke=Ge[0].height;p.setTranslate(this,ke+lt[0],ke+lt[1]+ne._height+Ke/2+Ee),ne._height+=Ke,ne._width=Math.max(ne._width,Ge[0].width)}),at=De+ne._width,ne._width+=Ee+De+Ae,ne._height+=Re,be&&(ye.each(function(Ge,Ke){p.setTranslate(this,0,Ke*ne.tracegroupgap)}),ne._height+=(ne._lgroupsLength-1)*ne.tracegroupgap);else{var ct=B(ne),bt=ne.x<0||ne.x===0&&ct==="right",ze=ne.x>1||ne.x===1&&ct==="left",Ne=Ue||Be,Qe=de.width/2;ne._maxWidth=Math.max(bt?Ne&&ct==="left"?ue.l+ue.w:Qe:ze?Ne&&ct==="right"?ue.r+ue.w:Qe:ue.w,2*De);var it=0,kt=0;J.each(function(Ge){var Ke=D(Ge,ne,De);it=Math.max(it,Ke),kt+=Ke}),at=null;var Je=0;if(be){var ut=0,pt=0,It=0;ye.each(function(){var Ge=0,Ke=0;l.select(this).selectAll("g.traces").each(function(st){var mt=D(st,ne,De),tt=st[0].height;p.setTranslate(this,lt[0],lt[1]+ke+Ee+tt/2+Ke),Ke+=tt,Ge=Math.max(Ge,mt),Ye[st[0].trace.legendgroup]=Ge});var nt=Ge+Ee;pt>0&&nt+ke+pt>ne._maxWidth?(Je=Math.max(Je,pt),pt=0,It+=ut+qe,ut=Ke):ut=Math.max(ut,Ke),p.setTranslate(this,pt,It),pt+=nt}),ne._width=Math.max(Je,pt)+ke,ne._height=It+ut+Re}else{var Mt=J.size(),zt=kt+Ae+(Mt-1)*Ee=ne._maxWidth&&(Je=Math.max(Je,Ve),ve=0,_e+=wt,ne._height+=wt,wt=0),p.setTranslate(this,lt[0]+ke+ve,lt[1]+ke+_e+Ke/2+Ee),Ve=ve+nt+Ee,ve+=st,wt=Math.max(wt,Ke)}),zt?(ne._width=ve+Ae,ne._height=wt+Re):(ne._width=Math.max(Je,Ve)+Ae,ne._height+=wt+Re)}}ne._width=Math.ceil(Math.max(ne._width+lt[0],ne._titleWidth+2*(ke+g.titlePad))),ne._height=Math.ceil(Math.max(ne._height+lt[1],ne._titleHeight+2*(ke+g.itemGap))),ne._effHeight=Math.min(ne._height,ne._maxHeight);var We=ce._context.edits,Ze=We.legendText||We.legendPosition;J.each(function(Ge){var Ke=l.select(this).select("."+xe+"toggle"),nt=Ge[0].height,st=Ge[0].trace.legendgroup,mt=D(Ge,ne,De);be&&st!==""&&(mt=Ye[st]);var tt=Ze?De:at||mt;ge||we||(tt+=Ee/2),p.setRect(Ke,0,-nt/2,tt,nt)})}(N,Oe,Me,L)},function(){var ce,ye,J,ne,de=q._size,xe=L.borderwidth,ue=L.xref==="paper",ge=L.yref==="paper";if(Te.text&&function(Ne,Qe,it){if(Qe.title.side==="top center"||Qe.title.side==="top right"){var kt=Qe.title.font.size*x,Je=0,ut=Ne.node(),pt=p.bBox(ut).width;Qe.title.side==="top center"?Je=.5*(Qe._width-2*it-2*g.titlePad-pt):Qe.title.side==="top right"&&(Je=Qe._width-2*it-2*g.titlePad-pt),y.positionText(Ne,it+g.titlePad+Je,it+kt)}}(se,L,xe),!V){var be,we;be=ue?de.l+de.w*L.x-_[B(L)]*L._width:q.width*L.x-_[B(L)]*L._width,we=ge?de.t+de.h*(1-L.y)-_[$(L)]*L._effHeight:q.height*(1-L.y)-_[$(L)]*L._effHeight;var ke=function(Ne,Qe,it,kt){var Je=Ne._fullLayout,ut=Je[Qe],pt=B(ut),It=$(ut),Mt=ut.xref==="paper",zt=ut.yref==="paper";Ne._fullLayout._reservedMargin[Qe]={};var wt=ut.y<.5?"b":"t",ve=ut.x<.5?"l":"r",_e={r:Je.width-it,l:it+ut._width,b:Je.height-kt,t:kt+ut._effHeight};if(Mt&&zt)return s.autoMargin(Ne,Qe,{x:ut.x,y:ut.y,l:ut._width*_[pt],r:ut._width*w[pt],b:ut._effHeight*w[It],t:ut._effHeight*_[It]});Mt?Ne._fullLayout._reservedMargin[Qe][wt]=_e[wt]:zt||ut.orientation==="v"?Ne._fullLayout._reservedMargin[Qe][ve]=_e[ve]:Ne._fullLayout._reservedMargin[Qe][wt]=_e[wt]}(N,H,be,we);if(ke)return;if(q.margin.autoexpand){var Ae=be,Ee=we;be=ue?f.constrain(be,0,q.width-L._width):Ae,we=ge?f.constrain(we,0,q.height-L._effHeight):Ee,be!==Ae&&f.log("Constrain "+H+".x to make legend fit inside graph"),we!==Ee&&f.log("Constrain "+H+".y to make legend fit inside graph")}p.setTranslate(re,be,we)}if(Se.on(".drag",null),re.on("wheel",null),V||L._height<=L._maxHeight||N._context.staticPlot){var De=L._effHeight;V&&(De=L._height),le.attr({width:L._width-xe,height:De-xe,x:xe/2,y:xe/2}),p.setTranslate(pe,0,0),ie.select("rect").attr({width:L._width-2*xe,height:De-2*xe,x:xe,y:xe}),p.setClipUrl(pe,W,N),p.setRect(Se,0,0,0,0),delete L._scrollY}else{var Re,Ie,Be,Ue=Math.max(g.scrollBarMinHeight,L._effHeight*L._effHeight/L._height),qe=L._effHeight-Ue-2*g.scrollBarMargin,Ye=L._height-L._effHeight,at=qe/Ye,lt=Math.min(L._scrollY||0,Ye);le.attr({width:L._width-2*xe+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-xe,x:xe/2,y:xe/2}),ie.select("rect").attr({width:L._width-2*xe+g.scrollBarWidth+g.scrollBarMargin,height:L._effHeight-2*xe,x:xe,y:xe+lt}),p.setClipUrl(pe,W,N),ze(lt,Ue,at),re.on("wheel",function(){ze(lt=f.constrain(L._scrollY+l.event.deltaY/qe*Ye,0,Ye),Ue,at),lt!==0&<!==Ye&&l.event.preventDefault()});var ct=l.behavior.drag().on("dragstart",function(){var Ne=l.event.sourceEvent;Re=Ne.type==="touchstart"?Ne.changedTouches[0].clientY:Ne.clientY,Be=lt}).on("drag",function(){var Ne=l.event.sourceEvent;Ne.buttons===2||Ne.ctrlKey||(Ie=Ne.type==="touchmove"?Ne.changedTouches[0].clientY:Ne.clientY,lt=function(Qe,it,kt){var Je=(kt-it)/at+Qe;return f.constrain(Je,0,Ye)}(Be,Re,Ie),ze(lt,Ue,at))});Se.call(ct);var bt=l.behavior.drag().on("dragstart",function(){var Ne=l.event.sourceEvent;Ne.type==="touchstart"&&(Re=Ne.changedTouches[0].clientY,Be=lt)}).on("drag",function(){var Ne=l.event.sourceEvent;Ne.type==="touchmove"&&(Ie=Ne.changedTouches[0].clientY,lt=function(Qe,it,kt){var Je=(it-kt)/at+Qe;return f.constrain(Je,0,Ye)}(Be,Re,Ie),ze(lt,Ue,at))});pe.call(bt)}function ze(Ne,Qe,it){L._scrollY=N._fullLayout[H]._scrollY=Ne,p.setTranslate(pe,0,-Ne),p.setRect(Se,L._width,g.scrollBarMargin+Ne*it,g.scrollBarWidth,Qe),ie.select("rect").attr("y",xe+Ne)}N._context.edits.legendPosition&&(re.classed("cursor-move",!0),h.init({element:re.node(),gd:N,prepFn:function(){var Ne=p.getTranslate(re);J=Ne.x,ne=Ne.y},moveFn:function(Ne,Qe){var it=J+Ne,kt=ne+Qe;p.setTranslate(re,it,kt),ce=h.align(it,L._width,de.l,de.l+de.w,L.xanchor),ye=h.align(kt+L._height,-L._height,de.t+de.h,de.t,L.yanchor)},doneFn:function(){if(ce!==void 0&&ye!==void 0){var Ne={};Ne[H+".x"]=ce,Ne[H+".y"]=ye,c.call("_guiRelayout",N,Ne)}},clickFn:function(Ne,Qe){var it=G.selectAll("g.traces").filter(function(){var kt=this.getBoundingClientRect();return Qe.clientX>=kt.left&&Qe.clientX<=kt.right&&Qe.clientY>=kt.top&&Qe.clientY<=kt.bottom});it.size()>0&&O(N,re,it,Ne,Qe)}}))}],N)}}function D(N,E,W){var G=N[0],L=G.width,q=E.entrywidthmode,H=G.trace.legendwidth||E.entrywidth;return q==="fraction"?E._maxWidth*H:W+(H||L)}function O(N,E,W,G,L){var q=W.data()[0][0].trace,H={event:L,node:W.node(),curveNumber:q.index,expandedIndex:q._expandedIndex,data:N.data,layout:N.layout,frames:N._transitionData._frames,config:N._context,fullData:N._fullData,fullLayout:N._fullLayout};q._group&&(H.group=q._group),c.traceIs(q,"pie-like")&&(H.label=W.datum()[0].label);var V=d.triggerHandler(N,"plotly_legendclick",H);if(G===1){if(V===!1)return;E._clickTimeout=setTimeout(function(){N._fullLayout&&v(W,N,G)},N._context.doubleClickDelay)}else G===2&&(E._clickTimeout&&clearTimeout(E._clickTimeout),N._legendMouseDownTime=0,d.triggerHandler(N,"plotly_legenddoubleclick",H)!==!1&&V!==!1&&v(W,N,G))}function R(N,E,W){var G,L,q=j(W),H=N.data()[0][0],V=H.trace,te=c.traceIs(V,"pie-like"),ee=!W._inHover&&E._context.edits.legendText&&!te,U=W._maxNameLength;H.groupTitle?(G=H.groupTitle.text,L=H.groupTitle.font):(L=W.font,W.entries?G=H.text:(G=te?H.label:V.name,V._meta&&(G=f.templateString(G,V._meta))));var Q=f.ensureSingle(N,"text",q+"text");Q.attr("text-anchor","start").call(p.font,L).text(ee?F(G,U):G);var Y=W.itemwidth+2*g.itemGap;y.positionText(Q,Y,0),ee?Q.call(y.makeEditable,{gd:E,text:G}).call(z,N,E,W).on("edit",function(Z){this.text(F(Z,U)).call(z,N,E,W);var X=H.trace._fullInput||{},re={};if(c.hasTransform(X,"groupby")){var ie=c.getTransformIndices(X,"groupby"),le=ie[ie.length-1],se=f.keyedContainer(X,"transforms["+le+"].styles","target","value.name");se.set(H.trace._group,Z),re=se.constructUpdate()}else re.name=Z;return X._isShape?c.call("_guiRelayout",E,"shapes["+V.index+"].name",re.name):c.call("_guiRestyle",E,re,V.index)}):z(Q,N,E,W)}function F(N,E){var W=Math.max(4,E);if(N&&N.trim().length>=W/2)return N;for(var G=W-(N=N||"").length;G>0;G--)N+=" ";return N}function A(N,E,W){var G,L=E._context.doubleClickDelay,q=1,H=f.ensureSingle(N,"rect",W+"toggle",function(V){E._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(m.fill,"rgba(0,0,0,0)")});E._context.staticPlot||(H.on("mousedown",function(){(G=new Date().getTime())-E._legendMouseDownTimeL&&(q=Math.max(q-1,1)),O(E,V,N,q,l.event)}}))}function z(N,E,W,G,L){G._inHover&&N.attr("data-notex",!0),y.convertToTspans(N,W,function(){(function(q,H,V,te){var ee=q.data()[0][0];if(V._inHover||!ee||ee.trace.showlegend){var U=q.select("g[class*=math-group]"),Q=U.node(),Y=j(V);V||(V=H._fullLayout[Y]);var Z,X,re=V.borderwidth,ie=(te===S?V.title.font:ee.groupTitle?ee.groupTitle.font:V.font).size*x;if(Q){var le=p.bBox(Q);Z=le.height,X=le.width,te===S?p.setTranslate(U,re,re+.75*Z):p.setTranslate(U,0,.25*Z)}else{var se="."+Y+(te===S?"title":"")+"text",pe=q.select(se),Te=y.lineCount(pe),Se=pe.node();if(Z=ie*Te,X=Se?p.bBox(Se).width:0,te===S)V.title.side==="left"&&(X+=2*g.itemGap),y.positionText(pe,re+g.titlePad,re+ie);else{var Oe=2*g.itemGap+V.itemwidth;ee.groupTitle&&(Oe=g.itemGap,X-=V.itemwidth),y.positionText(pe,Oe,-ie*((Te-1)/2-.3))}}te===S?(V._titleWidth=X,V._titleHeight=Z):(ee.lineHeight=ie,ee.height=Math.max(Z,16)+3,ee.width=X)}else q.remove()})(E,W,G,L)})}function B(N){return f.isRightAnchor(N)?"right":f.isCenterAnchor(N)?"center":"left"}function $(N){return f.isBottomAnchor(N)?"bottom":f.isMiddleAnchor(N)?"middle":"top"}function j(N){return N._id||"legend"}o.exports=function(N,E){if(E)P(N,E);else{var W=N._fullLayout,G=W._legends;W._infolayer.selectAll('[class^="legend"]').each(function(){var H=l.select(this),V=H.attr("class").split(" ")[0];V.match(C)&&G.indexOf(V)===-1&&H.remove()});for(var L=0;LB&&(z=B)}F[h][0]._groupMinRank=z,F[h][0]._preGroupSort=h}var $=function(G,L){return G.trace.legendrank-L.trace.legendrank||G._preSort-L._preSort};for(F.forEach(function(G,L){G[0]._preGroupSort=L}),F.sort(function(G,L){return G[0]._groupMinRank-L[0]._groupMinRank||G[0]._preGroupSort-L[0]._preGroupSort}),h=0;hT?T:w}o.exports=function(w,k,T){var M=k._fullLayout;T||(T=M.legend);var S=T.itemsizing==="constant",C=T.itemwidth,P=(C+2*g.itemGap)/2,D=c(P,0),O=function(A,z,B,$){var j;if(A+1)j=A;else{if(!(z&&z.width>0))return 0;j=z.width}return S?$:Math.min(j,B)};function R(A,z,B){var $=A[0].trace,j=$.marker||{},N=j.line||{},E=B?$.visible&&$.type===B:f.traceIs($,"bar"),W=l.select(z).select("g.legendpoints").selectAll("path.legend"+B).data(E?[A]:[]);W.enter().append("path").classed("legend"+B,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),W.exit().remove(),W.each(function(G){var L=l.select(this),q=G[0],H=O(q.mlw,j.line,5,2);L.style("stroke-width",H+"px");var V=q.mcc;if(!T._inHover&&"mc"in q){var te=p(j),ee=te.mid;ee===void 0&&(ee=(te.max+te.min)/2),V=d.tryColorscale(j,"")(ee)}var U=V||q.mc||j.color,Q=j.pattern,Y=Q&&d.getPatternAttr(Q.shape,0,"");if(Y){var Z=d.getPatternAttr(Q.bgcolor,0,null),X=d.getPatternAttr(Q.fgcolor,0,null),re=Q.fgopacity,ie=_(Q.size,8,10),le=_(Q.solidity,.5,1),se="legend-"+$.uid;L.call(d.pattern,"legend",k,se,Y,ie,le,V,Q.fillmode,Z,X,re)}else L.call(h.fill,U);H&&h.stroke(L,q.mlc||N.color)})}function F(A,z,B){var $=A[0],j=$.trace,N=B?j.visible&&j.type===B:f.traceIs(j,B),E=l.select(z).select("g.legendpoints").selectAll("path.legend"+B).data(N?[A]:[]);if(E.enter().append("path").classed("legend"+B,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),E.exit().remove(),E.size()){var W=j.marker||{},G=O(v(W.line.width,$.pts),W.line,5,2),L="pieLike",q=s.minExtend(j,{marker:{line:{width:G}}},L),H=s.minExtend($,{trace:q},L);y(E,H,q,k)}}w.each(function(A){var z=l.select(this),B=s.ensureSingle(z,"g","layers");B.style("opacity",A[0].trace.opacity);var $=T.valign,j=A[0].lineHeight,N=A[0].height;if($!=="middle"&&j&&N){var E={top:1,bottom:-1}[$]*(.5*(j-N+3));B.attr("transform",c(0,E))}else B.attr("transform",null);B.selectAll("g.legendfill").data([A]).enter().append("g").classed("legendfill",!0),B.selectAll("g.legendlines").data([A]).enter().append("g").classed("legendlines",!0);var W=B.selectAll("g.legendsymbols").data([A]);W.enter().append("g").classed("legendsymbols",!0),W.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(function(A){var z,B=A[0].trace,$=[];if(B.visible)switch(B.type){case"histogram2d":case"heatmap":$=[["M-15,-2V4H15V-2Z"]],z=!0;break;case"choropleth":case"choroplethmapbox":$=[["M-6,-6V6H6V-6Z"]],z=!0;break;case"densitymapbox":$=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],z="radial";break;case"cone":$=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],z=!1;break;case"streamtube":$=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],z=!1;break;case"surface":$=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],z=!0;break;case"mesh3d":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!1;break;case"volume":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],z=!0;break;case"isosurface":$=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],z=!1}var j=l.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data($);j.enter().append("path").classed("legend3dandfriends",!0).attr("transform",D).style("stroke-miterlimit",1),j.exit().remove(),j.each(function(N,E){var W,G=l.select(this),L=p(B),q=L.colorscale,H=L.reversescale;if(q){if(!z){var V=q.length;W=E===0?q[H?V-1:0][1]:E===1?q[H?0:V-1][1]:q[Math.floor((V-1)/2)][1]}}else{var te=B.vertexcolor||B.facecolor||B.color;W=s.isArrayOrTypedArray(te)?te[E]||te[0]:te}G.attr("d",N[0]),W?G.call(h.fill,W):G.call(function(ee){if(ee.size()){var U="legendfill-"+B.uid;d.gradient(ee,k,U,b(H,z==="radial"),q,"fill")}})})}).each(function(A){var z=A[0].trace,B=z.type==="waterfall";if(A[0]._distinct&&B){var $=A[0].trace[A[0].dir].marker;return A[0].mc=$.color,A[0].mlw=$.line.width,A[0].mlc=$.line.color,R(A,this,"waterfall")}var j=[];z.visible&&B&&(j=A[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var N=l.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(j);N.enter().append("path").classed("legendwaterfall",!0).attr("transform",D).style("stroke-miterlimit",1),N.exit().remove(),N.each(function(E){var W=l.select(this),G=z[E[0]].marker,L=O(void 0,G.line,5,2);W.attr("d",E[1]).style("stroke-width",L+"px").call(h.fill,G.color),L&&W.call(h.stroke,G.line.color)})}).each(function(A){R(A,this,"funnel")}).each(function(A){R(A,this)}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendbox").data(z.visible&&f.traceIs(z,"box-violin")?[A]:[]);B.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",D),B.exit().remove(),B.each(function(){var $=l.select(this);if(z.boxpoints!=="all"&&z.points!=="all"||h.opacity(z.fillcolor)!==0||h.opacity((z.line||{}).color)!==0){var j=O(void 0,z.line,5,2);$.style("stroke-width",j+"px").call(h.fill,z.fillcolor),j&&h.stroke($,z.line.color)}else{var N=s.minExtend(z,{marker:{size:S?12:s.constrain(z.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});B.call(d.pointStyle,N,k)}})}).each(function(A){F(A,this,"funnelarea")}).each(function(A){F(A,this,"pie")}).each(function(A){var z,B,$=x(A),j=$.showFill,N=$.showLine,E=$.showGradientLine,W=$.showGradientFill,G=$.anyFill,L=$.anyLine,q=A[0],H=q.trace,V=p(H),te=V.colorscale,ee=V.reversescale,U=m.hasMarkers(H)||!G?"M5,0":L?"M5,-2":"M5,-3",Q=l.select(this),Y=Q.select(".legendfill").selectAll("path").data(j||W?[A]:[]);if(Y.enter().append("path").classed("js-fill",!0),Y.exit().remove(),Y.attr("d",U+"h"+C+"v6h-"+C+"z").call(function(re){if(re.size())if(j)d.fillGroupStyle(re,k);else{var ie="legendfill-"+H.uid;d.gradient(re,k,ie,b(ee),te,"fill")}}),N||E){var Z=O(void 0,H.line,10,5);B=s.minExtend(H,{line:{width:Z}}),z=[s.minExtend(q,{trace:B})]}var X=Q.select(".legendlines").selectAll("path").data(N||E?[z]:[]);X.enter().append("path").classed("js-line",!0),X.exit().remove(),X.attr("d",U+(E?"l"+C+",0.0001":"h"+C)).call(N?d.lineGroupStyle:function(re){if(re.size()){var ie="legendline-"+H.uid;d.lineGroupStyle(re),d.gradient(re,k,ie,b(ee),te,"stroke")}})}).each(function(A){var z,B,$=x(A),j=$.anyFill,N=$.anyLine,E=$.showLine,W=$.showMarker,G=A[0],L=G.trace,q=!W&&!N&&!j&&m.hasText(L);function H(X,re,ie,le){var se=s.nestedProperty(L,X).get(),pe=s.isArrayOrTypedArray(se)&&re?re(se):se;if(S&&pe&&le!==void 0&&(pe=le),ie){if(peie[1])return ie[1]}return pe}function V(X){return G._distinct&&G.index&&X[G.index]?X[G.index]:X[0]}if(W||q||E){var te={},ee={};if(W){te.mc=H("marker.color",V),te.mx=H("marker.symbol",V),te.mo=H("marker.opacity",s.mean,[.2,1]),te.mlc=H("marker.line.color",V),te.mlw=H("marker.line.width",s.mean,[0,5],2),ee.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var U=H("marker.size",s.mean,[2,16],12);te.ms=U,ee.marker.size=U}E&&(ee.line={width:H("line.width",V,[0,10],5)}),q&&(te.tx="Aa",te.tp=H("textposition",V),te.ts=10,te.tc=H("textfont.color",V),te.tf=H("textfont.family",V)),z=[s.minExtend(G,te)],(B=s.minExtend(L,ee)).selectedpoints=null,B.texttemplate=null}var Q=l.select(this).select("g.legendpoints"),Y=Q.selectAll("path.scatterpts").data(W?z:[]);Y.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",D),Y.exit().remove(),Y.call(d.pointStyle,B,k),W&&(z[0].mrc=3);var Z=Q.selectAll("g.pointtext").data(q?z:[]);Z.enter().append("g").classed("pointtext",!0).append("text").attr("transform",D),Z.exit().remove(),Z.selectAll("text").call(d.textPointStyle,B,k)}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(z.visible&&z.type==="candlestick"?[A,A]:[]);B.enter().append("path").classed("legendcandle",!0).attr("d",function($,j){return j?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",D).style("stroke-miterlimit",1),B.exit().remove(),B.each(function($,j){var N=l.select(this),E=z[j?"increasing":"decreasing"],W=O(void 0,E.line,5,2);N.style("stroke-width",W+"px").call(h.fill,E.fillcolor),W&&h.stroke(N,E.line.color)})}).each(function(A){var z=A[0].trace,B=l.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(z.visible&&z.type==="ohlc"?[A,A]:[]);B.enter().append("path").classed("legendohlc",!0).attr("d",function($,j){return j?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",D).style("stroke-miterlimit",1),B.exit().remove(),B.each(function($,j){var N=l.select(this),E=z[j?"increasing":"decreasing"],W=O(void 0,E.line,5,2);N.style("fill","none").call(d.dashLine,E.line.dash,W),W&&h.stroke(N,E.line.color)})})}},42068:function(o,a,n){n(93348),o.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},26023:function(o,a,n){var l=n(73972),f=n(74875),s=n(41675),c=n(24255),d=n(34031).eraseActiveShape,h=n(71828),p=h._,m=o.exports={};function y(M,S){var C,P,D=S.currentTarget,O=D.getAttribute("data-attr"),R=D.getAttribute("data-val")||!0,F=M._fullLayout,A={},z=s.list(M,null,!0),B=F._cartesianSpikesEnabled;if(O==="zoom"){var $,j=R==="in"?.5:2,N=(1+j)/2,E=(1-j)/2;for(P=0;P1?(U=["toggleHover"],Q=["resetViews"]):A?(ee=["zoomInGeo","zoomOutGeo"],U=["hoverClosestGeo"],Q=["resetGeo"]):F?(U=["hoverClosest3d"],Q=["resetCameraDefault3d","resetCameraLastSave3d"]):N?(ee=["zoomInMapbox","zoomOutMapbox"],U=["toggleHover"],Q=["resetViewMapbox"]):$?U=["hoverClosestGl2d"]:z?U=["hoverClosestPie"]:G?(U=["hoverClosestCartesian","hoverCompareCartesian"],Q=["resetViewSankey"]):U=["toggleHover"],R&&(U=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(se){for(var pe=0;pe0)){var k=function(M,S,C){for(var P=C.filter(function(F){return S[F].anchor===M._id}),D=0,O=0;O=Se.max)pe=re[Te+1];else if(se=Se.pmax)pe=re[Te+1];else if(seTe._length||ge+Ie<0)return;Ee=ue+Ie,De=ge+Ie;break;case Me:if(Re="col-resize",ue+Ie>Te._length)return;Ee=ue+Ie,De=ge;break;case ce:if(Re="col-resize",ge+Ie<0)return;Ee=ue,De=ge+Ie;break;default:Re="ew-resize",Ee=xe,De=xe+Ie}if(De=0;$--){var j=S.append("path").attr(P).style("opacity",$?.1:D).call(c.stroke,R).call(c.fill,O).call(d.dashLine,$?"solid":A,$?4+F:F);if(b(j,_,T),z){var N=h(_.layout,"selections",T);j.style({cursor:"move"});var E={element:j.node(),plotinfo:M,gd:_,editHelpers:N,isActiveSelection:!0},W=l(C,_);f(W,j,E)}else j.style("pointer-events",$?"all":"none");B[$]=j}var G=B[0];B[1].node().addEventListener("click",function(){return function(L,q){if(v(L)){var H=+q.node().getAttribute("data-index");if(H>=0){if(H===L._fullLayout._activeSelectionIndex)return void x(L);L._fullLayout._activeSelectionIndex=H,L._fullLayout._deactivateSelection=x,y(L)}}}(_,G)})}(_._fullLayout._selectionLayer)}function b(_,w,k){var T=k.xref+k.yref;d.setClipUrl(_,"clip"+w._fullLayout._uid+T,w)}function x(_){v(_)&&_._fullLayout._activeSelectionIndex>=0&&(s(_),delete _._fullLayout._activeSelectionIndex,y(_))}o.exports={draw:y,drawOne:g,activateLastSelection:function(_){if(v(_)){var w=_._fullLayout.selections.length-1;_._fullLayout._activeSelectionIndex=w,_._fullLayout._deactivateSelection=x,y(_)}}}},53777:function(o,a,n){var l=n(79952).P,f=n(1426).extendFlat;o.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:f({},l,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},90849:function(o){o.exports=function(a,n,l){l("newselection.mode"),l("newselection.line.width")&&(l("newselection.line.color"),l("newselection.line.dash")),l("activeselection.fillcolor"),l("activeselection.opacity")}},35855:function(o,a,n){var l=n(64505).selectMode,f=n(51873).clearOutline,s=n(60165),c=s.readPaths,d=s.writePaths,h=s.fixDatesForPaths;o.exports=function(p,m){if(p.length){var y=p[0][0];if(y){var v=y.getAttribute("d"),g=m.gd,b=g._fullLayout.newselection,x=m.plotinfo,_=x.xaxis,w=x.yaxis,k=m.isActiveSelection,T=m.dragmode,M=(g.layout||{}).selections||[];if(!l(T)&&k!==void 0){var S=g._fullLayout._activeSelectionIndex;if(S-1,kt=[];if(function(Mt){return Mt&&Array.isArray(Mt)&&Mt[0].hoverOnBox!==!0}(Qe)){Z(ke,Ae,Ie);var Je=function(Mt,zt){var wt,ve,_e=Mt[0],Ve=-1,We=[];for(ve=0;ve0?function(Mt,zt){var wt,ve,_e,Ve=[];for(_e=0;_e0&&Ve.push(wt);if(Ve.length===1&&Ve[0]===zt.searchInfo&&(ve=zt.searchInfo.cd[0].trace).selectedpoints.length===zt.pointNumbers.length){for(_e=0;_e1||(ve+=zt.selectedpoints.length)>1))return!1;return ve===1}(Ue)&&(ct=se(Je))){for(Be&&Be.remove(),Ne=0;Ne=0})(Re)&&Re._fullLayout._deactivateShape(Re),function(lt){return lt._fullLayout._activeSelectionIndex>=0}(Re)&&Re._fullLayout._deactivateSelection(Re);var Ie=Re._fullLayout._zoomlayer,Be=g(Ee),Ue=x(Ee);if(Be||Ue){var qe,Ye,at=Ie.selectAll(".select-outline-"+De.id);at&&Re._fullLayout._outlining&&(Be&&(qe=P(at,ke)),qe&&s.call("_guiRelayout",Re,{shapes:qe}),Ue&&!te(ke)&&(Ye=D(at,ke)),Ye&&(Re._fullLayout._noEmitSelectedAtStart=!0,s.call("_guiRelayout",Re,{selections:Ye}).then(function(){Ae&&O(Re)})),Re._fullLayout._outlining=!1)}De.selection={},De.selection.selectionDefs=ke.selectionDefs=[],De.selection.mergedPolygons=ke.mergedPolygons=[]}function re(ke){return ke._id}function ie(ke,Ae,Ee,De){if(!ke.calcdata)return[];var Re,Ie,Be,Ue=[],qe=Ae.map(re),Ye=Ee.map(re);for(Be=0;Be0?De[0]:Ee;return!!Ae.selectedpoints&&Ae.selectedpoints.indexOf(Re)>-1}function pe(ke,Ae,Ee){var De,Re;for(De=0;De-1&&Ae;if(!Ie&&Ae){var Ot=ne(ke,!0);if(Ot.length){var At=Ot[0].xref,Lt=Ot[0].yref;if(At&&Lt){var Rt=ue(Ot);ge([B(ke,At,"x"),B(ke,Lt,"y")])(jt,Rt)}}ke._fullLayout._noEmitSelectedAtStart?ke._fullLayout._noEmitSelectedAtStart=!1:Tt&&be(ke,jt),ct._reselect=!1}if(!Ie&&ct._deselect){var $t=ct._deselect;(function(Yt,Xt,Bt){for(var Wt=0;Wt=0)bt._fullLayout._deactivateShape(bt);else if(!Ye){var Rt=ze.clickmode;z.done(Et).then(function(){if(z.clear(Et),At===2){for(Nt.remove(),_e=0;_e-1&&ee(Lt,bt,De.xaxes,De.yaxes,De.subplot,De,Nt),Rt==="event"&&be(bt,void 0);h.click(bt,Lt,kt.id)}).catch(R.error)}},De.doneFn=function(){yt.remove(),z.done(Et).then(function(){z.clear(Et),!Ne&&ve&&De.selectionDefs&&(ve.subtract=St,De.selectionDefs.push(ve),De.mergedPolygons.length=0,[].push.apply(De.mergedPolygons,wt)),(Ne||Ye)&&X(De,Ne),De.doneFnCompleted&&De.doneFnCompleted(jt),at&&be(bt,We)}).catch(R.error)}},clearOutline:T,clearSelectionsCache:X,selectOnClick:ee}},89827:function(o,a,n){var l=n(50215),f=n(41940),s=n(82196).line,c=n(79952).P,d=n(1426).extendFlat,h=n(44467).templatedArray,p=(n(24695),n(9012)),m=n(5386).R,y=n(37281);o.exports=h("shape",{visible:d({},p.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:d({},p.legend,{editType:"calc+arraydraw"}),legendgroup:d({},p.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:d({},p.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:f({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:d({},p.legendrank,{editType:"calc+arraydraw"}),legendwidth:d({},p.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:d({},l.xref,{}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},yref:d({},l.yref,{}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:d({},s.color,{editType:"arraydraw"}),width:d({},s.width,{editType:"calc+arraydraw"}),dash:d({},c,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:m({},{keys:Object.keys(y)}),font:f({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})},5627:function(o,a,n){var l=n(71828),f=n(89298),s=n(21459),c=n(30477);function d(y){return p(y.line.width,y.xsizemode,y.x0,y.x1,y.path,!1)}function h(y){return p(y.line.width,y.ysizemode,y.y0,y.y1,y.path,!0)}function p(y,v,g,b,x,_){var w=y/2,k=_;if(v==="pixel"){var T=x?c.extractPathCoords(x,_?s.paramIsY:s.paramIsX):[g,b],M=l.aggNums(Math.max,null,T),S=l.aggNums(Math.min,null,T),C=S<0?Math.abs(S)+w:w,P=M>0?M+w:w;return{ppad:w,ppadplus:k?C:P,ppadminus:k?P:C}}return{ppad:w}}function m(y,v,g,b,x){var _=y.type==="category"||y.type==="multicategory"?y.r2c:y.d2c;if(v!==void 0)return[_(v),_(g)];if(b){var w,k,T,M,S=1/0,C=-1/0,P=b.match(s.segmentRE);for(y.type==="date"&&(_=c.decodeDate(_)),w=0;wC&&(C=M)));return C>=S?[S,C]:void 0}}o.exports=function(y){var v=y._fullLayout,g=l.filterVisible(v.shapes);if(g.length&&y._fullData.length)for(var b=0;b=re?ie-se:se-ie,-180/Math.PI*Math.atan2(pe,Te)}(C,D,P,O):0),A.call(function(re){return re.call(c.font,F).attr({}),s.convertToTspans(re,v),re});var Q=function(re,ie,le,se,pe,Te,Se){var Oe,Me,ce,ye,J=pe.label.textposition,ne=pe.label.textangle,de=pe.label.padding,xe=pe.type,ue=Math.PI/180*Te,ge=Math.sin(ue),be=Math.cos(ue),we=pe.label.xanchor,ke=pe.label.yanchor;if(xe==="line"){J==="start"?(Oe=re,Me=ie):J==="end"?(Oe=le,Me=se):(Oe=(re+le)/2,Me=(ie+se)/2),we==="auto"&&(we=J==="start"?ne==="auto"?le>re?"left":lere?"right":lere?"right":lere?"left":le1&&(Oe.length!==2||Oe[1][0]!=="Z")&&(G===0&&(Oe[0][0]="M"),R[W]=Oe,$(),j())}}()}}function re(pe,Te){(function(Se,Oe){if(R.length)for(var Me=0;MeMe?(J=Se,ue="y0",ne=Me,ge="y1"):(J=Me,ue="y1",ne=Se,ge="y0"),ut(wt),Mt(se,ie),function(ve,_e,Ve){var We=_e.xref,Ze=_e.yref,Ge=c.getFromId(Ve,We),Ke=c.getFromId(Ve,Ze),nt="";We==="paper"||Ge.autorange||(nt+=We),Ze==="paper"||Ke.autorange||(nt+=Ze),v.setClipUrl(ve,nt?"clip"+Ve._fullLayout._uid+nt:null,Ve)}(re,ie,X),Je.moveFn=Ae==="move"?pt:It,Je.altKey=wt.altKey)},doneFn:function(){M(X)||(x(re),zt(se),P(re,X,ie),f.call("_guiRelayout",X,pe.getUpdateObj()))},clickFn:function(){M(X)||zt(se)}};function ut(wt){if(M(X))Ae=null;else if(Be)Ae=wt.target.tagName==="path"?"move":wt.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ve=Je.element.getBoundingClientRect(),_e=ve.right-ve.left,Ve=ve.bottom-ve.top,We=wt.clientX-ve.left,Ze=wt.clientY-ve.top,Ge=!Ue&&_e>Ee&&Ve>De&&!wt.shiftKey?b.getCursor(We/_e,1-Ze/Ve):"move";x(re,Ge),Ae=Ge.split("-")[0]}}function pt(wt,ve){if(ie.type==="path"){var _e=function(Ze){return Ze},Ve=_e,We=_e;Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(Ve=function(Ze){return Qe(ze(Ze)+wt)},at&&at.type==="date"&&(Ve=w.encodeDate(Ve))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(We=function(Ze){return it(Ne(Ze)+ve)},ct&&ct.type==="date"&&(We=w.encodeDate(We))),qe("path",ie.path=D(ke,Ve,We))}else Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(qe("x0",ie.x0=Qe(Te+wt)),qe("x1",ie.x1=Qe(Oe+wt))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(qe("y0",ie.y0=it(Se+ve)),qe("y1",ie.y1=it(Me+ve)));re.attr("d",k(X,ie)),Mt(se,ie),p(X,le,ie,Ye)}function It(wt,ve){if(Ue){var _e=function(ht){return ht},Ve=_e,We=_e;Re?qe("xanchor",ie.xanchor=Qe(ce+wt)):(Ve=function(ht){return Qe(ze(ht)+wt)},at&&at.type==="date"&&(Ve=w.encodeDate(Ve))),Ie?qe("yanchor",ie.yanchor=it(ye+ve)):(We=function(ht){return it(Ne(ht)+ve)},ct&&ct.type==="date"&&(We=w.encodeDate(We))),qe("path",ie.path=D(ke,Ve,We))}else if(Be){if(Ae==="resize-over-start-point"){var Ze=Te+wt,Ge=Ie?Se-ve:Se+ve;qe("x0",ie.x0=Re?Ze:Qe(Ze)),qe("y0",ie.y0=Ie?Ge:it(Ge))}else if(Ae==="resize-over-end-point"){var Ke=Oe+wt,nt=Ie?Me-ve:Me+ve;qe("x1",ie.x1=Re?Ke:Qe(Ke)),qe("y1",ie.y1=Ie?nt:it(nt))}}else{var st=function(ht){return Ae.indexOf(ht)!==-1},mt=st("n"),tt=st("s"),Ft=st("w"),Vt=st("e"),St=mt?J+ve:J,Nt=tt?ne+ve:ne,Dt=Ft?de+wt:de,gt=Vt?xe+wt:xe;Ie&&(mt&&(St=J-ve),tt&&(Nt=ne-ve)),(!Ie&&Nt-St>De||Ie&&St-Nt>De)&&(qe(ue,ie[ue]=Ie?St:it(St)),qe(ge,ie[ge]=Ie?Nt:it(Nt))),gt-Dt>Ee&&(qe(be,ie[be]=Re?Dt:Qe(Dt)),qe(we,ie[we]=Re?gt:Qe(gt)))}re.attr("d",k(X,ie)),Mt(se,ie),p(X,le,ie,Ye)}function Mt(wt,ve){(Re||Ie)&&function(){var _e=ve.type!=="path",Ve=wt.selectAll(".visual-cue").data([0]);Ve.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var We=ze(Re?ve.xanchor:s.midRange(_e?[ve.x0,ve.x1]:w.extractPathCoords(ve.path,_.paramIsX))),Ze=Ne(Ie?ve.yanchor:s.midRange(_e?[ve.y0,ve.y1]:w.extractPathCoords(ve.path,_.paramIsY)));if(We=w.roundPositionForSharpStrokeRendering(We,1),Ze=w.roundPositionForSharpStrokeRendering(Ze,1),Re&&Ie){var Ge="M"+(We-1-1)+","+(Ze-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ve.attr("d",Ge)}else if(Re){var Ke="M"+(We-1-1)+","+(Ze-9-1)+"v18 h2 v-18 Z";Ve.attr("d",Ke)}else{var nt="M"+(We-9-1)+","+(Ze-1-1)+"h18 v2 h-18 Z";Ve.attr("d",nt)}}()}function zt(wt){wt.selectAll(".visual-cue").remove()}b.init(Je),kt.node().onmousemove=ut}(R,Q,z,F,j,ee):z.editable===!0&&Q.style("pointer-events",V||y.opacity(G)*W<=.5?"stroke":"all");Q.node().addEventListener("click",function(){return function(X,re){if(S(X)){var ie=+re.node().getAttribute("data-index");if(ie>=0){if(ie===X._fullLayout._activeShapeIndex)return void O(X);X._fullLayout._activeShapeIndex=ie,X._fullLayout._deactivateShape=O,T(X)}}}(R,Q)})}z._input&&z.visible===!0&&(z.layer!=="below"?$(R._fullLayout._shapeUpperLayer):z.xref==="paper"||z.yref==="paper"?$(R._fullLayout._shapeLowerLayer):B._hadPlotinfo?$((B.mainplotinfo||B).shapelayer):$(R._fullLayout._shapeLowerLayer))}function P(R,F,A){var z=(A.xref+A.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");v.setClipUrl(R,z?"clip"+F._fullLayout._uid+z:null,F)}function D(R,F,A){return R.replace(_.segmentRE,function(z){var B=0,$=z.charAt(0),j=_.paramIsX[$],N=_.paramIsY[$],E=_.numParams[$];return $+z.substr(1).replace(_.paramRE,function(W){return B>=E||(j[B]?W=F(W):N[B]&&(W=A(W)),B++),W})})}function O(R){S(R)&&R._fullLayout._activeShapeIndex>=0&&(m(R),delete R._fullLayout._activeShapeIndex,T(R))}o.exports={draw:T,drawOne:C,eraseActiveShape:function(R){if(S(R)){m(R);var F=R._fullLayout._activeShapeIndex,A=(R.layout||{}).shapes||[];if(F0&&CU&&(Y="X"),Y});return H>U&&(Q=Q.replace(/[\s,]*X.*/,""),f.log("Ignoring extra params in segment "+q)),V+Q})}(d,p,y);if(d.xsizemode==="pixel"){var C=p(d.xanchor);v=C+d.x0,g=C+d.x1}else v=p(d.x0),g=p(d.x1);if(d.ysizemode==="pixel"){var P=y(d.yanchor);b=P-d.y0,x=P-d.y1}else b=y(d.y0),x=y(d.y1);if(_==="line")return"M"+v+","+b+"L"+g+","+x;if(_==="rect")return"M"+v+","+b+"H"+g+"V"+x+"H"+v+"Z";var D=(v+g)/2,O=(b+x)/2,R=Math.abs(D-v),F=Math.abs(O-b),A="A"+R+","+F,z=D+R+","+O;return"M"+z+A+" 0 1,1 "+D+","+(O-F)+A+" 0 0,1 "+z+"Z"}},89853:function(o,a,n){var l=n(34031);o.exports={moduleType:"component",name:"shapes",layoutAttributes:n(89827),supplyLayoutDefaults:n(84726),supplyDrawNewShapeDefaults:n(45547),includeBasePlot:n(76325)("shapes"),calcAutorange:n(5627),draw:l.draw,drawOne:l.drawOne}},37281:function(o){function a(s,c){return c?c.d2l(s):s}function n(s,c){return c?c.l2d(s):s}function l(s,c){return a(s.x1,c)-a(s.x0,c)}function f(s,c,d){return a(s.y1,d)-a(s.y0,d)}o.exports={x0:function(s){return s.x0},x1:function(s){return s.x1},y0:function(s){return s.y0},y1:function(s){return s.y1},slope:function(s,c,d){return s.type!=="line"?void 0:f(s,0,d)/l(s,c)},dx:l,dy:f,width:function(s,c){return Math.abs(l(s,c))},height:function(s,c,d){return Math.abs(f(s,0,d))},length:function(s,c,d){return s.type!=="line"?void 0:Math.sqrt(Math.pow(l(s,c),2)+Math.pow(f(s,0,d),2))},xcenter:function(s,c){return n((a(s.x1,c)+a(s.x0,c))/2,c)},ycenter:function(s,c,d){return n((a(s.y1,d)+a(s.y0,d))/2,d)}}},75067:function(o,a,n){var l=n(41940),f=n(35025),s=n(1426).extendDeepAll,c=n(30962).overrideAll,d=n(85594),h=n(44467).templatedArray,p=n(98292),m=h("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});o.exports=c(h("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:m,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:s(f({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:d.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:l({})},font:l({}),activebgcolor:{valType:"color",dflt:p.gripBgActiveColor},bgcolor:{valType:"color",dflt:p.railBgColor},bordercolor:{valType:"color",dflt:p.railBorderColor},borderwidth:{valType:"number",min:0,dflt:p.railBorderWidth},ticklen:{valType:"number",min:0,dflt:p.tickLength},tickcolor:{valType:"color",dflt:p.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:p.minorTickLength}}),"arraydraw","from-root")},98292:function(o){o.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},12343:function(o,a,n){var l=n(71828),f=n(85501),s=n(75067),c=n(98292).name,d=s.steps;function h(m,y,v){function g(k,T){return l.coerce(m,y,s,k,T)}for(var b=f(m,y,{name:"steps",handleItemDefaults:p}),x=0,_=0;_0&&(H=H.transition().duration(N.transition.duration).ease(N.transition.easing)),H.attr("transform",h(q-.5*y.gripWidth,N._dims.currentValueTotalHeight))}}function A(j,N){var E=j._dims;return E.inputAreaStart+y.stepInset+(E.inputAreaLength-2*y.stepInset)*Math.min(1,Math.max(0,N))}function z(j,N){var E=j._dims;return Math.min(1,Math.max(0,(N-y.stepInset-E.inputAreaStart)/(E.inputAreaLength-2*y.stepInset-2*E.inputAreaStart)))}function B(j,N,E){var W=E._dims,G=d.ensureSingle(j,"rect",y.railTouchRectClass,function(L){L.call(O,N,j,E).style("pointer-events","all")});G.attr({width:W.inputAreaLength,height:Math.max(W.inputAreaWidth,y.tickOffset+E.ticklen+W.labelHeight)}).call(s.fill,E.bgcolor).attr("opacity",0),c.setTranslate(G,0,W.currentValueTotalHeight)}function $(j,N){var E=N._dims,W=E.inputAreaLength-2*y.railInset,G=d.ensureSingle(j,"rect",y.railRectClass);G.attr({width:W,height:y.railWidth,rx:y.railRadius,ry:y.railRadius,"shape-rendering":"crispEdges"}).call(s.stroke,N.bordercolor).call(s.fill,N.bgcolor).style("stroke-width",N.borderwidth+"px"),c.setTranslate(G,y.railInset,.5*(E.inputAreaWidth-y.railWidth)+E.currentValueTotalHeight)}o.exports=function(j){var N=j._context.staticPlot,E=j._fullLayout,W=function(te,ee){for(var U=te[y.name],Q=[],Y=0;Y0?[0]:[]);function L(te){te._commandObserver&&(te._commandObserver.remove(),delete te._commandObserver),f.autoMargin(j,_(te))}if(G.enter().append("g").classed(y.containerClassName,!0).style("cursor",N?null:"ew-resize"),G.exit().each(function(){l.select(this).selectAll("g."+y.groupClassName).each(L)}).remove(),W.length!==0){var q=G.selectAll("g."+y.groupClassName).data(W,w);q.enter().append("g").classed(y.groupClassName,!0),q.exit().each(L).remove();for(var H=0;H0||Oe<0){var J={left:[-Me,0],right:[Me,0],top:[0,-Me],bottom:[0,Me]}[P.side];Q.attr("transform",h(J[0],J[1]))}}}return H.call(V),G&&($?H.on(".opacity",null):(A=0,z=!0,H.text(S).on("mouseover.opacity",function(){l.select(this).transition().duration(v.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){l.select(this).transition().duration(v.HIDE_PLACEHOLDER).style("opacity",0)})),H.call(y.makeEditable,{gd:x}).on("edit",function(U){C!==void 0?c.call("_guiRestyle",x,M,U,C):c.call("_guiRelayout",x,M,U)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(V)}).on("input",function(U){this.text(U||" ").call(y.positionText,D.x,D.y)})),H.classed("js-placeholder",z),R}}},7163:function(o,a,n){var l=n(41940),f=n(22399),s=n(1426).extendFlat,c=n(30962).overrideAll,d=n(35025),h=n(44467).templatedArray,p=h("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});o.exports=c(h("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:p,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:s(d({editType:"arraydraw"}),{}),font:l({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:f.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(o){o.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},64897:function(o,a,n){var l=n(71828),f=n(85501),s=n(7163),c=n(75909).name,d=s.buttons;function h(m,y,v){function g(b,x){return l.coerce(m,y,s,b,x)}g("visible",f(m,y,{name:"buttons",handleItemDefaults:p}).length>0)&&(g("active"),g("direction"),g("type"),g("showactive"),g("x"),g("y"),l.noneOrAll(m,y,["x","y"]),g("xanchor"),g("yanchor"),g("pad.t"),g("pad.r"),g("pad.b"),g("pad.l"),l.coerceFont(g,"font",v.font),g("bgcolor",v.paper_bgcolor),g("bordercolor"),g("borderwidth"))}function p(m,y){function v(g,b){return l.coerce(m,y,d,g,b)}v("visible",m.method==="skip"||Array.isArray(m.args))&&(v("method"),v("args"),v("args2"),v("label"),v("execute"))}o.exports=function(m,y){f(m,y,{name:c,handleItemDefaults:h})}},13689:function(o,a,n){var l=n(39898),f=n(74875),s=n(7901),c=n(91424),d=n(71828),h=n(63893),p=n(44467).arrayEditor,m=n(18783).LINE_SPACING,y=n(75909),v=n(25849);function g(A){return A._index}function b(A,z){return+A.attr(y.menuIndexAttrName)===z._index}function x(A,z,B,$,j,N,E,W){z.active=E,p(A.layout,y.name,z).applyUpdate("active",E),z.type==="buttons"?w(A,$,null,null,z):z.type==="dropdown"&&(j.attr(y.menuIndexAttrName,"-1"),_(A,$,j,N,z),W||w(A,$,j,N,z))}function _(A,z,B,$,j){var N=d.ensureSingle(z,"g",y.headerClassName,function(H){H.style("pointer-events","all")}),E=j._dims,W=j.active,G=j.buttons[W]||y.blankHeaderOpts,L={y:j.pad.t,yPad:0,x:j.pad.l,xPad:0,index:0},q={width:E.headerWidth,height:E.headerHeight};N.call(k,j,G,A).call(R,j,L,q),d.ensureSingle(z,"text",y.headerArrowClassName,function(H){H.attr("text-anchor","end").call(c.font,j.font).text(y.arrowSymbol[j.direction])}).attr({x:E.headerWidth-y.arrowOffsetX+j.pad.l,y:E.headerHeight/2+y.textOffsetY+j.pad.t}),N.on("click",function(){B.call(F,String(b(B,j)?-1:j._index)),w(A,z,B,$,j)}),N.on("mouseover",function(){N.call(C)}),N.on("mouseout",function(){N.call(P,j)}),c.setTranslate(z,E.lx,E.ly)}function w(A,z,B,$,j){B||(B=z).attr("pointer-events","all");var N=function(Q){return+Q.attr(y.menuIndexAttrName)==-1}(B)&&j.type!=="buttons"?[]:j.buttons,E=j.type==="dropdown"?y.dropdownButtonClassName:y.buttonClassName,W=B.selectAll("g."+E).data(d.filterVisible(N)),G=W.enter().append("g").classed(E,!0),L=W.exit();j.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),L.transition().attr("opacity","0").remove()):L.remove();var q=0,H=0,V=j._dims,te=["up","down"].indexOf(j.direction)!==-1;j.type==="dropdown"&&(te?H=V.headerHeight+y.gapButtonHeader:q=V.headerWidth+y.gapButtonHeader),j.type==="dropdown"&&j.direction==="up"&&(H=-y.gapButtonHeader+y.gapButton-V.openHeight),j.type==="dropdown"&&j.direction==="left"&&(q=-y.gapButtonHeader+y.gapButton-V.openWidth);var ee={x:V.lx+q+j.pad.l,y:V.ly+H+j.pad.t,yPad:y.gapButton,xPad:y.gapButton,index:0},U={l:ee.x+j.borderwidth,t:ee.y+j.borderwidth};W.each(function(Q,Y){var Z=l.select(this);Z.call(k,j,Q,A).call(R,j,ee),Z.on("click",function(){l.event.defaultPrevented||(Q.execute&&(Q.args2&&j.active===Y?(x(A,j,0,z,B,$,-1),f.executeAPICommand(A,Q.method,Q.args2)):(x(A,j,0,z,B,$,Y),f.executeAPICommand(A,Q.method,Q.args))),A.emit("plotly_buttonclicked",{menu:j,button:Q,active:j.active}))}),Z.on("mouseover",function(){Z.call(C)}),Z.on("mouseout",function(){Z.call(P,j),W.call(S,j)})}),W.call(S,j),te?(U.w=Math.max(V.openWidth,V.headerWidth),U.h=ee.y-U.t):(U.w=ee.x-U.l,U.h=Math.max(V.openHeight,V.headerHeight)),U.direction=j.direction,$&&(W.size()?function(Q,Y,Z,X,re,ie){var le,se,pe,Te=re.direction,Se=Te==="up"||Te==="down",Oe=re._dims,Me=re.active;if(Se)for(se=0,pe=0;pe0?[0]:[]);if(j.enter().append("g").classed(y.containerClassName,!0).style("cursor","pointer"),j.exit().each(function(){l.select(this).selectAll("g."+y.headerGroupClassName).each($)}).remove(),B.length!==0){var N=j.selectAll("g."+y.headerGroupClassName).data(B,g);N.enter().append("g").classed(y.headerGroupClassName,!0);for(var E=d.ensureSingle(j,"g",y.dropdownButtonGroupClassName,function(H){H.style("pointer-events","all")}),W=0;WR,z=d.barLength+2*d.barPad,B=d.barWidth+2*d.barPad,$=k,j=M+S;j+B>g&&(j=g-B);var N=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);N.exit().on(".drag",null).remove(),N.enter().append("rect").classed("scrollbar-horizontal",!0).call(f.fill,d.barColor),A?(this.hbar=N.attr({rx:d.barRadius,ry:d.barRadius,x:$,y:j,width:z,height:B}),this._hbarXMin=$+z/2,this._hbarTranslateMax=R-z):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var E=S>F,W=d.barWidth+2*d.barPad,G=d.barLength+2*d.barPad,L=k+T,q=M;L+W>v&&(L=v-W);var H=this.container.selectAll("rect.scrollbar-vertical").data(E?[0]:[]);H.exit().on(".drag",null).remove(),H.enter().append("rect").classed("scrollbar-vertical",!0).call(f.fill,d.barColor),E?(this.vbar=H.attr({rx:d.barRadius,ry:d.barRadius,x:L,y:q,width:W,height:G}),this._vbarYMin=q+G/2,this._vbarTranslateMax=F-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var V=this.id,te=b-.5,ee=E?x+W+.5:x+.5,U=_-.5,Q=A?w+B+.5:w+.5,Y=y._topdefs.selectAll("#"+V).data(A||E?[0]:[]);if(Y.exit().remove(),Y.enter().append("clipPath").attr("id",V).append("rect"),A||E?(this._clipRect=Y.select("rect").attr({x:Math.floor(te),y:Math.floor(U),width:Math.ceil(ee)-Math.floor(te),height:Math.ceil(Q)-Math.floor(U)}),this.container.call(s.setClipUrl,V,this.gd),this.bg.attr({x:k,y:M,width:T,height:S})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),A||E){var Z=l.behavior.drag().on("dragstart",function(){l.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Z);var X=l.behavior.drag().on("dragstart",function(){l.event.sourceEvent.preventDefault(),l.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(X),E&&this.vbar.on(".drag",null).call(X)}this.setTranslate(p,m)},d.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(s.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},d.prototype._onBoxDrag=function(){var h=this.translateX,p=this.translateY;this.hbar&&(h-=l.event.dx),this.vbar&&(p-=l.event.dy),this.setTranslate(h,p)},d.prototype._onBoxWheel=function(){var h=this.translateX,p=this.translateY;this.hbar&&(h+=l.event.deltaY),this.vbar&&(p+=l.event.deltaY),this.setTranslate(h,p)},d.prototype._onBarDrag=function(){var h=this.translateX,p=this.translateY;if(this.hbar){var m=h+this._hbarXMin,y=m+this._hbarTranslateMax;h=(c.constrain(l.event.x,m,y)-m)/(y-m)*(this.position.w-this._box.w)}if(this.vbar){var v=p+this._vbarYMin,g=v+this._vbarTranslateMax;p=(c.constrain(l.event.y,v,g)-v)/(g-v)*(this.position.h-this._box.h)}this.setTranslate(h,p)},d.prototype.setTranslate=function(h,p){var m=this.position.w-this._box.w,y=this.position.h-this._box.h;if(h=c.constrain(h||0,0,m),p=c.constrain(p||0,0,y),this.translateX=h,this.translateY=p,this.container.call(s.setTranslate,this._box.l-this.position.l-h,this._box.t-this.position.t-p),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+h-.5),y:Math.floor(this.position.t+p-.5)}),this.hbar){var v=h/m;this.hbar.call(s.setTranslate,h+v*this._hbarTranslateMax,p)}if(this.vbar){var g=p/y;this.vbar.call(s.setTranslate,h,p+g*this._vbarTranslateMax)}}},18783:function(o){o.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},24695:function(o){o.exports={axisRefDescription:function(a,n,l){return["If set to a",a,"axis id (e.g. *"+a+"* or","*"+a+"2*), the `"+a+"` position refers to a",a,"coordinate. If set to *paper*, the `"+a+"`","position refers to the distance from the",n,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",n,"("+l+"). If set to a",a,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",n,"of the domain of that axis: e.g.,","*"+a+"2 domain* refers to the domain of the second",a," axis and a",a,"position of 0.5 refers to the","point between the",n,"and the",l,"of the domain of the","second",a,"axis."].join(" ")}}},31562:function(o){o.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},74808:function(o){o.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},37822:function(o){o.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(o){o.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},32396:function(o,a){a.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],a.STYLE=a.CSS_DECLARATIONS.map(function(n){return n.join(": ")+"; "}).join("")},77922:function(o,a){a.xmlns="http://www.w3.org/2000/xmlns/",a.svg="http://www.w3.org/2000/svg",a.xlink="http://www.w3.org/1999/xlink",a.svgAttrs={xmlns:a.svg,"xmlns:xlink":a.xlink}},8729:function(o,a,n){a.version=n(11506).version,n(7417),n(98847);for(var l=n(73972),f=a.register=l.register,s=n(10641),c=Object.keys(s),d=0;d",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(o,a){a.isLeftAnchor=function(n){return n.xanchor==="left"||n.xanchor==="auto"&&n.x<=.3333333333333333},a.isCenterAnchor=function(n){return n.xanchor==="center"||n.xanchor==="auto"&&n.x>.3333333333333333&&n.x<.6666666666666666},a.isRightAnchor=function(n){return n.xanchor==="right"||n.xanchor==="auto"&&n.x>=.6666666666666666},a.isTopAnchor=function(n){return n.yanchor==="top"||n.yanchor==="auto"&&n.y>=.6666666666666666},a.isMiddleAnchor=function(n){return n.yanchor==="middle"||n.yanchor==="auto"&&n.y>.3333333333333333&&n.y<.6666666666666666},a.isBottomAnchor=function(n){return n.yanchor==="bottom"||n.yanchor==="auto"&&n.y<=.3333333333333333}},26348:function(o,a,n){var l=n(64872),f=l.mod,s=l.modHalf,c=Math.PI,d=2*c;function h(v){return Math.abs(v[1]-v[0])>d-1e-14}function p(v,g){return s(g-v,d)}function m(v,g){if(h(g))return!0;var b,x;g[0](x=f(x,d))&&(x+=d);var _=f(v,d),w=_+d;return _>=b&&_<=x||w>=b&&w<=x}function y(v,g,b,x,_,w,k){_=_||0,w=w||0;var T,M,S,C,P,D=h([b,x]);function O(z,B){return[z*Math.cos(B)+_,w-z*Math.sin(B)]}D?(T=0,M=c,S=d):b=_&&v<=w);var _,w},pathArc:function(v,g,b,x,_){return y(null,v,g,b,x,_,0)},pathSector:function(v,g,b,x,_){return y(null,v,g,b,x,_,1)},pathAnnulus:function(v,g,b,x,_,w){return y(v,g,b,x,_,w,1)}}},73627:function(o,a){var n=Array.isArray,l=ArrayBuffer,f=DataView;function s(h){return l.isView(h)&&!(h instanceof f)}function c(h){return n(h)||s(h)}function d(h,p,m){if(c(h)){if(c(h[0])){for(var y=m,v=0;vw.max?x.set(_):x.set(+b)}},integer:{coerceFunction:function(b,x,_,w){b%1||!l(b)||w.min!==void 0&&bw.max?x.set(_):x.set(+b)}},string:{coerceFunction:function(b,x,_,w){if(typeof b!="string"){var k=typeof b=="number";w.strict!==!0&&k?x.set(String(b)):x.set(_)}else w.noBlank&&!b?x.set(_):x.set(b)}},color:{coerceFunction:function(b,x,_){f(b).isValid()?x.set(b):x.set(_)}},colorlist:{coerceFunction:function(b,x,_){Array.isArray(b)&&b.length&&b.every(function(w){return f(w).isValid()})?x.set(b):x.set(_)}},colorscale:{coerceFunction:function(b,x,_){x.set(c.get(b,_))}},angle:{coerceFunction:function(b,x,_){b==="auto"?x.set("auto"):l(b)?x.set(y(+b,360)):x.set(_)}},subplotid:{coerceFunction:function(b,x,_,w){var k=w.regex||m(_);typeof b=="string"&&k.test(b)?x.set(b):x.set(_)},validateFunction:function(b,x){var _=x.dflt;return b===_||typeof b=="string"&&!!m(_).test(b)}},flaglist:{coerceFunction:function(b,x,_,w){if((w.extras||[]).indexOf(b)===-1)if(typeof b=="string"){for(var k=b.split("+"),T=0;T=l&&N<=f?N:m}if(typeof N!="string"&&typeof N!="number")return m;N=String(N);var q=S(E),H=N.charAt(0);!q||H!=="G"&&H!=="g"||(N=N.substr(1),E="");var V=q&&E.substr(0,7)==="chinese",te=N.match(V?T:k);if(!te)return m;var ee=te[1],U=te[3]||"1",Q=Number(te[5]||1),Y=Number(te[7]||0),Z=Number(te[9]||0),X=Number(te[11]||0);if(q){if(ee.length===2)return m;var re;ee=Number(ee);try{var ie=_.getComponentMethod("calendars","getCal")(E);if(V){var le=U.charAt(U.length-1)==="i";U=parseInt(U,10),re=ie.newDate(ee,ie.toMonthIndex(ee,U,le),Q)}else re=ie.newDate(ee,Number(U),Q)}catch{return m}return re?(re.toJD()-x)*y+Y*v+Z*g+X*b:m}ee=ee.length===2?(Number(ee)+2e3-M)%100+M:Number(ee),U-=1;var se=new Date(Date.UTC(2e3,U,Q,Y,Z));return se.setUTCFullYear(ee),se.getUTCMonth()!==U||se.getUTCDate()!==Q?m:se.getTime()+X*b},l=a.MIN_MS=a.dateTime2ms("-9999"),f=a.MAX_MS=a.dateTime2ms("9999-12-31 23:59:59.9999"),a.isDateTime=function(N,E){return a.dateTime2ms(N,E)!==m};var P=90*y,D=3*v,O=5*g;function R(N,E,W,G,L){if((E||W||G||L)&&(N+=" "+C(E,2)+":"+C(W,2),(G||L)&&(N+=":"+C(G,2),L))){for(var q=4;L%10==0;)q-=1,L/=10;N+="."+C(L,q)}return N}a.ms2DateTime=function(N,E,W){if(typeof N!="number"||!(N>=l&&N<=f))return m;E||(E=0);var G,L,q,H,V,te,ee=Math.floor(10*h(N+.05,1)),U=Math.round(N-ee/10);if(S(W)){var Q=Math.floor(U/y)+x,Y=Math.floor(h(N,y));try{G=_.getComponentMethod("calendars","getCal")(W).fromJD(Q).formatDate("yyyy-mm-dd")}catch{G=w("G%Y-%m-%d")(new Date(U))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;L=E=l+y&&N<=f-y))return m;var E=Math.floor(10*h(N+.05,1)),W=new Date(Math.round(N-E/10));return R(s("%Y-%m-%d")(W),W.getHours(),W.getMinutes(),W.getSeconds(),10*W.getUTCMilliseconds()+E)},a.cleanDate=function(N,E,W){if(N===m)return E;if(a.isJSDate(N)||typeof N=="number"&&isFinite(N)){if(S(W))return d.error("JS Dates and milliseconds are incompatible with world calendars",N),E;if(!(N=a.ms2DateTimeLocal(+N))&&E!==void 0)return E}else if(!a.isDateTime(N,W))return d.error("unrecognized date",N),E;return N};var F=/%\d?f/g,A=/%h/g,z={1:"1",2:"1",3:"2",4:"2"};function B(N,E,W,G){N=N.replace(F,function(q){var H=Math.min(+q.charAt(1)||6,6);return(E/1e3%1+2).toFixed(H).substr(2).replace(/0+$/,"")||"0"});var L=new Date(Math.floor(E+.05));if(N=N.replace(A,function(){return z[W("%q")(L)]}),S(G))try{N=_.getComponentMethod("calendars","worldCalFmt")(N,E,G)}catch{return"Invalid"}return W(N)(L)}var $=[59,59.9,59.99,59.999,59.9999];a.formatDate=function(N,E,W,G,L,q){if(L=S(L)&&L,!E)if(W==="y")E=q.year;else if(W==="m")E=q.month;else{if(W!=="d")return function(H,V){var te=h(H+.05,y),ee=C(Math.floor(te/v),2)+":"+C(h(Math.floor(te/g),60),2);if(V!=="M"){c(V)||(V=0);var U=(100+Math.min(h(H/b,60),$[V])).toFixed(V).substr(1);V>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),ee+=":"+U}return ee}(N,W)+` `+B(q.dayMonthYear,N,G,L);E=q.dayMonth+` `+q.year}return B(E,N,G,L)};var j=3*y;a.incrementMonth=function(N,E,W){W=S(W)&&W;var G=h(N,y);if(N=Math.round(N-G),W)try{var L=Math.round(N/y)+x,q=_.getComponentMethod("calendars","getCal")(W),H=q.fromJD(L);return E%12?q.add(H,E,"m"):q.add(H,E/12,"y"),(H.toJD()-x)*y+G}catch{d.error("invalid ms "+N+" in calendar "+W)}var V=new Date(N+j);return V.setUTCMonth(V.getUTCMonth()+E)+G-j},a.findExactDates=function(N,E){for(var W,G,L=0,q=0,H=0,V=0,te=S(E)&&_.getComponentMethod("calendars","getCal")(E),ee=0;ee1||D<0||D>1?null:{x:p+w*D,y:m+M*D}}function h(p,m,y,v,g){var b=v*p+g*m;if(b<0)return v*v+g*g;if(b>y){var x=v-p,_=g-m;return x*x+_*_}var w=v*m-g*p;return w*w/y}a.segmentsIntersect=d,a.segmentDistance=function(p,m,y,v,g,b,x,_){if(d(p,m,y,v,g,b,x,_))return 0;var w=y-p,k=v-m,T=x-g,M=_-b,S=w*w+k*k,C=T*T+M*M,P=Math.min(h(w,k,S,g-p,b-m),h(w,k,S,x-p,_-m),h(T,M,C,p-g,m-b),h(T,M,C,y-g,v-b));return Math.sqrt(P)},a.getTextLocation=function(p,m,y,v){if(p===f&&v===s||(l={},f=p,s=v),l[y])return l[y];var g=p.getPointAtLength(c(y-v/2,m)),b=p.getPointAtLength(c(y+v/2,m)),x=Math.atan((b.y-g.y)/(b.x-g.x)),_=p.getPointAtLength(c(y,m)),w={x:(4*_.x+g.x+b.x)/6,y:(4*_.y+g.y+b.y)/6,theta:x};return l[y]=w,w},a.clearLocationCache=function(){f=null},a.getVisibleSegment=function(p,m,y){var v,g,b=m.left,x=m.right,_=m.top,w=m.bottom,k=0,T=p.getTotalLength(),M=T;function S(P){var D=p.getPointAtLength(P);P===0?v=D:P===T&&(g=D);var O=D.xx?D.x-x:0,R=D.y<_?_-D.y:D.y>w?D.y-w:0;return Math.sqrt(O*O+R*R)}for(var C=S(k);C;){if((k+=C+y)>M)return;C=S(k)}for(C=S(M);C;){if(k>(M-=C+y))return;C=S(M)}return{min:k,max:M,len:M-k,total:T,isClosed:k===0&&M===T&&Math.abs(v.x-g.x)<.1&&Math.abs(v.y-g.y)<.1}},a.findPointOnPath=function(p,m,y,v){for(var g,b,x,_=(v=v||{}).pathLength||p.getTotalLength(),w=v.tolerance||.001,k=v.iterationLimit||30,T=p.getPointAtLength(0)[y]>p.getPointAtLength(_)[y]?-1:1,M=0,S=0,C=_;M0?C=g:S=g,M++}return b}},23389:function(o){o.exports=function(a){return a}},39240:function(o){o.exports=function(a,n){if(!n)return a;var l=1/Math.abs(n),f=l>1?(l*a+l*n)/l:a+n,s=String(f).length;if(s>16){var c=String(n).length;if(s>=String(a).length+c){var d=parseFloat(f).toPrecision(12);d.indexOf("e+")===-1&&(f=+d)}}return f}},71828:function(o,a,n){var l=n(39898),f=n(84096).g0,s=n(60721).WU,c=n(92770),d=n(50606),h=d.FP_SAFE,p=-h,m=d.BADNUM,y=o.exports={};y.adjustFormat=function(Y){return!Y||/^\d[.]\df/.test(Y)||/[.]\d%/.test(Y)?Y:Y==="0.f"?"~f":/^\d%/.test(Y)?"~%":/^\ds/.test(Y)?"~s":!/^[~,.0$]/.test(Y)&&/[&fps]/.test(Y)?"~"+Y:Y};var v={};y.warnBadFormat=function(Y){var Z=String(Y);v[Z]||(v[Z]=1,y.warn('encountered bad format: "'+Z+'"'))},y.noFormat=function(Y){return String(Y)},y.numberFormat=function(Y){var Z;try{Z=s(y.adjustFormat(Y))}catch{return y.warnBadFormat(Y),y.noFormat}return Z},y.nestedProperty=n(65487),y.keyedContainer=n(66636),y.relativeAttr=n(6962),y.isPlainObject=n(41965),y.toLogRange=n(58163),y.relinkPrivateKeys=n(51332);var g=n(73627);y.isTypedArray=g.isTypedArray,y.isArrayOrTypedArray=g.isArrayOrTypedArray,y.isArray1D=g.isArray1D,y.ensureArray=g.ensureArray,y.concat=g.concat,y.maxRowLength=g.maxRowLength,y.minRowLength=g.minRowLength;var b=n(64872);y.mod=b.mod,y.modHalf=b.modHalf;var x=n(96554);y.valObjectMeta=x.valObjectMeta,y.coerce=x.coerce,y.coerce2=x.coerce2,y.coerceFont=x.coerceFont,y.coercePattern=x.coercePattern,y.coerceHoverinfo=x.coerceHoverinfo,y.coerceSelectionMarkerOpacity=x.coerceSelectionMarkerOpacity,y.validate=x.validate;var _=n(41631);y.dateTime2ms=_.dateTime2ms,y.isDateTime=_.isDateTime,y.ms2DateTime=_.ms2DateTime,y.ms2DateTimeLocal=_.ms2DateTimeLocal,y.cleanDate=_.cleanDate,y.isJSDate=_.isJSDate,y.formatDate=_.formatDate,y.incrementMonth=_.incrementMonth,y.dateTick0=_.dateTick0,y.dfltRange=_.dfltRange,y.findExactDates=_.findExactDates,y.MIN_MS=_.MIN_MS,y.MAX_MS=_.MAX_MS;var w=n(65888);y.findBin=w.findBin,y.sorterAsc=w.sorterAsc,y.sorterDes=w.sorterDes,y.distinctVals=w.distinctVals,y.roundUp=w.roundUp,y.sort=w.sort,y.findIndexOfMin=w.findIndexOfMin,y.sortObjectKeys=n(78607);var k=n(80038);y.aggNums=k.aggNums,y.len=k.len,y.mean=k.mean,y.median=k.median,y.midRange=k.midRange,y.variance=k.variance,y.stdev=k.stdev,y.interp=k.interp;var T=n(35657);y.init2dArray=T.init2dArray,y.transposeRagged=T.transposeRagged,y.dot=T.dot,y.translationMatrix=T.translationMatrix,y.rotationMatrix=T.rotationMatrix,y.rotationXYMatrix=T.rotationXYMatrix,y.apply3DTransform=T.apply3DTransform,y.apply2DTransform=T.apply2DTransform,y.apply2DTransform2=T.apply2DTransform2,y.convertCssMatrix=T.convertCssMatrix,y.inverseTransformMatrix=T.inverseTransformMatrix;var M=n(26348);y.deg2rad=M.deg2rad,y.rad2deg=M.rad2deg,y.angleDelta=M.angleDelta,y.angleDist=M.angleDist,y.isFullCircle=M.isFullCircle,y.isAngleInsideSector=M.isAngleInsideSector,y.isPtInsideSector=M.isPtInsideSector,y.pathArc=M.pathArc,y.pathSector=M.pathSector,y.pathAnnulus=M.pathAnnulus;var S=n(99863);y.isLeftAnchor=S.isLeftAnchor,y.isCenterAnchor=S.isCenterAnchor,y.isRightAnchor=S.isRightAnchor,y.isTopAnchor=S.isTopAnchor,y.isMiddleAnchor=S.isMiddleAnchor,y.isBottomAnchor=S.isBottomAnchor;var C=n(87642);y.segmentsIntersect=C.segmentsIntersect,y.segmentDistance=C.segmentDistance,y.getTextLocation=C.getTextLocation,y.clearLocationCache=C.clearLocationCache,y.getVisibleSegment=C.getVisibleSegment,y.findPointOnPath=C.findPointOnPath;var P=n(1426);y.extendFlat=P.extendFlat,y.extendDeep=P.extendDeep,y.extendDeepAll=P.extendDeepAll,y.extendDeepNoArrays=P.extendDeepNoArrays;var D=n(47769);y.log=D.log,y.warn=D.warn,y.error=D.error;var O=n(30587);y.counterRegex=O.counter;var R=n(79990);y.throttle=R.throttle,y.throttleDone=R.done,y.clearThrottle=R.clear;var F=n(24401);function A(Y){var Z={};for(var X in Y)for(var re=Y[X],ie=0;ieh||Y=Z)&&c(Y)&&Y>=0&&Y%1==0},y.noop=n(64213),y.identity=n(23389),y.repeat=function(Y,Z){for(var X=new Array(Z),re=0;reX?Math.max(X,Math.min(Z,Y)):Math.max(Z,Math.min(X,Y))},y.bBoxIntersect=function(Y,Z,X){return X=X||0,Y.left<=Z.right+X&&Z.left<=Y.right+X&&Y.top<=Z.bottom+X&&Z.top<=Y.bottom+X},y.simpleMap=function(Y,Z,X,re,ie){for(var le=Y.length,se=new Array(le),pe=0;pe=Math.pow(2,X)?ie>10?(y.warn("randstr failed uniqueness"),Te):Y(Z,X,re,(ie||0)+1):Te},y.OptionControl=function(Y,Z){Y||(Y={}),Z||(Z="opt");var X={optionList:[],_newoption:function(re){re[Z]=Y,X[re.name]=re,X.optionList.push(re)}};return X["_"+Z]=Y,X},y.smooth=function(Y,Z){if((Z=Math.round(Z)||0)<2)return Y;var X,re,ie,le,se=Y.length,pe=2*se,Te=2*Z-1,Se=new Array(Te),Oe=new Array(se);for(X=0;X=pe&&(ie-=pe*Math.floor(ie/pe)),ie<0?ie=-1-ie:ie>=se&&(ie=pe-1-ie),le+=Y[ie]*Se[re];Oe[X]=le}return Oe},y.syncOrAsync=function(Y,Z,X){var re;function ie(){return y.syncOrAsync(Y,Z,X)}for(;Y.length;)if((re=(0,Y.splice(0,1)[0])(Z))&&re.then)return re.then(ie);return X&&X(Z)},y.stripTrailingSlash=function(Y){return Y.substr(-1)==="/"?Y.substr(0,Y.length-1):Y},y.noneOrAll=function(Y,Z,X){if(Y){var re,ie=!1,le=!0;for(re=0;re0?ie:0})},y.fillArray=function(Y,Z,X,re){if(re=re||y.identity,y.isArrayOrTypedArray(Y))for(var ie=0;ie1?ie+se[1]:"";if(le&&(se.length>1||pe.length>4||X))for(;re.test(pe);)pe=pe.replace(re,"$1"+le+"$2");return pe+Te},y.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var W=/^\w*$/;y.templateString=function(Y,Z){var X={};return Y.replace(y.TEMPLATE_STRING_REGEX,function(re,ie){var le;return W.test(ie)?le=Z[ie]:(X[ie]=X[ie]||y.nestedProperty(Z,ie).get,le=X[ie]()),y.isValidTextValue(le)?le:""})};var G={max:10,count:0,name:"hovertemplate"};y.hovertemplateString=function(){return te.apply(G,arguments)};var L={max:10,count:0,name:"texttemplate"};y.texttemplateString=function(){return te.apply(L,arguments)};var q=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,H={max:10,count:0,name:"texttemplate",parseMultDiv:!0};y.texttemplateStringForShapes=function(){return te.apply(H,arguments)};var V=/^[:|\|]/;function te(Y,Z,X){var re=this,ie=arguments;Z||(Z={});var le={};return Y.replace(y.TEMPLATE_STRING_REGEX,function(se,pe,Te){var Se=pe==="_xother"||pe==="_yother",Oe=pe==="_xother_"||pe==="_yother_",Me=pe==="xother_"||pe==="yother_",ce=pe==="xother"||pe==="yother"||Se||Me||Oe,ye=pe;(Se||Oe)&&(ye=ye.substring(1)),(Me||Oe)&&(ye=ye.substring(0,ye.length-1));var J,ne,de,xe=null,ue=null;if(re.parseMultDiv){var ge=function(Ae){var Ee=Ae.match(q);return Ee?{key:Ee[1],op:Ee[2],number:Number(Ee[3])}:{key:Ae,op:null,number:null}}(ye);ye=ge.key,xe=ge.op,ue=ge.number}if(ce){if((J=Z[ye])===void 0)return""}else for(de=3;de=48&&se<=57,Se=pe>=48&&pe<=57;if(Te&&(re=10*re+se-48),Se&&(ie=10*ie+pe-48),!Te||!Se){if(re!==ie)return re-ie;if(se!==pe)return se-pe}}return ie-re};var ee=2e9;y.seedPseudoRandom=function(){ee=2e9},y.pseudoRandom=function(){var Y=ee;return ee=(69069*ee+1)%4294967296,Math.abs(ee-Y)<429496729?y.pseudoRandom():ee/4294967296},y.fillText=function(Y,Z,X){var re=Array.isArray(X)?function(se){X.push(se)}:function(se){X.text=se},ie=y.extractOption(Y,Z,"htx","hovertext");if(y.isValidTextValue(ie))return re(ie);var le=y.extractOption(Y,Z,"tx","text");return y.isValidTextValue(le)?re(le):void 0},y.isValidTextValue=function(Y){return Y||Y===0},y.formatPercent=function(Y,Z){Z=Z||0;for(var X=(Math.round(100*Y*Math.pow(10,Z))*Math.pow(.1,Z)).toFixed(Z)+"%",re=0;re1&&(Se=1):Se=0,y.strTranslate(ie-Se*(X+se),le-Se*(re+pe))+y.strScale(Se)+(Te?"rotate("+Te+(Z?"":" "+X+" "+re)+")":"")},y.setTransormAndDisplay=function(Y,Z){Y.attr("transform",y.getTextTransform(Z)),Y.style("display",Z.scale?null:"none")},y.ensureUniformFontSize=function(Y,Z){var X=y.extendFlat({},Z);return X.size=Math.max(Z.size,Y._fullLayout.uniformtext.minsize||0),X},y.join2=function(Y,Z,X){var re=Y.length;return re>1?Y.slice(0,-1).join(Z)+X+Y[re-1]:Y.join(Z)},y.bigFont=function(Y){return Math.round(1.2*Y)};var U=y.getFirefoxVersion(),Q=U!==null&&U<86;y.getPositionFromD3Event=function(){return Q?[l.event.layerX,l.event.layerY]:[l.event.offsetX,l.event.offsetY]}},41965:function(o){o.exports=function(a){return window&&window.process&&window.process.versions?Object.prototype.toString.call(a)==="[object Object]":Object.prototype.toString.call(a)==="[object Object]"&&Object.getPrototypeOf(a).hasOwnProperty("hasOwnProperty")}},66636:function(o,a,n){var l=n(65487),f=/^\w*$/;o.exports=function(s,c,d,h){var p,m,y;d=d||"name",h=h||"value";var v={};c&&c.length?(y=l(s,c),m=y.get()):m=s,c=c||"";var g={};if(m)for(p=0;p2)return v[w]=2|v[w],x.set(_,null);if(b){for(p=w;p1){var d=["LOG:"];for(c=0;c1){var h=[];for(c=0;c"),"long")}},s.warn=function(){var c;if(l.logging>0){var d=["WARN:"];for(c=0;c0){var h=[];for(c=0;c"),"stick")}},s.error=function(){var c;if(l.logging>0){var d=["ERROR:"];for(c=0;c0){var h=[];for(c=0;c"),"stick")}}},77310:function(o,a,n){var l=n(39898);o.exports=function(f,s,c){var d=f.selectAll("g."+c.replace(/\s/g,".")).data(s,function(p){return p[0].trace.uid});d.exit().remove(),d.enter().append("g").attr("class",c),d.order();var h=f.classed("rangeplot")?"nodeRangePlot3":"node3";return d.each(function(p){p[0][h]=l.select(this)}),d}},35657:function(o,a,n){var l=n(79576);a.init2dArray=function(f,s){for(var c=new Array(f),d=0;dn/2?a-Math.round(a/n)*n:a}}},65487:function(o,a,n){var l=n(92770),f=n(73627).isArrayOrTypedArray;function s(v,g){return function(){var b,x,_,w,k,T=v;for(w=0;w/g),x=0;xm||M===f||Mv||k&&g(w))}:function(w,k){var T=w[0],M=w[1];if(T===f||Tm||M===f||Mv)return!1;var S,C,P,D,O,R=h.length,F=h[0][0],A=h[0][1],z=0;for(S=1;SMath.max(C,F)||M>Math.max(P,A)))if(Mx||Math.abs(l(y,w))>p)return!0;return!1},s.filter=function(c,d){var h=[c[0]],p=0,m=0;function y(v){c.push(v);var g=h.length,b=p;h.splice(m+1);for(var x=b+1;x1&&y(c.pop()),{addPt:y,raw:c,filtered:h}}},45142:function(o,a,n){var l=n(92770),f=n(35791);o.exports=function(s){var c;if(typeof(c=s&&s.hasOwnProperty("userAgent")?s.userAgent:function(){var g;return typeof navigator<"u"&&(g=navigator.userAgent),g&&g.headers&&typeof g.headers["user-agent"]=="string"&&(g=g.headers["user-agent"]),g}())!="string")return!0;var d=f({ua:{headers:{"user-agent":c}},tablet:!0,featureDetect:!1});if(!d){for(var h=c.split(" "),p=1;p-1;m--){var y=h[m];if(y.substr(0,8)==="Version/"){var v=y.substr(8).split(".")[0];if(l(v)&&(v=+v),v>=13)return!0}}}return d}},75138:function(o){o.exports=function(a,n){if(n instanceof RegExp){for(var l=n.toString(),f=0;ff.queueLength&&(c.undoQueue.queue.shift(),c.undoQueue.index--))},startSequence:function(c){c.undoQueue=c.undoQueue||{index:0,queue:[],sequence:!1},c.undoQueue.sequence=!0,c.undoQueue.beginSequence=!0},stopSequence:function(c){c.undoQueue=c.undoQueue||{index:0,queue:[],sequence:!1},c.undoQueue.sequence=!1,c.undoQueue.beginSequence=!1},undo:function(c){var d,h;if(!(c.undoQueue===void 0||isNaN(c.undoQueue.index)||c.undoQueue.index<=0)){for(c.undoQueue.index--,d=c.undoQueue.queue[c.undoQueue.index],c.undoQueue.inSequence=!0,h=0;h=c.undoQueue.queue.length)){for(d=c.undoQueue.queue[c.undoQueue.index],c.undoQueue.inSequence=!0,h=0;hg}function y(v,g){return v>=g}a.findBin=function(v,g,b){if(l(g.start))return b?Math.ceil((v-g.start)/g.size-d)-1:Math.floor((v-g.start)/g.size+d);var x,_,w=0,k=g.length,T=0,M=k>1?(g[k-1]-g[0])/(k-1):1;for(_=M>=0?b?h:p:b?y:m,v+=M*d*(b?-1:1)*(M>=0?1:-1);w90&&f.log("Long binary search..."),w-1},a.sorterAsc=function(v,g){return v-g},a.sorterDes=function(v,g){return g-v},a.distinctVals=function(v){var g,b=v.slice();for(b.sort(a.sorterAsc),g=b.length-1;g>-1&&b[g]===c;g--);for(var x,_=b[g]-b[0]||1,w=_/(g||1)/1e4,k=[],T=0;T<=g;T++){var M=b[T],S=M-x;x===void 0?(k.push(M),x=M):S>w&&(_=Math.min(_,S),k.push(M),x=M)}return{vals:k,minDiff:_}},a.roundUp=function(v,g,b){for(var x,_=0,w=g.length-1,k=0,T=b?0:1,M=b?1:0,S=b?Math.ceil:Math.floor;_0&&(x=1),b&&x)return v.sort(g)}return x?v:v.reverse()},a.findIndexOfMin=function(v,g){g=g||s;for(var b,x=1/0,_=0;_d.length)&&(h=d.length),l(c)||(c=!1),f(d[0])){for(m=new Array(h),p=0;ps.length-1)return s[s.length-1];var d=c%1;return d*s[Math.ceil(c)]+(1-d)*s[Math.floor(c)]}},3883:function(o,a,n){var l=n(32396),f=n(91424),s=n(71828),c=null;o.exports=function(){if(c!==null)return c;c=!1;var d=s.isIE()||s.isSafari()||s.isIOS();if(window.navigator.userAgent&&!d){var h=Array.from(l.CSS_DECLARATIONS).reverse(),p=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof p=="function")c=h.some(function(v){return p.apply(null,v)});else{var m=f.tester.append("image").attr("style",l.STYLE),y=window.getComputedStyle(m.node()).imageRendering;c=h.some(function(v){var g=v[1];return y===g||y===g.toLowerCase()}),m.remove()}}return c}},63893:function(o,a,n){var l=n(39898),f=n(71828),s=f.strTranslate,c=n(77922),d=n(18783).LINE_SPACING,h=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;a.convertToTspans=function(N,E,W){var G=N.text(),L=!N.attr("data-notex")&&E&&E._context.typesetMath&&typeof MathJax<"u"&&G.match(h),q=l.select(N.node().parentNode);if(!q.empty()){var H=N.attr("class")?N.attr("class").split(" ")[0]:"text";return H+="-math",q.selectAll("svg."+H).remove(),q.selectAll("g."+H+"-group").remove(),N.style("display",null).attr({"data-unformatted":G,"data-math":"N"}),L?(E&&E._promises||[]).push(new Promise(function(te){N.style("display","none");var ee=parseInt(N.node().style.fontSize,10),U={fontSize:ee};(function(Q,Y,Z){var X,re,ie,le,se=parseInt((MathJax.version||"").split(".")[0]);if(se===2||se===3){var pe=function(){var Se="math-output-"+f.randstr({},64),Oe=(le=l.select("body").append("div").attr({id:Se}).style({visibility:"hidden",position:"absolute","font-size":Y.fontSize+"px"}).text(Q.replace(p,"\\lt ").replace(m,"\\gt "))).node();return se===2?MathJax.Hub.Typeset(Oe):MathJax.typeset([Oe])},Te=function(){var Se=le.select(se===2?".MathJax_SVG":".MathJax"),Oe=!Se.empty()&&le.select("svg").node();if(Oe){var Me,ce=Oe.getBoundingClientRect();Me=se===2?l.select("body").select("#MathJax_SVG_glyphs"):Se.select("defs"),Z(Se,Me,ce)}else f.log("There was an error in the tex syntax.",Q),Z();le.remove()};se===2?MathJax.Hub.Queue(function(){return re=f.extendDeepAll({},MathJax.Hub.config),ie=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:y},displayAlign:"left"})},function(){if((X=MathJax.Hub.config.menuSettings.renderer)!=="SVG")return MathJax.Hub.setRenderer("SVG")},pe,Te,function(){if(X!=="SVG")return MathJax.Hub.setRenderer(X)},function(){return ie!==void 0&&(MathJax.Hub.processSectionDelay=ie),MathJax.Hub.Config(re)}):se===3&&(re=f.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=y,(X=MathJax.config.startup.output)!=="svg"&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){pe(),Te(),X!=="svg"&&(MathJax.config.startup.output=X),MathJax.config=re}))}else f.warn("No MathJax version:",MathJax.version)})(L[2],U,function(Q,Y,Z){q.selectAll("svg."+H).remove(),q.selectAll("g."+H+"-group").remove();var X=Q&&Q.select("svg");if(!X||!X.node())return V(),void te();var re=q.append("g").classed(H+"-group",!0).attr({"pointer-events":"none","data-unformatted":G,"data-math":"Y"});re.node().appendChild(X.node()),Y&&Y.node()&&X.node().insertBefore(Y.node().cloneNode(!0),X.node().firstChild);var ie=Z.width,le=Z.height;X.attr({class:H,height:le,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var se=N.node().style.fill||"black",pe=X.select("g");pe.attr({fill:se,stroke:se});var Te=pe.node().getBoundingClientRect(),Se=Te.width,Oe=Te.height;(Se>ie||Oe>le)&&(X.style("overflow","hidden"),Se=(Te=X.node().getBoundingClientRect()).width,Oe=Te.height);var Me=+N.attr("x"),ce=+N.attr("y"),ye=-(ee||N.node().getBoundingClientRect().height)/4;if(H[0]==="y")re.attr({transform:"rotate("+[-90,Me,ce]+")"+s(-Se/2,ye-Oe/2)});else if(H[0]==="l")ce=ye-Oe/2;else if(H[0]==="a"&&H.indexOf("atitle")!==0)Me=0,ce=ye;else{var J=N.attr("text-anchor");Me-=Se*(J==="middle"?.5:J==="end"?1:0),ce=ce+ye-Oe/2}X.attr({x:Me,y:ce}),W&&W.call(N,re),te(re)})})):V(),N}function V(){q.empty()||(H=N.attr("class")+"-math",q.select("svg."+H).remove()),N.text("").style("white-space","pre");var te=function(ee,U){U=U.replace(w," ");var Q,Y=!1,Z=[],X=-1;function re(){X++;var ue=document.createElementNS(c.svg,"tspan");l.select(ue).attr({class:"line",dy:X*d+"em"}),ee.appendChild(ue),Q=ue;var ge=Z;if(Z=[{node:ue}],ge.length>1)for(var be=1;be doesnt match end tag <"+ue+">. Pretending it did match.",U),Q=Z[Z.length-1].node}else f.log("Ignoring unexpected end tag .",U)}M.test(U)?re():(Q=ee,Z=[{node:ee}]);for(var pe=U.split(k),Te=0;Te|>|>)/g,y=[["$","$"],["\\(","\\)"]],v={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},g={sub:"0.3em",sup:"-0.6em"},b={sub:"-0.21em",sup:"0.42em"},x="​",_=["http:","https:","mailto:","",void 0,":"],w=a.NEWLINES=/(\r\n?|\n)/g,k=/(<[^<>]*>)/,T=/<(\/?)([^ >]*)(\s+(.*))?>/i,M=//i;a.BR_TAG_ALL=//gi;var S=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,C=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,P=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,D=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function O(N,E){if(!N)return null;var W=N.match(E),G=W&&(W[3]||W[4]);return G&&z(G)}var R=/(^|;)\s*color:/;a.plainText=function(N,E){for(var W=(E=E||{}).len!==void 0&&E.len!==-1?E.len:1/0,G=E.allowedTags!==void 0?E.allowedTags:["br"],L=N.split(k),q=[],H="",V=0,te=0;te3?q.push(ee.substr(0,Z-3)+"..."):q.push(ee.substr(0,Z));break}H=""}}return q.join("")};var F={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},A=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function z(N){return N.replace(A,function(E,W){return(W.charAt(0)==="#"?function(G){if(!(G>1114111)){var L=String.fromCodePoint;if(L)return L(G);var q=String.fromCharCode;return G<=65535?q(G):q(55232+(G>>10),G%1024+56320)}}(W.charAt(1)==="x"?parseInt(W.substr(2),16):parseInt(W.substr(1),10)):F[W])||E})}function B(N){var E=encodeURI(decodeURI(N)),W=document.createElement("a"),G=document.createElement("a");W.href=N,G.href=E;var L=W.protocol,q=G.protocol;return _.indexOf(L)!==-1&&_.indexOf(q)!==-1?E:""}function $(N,E,W){var G,L,q,H=W.horizontalAlign,V=W.verticalAlign||"top",te=N.node().getBoundingClientRect(),ee=E.node().getBoundingClientRect();return L=V==="bottom"?function(){return te.bottom-G.height}:V==="middle"?function(){return te.top+(te.height-G.height)/2}:function(){return te.top},q=H==="right"?function(){return te.right-G.width}:H==="center"?function(){return te.left+(te.width-G.width)/2}:function(){return te.left},function(){G=this.node().getBoundingClientRect();var U=q()-ee.left,Q=L()-ee.top,Y=W.gd||{};if(W.gd){Y._fullLayout._calcInverseTransform(Y);var Z=f.apply3DTransform(Y._fullLayout._invTransform)(U,Q);U=Z[0],Q=Z[1]}return this.style({top:Q+"px",left:U+"px","z-index":1e3}),this}}a.convertEntities=z,a.sanitizeHTML=function(N){N=N.replace(w," ");for(var E=document.createElement("p"),W=E,G=[],L=N.split(k),q=0;qd.ts+s?m():d.timer=setTimeout(function(){m(),d.timer=null},s)},a.done=function(f){var s=n[f];return s&&s.timer?new Promise(function(c){var d=s.onDone;s.onDone=function(){d&&d(),c(),s.onDone=null}}):Promise.resolve()},a.clear=function(f){if(f)l(n[f]),delete n[f];else for(var s in n)a.clear(s)}},58163:function(o,a,n){var l=n(92770);o.exports=function(f,s){if(f>0)return Math.log(f)/Math.LN10;var c=Math.log(Math.min(s[0],s[1]))/Math.LN10;return l(c)||(c=Math.log(Math.max(s[0],s[1]))/Math.LN10-6),c}},37815:function(o){o.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(o){o.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},14458:function(o,a,n){var l=n(73972);o.exports=function(f){for(var s,c,d=l.layoutArrayContainers,h=l.layoutArrayRegexes,p=f.split("[")[0],m=0;m0&&c.log("Clearing previous rejected promises from queue."),C._promises=[]},a.cleanLayout=function(C){var P,D;C||(C={}),C.xaxis1&&(C.xaxis||(C.xaxis=C.xaxis1),delete C.xaxis1),C.yaxis1&&(C.yaxis||(C.yaxis=C.yaxis1),delete C.yaxis1),C.scene1&&(C.scene||(C.scene=C.scene1),delete C.scene1);var O=(d.subplotsRegistry.cartesian||{}).attrRegex,R=(d.subplotsRegistry.polar||{}).attrRegex,F=(d.subplotsRegistry.ternary||{}).attrRegex,A=(d.subplotsRegistry.gl3d||{}).attrRegex,z=Object.keys(C);for(P=0;P3?(Z.x=1.02,Z.xanchor="left"):Z.x<-2&&(Z.x=-.02,Z.xanchor="right"),Z.y>3?(Z.y=1.02,Z.yanchor="bottom"):Z.y<-2&&(Z.y=-.02,Z.yanchor="top")),b(C),C.dragmode==="rotate"&&(C.dragmode="orbit"),p.clean(C),C.template&&C.template.layout&&a.cleanLayout(C.template.layout),C},a.cleanData=function(C){for(var P=0;P0)return C.substr(0,P)}a.hasParent=function(C,P){for(var D=M(P);D;){if(D in C)return!0;D=M(D)}return!1};var S=["x","y","z"];a.clearAxisTypes=function(C,P,D){for(var O=0;O1&&s.warn("Full array edits are incompatible with other edits",x);var C=v[""][""];if(p(C))y.set(null);else{if(!Array.isArray(C))return s.warn("Unrecognized full array edit value",x,C),!0;y.set(C)}return!T&&(_(M,S),w(m),!0)}var P,D,O,R,F,A,z,B,$=Object.keys(v).map(Number).sort(c),j=y.get(),N=j||[],E=b(S,x).get(),W=[],G=-1,L=N.length;for(P=0;P<$.length;P++)if(R=v[O=$[P]],F=Object.keys(R),A=R[""],z=h(A),O<0||O>N.length-(z?0:1))s.warn("index out of range",x,O);else if(A!==void 0)F.length>1&&s.warn("Insertion & removal are incompatible with edits to the same index.",x,O),p(A)?W.push(O):z?(A==="add"&&(A={}),N.splice(O,0,A),E&&E.splice(O,0,{})):s.warn("Unrecognized full object edit value",x,O,A),G===-1&&(G=O);else for(D=0;D=0;P--)N.splice(W[P],1),E&&E.splice(W[P],1);if(N.length?j||y.set(N):y.set(null),T)return!1;if(_(M,S),k!==f){var q;if(G===-1)q=$;else{for(L=Math.max(N.length,L),q=[],P=0;P<$.length&&!((O=$[P])>=G);P++)q.push(O);for(P=G;P=ue.data.length||ke<-ue.data.length)throw new Error(be+" must be valid indices for gd.data.");if(ge.indexOf(ke,we+1)>-1||ke>=0&&ge.indexOf(-ue.data.length+ke)>-1||ke<0&&ge.indexOf(ue.data.length+ke)>-1)throw new Error("each index in "+be+" must be unique.")}}function E(ue,ge,be){if(!Array.isArray(ue.data))throw new Error("gd.data must be an array.");if(ge===void 0)throw new Error("currentIndices is a required argument.");if(Array.isArray(ge)||(ge=[ge]),N(ue,ge,"currentIndices"),be===void 0||Array.isArray(be)||(be=[be]),be!==void 0&&N(ue,be,"newIndices"),be!==void 0&&ge.length!==be.length)throw new Error("current and new indices must be of equal length.")}function W(ue,ge,be,we,ke){(function(qe,Ye,at,lt){var ct=c.isPlainObject(lt);if(!Array.isArray(qe.data))throw new Error("gd.data must be an array");if(!c.isPlainObject(Ye))throw new Error("update must be a key:value object");if(at===void 0)throw new Error("indices must be an integer or array of integers");for(var bt in N(qe,at,"indices"),Ye){if(!Array.isArray(Ye[bt])||Ye[bt].length!==at.length)throw new Error("attribute "+bt+" must be an array of length equal to indices array length");if(ct&&(!(bt in lt)||!Array.isArray(lt[bt])||lt[bt].length!==Ye[bt].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}})(ue,ge,be,we);for(var Ae=function(qe,Ye,at,lt){var ct,bt,ze,Ne,Qe,it=c.isPlainObject(lt),kt=[];for(var Je in Array.isArray(at)||(at=[at]),at=j(at,qe.data.length-1),Ye)for(var ut=0;ut-1&&be.indexOf("grouptitlefont")===-1?De(be,be.replace("titlefont","title.font")):be.indexOf("titleposition")>-1?De(be,be.replace("titleposition","title.position")):be.indexOf("titleside")>-1?De(be,be.replace("titleside","title.side")):be.indexOf("titleoffset")>-1&&De(be,be.replace("titleoffset","title.offset")):De(be,be.replace("title","title.text"));function De(Re,Ie){ue[Ie]=ue[Re],delete ue[Re]}}function U(ue,ge,be){ue=c.getGraphDiv(ue),P.clearPromiseQueue(ue);var we={};if(typeof ge=="string")we[ge]=be;else{if(!c.isPlainObject(ge))return c.warn("Relayout fail.",ge,be),Promise.reject();we=c.extendFlat({},ge)}Object.keys(we).length&&(ue.changed=!0);var ke=ie(ue,we),Ae=ke.flags;Ae.calc&&(ue.calcdata=void 0);var Ee=[v.previousPromises];Ae.layoutReplot?Ee.push(D.layoutReplot):Object.keys(we).length&&(Q(ue,Ae,ke)||v.supplyDefaults(ue),Ae.legend&&Ee.push(D.doLegend),Ae.layoutstyle&&Ee.push(D.layoutStyles),Ae.axrange&&Y(Ee,ke.rangesAltered),Ae.ticks&&Ee.push(D.doTicksRelayout),Ae.modebar&&Ee.push(D.doModeBar),Ae.camera&&Ee.push(D.doCamera),Ae.colorbars&&Ee.push(D.doColorBars),Ee.push(A)),Ee.push(v.rehover,v.redrag,v.reselect),p.add(ue,U,[ue,ke.undoit],U,[ue,ke.redoit]);var De=c.syncOrAsync(Ee,ue);return De&&De.then||(De=Promise.resolve(ue)),De.then(function(){return ue.emit("plotly_relayout",ke.eventData),ue})}function Q(ue,ge,be){var we,ke,Ae=ue._fullLayout;if(!ge.axrange)return!1;for(var Ee in ge)if(Ee!=="axrange"&&ge[Ee])return!1;var De=function(Ye,at){return c.coerce(we,ke,x,Ye,at)},Re={};for(var Ie in be.rangesAltered){var Be=g.id2name(Ie);if(we=ue.layout[Be],ke=Ae[Be],b(we,ke,De,Re),ke._matchGroup){for(var Ue in ke._matchGroup)if(Ue!==Ie){var qe=Ae[g.id2name(Ue)];qe.autorange=ke.autorange,qe.range=ke.range.slice(),qe._input.range=ke.range.slice()}}}return!0}function Y(ue,ge){var be=ge?function(we){var ke=[];for(var Ae in ge){var Ee=g.getFromId(we,Ae);if(ke.push(Ae),(Ee.ticklabelposition||"").indexOf("inside")!==-1&&Ee._anchorAxis&&ke.push(Ee._anchorAxis._id),Ee._matchGroup)for(var De in Ee._matchGroup)ge[De]||ke.push(De)}return g.draw(we,ke,{skipTitle:!0})}:function(we){return g.draw(we,"redraw")};ue.push(M,D.doAutoRangeAndConstraints,be,D.drawData,D.finalDraw)}var Z=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,X=/^[xyz]axis[0-9]*\.autorange$/,re=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function ie(ue,ge){var be,we,ke,Ae=ue.layout,Ee=ue._fullLayout,De=Ee._guiEditing,Re=H(Ee._preGUI,De),Ie=Object.keys(ge),Be=g.list(ue),Ue=c.extendDeepAll({},ge),qe={};for(ee(ge),Ie=Object.keys(ge),we=0;we0&&typeof ut.parts[It]!="string";)It--;var Mt=ut.parts[It],zt=ut.parts[It-1]+"."+Mt,wt=ut.parts.slice(0,It).join("."),ve=d(ue.layout,wt).get(),_e=d(Ee,wt).get(),Ve=ut.get();if(pt!==void 0){bt[Je]=pt,ze[Je]=Mt==="reverse"?pt:q(Ve);var We=y.getLayoutValObject(Ee,ut.parts);if(We&&We.impliedEdits&&pt!==null)for(var Ze in We.impliedEdits)Ne(c.relativeAttr(Je,Ze),We.impliedEdits[Ze]);if(["width","height"].indexOf(Je)!==-1)if(pt){Ne("autosize",null);var Ge=Je==="height"?"width":"height";Ne(Ge,Ee[Ge])}else Ee[Je]=ue._initialAutoSize[Je];else if(Je==="autosize")Ne("width",pt?null:Ee.width),Ne("height",pt?null:Ee.height);else if(zt.match(Z))kt(zt),d(Ee,wt+"._inputRange").set(null);else if(zt.match(X)){kt(zt),d(Ee,wt+"._inputRange").set(null);var Ke=d(Ee,wt).get();Ke._inputDomain&&(Ke._input.domain=Ke._inputDomain.slice())}else zt.match(re)&&d(Ee,wt+"._inputDomain").set(null);if(Mt==="type"){Qe=ve;var nt=_e.type==="linear"&&pt==="log",st=_e.type==="log"&&pt==="linear";if(nt||st){if(Qe&&Qe.range)if(_e.autorange)nt&&(Qe.range=Qe.range[1]>Qe.range[0]?[1,2]:[2,1]);else{var mt=Qe.range[0],tt=Qe.range[1];nt?(mt<=0&&tt<=0&&Ne(wt+".autorange",!0),mt<=0?mt=tt/1e6:tt<=0&&(tt=mt/1e6),Ne(wt+".range[0]",Math.log(mt)/Math.LN10),Ne(wt+".range[1]",Math.log(tt)/Math.LN10)):(Ne(wt+".range[0]",Math.pow(10,mt)),Ne(wt+".range[1]",Math.pow(10,tt)))}else Ne(wt+".autorange",!0);Array.isArray(Ee._subplots.polar)&&Ee._subplots.polar.length&&Ee[ut.parts[0]]&&ut.parts[1]==="radialaxis"&&delete Ee[ut.parts[0]]._subplot.viewInitial["radialaxis.range"],m.getComponentMethod("annotations","convertCoords")(ue,_e,pt,Ne),m.getComponentMethod("images","convertCoords")(ue,_e,pt,Ne)}else Ne(wt+".autorange",!0),Ne(wt+".range",null);d(Ee,wt+"._inputRange").set(null)}else if(Mt.match(R)){var Ft=d(Ee,Je).get(),Vt=(pt||{}).type;Vt&&Vt!=="-"||(Vt="linear"),m.getComponentMethod("annotations","convertCoords")(ue,Ft,Vt,Ne),m.getComponentMethod("images","convertCoords")(ue,Ft,Vt,Ne)}var St=C.containerArrayMatch(Je);if(St){be=St.array,we=St.index;var Nt=St.property,Dt=We||{editType:"calc"};we!==""&&Nt===""&&(C.isAddVal(pt)?ze[Je]=null:C.isRemoveVal(pt)?ze[Je]=(d(Ae,be).get()||[])[we]:c.warn("unrecognized full object value",ge)),O.update(ct,Dt),qe[be]||(qe[be]={});var gt=qe[be][we];gt||(gt=qe[be][we]={}),gt[Nt]=pt,delete ge[Je]}else Mt==="reverse"?(ve.range?ve.range.reverse():(Ne(wt+".autorange",!0),ve.range=[1,0]),_e.autorange?ct.calc=!0:ct.plot=!0):(Je==="dragmode"&&(pt===!1&&Ve!==!1||pt!==!1&&Ve===!1)||Ee._has("scatter-like")&&Ee._has("regl")&&Je==="dragmode"&&(pt==="lasso"||pt==="select")&&Ve!=="lasso"&&Ve!=="select"||Ee._has("gl2d")?ct.plot=!0:We?O.update(ct,We):ct.calc=!0,ut.set(pt))}}for(be in qe)C.applyContainerArrayChanges(ue,Re(Ae,be),qe[be],ct,Re)||(ct.plot=!0);for(var ht in it){var yt=(Qe=g.getFromId(ue,ht))&&Qe._constraintGroup;if(yt)for(var qt in ct.calc=!0,yt)it[qt]||(g.getFromId(ue,qt)._constraintShrinkable=!0)}(le(ue)||ge.height||ge.width)&&(ct.plot=!0);var Et=Ee.shapes;for(we=0;we1;)if(we.pop(),(be=d(ge,we.join(".")+".uirevision").get())!==void 0)return be;return ge.uirevision}function ce(ue,ge){for(var be=0;be=ke.length?ke[0]:ke[Ie]:ke}function De(Ie){return Array.isArray(Ae)?Ie>=Ae.length?Ae[0]:Ae[Ie]:Ae}function Re(Ie,Be){var Ue=0;return function(){if(Ie&&++Ue===Be)return Ie()}}return we._frameWaitingCnt===void 0&&(we._frameWaitingCnt=0),new Promise(function(Ie,Be){function Ue(){ue.emit("plotly_animating"),we._lastFrameAt=-1/0,we._timeToNext=0,we._runningTransitions=0,we._currentFrame=null;var Je=function(){we._animationRaf=window.requestAnimationFrame(Je),Date.now()-we._lastFrameAt>we._timeToNext&&function(){we._currentFrame&&we._currentFrame.onComplete&&we._currentFrame.onComplete();var ut=we._currentFrame=we._frameQueue.shift();if(ut){var pt=ut.name?ut.name.toString():null;ue._fullLayout._currentFrame=pt,we._lastFrameAt=Date.now(),we._timeToNext=ut.frameOpts.duration,v.transition(ue,ut.frame.data,ut.frame.layout,P.coerceTraceIndices(ue,ut.frame.traces),ut.frameOpts,ut.transitionOpts).then(function(){ut.onComplete&&ut.onComplete()}),ue.emit("plotly_animatingframe",{name:pt,frame:ut.frame,animation:{frame:ut.frameOpts,transition:ut.transitionOpts}})}else ue.emit("plotly_animated"),window.cancelAnimationFrame(we._animationRaf),we._animationRaf=null}()};Je()}var qe,Ye,at=0;function lt(Je){return Array.isArray(ke)?at>=ke.length?Je.transitionOpts=ke[at]:Je.transitionOpts=ke[0]:Je.transitionOpts=ke,at++,Je}var ct=[],bt=ge==null,ze=Array.isArray(ge);if(bt||ze||!c.isPlainObject(ge)){if(bt||["string","number"].indexOf(typeof ge)!==-1)for(qe=0;qe0&&itit)&&kt.push(Ye);ct=kt}}ct.length>0?function(Je){if(Je.length!==0){for(var ut=0;ut=0;we--)if(c.isPlainObject(ge[we])){var qe=ge[we].name,Ye=(Re[qe]||Ue[qe]||{}).name,at=ge[we].name,lt=Re[Ye]||Ue[Ye];Ye&&at&&typeof at=="number"&<&&F<5&&(F++,c.warn('addFrames: overwriting frame "'+(Re[Ye]||Ue[Ye]).name+'" with a frame whose name of type "number" also equates to "'+Ye+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),F===5&&c.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),Ue[qe]={name:qe},Be.push({frame:v.supplyFrameDefaults(ge[we]),index:be&&be[we]!==void 0&&be[we]!==null?be[we]:Ie+we})}Be.sort(function(Je,ut){return Je.index>ut.index?-1:Je.index=0;we--){if(typeof(ke=Be[we].frame).name=="number"&&c.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!ke.name)for(;Re[ke.name="frame "+ue._transitionData._counter++];);if(Re[ke.name]){for(Ae=0;Ae=0;be--)we=ge[be],Ae.push({type:"delete",index:we}),Ee.unshift({type:"insert",index:we,value:ke[we]});var De=v.modifyFrames,Re=v.modifyFrames,Ie=[ue,Ee],Be=[ue,Ae];return p&&p.add(ue,De,Ie,Re,Be),v.modifyFrames(ue,Ae)},a.addTraces=function ue(ge,be,we){ge=c.getGraphDiv(ge);var ke,Ae,Ee=[],De=a.deleteTraces,Re=ue,Ie=[ge,Ee],Be=[ge,be];for(function(Ue,qe,Ye){var at,lt;if(!Array.isArray(Ue.data))throw new Error("gd.data must be an array.");if(qe===void 0)throw new Error("traces must be defined.");for(Array.isArray(qe)||(qe=[qe]),at=0;at=0&&Be=0&&Be=$.length)return!1;if(R.dimensions===2){if(A++,F.length===A)return R;var j=F[A];if(!S(j))return!1;R=$[B][j]}else R=$[B]}else R=$}}return R}function S(R){return R===Math.round(R)&&R>=0}function C(){var R,F,A={};for(R in y(A,c),l.subplotsRegistry)if((F=l.subplotsRegistry[R]).layoutAttributes)if(Array.isArray(F.attr))for(var z=0;z=j.length)return!1;z=(A=(l.transformsRegistry[j[N].type]||{}).attributes)&&A[F[2]],$=3}else{var E=R._module;if(E||(E=(l.modules[R.type||s.type.dflt]||{})._module),!E)return!1;if(!(z=(A=E.attributes)&&A[B])){var W=E.basePlotModule;W&&W.attributes&&(z=W.attributes[B])}z||(z=s[B])}return M(z,F,$)},a.getLayoutValObject=function(R,F){var A=function(z,B){var $,j,N,E,W=z._basePlotModules;if(W){var G;for($=0;$=v&&(y._input||{})._templateitemname;b&&(g=v);var x,_=m+"["+g+"]";function w(){x={},b&&(x[_]={},x[_][s]=b)}function k(M,S){b?l.nestedProperty(x[_],M).set(S):x[_+"."+M]=S}function T(){var M=x;return w(),M}return w(),{modifyBase:function(M,S){x[M]=S},modifyItem:k,getUpdateObj:T,applyUpdate:function(M,S){M&&k(M,S);var C=T();for(var P in C)l.nestedProperty(p,P).set(C[P])}}}},61549:function(o,a,n){var l=n(39898),f=n(73972),s=n(74875),c=n(71828),d=n(63893),h=n(33306),p=n(7901),m=n(91424),y=n(92998),v=n(64168),g=n(89298),b=n(18783),x=n(99082),_=x.enforce,w=x.clean,k=n(71739).doAutoRange,T="start";function M(O,R,F){for(var A=0;A=O[1]||z[1]<=O[0])&&B[0]R[0])return!0}return!1}function S(O){var R,F,A,z,B,$,j=O._fullLayout,N=j._size,E=N.p,W=g.list(O,"",!0);if(j._paperdiv.style({width:O._context.responsive&&j.autosize&&!O._context._hasZeroWidth&&!O.layout.width?"100%":j.width+"px",height:O._context.responsive&&j.autosize&&!O._context._hasZeroHeight&&!O.layout.height?"100%":j.height+"px"}).selectAll(".main-svg").call(m.setSize,j.width,j.height),O._context.setBackground(O,j.paper_bgcolor),a.drawMainTitle(O),v.manage(O),!j._has("cartesian"))return s.previousPromises(O);function G(Ie,Be,Ue){var qe=Ie._lw/2;return Ie._id.charAt(0)==="x"?Be?Ue==="top"?Be._offset-E-qe:Be._offset+Be._length+E+qe:N.t+N.h*(1-(Ie.position||0))+qe%1:Be?Ue==="right"?Be._offset+Be._length+E+qe:Be._offset-E-qe:N.l+N.w*(Ie.position||0)+qe%1}for(R=0;R.5?"t":"b",ee=G._fullLayout.margin[te],U=0;return L.yref==="paper"?U=q+L.pad.t+L.pad.b:L.yref==="container"&&(U=function(Q,Y,Z,X,re){var ie=0;return Z==="middle"&&(ie+=re/2),Q==="t"?(Z==="top"&&(ie+=re),ie+=X-Y*X):(Z==="bottom"&&(ie+=re),ie+=Y*X),ie}(te,H,V,G._fullLayout.height,q)+L.pad.t+L.pad.b),U>ee?U:0}(O,F,E);W>0&&(function(G,L,q,H){var V="title.automargin",te=G._fullLayout.title,ee=te.y>.5?"t":"b",U={x:te.x,y:te.y,t:0,b:0},Q={};te.yref==="paper"&&function(Y,Z,X,re,ie){var le=Z.yref==="paper"?Y._fullLayout._size.h:Y._fullLayout.height,se=c.isTopAnchor(Z)?re:re-ie,pe=X==="b"?le-se:se;return!(c.isTopAnchor(Z)&&X==="t"||c.isBottomAnchor(Z)&&X==="b")&&peN?D.push({code:"unused",traceType:A,templateCount:j,dataCount:N}):N>j&&D.push({code:"reused",traceType:A,templateCount:j,dataCount:N})}}else D.push({code:"data"});if(function E(W,G){for(var L in W)if(L.charAt(0)!=="_"){var q=W[L],H=x(W,L,G);f(q)?(Array.isArray(W)&&q._template===!1&&q.templateitemname&&D.push({code:"missing",path:H,templateitemname:q.templateitemname}),E(q,H)):Array.isArray(q)&&_(q)&&E(q,H)}}({data:R,layout:O},""),D.length)return D.map(w)}},403:function(o,a,n){var l=n(92770),f=n(72391),s=n(74875),c=n(71828),d=n(25095),h=n(5900),p=n(70942),m=n(11506).version,y={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};o.exports=function(v,g){var b,x,_,w;function k(N){return!(N in g)||c.validate(g[N],y[N])}if(g=g||{},c.isPlainObject(v)?(b=v.data||[],x=v.layout||{},_=v.config||{},w={}):(v=c.getGraphDiv(v),b=c.extendDeep([],v.data),x=c.extendDeep({},v.layout),_=v._context,w=v._fullLayout||{}),!k("width")&&g.width!==null||!k("height")&&g.height!==null)throw new Error("Height and width should be pixel values.");if(!k("format"))throw new Error("Export format is not "+c.join2(y.format.values,", "," or ")+".");var T={};function M(N,E){return c.coerce(g,T,y,N,E)}var S=M("format"),C=M("width"),P=M("height"),D=M("scale"),O=M("setBackground"),R=M("imageDataOnly"),F=document.createElement("div");F.style.position="absolute",F.style.left="-5000px",document.body.appendChild(F);var A=c.extendFlat({},x);C?A.width=C:g.width===null&&l(w.width)&&(A.width=w.width),P?A.height=P:g.height===null&&l(w.height)&&(A.height=w.height);var z=c.extendFlat({},_,{_exportedPlot:!0,staticPlot:!0,setBackground:O}),B=d.getRedrawFunc(F);function $(){return new Promise(function(N){setTimeout(N,d.getDelay(F._fullLayout))})}function j(){return new Promise(function(N,E){var W=h(F,S,D),G=F._fullLayout.width,L=F._fullLayout.height;function q(){f.purge(F),document.body.removeChild(F)}if(S==="full-json"){var H=s.graphJson(F,!1,"keepdata","object",!0,!0);return H.version=m,H=JSON.stringify(H),q(),N(R?H:d.encodeJSON(H))}if(q(),S==="svg")return N(R?W:d.encodeSVG(W));var V=document.createElement("canvas");V.id=c.randstr(),p({format:S,width:G,height:L,scale:D,canvas:V,svg:W,promise:!0}).then(N).catch(E)})}return new Promise(function(N,E){f.newPlot(F,b,A,z).then(B).then($).then(j).then(function(W){N(function(G){return R?G.replace(d.IMAGE_URL_PREFIX,""):G}(W))}).catch(function(W){E(W)})})}},84936:function(o,a,n){var l=n(71828),f=n(74875),s=n(86281),c=n(72075).dfltConfig,d=l.isPlainObject,h=Array.isArray,p=l.isArrayOrTypedArray;function m(k,T,M,S,C,P){P=P||[];for(var D=Object.keys(k),O=0;Oz.length&&S.push(g("unused",C,F.concat(z.length)));var W,G,L,q,H,V=z.length,te=Array.isArray(E);if(te&&(V=Math.min(V,E.length)),B.dimensions===2)for(G=0;Gz[G].length&&S.push(g("unused",C,F.concat(G,z[G].length)));var ee=z[G].length;for(W=0;W<(te?Math.min(ee,E[G].length):ee);W++)L=te?E[G][W]:E,q=A[G][W],H=z[G][W],l.validate(q,L)?H!==q&&H!==+q&&S.push(g("dynamic",C,F.concat(G,W),q,H)):S.push(g("value",C,F.concat(G,W),q))}else S.push(g("array",C,F.concat(G),A[G]));else for(G=0;G1&&P.push(g("object","layout"))),f.supplyDefaults(D);for(var O=D._fullData,R=M.length,F=0;F0&&Math.round(x)===x))return{vals:y};g=x}for(var _=p.calendar,w=v==="start",k=v==="end",T=h[m+"period0"],M=s(T,_)||0,S=[],C=[],P=[],D=y.length,O=0;Oz;)A=c(A,-g,_);for(;A<=z;)A=c(A,g,_);F=c(A,-g,_)}else{for(A=M+(R=Math.round((z-M)/b))*b;A>z;)A-=b;for(;A<=z;)A+=b;F=A-b}S[O]=w?F:k?A:(F+A)/2,C[O]=F,P[O]=A}return{vals:S,starts:C,ends:P}}},89502:function(o){o.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(o,a,n){var l=n(39898),f=n(92770),s=n(71828),c=n(50606).FP_SAFE,d=n(73972),h=n(91424),p=n(41675),m=p.getFromId,y=p.isLinked;function v(O,R){var F,A,z=[],B=O._fullLayout,$=b(B,R,0),j=b(B,R,1),N=_(O,R),E=N.min,W=N.max;if(E.length===0||W.length===0)return s.simpleMap(R.range,R.r2l);var G=E[0].val,L=W[0].val;for(F=1;F0&&((Y=le-$(te)-j(ee))>se?Z/Y>pe&&(U=te,Q=ee,pe=Z/Y):Z/le>pe&&(U={val:te.val,nopad:1},Q={val:ee.val,nopad:1},pe=Z/le));if(G===L){var Te=G-1,Se=G+1;if(re)if(G===0)z=[0,1];else{var Oe=(G>0?W:E).reduce(function(ce,ye){return Math.max(ce,j(ye))},0),Me=G/(1-Math.min(.5,Oe/le));z=G>0?[0,Me]:[Me,0]}else z=ie?[Math.max(0,Te),Math.max(1,Se)]:[Te,Se]}else re?(U.val>=0&&(U={val:0,nopad:1}),Q.val<=0&&(Q={val:0,nopad:1})):ie&&(U.val-pe*$(U)<0&&(U={val:0,nopad:1}),Q.val<=0&&(Q={val:1,nopad:1})),pe=(Q.val-U.val-g(R,te.val,ee.val))/(le-$(U)-j(Q)),z=[U.val-pe*$(U),Q.val+pe*j(Q)];return z=D(z,R),R.limitRange&&R.limitRange(),H&&z.reverse(),s.simpleMap(z,R.l2r||Number)}function g(O,R,F){var A=0;if(O.rangebreaks)for(var z=O.locateBreaks(R,F),B=0;B0?F.ppadplus:F.ppadminus)||F.ppad||0),X=Y((O._m>0?F.ppadminus:F.ppadplus)||F.ppad||0),re=Y(F.vpadplus||F.vpad),ie=Y(F.vpadminus||F.vpad);if(!U){if(W=1/0,G=-1/0,ee)for(A=0;A0&&(W=z),z>G&&z-c&&(W=z),z>G&&z=pe;A--)se(A);return{min:L,max:q,opts:F}},concatExtremes:_};var x=3;function _(O,R,F){var A,z,B,$=R._id,j=O._fullData,N=O._fullLayout,E=[],W=[];function G(te,ee){for(A=0;A=F&&(E.extrapad||!$)){j=!1;break}z(R,E.val)&&E.pad<=F&&($||!E.extrapad)&&(O.splice(N,1),N--)}if(j){var W=B&&R===0;O.push({val:R,pad:W?0:F,extrapad:!W&&$})}}function M(O){return f(O)&&Math.abs(O)=R}function P(O,R,F){return R===void 0||F===void 0||(R=O.d2l(R))=N&&(B=N,F=N),$<=N&&($=N,A=N)}}return F=function(E,W){var G=W.autorangeoptions;return G&&G.minallowed!==void 0&&P(W,G.minallowed,G.maxallowed)?G.minallowed:G&&G.clipmin!==void 0&&P(W,G.clipmin,G.clipmax)?Math.max(E,W.d2l(G.clipmin)):E}(F,R),A=function(E,W){var G=W.autorangeoptions;return G&&G.maxallowed!==void 0&&P(W,G.minallowed,G.maxallowed)?G.maxallowed:G&&G.clipmax!==void 0&&P(W,G.clipmin,G.clipmax)?Math.min(E,W.d2l(G.clipmax)):E}(A,R),[F,A]}},23074:function(o){o.exports=function(a,n,l){var f,s;if(l){var c=n==="reversed"||n==="min reversed"||n==="max reversed";f=l[c?1:0],s=l[c?0:1]}var d=a("autorangeoptions.minallowed",s===null?f:void 0),h=a("autorangeoptions.maxallowed",f===null?s:void 0);d===void 0&&a("autorangeoptions.clipmin"),h===void 0&&a("autorangeoptions.clipmax"),a("autorangeoptions.include")}},89298:function(o,a,n){var l=n(39898),f=n(92770),s=n(74875),c=n(73972),d=n(71828),h=d.strTranslate,p=n(63893),m=n(92998),y=n(7901),v=n(91424),g=n(13838),b=n(66287),x=n(50606),_=x.ONEMAXYEAR,w=x.ONEAVGYEAR,k=x.ONEMINYEAR,T=x.ONEMAXQUARTER,M=x.ONEAVGQUARTER,S=x.ONEMINQUARTER,C=x.ONEMAXMONTH,P=x.ONEAVGMONTH,D=x.ONEMINMONTH,O=x.ONEWEEK,R=x.ONEDAY,F=R/2,A=x.ONEHOUR,z=x.ONEMIN,B=x.ONESEC,$=x.MINUS_SIGN,j=x.BADNUM,N={K:"zeroline"},E={K:"gridline",L:"path"},W={K:"minor-gridline",L:"path"},G={K:"tick",L:"path"},L={K:"tick",L:"text"},q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},H=n(18783),V=H.MID_SHIFT,te=H.CAP_SHIFT,ee=H.LINE_SPACING,U=H.OPPOSITE_SIDE,Q=o.exports={};Q.setConvert=n(21994);var Y=n(4322),Z=n(41675),X=Z.idSort,re=Z.isLinked;Q.id2name=Z.id2name,Q.name2id=Z.name2id,Q.cleanId=Z.cleanId,Q.list=Z.list,Q.listIds=Z.listIds,Q.getFromId=Z.getFromId,Q.getFromTrace=Z.getFromTrace;var ie=n(71739);Q.getAutoRange=ie.getAutoRange,Q.findExtremes=ie.findExtremes;var le=1e-4;function se(ve){var _e=(ve[1]-ve[0])*le;return[ve[0]-_e,ve[1]+_e]}Q.coerceRef=function(ve,_e,Ve,We,Ze,Ge){var Ke=We.charAt(We.length-1),nt=Ve._fullLayout._subplots[Ke+"axis"],st=We+"ref",mt={};return Ze||(Ze=nt[0]||(typeof Ge=="string"?Ge:Ge[0])),Ge||(Ge=Ze),nt=nt.concat(nt.map(function(tt){return tt+" domain"})),mt[st]={valType:"enumerated",values:nt.concat(Ge?typeof Ge=="string"?[Ge]:Ge:[]),dflt:Ze},d.coerce(ve,_e,mt,st)},Q.getRefType=function(ve){return ve===void 0?ve:ve==="paper"?"paper":ve==="pixel"?"pixel":/( domain)$/.test(ve)?"domain":"range"},Q.coercePosition=function(ve,_e,Ve,We,Ze,Ge){var Ke,nt;if(Q.getRefType(We)!=="range")Ke=d.ensureNumber,nt=Ve(Ze,Ge);else{var st=Q.getFromId(_e,We);nt=Ve(Ze,Ge=st.fraction2r(Ge)),Ke=st.cleanPos}ve[Ze]=Ke(nt)},Q.cleanPosition=function(ve,_e,Ve){return(Ve==="paper"||Ve==="pixel"?d.ensureNumber:Q.getFromId(_e,Ve).cleanPos)(ve)},Q.redrawComponents=function(ve,_e){_e=_e||Q.listIds(ve);var Ve=ve._fullLayout;function We(Ze,Ge,Ke,nt){for(var st=c.getComponentMethod(Ze,Ge),mt={},tt=0;tt<_e.length;tt++)for(var Ft=Ve[Q.id2name(_e[tt])][Ke],Vt=0;VtVe&&tt2e-6||((Ve-ve._forceTick0)/ve._minDtick%1+1.000001)%1>2e-6)&&(ve._minDtick=0)):ve._minDtick=0},Q.saveRangeInitial=function(ve,_e){for(var Ve=Q.list(ve,"",!0),We=!1,Ze=0;Ze.3*$t||Lt(qt)||Lt(Et))){var Yt=yt.dtick/2;gt+=gt+Yt.8){var Tt=Number(yt.substr(1));jt.exactYears>.8&&Tt%12==0?gt=Q.tickIncrement(gt,"M6","reverse")+1.5*R:jt.exactMonths>.8?gt=Q.tickIncrement(gt,"M1","reverse")+15.5*R:gt-=F;var Ot=Q.tickIncrement(gt,yt);if(Ot<=qt)return Ot}return gt}(Dt,ve,Nt,nt,Ze)),St=Dt;St<=st;)St=Q.tickIncrement(St,Nt,!1,Ze);return{start:_e.c2r(Dt,0,Ze),end:_e.c2r(St,0,Ze),size:Nt,_dataSpan:st-nt}},Q.prepMinorTicks=function(ve,_e,Ve){if(!_e.minor.dtick){delete ve.dtick;var We,Ze=_e.dtick&&f(_e._tmin);if(Ze){var Ge=Q.tickIncrement(_e._tmin,_e.dtick,!0);We=[_e._tmin,.99*Ge+.01*_e._tmin]}else{var Ke=d.simpleMap(_e.range,_e.r2l);We=[Ke[0],.8*Ke[0]+.2*Ke[1]]}if(ve.range=d.simpleMap(We,_e.l2r),ve._isMinor=!0,Q.prepTicks(ve,Ve),Ze){var nt=f(_e.dtick),st=f(ve.dtick),mt=nt?_e.dtick:+_e.dtick.substring(1),tt=st?ve.dtick:+ve.dtick.substring(1);nt&&st?Oe(mt,tt)?mt===2*O&&tt===2*R&&(ve.dtick=O):mt===2*O&&tt===3*R?ve.dtick=O:mt!==O||(_e._input.minor||{}).nticks?Me(mt/tt,2.5)?ve.dtick=mt/2:ve.dtick=mt:ve.dtick=R:String(_e.dtick).charAt(0)==="M"?st?ve.dtick="M1":Oe(mt,tt)?mt>=12&&tt===2&&(ve.dtick="M3"):ve.dtick=_e.dtick:String(ve.dtick).charAt(0)==="L"?String(_e.dtick).charAt(0)==="L"?Oe(mt,tt)||(ve.dtick=Me(mt/tt,2.5)?_e.dtick/2:_e.dtick):ve.dtick="D1":ve.dtick==="D2"&&+_e.dtick>1&&(ve.dtick=1)}ve.range=_e.range}_e.minor._tick0Init===void 0&&(ve.tick0=_e.tick0)},Q.prepTicks=function(ve,_e){var Ve=d.simpleMap(ve.range,ve.r2l,void 0,void 0,_e);if(ve.tickmode==="auto"||!ve.dtick){var We,Ze=ve.nticks;Ze||(ve.type==="category"||ve.type==="multicategory"?(We=ve.tickfont?d.bigFont(ve.tickfont.size||12):15,Ze=ve._length/We):(We=ve._id.charAt(0)==="y"?40:80,Ze=d.constrain(ve._length/We,4,9)+1),ve._name==="radialaxis"&&(Ze*=2)),ve.minor&&ve.minor.tickmode!=="array"||ve.tickmode==="array"&&(Ze*=100),ve._roughDTick=Math.abs(Ve[1]-Ve[0])/Ze,Q.autoTicks(ve,ve._roughDTick),ve._minDtick>0&&ve.dtick<2*ve._minDtick&&(ve.dtick=ve._minDtick,ve.tick0=ve.l2r(ve._forceTick0))}ve.ticklabelmode==="period"&&function(Ge){var Ke;function nt(){return!(f(Ge.dtick)||Ge.dtick.charAt(0)!=="M")}var st=nt(),mt=Q.getTickFormat(Ge);if(mt){var tt=Ge._dtickInit!==Ge.dtick;/%[fLQsSMX]/.test(mt)||(/%[HI]/.test(mt)?(Ke=A,tt&&!st&&Ge.dtick=(ht?0:1);yt--){var qt=!yt;yt?(ve._dtickInit=ve.dtick,ve._tick0Init=ve.tick0):(ve.minor._dtickInit=ve.minor.dtick,ve.minor._tick0Init=ve.minor.tick0);var Et=yt?ve:d.extendFlat({},ve,ve.minor);if(qt?Q.prepMinorTicks(Et,ve,_e):Q.prepTicks(Et,_e),Et.tickmode!=="array")if(Et.tickmode!=="sync"){var jt=se(st),Tt=jt[0],Ot=jt[1],At=f(Et.dtick),Lt=Ze==="log"&&!(At||Et.dtick.charAt(0)==="L"),Rt=Q.tickFirst(Et,_e);if(yt){if(ve._tmin=Rt,Rt=Ot:Bt<=Ot;Bt=Q.tickIncrement(Bt,Wt,mt,Ge)){if(yt&&$t++,Et.rangebreaks&&!mt){if(Bt=Ft)break}if(Dt.length>Vt||Bt===Xt)break;Xt=Bt;var tn={value:Bt};yt?(Lt&&Bt!==(0|Bt)&&(tn.simpleLabel=!0),Ke>1&&$t%Ke&&(tn.skipLabel=!0),Dt.push(tn)):(tn.minor=!0,gt.push(tn))}}else Dt=[],St=J(ve);else yt?(Dt=[],St=ne(ve)):(gt=[],Nt=ne(ve))}if(ht&&!(ve.minor.ticks==="inside"&&ve.ticks==="outside"||ve.minor.ticks==="outside"&&ve.ticks==="inside")){for(var cn=Dt.map(function(lr){return lr.value}),ln=[],an=0;an0?(la=ur-1,An=ur):(la=ur,An=ur);var on,$n=lr[la].value,Pr=lr[An].value,Ln=Math.abs(Pr-$n),Bn=Ar||Ln,jn=0;Bn>=k?jn=Ln>=k&&Ln<=_?Ln:w:Ar===M&&Bn>=S?jn=Ln>=S&&Ln<=T?Ln:M:Bn>=D?jn=Ln>=D&&Ln<=C?Ln:P:Ar===O&&Bn>=O?jn=O:Bn>=R?jn=R:Ar===F&&Bn>=F?jn=F:Ar===A&&Bn>=A&&(jn=A),jn>=Ln&&(jn=Ln,on=!0);var Un=kr+jn;if(ti.rangebreaks&&jn>0){for(var Lr=0,xr=0;xr<84;xr++){var Mr=(xr+.5)/84;ti.maskBreaks(kr*(1-Mr)+Mr*Un)!==j&&Lr++}(jn*=Lr/84)||(lr[ur].drop=!0),on&&Ln>O&&(jn=Ln)}(jn>0||ur===0)&&(lr[ur].periodX=kr+jn/2)}}(Dt,ve,ve._definedDelta),ve.rangebreaks){var Kt=ve._id.charAt(0)==="y",On=1;ve.tickmode==="auto"&&(On=ve.tickfont?ve.tickfont.size:12);var Tn=NaN;for(Ve=Dt.length-1;Ve>-1;Ve--)if(Dt[Ve].drop)Dt.splice(Ve,1);else{Dt[Ve].value=It(Dt[Ve].value,ve);var Dn=ve.c2p(Dt[Ve].value);(Kt?Tn>Dn-On:TnFt||EnFt&&(wn.periodX=Ft),En10||We.substr(5)!=="01-01"?ve._tickround="d":ve._tickround=+_e.substr(1)%12==0?"y":"m";else if(_e>=R&&Ze<=10||_e>=15*R)ve._tickround="d";else if(_e>=z&&Ze<=16||_e>=A)ve._tickround="M";else if(_e>=B&&Ze<=19||_e>=z)ve._tickround="S";else{var Ge=ve.l2r(Ve+_e).replace(/^-/,"").length;ve._tickround=Math.max(Ze,Ge)-20,ve._tickround<0&&(ve._tickround=4)}}else if(f(_e)||_e.charAt(0)==="L"){var Ke=ve.range.map(ve.r2d||Number);f(_e)||(_e=Number(_e.substr(1))),ve._tickround=2-Math.floor(Math.log(_e)/Math.LN10+.01);var nt=Math.max(Math.abs(Ke[0]),Math.abs(Ke[1])),st=Math.floor(Math.log(nt)/Math.LN10+.01),mt=ve.minexponent===void 0?3:ve.minexponent;Math.abs(st)>mt&&(Ie(ve.exponentformat)&&!Be(st)?ve._tickexponent=3*Math.round((st-1)/3):ve._tickexponent=st)}else ve._tickround=null}function De(ve,_e,Ve){var We=ve.tickfont||{};return{x:_e,dx:0,dy:0,text:Ve||"",fontSize:We.size,font:We.family,fontColor:We.color}}Q.autoTicks=function(ve,_e,Ve){var We;function Ze(Ft){return Math.pow(Ft,Math.floor(Math.log(_e)/Math.LN10))}if(ve.type==="date"){ve.tick0=d.dateTick0(ve.calendar,0);var Ge=2*_e;if(Ge>w)_e/=w,We=Ze(10),ve.dtick="M"+12*Ae(_e,We,de);else if(Ge>P)_e/=P,ve.dtick="M"+Ae(_e,1,xe);else if(Ge>R){if(ve.dtick=Ae(_e,R,ve._hasDayOfWeekBreaks?[1,2,7,14]:ge),!Ve){var Ke=Q.getTickFormat(ve),nt=ve.ticklabelmode==="period";nt&&(ve._rawTick0=ve.tick0),/%[uVW]/.test(Ke)?ve.tick0=d.dateTick0(ve.calendar,2):ve.tick0=d.dateTick0(ve.calendar,1),nt&&(ve._dowTick0=ve.tick0)}}else Ge>A?ve.dtick=Ae(_e,A,xe):Ge>z?ve.dtick=Ae(_e,z,ue):Ge>B?ve.dtick=Ae(_e,B,ue):(We=Ze(10),ve.dtick=Ae(_e,We,de))}else if(ve.type==="log"){ve.tick0=0;var st=d.simpleMap(ve.range,ve.r2l);if(ve._isMinor&&(_e*=1.5),_e>.7)ve.dtick=Math.ceil(_e);else if(Math.abs(st[1]-st[0])<1){var mt=1.5*Math.abs((st[1]-st[0])/_e);_e=Math.abs(Math.pow(10,st[1])-Math.pow(10,st[0]))/mt,We=Ze(10),ve.dtick="L"+Ae(_e,We,de)}else ve.dtick=_e>.3?"D2":"D1"}else ve.type==="category"||ve.type==="multicategory"?(ve.tick0=0,ve.dtick=Math.ceil(Math.max(_e,1))):pt(ve)?(ve.tick0=0,We=1,ve.dtick=Ae(_e,We,ke)):(ve.tick0=0,We=Ze(10),ve.dtick=Ae(_e,We,de));if(ve.dtick===0&&(ve.dtick=1),!f(ve.dtick)&&typeof ve.dtick!="string"){var tt=ve.dtick;throw ve.dtick=1,"ax.dtick error: "+String(tt)}},Q.tickIncrement=function(ve,_e,Ve,We){var Ze=Ve?-1:1;if(f(_e))return d.increment(ve,Ze*_e);var Ge=_e.charAt(0),Ke=Ze*Number(_e.substr(1));if(Ge==="M")return d.incrementMonth(ve,Ke,We);if(Ge==="L")return Math.log(Math.pow(10,ve)+Ke)/Math.LN10;if(Ge==="D"){var nt=_e==="D2"?we:be,st=ve+.01*Ze,mt=d.roundUp(d.mod(st,1),nt,Ve);return Math.floor(st)+Math.log(l.round(Math.pow(10,mt),1))/Math.LN10}throw"unrecognized dtick "+String(_e)},Q.tickFirst=function(ve,_e){var Ve=ve.r2l||Number,We=d.simpleMap(ve.range,Ve,void 0,void 0,_e),Ze=We[1] ")}else gt._prevDateHead=Tt,Ot+="
"+Tt;ht.text=Ot}(ve,Ge,Ve,nt):st==="log"?function(gt,ht,yt,qt,Et){var jt=gt.dtick,Tt=ht.x,Ot=gt.tickformat,At=typeof jt=="string"&&jt.charAt(0);if(Et==="never"&&(Et=""),qt&&At!=="L"&&(jt="L3",At="L"),Ot||At==="L")ht.text=Ue(Math.pow(10,Tt),gt,Et,qt);else if(f(jt)||At==="D"&&d.mod(Tt+.01,1)<.1){var Lt=Math.round(Tt),Rt=Math.abs(Lt),$t=gt.exponentformat;$t==="power"||Ie($t)&&Be(Lt)?(ht.text=Lt===0?1:Lt===1?"10":"10"+(Lt>1?"":$)+Rt+"",ht.fontSize*=1.25):($t==="e"||$t==="E")&&Rt>2?ht.text="1"+$t+(Lt>0?"+":$)+Rt:(ht.text=Ue(Math.pow(10,Tt),gt,"","fakehover"),jt==="D1"&>._id.charAt(0)==="y"&&(ht.dy-=ht.fontSize/6))}else{if(At!=="D")throw"unrecognized dtick "+String(jt);ht.text=String(Math.round(Math.pow(10,d.mod(Tt,1)))),ht.fontSize*=.75}if(gt.dtick==="D1"){var Yt=String(ht.text).charAt(0);Yt!=="0"&&Yt!=="1"||(gt._id.charAt(0)==="y"?ht.dx-=ht.fontSize/4:(ht.dy+=ht.fontSize/2,ht.dx+=(gt.range[1]>gt.range[0]?1:-1)*ht.fontSize*(Tt<0?.5:.25)))}}(ve,Ge,0,nt,St):st==="category"?function(gt,ht){var yt=gt._categories[Math.round(ht.x)];yt===void 0&&(yt=""),ht.text=String(yt)}(ve,Ge):st==="multicategory"?function(gt,ht,yt){var qt=Math.round(ht.x),Et=gt._categories[qt]||[],jt=Et[1]===void 0?"":String(Et[1]),Tt=Et[0]===void 0?"":String(Et[0]);yt?ht.text=Tt+" - "+jt:(ht.text=jt,ht.text2=Tt)}(ve,Ge,Ve):pt(ve)?function(gt,ht,yt,qt,Et){if(gt.thetaunit!=="radians"||yt)ht.text=Ue(ht.x,gt,Et,qt);else{var jt=ht.x/180;if(jt===0)ht.text="0";else{var Tt=function(At){function Lt(Xt,Bt){return Math.abs(Xt-Bt)<=1e-6}var Rt=function(Xt){for(var Bt=1;!Lt(Math.round(Xt*Bt)/Bt,Xt);)Bt*=10;return Bt}(At),$t=At*Rt,Yt=Math.abs(function Xt(Bt,Wt){return Lt(Wt,0)?Bt:Xt(Wt,Bt%Wt)}($t,Rt));return[Math.round($t/Yt),Math.round(Rt/Yt)]}(jt);if(Tt[1]>=100)ht.text=Ue(d.deg2rad(ht.x),gt,Et,qt);else{var Ot=ht.x<0;Tt[1]===1?Tt[0]===1?ht.text="π":ht.text=Tt[0]+"π":ht.text=["",Tt[0],"","⁄","",Tt[1],"","π"].join(""),Ot&&(ht.text=$+ht.text)}}}}(ve,Ge,Ve,nt,St):function(gt,ht,yt,qt,Et){Et==="never"?Et="":gt.showexponent==="all"&&Math.abs(ht.x/gt.dtick)<1e-6&&(Et="hide"),ht.text=Ue(ht.x,gt,Et,qt)}(ve,Ge,0,nt,St),We||(ve.tickprefix&&!Vt(ve.showtickprefix)&&(Ge.text=ve.tickprefix+Ge.text),ve.ticksuffix&&!Vt(ve.showticksuffix)&&(Ge.text+=ve.ticksuffix)),ve.labelalias&&ve.labelalias.hasOwnProperty(Ge.text)){var Nt=ve.labelalias[Ge.text];typeof Nt=="string"&&(Ge.text=Nt)}if(ve.tickson==="boundaries"||ve.showdividers){var Dt=function(gt){var ht=ve.l2p(gt);return ht>=0&&ht<=ve._length?gt:null};Ge.xbnd=[Dt(Ge.x-.5),Dt(Ge.x+ve.dtick-.5)]}return Ge},Q.hoverLabelText=function(ve,_e,Ve){Ve&&(ve=d.extendFlat({},ve,{hoverformat:Ve}));var We=Array.isArray(_e)?_e[0]:_e,Ze=Array.isArray(_e)?_e[1]:void 0;if(Ze!==void 0&&Ze!==We)return Q.hoverLabelText(ve,We,Ve)+" - "+Q.hoverLabelText(ve,Ze,Ve);var Ge=ve.type==="log"&&We<=0,Ke=Q.tickText(ve,ve.c2l(Ge?-We:We),"hover").text;return Ge?We===0?"0":$+Ke:Ke};var Re=["f","p","n","μ","m","","k","M","G","T"];function Ie(ve){return ve==="SI"||ve==="B"}function Be(ve){return ve>14||ve<-15}function Ue(ve,_e,Ve,We){var Ze=ve<0,Ge=_e._tickround,Ke=Ve||_e.exponentformat||"B",nt=_e._tickexponent,st=Q.getTickFormat(_e),mt=_e.separatethousands;if(We){var tt={exponentformat:Ke,minexponent:_e.minexponent,dtick:_e.showexponent==="none"?_e.dtick:f(ve)&&Math.abs(ve)||1,range:_e.showexponent==="none"?_e.range.map(_e.r2d):[0,ve||1]};Ee(tt),Ge=(Number(tt._tickround)||0)+4,nt=tt._tickexponent,_e.hoverformat&&(st=_e.hoverformat)}if(st)return _e._numFormat(st)(ve).replace(/-/g,$);var Ft,Vt=Math.pow(10,-Ge)/2;if(Ke==="none"&&(nt=0),(ve=Math.abs(ve))"+Ft+"":Ke==="B"&&nt===9?ve+="B":Ie(Ke)&&(ve+=Re[nt/3+5])),Ze?$+ve:ve}function qe(ve,_e){if(ve){var Ve=Object.keys(q).reduce(function(We,Ze){return _e.indexOf(Ze)!==-1&&q[Ze].forEach(function(Ge){We[Ge]=1}),We},{});Object.keys(ve).forEach(function(We){Ve[We]||(We.length===1?ve[We]=0:delete ve[We])})}}function Ye(ve,_e){for(var Ve=[],We={},Ze=0;Ze<_e.length;Ze++){var Ge=_e[Ze];We[Ge.text2]?We[Ge.text2].push(Ge.x):We[Ge.text2]=[Ge.x]}for(var Ke in We)Ve.push(De(ve,d.interp(We[Ke],.5),Ke));return Ve}function at(ve){return ve.periodX!==void 0?ve.periodX:ve.x}function lt(ve){return[ve.text,ve.x,ve.axInfo,ve.font,ve.fontSize,ve.fontColor].join("_")}function ct(ve){var _e=ve.title.font.size,Ve=(ve.title.text.match(p.BR_TAG_ALL)||[]).length;return ve.title.hasOwnProperty("standoff")?Ve?_e*(te+Ve*ee):_e*te:Ve?_e*(Ve+1)*ee:_e}function bt(ve,_e){var Ve=ve.l2p(_e);return Ve>1&&Ve=Ze.min&&ve=0,ht=tt(Vt,St[1])<=0;return(Nt||gt)&&(Dt||ht)}if(ve.tickformatstops&&ve.tickformatstops.length>0)switch(ve.type){case"date":case"linear":for(_e=0;_e=Ke(Ze)))){Ve=We;break}break;case"log":for(_e=0;_e=0&&Ze.unshift(Ze.splice(mt,1).shift())}});var Ke={false:{left:0,right:0}};return d.syncOrAsync(Ze.map(function(nt){return function(){if(nt){var st=Q.getFromId(ve,nt);Ve||(Ve={}),Ve.axShifts=Ke,Ve.overlayingShiftedAx=Ge;var mt=Q.drawOne(ve,st,Ve);return st._shiftPusher&&wt(st,st._fullDepth||0,Ke,!0),st._r=st.range.slice(),st._rl=d.simpleMap(st._r,st.r2l),mt}}}))},Q.drawOne=function(ve,_e,Ve){var We,Ze,Ge,Ke=(Ve=Ve||{}).axShifts||{},nt=Ve.overlayingShiftedAx||[];_e.setScale();var st=ve._fullLayout,mt=_e._id,tt=mt.charAt(0),Ft=Q.counterLetter(mt),Vt=st._plots[_e._mainSubplot];if(Vt){if(_e._shiftPusher=_e.autoshift||nt.indexOf(_e._id)!==-1||nt.indexOf(_e.overlaying)!==-1,_e._shiftPusher&_e.anchor==="free"){var St=_e.linewidth/2||0;_e.ticks==="inside"&&(St+=_e.ticklen),wt(_e,St,Ke,!0),wt(_e,_e.shift||0,Ke,!1)}Ve.skipTitle===!0&&_e._shift!==void 0||(_e._shift=function(An,on){return An.autoshift?on[An.overlaying][An.side]:An.shift||0}(_e,Ke));var Nt=Vt[tt+"axislayer"],Dt=_e._mainLinePosition,gt=Dt+=_e._shift,ht=_e._mainMirrorPosition,yt=_e._vals=Q.calcTicks(_e),qt=[_e.mirror,gt,ht].join("_");for(We=0;We0?An.bottom-jn:0,Un))));var Lr=0,xr=0;if(_e._shiftPusher&&(Lr=Math.max(Un,An.height>0?Ln==="l"?jn-An.left:An.right-jn:0),_e.title.text!==st._dfltTitle[tt]&&(xr=(_e._titleStandoff||0)+(_e._titleScoot||0),Ln==="l"&&(xr+=ct(_e))),_e._fullDepth=Math.max(Lr,xr)),_e.automargin){on={x:0,y:0,r:0,l:0,t:0,b:0};var Mr=[0,1],Na=typeof _e._shift=="number"?_e._shift:0;if(tt==="x"){if(Ln==="b"?on[Ln]=_e._depth:(on[Ln]=_e._depth=Math.max(An.width>0?jn-An.top:0,Un),Mr.reverse()),An.width>0){var wa=An.right-(_e._offset+_e._length);wa>0&&(on.xr=1,on.r=wa);var sa=_e._offset-An.left;sa>0&&(on.xl=0,on.l=sa)}}else if(Ln==="l"?(_e._depth=Math.max(An.height>0?jn-An.left:0,Un),on[Ln]=_e._depth-Na):(_e._depth=Math.max(An.height>0?An.right-jn:0,Un),on[Ln]=_e._depth+Na,Mr.reverse()),An.height>0){var kn=An.bottom-(_e._offset+_e._length);kn>0&&(on.yb=0,on.b=kn);var Dr=_e._offset-An.top;Dr>0&&(on.yt=1,on.t=Dr)}on[Ft]=_e.anchor==="free"?_e.position:_e._anchorAxis.domain[Mr[0]],_e.title.text!==st._dfltTitle[tt]&&(on[Ln]+=ct(_e)+(_e.title.standoff||0)),_e.mirror&&_e.anchor!=="free"&&(($n={x:0,y:0,r:0,l:0,t:0,b:0})[Bn]=_e.linewidth,_e.mirror&&_e.mirror!==!0&&($n[Bn]+=Un),_e.mirror===!0||_e.mirror==="ticks"?$n[Ft]=_e._anchorAxis.domain[Mr[1]]:_e.mirror!=="all"&&_e.mirror!=="allticks"||($n[Ft]=[_e._counterDomainMin,_e._counterDomainMax][Mr[1]]))}kr&&(Pr=c.getComponentMethod("rangeslider","autoMarginOpts")(ve,_e)),typeof _e.automargin=="string"&&(qe(on,_e.automargin),qe($n,_e.automargin)),s.autoMargin(ve,Ne(_e),on),s.autoMargin(ve,Qe(_e),$n),s.autoMargin(ve,it(_e),Pr)}),d.syncOrAsync(Ar)}}function la(An){var on=mt+(An||"tick");return Et[on]||(Et[on]=function($n,Pr){var Ln,Bn,jn,Un;return $n._selections[Pr].size()?(Ln=1/0,Bn=-1/0,jn=1/0,Un=-1/0,$n._selections[Pr].each(function(){var Lr=ze(this),xr=v.bBox(Lr.node().parentNode);Ln=Math.min(Ln,xr.top),Bn=Math.max(Bn,xr.bottom),jn=Math.min(jn,xr.left),Un=Math.max(Un,xr.right)})):(Ln=0,Bn=0,jn=0,Un=0),{top:Ln,bottom:Bn,left:jn,right:Un,height:Bn-Ln,width:Un-jn}}(_e,on)),Et[on]}},Q.getTickSigns=function(ve,_e){var Ve=ve._id.charAt(0),We={x:"top",y:"right"}[Ve],Ze=ve.side===We?1:-1,Ge=[-1,1,Ze,-Ze];return(_e?(ve.minor||{}).ticks:ve.ticks)!=="inside"==(Ve==="x")&&(Ge=Ge.map(function(Ke){return-Ke})),ve.side&&Ge.push({l:-1,t:-1,r:1,b:1}[ve.side.charAt(0)]),Ge},Q.makeTransTickFn=function(ve){return ve._id.charAt(0)==="x"?function(_e){return h(ve._offset+ve.l2p(_e.x),0)}:function(_e){return h(0,ve._offset+ve.l2p(_e.x))}},Q.makeTransTickLabelFn=function(ve){var _e=function(Ze){var Ge=Ze.ticklabelposition||"",Ke=function(ht){return Ge.indexOf(ht)!==-1},nt=Ke("top"),st=Ke("left"),mt=Ke("right"),tt=Ke("bottom"),Ft=Ke("inside"),Vt=tt||st||nt||mt;if(!Vt&&!Ft)return[0,0];var St=Ze.side,Nt=Vt?(Ze.tickwidth||0)/2:0,Dt=3,gt=Ze.tickfont?Ze.tickfont.size:12;return(tt||nt)&&(Nt+=gt*te,Dt+=(Ze.linewidth||0)/2),(st||mt)&&(Nt+=(Ze.linewidth||0)/2,Dt+=3),Ft&&St==="top"&&(Dt-=gt*(1-te)),(st||nt)&&(Nt=-Nt),St!=="bottom"&&St!=="right"||(Dt=-Dt),[Vt?Nt:0,Ft?Dt:0]}(ve),Ve=_e[0],We=_e[1];return ve._id.charAt(0)==="x"?function(Ze){return h(Ve+ve._offset+ve.l2p(at(Ze)),We)}:function(Ze){return h(We,Ve+ve._offset+ve.l2p(at(Ze)))}},Q.makeTickPath=function(ve,_e,Ve,We){We||(We={});var Ze=We.minor;if(Ze&&!ve.minor)return"";var Ge=We.len!==void 0?We.len:Ze?ve.minor.ticklen:ve.ticklen,Ke=ve._id.charAt(0),nt=(ve.linewidth||1)/2;return Ke==="x"?"M0,"+(_e+nt*Ve)+"v"+Ge*Ve:"M"+(_e+nt*Ve)+",0h"+Ge*Ve},Q.makeLabelFns=function(ve,_e,Ve){var We=ve.ticklabelposition||"",Ze=function($t){return We.indexOf($t)!==-1},Ge=Ze("top"),Ke=Ze("left"),nt=Ze("right"),st=Ze("bottom")||Ke||Ge||nt,mt=Ze("inside"),tt=We==="inside"&&ve.ticks==="inside"||!mt&&ve.ticks==="outside"&&ve.tickson!=="boundaries",Ft=0,Vt=0,St=tt?ve.ticklen:0;if(mt?St*=-1:st&&(St=0),tt&&(Ft+=St,Ve)){var Nt=d.deg2rad(Ve);Ft=St*Math.cos(Nt)+1,Vt=St*Math.sin(Nt)}ve.showticklabels&&(tt||ve.showline)&&(Ft+=.2*ve.tickfont.size);var Dt,gt,ht,yt,qt,Et={labelStandoff:Ft+=(ve.linewidth||1)/2*(mt?-1:1),labelShift:Vt},jt=0,Tt=ve.side,Ot=ve._id.charAt(0),At=ve.tickangle;if(Ot==="x")yt=(qt=!mt&&Tt==="bottom"||mt&&Tt==="top")?1:-1,mt&&(yt*=-1),Dt=Vt*yt,gt=_e+Ft*yt,ht=qt?1:-.2,Math.abs(At)===90&&(mt?ht+=V:ht=At===-90&&Tt==="bottom"?te:At===90&&Tt==="top"?V:.5,jt=V/2*(At/90)),Et.xFn=function($t){return $t.dx+Dt+jt*$t.fontSize},Et.yFn=function($t){return $t.dy+gt+$t.fontSize*ht},Et.anchorFn=function($t,Yt){if(st){if(Ke)return"end";if(nt)return"start"}return f(Yt)&&Yt!==0&&Yt!==180?Yt*yt<0!==mt?"end":"start":"middle"},Et.heightFn=function($t,Yt,Xt){return Yt<-60||Yt>60?-.5*Xt:ve.side==="top"!==mt?-Xt:0};else if(Ot==="y"){if(yt=(qt=!mt&&Tt==="left"||mt&&Tt==="right")?1:-1,mt&&(yt*=-1),Dt=Ft,gt=Vt*yt,ht=0,mt||Math.abs(At)!==90||(ht=At===-90&&Tt==="left"||At===90&&Tt==="right"?te:.5),mt){var Lt=f(At)?+At:0;if(Lt!==0){var Rt=d.deg2rad(Lt);jt=Math.abs(Math.sin(Rt))*te*yt,ht=0}}Et.xFn=function($t){return $t.dx+_e-(Dt+$t.fontSize*ht)*yt+jt*$t.fontSize},Et.yFn=function($t){return $t.dy+gt+$t.fontSize*V},Et.anchorFn=function($t,Yt){return f(Yt)&&Math.abs(Yt)===90?"middle":qt?"end":"start"},Et.heightFn=function($t,Yt,Xt){return ve.side==="right"&&(Yt*=-1),Yt<-30?-Xt:Yt<30?-.5*Xt:0}}return Et},Q.drawTicks=function(ve,_e,Ve){Ve=Ve||{};var We=_e._id+"tick",Ze=[].concat(_e.minor&&_e.minor.ticks?Ve.vals.filter(function(Ke){return Ke.minor&&!Ke.noTick}):[]).concat(_e.ticks?Ve.vals.filter(function(Ke){return!Ke.minor&&!Ke.noTick}):[]),Ge=Ve.layer.selectAll("path."+We).data(Ze,lt);Ge.exit().remove(),Ge.enter().append("path").classed(We,1).classed("ticks",1).classed("crisp",Ve.crisp!==!1).each(function(Ke){return y.stroke(l.select(this),Ke.minor?_e.minor.tickcolor:_e.tickcolor)}).style("stroke-width",function(Ke){return v.crispRound(ve,Ke.minor?_e.minor.tickwidth:_e.tickwidth,1)+"px"}).attr("d",Ve.path).style("display",null),zt(_e,[G]),Ge.attr("transform",Ve.transFn)},Q.drawGrid=function(ve,_e,Ve){if(Ve=Ve||{},_e.tickmode!=="sync"){var We=_e._id+"grid",Ze=_e.minor&&_e.minor.showgrid,Ge=Ze?Ve.vals.filter(function(ht){return ht.minor}):[],Ke=_e.showgrid?Ve.vals.filter(function(ht){return!ht.minor}):[],nt=Ve.counterAxis;if(nt&&Q.shouldShowZeroLine(ve,_e,nt))for(var st=_e.tickmode==="array",mt=0;mt=0;Nt--){var Dt=Nt?Vt:St;if(Dt){var gt=Dt.selectAll("path."+We).data(Nt?Ke:Ge,lt);gt.exit().remove(),gt.enter().append("path").classed(We,1).classed("crisp",Ve.crisp!==!1),gt.attr("transform",Ve.transFn).attr("d",Ve.path).each(function(ht){return y.stroke(l.select(this),ht.minor?_e.minor.gridcolor:_e.gridcolor||"#ddd")}).style("stroke-dasharray",function(ht){return v.dashStyle(ht.minor?_e.minor.griddash:_e.griddash,ht.minor?_e.minor.gridwidth:_e.gridwidth)}).style("stroke-width",function(ht){return(ht.minor?Ft:_e._gw)+"px"}).style("display",null),typeof Ve.path=="function"&>.attr("d",Ve.path)}}zt(_e,[E,W])}},Q.drawZeroLine=function(ve,_e,Ve){Ve=Ve||Ve;var We=_e._id+"zl",Ze=Q.shouldShowZeroLine(ve,_e,Ve.counterAxis),Ge=Ve.layer.selectAll("path."+We).data(Ze?[{x:0,id:_e._id}]:[]);Ge.exit().remove(),Ge.enter().append("path").classed(We,1).classed("zl",1).classed("crisp",Ve.crisp!==!1).each(function(){Ve.layer.selectAll("path").sort(function(Ke,nt){return X(Ke.id,nt.id)})}),Ge.attr("transform",Ve.transFn).attr("d",Ve.path).call(y.stroke,_e.zerolinecolor||y.defaultLine).style("stroke-width",v.crispRound(ve,_e.zerolinewidth,_e._gw||1)+"px").style("display",null),zt(_e,[N])},Q.drawLabels=function(ve,_e,Ve){Ve=Ve||{};var We=ve._fullLayout,Ze=_e._id,Ge=Ze.charAt(0),Ke=Ve.cls||Ze+"tick",nt=Ve.vals.filter(function(yt){return yt.text}),st=Ve.labelFns,mt=Ve.secondary?0:_e.tickangle,tt=(_e._prevTickAngles||{})[Ke],Ft=Ve.layer.selectAll("g."+Ke).data(_e.showticklabels?nt:[],lt),Vt=[];function St(yt,qt){yt.each(function(Et){var jt=l.select(this),Tt=jt.select(".text-math-group"),Ot=st.anchorFn(Et,qt),At=Ve.transFn.call(jt.node(),Et)+(f(qt)&&+qt!=0?" rotate("+qt+","+st.xFn(Et)+","+(st.yFn(Et)-Et.fontSize/2)+")":""),Lt=p.lineCount(jt),Rt=ee*Et.fontSize,$t=st.heightFn(Et,f(qt)?+qt:0,(Lt-1)*Rt);if($t&&(At+=h(0,$t)),Tt.empty()){var Yt=jt.select("text");Yt.attr({transform:At,"text-anchor":Ot}),Yt.style("opacity",1),_e._adjustTickLabelsOverflow&&_e._adjustTickLabelsOverflow()}else{var Xt=v.bBox(Tt.node()).width*{end:-.5,start:.5}[Ot];Tt.attr("transform",At+h(Xt,0))}})}Ft.enter().append("g").classed(Ke,1).append("text").attr("text-anchor","middle").each(function(yt){var qt=l.select(this),Et=ve._promises.length;qt.call(p.positionText,st.xFn(yt),st.yFn(yt)).call(v.font,yt.font,yt.fontSize,yt.fontColor).text(yt.text).call(p.convertToTspans,ve),ve._promises[Et]?Vt.push(ve._promises.pop().then(function(){St(qt,mt)})):St(qt,mt)}),zt(_e,[L]),Ft.exit().remove(),Ve.repositionOnUpdate&&Ft.each(function(yt){l.select(this).select("text").call(p.positionText,st.xFn(yt),st.yFn(yt))}),_e._adjustTickLabelsOverflow=function(){var yt=_e.ticklabeloverflow;if(yt&&yt!=="allow"){var qt=yt.indexOf("hide")!==-1,Et=_e._id.charAt(0)==="x",jt=0,Tt=Et?ve._fullLayout.width:ve._fullLayout.height;if(yt.indexOf("domain")!==-1){var Ot=d.simpleMap(_e.range,_e.r2l);jt=_e.l2p(Ot[0])+_e._offset,Tt=_e.l2p(Ot[1])+_e._offset}var At=Math.min(jt,Tt),Lt=Math.max(jt,Tt),Rt=_e.side,$t=1/0,Yt=-1/0;for(var Xt in Ft.each(function(tn){var cn=l.select(this);if(cn.select(".text-math-group").empty()){var ln=v.bBox(cn.node()),an=0;Et?(ln.right>Lt||ln.leftLt||ln.top+(_e.tickangle?0:tn.fontSize/4)_e["_visibleLabelMin_"+Ot._id]?Wt.style("display","none"):Lt.K!=="tick"||At||Wt.style("display",null)})})})})},St(Ft,tt+1?tt:mt);var Nt=null;_e._selections&&(_e._selections[Ke]=Ft);var Dt=[function(){return Vt.length&&Promise.all(Vt)}];_e.automargin&&We._redrawFromAutoMarginCount&&tt===90?(Nt=90,Dt.push(function(){St(Ft,tt)})):Dt.push(function(){if(St(Ft,mt),nt.length&&Ge==="x"&&!f(mt)&&(_e.type!=="log"||String(_e.dtick).charAt(0)!=="D")){Nt=0;var yt,qt=0,Et=[];if(Ft.each(function(cn){qt=Math.max(qt,cn.fontSize);var ln=_e.l2p(cn.x),an=ze(this),sn=v.bBox(an.node());Et.push({top:0,bottom:10,height:10,left:ln-sn.width/2,right:ln+sn.width/2+2,width:sn.width+2})}),_e.tickson!=="boundaries"&&!_e.showdividers||Ve.secondary){var jt=nt.length,Tt=Math.abs((nt[jt-1].x-nt[0].x)*_e._m)/(jt-1),Ot=_e.ticklabelposition||"",At=function(cn){return Ot.indexOf(cn)!==-1},Lt=At("top"),Rt=At("left"),$t=At("right"),Yt=At("bottom")||Rt||Lt||$t?(_e.tickwidth||0)+6:0,Xt=Tt<2.5*qt||_e.type==="multicategory"||_e._name==="realaxis";for(yt=0;yt1)for(nt=1;nt2*R}(x,g))return"date";var M=b.autotypenumbers!=="strict";return function(S,C){for(var P=S.length,D=y(P),O=0,R=0,F={},A=0;A2*O}(x,M)?"category":function(S,C){for(var P=S.length,D=0;D=2){var F,A,z="";if(R.length===2){for(F=0;F<2;F++)if(A=S(R[F])){z=w;break}}var B=O("pattern",z);if(B===w)for(F=0;F<2;F++)(A=S(R[F]))&&(P.bounds[F]=R[F]=A-1);if(B)for(F=0;F<2;F++)switch(A=R[F],B){case w:if(!l(A)||(A=+A)!==Math.floor(A)||A<0||A>=7)return void(P.enabled=!1);P.bounds[F]=R[F]=A;break;case k:if(!l(A)||(A=+A)<0||A>24)return void(P.enabled=!1);P.bounds[F]=R[F]=A}if(D.autorange===!1){var $=D.range;if($[0]<$[1]){if(R[0]<$[0]&&R[1]>$[1])return void(P.enabled=!1)}else if(R[0]>$[0]&&R[1]<$[1])return void(P.enabled=!1)}}else{var j=O("values");if(!j||!j.length)return void(P.enabled=!1);O("dvalue")}}}o.exports=function(C,P,D,O,R){var F,A=O.letter,z=O.font||{},B=O.splomStash||{},$=D("visible",!O.visibleDflt),j=P._template||{},N=P.type||j.type||"-";N==="date"&&(f.getComponentMethod("calendars","handleDefaults")(C,P,"calendar",O.calendar),O.noTicklabelmode||(F=D("ticklabelmode")));var E="";O.noTicklabelposition&&N!=="multicategory"||(E=s.coerce(C,P,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:F==="period"?["outside","inside"]:A==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),O.noTicklabeloverflow||D("ticklabeloverflow",E.indexOf("inside")!==-1?"hide past domain":N==="category"||N==="multicategory"?"allow":"hide past div"),_(P,R),x(C,P,D,O),g(C,P,D,O),N==="category"||O.noHover||D("hoverformat");var W=D("color"),G=W!==h.color.dflt?W:z.color,L=B.label||R._dfltTitle[A];if(v(C,P,D,N,O),!$)return P;D("title.text",L),s.coerceFont(D,"title.font",{family:z.family,size:s.bigFont(z.size),color:G}),p(C,P,D,N);var q=O.hasMinor;if(q&&(c.newContainer(P,"minor"),p(C,P,D,N,{isMinor:!0})),y(C,P,D,N,O),m(C,P,D,O),q){var H=O.isMinor;O.isMinor=!0,m(C,P,D,O),O.isMinor=H}b(C,P,D,{dfltColor:W,bgColor:O.bgColor,showGrid:O.showGrid,hasMinor:q,attributes:h}),!q||P.minor.ticks||P.minor.showgrid||delete P.minor,(P.showline||P.ticks)&&D("mirror");var V,te=N==="multicategory";if(O.noTickson||N!=="category"&&!te||!P.ticks&&!P.showgrid||(te&&(V="boundaries"),D("tickson",V)==="boundaries"&&delete P.ticklabelposition),te&&D("showdividers")&&(D("dividercolor"),D("dividerwidth")),N==="date")if(d(C,P,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),P.rangebreaks.length){for(var ee=0;eep?1:-1:+(c.substr(1)||1)-+(d.substr(1)||1)},a.ref2id=function(c){return!!/^[xyz]/.test(c)&&c.split(" ")[0]},a.isLinked=function(c,d){return s(d,c._axisMatchGroups)||s(d,c._axisConstraintGroups)}},15258:function(o){o.exports=function(a,n,l,f){if(n.type==="category"){var s,c=a.categoryarray,d=Array.isArray(c)&&c.length>0;d&&(s="array");var h,p=l("categoryorder",s);p==="array"&&(h=l("categoryarray")),d||p!=="array"||(p=n.categoryorder="trace"),p==="trace"?n._initialCategories=[]:p==="array"?n._initialCategories=h.slice():(h=function(m,y){var v,g,b,x=y.dataAttr||m._id.charAt(0),_={};if(y.axData)v=y.axData;else for(v=[],g=0;gS?C.substr(S):P.substr(M))+D:C+P+k*T:D}function _(k,T){for(var M=T._size,S=M.h/M.w,C={},P=Object.keys(k),D=0;Dp*$)||W){for(M=0;MY&&ieU&&(U=ie);R/=(U-ee)/(2*Q),ee=P.l2r(ee),U=P.l2r(U),P.range=P._input.range=H=0?Math.min(ie,.9):1/(1/Math.max(ie,-.3)+3.222))}function H(ie,le,se,pe,Te){return ie.append("path").attr("class","zoombox").style({fill:le>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",p(se,pe)).attr("d",Te+"Z")}function V(ie,le,se){return ie.append("path").attr("class","zoombox-corners").style({fill:y.background,stroke:y.defaultLine,"stroke-width":1,opacity:0}).attr("transform",p(le,se)).attr("d","M0,0Z")}function te(ie,le,se,pe,Te,Se){ie.attr("d",pe+"M"+se.l+","+se.t+"v"+se.h+"h"+se.w+"v-"+se.h+"h-"+se.w+"Z"),ee(ie,le,Te,Se)}function ee(ie,le,se,pe){se||(ie.transition().style("fill",pe>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),le.transition().style("opacity",1).duration(200))}function U(ie){l.select(ie).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Q(ie){j&&ie.data&&ie._context.showTips&&(f.notifier(f._(ie,"Double-click to zoom back out"),"long"),j=!1)}function Y(ie){var le=Math.floor(Math.min(ie.b-ie.t,ie.r-ie.l,$)/2);return"M"+(ie.l-3.5)+","+(ie.t-.5+le)+"h3v"+-le+"h"+le+"v-3h-"+(le+3)+"ZM"+(ie.r+3.5)+","+(ie.t-.5+le)+"h-3v"+-le+"h"+-le+"v-3h"+(le+3)+"ZM"+(ie.r+3.5)+","+(ie.b+.5-le)+"h-3v"+le+"h"+-le+"v3h"+(le+3)+"ZM"+(ie.l-3.5)+","+(ie.b+.5-le)+"h3v"+le+"h"+le+"v3h-"+(le+3)+"Z"}function Z(ie,le,se,pe,Te){for(var Se,Oe,Me,ce,ye=!1,J={},ne={},de=(Te||{}).xaHash,xe=(Te||{}).yaHash,ue=0;ue=0)At._fullLayout._deactivateShape(At);else{var Lt=At._fullLayout.clickmode;if(U(At),Tt!==2||Ne||gt(),ze)Lt.indexOf("select")>-1&&F(Ot,At,de,xe,le.id,We),Lt.indexOf("event")>-1&&g.click(At,Ot,le.id);else if(Tt===1&&Ne){var Rt=Oe?ye:ce,$t=Oe==="s"||Me==="w"?0:1,Yt=Rt._name+".range["+$t+"]",Xt=function(tn,cn){var ln,an=tn.range[cn],sn=Math.abs(an-tn.range[1-cn]);return tn.type==="date"?an:tn.type==="log"?(ln=Math.ceil(Math.max(0,-Math.log(sn)/Math.LN10))+3,s("."+ln+"g")(Math.pow(10,an))):(ln=Math.floor(Math.log(Math.abs(an))/Math.LN10)-Math.floor(Math.log(sn)/Math.LN10)+4,s("."+String(ln)+"g")(an))}(Rt,$t),Bt="left",Wt="middle";if(Rt.fixedrange)return;Oe?(Wt=Oe==="n"?"top":"bottom",Rt.side==="right"&&(Bt="right")):Me==="e"&&(Bt="right"),At._context.showAxisRangeEntryBoxes&&l.select(kt).call(m.makeEditable,{gd:At,immediate:!0,background:At._fullLayout.paper_bgcolor,text:String(Xt),fill:Rt.tickfont?Rt.tickfont.color:"#444",horizontalAlign:Bt,verticalAlign:Wt}).on("edit",function(tn){var cn=Rt.d2r(tn);cn!==void 0&&h.call("_guiRelayout",At,Yt,cn)})}}}function Ke(Tt,Ot){if(ie._transitioningWithDuration)return!1;var At=Math.max(0,Math.min(be,lt*Tt+Je)),Lt=Math.max(0,Math.min(we,ct*Ot+ut)),Rt=Math.abs(At-Je),$t=Math.abs(Lt-ut);function Yt(){wt="",pt.r=pt.l,pt.t=pt.b,_e.attr("d","M0,0Z")}if(pt.l=Math.min(Je,At),pt.r=Math.max(Je,At),pt.t=Math.min(ut,Lt),pt.b=Math.max(ut,Lt),ke.isSubplotConstrained)Rt>$||$t>$?(wt="xy",Rt/be>$t/we?($t=Rt*we/be,ut>Lt?pt.t=ut-$t:pt.b=ut+$t):(Rt=$t*be/we,Je>At?pt.l=Je-Rt:pt.r=Je+Rt),_e.attr("d",Y(pt))):Yt();else if(Ae.isSubplotConstrained)if(Rt>$||$t>$){wt="xy";var Xt=Math.min(pt.l/be,(we-pt.b)/we),Bt=Math.max(pt.r/be,(we-pt.t)/we);pt.l=Xt*be,pt.r=Bt*be,pt.b=(1-Xt)*we,pt.t=(1-Bt)*we,_e.attr("d",Y(pt))}else Yt();else!De||$t0){var Wt;if(Ae.isSubplotConstrained||!Ee&&De.length===1){for(Wt=0;Wt1&&(Lt.maxallowed!==void 0&&Ie===(Lt.range[0]1&&(Rt.maxallowed!==void 0&&Be===(Rt.range[0]P[1]-.000244140625&&(c.domain=m),f.noneOrAll(s.domain,c.domain,m),c.tickmode==="sync"&&(c.tickmode="auto")}return d("layer"),c}},89426:function(o,a,n){var l=n(59652);o.exports=function(f,s,c,d,h){h||(h={});var p=h.tickSuffixDflt,m=l(f);c("tickprefix")&&c("showtickprefix",m),c("ticksuffix",p)&&c("showticksuffix",m)}},23608:function(o,a,n){var l=n(23074);o.exports=function(f,s,c,d){var h=s._template||{},p=s.type||h.type||"-";c("minallowed"),c("maxallowed");var m,y=c("range"),v=s.getAutorangeDflt(y,d),g=c("autorange",v);!y||(y[0]!==null||y[1]!==null)&&(y[0]!==null&&y[1]!==null||g!=="reversed"&&g!==!0)&&(y[0]===null||g!=="min"&&g!=="max reversed")&&(y[1]===null||g!=="max"&&g!=="min reversed")||(y=void 0,delete s.range,s.autorange=!0,m=!0),m||(g=c("autorange",v=s.getAutorangeDflt(y,d))),g&&(l(c,g,y),p!=="linear"&&p!=="-"||c("rangemode")),s.cleanRange()}},42449:function(o,a,n){var l=n(18783).FROM_BL;o.exports=function(f,s,c){c===void 0&&(c=l[f.constraintoward||"center"]);var d=[f.r2l(f.range[0]),f.r2l(f.range[1])],h=d[0]+(d[1]-d[0])*c;f.range=f._input.range=[f.l2r(h+(d[0]-h)*s),f.l2r(h+(d[1]-h)*s)],f.setScale()}},21994:function(o,a,n){var l=n(39898),f=n(84096).g0,s=n(71828),c=s.numberFormat,d=n(92770),h=s.cleanNumber,p=s.ms2DateTime,m=s.dateTime2ms,y=s.ensureNumber,v=s.isArrayOrTypedArray,g=n(50606),b=g.FP_SAFE,x=g.BADNUM,_=g.LOG_CLIP,w=g.ONEWEEK,k=g.ONEDAY,T=g.ONEHOUR,M=g.ONEMIN,S=g.ONESEC,C=n(41675),P=n(85555),D=P.HOUR_PATTERN,O=P.WEEKDAY_PATTERN;function R(A){return Math.pow(10,A)}function F(A){return A!=null}o.exports=function(A,z){z=z||{};var B=A._id||"x",$=B.charAt(0);function j(Z,X){if(Z>0)return Math.log(Z)/Math.LN10;if(Z<=0&&X&&A.range&&A.range.length===2){var re=A.range[0],ie=A.range[1];return .5*(re+ie-2*_*Math.abs(re-ie))}return x}function N(Z,X,re,ie){if((ie||{}).msUTC&&d(Z))return+Z;var le=m(Z,re||A.calendar);if(le===x){if(!d(Z))return x;Z=+Z;var se=Math.floor(10*s.mod(Z+.05,1)),pe=Math.round(Z-se/10);le=m(new Date(pe))+se/10}return le}function E(Z,X,re){return p(Z,X,re||A.calendar)}function W(Z){return A._categories[Math.round(Z)]}function G(Z){if(F(Z)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[Z]!==void 0)return A._categoriesMap[Z];A._categories.push(typeof Z=="number"?String(Z):Z);var X=A._categories.length-1;return A._categoriesMap[Z]=X,X}return x}function L(Z){if(A._categoriesMap)return A._categoriesMap[Z]}function q(Z){var X=L(Z);return X!==void 0?X:d(Z)?+Z:void 0}function H(Z){return d(Z)?+Z:L(Z)}function V(Z,X,re){return l.round(re+X*Z,2)}function te(Z,X,re){return(Z-re)/X}var ee=function(Z){return d(Z)?V(Z,A._m,A._b):x},U=function(Z){return te(Z,A._m,A._b)};if(A.rangebreaks){var Q=$==="y";ee=function(Z){if(!d(Z))return x;var X=A._rangebreaks.length;if(!X)return V(Z,A._m,A._b);var re=Q;A.range[0]>A.range[1]&&(re=!re);for(var ie=re?-1:1,le=ie*Z,se=0,pe=0;peSe)){se=le<(Te+Se)/2?pe:pe+1;break}se=pe+1}var Oe=A._B[se]||0;return isFinite(Oe)?V(Z,A._m2,Oe):0},U=function(Z){var X=A._rangebreaks.length;if(!X)return te(Z,A._m,A._b);for(var re=0,ie=0;ieA._rangebreaks[ie].pmax&&(re=ie+1);return te(Z,A._m2,A._B[re])}}A.c2l=A.type==="log"?j:y,A.l2c=A.type==="log"?R:y,A.l2p=ee,A.p2l=U,A.c2p=A.type==="log"?function(Z,X){return ee(j(Z,X))}:ee,A.p2c=A.type==="log"?function(Z){return R(U(Z))}:U,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=h,A.c2d=A.c2r=A.l2d=A.l2r=y,A.d2p=A.r2p=function(Z){return A.l2p(h(Z))},A.p2d=A.p2r=U,A.cleanPos=y):A.type==="log"?(A.d2r=A.d2l=function(Z,X){return j(h(Z),X)},A.r2d=A.r2c=function(Z){return R(h(Z))},A.d2c=A.r2l=h,A.c2d=A.l2r=y,A.c2r=j,A.l2d=R,A.d2p=function(Z,X){return A.l2p(A.d2r(Z,X))},A.p2d=function(Z){return R(U(Z))},A.r2p=function(Z){return A.l2p(h(Z))},A.p2r=U,A.cleanPos=y):A.type==="date"?(A.d2r=A.r2d=s.identity,A.d2c=A.r2c=A.d2l=A.r2l=N,A.c2d=A.c2r=A.l2d=A.l2r=E,A.d2p=A.r2p=function(Z,X,re){return A.l2p(N(Z,0,re))},A.p2d=A.p2r=function(Z,X,re){return E(U(Z),X,re)},A.cleanPos=function(Z){return s.cleanDate(Z,x,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=G,A.r2d=A.c2d=A.l2d=W,A.d2r=A.d2l_noadd=q,A.r2c=function(Z){var X=H(Z);return X!==void 0?X:A.fraction2r(.5)},A.l2r=A.c2r=y,A.r2l=H,A.d2p=function(Z){return A.l2p(A.r2c(Z))},A.p2d=function(Z){return W(U(Z))},A.r2p=A.d2p,A.p2r=U,A.cleanPos=function(Z){return typeof Z=="string"&&Z!==""?Z:y(Z)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=W,A.d2r=A.d2l_noadd=q,A.r2c=function(Z){var X=q(Z);return X!==void 0?X:A.fraction2r(.5)},A.r2c_just_indices=L,A.l2r=A.c2r=y,A.r2l=q,A.d2p=function(Z){return A.l2p(A.r2c(Z))},A.p2d=function(Z){return W(U(Z))},A.r2p=A.d2p,A.p2r=U,A.cleanPos=function(Z){return Array.isArray(Z)||typeof Z=="string"&&Z!==""?Z:y(Z)},A.setupMultiCategory=function(Z){var X,re,ie=A._traceIndices,le=A._matchGroup;if(le&&A._categories.length===0){for(var se in le)if(se!==B){var pe=z[C.id2name(se)];ie=ie.concat(pe._traceIndices)}}var Te=[[0,{}],[0,{}]],Se=[];for(X=0;Xpe[1]&&(ie[se?0:1]=re)}},A.cleanRange=function(Z,X){A._cleanRange(Z,X),A.limitRange(Z)},A._cleanRange=function(Z,X){X||(X={}),Z||(Z="range");var re,ie,le=s.nestedProperty(A,Z).get();if(ie=(ie=A.type==="date"?s.dfltRange(A.calendar):$==="y"?P.DFLTRANGEY:A._name==="realaxis"?[0,1]:X.dfltRange||P.DFLTRANGEX).slice(),A.rangemode!=="tozero"&&A.rangemode!=="nonnegative"||(ie[0]=0),le&&le.length===2){var se=le[0]===null,pe=le[1]===null;for(A.type!=="date"||A.autorange||(le[0]=s.cleanDate(le[0],x,A.calendar),le[1]=s.cleanDate(le[1],x,A.calendar)),re=0;re<2;re++)if(A.type==="date"){if(!s.isDateTime(le[re],A.calendar)){A[Z]=ie;break}if(A.r2l(le[0])===A.r2l(le[1])){var Te=s.constrain(A.r2l(le[0]),s.MIN_MS+1e3,s.MAX_MS-1e3);le[0]=A.l2r(Te-1e3),le[1]=A.l2r(Te+1e3);break}}else{if(!d(le[re])){if(se||pe||!d(le[1-re])){A[Z]=ie;break}le[re]=le[1-re]*(re?10:.1)}if(le[re]<-b?le[re]=-b:le[re]>b&&(le[re]=b),le[0]===le[1]){var Se=Math.max(1,Math.abs(1e-6*le[0]));le[0]-=Se,le[1]+=Se}}}else s.nestedProperty(A,Z).set(ie)},A.setScale=function(Z){var X=z._size;if(A.overlaying){var re=C.getFromId({_fullLayout:z},A.overlaying);A.domain=re.domain}var ie=Z&&A._r?"_r":"range",le=A.calendar;A.cleanRange(ie);var se,pe,Te=A.r2l(A[ie][0],le),Se=A.r2l(A[ie][1],le),Oe=$==="y";if(Oe?(A._offset=X.t+(1-A.domain[1])*X.h,A._length=X.h*(A.domain[1]-A.domain[0]),A._m=A._length/(Te-Se),A._b=-A._m*Se):(A._offset=X.l+A.domain[0]*X.w,A._length=X.w*(A.domain[1]-A.domain[0]),A._m=A._length/(Se-Te),A._b=-A._m*Te),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks&&(A._rangebreaks=A.locateBreaks(Math.min(Te,Se),Math.max(Te,Se)),A._rangebreaks.length)){for(se=0;seSe&&(Me=!Me),Me&&A._rangebreaks.reverse();var ce=Me?-1:1;for(A._m2=ce*A._length/(Math.abs(Se-Te)-A._lBreaks),A._B.push(-A._m2*(Oe?Se:Te)),se=0;seie&&(ie+=7,leie&&(ie+=24,le=re&&le=re&&Z=Ae.min&&(geAe.max&&(Ae.max=be),we=!1)}we&&pe.push({min:ge,max:be})}};for(re=0;rem.duration?(function(){for(var D={},O=0;O rect").call(c.setTranslate,0,0).call(c.setScale,1,1),M.plot.call(c.setTranslate,S._offset,C._offset).call(c.setScale,1,1);var P=M.plot.selectAll(".scatterlayer .trace");P.selectAll(".point").call(c.setPointGroupScale,1,1),P.selectAll(".textpoint").call(c.setTextPointsScale,1,1),P.call(c.hideOutsideRangePoints,M)}function T(M,S){var C=M.plotinfo,P=C.xaxis,D=C.yaxis,O=P._length,R=D._length,F=!!M.xr1,A=!!M.yr1,z=[];if(F){var B=s.simpleMap(M.xr0,P.r2l),$=s.simpleMap(M.xr1,P.r2l),j=B[1]-B[0],N=$[1]-$[0];z[0]=(B[0]*(1-S)+S*$[0]-B[0])/(B[1]-B[0])*O,z[2]=O*(1-S+S*N/j),P.range[0]=P.l2r(B[0]*(1-S)+S*$[0]),P.range[1]=P.l2r(B[1]*(1-S)+S*$[1])}else z[0]=0,z[2]=O;if(A){var E=s.simpleMap(M.yr0,D.r2l),W=s.simpleMap(M.yr1,D.r2l),G=E[1]-E[0],L=W[1]-W[0];z[1]=(E[1]*(1-S)+S*W[1]-E[1])/(E[0]-E[1])*R,z[3]=R*(1-S+S*L/G),D.range[0]=P.l2r(E[0]*(1-S)+S*W[0]),D.range[1]=D.l2r(E[1]*(1-S)+S*W[1])}else z[1]=0,z[3]=R;d.drawOne(h,P,{skipTitle:!0}),d.drawOne(h,D,{skipTitle:!0}),d.redrawComponents(h,[P._id,D._id]);var q=F?O/z[2]:1,H=A?R/z[3]:1,V=F?z[0]:0,te=A?z[1]:0,ee=F?z[0]/z[2]*O:0,U=A?z[1]/z[3]*R:0,Q=P._offset-ee,Y=D._offset-U;C.clipRect.call(c.setTranslate,V,te).call(c.setScale,1/q,1/H),C.plot.call(c.setTranslate,Q,Y).call(c.setScale,q,H),c.setPointGroupScale(C.zoomScalePts,1/q,1/H),c.setTextPointsScale(C.zoomScaleTxt,1/q,1/H)}d.redrawComponents(h)}},951:function(o,a,n){var l=n(73972).traceIs,f=n(4322);function s(d){return{v:"x",h:"y"}[d.orientation||"v"]}function c(d,h){var p=s(d),m=l(d,"box-violin"),y=l(d._fullInput||{},"candlestick");return m&&!y&&h===p&&d[p]===void 0&&d[p+"0"]===void 0}o.exports=function(d,h,p,m){p("autotypenumbers",m.autotypenumbersDflt),p("type",(m.splomStash||{}).type)==="-"&&(function(y,v){if(y.type==="-"){var g,b=y._id,x=b.charAt(0);b.indexOf("scene")!==-1&&(b=x);var _=function(D,O,R){for(var F=0;F0&&(A["_"+R+"axes"]||{})[O]||(A[R+"axis"]||R)===O&&(c(A,R)||(A[R]||[]).length||A[R+"0"]))return A}}(v,b,x);if(_)if(_.type!=="histogram"||x!=={v:"y",h:"x"}[_.orientation||"v"]){var w=x+"calendar",k=_[w],T={noMultiCategory:!l(_,"cartesian")||l(_,"noMultiCategory")};if(_.type==="box"&&_._hasPreCompStats&&x==={h:"x",v:"y"}[_.orientation||"v"]&&(T.noMultiCategory=!0),T.autotypenumbers=y.autotypenumbers,c(_,x)){var M=s(_),S=[];for(g=0;g0?".":"")+g;f.isPlainObject(b)?h(b,m,x,v+1):m(x,g,b)}})}a.manageCommandObserver=function(p,m,y,v){var g={},b=!0;m&&m._commandObserver&&(g=m._commandObserver),g.cache||(g.cache={}),g.lookupTable={};var x=a.hasSimpleAPICommandBindings(p,y,g.lookupTable);if(m&&m._commandObserver){if(x)return g;if(m._commandObserver.remove)return m._commandObserver.remove(),m._commandObserver=null,g}if(x){s(p,x,g.cache),g.check=function(){if(b){var k=s(p,x,g.cache);return k.changed&&v&&g.lookupTable[k.value]!==void 0&&(g.disable(),Promise.resolve(v({value:k.value,type:x.type,prop:x.prop,traces:x.traces,index:g.lookupTable[k.value]})).then(g.enable,g.enable)),k.changed}};for(var _=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],w=0;w<_.length;w++)p._internalOn(_[w],g.check);g.remove=function(){for(var k=0;k<_.length;k++)p._removeInternalListener(_[k],g.check)}}else f.log("Unable to automatically bind plot updates to API command"),g.lookupTable={},g.remove=function(){};return g.disable=function(){b=!1},g.enable=function(){b=!0},m&&(m._commandObserver=g),g},a.hasSimpleAPICommandBindings=function(p,m,y){var v,g,b=m.length;for(v=0;v=q.width-20?(te["text-anchor"]="start",te.x=5):(te["text-anchor"]="end",te.x=q._paper.attr("width")-7),H.attr(te);var ee=H.select(".js-link-to-tool"),U=H.select(".js-link-spacer"),Q=H.select(".js-sourcelinks");L._context.showSources&&L._context.showSources(L),L._context.showLink&&function(Y,Z){Z.text("");var X=Z.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(Y._context.linkText+" »");if(Y._context.sendData)X.on("click",function(){S.sendDataToCloud(Y)});else{var re=window.location.pathname.split("/"),ie=window.location.search;X.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+re[2].split(".")[0]+"/"+re[1]+ie})}}(L,ee),U.text(ee.text()&&Q.text()?" - ":"")}},S.sendDataToCloud=function(L){var q=(window.PLOTLYENV||{}).BASE_URL||L._context.plotlyServerURL;if(q){L.emit("plotly_beforeexport");var H=l.select(L).append("div").attr("id","hiddenform").style("display","none"),V=H.append("form").attr({action:q+"/external",method:"post",target:"_blank"});return V.append("input").attr({type:"text",name:"data"}).node().value=S.graphJson(L,!1,"keepdata"),V.node().submit(),H.remove(),L.emit("plotly_afterexport"),!1}};var D=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],O=["year","month","dayMonth","dayMonthYear"];function R(L,q){var H=L._context.locale;H||(H="en-US");var V=!1,te={};function ee(re){for(var ie=!0,le=0;le1&&J.length>1){for(d.getComponentMethod("grid","sizeDefaults")(U,ee),te=0;te15&&J.length>15&&ee.shapes.length===0&&ee.images.length===0,S.linkSubplots(Y,ee,Q,V),S.cleanPlot(Y,ee,Q,V);var ge=!(!V._has||!V._has("gl2d")),be=!(!ee._has||!ee._has("gl2d")),we=!(!V._has||!V._has("cartesian"))||ge,ke=!(!ee._has||!ee._has("cartesian"))||be;we&&!ke?V._bgLayer.remove():ke&&!we&&(ee._shouldCreateBgLayer=!0),V._zoomlayer&&!L._dragging&&b({_fullLayout:V}),function(Re,Ie){var Be,Ue=[];Ie.meta&&(Be=Ie._meta={meta:Ie.meta,layout:{meta:Ie.meta}});for(var qe=0;qe0){var Z=1-2*U;V=Math.round(Z*V),te=Math.round(Z*te)}}var X=S.layoutAttributes.width.min,re=S.layoutAttributes.height.min;V1,le=!q.height&&Math.abs(H.height-te)>1;(le||ie)&&(ie&&(H.width=V),le&&(H.height=te)),L._initialAutoSize||(L._initialAutoSize={width:V,height:te}),S.sanitizeMargins(H)},S.supplyLayoutModuleDefaults=function(L,q,H,V){var te,ee,U,Q=d.componentsRegistry,Y=q._basePlotModules,Z=d.subplotsRegistry.cartesian;for(te in Q)(U=Q[te]).includeBasePlot&&U.includeBasePlot(L,q);for(var X in Y.length||Y.push(Z),q._has("cartesian")&&(d.getComponentMethod("grid","contentDefaults")(L,q),Z.finalizeSubplots(L,q)),q._subplots)q._subplots[X].sort(m.subplotSort);for(ee=0;ee1&&(H.l/=Te,H.r/=Te)}if(ie){var Se=(H.t+H.b)/ie;Se>1&&(H.t/=Se,H.b/=Se)}var Oe=H.xl!==void 0?H.xl:H.x,Me=H.xr!==void 0?H.xr:H.x,ce=H.yt!==void 0?H.yt:H.y,ye=H.yb!==void 0?H.yb:H.y;le[q]={l:{val:Oe,size:H.l+pe},r:{val:Me,size:H.r+pe},b:{val:ye,size:H.b+pe},t:{val:ce,size:H.t+pe}},se[q]=1}else delete le[q],delete se[q];if(!V._replotting)return S.doAutoMargin(L)}},S.doAutoMargin=function(L){var q=L._fullLayout,H=q.width,V=q.height;q._size||(q._size={}),$(q);var te=q._size,ee=q.margin,U={t:0,b:0,l:0,r:0},Q=m.extendFlat({},te),Y=ee.l,Z=ee.r,X=ee.t,re=ee.b,ie=q._pushmargin,le=q._pushmarginIds,se=q.minreducedwidth,pe=q.minreducedheight;if(ee.autoexpand!==!1){for(var Te in ie)le[Te]||delete ie[Te];var Se=L._fullLayout._reservedMargin;for(var Oe in Se)for(var Me in Se[Oe]){var ce=Se[Oe][Me];U[Me]=Math.max(U[Me],ce)}for(var ye in ie.base={l:{val:0,size:Y},r:{val:1,size:Z},t:{val:1,size:X},b:{val:0,size:re}},U){var J=0;for(var ne in ie)ne!=="base"&&c(ie[ne][ye].size)&&(J=ie[ne][ye].size>J?ie[ne][ye].size:J);var de=Math.max(0,ee[ye]-J);U[ye]=Math.max(0,U[ye]-de)}for(var xe in ie){var ue=ie[xe].l||{},ge=ie[xe].b||{},be=ue.val,we=ue.size,ke=ge.val,Ae=ge.size,Ee=H-U.r-U.l,De=V-U.t-U.b;for(var Re in ie){if(c(we)&&ie[Re].r){var Ie=ie[Re].r.val,Be=ie[Re].r.size;if(Ie>be){var Ue=(we*Ie+(Be-Ee)*be)/(Ie-be),qe=(Be*(1-be)+(we-Ee)*(1-Ie))/(Ie-be);Ue+qe>Y+Z&&(Y=Ue,Z=qe)}}if(c(Ae)&&ie[Re].t){var Ye=ie[Re].t.val,at=ie[Re].t.size;if(Ye>ke){var lt=(Ae*Ye+(at-De)*ke)/(Ye-ke),ct=(at*(1-ke)+(Ae-De)*(1-Ye))/(Ye-ke);lt+ct>re+X&&(re=lt,X=ct)}}}}}var bt=m.constrain(H-ee.l-ee.r,2,se),ze=m.constrain(V-ee.t-ee.b,2,pe),Ne=Math.max(0,H-bt),Qe=Math.max(0,V-ze);if(Ne){var it=(Y+Z)/Ne;it>1&&(Y/=it,Z/=it)}if(Qe){var kt=(re+X)/Qe;kt>1&&(re/=kt,X/=kt)}if(te.l=Math.round(Y)+U.l,te.r=Math.round(Z)+U.r,te.t=Math.round(X)+U.t,te.b=Math.round(re)+U.b,te.p=Math.round(ee.pad),te.w=Math.round(H)-te.l-te.r,te.h=Math.round(V)-te.t-te.b,!q._replotting&&(S.didMarginChange(Q,te)||function(ut){if("_redrawFromAutoMarginCount"in ut._fullLayout)return!1;var pt=g.list(ut,"",!0);for(var It in pt)if(pt[It].autoshift||pt[It].shift)return!0;return!1}(L))){"_redrawFromAutoMarginCount"in q?q._redrawFromAutoMarginCount++:q._redrawFromAutoMarginCount=1;var Je=3*(1+Object.keys(le).length);if(q._redrawFromAutoMarginCount0&&(L._transitioningWithDuration=!0),L._transitionData._interruptCallbacks.push(function(){V=!0}),H.redraw&&L._transitionData._interruptCallbacks.push(function(){return d.call("redraw",L)}),L._transitionData._interruptCallbacks.push(function(){L.emit("plotly_transitioninterrupted",[])});var Q=0,Y=0;function Z(){return Q++,function(){var X;Y++,V||Y!==Q||(X=U,L._transitionData&&(function(re){if(re)for(;re.length;)re.shift()}(L._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(H.redraw)return d.call("redraw",L)}).then(function(){L._transitioning=!1,L._transitioningWithDuration=!1,L.emit("plotly_transitioned",[])}).then(X)))}}H.runFn(Z),setTimeout(Z())})}],ee=m.syncOrAsync(te,L);return ee&&ee.then||(ee=Promise.resolve()),ee.then(function(){return L})}S.didMarginChange=function(L,q){for(var H=0;H1)return!0}return!1},S.graphJson=function(L,q,H,V,te,ee){(te&&q&&!L._fullData||te&&!q&&!L._fullLayout)&&S.supplyDefaults(L);var U=te?L._fullData:L.data,Q=te?L._fullLayout:L.layout,Y=(L._transitionData||{})._frames;function Z(ie,le){if(typeof ie=="function")return le?"_function_":null;if(m.isPlainObject(ie)){var se,pe={};return Object.keys(ie).sort().forEach(function(Te){if(["_","["].indexOf(Te.charAt(0))===-1)if(typeof ie[Te]!="function"){if(H==="keepdata"){if(Te.substr(Te.length-3)==="src")return}else if(H==="keepstream"){if(typeof(se=ie[Te+"src"])=="string"&&se.indexOf(":")>0&&!m.isPlainObject(ie.stream))return}else if(H!=="keepall"&&typeof(se=ie[Te+"src"])=="string"&&se.indexOf(":")>0)return;pe[Te]=Z(ie[Te],le)}else le&&(pe[Te]="_function")}),pe}return Array.isArray(ie)?ie.map(function(Te){return Z(Te,le)}):m.isTypedArray(ie)?m.simpleMap(ie,m.identity):m.isJSDate(ie)?m.ms2DateTimeLocal(+ie):ie}var X={data:(U||[]).map(function(ie){var le=Z(ie);return q&&delete le.fit,le})};if(!q&&(X.layout=Z(Q),te)){var re=Q._size;X.layout.computed={margin:{b:re.b,l:re.l,r:re.r,t:re.t}}}return Y&&(X.frames=Z(Y)),ee&&(X.config=Z(L._context,!0)),V==="object"?X:JSON.stringify(X)},S.modifyFrames=function(L,q){var H,V,te,ee=L._transitionData._frames,U=L._transitionData._frameHash;for(H=0;H=0;ee--)if(ye[ee].enabled){H._indexToPoints=ye[ee]._indexToPoints;break}V&&V.calc&&(ce=V.calc(L,H))}Array.isArray(ce)&&ce[0]||(ce=[{x:v,y:v}]),ce[0].t||(ce[0].t={}),ce[0].trace=H,Z[Oe]=ce}}for(W(U,Q,Y),te=0;te0){for(var h=[],p=0;p=D&&(R.min=0,F.min=0,A.min=0,_.aaxis&&delete _.aaxis.min,_.baxis&&delete _.baxis.min,_.caxis&&delete _.caxis.min)}function x(_,w,k,T){var M=v[w._name];function S(F,A){return s.coerce(_,w,M,F,A)}S("uirevision",T.uirevision),w.type="linear";var C=S("color"),P=C!==M.color.dflt?C:k.font.color,D=w._name.charAt(0).toUpperCase(),O="Component "+D,R=S("title.text",O);w._hovertitle=R===O?R:D,s.coerceFont(S,"title.font",{family:k.font.family,size:s.bigFont(k.font.size),color:P}),S("min"),m(_,w,S,"linear"),h(_,w,S,"linear"),d(_,w,S,"linear"),p(_,w,S,{outerTicks:!0}),S("showticklabels")&&(s.coerceFont(S,"tickfont",{family:k.font.family,size:k.font.size,color:P}),S("tickangle"),S("tickformat")),y(_,w,S,{dfltColor:C,bgColor:k.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:M}),S("hoverformat"),S("layer")}o.exports=function(_,w,k){c(_,w,k,{type:"ternary",attributes:v,handleDefaults:b,font:w.font,paper_bgcolor:w.paper_bgcolor})}},64380:function(o,a,n){var l=n(39898),f=n(84267),s=n(73972),c=n(71828),d=c.strTranslate,h=c._,p=n(7901),m=n(91424),y=n(21994),v=n(1426).extendFlat,g=n(74875),b=n(89298),x=n(28569),_=n(30211),w=n(64505),k=w.freeMode,T=w.rectMode,M=n(92998),S=n(47322).prepSelect,C=n(47322).selectOnClick,P=n(47322).clearOutline,D=n(47322).clearSelectionsCache,O=n(85555);function R(W,G){this.id=W.id,this.graphDiv=W.graphDiv,this.init(G),this.makeFramework(G),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}o.exports=R;var F=R.prototype;F.init=function(W){this.container=W._ternarylayer,this.defs=W._defs,this.layoutId=W._uid,this.traceHash={},this.layers={}},F.plot=function(W,G){var L=this,q=G[L.id],H=G._size;L._hasClipOnAxisFalse=!1;for(var V=0;VA*le?H=(V=le)*A:V=(H=ie)/A,te=X*H/ie,ee=re*V/le,L=G.l+G.w*Y-H/2,q=G.t+G.h*(1-Z)-V/2,U.x0=L,U.y0=q,U.w=H,U.h=V,U.sum=se,U.xaxis={type:"linear",range:[pe+2*Se-se,se-pe-2*Te],domain:[Y-te/2,Y+te/2],_id:"x"},y(U.xaxis,U.graphDiv._fullLayout),U.xaxis.setScale(),U.xaxis.isPtWithinRange=function(be){return be.a>=U.aaxis.range[0]&&be.a<=U.aaxis.range[1]&&be.b>=U.baxis.range[1]&&be.b<=U.baxis.range[0]&&be.c>=U.caxis.range[1]&&be.c<=U.caxis.range[0]},U.yaxis={type:"linear",range:[pe,se-Te-Se],domain:[Z-ee/2,Z+ee/2],_id:"y"},y(U.yaxis,U.graphDiv._fullLayout),U.yaxis.setScale(),U.yaxis.isPtWithinRange=function(){return!0};var Oe=U.yaxis.domain[0],Me=U.aaxis=v({},W.aaxis,{range:[pe,se-Te-Se],side:"left",tickangle:(+W.aaxis.tickangle||0)-30,domain:[Oe,Oe+ee*A],anchor:"free",position:0,_id:"y",_length:H});y(Me,U.graphDiv._fullLayout),Me.setScale();var ce=U.baxis=v({},W.baxis,{range:[se-pe-Se,Te],side:"bottom",domain:U.xaxis.domain,anchor:"free",position:0,_id:"x",_length:H});y(ce,U.graphDiv._fullLayout),ce.setScale();var ye=U.caxis=v({},W.caxis,{range:[se-pe-Te,Se],side:"right",tickangle:(+W.caxis.tickangle||0)+30,domain:[Oe,Oe+ee*A],anchor:"free",position:0,_id:"y",_length:H});y(ye,U.graphDiv._fullLayout),ye.setScale();var J="M"+L+","+(q+V)+"h"+H+"l-"+H/2+",-"+V+"Z";U.clipDef.select("path").attr("d",J),U.layers.plotbg.select("path").attr("d",J);var ne="M0,"+V+"h"+H+"l-"+H/2+",-"+V+"Z";U.clipDefRelative.select("path").attr("d",ne);var de=d(L,q);U.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",de),U.clipDefRelative.select("path").attr("transform",null);var xe=d(L-ce._offset,q+V);U.layers.baxis.attr("transform",xe),U.layers.bgrid.attr("transform",xe);var ue=d(L+H/2,q)+"rotate(30)"+d(0,-Me._offset);U.layers.aaxis.attr("transform",ue),U.layers.agrid.attr("transform",ue);var ge=d(L+H/2,q)+"rotate(-30)"+d(0,-ye._offset);U.layers.caxis.attr("transform",ge),U.layers.cgrid.attr("transform",ge),U.drawAxes(!0),U.layers.aline.select("path").attr("d",Me.showline?"M"+L+","+(q+V)+"l"+H/2+",-"+V:"M0,0").call(p.stroke,Me.linecolor||"#000").style("stroke-width",(Me.linewidth||0)+"px"),U.layers.bline.select("path").attr("d",ce.showline?"M"+L+","+(q+V)+"h"+H:"M0,0").call(p.stroke,ce.linecolor||"#000").style("stroke-width",(ce.linewidth||0)+"px"),U.layers.cline.select("path").attr("d",ye.showline?"M"+(L+H/2)+","+q+"l"+H/2+","+V:"M0,0").call(p.stroke,ye.linecolor||"#000").style("stroke-width",(ye.linewidth||0)+"px"),U.graphDiv._context.staticPlot||U.initInteractions(),m.setClipUrl(U.layers.frontplot,U._hasClipOnAxisFalse?null:U.clipId,U.graphDiv)},F.drawAxes=function(W){var G=this,L=G.graphDiv,q=G.id.substr(7)+"title",H=G.layers,V=G.aaxis,te=G.baxis,ee=G.caxis;if(G.drawAx(V),G.drawAx(te),G.drawAx(ee),W){var U=Math.max(V.showticklabels?V.tickfont.size/2:0,(ee.showticklabels?.75*ee.tickfont.size:0)+(ee.ticks==="outside"?.87*ee.ticklen:0)),Q=(te.showticklabels?te.tickfont.size:0)+(te.ticks==="outside"?te.ticklen:0)+3;H["a-title"]=M.draw(L,"a"+q,{propContainer:V,propName:G.id+".aaxis.title",placeholder:h(L,"Click to enter Component A title"),attributes:{x:G.x0+G.w/2,y:G.y0-V.title.font.size/3-U,"text-anchor":"middle"}}),H["b-title"]=M.draw(L,"b"+q,{propContainer:te,propName:G.id+".baxis.title",placeholder:h(L,"Click to enter Component B title"),attributes:{x:G.x0-Q,y:G.y0+G.h+.83*te.title.font.size+Q,"text-anchor":"middle"}}),H["c-title"]=M.draw(L,"c"+q,{propContainer:ee,propName:G.id+".caxis.title",placeholder:h(L,"Click to enter Component C title"),attributes:{x:G.x0+G.w+Q,y:G.y0+G.h+.83*ee.title.font.size+Q,"text-anchor":"middle"}})}},F.drawAx=function(W){var G,L=this,q=L.graphDiv,H=W._name,V=H.charAt(0),te=W._id,ee=L.layers[H],U=V+"tickLayout",Q=(G=W).ticks+String(G.ticklen)+String(G.showticklabels);L[U]!==Q&&(ee.selectAll("."+te+"tick").remove(),L[U]=Q),W.setScale();var Y=b.calcTicks(W),Z=b.clipEnds(W,Y),X=b.makeTransTickFn(W),re=b.getTickSigns(W)[2],ie=c.deg2rad(30),le=re*(W.linewidth||1)/2,se=re*W.ticklen,pe=L.w,Te=L.h,Se=V==="b"?"M0,"+le+"l"+Math.sin(ie)*se+","+Math.cos(ie)*se:"M"+le+",0l"+Math.cos(ie)*se+","+-Math.sin(ie)*se,Oe={a:"M0,0l"+Te+",-"+pe/2,b:"M0,0l-"+pe/2+",-"+Te,c:"M0,0l-"+Te+","+pe/2}[V];b.drawTicks(q,W,{vals:W.ticks==="inside"?Z:Y,layer:ee,path:Se,transFn:X,crisp:!1}),b.drawGrid(q,W,{vals:Z,layer:L.layers[V+"grid"],path:Oe,transFn:X,crisp:!1}),b.drawLabels(q,W,{vals:Y,layer:ee,transFn:X,labelFns:b.makeLabelFns(W,0,30)})};var z=O.MINZOOM/2+.87,B="m-0.87,.5h"+z+"v3h-"+(z+5.2)+"l"+(z/2+2.6)+",-"+(.87*z+4.5)+"l2.6,1.5l-"+z/2+","+.87*z+"Z",$="m0.87,.5h-"+z+"v3h"+(z+5.2)+"l-"+(z/2+2.6)+",-"+(.87*z+4.5)+"l-2.6,1.5l"+z/2+","+.87*z+"Z",j="m0,1l"+z/2+","+.87*z+"l2.6,-1.5l-"+(z/2+2.6)+",-"+(.87*z+4.5)+"l-"+(z/2+2.6)+","+(.87*z+4.5)+"l2.6,1.5l"+z/2+",-"+.87*z+"Z",N=!0;function E(W){l.select(W).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}F.clearOutline=function(){D(this.dragOptions),P(this.dragOptions.gd)},F.initInteractions=function(){var W,G,L,q,H,V,te,ee,U,Q,Y,Z,X=this,re=X.layers.plotbg.select("path").node(),ie=X.graphDiv,le=ie._fullLayout._zoomlayer;function se(ne){var de={};return de[X.id+".aaxis.min"]=ne.a,de[X.id+".baxis.min"]=ne.b,de[X.id+".caxis.min"]=ne.c,de}function pe(ne,de){var xe=ie._fullLayout.clickmode;E(ie),ne===2&&(ie.emit("plotly_doubleclick",null),s.call("_guiRelayout",ie,se({a:0,b:0,c:0}))),xe.indexOf("select")>-1&&ne===1&&C(de,ie,[X.xaxis],[X.yaxis],X.id,X.dragOptions),xe.indexOf("event")>-1&&_.click(ie,de,X.id)}function Te(ne,de){return 1-de/X.h}function Se(ne,de){return 1-(ne+(X.h-de)/Math.sqrt(3))/X.w}function Oe(ne,de){return(ne-(X.h-de)/Math.sqrt(3))/X.w}function Me(ne,de){var xe=L+ne*W,ue=q+de*G,ge=Math.max(0,Math.min(1,Te(0,q),Te(0,ue))),be=Math.max(0,Math.min(1,Se(L,q),Se(xe,ue))),we=Math.max(0,Math.min(1,Oe(L,q),Oe(xe,ue))),ke=(ge/2+we)*X.w,Ae=(1-ge/2-be)*X.w,Ee=(ke+Ae)/2,De=Ae-ke,Re=(1-ge)*X.h,Ie=Re-De/A;De.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Z.transition().style("opacity",1).duration(200),Q=!0),ie.emit("plotly_relayouting",se(te))}function ce(){E(ie),te!==H&&(s.call("_guiRelayout",ie,se(te)),N&&ie.data&&ie._context.showTips&&(c.notifier(h(ie,"Double-click to zoom back out"),"long"),N=!1))}function ye(ne,de){var xe=ne/X.xaxis._m,ue=de/X.yaxis._m,ge=[(te={a:H.a-ue,b:H.b+(xe+ue)/2,c:H.c-(xe-ue)/2}).a,te.b,te.c].sort(c.sorterAsc),be=ge.indexOf(te.a),we=ge.indexOf(te.b),ke=ge.indexOf(te.c);ge[0]<0&&(ge[1]+ge[0]/2<0?(ge[2]+=ge[0]+ge[1],ge[0]=ge[1]=0):(ge[2]+=ge[0]/2,ge[1]+=ge[0]/2,ge[0]=0),te={a:ge[be],b:ge[we],c:ge[ke]},de=(H.a-te.a)*X.yaxis._m,ne=(H.c-te.c-H.b+te.b)*X.xaxis._m);var Ae=d(X.x0+ne,X.y0+de);X.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ae);var Ee=d(-ne,-de);X.clipDefRelative.select("path").attr("transform",Ee),X.aaxis.range=[te.a,X.sum-te.b-te.c],X.baxis.range=[X.sum-te.a-te.c,te.b],X.caxis.range=[X.sum-te.a-te.b,te.c],X.drawAxes(!1),X._hasClipOnAxisFalse&&X.plotContainer.select(".scatterlayer").selectAll(".trace").call(m.hideOutsideRangePoints,X),ie.emit("plotly_relayouting",se(te))}function J(){s.call("_guiRelayout",ie,se(te))}this.dragOptions={element:re,gd:ie,plotinfo:{id:X.id,domain:ie._fullLayout[X.id].domain,xaxis:X.xaxis,yaxis:X.yaxis},subplot:X.id,prepFn:function(ne,de,xe){X.dragOptions.xaxes=[X.xaxis],X.dragOptions.yaxes=[X.yaxis],W=ie._fullLayout._invScaleX,G=ie._fullLayout._invScaleY;var ue=X.dragOptions.dragmode=ie._fullLayout.dragmode;k(ue)?X.dragOptions.minDrag=1:X.dragOptions.minDrag=void 0,ue==="zoom"?(X.dragOptions.moveFn=Me,X.dragOptions.clickFn=pe,X.dragOptions.doneFn=ce,function(ge,be,we){var ke=re.getBoundingClientRect();L=be-ke.left,q=we-ke.top,ie._fullLayout._calcInverseTransform(ie);var Ae=ie._fullLayout._invTransform,Ee=c.apply3DTransform(Ae)(L,q);L=Ee[0],q=Ee[1],H={a:X.aaxis.range[0],b:X.baxis.range[1],c:X.caxis.range[1]},te=H,V=X.aaxis.range[1]-H.a,ee=f(X.graphDiv._fullLayout[X.id].bgcolor).getLuminance(),U="M0,"+X.h+"L"+X.w/2+", 0L"+X.w+","+X.h+"Z",Q=!1,Y=le.append("path").attr("class","zoombox").attr("transform",d(X.x0,X.y0)).style({fill:ee>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",U),Z=le.append("path").attr("class","zoombox-corners").attr("transform",d(X.x0,X.y0)).style({fill:p.background,stroke:p.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),X.clearOutline(ie)}(0,de,xe)):ue==="pan"?(X.dragOptions.moveFn=ye,X.dragOptions.clickFn=pe,X.dragOptions.doneFn=J,H={a:X.aaxis.range[0],b:X.baxis.range[1],c:X.caxis.range[1]},te=H,X.clearOutline(ie)):(T(ue)||k(ue))&&S(ne,de,xe,X.dragOptions,ue)}},re.onmousemove=function(ne){_.hover(ie,ne,X.id),ie._fullLayout._lasthover=re,ie._fullLayout._hoversubplot=X.id},re.onmouseout=function(ne){ie._dragging||x.unhover(ie,ne)},x.init(this.dragOptions)}},73972:function(o,a,n){var l=n(47769),f=n(64213),s=n(75138),c=n(41965),d=n(24401).addStyleRule,h=n(1426),p=n(9012),m=n(10820),y=h.extendFlat,v=h.extendDeepAll;function g(C){var P=C.name,D=C.categories,O=C.meta;if(a.modules[P])l.log("Type "+P+" already registered");else{a.subplotsRegistry[C.basePlotModule.name]||function(N){var E=N.name;if(a.subplotsRegistry[E])l.log("Plot type "+E+" already registered.");else for(var W in w(N),a.subplotsRegistry[E]=N,a.componentsRegistry)M(W,N.name)}(C.basePlotModule);for(var R={},F=0;F-1&&(x[w[m]].title={text:""});for(m=0;m")!==-1?"":F.html(z).text()});return F.remove(),A}(O)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(m,"'"),f.isIE()&&(O=(O=(O=O.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),O}},75341:function(o,a,n){var l=n(71828);o.exports=function(f,s){for(var c=0;cA+R||!l(F))}for(var B=0;Bm))return d}return h!==void 0?h:c.dflt},a.coerceColor=function(c,d,h){return f(d).isValid()?d:h!==void 0?h:c.dflt},a.coerceEnumerated=function(c,d,h){return c.coerceNumber&&(d=+d),c.values.indexOf(d)!==-1?d:h!==void 0?h:c.dflt},a.getValue=function(c,d){var h;return Array.isArray(c)?d0?se+=pe:k<0&&(se-=pe)}return se}function ee(le){var se=k,pe=le.b,Te=te(le);return l.inbox(pe-se,Te-se,z+(Te-se)/(Te-pe)-1)}var U=v[T+"a"],Q=v[M+"a"];P=Math.abs(U.r2c(U.range[1])-U.r2c(U.range[0]));var Y=l.getDistanceFunction(x,S,C,function(le){return(S(le)+C(le))/2});if(l.getClosest(D,Y,v),v.index!==!1&&D[v.index].p!==p){j||(L=function(le){return Math.min(N(le),le.p-R.bargroupwidth/2)},q=function(le){return Math.max(E(le),le.p+R.bargroupwidth/2)});var Z=D[v.index],X=O.base?Z.b+Z.s:Z.s;v[M+"0"]=v[M+"1"]=Q.c2p(Z[M],!0),v[M+"LabelVal"]=X;var re=R.extents[R.extents.round(Z.p)];v[T+"0"]=U.c2p(F?L(Z):re[0],!0),v[T+"1"]=U.c2p(F?q(Z):re[1],!0);var ie=Z.orig_p!==void 0;return v[T+"LabelVal"]=ie?Z.orig_p:Z.p,v.labelLabel=h(U,v[T+"LabelVal"],O[T+"hoverformat"]),v.valueLabel=h(Q,v[M+"LabelVal"],O[M+"hoverformat"]),v.baseLabel=h(Q,Z.b,O[M+"hoverformat"]),v.spikeDistance=(function(le){var se=k,pe=le.b,Te=te(le);return l.inbox(pe-se,Te-se,B+(Te-se)/(Te-pe)-1)}(Z)+function(le){return H(N(le),E(le),B)}(Z))/2,v[T+"Spike"]=U.c2p(Z.p,!0),c(Z,O,v),v.hovertemplate=O.hovertemplate,v}}function y(v,g){var b=g.mcc||v.marker.color,x=g.mlcc||v.marker.line.color,_=d(v,g);return s.opacity(b)?b:s.opacity(x)&&_?x:void 0}o.exports={hoverPoints:function(v,g,b,x,_){var w=m(v,g,b,x,_);if(w){var k=w.cd,T=k[0].trace,M=k[w.index];return w.color=y(T,M),f.getComponentMethod("errorbars","hoverInfo")(M,T,w),[w]}},hoverOnBars:m,getTraceColor:y}},60822:function(o,a,n){o.exports={attributes:n(1486),layoutAttributes:n(43641),supplyDefaults:n(90769).supplyDefaults,crossTraceDefaults:n(90769).crossTraceDefaults,supplyLayoutDefaults:n(13957),calc:n(92290),crossTraceCalc:n(11661).crossTraceCalc,colorbar:n(4898),arraysToCalcdata:n(75341),plot:n(17295).plot,style:n(16688).style,styleOnSelect:n(16688).styleOnSelect,hoverPoints:n(95423).hoverPoints,eventData:n(58065),selectPoints:n(81974),moduleType:"trace",name:"bar",basePlotModule:n(93612),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},43641:function(o){o.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},13957:function(o,a,n){var l=n(73972),f=n(89298),s=n(71828),c=n(43641);o.exports=function(d,h,p){function m(T,M){return s.coerce(d,h,c,T,M)}for(var y=!1,v=!1,g=!1,b={},x=m("barmode"),_=0;_0}function F(B){return B==="auto"?0:B}function A(B,$){var j=Math.PI/180*$,N=Math.abs(Math.sin(j)),E=Math.abs(Math.cos(j));return{x:B.width*E+B.height*N,y:B.width*N+B.height*E}}function z(B,$,j,N,E,W){var G=!!W.isHorizontal,L=!!W.constrained,q=W.angle||0,H=W.anchor||"end",V=H==="end",te=H==="start",ee=((W.leftToRight||0)+1)/2,U=1-ee,Q=E.width,Y=E.height,Z=Math.abs($-B),X=Math.abs(N-j),re=Z>2*S&&X>2*S?S:0;Z-=2*re,X-=2*re;var ie=F(q);q!=="auto"||Q<=Z&&Y<=X||!(Q>Z||Y>X)||(Q>X||Y>Z)&&Q.01?we:function(De,Re,Ie){return Ie&&De===Re?De:Math.abs(De-Re)>=2?we(De):De>Re?Math.ceil(De):Math.floor(De)};ne=ke(ne,de,re),de=ke(de,ne,re),xe=ke(xe,ue,!re),ue=ke(ue,xe,!re)}var Ae=O(s.ensureSingle(ye,"path"),q,E,W);if(Ae.style("vector-effect",H?"none":"non-scaling-stroke").attr("d",isNaN((de-ne)*(ue-xe))||ge&&B._context.staticPlot?"M0,0Z":"M"+ne+","+xe+"V"+ue+"H"+de+"V"+xe+"Z").call(h.setClipUrl,$.layerClipId,B),!q.uniformtext.mode&&ie){var Ee=h.makePointStyleFns(U);h.singlePointStyle(Se,Ae,U,Ee,B)}(function(De,Re,Ie,Be,Ue,qe,Ye,at,lt,ct,bt){var ze,Ne=Re.xaxis,Qe=Re.yaxis,it=De._fullLayout;function kt(Dt,gt,ht){return s.ensureSingle(Dt,"text").text(gt).attr({class:"bartext bartext-"+ze,"text-anchor":"middle","data-notex":1}).call(h.font,ht).call(c.convertToTspans,De)}var Je=Be[0].trace,ut=Je.orientation==="h",pt=function(Dt,gt,ht,yt,qt){var Et,jt=gt[0].trace;return Et=jt.texttemplate?function(Tt,Ot,At,Lt,Rt){var $t=Ot[0].trace,Yt=s.castOption($t,At,"texttemplate");if(!Yt)return"";var Xt,Bt,Wt,tn,cn=$t.type==="histogram",ln=$t.type==="waterfall",an=$t.type==="funnel",sn=$t.orientation==="h";function Zt(wn){return m(tn,tn.c2l(wn),!0).text}sn?(Xt="y",Bt=Rt,Wt="x",tn=Lt):(Xt="x",Bt=Lt,Wt="y",tn=Rt);var pn,nn=Ot[At],Kt={};Kt.label=nn.p,Kt.labelLabel=Kt[Xt+"Label"]=(pn=nn.p,m(Bt,Bt.c2l(pn),!0).text);var On=s.castOption($t,nn.i,"text");(On===0||On)&&(Kt.text=On),Kt.value=nn.s,Kt.valueLabel=Kt[Wt+"Label"]=Zt(nn.s);var Tn={};M(Tn,$t,nn.i),(cn||Tn.x===void 0)&&(Tn.x=sn?Kt.value:Kt.label),(cn||Tn.y===void 0)&&(Tn.y=sn?Kt.label:Kt.value),(cn||Tn.xLabel===void 0)&&(Tn.xLabel=sn?Kt.valueLabel:Kt.labelLabel),(cn||Tn.yLabel===void 0)&&(Tn.yLabel=sn?Kt.labelLabel:Kt.valueLabel),ln&&(Kt.delta=+nn.rawS||nn.s,Kt.deltaLabel=Zt(Kt.delta),Kt.final=nn.v,Kt.finalLabel=Zt(Kt.final),Kt.initial=Kt.final-Kt.delta,Kt.initialLabel=Zt(Kt.initial)),an&&(Kt.value=nn.s,Kt.valueLabel=Zt(Kt.value),Kt.percentInitial=nn.begR,Kt.percentInitialLabel=s.formatPercent(nn.begR),Kt.percentPrevious=nn.difR,Kt.percentPreviousLabel=s.formatPercent(nn.difR),Kt.percentTotal=nn.sumR,Kt.percenTotalLabel=s.formatPercent(nn.sumR));var Dn=s.castOption($t,nn.i,"customdata");return Dn&&(Kt.customdata=Dn),s.texttemplateString(Yt,Kt,Tt._d3locale,Tn,Kt,$t._meta||{})}(Dt,gt,ht,yt,qt):jt.textinfo?function(Tt,Ot,At,Lt){var Rt=Tt[0].trace,$t=Rt.orientation==="h",Yt=Rt.type==="waterfall",Xt=Rt.type==="funnel";function Bt(Dn){return m($t?At:Lt,+Dn,!0).text}var Wt,tn,cn=Rt.textinfo,ln=Tt[Ot],an=cn.split("+"),sn=[],Zt=function(Dn){return an.indexOf(Dn)!==-1};if(Zt("label")&&sn.push((tn=Tt[Ot].p,m($t?Lt:At,tn,!0).text)),Zt("text")&&((Wt=s.castOption(Rt,ln.i,"text"))===0||Wt)&&sn.push(Wt),Yt){var pn=+ln.rawS||ln.s,nn=ln.v,Kt=nn-pn;Zt("initial")&&sn.push(Bt(Kt)),Zt("delta")&&sn.push(Bt(pn)),Zt("final")&&sn.push(Bt(nn))}if(Xt){Zt("value")&&sn.push(Bt(ln.s));var On=0;Zt("percent initial")&&On++,Zt("percent previous")&&On++,Zt("percent total")&&On++;var Tn=On>1;Zt("percent initial")&&(Wt=s.formatPercent(ln.begR),Tn&&(Wt+=" of initial"),sn.push(Wt)),Zt("percent previous")&&(Wt=s.formatPercent(ln.difR),Tn&&(Wt+=" of previous"),sn.push(Wt)),Zt("percent total")&&(Wt=s.formatPercent(ln.sumR),Tn&&(Wt+=" of total"),sn.push(Wt))}return sn.join("
")}(gt,ht,yt,qt):x.getValue(jt.text,ht),x.coerceString(k,Et)}(it,Be,Ue,Ne,Qe);ze=function(Dt,gt){var ht=x.getValue(Dt.textposition,gt);return x.coerceEnumerated(T,ht)}(Je,Ue);var It=ct.mode==="stack"||ct.mode==="relative",Mt=Be[Ue],zt=!It||Mt._outmost;if(pt&&ze!=="none"&&(!Mt.isBlank&&qe!==Ye&&at!==lt||ze!=="auto"&&ze!=="inside")){var wt=it.font,ve=b.getBarColor(Be[Ue],Je),_e=b.getInsideTextFont(Je,Ue,wt,ve),Ve=b.getOutsideTextFont(Je,Ue,wt),We=Ie.datum();ut?Ne.type==="log"&&We.s0<=0&&(qe=Ne.range[0]0&&nt>0&&(Ke<=mt&&nt<=tt||Ke<=tt&&nt<=mt||(ut?mt>=Ke*(tt/nt):tt>=nt*(mt/Ke)))?ze="inside":(ze="outside",Ze.remove(),Ze=null)):ze="inside"),!Ze){var Ft=(Ze=kt(Ie,pt,st=s.ensureUniformFontSize(De,ze==="outside"?Ve:_e))).attr("transform");if(Ze.attr("transform",""),Ke=(Ge=h.bBox(Ze.node())).width,nt=Ge.height,Ze.attr("transform",Ft),Ke<=0||nt<=0)return void Ze.remove()}var Vt,St=Je.textangle;Vt=ze==="outside"?function(Dt,gt,ht,yt,qt,Et){var jt,Tt=!!Et.isHorizontal,Ot=!!Et.constrained,At=Et.angle||0,Lt=qt.width,Rt=qt.height,$t=Math.abs(gt-Dt),Yt=Math.abs(yt-ht);jt=Tt?Yt>2*S?S:0:$t>2*S?S:0;var Xt=1;Ot&&(Xt=Tt?Math.min(1,Yt/Rt):Math.min(1,$t/Lt));var Bt=F(At),Wt=A(qt,Bt),tn=(Tt?Wt.x:Wt.y)/2,cn=(qt.left+qt.right)/2,ln=(qt.top+qt.bottom)/2,an=(Dt+gt)/2,sn=(ht+yt)/2,Zt=0,pn=0,nn=Tt?D(gt,Dt):D(ht,yt);return Tt?(an=gt-nn*jt,Zt=nn*tn):(sn=yt+nn*jt,pn=-nn*tn),{textX:cn,textY:ln,targetX:an,targetY:sn,anchorX:Zt,anchorY:pn,scale:Xt,rotate:Bt}}(qe,Ye,at,lt,Ge,{isHorizontal:ut,constrained:Je.constraintext==="both"||Je.constraintext==="outside",angle:St}):z(qe,Ye,at,lt,Ge,{isHorizontal:ut,constrained:Je.constraintext==="both"||Je.constraintext==="inside",angle:St,anchor:Je.insidetextanchor}),Vt.fontSize=st.size,v(Je.type==="histogram"?"bar":Je.type,Vt,it),Mt.transform=Vt;var Nt=O(Ze,it,ct,bt);s.setTransormAndDisplay(Nt,Vt)}else Ie.select("text").remove()})(B,$,ye,te,Oe,ne,de,xe,ue,E,W),$.layerClipId&&h.hideOutsideRangePoint(Se,ye.select("text"),G,L,U.xcalendar,U.ycalendar)});var Te=U.cliponaxis===!1;h.setClipUrl(ee,Te?null:$.layerClipId,B)});p.getComponentMethod("errorbars","plot")(B,V,$,E)},toMoveInsideBar:z}},81974:function(o){function a(n,l,f,s,c){var d=l.c2p(s?n.s0:n.p0,!0),h=l.c2p(s?n.s1:n.p1,!0),p=f.c2p(s?n.p0:n.s0,!0),m=f.c2p(s?n.p1:n.s1,!0);return c?[(d+h)/2,(p+m)/2]:s?[h,(p+m)/2]:[(d+h)/2,m]}o.exports=function(n,l){var f,s=n.cd,c=n.xaxis,d=n.yaxis,h=s[0].trace,p=h.type==="funnel",m=h.orientation==="h",y=[];if(l===!1)for(f=0;f1||O.bargap===0&&O.bargroupgap===0&&!R[0].trace.marker.line.width)&&l.select(this).attr("shape-rendering","crispEdges")}),P.selectAll("g.points").each(function(R){b(l.select(this),R[0].trace,C)}),d.getComponentMethod("errorbars","style")(P)},styleTextPoints:x,styleOnSelect:function(C,P,D){var O=P[0].trace;O.selectedpoints?function(R,F,A){s.selectedPointStyle(R.selectAll("path"),F),function(z,B,$){z.each(function(j){var N,E=l.select(this);if(j.selected){N=c.ensureUniformFontSize($,_(E,j,B,$));var W=B.selected.textfont&&B.selected.textfont.color;W&&(N.color=W),s.font(E,N)}else s.selectedTextStyle(E,B)})}(R.selectAll("text"),F,A)}(D,O,C):(b(D,O,C),d.getComponentMethod("errorbars","style")(D))},getInsideTextFont:k,getOutsideTextFont:T,getBarColor:S,resizeText:h}},98340:function(o,a,n){var l=n(7901),f=n(52075).hasColorscale,s=n(1586),c=n(71828).coercePattern;o.exports=function(d,h,p,m,y){var v=p("marker.color",m),g=f(d,"marker");g&&s(d,h,y,p,{prefix:"marker.",cLetter:"c"}),p("marker.line.color",l.defaultLine),f(d,"marker.line")&&s(d,h,y,p,{prefix:"marker.line.",cLetter:"c"}),p("marker.line.width"),p("marker.opacity"),c(p,"marker.pattern",v,g),p("selected.marker.color"),p("unselected.marker.color")}},72597:function(o,a,n){var l=n(39898),f=n(71828);function s(c){return"_"+c+"Text_minsize"}o.exports={recordMinTextSize:function(c,d,h){if(h.uniformtext.mode){var p=s(c),m=h.uniformtext.minsize,y=d.scale*d.fontSize;d.hide=yj.uf};if(T._hasPreCompStats){var Y=T[P],Z=function(Re){return C.d2c((T[Re]||[])[M])},X=1/0,re=-1/0;for(M=0;M=j.q1&&j.q3>=j.med){var le=Z("lowerfence");j.lf=le!==d&&le<=j.q1?le:g(j,E,W);var se=Z("upperfence");j.uf=se!==d&&se>=j.q3?se:b(j,E,W);var pe=Z("mean");j.mean=pe!==d?pe:W?c.mean(E,W):(j.q1+j.q3)/2;var Te=Z("sd");j.sd=pe!==d&&Te>=0?Te:W?c.stdev(E,W,j.mean):j.q3-j.q1,j.lo=x(j),j.uo=_(j);var Se=Z("notchspan");Se=Se!==d&&Se>0?Se:w(j,W),j.ln=j.med-Se,j.un=j.med+Se;var Oe=j.lf,Me=j.uf;T.boxpoints&&E.length&&(Oe=Math.min(Oe,E[0]),Me=Math.max(Me,E[W-1])),T.notched&&(Oe=Math.min(Oe,j.ln),Me=Math.max(Me,j.un)),j.min=Oe,j.max=Me}else{var ce;c.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+j.q1,"median = "+j.med,"q3 = "+j.q3].join(` diff --git a/src/evidently/ui/assets/static/js/DashboardViewParams-BHBduMXd.js b/src/evidently/ui/assets/static/js/DashboardViewParams-BHBduMXd.js new file mode 100644 index 0000000000..ce068d7258 --- /dev/null +++ b/src/evidently/ui/assets/static/js/DashboardViewParams-BHBduMXd.js @@ -0,0 +1 @@ +import{R as a,r as t}from"./vendor-Bhc2M4pH.js";const s=a.createContext(null),o=()=>t.useContext(s);export{s as D,o as u}; diff --git a/src/evidently/ui/assets/static/js/DashboardViewParams-CtX565DS.js b/src/evidently/ui/assets/static/js/DashboardViewParams-CtX565DS.js deleted file mode 100644 index 034eb66ca5..0000000000 --- a/src/evidently/ui/assets/static/js/DashboardViewParams-CtX565DS.js +++ /dev/null @@ -1 +0,0 @@ -import{R as a,r as t}from"./vendor-DRRvL2bZ.js";const s=a.createContext(null),o=()=>t.useContext(s);export{s as D,o as u}; diff --git a/src/evidently/ui/assets/static/js/DashboardWidgets-DfMNi9ay.js b/src/evidently/ui/assets/static/js/DashboardWidgets-CtbLfUI7.js similarity index 54% rename from src/evidently/ui/assets/static/js/DashboardWidgets-DfMNi9ay.js rename to src/evidently/ui/assets/static/js/DashboardWidgets-CtbLfUI7.js index 931be498a7..59b8fada4d 100644 --- a/src/evidently/ui/assets/static/js/DashboardWidgets-DfMNi9ay.js +++ b/src/evidently/ui/assets/static/js/DashboardWidgets-CtbLfUI7.js @@ -1 +1 @@ -import{j as r,T as e,G as i}from"./vendor-DRRvL2bZ.js";import{D as n}from"./DashboardContent-Bltq1_up.js";import"./DashboardViewParams-CtX565DS.js";import"./createSvgIcon-Cky3vhEa.js";import"./Edit-CBY3z5Ql.js";const h=({widgets:t,ItemWrapper:a})=>t.length===0?r.jsx(e,{my:3,align:"center",variant:"h4",children:"This dashboard is currently empty. Please add a monitoring panel to start."}):r.jsx(r.Fragment,{children:r.jsx(i,{container:!0,spacing:3,direction:"row",alignItems:"stretch",children:r.jsx(n,{widgets:t,ItemWrapper:a})})});export{h as DashboardWidgets}; +import{j as r,T as e,G as i}from"./vendor-Bhc2M4pH.js";import{D as n}from"./DashboardContent-COLUGp6z.js";import"./DashboardViewParams-BHBduMXd.js";import"./createSvgIcon-BCx0yKii.js";import"./Edit-BLuUL5Mi.js";const h=({widgets:t,ItemWrapper:a})=>t.length===0?r.jsx(e,{my:3,align:"center",variant:"h4",children:"This dashboard is currently empty. Please add a monitoring panel to start."}):r.jsx(r.Fragment,{children:r.jsx(i,{container:!0,spacing:3,direction:"row",alignItems:"stretch",children:r.jsx(n,{widgets:t,ItemWrapper:a})})});export{h as DashboardWidgets}; diff --git a/src/evidently/ui/assets/static/js/Edit-CBY3z5Ql.js b/src/evidently/ui/assets/static/js/Edit-BLuUL5Mi.js similarity index 69% rename from src/evidently/ui/assets/static/js/Edit-CBY3z5Ql.js rename to src/evidently/ui/assets/static/js/Edit-BLuUL5Mi.js index 9c765d1565..348de09796 100644 --- a/src/evidently/ui/assets/static/js/Edit-CBY3z5Ql.js +++ b/src/evidently/ui/assets/static/js/Edit-BLuUL5Mi.js @@ -1 +1 @@ -import{r,i as t}from"./createSvgIcon-Cky3vhEa.js";import{j as a}from"./vendor-DRRvL2bZ.js";var e={},u=t;Object.defineProperty(e,"__esModule",{value:!0});var i=e.default=void 0,o=u(r()),d=a,l=(0,o.default)((0,d.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");i=e.default=l;export{e as E,i as d}; +import{r,i as t}from"./createSvgIcon-BCx0yKii.js";import{j as a}from"./vendor-Bhc2M4pH.js";var e={},u=t;Object.defineProperty(e,"__esModule",{value:!0});var i=e.default=void 0,o=u(r()),d=a,l=(0,o.default)((0,d.jsx)("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");i=e.default=l;export{e as E,i as d}; diff --git a/src/evidently/ui/assets/static/js/createSvgIcon-Cky3vhEa.js b/src/evidently/ui/assets/static/js/createSvgIcon-BCx0yKii.js similarity index 86% rename from src/evidently/ui/assets/static/js/createSvgIcon-Cky3vhEa.js rename to src/evidently/ui/assets/static/js/createSvgIcon-BCx0yKii.js index 6408718781..58fc929393 100644 --- a/src/evidently/ui/assets/static/js/createSvgIcon-Cky3vhEa.js +++ b/src/evidently/ui/assets/static/js/createSvgIcon-BCx0yKii.js @@ -1 +1 @@ -import{as as i,bC as o}from"./vendor-DRRvL2bZ.js";var a={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(a);var f=a.exports,u={};const s=i(o);var n;function p(){return n||(n=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=s}(u)),u}export{f as i,p as r}; +import{as as i,bC as o}from"./vendor-Bhc2M4pH.js";var a={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(a);var f=a.exports,u={};const s=i(o);var n;function p(){return n||(n=1,function(e){"use client";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.createSvgIcon}});var t=s}(u)),u}export{f as i,p as r}; diff --git a/src/evidently/ui/assets/static/js/index-400O55sq.js b/src/evidently/ui/assets/static/js/index-400O55sq.js new file mode 100644 index 0000000000..1eae95316f --- /dev/null +++ b/src/evidently/ui/assets/static/js/index-400O55sq.js @@ -0,0 +1,3 @@ +const __vite__fileDeps=["static/js/index-BMd0dgrZ.js","static/js/vendor-Bhc2M4pH.js","static/js/createSvgIcon-BCx0yKii.js","static/js/index-BMG2DTKx.js","static/js/DashboardViewParams-BHBduMXd.js","static/js/index-CAXTGTpX.js","static/js/DashboardWidgets-CtbLfUI7.js","static/js/DashboardContent-COLUGp6z.js","static/js/Edit-BLuUL5Mi.js","static/js/index-C1K5icaJ.js","static/js/index-u7sYf73W.js","static/js/ContentCopy-bqrH-e3i.js","static/css/index-C5isHALn.css","static/js/index-CvB9RFvP.js","static/js/index-CnLh7AdB.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); +var Q=Object.defineProperty;var Y=(e,t,s)=>t in e?Q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var T=(e,t,s)=>(Y(e,typeof t!="symbol"?t+"":t,s),s);import{c as M,g as y,u as K,j as r,A as L,a as A,i as X,T as P,b as Z,R as C,r as ee,S as te,B as b,I as re,C as se,d as oe,e as ne,f as ie,h as k,L as ce,k as ae,G as I,F as he,l as le,m as de,n as ue,o as pe,M as f,D as B,p as fe,q as me,s as O,z as p,t as je,v as xe,w as ye,x as ge}from"./vendor-Bhc2M4pH.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();const{transitions:w}=M(),x="#ed0500",_e="#ded5d5",ve=M({shape:{borderRadius:5},palette:{primary:{main:y[900],light:y[200]},secondary:{main:x,dark:"#c10400",light:y[200]},background:{default:"#fff",paper:"#fff"}},components:{MuiLink:{styleOverrides:{root:{transition:w.create("color",{duration:w.duration.enteringScreen}),"&:hover":{color:x}}}},MuiTabs:{styleOverrides:{flexContainer:{gap:"10px"},indicator:{backgroundColor:x}}},MuiButton:{styleOverrides:{contained:{"&:hover":{background:y[800]}},outlined:{"&:hover":{color:x,borderColor:x,background:"#fff"}},text:{"&:hover":{color:x,borderColor:x}}}},MuiTab:{defaultProps:{color:"secondary"},styleOverrides:{root:{fontSize:"1rem",borderRadius:"5px","&:hover":{background:y[200]}}}},MuiIconButton:{styleOverrides:{root:{transition:w.create("color",{duration:w.duration.enteringScreen}),color:y[900],"&:hover":{color:x}}}},MuiSwitch:{defaultProps:{color:"secondary"}},MuiToggleButton:{defaultProps:{color:"secondary"},styleOverrides:{root:{transition:w.create("color",{duration:w.duration.enteringScreen}),color:y[900],"&:hover":{color:x},"&.Mui-disabled":{border:"unset",background:y[100]}}}},MuiToggleButtonGroup:{defaultProps:{color:"secondary"}},MuiLinearProgress:{defaultProps:{color:"secondary"}},MuiPaper:{styleOverrides:{root:{boxShadow:"unset",border:"1px solid",borderColor:_e}}}},typography:{fontFamily:["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(","),button:{fontWeight:"bold",textTransform:"none"}}}),_=()=>{var t;const e=K();return r.jsxs(L,{severity:"error",children:[r.jsx(A,{children:"Something went wrong"}),X(e)&&r.jsxs(r.Fragment,{children:[r.jsx(P,{fontWeight:"bold",children:[`Status: ${e.status}`,typeof((t=e.data)==null?void 0:t.detail)=="string"&&e.data.detail].filter(Boolean).join(", ")}),typeof e.data=="string"&&r.jsx(P,{children:e.data})]}),typeof e=="string"&&r.jsx(P,{fontWeight:"bold",children:e})]})},N=({data:e})=>{const[t,s]=C.useState(!1),n=C.useRef(null);return ee.useEffect(()=>{e!=null&&e.error&&(n.current=e.error,s(!0))},[e]),r.jsx(te,{open:t,onClose:(i,o)=>{o!=="clickaway"&&s(!1)},children:r.jsx(L,{severity:"error",children:r.jsxs(b,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:2,children:[r.jsxs(b,{children:[r.jsx(A,{children:"Something went wrong"}),n.current&&r.jsx(P,{fontWeight:"bold",children:[typeof n.current.status_code=="number"&&`Status: ${n.current.status_code}`,typeof n.current.detail=="string"&&n.current.detail].filter(Boolean).join(", ")})]}),r.jsx(b,{children:r.jsx(re,{size:"small","aria-label":"close",color:"inherit",onClick:()=>{s(!1)},children:r.jsx(se,{})})})]})})})},R=()=>{const e=Z();return r.jsx(N,{data:e})},Ee=()=>{var s;const t=(s=oe().find(n=>{var i;return!!((i=n.data)!=null&&i.error)}))==null?void 0:s.data;return r.jsx(N,{data:t})},Se="modulepreload",be=function(e){return"/"+e},$={},g=function(t,s,n){let i=Promise.resolve();if(s&&s.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),c=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));i=Promise.all(s.map(a=>{if(a=be(a),a in $)return;$[a]=!0;const m=a.endsWith(".css"),l=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${l}`))return;const h=document.createElement("link");if(h.rel=m?"stylesheet":Se,m||(h.as="script",h.crossOrigin=""),h.href=a,c&&h.setAttribute("nonce",c),document.head.appendChild(h),m)return new Promise((E,S)=>{h.addEventListener("load",E),h.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${a}`)))})}))}return i.then(()=>t()).catch(o=>{const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o})};function u(e){return e!=null&&e.notThrowExc?we:ke}const ke=e=>{const{data:t,error:s,response:n}=e;if(s)throw ne(s,{status:n.status});return t},we=e=>{const{data:t,error:s,response:n}=e;return s?{error:{...s,status_code:n.status}}:t},Pe=({api:e})=>({loader:()=>e.GET("/api/version").then(u())}),Te=ie,v=Te({baseUrl:"/"}),Ie="/static/img/logo.png",{loader:Oe}=Pe({api:v}),De={path:"/",lazy:async()=>{const{HomeComponentTemplate:e,...t}=await g(()=>import("./index-BMd0dgrZ.js"),__vite__mapDeps([0,1,2]));return{Component:()=>r.jsxs(r.Fragment,{children:[r.jsx(Ee,{}),r.jsx(e,{logoSrc:Ie})]}),...t}},loader:Oe,ErrorBoundary:_},G=e=>{if(e.id)return{...e,id:e.id};throw`"id" is missing in object: ${JSON.stringify(e)}`},U=e=>{if(e.headers.get("Content-type")!=="application/json")throw new Response("Unsupported Media Type",{status:415})},Ce=({api:e})=>({loader:({params:t})=>{const{projectId:s}=t;return k(s),e.GET("/api/projects/{project_id}/info",{params:{path:{project_id:s}}}).then(u()).then(G)}});function D(e){return typeof e!=typeof new Date?(console.log(`not a date ${typeof e}: ${e}`),e):`${e.getFullYear()}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}T${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}`}const d={FROM:"date_from",TO:"date_to"},Le=e=>{let t=e.get(d.FROM),s=e.get(d.TO);return{date_from:t,date_to:s}},Ae=({dataRanges:e})=>{const[t,s]=me(),{date_from:n,date_to:i}=Le(t),o=O(n||e.minDate),c=O(i||e.maxDate);return{isCorrectTimeInterval:o.isValid()&&c.isValid()&&(o.isSame(c)||o.isBefore(c)),date_from:o,date_to:c,setSearchParams:s}},dt=({dataRanges:e,isDashboardHideDates:t,setIsDashboardHideDates:s,isShowDateFilter:n})=>{const{isCorrectTimeInterval:i,date_from:o,date_to:c,setSearchParams:a}=Ae({dataRanges:e}),m=i?"":"incorrect time interval",l=h=>E=>{a(S=>(S.delete(h),E&&S.append(h,D(E.toDate())),S),{preventScrollReset:!0,replace:!0})};return r.jsx(ce,{dateAdapter:ae,adapterLocale:"en-gb",children:r.jsxs(I,{container:!0,padding:1,zIndex:1,gap:2,justifyContent:"flex-end",alignItems:"flex-end",children:[r.jsx(I,{item:!0,children:r.jsx(b,{minWidth:180,display:"flex",justifyContent:"center",children:r.jsx(he,{control:r.jsx(le,{checked:t,onChange:h=>s(h.target.checked)}),label:"Show in order"})})}),n&&r.jsxs(r.Fragment,{children:[r.jsx(I,{item:!0,xs:12,md:2,children:r.jsxs(de,{fullWidth:!0,children:[r.jsx(ue,{children:"Period"}),r.jsxs(pe,{variant:"standard",defaultValue:"",onChange:h=>{const[E,S]=h.target.value.split(",");if(E===""){a(j=>(j.delete(d.FROM),j.delete(d.TO),j),{preventScrollReset:!0,replace:!0});return}const[J,q]=[Number(E),S],F=e.maxDate.subtract(J,q);a(j=>(j.delete(d.FROM),j.delete(d.TO),j.append(d.FROM,D(F.isBefore(e.minDate)?e.minDate.toDate():F.toDate())),j.append(d.TO,D(e.maxDate.toDate())),j),{preventScrollReset:!0,replace:!0})},children:[r.jsx(f,{value:"",children:r.jsx("em",{children:"None"})}),r.jsx(f,{value:"10,minutes",children:"Last 10 Minutes"}),r.jsx(f,{value:"30,minutes",children:"Last 30 Minutes"}),r.jsx(f,{value:"1,hours",children:"Last 1 Hours"}),r.jsx(f,{value:"2,hours",children:"Last 2 Hours"}),r.jsx(f,{value:"8,hours",children:"Last 8 Hours"}),r.jsx(f,{value:"24,hours",children:"Last 24 Hours"}),r.jsx(f,{value:"7,days",children:"Last 7 Days"}),r.jsx(f,{value:"14,days",children:"Last 14 Days"}),r.jsx(f,{value:"28,days",children:"Last 28 Days"}),r.jsx(f,{value:"60,days",children:"Last 60 Days"})]})]})}),r.jsx(I,{item:!0,children:r.jsxs(b,{display:"flex",alignItems:"center",gap:2,children:[r.jsx(B,{minDate:e.minDate,maxDate:e.maxDate&&c,slotProps:{textField:{variant:"standard"}},label:"From",value:o,onChange:l(d.FROM)}),r.jsx(b,{height:1,display:"flex",alignItems:"center",children:r.jsx(P,{children:" - "})}),r.jsx(B,{minDate:e.minDate&&o,maxDate:e.maxDate,slotProps:{textField:{variant:"standard"}},label:"To",value:c,onChange:l(d.TO)})]})}),r.jsx(I,{item:!0,xs:12,children:r.jsx(fe,{unmountOnExit:!0,in:!i,children:r.jsxs(L,{severity:"error",children:[r.jsx(A,{children:"Error"}),m]})})})]})]})})};class Re{constructor(){T(this,"at",0);T(this,"ch","");T(this,"text","");T(this,"escapee",{'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` +`,r:"\r",t:" "})}error(t){throw{name:"SyntaxError",message:t,at:this.at,text:this.text}}next(){return this.ch=this.text.charAt(this.at++)}check(t){t!==this.ch&&this.error(`Expected '${t}' instead of '${this.ch}'`),this.ch=this.text.charAt(this.at++)}number(){var t="";if(this.ch==="-"&&(t="-",this.check("-")),this.ch==="I")return this.check("I"),this.check("n"),this.check("f"),this.check("i"),this.check("n"),this.check("i"),this.check("t"),this.check("y"),-1/0;for(;this.ch>="0"&&this.ch<="9";)t+=this.ch,this.next();if(this.ch===".")for(t+=".";this.next()&&this.ch>="0"&&this.ch<="9";)t+=this.ch;if(this.ch==="e"||this.ch==="E")for(t+=this.ch,this.next(),(this.ch==="-"||this.ch==="+")&&(t+=this.ch,this.next());this.ch>="0"&&this.ch<="9";)t+=this.ch,this.next();return+t}string(){var t,s,n="",i;if(this.ch==='"')for(;this.next();){if(this.ch==='"')return this.next(),n;if(this.ch==="\\")if(this.next(),this.ch==="u"){for(i=0,s=0;s<4&&(t=parseInt(this.next(),16),!!isFinite(t));s++)i=i*16+t;n+=String.fromCharCode(i)}else if(this.escapee[this.ch])n+=this.escapee[this.ch];else break;else n+=this.ch}this.error("Bad string")}white(){for(;this.ch&&this.ch<=" ";)this.next()}word(){switch(this.ch){case"t":return this.check("t"),this.check("r"),this.check("u"),this.check("e"),!0;case"f":return this.check("f"),this.check("a"),this.check("l"),this.check("s"),this.check("e"),!1;case"n":return this.check("n"),this.check("u"),this.check("l"),this.check("l"),null;case"N":return this.check("N"),this.check("a"),this.check("N"),NaN;case"I":return this.check("I"),this.check("n"),this.check("f"),this.check("i"),this.check("n"),this.check("i"),this.check("t"),this.check("y"),1/0}this.error("Unexpected '"+this.ch+"'")}array(){var t=[];if(this.ch==="["){if(this.check("["),this.white(),this.ch==="]")return this.check("]"),t;for(;this.ch;){if(t.push(this.value()),this.white(),this.ch==="]")return this.check("]"),t;this.check(","),this.white()}}this.error("Bad array")}object(){var t,s={};if(this.ch==="{"){if(this.check("{"),this.white(),this.ch==="}")return this.check("}"),s;for(;this.ch;){if(t=this.string(),this.white(),this.check(":"),Object.hasOwnProperty.call(s,t)&&this.error('Duplicate key "'+t+'"'),s[t]=this.value(),this.white(),this.ch==="}")return this.check("}"),s;this.check(","),this.white()}}this.error("Bad object")}value(){switch(this.white(),this.ch){case"{":return this.object();case"[":return this.array();case'"':return this.string();case"-":return this.number();default:return this.ch>="0"&&this.ch<="9"?this.number():this.word()}}parse(t,s){let n;return this.text=t,this.at=0,this.ch=" ",n=this.value(),this.white(),this.ch&&this.error("Syntax error"),s!==void 0?function i(o,c){var a,m,l=o[c];if(l&&typeof l=="object")for(a in l)Object.prototype.hasOwnProperty.call(l,a)&&(m=i(l,a),m!==void 0?l[a]=m:delete l[a]);return s.call(o,c,l)}({"":n},""):n}}const z=e=>new Re().parse(e),Fe=({api:e})=>({loader:({params:t,request:s})=>{k(t.projectId);const{searchParams:n}=new URL(s.url);let i=n.get(d.FROM),o=n.get(d.TO);return i&&!O(i).isValid()&&(i=null),o&&!O(o).isValid()&&(o=null),e.GET("/api/projects/{project_id}/dashboard",{params:{path:{project_id:t.projectId},query:{timestamp_start:i,timestamp_end:o}},parseAs:"text"}).then(u()).then(z)}}),{loader:Be}=Fe({api:v}),$e={index:!0,id:"dashboard",lazy:async()=>{const[{DashboardComponentTemplate:e},{DashboardWidgets:t}]=await Promise.all([g(()=>import("./index-BMG2DTKx.js"),__vite__mapDeps([3,1,4,5])),g(()=>import("./DashboardWidgets-CtbLfUI7.js"),__vite__mapDeps([6,1,7,4,2,8]))]);return{Component:()=>r.jsx(e,{Dashboard:({data:{widgets:s}})=>r.jsx(t,{widgets:s})})}},loader:Be,ErrorBoundary:_},H={RELOAD_SNAPSHOTS:"reload-snapshots",DELETE_SNAPSHOT:"delete-snapshot"},Me=p.object({action:p.literal(H.RELOAD_SNAPSHOTS)}),Ne=p.object({action:p.literal(H.DELETE_SNAPSHOT),snapshotId:p.string().uuid()}),V=e=>async({request:t,params:s})=>{k(s.projectId),U(t);const n=await t.json();if(Me.safeParse(n).success)return e.GET("/api/projects/{project_id}/reload",{params:{path:{project_id:s.projectId}}}).then(u({notThrowExc:!0}));const o=Ne.safeParse(n);return o.success?e.DELETE("/api/projects/{project_id}/{snapshot_id}",{params:{path:{project_id:s.projectId,snapshot_id:o.data.snapshotId}}}).then(u({notThrowExc:!0})):{error:{status_code:!1,detail:"Unknown action"}}},Ge=({api:e})=>({loader:({params:t})=>(k(t.projectId),t.snapshotId?Promise.resolve([]):e.GET("/api/projects/{project_id}/reports",{params:{path:{project_id:t.projectId}}}).then(u())),action:V(e)}),Ue=({api:e})=>({loader:({params:t})=>(k(t.projectId),t.snapshotId?Promise.resolve([]):e.GET("/api/projects/{project_id}/test_suites",{params:{path:{project_id:t.projectId}}}).then(u())),action:V(e)}),ze=({api:e})=>({loader:({params:t})=>{const{projectId:s,snapshotId:n}=t;return k(s),k(n),e.GET("/api/projects/{project_id}/{snapshot_id}/data",{params:{path:{project_id:s,snapshot_id:n}},parseAs:"text"}).then(u()).then(z)}}),{loader:He}=ze({api:v}),W={path:":snapshotId",lazy:async()=>{const{SnapshotTemplate:e,...t}=await g(()=>import("./index-C1K5icaJ.js"),__vite__mapDeps([9,1,7,4,2,8]));return{Component:()=>r.jsx(e,{api:v}),...t}},loader:He,ErrorBoundary:_},{loader:Ve,action:We}=Ge({api:v}),Je={id:"reports",path:"reports",lazy:async()=>{const{SnapshotsListTemplate:e,...t}=await g(()=>import("./index-u7sYf73W.js"),__vite__mapDeps([10,1,5,11,2,12]));return{...t,Component:()=>r.jsxs(r.Fragment,{children:[r.jsx(R,{}),r.jsx(e,{type:"reports"})]})}},loader:Ve,action:We,ErrorBoundary:_,children:[W]},{loader:qe,action:Qe}=Ue({api:v}),Ye={id:"test_suites",path:"test-suites",lazy:async()=>{const{SnapshotsListTemplate:e,...t}=await g(()=>import("./index-u7sYf73W.js"),__vite__mapDeps([10,1,5,11,2,12]));return{...t,Component:()=>r.jsxs(r.Fragment,{children:[r.jsx(R,{}),r.jsx(e,{type:"test suites"})]})}},loader:qe,action:Qe,ErrorBoundary:_,children:[W]},{loader:Ke}=Ce({api:v}),Xe={path:"projects/:projectId",lazy:()=>g(()=>import("./index-CvB9RFvP.js"),__vite__mapDeps([13,1,11,2])),loader:Ke,ErrorBoundary:_,children:[$e,Je,Ye]},Ze=p.object({action:p.literal("edit-project")}),et=p.object({action:p.literal("create-new-project")}),tt=p.object({action:p.literal("delete-project"),projectId:p.string().uuid()}),rt=({api:e})=>({loader:()=>e.GET("/api/projects").then(u()).then(t=>t.map(G)),action:async({request:t})=>{U(t);const s=await t.json();if(et.safeParse(s).success)return e.POST("/api/projects",{body:s}).then(u({notThrowExc:!0}));const n=tt.safeParse(s);if(n.success)return e.DELETE("/api/projects/{project_id}",{params:{path:{project_id:n.data.projectId}}}).then(u({notThrowExc:!0}));if(Ze.safeParse(s).success)return e.POST("/api/projects/{project_id}/info",{params:{path:{project_id:s.id}},body:s}).then(u({notThrowExc:!0}));throw"Undefined action"}}),{loader:st,action:ot}=rt({api:v}),nt={index:!0,lazy:()=>g(()=>import("./index-CnLh7AdB.js"),__vite__mapDeps([14,1,8,2,5])).then(e=>({...e,Component:()=>r.jsxs(r.Fragment,{children:[r.jsx(R,{}),r.jsx(e.Component,{})]})})),loader:st,action:ot,ErrorBoundary:_},it={path:"*",Component:()=>r.jsx(b,{display:"flex",justifyContent:"center",children:r.jsx(P,{variant:"h4",children:"Page Not Found"})})},ct={...De,children:[nt,Xe,it],ErrorBoundary:_},at=je([ct]);xe.createRoot(document.getElementById("root")).render(r.jsx(C.StrictMode,{children:r.jsx(ye,{theme:ve,children:r.jsx(ge,{router:at})})}));export{dt as D,z as J,u as r}; diff --git a/src/evidently/ui/assets/static/js/index-BnGIng_f.js b/src/evidently/ui/assets/static/js/index-BMG2DTKx.js similarity index 61% rename from src/evidently/ui/assets/static/js/index-BnGIng_f.js rename to src/evidently/ui/assets/static/js/index-BMG2DTKx.js index 38bcfe8f80..e708937194 100644 --- a/src/evidently/ui/assets/static/js/index-BnGIng_f.js +++ b/src/evidently/ui/assets/static/js/index-BMG2DTKx.js @@ -1 +1 @@ -import{a6 as d,h as p,V as D,s as e,j as s}from"./vendor-DRRvL2bZ.js";import{D as l}from"./index-D5V2mqaA.js";import{D as x}from"./DashboardViewParams-CtX565DS.js";import{a as c}from"./index-DAGvxKAA.js";const f=({Dashboard:o})=>{const{projectId:r}=d();p(r);const a=D(),m=a.min_timestamp!==null&&a.max_timestamp!==null,i={minDate:e(a.min_timestamp),maxDate:e(a.max_timestamp)},[t,n]=c("dashboard-hide-dates",!1);return s.jsxs(s.Fragment,{children:[s.jsx(l,{dataRanges:i,isShowDateFilter:m,isDashboardHideDates:t,setIsDashboardHideDates:n}),s.jsx(x.Provider,{value:{isXaxisAsCategorical:t},children:s.jsx(o,{data:a})})]})};export{f as DashboardComponentTemplate}; +import{a6 as d,h as p,V as D,s as e,j as s}from"./vendor-Bhc2M4pH.js";import{D as l}from"./index-400O55sq.js";import{D as x}from"./DashboardViewParams-BHBduMXd.js";import{a as c}from"./index-CAXTGTpX.js";const f=({Dashboard:o})=>{const{projectId:r}=d();p(r);const a=D(),m=a.min_timestamp!==null&&a.max_timestamp!==null,i={minDate:e(a.min_timestamp),maxDate:e(a.max_timestamp)},[t,n]=c("dashboard-hide-dates",!1);return s.jsxs(s.Fragment,{children:[s.jsx(l,{dataRanges:i,isShowDateFilter:m,isDashboardHideDates:t,setIsDashboardHideDates:n}),s.jsx(x.Provider,{value:{isXaxisAsCategorical:t},children:s.jsx(o,{data:a})})]})};export{f as DashboardComponentTemplate}; diff --git a/src/evidently/ui/assets/static/js/index-C88TO56P.js b/src/evidently/ui/assets/static/js/index-BMd0dgrZ.js similarity index 95% rename from src/evidently/ui/assets/static/js/index-C88TO56P.js rename to src/evidently/ui/assets/static/js/index-BMd0dgrZ.js index 32be476fba..35f9eb0e49 100644 --- a/src/evidently/ui/assets/static/js/index-C88TO56P.js +++ b/src/evidently/ui/assets/static/js/index-BMd0dgrZ.js @@ -1 +1 @@ -import{y as f,j as t,B as l,E as x,H as c,J as h,K as v,d as m,N as g,O as j,r as y,P as O,Q as _,T as P,I as w,U as B,V as R,W as b,X as D}from"./vendor-DRRvL2bZ.js";import{r as I,i as M}from"./createSvgIcon-Cky3vhEa.js";const H=e=>{var s;return typeof((s=e==null?void 0:e.handle)==null?void 0:s.crumb)=="function"},N=()=>{const s=f().filter(H).map(({handle:r,data:a,id:o,pathname:n,params:i})=>r.crumb(a,{id:o,pathname:n,params:i}));return t.jsx(l,{children:t.jsx(x,{"aria-label":"breadcrumb",children:s.map(r=>t.jsx(c,{component:h,color:"inherit",to:r.to,children:r.linkText},r.to))})})},T=()=>{const e=v(),s=m(),{state:r}=g();return e.state!=="idle"||s.some(({state:o})=>o!=="idle")||r!=="idle"?t.jsx(l,{width:1,sx:{position:"fixed",top:0,left:0,zIndex:99999},children:t.jsx(j,{sx:{height:"3px"}})}):null};var u={},W=M;Object.defineProperty(u,"__esModule",{value:!0});var d=u.default=void 0;S(y);var q=W(I()),C=t;function p(e){if(typeof WeakMap!="function")return null;var s=new WeakMap,r=new WeakMap;return(p=function(a){return a?r:s})(e)}function S(e,s){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=p(s);if(r&&r.has(e))return r.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)){var i=o?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(a,n,i):a[n]=e[n]}return a.default=e,r&&r.set(e,a),a}var E=(0,q.default)((0,C.jsx)("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub");d=u.default=E;function L({version:e,authComponent:s,logoSrc:r}){return t.jsx(t.Fragment,{children:t.jsx(O,{position:"static",color:"transparent",children:t.jsxs(_,{children:[t.jsxs(P,{variant:"h6",sx:{flexGrow:1},children:[t.jsx("img",{src:r,height:"55px"}),t.jsx("span",{style:{verticalAlign:"super",fontSize:"0.75rem"},children:e})]}),s,t.jsx(c,{href:"https://github.com/evidentlyai/evidently",children:t.jsx(w,{children:t.jsx(d,{})})}),t.jsx(c,{href:"https://docs.evidentlyai.com/",children:t.jsx(B,{children:"Docs"})})]})})})}const G=({logoSrc:e,authComponent:s})=>{const{version:r}=R();return t.jsxs(t.Fragment,{children:[t.jsx(L,{authComponent:s,version:r,logoSrc:e}),t.jsx(T,{}),t.jsx(b,{}),t.jsxs(l,{p:3,children:[t.jsx(N,{}),t.jsx(D,{})]})]})},k={crumb:()=>({to:"/",linkText:"Home"})};export{G as HomeComponentTemplate,k as handle}; +import{y as f,j as t,B as l,E as x,H as c,J as h,K as v,d as m,N as g,O as j,r as y,P as O,Q as _,T as P,I as w,U as B,V as R,W as b,X as D}from"./vendor-Bhc2M4pH.js";import{r as I,i as M}from"./createSvgIcon-BCx0yKii.js";const H=e=>{var s;return typeof((s=e==null?void 0:e.handle)==null?void 0:s.crumb)=="function"},N=()=>{const s=f().filter(H).map(({handle:r,data:a,id:o,pathname:n,params:i})=>r.crumb(a,{id:o,pathname:n,params:i}));return t.jsx(l,{children:t.jsx(x,{"aria-label":"breadcrumb",children:s.map(r=>t.jsx(c,{component:h,color:"inherit",to:r.to,children:r.linkText},r.to))})})},T=()=>{const e=v(),s=m(),{state:r}=g();return e.state!=="idle"||s.some(({state:o})=>o!=="idle")||r!=="idle"?t.jsx(l,{width:1,sx:{position:"fixed",top:0,left:0,zIndex:99999},children:t.jsx(j,{sx:{height:"3px"}})}):null};var u={},W=M;Object.defineProperty(u,"__esModule",{value:!0});var d=u.default=void 0;S(y);var q=W(I()),C=t;function p(e){if(typeof WeakMap!="function")return null;var s=new WeakMap,r=new WeakMap;return(p=function(a){return a?r:s})(e)}function S(e,s){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=p(s);if(r&&r.has(e))return r.get(e);var a={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)){var i=o?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(a,n,i):a[n]=e[n]}return a.default=e,r&&r.set(e,a),a}var E=(0,q.default)((0,C.jsx)("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub");d=u.default=E;function L({version:e,authComponent:s,logoSrc:r}){return t.jsx(t.Fragment,{children:t.jsx(O,{position:"static",color:"transparent",children:t.jsxs(_,{children:[t.jsxs(P,{variant:"h6",sx:{flexGrow:1},children:[t.jsx("img",{src:r,height:"55px"}),t.jsx("span",{style:{verticalAlign:"super",fontSize:"0.75rem"},children:e})]}),s,t.jsx(c,{href:"https://github.com/evidentlyai/evidently",children:t.jsx(w,{children:t.jsx(d,{})})}),t.jsx(c,{href:"https://docs.evidentlyai.com/",children:t.jsx(B,{children:"Docs"})})]})})})}const G=({logoSrc:e,authComponent:s})=>{const{version:r}=R();return t.jsxs(t.Fragment,{children:[t.jsx(L,{authComponent:s,version:r,logoSrc:e}),t.jsx(T,{}),t.jsx(b,{}),t.jsxs(l,{p:3,children:[t.jsx(N,{}),t.jsx(D,{})]})]})},k={crumb:()=>({to:"/",linkText:"Home"})};export{G as HomeComponentTemplate,k as handle}; diff --git a/src/evidently/ui/assets/static/js/index-C1K5icaJ.js b/src/evidently/ui/assets/static/js/index-C1K5icaJ.js new file mode 100644 index 0000000000..41f8b3ec5a --- /dev/null +++ b/src/evidently/ui/assets/static/js/index-C1K5icaJ.js @@ -0,0 +1 @@ +import{a6 as p,h as o,V as h,j as e,G as c}from"./vendor-Bhc2M4pH.js";import{a as m,C as g,D as _}from"./DashboardContent-COLUGp6z.js";import{r as n,J as i}from"./index-400O55sq.js";import"./DashboardViewParams-BHBduMXd.js";import"./createSvgIcon-BCx0yKii.js";import"./Edit-BLuUL5Mi.js";const I={crumb:(s,{pathname:t,params:a})=>({to:t,linkText:String(a.snapshotId)}),hide:{snapshotList:!0}},G=({api:s})=>{const{projectId:t,snapshotId:a}=p();o(t),o(a);const d=h();return e.jsx(e.Fragment,{children:e.jsx(m.Provider,{value:g({getAdditionGraphData:r=>s.GET("/api/projects/{project_id}/{snapshot_id}/graphs_data/{graph_id}",{params:{path:{project_id:t,snapshot_id:a,graph_id:encodeURIComponent(r)}},parseAs:"text"}).then(n()).then(i),getAdditionWidgetData:r=>s.GET("/api/projects/{project_id}/{snapshot_id}/graphs_data/{graph_id}",{params:{path:{project_id:t,snapshot_id:a,graph_id:encodeURIComponent(r)}},parseAs:"text"}).then(n()).then(i)}),children:e.jsx(c,{container:!0,spacing:3,direction:"row",alignItems:"stretch",children:e.jsx(_,{widgets:d.widgets})})})})};export{G as SnapshotTemplate,I as handle}; diff --git a/src/evidently/ui/assets/static/js/index-DAGvxKAA.js b/src/evidently/ui/assets/static/js/index-CAXTGTpX.js similarity index 92% rename from src/evidently/ui/assets/static/js/index-DAGvxKAA.js rename to src/evidently/ui/assets/static/js/index-CAXTGTpX.js index 6488dcd353..1a54a62662 100644 --- a/src/evidently/ui/assets/static/js/index-DAGvxKAA.js +++ b/src/evidently/ui/assets/static/js/index-CAXTGTpX.js @@ -1 +1 @@ -import{r as a}from"./vendor-DRRvL2bZ.js";function S(t,e){window.dispatchEvent(new StorageEvent("storage",{key:t,newValue:e}))}const g=(t,e)=>{const o=JSON.stringify(e);window.localStorage.setItem(t,o),S(t,o)},u=t=>{window.localStorage.removeItem(t),S(t,null)},l=t=>window.localStorage.getItem(t),i=t=>(window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)),f=()=>{throw Error("useLocalStorage is a client-only hook")};function w(t,e){const o=()=>l(t),n=a.useSyncExternalStore(i,o,f),c=a.useCallback(r=>{try{const s=typeof r=="function"?r(JSON.parse(n)):r;s==null?u(t):g(t,s)}catch(s){console.warn(s)}},[t,n]);return a.useEffect(()=>{l(t)===null&&typeof e<"u"&&g(t,e)},[t,e]),[n?JSON.parse(n):e,c]}function p(t){const[e,o]=a.useState(()=>t),n=a.useCallback(c=>o(typeof c=="boolean"?c:r=>!r),[]);return[e,n]}export{w as a,p as u}; +import{r as a}from"./vendor-Bhc2M4pH.js";function S(t,e){window.dispatchEvent(new StorageEvent("storage",{key:t,newValue:e}))}const g=(t,e)=>{const o=JSON.stringify(e);window.localStorage.setItem(t,o),S(t,o)},u=t=>{window.localStorage.removeItem(t),S(t,null)},l=t=>window.localStorage.getItem(t),i=t=>(window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)),f=()=>{throw Error("useLocalStorage is a client-only hook")};function w(t,e){const o=()=>l(t),n=a.useSyncExternalStore(i,o,f),c=a.useCallback(r=>{try{const s=typeof r=="function"?r(JSON.parse(n)):r;s==null?u(t):g(t,s)}catch(s){console.warn(s)}},[t,n]);return a.useEffect(()=>{l(t)===null&&typeof e<"u"&&g(t,e)},[t,e]),[n?JSON.parse(n):e,c]}function p(t){const[e,o]=a.useState(()=>t),n=a.useCallback(c=>o(typeof c=="boolean"?c:r=>!r),[]);return[e,n]}export{w as a,p as u}; diff --git a/src/evidently/ui/assets/static/js/index-B8zGyO85.js b/src/evidently/ui/assets/static/js/index-CnLh7AdB.js similarity index 99% rename from src/evidently/ui/assets/static/js/index-B8zGyO85.js rename to src/evidently/ui/assets/static/js/index-CnLh7AdB.js index 86cc02f275..faeab55d3b 100644 --- a/src/evidently/ui/assets/static/js/index-B8zGyO85.js +++ b/src/evidently/ui/assets/static/js/index-CnLh7AdB.js @@ -1 +1 @@ -import{j as x,R as K,z as we,r as ue,K as Ce,_ as ot,$ as St,B as ee,I as Et,a0 as lt,a1 as kt,a2 as jt,a3 as Tt,a4 as Ot,a5 as Je,U as Ct,H as Lt,J as Rt,T as Te,V as Nt,G as Pt}from"./vendor-DRRvL2bZ.js";import{d as Mt}from"./Edit-CBY3z5Ql.js";import{r as Bt,i as Ut}from"./createSvgIcon-Cky3vhEa.js";import{u as Ye}from"./index-DAGvxKAA.js";var Le={},It=Ut;Object.defineProperty(Le,"__esModule",{value:!0});var ut=Le.default=void 0,qt=It(Bt()),Wt=x,Ht=(0,qt.default)((0,Wt.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");ut=Le.default=Ht;var ce=e=>e.type==="checkbox",ie=e=>e instanceof Date,O=e=>e==null;const ct=e=>typeof e=="object";var k=e=>!O(e)&&!Array.isArray(e)&&ct(e)&&!ie(e),$t=e=>k(e)&&e.target?ce(e.target)?e.target.checked:e.target.value:e,zt=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Gt=(e,i)=>e.has(zt(i)),Kt=e=>{const i=e.constructor&&e.constructor.prototype;return k(i)&&i.hasOwnProperty("isPrototypeOf")},Re=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function G(e){let i;const s=Array.isArray(e);if(e instanceof Date)i=new Date(e);else if(e instanceof Set)i=new Set(e);else if(!(Re&&(e instanceof Blob||e instanceof FileList))&&(s||k(e)))if(i=s?[]:{},!s&&!Kt(e))i=e;else for(const t in e)e.hasOwnProperty(t)&&(i[t]=G(e[t]));else return e;return i}var fe=e=>Array.isArray(e)?e.filter(Boolean):[],E=e=>e===void 0,d=(e,i,s)=>{if(!i||!k(e))return s;const t=fe(i.split(/[,[\].]+?/)).reduce((o,a)=>O(o)?o:o[a],e);return E(t)||t===e?E(e[i])?s:e[i]:t},X=e=>typeof e=="boolean";const Qe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},M={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},z={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};K.createContext(null);var Jt=(e,i,s,t=!0)=>{const o={defaultValues:i._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const u=a;return i._proxyFormState[u]!==M.all&&(i._proxyFormState[u]=!t||M.all),e[u]}});return o},N=e=>k(e)&&!Object.keys(e).length,Yt=(e,i,s,t)=>{s(e);const{name:o,...a}=e;return N(a)||Object.keys(a).length>=Object.keys(i).length||Object.keys(a).find(u=>i[u]===M.all)},De=e=>Array.isArray(e)?e:[e];function Qt(e){const i=K.useRef(e);i.current=e,K.useEffect(()=>{const s=!e.disabled&&i.current.subject&&i.current.subject.subscribe({next:i.current.next});return()=>{s&&s.unsubscribe()}},[e.disabled])}var W=e=>typeof e=="string",Xt=(e,i,s,t,o)=>W(e)?(t&&i.watch.add(e),d(s,e,o)):Array.isArray(e)?e.map(a=>(t&&i.watch.add(a),d(s,a))):(t&&(i.watchAll=!0),s),Ne=e=>/^\w*$/.test(e),ft=e=>fe(e.replace(/["|']|\]/g,"").split(/\.|\[/));function V(e,i,s){let t=-1;const o=Ne(i)?[i]:ft(i),a=o.length,u=a-1;for(;++ti?{...s[e],types:{...s[e]&&s[e].types?s[e].types:{},[t]:o||!0}}:{};const Oe=(e,i,s)=>{for(const t of s||Object.keys(e)){const o=d(e,t);if(o){const{_f:a,...u}=o;if(a&&i(a.name)){if(a.ref.focus){a.ref.focus();break}else if(a.refs&&a.refs[0].focus){a.refs[0].focus();break}}else k(u)&&Oe(u,i)}}};var Xe=e=>({isOnSubmit:!e||e===M.onSubmit,isOnBlur:e===M.onBlur,isOnChange:e===M.onChange,isOnAll:e===M.all,isOnTouch:e===M.onTouched}),Ze=(e,i,s)=>!s&&(i.watchAll||i.watch.has(e)||[...i.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),Zt=(e,i,s)=>{const t=fe(d(e,s));return V(t,"root",i[s]),V(e,s,t),e},Pe=e=>e.type==="file",J=e=>typeof e=="function",he=e=>{if(!Re)return!1;const i=e?e.ownerDocument:0;return e instanceof(i&&i.defaultView?i.defaultView.HTMLElement:HTMLElement)},ye=e=>W(e),Me=e=>e.type==="radio",ge=e=>e instanceof RegExp;const et={value:!1,isValid:!1},tt={value:!0,isValid:!0};var yt=e=>{if(Array.isArray(e)){if(e.length>1){const i=e.filter(s=>s&&s.checked&&!s.disabled).map(s=>s.value);return{value:i,isValid:!!i.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!E(e[0].attributes.value)?E(e[0].value)||e[0].value===""?tt:{value:e[0].value,isValid:!0}:tt:et}return et};const rt={isValid:!1,value:null};var ht=e=>Array.isArray(e)?e.reduce((i,s)=>s&&s.checked&&!s.disabled?{isValid:!0,value:s.value}:i,rt):rt;function st(e,i,s="validate"){if(ye(e)||Array.isArray(e)&&e.every(ye)||X(e)&&!e)return{type:s,message:ye(e)?e:"",ref:i}}var se=e=>k(e)&&!ge(e)?e:{value:e,message:""},it=async(e,i,s,t,o)=>{const{ref:a,refs:u,required:g,maxLength:v,minLength:w,min:B,max:A,pattern:p,validate:U,name:C,valueAsNumber:me,mount:de,disabled:pe}=e._f,m=d(i,C);if(!de||pe)return{};const P=u?u[0]:a,H=_=>{t&&P.reportValidity&&(P.setCustomValidity(X(_)?"":_||""),P.reportValidity())},j={},ne=Me(a),te=ce(a),be=ne||te,I=(me||Pe(a))&&E(a.value)&&E(m)||he(a)&&a.value===""||m===""||Array.isArray(m)&&!m.length,Y=dt.bind(null,C,s,j),$=(_,b,D,L=z.maxLength,R=z.minLength)=>{const q=_?b:D;j[C]={type:_?L:R,message:q,ref:a,...Y(_?L:R,q)}};if(o?!Array.isArray(m)||!m.length:g&&(!be&&(I||O(m))||X(m)&&!m||te&&!yt(u).isValid||ne&&!ht(u).isValid)){const{value:_,message:b}=ye(g)?{value:!!g,message:g}:se(g);if(_&&(j[C]={type:z.required,message:b,ref:P,...Y(z.required,b)},!s))return H(b),j}if(!I&&(!O(B)||!O(A))){let _,b;const D=se(A),L=se(B);if(!O(m)&&!isNaN(m)){const R=a.valueAsNumber||m&&+m;O(D.value)||(_=R>D.value),O(L.value)||(b=Rnew Date(new Date().toDateString()+" "+oe),Q=a.type=="time",ae=a.type=="week";W(D.value)&&m&&(_=Q?q(m)>q(D.value):ae?m>D.value:R>new Date(D.value)),W(L.value)&&m&&(b=Q?q(m)+_.value,L=!O(b.value)&&m.length<+b.value;if((D||L)&&($(D,_.message,b.message),!s))return H(j[C].message),j}if(p&&!I&&W(m)){const{value:_,message:b}=se(p);if(ge(_)&&!m.match(_)&&(j[C]={type:z.pattern,message:b,ref:a,...Y(z.pattern,b)},!s))return H(b),j}if(U){if(J(U)){const _=await U(m,i),b=st(_,P);if(b&&(j[C]={...b,...Y(z.validate,b.message)},!s))return H(b.message),j}else if(k(U)){let _={};for(const b in U){if(!N(_)&&!s)break;const D=st(await U[b](m,i),P,b);D&&(_={...D,...Y(b,D.message)},H(D.message),s&&(j[C]=_))}if(!N(_)&&(j[C]={ref:P,..._},!s))return j}}return H(!0),j};function er(e,i){const s=i.slice(0,-1).length;let t=0;for(;t{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}}var ve=e=>O(e)||!ct(e);function Z(e,i){if(ve(e)||ve(i))return e===i;if(ie(e)&&ie(i))return e.getTime()===i.getTime();const s=Object.keys(e),t=Object.keys(i);if(s.length!==t.length)return!1;for(const o of s){const a=e[o];if(!t.includes(o))return!1;if(o!=="ref"){const u=i[o];if(ie(a)&&ie(u)||k(a)&&k(u)||Array.isArray(a)&&Array.isArray(u)?!Z(a,u):a!==u)return!1}}return!0}var gt=e=>e.type==="select-multiple",rr=e=>Me(e)||ce(e),Ee=e=>he(e)&&e.isConnected,vt=e=>{for(const i in e)if(J(e[i]))return!0;return!1};function xe(e,i={}){const s=Array.isArray(e);if(k(e)||s)for(const t in e)Array.isArray(e[t])||k(e[t])&&!vt(e[t])?(i[t]=Array.isArray(e[t])?[]:{},xe(e[t],i[t])):O(e[t])||(i[t]=!0);return i}function xt(e,i,s){const t=Array.isArray(e);if(k(e)||t)for(const o in e)Array.isArray(e[o])||k(e[o])&&!vt(e[o])?E(i)||ve(s[o])?s[o]=Array.isArray(e[o])?xe(e[o],[]):{...xe(e[o])}:xt(e[o],O(i)?{}:i[o],s[o]):s[o]=!Z(e[o],i[o]);return s}var ke=(e,i)=>xt(e,i,xe(i)),mt=(e,{valueAsNumber:i,valueAsDate:s,setValueAs:t})=>E(e)?e:i?e===""?NaN:e&&+e:s&&W(e)?new Date(e):t?t(e):e;function je(e){const i=e.ref;if(!(e.refs?e.refs.every(s=>s.disabled):i.disabled))return Pe(i)?i.files:Me(i)?ht(e.refs).value:gt(i)?[...i.selectedOptions].map(({value:s})=>s):ce(i)?yt(e.refs).value:mt(E(i.value)?e.ref.value:i.value,e)}var sr=(e,i,s,t)=>{const o={};for(const a of e){const u=d(i,a);u&&V(o,a,u._f)}return{criteriaMode:s,names:[...e],fields:o,shouldUseNativeValidation:t}},le=e=>E(e)?e:ge(e)?e.source:k(e)?ge(e.value)?e.value.source:e.value:e,ir=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function nt(e,i,s){const t=d(e,s);if(t||Ne(s))return{error:t,name:s};const o=s.split(".");for(;o.length;){const a=o.join("."),u=d(i,a),g=d(e,a);if(u&&!Array.isArray(u)&&s!==a)return{name:s};if(g&&g.type)return{name:a,error:g};o.pop()}return{name:s}}var nr=(e,i,s,t,o)=>o.isOnAll?!1:!s&&o.isOnTouch?!(i||e):(s?t.isOnBlur:o.isOnBlur)?!e:(s?t.isOnChange:o.isOnChange)?e:!0,ar=(e,i)=>!fe(d(e,i)).length&&T(e,i);const or={mode:M.onSubmit,reValidateMode:M.onChange,shouldFocusError:!0};function lr(e={},i){let s={...or,...e},t={submitCount:0,isDirty:!1,isLoading:J(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},o={},a=k(s.defaultValues)||k(s.values)?G(s.defaultValues||s.values)||{}:{},u=s.shouldUnregister?{}:G(a),g={action:!1,mount:!1,watch:!1},v={mount:new Set,unMount:new Set,array:new Set,watch:new Set},w,B=0;const A={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:Se(),array:Se(),state:Se()},U=e.resetOptions&&e.resetOptions.keepDirtyValues,C=Xe(s.mode),me=Xe(s.reValidateMode),de=s.criteriaMode===M.all,pe=r=>n=>{clearTimeout(B),B=setTimeout(r,n)},m=async r=>{if(A.isValid||r){const n=s.resolver?N((await I()).errors):await $(o,!0);n!==t.isValid&&p.state.next({isValid:n})}},P=r=>A.isValidating&&p.state.next({isValidating:r}),H=(r,n=[],l,y,f=!0,c=!0)=>{if(y&&l){if(g.action=!0,c&&Array.isArray(d(o,r))){const h=l(d(o,r),y.argA,y.argB);f&&V(o,r,h)}if(c&&Array.isArray(d(t.errors,r))){const h=l(d(t.errors,r),y.argA,y.argB);f&&V(t.errors,r,h),ar(t.errors,r)}if(A.touchedFields&&c&&Array.isArray(d(t.touchedFields,r))){const h=l(d(t.touchedFields,r),y.argA,y.argB);f&&V(t.touchedFields,r,h)}A.dirtyFields&&(t.dirtyFields=ke(a,u)),p.state.next({name:r,isDirty:b(r,n),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else V(u,r,n)},j=(r,n)=>{V(t.errors,r,n),p.state.next({errors:t.errors})},ne=(r,n,l,y)=>{const f=d(o,r);if(f){const c=d(u,r,E(l)?d(a,r):l);E(c)||y&&y.defaultChecked||n?V(u,r,n?c:je(f._f)):R(r,c),g.mount&&m()}},te=(r,n,l,y,f)=>{let c=!1,h=!1;const F={name:r};if(!l||y){A.isDirty&&(h=t.isDirty,t.isDirty=F.isDirty=b(),c=h!==F.isDirty);const S=Z(d(a,r),n);h=d(t.dirtyFields,r),S?T(t.dirtyFields,r):V(t.dirtyFields,r,!0),F.dirtyFields=t.dirtyFields,c=c||A.dirtyFields&&h!==!S}if(l){const S=d(t.touchedFields,r);S||(V(t.touchedFields,r,l),F.touchedFields=t.touchedFields,c=c||A.touchedFields&&S!==l)}return c&&f&&p.state.next(F),c?F:{}},be=(r,n,l,y)=>{const f=d(t.errors,r),c=A.isValid&&X(n)&&t.isValid!==n;if(e.delayError&&l?(w=pe(()=>j(r,l)),w(e.delayError)):(clearTimeout(B),w=null,l?V(t.errors,r,l):T(t.errors,r)),(l?!Z(f,l):f)||!N(y)||c){const h={...y,...c&&X(n)?{isValid:n}:{},errors:t.errors,name:r};t={...t,...h},p.state.next(h)}P(!1)},I=async r=>s.resolver(u,s.context,sr(r||v.mount,o,s.criteriaMode,s.shouldUseNativeValidation)),Y=async r=>{const{errors:n}=await I(r);if(r)for(const l of r){const y=d(n,l);y?V(t.errors,l,y):T(t.errors,l)}else t.errors=n;return n},$=async(r,n,l={valid:!0})=>{for(const y in r){const f=r[y];if(f){const{_f:c,...h}=f;if(c){const F=v.array.has(c.name),S=await it(f,u,de,s.shouldUseNativeValidation&&!n,F);if(S[c.name]&&(l.valid=!1,n))break;!n&&(d(S,c.name)?F?Zt(t.errors,S,c.name):V(t.errors,c.name,S[c.name]):T(t.errors,c.name))}h&&await $(h,n,l)}}return l.valid},_=()=>{for(const r of v.unMount){const n=d(o,r);n&&(n._f.refs?n._f.refs.every(l=>!Ee(l)):!Ee(n._f.ref))&&_e(r)}v.unMount=new Set},b=(r,n)=>(r&&n&&V(u,r,n),!Z(Be(),a)),D=(r,n,l)=>Xt(r,v,{...g.mount?u:E(n)?a:W(r)?{[r]:n}:n},l,n),L=r=>fe(d(g.mount?u:a,r,e.shouldUnregister?d(a,r,[]):[])),R=(r,n,l={})=>{const y=d(o,r);let f=n;if(y){const c=y._f;c&&(!c.disabled&&V(u,r,mt(n,c)),f=he(c.ref)&&O(n)?"":n,gt(c.ref)?[...c.ref.options].forEach(h=>h.selected=f.includes(h.value)):c.refs?ce(c.ref)?c.refs.length>1?c.refs.forEach(h=>(!h.defaultChecked||!h.disabled)&&(h.checked=Array.isArray(f)?!!f.find(F=>F===h.value):f===h.value)):c.refs[0]&&(c.refs[0].checked=!!f):c.refs.forEach(h=>h.checked=h.value===f):Pe(c.ref)?c.ref.value="":(c.ref.value=f,c.ref.type||p.values.next({name:r,values:{...u}})))}(l.shouldDirty||l.shouldTouch)&&te(r,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&oe(r)},q=(r,n,l)=>{for(const y in n){const f=n[y],c=`${r}.${y}`,h=d(o,c);(v.array.has(r)||!ve(f)||h&&!h._f)&&!ie(f)?q(c,f,l):R(c,f,l)}},Q=(r,n,l={})=>{const y=d(o,r),f=v.array.has(r),c=G(n);V(u,r,c),f?(p.array.next({name:r,values:{...u}}),(A.isDirty||A.dirtyFields)&&l.shouldDirty&&p.state.next({name:r,dirtyFields:ke(a,u),isDirty:b(r,c)})):y&&!y._f&&!O(c)?q(r,c,l):R(r,c,l),Ze(r,v)&&p.state.next({...t}),p.values.next({name:r,values:{...u}}),!g.mount&&i()},ae=async r=>{const n=r.target;let l=n.name,y=!0;const f=d(o,l),c=()=>n.type?je(f._f):$t(r);if(f){let h,F;const S=c(),re=r.type===Qe.BLUR||r.type===Qe.FOCUS_OUT,Ft=!ir(f._f)&&!s.resolver&&!d(t.errors,l)&&!f._f.deps||nr(re,d(t.touchedFields,l),t.isSubmitted,me,C),Ae=Ze(l,v,re);V(u,l,S),re?(f._f.onBlur&&f._f.onBlur(r),w&&w(0)):f._f.onChange&&f._f.onChange(r);const Fe=te(l,S,re,!1),wt=!N(Fe)||Ae;if(!re&&p.values.next({name:l,type:r.type,values:{...u}}),Ft)return A.isValid&&m(),wt&&p.state.next({name:l,...Ae?{}:Fe});if(!re&&Ae&&p.state.next({...t}),P(!0),s.resolver){const{errors:Ge}=await I([l]),Dt=nt(t.errors,o,l),Ke=nt(Ge,o,Dt.name||l);h=Ke.error,l=Ke.name,F=N(Ge)}else h=(await it(f,u,de,s.shouldUseNativeValidation))[l],y=Number.isNaN(S)||S===d(u,l,S),y&&(h?F=!1:A.isValid&&(F=await $(o,!0)));y&&(f._f.deps&&oe(f._f.deps),be(l,F,h,Fe))}},oe=async(r,n={})=>{let l,y;const f=De(r);if(P(!0),s.resolver){const c=await Y(E(r)?r:f);l=N(c),y=r?!f.some(h=>d(c,h)):l}else r?(y=(await Promise.all(f.map(async c=>{const h=d(o,c);return await $(h&&h._f?{[c]:h}:h)}))).every(Boolean),!(!y&&!t.isValid)&&m()):y=l=await $(o);return p.state.next({...!W(r)||A.isValid&&l!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:l}:{},errors:t.errors,isValidating:!1}),n.shouldFocus&&!y&&Oe(o,c=>c&&d(t.errors,c),r?f:v.mount),y},Be=r=>{const n={...a,...g.mount?u:{}};return E(r)?n:W(r)?d(n,r):r.map(l=>d(n,l))},Ue=(r,n)=>({invalid:!!d((n||t).errors,r),isDirty:!!d((n||t).dirtyFields,r),isTouched:!!d((n||t).touchedFields,r),error:d((n||t).errors,r)}),_t=r=>{r&&De(r).forEach(n=>T(t.errors,n)),p.state.next({errors:r?t.errors:{}})},Ie=(r,n,l)=>{const y=(d(o,r,{_f:{}})._f||{}).ref;V(t.errors,r,{...n,ref:y}),p.state.next({name:r,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&y&&y.focus&&y.focus()},Vt=(r,n)=>J(r)?p.values.subscribe({next:l=>r(D(void 0,n),l)}):D(r,n,!0),_e=(r,n={})=>{for(const l of r?De(r):v.mount)v.mount.delete(l),v.array.delete(l),n.keepValue||(T(o,l),T(u,l)),!n.keepError&&T(t.errors,l),!n.keepDirty&&T(t.dirtyFields,l),!n.keepTouched&&T(t.touchedFields,l),!s.shouldUnregister&&!n.keepDefaultValue&&T(a,l);p.values.next({values:{...u}}),p.state.next({...t,...n.keepDirty?{isDirty:b()}:{}}),!n.keepIsValid&&m()},qe=({disabled:r,name:n,field:l,fields:y})=>{if(X(r)){const f=r?void 0:d(u,n,je(l?l._f:d(y,n)._f));V(u,n,f),te(n,f,!1,!1,!0)}},Ve=(r,n={})=>{let l=d(o,r);const y=X(n.disabled);return V(o,r,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:r}},name:r,mount:!0,...n}}),v.mount.add(r),l?qe({field:l,disabled:n.disabled,name:r}):ne(r,!0,n.value),{...y?{disabled:n.disabled}:{},...s.progressive?{required:!!n.required,min:le(n.min),max:le(n.max),minLength:le(n.minLength),maxLength:le(n.maxLength),pattern:le(n.pattern)}:{},name:r,onChange:ae,onBlur:ae,ref:f=>{if(f){Ve(r,n),l=d(o,r);const c=E(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,h=rr(c),F=l._f.refs||[];if(h?F.find(S=>S===c):c===l._f.ref)return;V(o,r,{_f:{...l._f,...h?{refs:[...F.filter(Ee),c,...Array.isArray(d(a,r))?[{}]:[]],ref:{type:c.type,name:r}}:{ref:c}}}),ne(r,!1,void 0,c)}else l=d(o,r,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||n.shouldUnregister)&&!(Gt(v.array,r)&&g.action)&&v.unMount.add(r)}}},We=()=>s.shouldFocusError&&Oe(o,r=>r&&d(t.errors,r),v.mount),He=(r,n)=>async l=>{l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let y=G(u);if(p.state.next({isSubmitting:!0}),s.resolver){const{errors:f,values:c}=await I();t.errors=f,y=c}else await $(o);T(t.errors,"root"),N(t.errors)?(p.state.next({errors:{}}),await r(y,l)):(n&&await n({...t.errors},l),We(),setTimeout(We)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:N(t.errors),submitCount:t.submitCount+1,errors:t.errors})},At=(r,n={})=>{d(o,r)&&(E(n.defaultValue)?Q(r,d(a,r)):(Q(r,n.defaultValue),V(a,r,n.defaultValue)),n.keepTouched||T(t.touchedFields,r),n.keepDirty||(T(t.dirtyFields,r),t.isDirty=n.defaultValue?b(r,d(a,r)):b()),n.keepError||(T(t.errors,r),A.isValid&&m()),p.state.next({...t}))},$e=(r,n={})=>{const l=r?G(r):a,y=G(l),f=r&&!N(r)?y:a;if(n.keepDefaultValues||(a=l),!n.keepValues){if(n.keepDirtyValues||U)for(const c of v.mount)d(t.dirtyFields,c)?V(f,c,d(u,c)):Q(c,d(f,c));else{if(Re&&E(r))for(const c of v.mount){const h=d(o,c);if(h&&h._f){const F=Array.isArray(h._f.refs)?h._f.refs[0]:h._f.ref;if(he(F)){const S=F.closest("form");if(S){S.reset();break}}}}o={}}u=e.shouldUnregister?n.keepDefaultValues?G(a):{}:G(f),p.array.next({values:{...f}}),p.values.next({values:{...f}})}v={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!g.mount&&i(),g.mount=!A.isValid||!!n.keepIsValid,g.watch=!!e.shouldUnregister,p.state.next({submitCount:n.keepSubmitCount?t.submitCount:0,isDirty:n.keepDirty?t.isDirty:!!(n.keepDefaultValues&&!Z(r,a)),isSubmitted:n.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:n.keepDirtyValues?t.dirtyFields:n.keepDefaultValues&&r?ke(a,r):{},touchedFields:n.keepTouched?t.touchedFields:{},errors:n.keepErrors?t.errors:{},isSubmitSuccessful:n.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},ze=(r,n)=>$e(J(r)?r(u):r,n);return{control:{register:Ve,unregister:_e,getFieldState:Ue,handleSubmit:He,setError:Ie,_executeSchema:I,_getWatch:D,_getDirty:b,_updateValid:m,_removeUnmounted:_,_updateFieldArray:H,_updateDisabledField:qe,_getFieldArray:L,_reset:$e,_resetDefaultValues:()=>J(s.defaultValues)&&s.defaultValues().then(r=>{ze(r,s.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:r=>{t={...t,...r}},_subjects:p,_proxyFormState:A,get _fields(){return o},get _formValues(){return u},get _state(){return g},set _state(r){g=r},get _defaultValues(){return a},get _names(){return v},set _names(r){v=r},get _formState(){return t},set _formState(r){t=r},get _options(){return s},set _options(r){s={...s,...r}}},trigger:oe,register:Ve,handleSubmit:He,watch:Vt,setValue:Q,getValues:Be,reset:ze,resetField:At,clearErrors:_t,unregister:_e,setError:Ie,setFocus:(r,n={})=>{const l=d(o,r),y=l&&l._f;if(y){const f=y.refs?y.refs[0]:y.ref;f.focus&&(f.focus(),n.shouldSelect&&f.select())}},getFieldState:Ue}}function ur(e={}){const i=K.useRef(),s=K.useRef(),[t,o]=K.useState({isDirty:!1,isValidating:!1,isLoading:J(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:J(e.defaultValues)?void 0:e.defaultValues});i.current||(i.current={...lr(e,()=>o(u=>({...u}))),formState:t});const a=i.current.control;return a._options=e,Qt({subject:a._subjects.state,next:u=>{Yt(u,a._proxyFormState,a._updateFormState)&&o({...a._formState})}}),K.useEffect(()=>{e.values&&!Z(e.values,s.current)?(a._reset(e.values,a._options.resetOptions),s.current=e.values):a._resetDefaultValues()},[e.values,a]),K.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),i.current.formState=Jt(t,a),i.current}var at=function(e,i,s){if(e&&"reportValidity"in e){var t=d(s,i);e.setCustomValidity(t&&t.message||""),e.reportValidity()}},pt=function(e,i){var s=function(o){var a=i.fields[o];a&&a.ref&&"reportValidity"in a.ref?at(a.ref,o,e):a.refs&&a.refs.forEach(function(u){return at(u,o,e)})};for(var t in i.fields)s(t)},cr=function(e,i){i.shouldUseNativeValidation&&pt(e,i);var s={};for(var t in e){var o=d(i.fields,t),a=Object.assign(e[t]||{},{ref:o&&o.ref});if(dr(i.names||Object.keys(e),t)){var u=Object.assign({},fr(d(s,t)));V(u,"root",a),V(s,t,u)}else V(s,t,a)}return s},fr=function(e){return Array.isArray(e)?e.filter(Boolean):[]},dr=function(e,i){return e.some(function(s){return s.startsWith(i+".")})},yr=function(e,i){for(var s={};e.length;){var t=e[0],o=t.code,a=t.message,u=t.path.join(".");if(!s[u])if("unionErrors"in t){var g=t.unionErrors[0].errors[0];s[u]={message:g.message,type:g.code}}else s[u]={message:a,type:o};if("unionErrors"in t&&t.unionErrors.forEach(function(B){return B.errors.forEach(function(A){return e.push(A)})}),i){var v=s[u].types,w=v&&v[t.code];s[u]=dt(u,i,s,o,w?[].concat(w,t.message):t.message)}e.shift()}return s},hr=function(e,i,s){return s===void 0&&(s={}),function(t,o,a){try{return Promise.resolve(function(u,g){try{var v=Promise.resolve(e[s.mode==="sync"?"parse":"parseAsync"](t,i)).then(function(w){return a.shouldUseNativeValidation&&pt({},a),{errors:{},values:s.raw?t:w}})}catch(w){return g(w)}return v&&v.then?v.then(void 0,g):v}(0,function(u){if(function(g){return g.errors!=null}(u))return{values:{},errors:cr(yr(u.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw u}))}catch(u){return Promise.reject(u)}}};const gr=we.object({name:we.string().min(3),description:we.string()}),bt=({project:e,action:i})=>{var A,p;const t=Ce().state!=="idle",{setFocus:o,register:a,handleSubmit:u,formState:{errors:g,dirtyFields:v}}=ur({resolver:hr(gr),defaultValues:{name:e.name||"",description:e.description||""}}),{palette:w}=Tt(),B=ot();return ue.useEffect(()=>o("name"),[o]),x.jsx(x.Fragment,{children:x.jsxs(Ot,{onSubmit:u(({name:U,description:C})=>B({...e,name:U,description:C,action:i},{method:"put",replace:!0,encType:"application/json"})),style:{opacity:t?.5:1},children:[x.jsx(Je,{...a("name"),error:!!g.name,helperText:(A=g.name)==null?void 0:A.message,placeholder:"Name",InputProps:{style:{color:w.primary.main,fontSize:"20px",fontWeight:"500"}},disabled:t,variant:"standard"}),x.jsx(Je,{...a("description"),error:!!g.description,helperText:(p=g.description)==null?void 0:p.message,placeholder:"Description",disabled:t,fullWidth:!0,variant:"standard"}),x.jsx(ee,{sx:{display:"flex",justifyContent:"right"},children:x.jsx(Ct,{variant:"outlined",disabled:t||Object.keys(v).length===0||Object.keys(g).length>0,style:{marginTop:"10px"},color:"primary",type:"submit",children:"Save"})})]})})},vr=({project:e})=>x.jsxs(x.Fragment,{children:[x.jsx(Lt,{component:Rt,to:`projects/${e.id}`,children:x.jsx(Te,{variant:"h6",children:e.name})}),x.jsx(Te,{style:{whiteSpace:"pre-line"},variant:"body1",children:e.description})]}),xr=({project:e})=>{const[i,s]=ue.useState(!1),o=Ce().state!=="idle",a=ot();return ue.useEffect(()=>s(!1),[e]),x.jsxs(St,{sx:{m:1,p:2,position:"relative","&:hover .action-buttons":{opacity:1}},children:[x.jsx(ee,{style:{position:"absolute",top:"5px",right:"5px"},children:x.jsxs(ee,{sx:{opacity:0,transition:u=>u.transitions.create("opacity",{duration:u.transitions.duration.enteringScreen})},className:"action-buttons",display:"flex",columnGap:1,children:[x.jsx(Et,{disabled:o||i,onClick:()=>{confirm("Are you sure you want to delete this project?")===!0&&a({projectId:e.id,action:"delete-project"},{method:"post",replace:!0,encType:"application/json"})},children:x.jsx(ut,{})}),x.jsx(lt,{disabled:o,color:"primary",value:"edit-mode",selected:i,size:"small",sx:{border:"none",borderRadius:"50%"},onChange:()=>s(u=>!u),children:x.jsx(Mt,{})})]})}),i?x.jsx(bt,{project:e,action:"edit-project"}):x.jsx(vr,{project:e})]})},mr=()=>{const[e,i]=Ye(!1),[s,t]=Ye(!1),o=Ce(),a=o.state!=="idle";return ue.useEffect(()=>{o.state==="submitting"&&t(!0)},[o.state==="submitting"]),ue.useEffect(()=>{s&&o.state==="idle"&&(i(!1),t(!1))},[s,o.state==="idle"]),x.jsxs(ee,{py:2,children:[x.jsx(ee,{display:"flex",justifyContent:"center",children:x.jsx(kt,{title:"Create new project",children:x.jsx(lt,{size:"small",selected:e,disabled:a,color:"primary",value:"check",sx:{border:"none",borderRadius:"50%"},onChange:()=>i(),children:x.jsx(jt,{})})})}),e&&x.jsx(ee,{p:3,display:"flex",flexDirection:"column",rowGap:1,children:x.jsx(bt,{project:{name:"",description:""},action:"create-new-project"})})]})},Dr=()=>{const e=Nt();return x.jsxs(x.Fragment,{children:[x.jsx(Te,{align:"center",variant:"h5",children:e.length>0?"Project List":"You don't have any projects yet"}),x.jsxs(ee,{m:"auto",mt:2,maxWidth:600,children:[x.jsx(mr,{}),x.jsx(Pt,{container:!0,direction:"column",justifyContent:"center",alignItems:"stretch",children:e.map(i=>x.jsx(K.Fragment,{children:x.jsx(xr,{project:i})},i.id))})]})]})};export{Dr as Component}; +import{j as x,R as K,z as we,r as ue,K as Ce,_ as ot,$ as St,B as ee,I as Et,a0 as lt,a1 as kt,a2 as jt,a3 as Tt,a4 as Ot,a5 as Je,U as Ct,H as Lt,J as Rt,T as Te,V as Nt,G as Pt}from"./vendor-Bhc2M4pH.js";import{d as Mt}from"./Edit-BLuUL5Mi.js";import{r as Bt,i as Ut}from"./createSvgIcon-BCx0yKii.js";import{u as Ye}from"./index-CAXTGTpX.js";var Le={},It=Ut;Object.defineProperty(Le,"__esModule",{value:!0});var ut=Le.default=void 0,qt=It(Bt()),Wt=x,Ht=(0,qt.default)((0,Wt.jsx)("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");ut=Le.default=Ht;var ce=e=>e.type==="checkbox",ie=e=>e instanceof Date,O=e=>e==null;const ct=e=>typeof e=="object";var k=e=>!O(e)&&!Array.isArray(e)&&ct(e)&&!ie(e),$t=e=>k(e)&&e.target?ce(e.target)?e.target.checked:e.target.value:e,zt=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Gt=(e,i)=>e.has(zt(i)),Kt=e=>{const i=e.constructor&&e.constructor.prototype;return k(i)&&i.hasOwnProperty("isPrototypeOf")},Re=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function G(e){let i;const s=Array.isArray(e);if(e instanceof Date)i=new Date(e);else if(e instanceof Set)i=new Set(e);else if(!(Re&&(e instanceof Blob||e instanceof FileList))&&(s||k(e)))if(i=s?[]:{},!s&&!Kt(e))i=e;else for(const t in e)e.hasOwnProperty(t)&&(i[t]=G(e[t]));else return e;return i}var fe=e=>Array.isArray(e)?e.filter(Boolean):[],E=e=>e===void 0,d=(e,i,s)=>{if(!i||!k(e))return s;const t=fe(i.split(/[,[\].]+?/)).reduce((o,a)=>O(o)?o:o[a],e);return E(t)||t===e?E(e[i])?s:e[i]:t},X=e=>typeof e=="boolean";const Qe={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},M={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},z={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};K.createContext(null);var Jt=(e,i,s,t=!0)=>{const o={defaultValues:i._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const u=a;return i._proxyFormState[u]!==M.all&&(i._proxyFormState[u]=!t||M.all),e[u]}});return o},N=e=>k(e)&&!Object.keys(e).length,Yt=(e,i,s,t)=>{s(e);const{name:o,...a}=e;return N(a)||Object.keys(a).length>=Object.keys(i).length||Object.keys(a).find(u=>i[u]===M.all)},De=e=>Array.isArray(e)?e:[e];function Qt(e){const i=K.useRef(e);i.current=e,K.useEffect(()=>{const s=!e.disabled&&i.current.subject&&i.current.subject.subscribe({next:i.current.next});return()=>{s&&s.unsubscribe()}},[e.disabled])}var W=e=>typeof e=="string",Xt=(e,i,s,t,o)=>W(e)?(t&&i.watch.add(e),d(s,e,o)):Array.isArray(e)?e.map(a=>(t&&i.watch.add(a),d(s,a))):(t&&(i.watchAll=!0),s),Ne=e=>/^\w*$/.test(e),ft=e=>fe(e.replace(/["|']|\]/g,"").split(/\.|\[/));function V(e,i,s){let t=-1;const o=Ne(i)?[i]:ft(i),a=o.length,u=a-1;for(;++ti?{...s[e],types:{...s[e]&&s[e].types?s[e].types:{},[t]:o||!0}}:{};const Oe=(e,i,s)=>{for(const t of s||Object.keys(e)){const o=d(e,t);if(o){const{_f:a,...u}=o;if(a&&i(a.name)){if(a.ref.focus){a.ref.focus();break}else if(a.refs&&a.refs[0].focus){a.refs[0].focus();break}}else k(u)&&Oe(u,i)}}};var Xe=e=>({isOnSubmit:!e||e===M.onSubmit,isOnBlur:e===M.onBlur,isOnChange:e===M.onChange,isOnAll:e===M.all,isOnTouch:e===M.onTouched}),Ze=(e,i,s)=>!s&&(i.watchAll||i.watch.has(e)||[...i.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),Zt=(e,i,s)=>{const t=fe(d(e,s));return V(t,"root",i[s]),V(e,s,t),e},Pe=e=>e.type==="file",J=e=>typeof e=="function",he=e=>{if(!Re)return!1;const i=e?e.ownerDocument:0;return e instanceof(i&&i.defaultView?i.defaultView.HTMLElement:HTMLElement)},ye=e=>W(e),Me=e=>e.type==="radio",ge=e=>e instanceof RegExp;const et={value:!1,isValid:!1},tt={value:!0,isValid:!0};var yt=e=>{if(Array.isArray(e)){if(e.length>1){const i=e.filter(s=>s&&s.checked&&!s.disabled).map(s=>s.value);return{value:i,isValid:!!i.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!E(e[0].attributes.value)?E(e[0].value)||e[0].value===""?tt:{value:e[0].value,isValid:!0}:tt:et}return et};const rt={isValid:!1,value:null};var ht=e=>Array.isArray(e)?e.reduce((i,s)=>s&&s.checked&&!s.disabled?{isValid:!0,value:s.value}:i,rt):rt;function st(e,i,s="validate"){if(ye(e)||Array.isArray(e)&&e.every(ye)||X(e)&&!e)return{type:s,message:ye(e)?e:"",ref:i}}var se=e=>k(e)&&!ge(e)?e:{value:e,message:""},it=async(e,i,s,t,o)=>{const{ref:a,refs:u,required:g,maxLength:v,minLength:w,min:B,max:A,pattern:p,validate:U,name:C,valueAsNumber:me,mount:de,disabled:pe}=e._f,m=d(i,C);if(!de||pe)return{};const P=u?u[0]:a,H=_=>{t&&P.reportValidity&&(P.setCustomValidity(X(_)?"":_||""),P.reportValidity())},j={},ne=Me(a),te=ce(a),be=ne||te,I=(me||Pe(a))&&E(a.value)&&E(m)||he(a)&&a.value===""||m===""||Array.isArray(m)&&!m.length,Y=dt.bind(null,C,s,j),$=(_,b,D,L=z.maxLength,R=z.minLength)=>{const q=_?b:D;j[C]={type:_?L:R,message:q,ref:a,...Y(_?L:R,q)}};if(o?!Array.isArray(m)||!m.length:g&&(!be&&(I||O(m))||X(m)&&!m||te&&!yt(u).isValid||ne&&!ht(u).isValid)){const{value:_,message:b}=ye(g)?{value:!!g,message:g}:se(g);if(_&&(j[C]={type:z.required,message:b,ref:P,...Y(z.required,b)},!s))return H(b),j}if(!I&&(!O(B)||!O(A))){let _,b;const D=se(A),L=se(B);if(!O(m)&&!isNaN(m)){const R=a.valueAsNumber||m&&+m;O(D.value)||(_=R>D.value),O(L.value)||(b=Rnew Date(new Date().toDateString()+" "+oe),Q=a.type=="time",ae=a.type=="week";W(D.value)&&m&&(_=Q?q(m)>q(D.value):ae?m>D.value:R>new Date(D.value)),W(L.value)&&m&&(b=Q?q(m)+_.value,L=!O(b.value)&&m.length<+b.value;if((D||L)&&($(D,_.message,b.message),!s))return H(j[C].message),j}if(p&&!I&&W(m)){const{value:_,message:b}=se(p);if(ge(_)&&!m.match(_)&&(j[C]={type:z.pattern,message:b,ref:a,...Y(z.pattern,b)},!s))return H(b),j}if(U){if(J(U)){const _=await U(m,i),b=st(_,P);if(b&&(j[C]={...b,...Y(z.validate,b.message)},!s))return H(b.message),j}else if(k(U)){let _={};for(const b in U){if(!N(_)&&!s)break;const D=st(await U[b](m,i),P,b);D&&(_={...D,...Y(b,D.message)},H(D.message),s&&(j[C]=_))}if(!N(_)&&(j[C]={ref:P,..._},!s))return j}}return H(!0),j};function er(e,i){const s=i.slice(0,-1).length;let t=0;for(;t{for(const a of e)a.next&&a.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(a=>a!==o)}}),unsubscribe:()=>{e=[]}}}var ve=e=>O(e)||!ct(e);function Z(e,i){if(ve(e)||ve(i))return e===i;if(ie(e)&&ie(i))return e.getTime()===i.getTime();const s=Object.keys(e),t=Object.keys(i);if(s.length!==t.length)return!1;for(const o of s){const a=e[o];if(!t.includes(o))return!1;if(o!=="ref"){const u=i[o];if(ie(a)&&ie(u)||k(a)&&k(u)||Array.isArray(a)&&Array.isArray(u)?!Z(a,u):a!==u)return!1}}return!0}var gt=e=>e.type==="select-multiple",rr=e=>Me(e)||ce(e),Ee=e=>he(e)&&e.isConnected,vt=e=>{for(const i in e)if(J(e[i]))return!0;return!1};function xe(e,i={}){const s=Array.isArray(e);if(k(e)||s)for(const t in e)Array.isArray(e[t])||k(e[t])&&!vt(e[t])?(i[t]=Array.isArray(e[t])?[]:{},xe(e[t],i[t])):O(e[t])||(i[t]=!0);return i}function xt(e,i,s){const t=Array.isArray(e);if(k(e)||t)for(const o in e)Array.isArray(e[o])||k(e[o])&&!vt(e[o])?E(i)||ve(s[o])?s[o]=Array.isArray(e[o])?xe(e[o],[]):{...xe(e[o])}:xt(e[o],O(i)?{}:i[o],s[o]):s[o]=!Z(e[o],i[o]);return s}var ke=(e,i)=>xt(e,i,xe(i)),mt=(e,{valueAsNumber:i,valueAsDate:s,setValueAs:t})=>E(e)?e:i?e===""?NaN:e&&+e:s&&W(e)?new Date(e):t?t(e):e;function je(e){const i=e.ref;if(!(e.refs?e.refs.every(s=>s.disabled):i.disabled))return Pe(i)?i.files:Me(i)?ht(e.refs).value:gt(i)?[...i.selectedOptions].map(({value:s})=>s):ce(i)?yt(e.refs).value:mt(E(i.value)?e.ref.value:i.value,e)}var sr=(e,i,s,t)=>{const o={};for(const a of e){const u=d(i,a);u&&V(o,a,u._f)}return{criteriaMode:s,names:[...e],fields:o,shouldUseNativeValidation:t}},le=e=>E(e)?e:ge(e)?e.source:k(e)?ge(e.value)?e.value.source:e.value:e,ir=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function nt(e,i,s){const t=d(e,s);if(t||Ne(s))return{error:t,name:s};const o=s.split(".");for(;o.length;){const a=o.join("."),u=d(i,a),g=d(e,a);if(u&&!Array.isArray(u)&&s!==a)return{name:s};if(g&&g.type)return{name:a,error:g};o.pop()}return{name:s}}var nr=(e,i,s,t,o)=>o.isOnAll?!1:!s&&o.isOnTouch?!(i||e):(s?t.isOnBlur:o.isOnBlur)?!e:(s?t.isOnChange:o.isOnChange)?e:!0,ar=(e,i)=>!fe(d(e,i)).length&&T(e,i);const or={mode:M.onSubmit,reValidateMode:M.onChange,shouldFocusError:!0};function lr(e={},i){let s={...or,...e},t={submitCount:0,isDirty:!1,isLoading:J(s.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},o={},a=k(s.defaultValues)||k(s.values)?G(s.defaultValues||s.values)||{}:{},u=s.shouldUnregister?{}:G(a),g={action:!1,mount:!1,watch:!1},v={mount:new Set,unMount:new Set,array:new Set,watch:new Set},w,B=0;const A={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:Se(),array:Se(),state:Se()},U=e.resetOptions&&e.resetOptions.keepDirtyValues,C=Xe(s.mode),me=Xe(s.reValidateMode),de=s.criteriaMode===M.all,pe=r=>n=>{clearTimeout(B),B=setTimeout(r,n)},m=async r=>{if(A.isValid||r){const n=s.resolver?N((await I()).errors):await $(o,!0);n!==t.isValid&&p.state.next({isValid:n})}},P=r=>A.isValidating&&p.state.next({isValidating:r}),H=(r,n=[],l,y,f=!0,c=!0)=>{if(y&&l){if(g.action=!0,c&&Array.isArray(d(o,r))){const h=l(d(o,r),y.argA,y.argB);f&&V(o,r,h)}if(c&&Array.isArray(d(t.errors,r))){const h=l(d(t.errors,r),y.argA,y.argB);f&&V(t.errors,r,h),ar(t.errors,r)}if(A.touchedFields&&c&&Array.isArray(d(t.touchedFields,r))){const h=l(d(t.touchedFields,r),y.argA,y.argB);f&&V(t.touchedFields,r,h)}A.dirtyFields&&(t.dirtyFields=ke(a,u)),p.state.next({name:r,isDirty:b(r,n),dirtyFields:t.dirtyFields,errors:t.errors,isValid:t.isValid})}else V(u,r,n)},j=(r,n)=>{V(t.errors,r,n),p.state.next({errors:t.errors})},ne=(r,n,l,y)=>{const f=d(o,r);if(f){const c=d(u,r,E(l)?d(a,r):l);E(c)||y&&y.defaultChecked||n?V(u,r,n?c:je(f._f)):R(r,c),g.mount&&m()}},te=(r,n,l,y,f)=>{let c=!1,h=!1;const F={name:r};if(!l||y){A.isDirty&&(h=t.isDirty,t.isDirty=F.isDirty=b(),c=h!==F.isDirty);const S=Z(d(a,r),n);h=d(t.dirtyFields,r),S?T(t.dirtyFields,r):V(t.dirtyFields,r,!0),F.dirtyFields=t.dirtyFields,c=c||A.dirtyFields&&h!==!S}if(l){const S=d(t.touchedFields,r);S||(V(t.touchedFields,r,l),F.touchedFields=t.touchedFields,c=c||A.touchedFields&&S!==l)}return c&&f&&p.state.next(F),c?F:{}},be=(r,n,l,y)=>{const f=d(t.errors,r),c=A.isValid&&X(n)&&t.isValid!==n;if(e.delayError&&l?(w=pe(()=>j(r,l)),w(e.delayError)):(clearTimeout(B),w=null,l?V(t.errors,r,l):T(t.errors,r)),(l?!Z(f,l):f)||!N(y)||c){const h={...y,...c&&X(n)?{isValid:n}:{},errors:t.errors,name:r};t={...t,...h},p.state.next(h)}P(!1)},I=async r=>s.resolver(u,s.context,sr(r||v.mount,o,s.criteriaMode,s.shouldUseNativeValidation)),Y=async r=>{const{errors:n}=await I(r);if(r)for(const l of r){const y=d(n,l);y?V(t.errors,l,y):T(t.errors,l)}else t.errors=n;return n},$=async(r,n,l={valid:!0})=>{for(const y in r){const f=r[y];if(f){const{_f:c,...h}=f;if(c){const F=v.array.has(c.name),S=await it(f,u,de,s.shouldUseNativeValidation&&!n,F);if(S[c.name]&&(l.valid=!1,n))break;!n&&(d(S,c.name)?F?Zt(t.errors,S,c.name):V(t.errors,c.name,S[c.name]):T(t.errors,c.name))}h&&await $(h,n,l)}}return l.valid},_=()=>{for(const r of v.unMount){const n=d(o,r);n&&(n._f.refs?n._f.refs.every(l=>!Ee(l)):!Ee(n._f.ref))&&_e(r)}v.unMount=new Set},b=(r,n)=>(r&&n&&V(u,r,n),!Z(Be(),a)),D=(r,n,l)=>Xt(r,v,{...g.mount?u:E(n)?a:W(r)?{[r]:n}:n},l,n),L=r=>fe(d(g.mount?u:a,r,e.shouldUnregister?d(a,r,[]):[])),R=(r,n,l={})=>{const y=d(o,r);let f=n;if(y){const c=y._f;c&&(!c.disabled&&V(u,r,mt(n,c)),f=he(c.ref)&&O(n)?"":n,gt(c.ref)?[...c.ref.options].forEach(h=>h.selected=f.includes(h.value)):c.refs?ce(c.ref)?c.refs.length>1?c.refs.forEach(h=>(!h.defaultChecked||!h.disabled)&&(h.checked=Array.isArray(f)?!!f.find(F=>F===h.value):f===h.value)):c.refs[0]&&(c.refs[0].checked=!!f):c.refs.forEach(h=>h.checked=h.value===f):Pe(c.ref)?c.ref.value="":(c.ref.value=f,c.ref.type||p.values.next({name:r,values:{...u}})))}(l.shouldDirty||l.shouldTouch)&&te(r,f,l.shouldTouch,l.shouldDirty,!0),l.shouldValidate&&oe(r)},q=(r,n,l)=>{for(const y in n){const f=n[y],c=`${r}.${y}`,h=d(o,c);(v.array.has(r)||!ve(f)||h&&!h._f)&&!ie(f)?q(c,f,l):R(c,f,l)}},Q=(r,n,l={})=>{const y=d(o,r),f=v.array.has(r),c=G(n);V(u,r,c),f?(p.array.next({name:r,values:{...u}}),(A.isDirty||A.dirtyFields)&&l.shouldDirty&&p.state.next({name:r,dirtyFields:ke(a,u),isDirty:b(r,c)})):y&&!y._f&&!O(c)?q(r,c,l):R(r,c,l),Ze(r,v)&&p.state.next({...t}),p.values.next({name:r,values:{...u}}),!g.mount&&i()},ae=async r=>{const n=r.target;let l=n.name,y=!0;const f=d(o,l),c=()=>n.type?je(f._f):$t(r);if(f){let h,F;const S=c(),re=r.type===Qe.BLUR||r.type===Qe.FOCUS_OUT,Ft=!ir(f._f)&&!s.resolver&&!d(t.errors,l)&&!f._f.deps||nr(re,d(t.touchedFields,l),t.isSubmitted,me,C),Ae=Ze(l,v,re);V(u,l,S),re?(f._f.onBlur&&f._f.onBlur(r),w&&w(0)):f._f.onChange&&f._f.onChange(r);const Fe=te(l,S,re,!1),wt=!N(Fe)||Ae;if(!re&&p.values.next({name:l,type:r.type,values:{...u}}),Ft)return A.isValid&&m(),wt&&p.state.next({name:l,...Ae?{}:Fe});if(!re&&Ae&&p.state.next({...t}),P(!0),s.resolver){const{errors:Ge}=await I([l]),Dt=nt(t.errors,o,l),Ke=nt(Ge,o,Dt.name||l);h=Ke.error,l=Ke.name,F=N(Ge)}else h=(await it(f,u,de,s.shouldUseNativeValidation))[l],y=Number.isNaN(S)||S===d(u,l,S),y&&(h?F=!1:A.isValid&&(F=await $(o,!0)));y&&(f._f.deps&&oe(f._f.deps),be(l,F,h,Fe))}},oe=async(r,n={})=>{let l,y;const f=De(r);if(P(!0),s.resolver){const c=await Y(E(r)?r:f);l=N(c),y=r?!f.some(h=>d(c,h)):l}else r?(y=(await Promise.all(f.map(async c=>{const h=d(o,c);return await $(h&&h._f?{[c]:h}:h)}))).every(Boolean),!(!y&&!t.isValid)&&m()):y=l=await $(o);return p.state.next({...!W(r)||A.isValid&&l!==t.isValid?{}:{name:r},...s.resolver||!r?{isValid:l}:{},errors:t.errors,isValidating:!1}),n.shouldFocus&&!y&&Oe(o,c=>c&&d(t.errors,c),r?f:v.mount),y},Be=r=>{const n={...a,...g.mount?u:{}};return E(r)?n:W(r)?d(n,r):r.map(l=>d(n,l))},Ue=(r,n)=>({invalid:!!d((n||t).errors,r),isDirty:!!d((n||t).dirtyFields,r),isTouched:!!d((n||t).touchedFields,r),error:d((n||t).errors,r)}),_t=r=>{r&&De(r).forEach(n=>T(t.errors,n)),p.state.next({errors:r?t.errors:{}})},Ie=(r,n,l)=>{const y=(d(o,r,{_f:{}})._f||{}).ref;V(t.errors,r,{...n,ref:y}),p.state.next({name:r,errors:t.errors,isValid:!1}),l&&l.shouldFocus&&y&&y.focus&&y.focus()},Vt=(r,n)=>J(r)?p.values.subscribe({next:l=>r(D(void 0,n),l)}):D(r,n,!0),_e=(r,n={})=>{for(const l of r?De(r):v.mount)v.mount.delete(l),v.array.delete(l),n.keepValue||(T(o,l),T(u,l)),!n.keepError&&T(t.errors,l),!n.keepDirty&&T(t.dirtyFields,l),!n.keepTouched&&T(t.touchedFields,l),!s.shouldUnregister&&!n.keepDefaultValue&&T(a,l);p.values.next({values:{...u}}),p.state.next({...t,...n.keepDirty?{isDirty:b()}:{}}),!n.keepIsValid&&m()},qe=({disabled:r,name:n,field:l,fields:y})=>{if(X(r)){const f=r?void 0:d(u,n,je(l?l._f:d(y,n)._f));V(u,n,f),te(n,f,!1,!1,!0)}},Ve=(r,n={})=>{let l=d(o,r);const y=X(n.disabled);return V(o,r,{...l||{},_f:{...l&&l._f?l._f:{ref:{name:r}},name:r,mount:!0,...n}}),v.mount.add(r),l?qe({field:l,disabled:n.disabled,name:r}):ne(r,!0,n.value),{...y?{disabled:n.disabled}:{},...s.progressive?{required:!!n.required,min:le(n.min),max:le(n.max),minLength:le(n.minLength),maxLength:le(n.maxLength),pattern:le(n.pattern)}:{},name:r,onChange:ae,onBlur:ae,ref:f=>{if(f){Ve(r,n),l=d(o,r);const c=E(f.value)&&f.querySelectorAll&&f.querySelectorAll("input,select,textarea")[0]||f,h=rr(c),F=l._f.refs||[];if(h?F.find(S=>S===c):c===l._f.ref)return;V(o,r,{_f:{...l._f,...h?{refs:[...F.filter(Ee),c,...Array.isArray(d(a,r))?[{}]:[]],ref:{type:c.type,name:r}}:{ref:c}}}),ne(r,!1,void 0,c)}else l=d(o,r,{}),l._f&&(l._f.mount=!1),(s.shouldUnregister||n.shouldUnregister)&&!(Gt(v.array,r)&&g.action)&&v.unMount.add(r)}}},We=()=>s.shouldFocusError&&Oe(o,r=>r&&d(t.errors,r),v.mount),He=(r,n)=>async l=>{l&&(l.preventDefault&&l.preventDefault(),l.persist&&l.persist());let y=G(u);if(p.state.next({isSubmitting:!0}),s.resolver){const{errors:f,values:c}=await I();t.errors=f,y=c}else await $(o);T(t.errors,"root"),N(t.errors)?(p.state.next({errors:{}}),await r(y,l)):(n&&await n({...t.errors},l),We(),setTimeout(We)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:N(t.errors),submitCount:t.submitCount+1,errors:t.errors})},At=(r,n={})=>{d(o,r)&&(E(n.defaultValue)?Q(r,d(a,r)):(Q(r,n.defaultValue),V(a,r,n.defaultValue)),n.keepTouched||T(t.touchedFields,r),n.keepDirty||(T(t.dirtyFields,r),t.isDirty=n.defaultValue?b(r,d(a,r)):b()),n.keepError||(T(t.errors,r),A.isValid&&m()),p.state.next({...t}))},$e=(r,n={})=>{const l=r?G(r):a,y=G(l),f=r&&!N(r)?y:a;if(n.keepDefaultValues||(a=l),!n.keepValues){if(n.keepDirtyValues||U)for(const c of v.mount)d(t.dirtyFields,c)?V(f,c,d(u,c)):Q(c,d(f,c));else{if(Re&&E(r))for(const c of v.mount){const h=d(o,c);if(h&&h._f){const F=Array.isArray(h._f.refs)?h._f.refs[0]:h._f.ref;if(he(F)){const S=F.closest("form");if(S){S.reset();break}}}}o={}}u=e.shouldUnregister?n.keepDefaultValues?G(a):{}:G(f),p.array.next({values:{...f}}),p.values.next({values:{...f}})}v={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!g.mount&&i(),g.mount=!A.isValid||!!n.keepIsValid,g.watch=!!e.shouldUnregister,p.state.next({submitCount:n.keepSubmitCount?t.submitCount:0,isDirty:n.keepDirty?t.isDirty:!!(n.keepDefaultValues&&!Z(r,a)),isSubmitted:n.keepIsSubmitted?t.isSubmitted:!1,dirtyFields:n.keepDirtyValues?t.dirtyFields:n.keepDefaultValues&&r?ke(a,r):{},touchedFields:n.keepTouched?t.touchedFields:{},errors:n.keepErrors?t.errors:{},isSubmitSuccessful:n.keepIsSubmitSuccessful?t.isSubmitSuccessful:!1,isSubmitting:!1})},ze=(r,n)=>$e(J(r)?r(u):r,n);return{control:{register:Ve,unregister:_e,getFieldState:Ue,handleSubmit:He,setError:Ie,_executeSchema:I,_getWatch:D,_getDirty:b,_updateValid:m,_removeUnmounted:_,_updateFieldArray:H,_updateDisabledField:qe,_getFieldArray:L,_reset:$e,_resetDefaultValues:()=>J(s.defaultValues)&&s.defaultValues().then(r=>{ze(r,s.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:r=>{t={...t,...r}},_subjects:p,_proxyFormState:A,get _fields(){return o},get _formValues(){return u},get _state(){return g},set _state(r){g=r},get _defaultValues(){return a},get _names(){return v},set _names(r){v=r},get _formState(){return t},set _formState(r){t=r},get _options(){return s},set _options(r){s={...s,...r}}},trigger:oe,register:Ve,handleSubmit:He,watch:Vt,setValue:Q,getValues:Be,reset:ze,resetField:At,clearErrors:_t,unregister:_e,setError:Ie,setFocus:(r,n={})=>{const l=d(o,r),y=l&&l._f;if(y){const f=y.refs?y.refs[0]:y.ref;f.focus&&(f.focus(),n.shouldSelect&&f.select())}},getFieldState:Ue}}function ur(e={}){const i=K.useRef(),s=K.useRef(),[t,o]=K.useState({isDirty:!1,isValidating:!1,isLoading:J(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:J(e.defaultValues)?void 0:e.defaultValues});i.current||(i.current={...lr(e,()=>o(u=>({...u}))),formState:t});const a=i.current.control;return a._options=e,Qt({subject:a._subjects.state,next:u=>{Yt(u,a._proxyFormState,a._updateFormState)&&o({...a._formState})}}),K.useEffect(()=>{e.values&&!Z(e.values,s.current)?(a._reset(e.values,a._options.resetOptions),s.current=e.values):a._resetDefaultValues()},[e.values,a]),K.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),i.current.formState=Jt(t,a),i.current}var at=function(e,i,s){if(e&&"reportValidity"in e){var t=d(s,i);e.setCustomValidity(t&&t.message||""),e.reportValidity()}},pt=function(e,i){var s=function(o){var a=i.fields[o];a&&a.ref&&"reportValidity"in a.ref?at(a.ref,o,e):a.refs&&a.refs.forEach(function(u){return at(u,o,e)})};for(var t in i.fields)s(t)},cr=function(e,i){i.shouldUseNativeValidation&&pt(e,i);var s={};for(var t in e){var o=d(i.fields,t),a=Object.assign(e[t]||{},{ref:o&&o.ref});if(dr(i.names||Object.keys(e),t)){var u=Object.assign({},fr(d(s,t)));V(u,"root",a),V(s,t,u)}else V(s,t,a)}return s},fr=function(e){return Array.isArray(e)?e.filter(Boolean):[]},dr=function(e,i){return e.some(function(s){return s.startsWith(i+".")})},yr=function(e,i){for(var s={};e.length;){var t=e[0],o=t.code,a=t.message,u=t.path.join(".");if(!s[u])if("unionErrors"in t){var g=t.unionErrors[0].errors[0];s[u]={message:g.message,type:g.code}}else s[u]={message:a,type:o};if("unionErrors"in t&&t.unionErrors.forEach(function(B){return B.errors.forEach(function(A){return e.push(A)})}),i){var v=s[u].types,w=v&&v[t.code];s[u]=dt(u,i,s,o,w?[].concat(w,t.message):t.message)}e.shift()}return s},hr=function(e,i,s){return s===void 0&&(s={}),function(t,o,a){try{return Promise.resolve(function(u,g){try{var v=Promise.resolve(e[s.mode==="sync"?"parse":"parseAsync"](t,i)).then(function(w){return a.shouldUseNativeValidation&&pt({},a),{errors:{},values:s.raw?t:w}})}catch(w){return g(w)}return v&&v.then?v.then(void 0,g):v}(0,function(u){if(function(g){return g.errors!=null}(u))return{values:{},errors:cr(yr(u.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw u}))}catch(u){return Promise.reject(u)}}};const gr=we.object({name:we.string().min(3),description:we.string()}),bt=({project:e,action:i})=>{var A,p;const t=Ce().state!=="idle",{setFocus:o,register:a,handleSubmit:u,formState:{errors:g,dirtyFields:v}}=ur({resolver:hr(gr),defaultValues:{name:e.name||"",description:e.description||""}}),{palette:w}=Tt(),B=ot();return ue.useEffect(()=>o("name"),[o]),x.jsx(x.Fragment,{children:x.jsxs(Ot,{onSubmit:u(({name:U,description:C})=>B({...e,name:U,description:C,action:i},{method:"put",replace:!0,encType:"application/json"})),style:{opacity:t?.5:1},children:[x.jsx(Je,{...a("name"),error:!!g.name,helperText:(A=g.name)==null?void 0:A.message,placeholder:"Name",InputProps:{style:{color:w.primary.main,fontSize:"20px",fontWeight:"500"}},disabled:t,variant:"standard"}),x.jsx(Je,{...a("description"),error:!!g.description,helperText:(p=g.description)==null?void 0:p.message,placeholder:"Description",disabled:t,fullWidth:!0,variant:"standard"}),x.jsx(ee,{sx:{display:"flex",justifyContent:"right"},children:x.jsx(Ct,{variant:"outlined",disabled:t||Object.keys(v).length===0||Object.keys(g).length>0,style:{marginTop:"10px"},color:"primary",type:"submit",children:"Save"})})]})})},vr=({project:e})=>x.jsxs(x.Fragment,{children:[x.jsx(Lt,{component:Rt,to:`projects/${e.id}`,children:x.jsx(Te,{variant:"h6",children:e.name})}),x.jsx(Te,{style:{whiteSpace:"pre-line"},variant:"body1",children:e.description})]}),xr=({project:e})=>{const[i,s]=ue.useState(!1),o=Ce().state!=="idle",a=ot();return ue.useEffect(()=>s(!1),[e]),x.jsxs(St,{sx:{m:1,p:2,position:"relative","&:hover .action-buttons":{opacity:1}},children:[x.jsx(ee,{style:{position:"absolute",top:"5px",right:"5px"},children:x.jsxs(ee,{sx:{opacity:0,transition:u=>u.transitions.create("opacity",{duration:u.transitions.duration.enteringScreen})},className:"action-buttons",display:"flex",columnGap:1,children:[x.jsx(Et,{disabled:o||i,onClick:()=>{confirm("Are you sure you want to delete this project?")===!0&&a({projectId:e.id,action:"delete-project"},{method:"post",replace:!0,encType:"application/json"})},children:x.jsx(ut,{})}),x.jsx(lt,{disabled:o,color:"primary",value:"edit-mode",selected:i,size:"small",sx:{border:"none",borderRadius:"50%"},onChange:()=>s(u=>!u),children:x.jsx(Mt,{})})]})}),i?x.jsx(bt,{project:e,action:"edit-project"}):x.jsx(vr,{project:e})]})},mr=()=>{const[e,i]=Ye(!1),[s,t]=Ye(!1),o=Ce(),a=o.state!=="idle";return ue.useEffect(()=>{o.state==="submitting"&&t(!0)},[o.state==="submitting"]),ue.useEffect(()=>{s&&o.state==="idle"&&(i(!1),t(!1))},[s,o.state==="idle"]),x.jsxs(ee,{py:2,children:[x.jsx(ee,{display:"flex",justifyContent:"center",children:x.jsx(kt,{title:"Create new project",children:x.jsx(lt,{size:"small",selected:e,disabled:a,color:"primary",value:"check",sx:{border:"none",borderRadius:"50%"},onChange:()=>i(),children:x.jsx(jt,{})})})}),e&&x.jsx(ee,{p:3,display:"flex",flexDirection:"column",rowGap:1,children:x.jsx(bt,{project:{name:"",description:""},action:"create-new-project"})})]})},Dr=()=>{const e=Nt();return x.jsxs(x.Fragment,{children:[x.jsx(Te,{align:"center",variant:"h5",children:e.length>0?"Project List":"You don't have any projects yet"}),x.jsxs(ee,{m:"auto",mt:2,maxWidth:600,children:[x.jsx(mr,{}),x.jsx(Pt,{container:!0,direction:"column",justifyContent:"center",alignItems:"stretch",children:e.map(i=>x.jsx(K.Fragment,{children:x.jsx(xr,{project:i})},i.id))})]})]})};export{Dr as Component}; diff --git a/src/evidently/ui/assets/static/js/index-BhtyyJpo.js b/src/evidently/ui/assets/static/js/index-CvB9RFvP.js similarity index 84% rename from src/evidently/ui/assets/static/js/index-BhtyyJpo.js rename to src/evidently/ui/assets/static/js/index-CvB9RFvP.js index 4b2d68a2d4..47196dc674 100644 --- a/src/evidently/ui/assets/static/js/index-BhtyyJpo.js +++ b/src/evidently/ui/assets/static/js/index-CvB9RFvP.js @@ -1 +1 @@ -import{y as d,V as c,j as e,B as x,G as o,T as m,I as p,Y as j,H as u,J as h,Z as b,X as T}from"./vendor-DRRvL2bZ.js";import{d as f}from"./ContentCopy-DfRDJjMT.js";import"./createSvgIcon-Cky3vhEa.js";const v={crumb:(s,{pathname:i})=>({to:i,linkText:(s==null?void 0:s.name)||"undefined"})},a=({tabsConfig:s=[]})=>{const i=d(),n=c(),r=s.findIndex(t=>i.find(({id:l})=>l===t.id));return e.jsxs(x,{mt:2,children:[e.jsx(o,{container:!0,spacing:2,direction:"row",justifyContent:"flex-start",alignItems:"flex-end",children:e.jsx(o,{item:!0,xs:12,children:e.jsxs(m,{sx:{color:"#aaa"},variant:"body2",children:[`project id: ${n.id}`,e.jsx(p,{size:"small",style:{marginLeft:10},onClick:()=>{navigator.clipboard.writeText(n.id)},children:e.jsx(f,{fontSize:"small"})})]})})}),s.length>0&&e.jsx(j,{value:r,"aria-label":"simple tabs example",indicatorColor:"primary",children:s.map(t=>e.jsx(u,{component:h,to:t.link,children:e.jsx(b,{label:t.label||t.id,value:t.id})},t.id))}),e.jsx(T,{})]})},k=[{id:"dashboard",link:".",label:"Dashboard"},{id:"reports",link:"reports",label:"Reports"},{id:"test_suites",link:"test-suites",label:"Test suites"}],B=()=>e.jsx(a,{tabsConfig:k}),C=()=>e.jsx(a,{});export{B as Component,a as ProjectTemplate,C as ProjectWithoutTabs,v as handle}; +import{y as d,V as c,j as e,B as x,G as o,T as m,I as p,Y as j,H as u,J as h,Z as b,X as T}from"./vendor-Bhc2M4pH.js";import{d as f}from"./ContentCopy-bqrH-e3i.js";import"./createSvgIcon-BCx0yKii.js";const v={crumb:(s,{pathname:i})=>({to:i,linkText:(s==null?void 0:s.name)||"undefined"})},a=({tabsConfig:s=[]})=>{const i=d(),n=c(),r=s.findIndex(t=>i.find(({id:l})=>l===t.id));return e.jsxs(x,{mt:2,children:[e.jsx(o,{container:!0,spacing:2,direction:"row",justifyContent:"flex-start",alignItems:"flex-end",children:e.jsx(o,{item:!0,xs:12,children:e.jsxs(m,{sx:{color:"#aaa"},variant:"body2",children:[`project id: ${n.id}`,e.jsx(p,{size:"small",style:{marginLeft:10},onClick:()=>{navigator.clipboard.writeText(n.id)},children:e.jsx(f,{fontSize:"small"})})]})})}),s.length>0&&e.jsx(j,{value:r,"aria-label":"simple tabs example",indicatorColor:"primary",children:s.map(t=>e.jsx(u,{component:h,to:t.link,children:e.jsx(b,{label:t.label||t.id,value:t.id})},t.id))}),e.jsx(T,{})]})},k=[{id:"dashboard",link:".",label:"Dashboard"},{id:"reports",link:"reports",label:"Reports"},{id:"test_suites",link:"test-suites",label:"Test suites"}],B=()=>e.jsx(a,{tabsConfig:k}),C=()=>e.jsx(a,{});export{B as Component,a as ProjectTemplate,C as ProjectWithoutTabs,v as handle}; diff --git a/src/evidently/ui/assets/static/js/index-CzjH_Znl.js b/src/evidently/ui/assets/static/js/index-CzjH_Znl.js deleted file mode 100644 index 900f6d89f3..0000000000 --- a/src/evidently/ui/assets/static/js/index-CzjH_Znl.js +++ /dev/null @@ -1 +0,0 @@ -import{a6 as d,h as o,V as n,j as s,G as h}from"./vendor-DRRvL2bZ.js";import{a as p,C as c,D as g}from"./DashboardContent-Bltq1_up.js";import"./DashboardViewParams-CtX565DS.js";import"./createSvgIcon-Cky3vhEa.js";import"./Edit-CBY3z5Ql.js";const u={crumb:(r,{pathname:t,params:a})=>({to:t,linkText:String(a.snapshotId)}),hide:{snapshotList:!0}},b=({api:r})=>{const{projectId:t,snapshotId:a}=d();o(t),o(a);const i=n();return s.jsx(s.Fragment,{children:s.jsx(p.Provider,{value:c({getAdditionGraphData:e=>r.getDashboardGraph({project:{id:t},snapshot:{id:a},graph:{id:e}}),getAdditionWidgetData:e=>r.getDashboardGraph({project:{id:t},snapshot:{id:a},graph:{id:e}})}),children:s.jsx(h,{container:!0,spacing:3,direction:"row",alignItems:"stretch",children:s.jsx(g,{widgets:i.widgets})})})})};export{b as SnapshotTemplate,u as handle}; diff --git a/src/evidently/ui/assets/static/js/index-D5V2mqaA.js b/src/evidently/ui/assets/static/js/index-D5V2mqaA.js deleted file mode 100644 index ff59cb10b2..0000000000 --- a/src/evidently/ui/assets/static/js/index-D5V2mqaA.js +++ /dev/null @@ -1,3 +0,0 @@ -const __vite__fileDeps=["static/js/index-C88TO56P.js","static/js/vendor-DRRvL2bZ.js","static/js/createSvgIcon-Cky3vhEa.js","static/js/index-BnGIng_f.js","static/js/DashboardViewParams-CtX565DS.js","static/js/index-DAGvxKAA.js","static/js/DashboardWidgets-DfMNi9ay.js","static/js/DashboardContent-Bltq1_up.js","static/js/Edit-CBY3z5Ql.js","static/js/index-CzjH_Znl.js","static/js/index-BUqn2gCe.js","static/js/ContentCopy-DfRDJjMT.js","static/css/index-C5isHALn.css","static/js/index-BhtyyJpo.js","static/js/index-B8zGyO85.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]); -var K=Object.defineProperty;var X=(t,e,r)=>e in t?K(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var T=(t,e,r)=>(X(t,typeof e!="symbol"?e+"":e,r),r);import{c as U,g as x,u as Z,j as s,A,a as F,i as tt,T as k,b as et,R,r as rt,S as st,B as b,I as ot,C as nt,d as it,e as B,f as y,h as w,L as at,k as ct,G as I,F as ht,l as dt,m as lt,n as ut,o as pt,M as p,D as G,p as ft,q as mt,s as D,z as u,t as jt,v as xt,w as yt,x as gt}from"./vendor-DRRvL2bZ.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))o(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&o(a)}).observe(document,{childList:!0,subtree:!0});function r(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(n){if(n.ep)return;n.ep=!0;const i=r(n);fetch(n.href,i)}})();const{transitions:E}=U(),j="#ed0500",_t="#ded5d5",vt=U({shape:{borderRadius:5},palette:{primary:{main:x[900],light:x[200]},secondary:{main:j,dark:"#c10400",light:x[200]},background:{default:"#fff",paper:"#fff"}},components:{MuiLink:{styleOverrides:{root:{transition:E.create("color",{duration:E.duration.enteringScreen}),"&:hover":{color:j}}}},MuiTabs:{styleOverrides:{flexContainer:{gap:"10px"},indicator:{backgroundColor:j}}},MuiButton:{styleOverrides:{contained:{"&:hover":{background:x[800]}},outlined:{"&:hover":{color:j,borderColor:j,background:"#fff"}},text:{"&:hover":{color:j,borderColor:j}}}},MuiTab:{defaultProps:{color:"secondary"},styleOverrides:{root:{fontSize:"1rem",borderRadius:"5px","&:hover":{background:x[200]}}}},MuiIconButton:{styleOverrides:{root:{transition:E.create("color",{duration:E.duration.enteringScreen}),color:x[900],"&:hover":{color:j}}}},MuiSwitch:{defaultProps:{color:"secondary"}},MuiToggleButton:{defaultProps:{color:"secondary"},styleOverrides:{root:{transition:E.create("color",{duration:E.duration.enteringScreen}),color:x[900],"&:hover":{color:j},"&.Mui-disabled":{border:"unset",background:x[100]}}}},MuiToggleButtonGroup:{defaultProps:{color:"secondary"}},MuiLinearProgress:{defaultProps:{color:"secondary"}},MuiPaper:{styleOverrides:{root:{boxShadow:"unset",border:"1px solid",borderColor:_t}}}},typography:{fontFamily:["-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"'].join(","),button:{fontWeight:"bold",textTransform:"none"}}}),_=()=>{var e;const t=Z();return s.jsxs(A,{severity:"error",children:[s.jsx(F,{children:"Something went wrong"}),tt(t)&&s.jsxs(s.Fragment,{children:[s.jsx(k,{fontWeight:"bold",children:[`Status: ${t.status}`,typeof((e=t.data)==null?void 0:e.detail)=="string"&&t.data.detail].filter(Boolean).join(", ")}),typeof t.data=="string"&&s.jsx(k,{children:t.data})]}),typeof t=="string"&&s.jsx(k,{fontWeight:"bold",children:t})]})},z=({data:t})=>{const[e,r]=R.useState(!1),o=R.useRef(null);return rt.useEffect(()=>{t!=null&&t.error&&(o.current=t.error,r(!0))},[t]),s.jsx(st,{open:e,onClose:(n,i)=>{i!=="clickaway"&&r(!1)},children:s.jsx(A,{severity:"error",children:s.jsxs(b,{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:2,children:[s.jsxs(b,{children:[s.jsx(F,{children:"Something went wrong"}),o.current&&s.jsx(k,{fontWeight:"bold",children:[typeof o.current.status_code=="number"&&`Status: ${o.current.status_code}`,typeof o.current.detail=="string"&&o.current.detail].filter(Boolean).join(", ")})]}),s.jsx(b,{children:s.jsx(ot,{size:"small","aria-label":"close",color:"inherit",onClick:()=>{r(!1)},children:s.jsx(nt,{})})})]})})})},M=()=>{const t=et();return s.jsx(z,{data:t})},St=()=>{var r;const e=(r=it().find(o=>{var n;return!!((n=o.data)!=null&&n.error)}))==null?void 0:r.data;return s.jsx(z,{data:e})},bt="modulepreload",wt=function(t){return"/"+t},V={},g=function(e,r,o){let n=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),a=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));n=Promise.all(r.map(c=>{if(c=wt(c),c in V)return;V[c]=!0;const f=c.endsWith(".css"),d=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=f?"stylesheet":bt,f||(h.as="script",h.crossOrigin=""),h.href=c,a&&h.setAttribute("nonce",a),document.head.appendChild(h),f)return new Promise((v,S)=>{h.addEventListener("load",v),h.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${c}`)))})}))}return n.then(()=>e()).catch(i=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=i,window.dispatchEvent(a),!a.defaultPrevented)throw i})},Et=({api:t})=>({loader:()=>t.getVersion()});class Pt{constructor(){T(this,"at",0);T(this,"ch","");T(this,"text","");T(this,"escapee",{'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` -`,r:"\r",t:" "})}error(e){throw{name:"SyntaxError",message:e,at:this.at,text:this.text}}next(){return this.ch=this.text.charAt(this.at++)}check(e){e!==this.ch&&this.error(`Expected '${e}' instead of '${this.ch}'`),this.ch=this.text.charAt(this.at++)}number(){var e="";if(this.ch==="-"&&(e="-",this.check("-")),this.ch==="I")return this.check("I"),this.check("n"),this.check("f"),this.check("i"),this.check("n"),this.check("i"),this.check("t"),this.check("y"),-1/0;for(;this.ch>="0"&&this.ch<="9";)e+=this.ch,this.next();if(this.ch===".")for(e+=".";this.next()&&this.ch>="0"&&this.ch<="9";)e+=this.ch;if(this.ch==="e"||this.ch==="E")for(e+=this.ch,this.next(),(this.ch==="-"||this.ch==="+")&&(e+=this.ch,this.next());this.ch>="0"&&this.ch<="9";)e+=this.ch,this.next();return+e}string(){var e,r,o="",n;if(this.ch==='"')for(;this.next();){if(this.ch==='"')return this.next(),o;if(this.ch==="\\")if(this.next(),this.ch==="u"){for(n=0,r=0;r<4&&(e=parseInt(this.next(),16),!!isFinite(e));r++)n=n*16+e;o+=String.fromCharCode(n)}else if(this.escapee[this.ch])o+=this.escapee[this.ch];else break;else o+=this.ch}this.error("Bad string")}white(){for(;this.ch&&this.ch<=" ";)this.next()}word(){switch(this.ch){case"t":return this.check("t"),this.check("r"),this.check("u"),this.check("e"),!0;case"f":return this.check("f"),this.check("a"),this.check("l"),this.check("s"),this.check("e"),!1;case"n":return this.check("n"),this.check("u"),this.check("l"),this.check("l"),null;case"N":return this.check("N"),this.check("a"),this.check("N"),NaN;case"I":return this.check("I"),this.check("n"),this.check("f"),this.check("i"),this.check("n"),this.check("i"),this.check("t"),this.check("y"),1/0}this.error("Unexpected '"+this.ch+"'")}array(){var e=[];if(this.ch==="["){if(this.check("["),this.white(),this.ch==="]")return this.check("]"),e;for(;this.ch;){if(e.push(this.value()),this.white(),this.ch==="]")return this.check("]"),e;this.check(","),this.white()}}this.error("Bad array")}object(){var e,r={};if(this.ch==="{"){if(this.check("{"),this.white(),this.ch==="}")return this.check("}"),r;for(;this.ch;){if(e=this.string(),this.white(),this.check(":"),Object.hasOwnProperty.call(r,e)&&this.error('Duplicate key "'+e+'"'),r[e]=this.value(),this.white(),this.ch==="}")return this.check("}"),r;this.check(","),this.white()}}this.error("Bad object")}value(){switch(this.white(),this.ch){case"{":return this.object();case"[":return this.array();case'"':return this.string();case"-":return this.number();default:return this.ch>="0"&&this.ch<="9"?this.number():this.word()}}parse(e,r){let o;return this.text=e,this.at=0,this.ch=" ",o=this.value(),this.white(),this.ch&&this.error("Syntax error"),r!==void 0?function n(i,a){var c,f,d=i[a];if(d&&typeof d=="object")for(c in d)Object.prototype.hasOwnProperty.call(d,c)&&(f=n(d,c),f!==void 0?d[c]=f:delete d[c]);return r.call(i,a,d)}({"":o},""):o}}const C=t=>new Pt().parse(t),kt=t=>{const e=B({baseUrl:t});return{async getProjectDashboard({project:r,options:o}){const{data:n,error:i,response:a}=await e.GET("/api/projects/{project_id}/dashboard",{parseAs:"text",params:{path:{project_id:r.id},query:{timestamp_start:o.timestamp_start,timestamp_end:o.timestamp_end}}});if(i)throw y(i,{status:a.status});return C(n)},async getSnapshotDashboard({project:r,snapshot:o}){const{data:n,error:i,response:a}=await e.GET("/api/projects/{project_id}/{snapshot_id}/data",{parseAs:"text",params:{path:{project_id:r.id,snapshot_id:o.id}}});if(i)throw y(i,{status:a.status});return C(n)},async getDashboardGraph({project:r,snapshot:o,graph:n}){const{data:i,error:a,response:c}=await e.GET("/api/projects/{project_id}/{snapshot_id}/graphs_data/{graph_id}",{parseAs:"text",params:{path:{project_id:r.id,snapshot_id:o.id,graph_id:encodeURIComponent(n.id)}}});if(a)throw y(a,{status:c.status});return C(i)}}},P=t=>{if(t.id)return{...t,id:t.id};throw`"id" is missing in object: ${JSON.stringify(t)}`},H=t=>{if(t.headers.get("Content-type")!=="application/json")throw new Response("Unsupported Media Type",{status:415})},Tt=t=>{const e=B({baseUrl:t});return{async list(){const{data:r,error:o,response:n}=await e.GET("/api/projects");if(o)throw y(o,{status:n.status});return r.map(P)},async update({body:r}){const{data:o,error:n}=await e.POST("/api/projects/{project_id}/info",{params:{path:{project_id:r.id}},body:r});return n?{error:n}:P(o)},async get({id:r}){const{data:o,error:n,response:i}=await e.GET("/api/projects/{project_id}/info",{params:{path:{project_id:r}}});if(n)throw y(n,{status:i.status});return P(o)},async delete({id:r}){const{error:o}=await e.DELETE("/api/projects/{project_id}",{params:{path:{project_id:r}}});return o?{error:o}:null},async create({body:r}){const{data:o,error:n}=await e.POST("/api/projects",{body:r});return n?{error:n}:P(o)},async reloadSnapshots({project:r}){const{error:o}=await e.GET("/api/projects/{project_id}/reload",{params:{path:{project_id:r.id}}});return o?{error:o}:null},async deleteSnapshot({project:r,snapshot:o}){const{error:n}=await e.DELETE("/api/projects/{project_id}/{snapshot_id}",{params:{path:{project_id:r.id,snapshot_id:o.id}}});return n?{error:n}:null},async listReports({project:r}){const{data:o,error:n,response:i}=await e.GET("/api/projects/{project_id}/reports",{params:{path:{project_id:r.id}}});if(n)throw y(n,{status:i.status});return o.map(P)},async listTestSuites({project:r}){const{data:o,error:n,response:i}=await e.GET("/api/projects/{project_id}/test_suites",{params:{path:{project_id:r.id}}});if(n)throw y(n,{status:i.status});return o.map(P)}}},It=t=>{const e=B({baseUrl:t});return{async getVersion(){const{data:r,error:o,response:n}=await e.GET("/api/version");if(o)throw y(o,{status:n.status});return r}}},$=kt("/"),O=Tt("/"),Dt=It("/"),Ot="/static/img/logo.png",{loader:Ct}=Et({api:Dt}),Lt={path:"/",lazy:async()=>{const{HomeComponentTemplate:t,...e}=await g(()=>import("./index-C88TO56P.js"),__vite__mapDeps([0,1,2]));return{Component:()=>s.jsxs(s.Fragment,{children:[s.jsx(St,{}),s.jsx(t,{logoSrc:Ot})]}),...e}},loader:Ct,ErrorBoundary:_},Rt=({api:t})=>({loader:({params:e})=>{const{projectId:r}=e;return w(r),t.get({id:r})}});function L(t){return typeof t!=typeof new Date?(console.log(`not a date ${typeof t}: ${t}`),t):`${t.getFullYear()}-${(t.getMonth()+1).toString().padStart(2,"0")}-${t.getDate().toString().padStart(2,"0")}T${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}const l={FROM:"date_from",TO:"date_to"},At=t=>{let e=t.get(l.FROM),r=t.get(l.TO);return{date_from:e,date_to:r}},Ft=({dataRanges:t})=>{const[e,r]=mt(),{date_from:o,date_to:n}=At(e),i=D(o||t.minDate),a=D(n||t.maxDate);return{isCorrectTimeInterval:i.isValid()&&a.isValid()&&(i.isSame(a)||i.isBefore(a)),date_from:i,date_to:a,setSearchParams:r}},ue=({dataRanges:t,isDashboardHideDates:e,setIsDashboardHideDates:r,isShowDateFilter:o})=>{const{isCorrectTimeInterval:n,date_from:i,date_to:a,setSearchParams:c}=Ft({dataRanges:t}),f=n?"":"incorrect time interval",d=h=>v=>{c(S=>(S.delete(h),v&&S.append(h,L(v.toDate())),S),{preventScrollReset:!0,replace:!0})};return s.jsx(at,{dateAdapter:ct,adapterLocale:"en-gb",children:s.jsxs(I,{container:!0,padding:1,zIndex:1,gap:2,justifyContent:"flex-end",alignItems:"flex-end",children:[s.jsx(I,{item:!0,children:s.jsx(b,{minWidth:180,display:"flex",justifyContent:"center",children:s.jsx(ht,{control:s.jsx(dt,{checked:e,onChange:h=>r(h.target.checked)}),label:"Show in order"})})}),o&&s.jsxs(s.Fragment,{children:[s.jsx(I,{item:!0,xs:12,md:2,children:s.jsxs(lt,{fullWidth:!0,children:[s.jsx(ut,{children:"Period"}),s.jsxs(pt,{variant:"standard",defaultValue:"",onChange:h=>{const[v,S]=h.target.value.split(",");if(v===""){c(m=>(m.delete(l.FROM),m.delete(l.TO),m),{preventScrollReset:!0,replace:!0});return}const[Q,Y]=[Number(v),S],N=t.maxDate.subtract(Q,Y);c(m=>(m.delete(l.FROM),m.delete(l.TO),m.append(l.FROM,L(N.isBefore(t.minDate)?t.minDate.toDate():N.toDate())),m.append(l.TO,L(t.maxDate.toDate())),m),{preventScrollReset:!0,replace:!0})},children:[s.jsx(p,{value:"",children:s.jsx("em",{children:"None"})}),s.jsx(p,{value:"10,minutes",children:"Last 10 Minutes"}),s.jsx(p,{value:"30,minutes",children:"Last 30 Minutes"}),s.jsx(p,{value:"1,hours",children:"Last 1 Hours"}),s.jsx(p,{value:"2,hours",children:"Last 2 Hours"}),s.jsx(p,{value:"8,hours",children:"Last 8 Hours"}),s.jsx(p,{value:"24,hours",children:"Last 24 Hours"}),s.jsx(p,{value:"7,days",children:"Last 7 Days"}),s.jsx(p,{value:"14,days",children:"Last 14 Days"}),s.jsx(p,{value:"28,days",children:"Last 28 Days"}),s.jsx(p,{value:"60,days",children:"Last 60 Days"})]})]})}),s.jsx(I,{item:!0,children:s.jsxs(b,{display:"flex",alignItems:"center",gap:2,children:[s.jsx(G,{minDate:t.minDate,maxDate:t.maxDate&&a,slotProps:{textField:{variant:"standard"}},label:"From",value:i,onChange:d(l.FROM)}),s.jsx(b,{height:1,display:"flex",alignItems:"center",children:s.jsx(k,{children:" - "})}),s.jsx(G,{minDate:t.minDate&&i,maxDate:t.maxDate,slotProps:{textField:{variant:"standard"}},label:"To",value:a,onChange:d(l.TO)})]})}),s.jsx(I,{item:!0,xs:12,children:s.jsx(ft,{unmountOnExit:!0,in:!n,children:s.jsxs(A,{severity:"error",children:[s.jsx(F,{children:"Error"}),f]})})})]})]})})},Bt=({api:t})=>({loader:({params:e,request:r})=>{w(e.projectId);const{searchParams:o}=new URL(r.url);let n=o.get(l.FROM),i=o.get(l.TO);return n&&!D(n).isValid()&&(n=null),i&&!D(i).isValid()&&(i=null),t.getProjectDashboard({project:{id:e.projectId},options:{timestamp_start:n,timestamp_end:i}})}}),{loader:Mt}=Bt({api:$}),$t={index:!0,id:"dashboard",lazy:async()=>{const[{DashboardComponentTemplate:t},{DashboardWidgets:e}]=await Promise.all([g(()=>import("./index-BnGIng_f.js"),__vite__mapDeps([3,1,4,5])),g(()=>import("./DashboardWidgets-DfMNi9ay.js"),__vite__mapDeps([6,1,7,4,2,8]))]);return{Component:()=>s.jsx(t,{Dashboard:({data:{widgets:r}})=>s.jsx(e,{widgets:r})})}},loader:Mt,ErrorBoundary:_},W={RELOAD_SNAPSHOTS:"reload-snapshots",DELETE_SNAPSHOT:"delete-snapshot"},Nt=u.object({action:u.literal(W.RELOAD_SNAPSHOTS)}),Gt=u.object({action:u.literal(W.DELETE_SNAPSHOT),snapshotId:u.string().uuid()}),q=t=>async({request:e,params:r})=>{w(r.projectId),H(e);const o=await e.json();if(Nt.safeParse(o).success)return t.reloadSnapshots({project:{id:r.projectId}});const i=Gt.safeParse(o);return i.success?t.deleteSnapshot({project:{id:r.projectId},snapshot:{id:i.data.snapshotId}}):{error:{status_code:!1,detail:"Unknown action"}}},Vt=({api:t})=>({loader:({params:e})=>(w(e.projectId),e.snapshotId?Promise.resolve([]):t.listReports({project:{id:e.projectId}})),action:q(t)}),Ut=({api:t})=>({loader:({params:e})=>(w(e.projectId),e.snapshotId?Promise.resolve([]):t.listTestSuites({project:{id:e.projectId}})),action:q(t)}),zt=({api:t})=>({loader:({params:e})=>{const{projectId:r,snapshotId:o}=e;return w(r),w(o),t.getSnapshotDashboard({project:{id:r},snapshot:{id:o}})}}),{loader:Ht}=zt({api:$}),J={path:":snapshotId",lazy:async()=>{const{SnapshotTemplate:t,...e}=await g(()=>import("./index-CzjH_Znl.js"),__vite__mapDeps([9,1,7,4,2,8]));return{Component:()=>s.jsx(t,{api:$}),...e}},loader:Ht,ErrorBoundary:_},{loader:Wt,action:qt}=Vt({api:O}),Jt={id:"reports",path:"reports",lazy:async()=>{const{SnapshotsListTemplate:t,...e}=await g(()=>import("./index-BUqn2gCe.js"),__vite__mapDeps([10,1,5,11,2,12]));return{...e,Component:()=>s.jsxs(s.Fragment,{children:[s.jsx(M,{}),s.jsx(t,{type:"reports"})]})}},loader:Wt,action:qt,ErrorBoundary:_,children:[J]},{loader:Qt,action:Yt}=Ut({api:O}),Kt={id:"test_suites",path:"test-suites",lazy:async()=>{const{SnapshotsListTemplate:t,...e}=await g(()=>import("./index-BUqn2gCe.js"),__vite__mapDeps([10,1,5,11,2,12]));return{...e,Component:()=>s.jsxs(s.Fragment,{children:[s.jsx(M,{}),s.jsx(t,{type:"test suites"})]})}},loader:Qt,action:Yt,ErrorBoundary:_,children:[J]},{loader:Xt}=Rt({api:O}),Zt={path:"projects/:projectId",lazy:()=>g(()=>import("./index-BhtyyJpo.js"),__vite__mapDeps([13,1,11,2])),loader:Xt,ErrorBoundary:_,children:[$t,Jt,Kt]},te=u.object({action:u.literal("edit-project")}),ee=u.object({action:u.literal("create-new-project")}),re=u.object({action:u.literal("delete-project"),projectId:u.string().uuid()}),se=({api:t})=>({loader:()=>t.list(),action:async({request:e})=>{H(e);const r=await e.json();if(ee.safeParse(r).success)return t.create({body:r});const o=re.safeParse(r);if(o.success)return t.delete({id:o.data.projectId});if(te.safeParse(r).success)return t.update({body:r});throw"Undefined action"}}),{loader:oe,action:ne}=se({api:O}),ie={index:!0,lazy:()=>g(()=>import("./index-B8zGyO85.js"),__vite__mapDeps([14,1,8,2,5])).then(t=>({...t,Component:()=>s.jsxs(s.Fragment,{children:[s.jsx(M,{}),s.jsx(t.Component,{})]})})),loader:oe,action:ne,ErrorBoundary:_},ae={path:"*",Component:()=>s.jsx(b,{display:"flex",justifyContent:"center",children:s.jsx(k,{variant:"h4",children:"Page Not Found"})})},ce={...Lt,children:[ie,Zt,ae],ErrorBoundary:_},he=jt([ce]);xt.createRoot(document.getElementById("root")).render(s.jsx(R.StrictMode,{children:s.jsx(yt,{theme:vt,children:s.jsx(gt,{router:he})})}));export{ue as D}; diff --git a/src/evidently/ui/assets/static/js/index-BUqn2gCe.js b/src/evidently/ui/assets/static/js/index-u7sYf73W.js similarity index 99% rename from src/evidently/ui/assets/static/js/index-BUqn2gCe.js rename to src/evidently/ui/assets/static/js/index-u7sYf73W.js index d7cdb9b63e..1c8387a00c 100644 --- a/src/evidently/ui/assets/static/js/index-BUqn2gCe.js +++ b/src/evidently/ui/assets/static/js/index-u7sYf73W.js @@ -1 +1 @@ -import{R as React,j as jsxRuntimeExports,U as Button,a7 as Popper,a8 as Grow,$ as Paper,a9 as ClickAwayListener,aa as MenuList,M as MenuItem,r as reactExports,B as Box,ab as Chip,I as IconButton,a6 as useParams,V as useLoaderData,y as useMatches,_ as useSubmit,K as useNavigation,h as invariant,q as useSearchParams,X as Outlet,T as Typography,ac as Table,ad as TableHead,ae as TableRow,af as TableCell,ag as TableSortLabel,ah as TableBody,s as dayjs,J as Link,a1 as Tooltip,ai as DeleteIcon,G as Grid,aj as Autocomplete,a5 as TextField,F as FormControlLabel,l as Switch}from"./vendor-DRRvL2bZ.js";import{a as useLocalStorage}from"./index-DAGvxKAA.js";import{d as default_1$1}from"./ContentCopy-DfRDJjMT.js";import{r as requireCreateSvgIcon,i as interopRequireDefaultExports}from"./createSvgIcon-Cky3vhEa.js";const options=[{title:"Download HTML",format:"html"},{title:"Download JSON",format:"json"}];function DownloadButton(e){const[t,n]=React.useState(!1),s=React.useRef(null),i=(l,p)=>{window.open(`${l}?report_format=${p}`,"_blank"),n(!1)},a=()=>{n(l=>!l)},m=l=>{s.current&&s.current.contains(l.target)||n(!1)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button,{disabled:e.disabled,variant:"outlined",ref:s,color:"primary","aria-controls":t?"split-button-menu":void 0,"aria-expanded":t?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:a,children:"Download"}),jsxRuntimeExports.jsx(Popper,{open:t,anchorEl:s.current,transition:!0,children:({TransitionProps:l,placement:p})=>jsxRuntimeExports.jsx(Grow,{...l,style:{transformOrigin:p==="bottom"?"center top":"center bottom"},children:jsxRuntimeExports.jsx(Paper,{children:jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:m,children:jsxRuntimeExports.jsx(MenuList,{id:"split-button-menu",children:options.map(d=>jsxRuntimeExports.jsx(MenuItem,{onClick:()=>i(e.downloadLink,d.format),children:d.title},d.format))})})})})})]})}var CloseRounded={},_interopRequireDefault=interopRequireDefaultExports;Object.defineProperty(CloseRounded,"__esModule",{value:!0});var default_1=CloseRounded.default=void 0,_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=jsxRuntimeExports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),"CloseRounded");default_1=CloseRounded.default=_default;const HidedTags=({onClick:e,tags:t,limitTags:n=2})=>{const[s,i]=reactExports.useState(!1);return jsxRuntimeExports.jsxs(Box,{display:"flex",alignContent:"center",flexWrap:"wrap",children:[t.slice(0,n).map(a=>jsxRuntimeExports.jsx(Chip,{onClick:()=>e(a),label:a,style:{margin:3}},a)),s&&t.slice(n).map(a=>jsxRuntimeExports.jsx(Chip,{onClick:()=>e(a),label:a,style:{margin:3}},a)),!s&&t.length>n&&jsxRuntimeExports.jsx(Chip,{variant:"outlined",label:`+${t.length-n}`,style:{margin:3,borderColor:"grey"},onClick:()=>i(!0)},"+N"),t.length>0&&s&&jsxRuntimeExports.jsx(IconButton,{style:{margin:3},onClick:()=>i(!1),children:jsxRuntimeExports.jsx(default_1,{fontSize:"small"})})]})},TextWithCopyIcon=({showText:e,copyText:t})=>jsxRuntimeExports.jsxs(Box,{children:[e,jsxRuntimeExports.jsx(IconButton,{size:"small",style:{marginLeft:10},onClick:()=>navigator.clipboard.writeText(t),children:jsxRuntimeExports.jsx(default_1$1,{fontSize:"small"})})]});function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function objectSize(e){return Array.isArray(e)?e.length:isObject(e)?Object.keys(e).length:0}function stringifyForCopying(e,t){if(typeof e=="string")return e;try{return JSON.stringify(e,(n,s)=>{switch(typeof s){case"bigint":return String(s)+"n";case"number":case"boolean":case"object":case"string":return s;default:return String(s)}},t)}catch(n){return`${n.name}: ${n.message}`||"JSON.stringify failed"}}function isCollapsed(e,t,n,s,i,a){if(a&&a.collapsed!==void 0)return!!a.collapsed;if(typeof s=="boolean")return s;if(typeof s=="number"&&t>s)return!0;const m=objectSize(e);if(typeof s=="function"){const l=safeCall(s,[{node:e,depth:t,indexOrName:n,size:m}]);if(typeof l=="boolean")return l}return!!(Array.isArray(e)&&m>i||isObject(e)&&m>i)}function ifDisplay(e,t,n){return typeof e=="boolean"?e:!!(typeof e=="number"&&t>e||e==="collapsed"&&n||e==="expanded"&&!n)}function safeCall(e,t){try{return e(...t)}catch(n){reportError(n)}}function editableAdd(e){if(e===!0||isObject(e)&&e.add===!0)return!0}function editableEdit(e){if(e===!0||isObject(e)&&e.edit===!0)return!0}function editableDelete(e){if(e===!0||isObject(e)&&e.delete===!0)return!0}function isReactComponent(e){return typeof e=="function"}function customAdd(e){return!e||e.add===void 0||!!e.add}function customEdit(e){return!e||e.edit===void 0||!!e.edit}function customDelete(e){return!e||e.delete===void 0||!!e.delete}function customCopy(e){return!e||e.enableClipboard===void 0||!!e.enableClipboard}function resolveEvalFailedNewValue(e,t){return e==="string"?t.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):t}var _path$7;function _extends$7(){return _extends$7=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const i=stringifyForCopying(e);s.stopPropagation(),navigator.clipboard.writeText(i),n(!0),setTimeout(()=>n(!1),3e3)},className:"json-view--copy"})}function NameValue({indexOrName:e,value:t,depth:n,parent:s,deleteHandle:i,editHandle:a}){return jsxRuntimeExports.jsxs("div",Object.assign({className:"json-view--pair"},{children:[jsxRuntimeExports.jsx("span",Object.assign({className:typeof e=="number"?"json-view--index":"json-view--property"},{children:e})),":"," ",jsxRuntimeExports.jsx(JsonNode,{node:t,depth:n+1,deleteHandle:i,editHandle:a,parent:s,indexOrName:e})]}))}var _path$4,_path2$3;function _extends$4(){return _extends$4=Object.assign?Object.assign.bind():function(e){for(var t=1;t{b(isCollapsed(e,t,n,a,l,i))},[a,l]);const O=reactExports.useCallback((o,x,k)=>{Array.isArray(e)?e[+o]=x:e&&(e[o]=x),h&&h({newValue:x,oldValue:k,depth:t,src:u,indexOrName:o,parentType:E?"object":"array"}),c&&c({type:"edit",depth:t,src:u,indexOrName:o,parentType:E?"object":"array"}),R()},[e,h,c,R]),C=o=>{Array.isArray(e)?e.splice(+o,1):e&&delete e[o],R()},[A,w]=reactExports.useState(!1),r=()=>{w(!1),s&&s(n),d&&d({value:e,depth:t,src:u,indexOrName:n,parentType:E?"object":"array"}),c&&c({type:"delete",depth:t,src:u,indexOrName:n,parentType:E?"object":"array"})},[f,T]=reactExports.useState(!1),y=reactExports.useRef(null),S=()=>{var o;if(E){const x=(o=y.current)===null||o===void 0?void 0:o.value;x&&(e[x]=null,y.current&&(y.current.value=""),T(!1),g&&g({indexOrName:x,depth:t,src:u,parentType:"object"}),c&&c({type:"add",indexOrName:x,depth:t,src:u,parentType:"object"}))}else if(Array.isArray(e)){const x=e;x.push(null),g&&g({indexOrName:x.length-1,depth:t,src:u,parentType:"array"}),c&&c({type:"add",indexOrName:x.length-1,depth:t,src:u,parentType:"array"})}R()},D=o=>{o.key==="Enter"?(o.preventDefault(),S()):o.key==="Escape"&&N()},_=A||f,N=()=>{w(!1),T(!1)},$=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!j&&!_&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>b(!0)},{children:[ifDisplay(v,t,j)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[objectSize(e)," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),f&&E&&jsxRuntimeExports.jsx("input",{className:"json-view--input",placeholder:"property",ref:y,onKeyDown:D}),_&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:f?S:r}),_&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:N}),!j&&!_&&m&&customCopy(i)&&jsxRuntimeExports.jsx(CopyButton,{node:e}),!j&&!_&&editableAdd(p)&&customAdd(i)&&jsxRuntimeExports.jsx(SvgAddSquare,{className:"json-view--edit",onClick:()=>{E?(T(!0),setTimeout(()=>{var o;return(o=y.current)===null||o===void 0?void 0:o.focus()})):S()}}),!j&&!_&&editableDelete(p)&&customDelete(i)&&s&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>w(!0)})]});return Array.isArray(e)?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"["}),$,j?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>b(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:e.map((o,x)=>jsxRuntimeExports.jsx(NameValue,{indexOrName:x,value:o,depth:t,parent:e,deleteHandle:C,editHandle:O},String(n)+String(x)))})),jsxRuntimeExports.jsx("span",{children:"]"}),j&&ifDisplay(v,t,j)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>b(!1),className:"jv-size"},{children:[objectSize(e)," Items"]}))]}):E?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"{"}),$,j?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>b(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(e).map(([o,x])=>jsxRuntimeExports.jsx(NameValue,{indexOrName:o,value:x,depth:t,parent:e,deleteHandle:C,editHandle:O},String(n)+String(o)))})),jsxRuntimeExports.jsx("span",{children:"}"}),j&&ifDisplay(v,t,j)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>b(!1),className:"jv-size"},{children:[objectSize(e)," Items"]}))]}):null}const LongString=React.forwardRef(({str:e,className:t,ctrlClick:n},s)=>{let{collapseStringMode:i,collapseStringsAfterLength:a}=reactExports.useContext(JsonViewContext);const[m,l]=reactExports.useState(!0);a=a>0?a:0;const p=e.replace(/\s+/g," "),d=u=>{(u.ctrlKey||u.metaKey)&&n?n(u):l(!m)};if(e.length<=a)return jsxRuntimeExports.jsxs("span",Object.assign({className:t,onClick:n},{children:['"',e,'"']}));if(i==="address")return e.length<=10?jsxRuntimeExports.jsxs("span",Object.assign({className:t,onClick:n},{children:['"',e,'"']})):jsxRuntimeExports.jsxs("span",Object.assign({onClick:d,className:t+" cursor-pointer"},{children:['"',m?p.slice(0,6)+"..."+p.slice(-4):e,'"']}));if(i==="directly")return jsxRuntimeExports.jsxs("span",Object.assign({onClick:d,className:t+" cursor-pointer"},{children:['"',m?p.slice(0,a)+"...":e,'"']}));if(i==="word"){let u=a,g=a+1,h=p,c=1;for(;;){if(/\W/.test(e[u])){h=e.slice(0,u);break}if(/\W/.test(e[g])){h=e.slice(0,g);break}if(c===6){h=e.slice(0,a);break}c++,u--,g++}return jsxRuntimeExports.jsxs("span",Object.assign({onClick:d,className:t+" cursor-pointer"},{children:['"',m?h+"...":e,'"']}))}return jsxRuntimeExports.jsxs("span",Object.assign({className:t},{children:['"',e,'"']}))});var _path;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t{setEditing(!0),setTimeout(()=>{var e,t;(e=window.getSelection())===null||e===void 0||e.selectAllChildren(valueRef.current),(t=valueRef.current)===null||t===void 0||t.focus()})},done=reactExports.useCallback(()=>{const newValue=valueRef.current.innerText;try{const evalValue=eval(newValue);editHandle&&editHandle(indexOrName,evalValue,node)}catch(e){const t=resolveEvalFailedNewValue(type,newValue);editHandle&&editHandle(indexOrName,t,node)}setEditing(!1)},[editHandle]),cancel=()=>{setEditing(!1),setDeleting(!1)},deleteHandle=()=>{setDeleting(!1),_deleteHandle&&_deleteHandle(indexOrName),onDelete&&onDelete({value:node,depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object"}),onChange&&onChange({depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object",type:"delete"})},handleKeyDown=reactExports.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),done()):e.key==="Escape"&&cancel()},[done]),isEditing=editing||deleting,ctrlClick=!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle?e=>{(e.ctrlKey||e.metaKey)&&edit()}:void 0,Icons=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[isEditing&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:deleting?deleteHandle:done}),isEditing&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:cancel}),!isEditing&&enableClipboard&&customCopy(customReturn)&&jsxRuntimeExports.jsx(CopyButton,{node}),!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle&&jsxRuntimeExports.jsx(SvgEdit,{className:"json-view--edit",onClick:edit}),!isEditing&&editableDelete(editable)&&customDelete(customReturn)&&_deleteHandle&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>setDeleting(!0)})]});let className="json-view--string";switch(typeof(customReturn==null?void 0:customReturn.className)=="string"&&(className+=" "+customReturn.className),type){case"number":case"bigint":className="json-view--number";break;case"boolean":className="json-view--boolean";break;case"object":className="json-view--null";break}deleting&&(className+=" json-view--deleting");let displayValue=String(node);type==="bigint"&&(displayValue+="n");const EditingElement=reactExports.useMemo(()=>jsxRuntimeExports.jsx("span",{contentEditable:!0,className,dangerouslySetInnerHTML:{__html:type==="string"?`"${displayValue}"`:displayValue},ref:valueRef,onKeyDown:handleKeyDown}),[displayValue,type,handleKeyDown]);return type==="string"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:node.length>collapseStringsAfterLength?jsxRuntimeExports.jsx(LongString,{str:node,ref:valueRef,className,ctrlClick}):jsxRuntimeExports.jsxs("span",Object.assign({className,onClick:ctrlClick},{children:['"',displayValue,'"']})),Icons]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:jsxRuntimeExports.jsx("span",Object.assign({className,onClick:ctrlClick},{children:displayValue})),Icons]})}}const JsonViewContext=reactExports.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",collapseObjectsAfterLength:20,collapsed:!1,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,displaySize:void 0});function JsonView({src:e,collapseStringsAfterLength:t=99,collapseStringMode:n="directly",collapseObjectsAfterLength:s=99,collapsed:i,enableClipboard:a=!0,editable:m=!1,onEdit:l,onDelete:p,onAdd:d,onChange:u,dark:g=!1,theme:h="default",customizeNode:c,displaySize:R}){const[v,E]=reactExports.useState(0),j=reactExports.useCallback(()=>E(b=>++b),[]);return jsxRuntimeExports.jsx(JsonViewContext.Provider,Object.assign({value:{src:e,collapseStringsAfterLength:t,collapseStringMode:n,collapseObjectsAfterLength:s,collapsed:i,enableClipboard:a,editable:m,onEdit:l,onDelete:p,onAdd:d,onChange:u,forceUpdate:j,customizeNode:c,displaySize:R}},{children:jsxRuntimeExports.jsx("code",Object.assign({className:"json-view"+(g?" dark":"")+(h&&h!=="default"?" json-view_"+h:"")},{children:jsxRuntimeExports.jsx(JsonNode,{node:e,depth:1})}))}))}function useUpdateQueryStringValueWithoutNavigation(e,t){reactExports.useEffect(()=>{const n=new URLSearchParams(window.location.search),s=n.get(e)??"";if(t===s)return;t?n.set(e,t):n.delete(e);const i=[window.location.pathname,n.toString()].filter(Boolean).join("?");window.history.replaceState(null,"",i)},[e,t])}const shouldRevalidate=()=>!0,handle={crumb:(e,{pathname:t})=>({to:t,linkText:t.split("/").reverse()[0]==="reports"?"Reports":"Test Suites"})},metadataToOneString=e=>Object.values(e).map(t=>Array.isArray(t)?t.join(" "):typeof t=="object"?metadataToOneString(t):t).join(" "),SnapshotsListTemplate=({type:e,slots:t})=>{const{projectId:n}=useParams(),s=useLoaderData(),i=useMatches(),a=useSubmit(),l=useNavigation().state!=="idle";invariant(n);const[p]=useSearchParams(),[d,u]=reactExports.useState("desc"),[g,h]=useLocalStorage("show-full-json-metadata",!1),[c,R]=reactExports.useState(()=>{var r;return((r=p.get("tags"))==null?void 0:r.split(","))||[]}),[v,E]=reactExports.useState(()=>p.get("metadata-query")||"");useUpdateQueryStringValueWithoutNavigation("tags",c.join(",")),useUpdateQueryStringValueWithoutNavigation("metadata-query",String(v));const j=i.find(({handle:r})=>{var f;return((f=r==null?void 0:r.hide)==null?void 0:f.snapshotList)===!0}),b=reactExports.useMemo(()=>Array.from(new Set(s.flatMap(({tags:r})=>r))),[s]),O=reactExports.useMemo(()=>s.filter(({tags:r})=>c.every(f=>r.includes(f))),[s,c]),C=reactExports.useMemo(()=>O.filter(({metadata:r})=>v===""?!0:metadataToOneString(r).includes(v)),[O,v]),A=reactExports.useMemo(()=>d===void 0?C:C.sort((r,f)=>{const[T,y]=[Date.parse(r.timestamp),Date.parse(f.timestamp)],S=T-y;return d==="desc"?-S:d==="asc"?S:0}),[C,d]);if(j)return jsxRuntimeExports.jsx(Outlet,{});const w=jsxRuntimeExports.jsx(Box,{sx:{padding:2},children:jsxRuntimeExports.jsxs(Grid,{container:!0,gap:2,alignItems:"flex-end",justifyContent:"space-around",children:[jsxRuntimeExports.jsx(Grid,{item:!0,xs:12,md:4,children:jsxRuntimeExports.jsx(Autocomplete,{multiple:!0,limitTags:2,value:c,onChange:(r,f)=>R(f),options:b,renderInput:r=>jsxRuntimeExports.jsx(TextField,{...r,variant:"standard",label:"Filter by Tags"})})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:12,md:7,children:jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"flex-end",gap:2,children:[jsxRuntimeExports.jsx(TextField,{fullWidth:!0,value:v,onChange:r=>E(r.target.value),variant:"standard",label:"Search in Metadata"}),jsxRuntimeExports.jsx(Box,{minWidth:220,display:"flex",justifyContent:"center",children:jsxRuntimeExports.jsx(FormControlLabel,{control:jsxRuntimeExports.jsx(Switch,{checked:g,onChange:r=>h(r.target.checked)}),label:"Hide Metadata"})}),jsxRuntimeExports.jsx(Box,{display:"flex",justifyContent:"flex-end",children:jsxRuntimeExports.jsxs(Button,{sx:{minWidth:160},variant:"outlined",onClick:()=>a({action:"reload-snapshots"},{method:"post",replace:!0,encType:"application/json"}),color:"primary",disabled:l,children:["refresh ",e]})})]})})]})});return s.length===0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[w,jsxRuntimeExports.jsxs(Typography,{my:3,variant:"h4",align:"center",children:["You don't have any ",e," yet."]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[w,jsxRuntimeExports.jsxs(Table,{children:[jsxRuntimeExports.jsxs(TableHead,{children:[jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableCell,{children:e==="reports"?"Report ID":e==="test suites"?"Test Suite ID":"indefined"}),jsxRuntimeExports.jsx(TableCell,{children:"Tags"}),jsxRuntimeExports.jsx(TableCell,{children:"Metadata"}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(TableSortLabel,{active:!!d,direction:d,onClick:()=>{u(r=>{if(r===void 0)return"desc";if(r==="desc")return"asc"})},children:"Timestamp"})}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:"Actions"})]}),jsxRuntimeExports.jsx(TableRow,{})]}),jsxRuntimeExports.jsx(TableBody,{children:A.map(r=>jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(TextWithCopyIcon,{showText:r.id,copyText:r.id})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Box,{maxWidth:250,children:jsxRuntimeExports.jsx(HidedTags,{onClick:f=>{c.includes(f)||R([...c,f])},tags:r.tags})})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(JsonView,{collapsed:g,src:r.metadata,theme:"atom",enableClipboard:!1})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Typography,{variant:"body2",children:dayjs(r.timestamp).locale("en-gb").format("llll")})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsxs(Box,{display:"flex",justifyContent:"center",gap:1,children:[t!=null&&t.ViewButton?jsxRuntimeExports.jsx(t.ViewButton,{snapshotId:r.id,projectId:n}):jsxRuntimeExports.jsx(Button,{disabled:l,component:Link,to:`${r.id}`,children:"View"}),jsxRuntimeExports.jsx(DownloadButton,{disabled:l,downloadLink:`/api/projects/${n}/${r.id}/download`}),(t==null?void 0:t.additionalSnapshotActions)&&jsxRuntimeExports.jsx(t.additionalSnapshotActions,{snapshotId:r.id,projectId:n}),jsxRuntimeExports.jsx(Box,{children:jsxRuntimeExports.jsx(Tooltip,{title:"delete snapshot",placement:"top",children:jsxRuntimeExports.jsx(IconButton,{onClick:()=>{confirm("Are you sure?")===!0&&a({action:"delete-snapshot",snapshotId:r.id},{method:"post",replace:!0,encType:"application/json"})},color:"primary",disabled:l,children:jsxRuntimeExports.jsx(DeleteIcon,{})})})})]})})]},`r-${r.id}`))})]})]})};export{SnapshotsListTemplate,handle,shouldRevalidate}; +import{R as React,j as jsxRuntimeExports,U as Button,a7 as Popper,a8 as Grow,$ as Paper,a9 as ClickAwayListener,aa as MenuList,M as MenuItem,r as reactExports,B as Box,ab as Chip,I as IconButton,a6 as useParams,V as useLoaderData,y as useMatches,_ as useSubmit,K as useNavigation,h as invariant,q as useSearchParams,X as Outlet,T as Typography,ac as Table,ad as TableHead,ae as TableRow,af as TableCell,ag as TableSortLabel,ah as TableBody,s as dayjs,J as Link,a1 as Tooltip,ai as DeleteIcon,G as Grid,aj as Autocomplete,a5 as TextField,F as FormControlLabel,l as Switch}from"./vendor-Bhc2M4pH.js";import{a as useLocalStorage}from"./index-CAXTGTpX.js";import{d as default_1$1}from"./ContentCopy-bqrH-e3i.js";import{r as requireCreateSvgIcon,i as interopRequireDefaultExports}from"./createSvgIcon-BCx0yKii.js";const options=[{title:"Download HTML",format:"html"},{title:"Download JSON",format:"json"}];function DownloadButton(e){const[t,n]=React.useState(!1),s=React.useRef(null),i=(l,p)=>{window.open(`${l}?report_format=${p}`,"_blank"),n(!1)},a=()=>{n(l=>!l)},m=l=>{s.current&&s.current.contains(l.target)||n(!1)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Button,{disabled:e.disabled,variant:"outlined",ref:s,color:"primary","aria-controls":t?"split-button-menu":void 0,"aria-expanded":t?"true":void 0,"aria-label":"select merge strategy","aria-haspopup":"menu",onClick:a,children:"Download"}),jsxRuntimeExports.jsx(Popper,{open:t,anchorEl:s.current,transition:!0,children:({TransitionProps:l,placement:p})=>jsxRuntimeExports.jsx(Grow,{...l,style:{transformOrigin:p==="bottom"?"center top":"center bottom"},children:jsxRuntimeExports.jsx(Paper,{children:jsxRuntimeExports.jsx(ClickAwayListener,{onClickAway:m,children:jsxRuntimeExports.jsx(MenuList,{id:"split-button-menu",children:options.map(d=>jsxRuntimeExports.jsx(MenuItem,{onClick:()=>i(e.downloadLink,d.format),children:d.title},d.format))})})})})})]})}var CloseRounded={},_interopRequireDefault=interopRequireDefaultExports;Object.defineProperty(CloseRounded,"__esModule",{value:!0});var default_1=CloseRounded.default=void 0,_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=jsxRuntimeExports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M18.3 5.71a.9959.9959 0 0 0-1.41 0L12 10.59 7.11 5.7a.9959.9959 0 0 0-1.41 0c-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}),"CloseRounded");default_1=CloseRounded.default=_default;const HidedTags=({onClick:e,tags:t,limitTags:n=2})=>{const[s,i]=reactExports.useState(!1);return jsxRuntimeExports.jsxs(Box,{display:"flex",alignContent:"center",flexWrap:"wrap",children:[t.slice(0,n).map(a=>jsxRuntimeExports.jsx(Chip,{onClick:()=>e(a),label:a,style:{margin:3}},a)),s&&t.slice(n).map(a=>jsxRuntimeExports.jsx(Chip,{onClick:()=>e(a),label:a,style:{margin:3}},a)),!s&&t.length>n&&jsxRuntimeExports.jsx(Chip,{variant:"outlined",label:`+${t.length-n}`,style:{margin:3,borderColor:"grey"},onClick:()=>i(!0)},"+N"),t.length>0&&s&&jsxRuntimeExports.jsx(IconButton,{style:{margin:3},onClick:()=>i(!1),children:jsxRuntimeExports.jsx(default_1,{fontSize:"small"})})]})},TextWithCopyIcon=({showText:e,copyText:t})=>jsxRuntimeExports.jsxs(Box,{children:[e,jsxRuntimeExports.jsx(IconButton,{size:"small",style:{marginLeft:10},onClick:()=>navigator.clipboard.writeText(t),children:jsxRuntimeExports.jsx(default_1$1,{fontSize:"small"})})]});function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function objectSize(e){return Array.isArray(e)?e.length:isObject(e)?Object.keys(e).length:0}function stringifyForCopying(e,t){if(typeof e=="string")return e;try{return JSON.stringify(e,(n,s)=>{switch(typeof s){case"bigint":return String(s)+"n";case"number":case"boolean":case"object":case"string":return s;default:return String(s)}},t)}catch(n){return`${n.name}: ${n.message}`||"JSON.stringify failed"}}function isCollapsed(e,t,n,s,i,a){if(a&&a.collapsed!==void 0)return!!a.collapsed;if(typeof s=="boolean")return s;if(typeof s=="number"&&t>s)return!0;const m=objectSize(e);if(typeof s=="function"){const l=safeCall(s,[{node:e,depth:t,indexOrName:n,size:m}]);if(typeof l=="boolean")return l}return!!(Array.isArray(e)&&m>i||isObject(e)&&m>i)}function ifDisplay(e,t,n){return typeof e=="boolean"?e:!!(typeof e=="number"&&t>e||e==="collapsed"&&n||e==="expanded"&&!n)}function safeCall(e,t){try{return e(...t)}catch(n){reportError(n)}}function editableAdd(e){if(e===!0||isObject(e)&&e.add===!0)return!0}function editableEdit(e){if(e===!0||isObject(e)&&e.edit===!0)return!0}function editableDelete(e){if(e===!0||isObject(e)&&e.delete===!0)return!0}function isReactComponent(e){return typeof e=="function"}function customAdd(e){return!e||e.add===void 0||!!e.add}function customEdit(e){return!e||e.edit===void 0||!!e.edit}function customDelete(e){return!e||e.delete===void 0||!!e.delete}function customCopy(e){return!e||e.enableClipboard===void 0||!!e.enableClipboard}function resolveEvalFailedNewValue(e,t){return e==="string"?t.trim().replace(/^\"([\s\S]+?)\"$/,"$1"):t}var _path$7;function _extends$7(){return _extends$7=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const i=stringifyForCopying(e);s.stopPropagation(),navigator.clipboard.writeText(i),n(!0),setTimeout(()=>n(!1),3e3)},className:"json-view--copy"})}function NameValue({indexOrName:e,value:t,depth:n,parent:s,deleteHandle:i,editHandle:a}){return jsxRuntimeExports.jsxs("div",Object.assign({className:"json-view--pair"},{children:[jsxRuntimeExports.jsx("span",Object.assign({className:typeof e=="number"?"json-view--index":"json-view--property"},{children:e})),":"," ",jsxRuntimeExports.jsx(JsonNode,{node:t,depth:n+1,deleteHandle:i,editHandle:a,parent:s,indexOrName:e})]}))}var _path$4,_path2$3;function _extends$4(){return _extends$4=Object.assign?Object.assign.bind():function(e){for(var t=1;t{b(isCollapsed(e,t,n,a,l,i))},[a,l]);const O=reactExports.useCallback((o,x,k)=>{Array.isArray(e)?e[+o]=x:e&&(e[o]=x),h&&h({newValue:x,oldValue:k,depth:t,src:u,indexOrName:o,parentType:E?"object":"array"}),c&&c({type:"edit",depth:t,src:u,indexOrName:o,parentType:E?"object":"array"}),R()},[e,h,c,R]),C=o=>{Array.isArray(e)?e.splice(+o,1):e&&delete e[o],R()},[A,w]=reactExports.useState(!1),r=()=>{w(!1),s&&s(n),d&&d({value:e,depth:t,src:u,indexOrName:n,parentType:E?"object":"array"}),c&&c({type:"delete",depth:t,src:u,indexOrName:n,parentType:E?"object":"array"})},[f,T]=reactExports.useState(!1),y=reactExports.useRef(null),S=()=>{var o;if(E){const x=(o=y.current)===null||o===void 0?void 0:o.value;x&&(e[x]=null,y.current&&(y.current.value=""),T(!1),g&&g({indexOrName:x,depth:t,src:u,parentType:"object"}),c&&c({type:"add",indexOrName:x,depth:t,src:u,parentType:"object"}))}else if(Array.isArray(e)){const x=e;x.push(null),g&&g({indexOrName:x.length-1,depth:t,src:u,parentType:"array"}),c&&c({type:"add",indexOrName:x.length-1,depth:t,src:u,parentType:"array"})}R()},D=o=>{o.key==="Enter"?(o.preventDefault(),S()):o.key==="Escape"&&N()},_=A||f,N=()=>{w(!1),T(!1)},$=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!j&&!_&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>b(!0)},{children:[ifDisplay(v,t,j)&&jsxRuntimeExports.jsxs("span",Object.assign({className:"jv-size"},{children:[objectSize(e)," Items"]})),jsxRuntimeExports.jsx(SvgAngleDown,{className:"jv-chevron"})]})),f&&E&&jsxRuntimeExports.jsx("input",{className:"json-view--input",placeholder:"property",ref:y,onKeyDown:D}),_&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:f?S:r}),_&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:N}),!j&&!_&&m&&customCopy(i)&&jsxRuntimeExports.jsx(CopyButton,{node:e}),!j&&!_&&editableAdd(p)&&customAdd(i)&&jsxRuntimeExports.jsx(SvgAddSquare,{className:"json-view--edit",onClick:()=>{E?(T(!0),setTimeout(()=>{var o;return(o=y.current)===null||o===void 0?void 0:o.focus()})):S()}}),!j&&!_&&editableDelete(p)&&customDelete(i)&&s&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>w(!0)})]});return Array.isArray(e)?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"["}),$,j?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>b(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:e.map((o,x)=>jsxRuntimeExports.jsx(NameValue,{indexOrName:x,value:o,depth:t,parent:e,deleteHandle:C,editHandle:O},String(n)+String(x)))})),jsxRuntimeExports.jsx("span",{children:"]"}),j&&ifDisplay(v,t,j)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>b(!1),className:"jv-size"},{children:[objectSize(e)," Items"]}))]}):E?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("span",{children:"{"}),$,j?jsxRuntimeExports.jsx("button",Object.assign({onClick:()=>b(!1),className:"jv-button"},{children:"..."})):jsxRuntimeExports.jsx("div",Object.assign({className:"jv-indent"},{children:Object.entries(e).map(([o,x])=>jsxRuntimeExports.jsx(NameValue,{indexOrName:o,value:x,depth:t,parent:e,deleteHandle:C,editHandle:O},String(n)+String(o)))})),jsxRuntimeExports.jsx("span",{children:"}"}),j&&ifDisplay(v,t,j)&&jsxRuntimeExports.jsxs("span",Object.assign({onClick:()=>b(!1),className:"jv-size"},{children:[objectSize(e)," Items"]}))]}):null}const LongString=React.forwardRef(({str:e,className:t,ctrlClick:n},s)=>{let{collapseStringMode:i,collapseStringsAfterLength:a}=reactExports.useContext(JsonViewContext);const[m,l]=reactExports.useState(!0);a=a>0?a:0;const p=e.replace(/\s+/g," "),d=u=>{(u.ctrlKey||u.metaKey)&&n?n(u):l(!m)};if(e.length<=a)return jsxRuntimeExports.jsxs("span",Object.assign({className:t,onClick:n},{children:['"',e,'"']}));if(i==="address")return e.length<=10?jsxRuntimeExports.jsxs("span",Object.assign({className:t,onClick:n},{children:['"',e,'"']})):jsxRuntimeExports.jsxs("span",Object.assign({onClick:d,className:t+" cursor-pointer"},{children:['"',m?p.slice(0,6)+"..."+p.slice(-4):e,'"']}));if(i==="directly")return jsxRuntimeExports.jsxs("span",Object.assign({onClick:d,className:t+" cursor-pointer"},{children:['"',m?p.slice(0,a)+"...":e,'"']}));if(i==="word"){let u=a,g=a+1,h=p,c=1;for(;;){if(/\W/.test(e[u])){h=e.slice(0,u);break}if(/\W/.test(e[g])){h=e.slice(0,g);break}if(c===6){h=e.slice(0,a);break}c++,u--,g++}return jsxRuntimeExports.jsxs("span",Object.assign({onClick:d,className:t+" cursor-pointer"},{children:['"',m?h+"...":e,'"']}))}return jsxRuntimeExports.jsxs("span",Object.assign({className:t},{children:['"',e,'"']}))});var _path;function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t{setEditing(!0),setTimeout(()=>{var e,t;(e=window.getSelection())===null||e===void 0||e.selectAllChildren(valueRef.current),(t=valueRef.current)===null||t===void 0||t.focus()})},done=reactExports.useCallback(()=>{const newValue=valueRef.current.innerText;try{const evalValue=eval(newValue);editHandle&&editHandle(indexOrName,evalValue,node)}catch(e){const t=resolveEvalFailedNewValue(type,newValue);editHandle&&editHandle(indexOrName,t,node)}setEditing(!1)},[editHandle]),cancel=()=>{setEditing(!1),setDeleting(!1)},deleteHandle=()=>{setDeleting(!1),_deleteHandle&&_deleteHandle(indexOrName),onDelete&&onDelete({value:node,depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object"}),onChange&&onChange({depth,src,indexOrName,parentType:Array.isArray(parent)?"array":"object",type:"delete"})},handleKeyDown=reactExports.useCallback(e=>{e.key==="Enter"?(e.preventDefault(),done()):e.key==="Escape"&&cancel()},[done]),isEditing=editing||deleting,ctrlClick=!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle?e=>{(e.ctrlKey||e.metaKey)&&edit()}:void 0,Icons=jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[isEditing&&jsxRuntimeExports.jsx(SvgDone,{className:"json-view--edit",style:{display:"inline-block"},onClick:deleting?deleteHandle:done}),isEditing&&jsxRuntimeExports.jsx(SvgCancel,{className:"json-view--edit",style:{display:"inline-block"},onClick:cancel}),!isEditing&&enableClipboard&&customCopy(customReturn)&&jsxRuntimeExports.jsx(CopyButton,{node}),!isEditing&&editableEdit(editable)&&customEdit(customReturn)&&editHandle&&jsxRuntimeExports.jsx(SvgEdit,{className:"json-view--edit",onClick:edit}),!isEditing&&editableDelete(editable)&&customDelete(customReturn)&&_deleteHandle&&jsxRuntimeExports.jsx(SvgTrash,{className:"json-view--edit",onClick:()=>setDeleting(!0)})]});let className="json-view--string";switch(typeof(customReturn==null?void 0:customReturn.className)=="string"&&(className+=" "+customReturn.className),type){case"number":case"bigint":className="json-view--number";break;case"boolean":className="json-view--boolean";break;case"object":className="json-view--null";break}deleting&&(className+=" json-view--deleting");let displayValue=String(node);type==="bigint"&&(displayValue+="n");const EditingElement=reactExports.useMemo(()=>jsxRuntimeExports.jsx("span",{contentEditable:!0,className,dangerouslySetInnerHTML:{__html:type==="string"?`"${displayValue}"`:displayValue},ref:valueRef,onKeyDown:handleKeyDown}),[displayValue,type,handleKeyDown]);return type==="string"?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:node.length>collapseStringsAfterLength?jsxRuntimeExports.jsx(LongString,{str:node,ref:valueRef,className,ctrlClick}):jsxRuntimeExports.jsxs("span",Object.assign({className,onClick:ctrlClick},{children:['"',displayValue,'"']})),Icons]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[editing?EditingElement:jsxRuntimeExports.jsx("span",Object.assign({className,onClick:ctrlClick},{children:displayValue})),Icons]})}}const JsonViewContext=reactExports.createContext({src:void 0,collapseStringsAfterLength:99,collapseStringMode:"directly",collapseObjectsAfterLength:20,collapsed:!1,enableClipboard:!0,editable:!1,onEdit:void 0,onDelete:void 0,onAdd:void 0,onChange:void 0,forceUpdate:()=>{},customizeNode:void 0,displaySize:void 0});function JsonView({src:e,collapseStringsAfterLength:t=99,collapseStringMode:n="directly",collapseObjectsAfterLength:s=99,collapsed:i,enableClipboard:a=!0,editable:m=!1,onEdit:l,onDelete:p,onAdd:d,onChange:u,dark:g=!1,theme:h="default",customizeNode:c,displaySize:R}){const[v,E]=reactExports.useState(0),j=reactExports.useCallback(()=>E(b=>++b),[]);return jsxRuntimeExports.jsx(JsonViewContext.Provider,Object.assign({value:{src:e,collapseStringsAfterLength:t,collapseStringMode:n,collapseObjectsAfterLength:s,collapsed:i,enableClipboard:a,editable:m,onEdit:l,onDelete:p,onAdd:d,onChange:u,forceUpdate:j,customizeNode:c,displaySize:R}},{children:jsxRuntimeExports.jsx("code",Object.assign({className:"json-view"+(g?" dark":"")+(h&&h!=="default"?" json-view_"+h:"")},{children:jsxRuntimeExports.jsx(JsonNode,{node:e,depth:1})}))}))}function useUpdateQueryStringValueWithoutNavigation(e,t){reactExports.useEffect(()=>{const n=new URLSearchParams(window.location.search),s=n.get(e)??"";if(t===s)return;t?n.set(e,t):n.delete(e);const i=[window.location.pathname,n.toString()].filter(Boolean).join("?");window.history.replaceState(null,"",i)},[e,t])}const shouldRevalidate=()=>!0,handle={crumb:(e,{pathname:t})=>({to:t,linkText:t.split("/").reverse()[0]==="reports"?"Reports":"Test Suites"})},metadataToOneString=e=>Object.values(e).map(t=>Array.isArray(t)?t.join(" "):typeof t=="object"?metadataToOneString(t):t).join(" "),SnapshotsListTemplate=({type:e,slots:t})=>{const{projectId:n}=useParams(),s=useLoaderData(),i=useMatches(),a=useSubmit(),l=useNavigation().state!=="idle";invariant(n);const[p]=useSearchParams(),[d,u]=reactExports.useState("desc"),[g,h]=useLocalStorage("show-full-json-metadata",!1),[c,R]=reactExports.useState(()=>{var r;return((r=p.get("tags"))==null?void 0:r.split(","))||[]}),[v,E]=reactExports.useState(()=>p.get("metadata-query")||"");useUpdateQueryStringValueWithoutNavigation("tags",c.join(",")),useUpdateQueryStringValueWithoutNavigation("metadata-query",String(v));const j=i.find(({handle:r})=>{var f;return((f=r==null?void 0:r.hide)==null?void 0:f.snapshotList)===!0}),b=reactExports.useMemo(()=>Array.from(new Set(s.flatMap(({tags:r})=>r))),[s]),O=reactExports.useMemo(()=>s.filter(({tags:r})=>c.every(f=>r.includes(f))),[s,c]),C=reactExports.useMemo(()=>O.filter(({metadata:r})=>v===""?!0:metadataToOneString(r).includes(v)),[O,v]),A=reactExports.useMemo(()=>d===void 0?C:C.sort((r,f)=>{const[T,y]=[Date.parse(r.timestamp),Date.parse(f.timestamp)],S=T-y;return d==="desc"?-S:d==="asc"?S:0}),[C,d]);if(j)return jsxRuntimeExports.jsx(Outlet,{});const w=jsxRuntimeExports.jsx(Box,{sx:{padding:2},children:jsxRuntimeExports.jsxs(Grid,{container:!0,gap:2,alignItems:"flex-end",justifyContent:"space-around",children:[jsxRuntimeExports.jsx(Grid,{item:!0,xs:12,md:4,children:jsxRuntimeExports.jsx(Autocomplete,{multiple:!0,limitTags:2,value:c,onChange:(r,f)=>R(f),options:b,renderInput:r=>jsxRuntimeExports.jsx(TextField,{...r,variant:"standard",label:"Filter by Tags"})})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:12,md:7,children:jsxRuntimeExports.jsxs(Box,{display:"flex",alignItems:"flex-end",gap:2,children:[jsxRuntimeExports.jsx(TextField,{fullWidth:!0,value:v,onChange:r=>E(r.target.value),variant:"standard",label:"Search in Metadata"}),jsxRuntimeExports.jsx(Box,{minWidth:220,display:"flex",justifyContent:"center",children:jsxRuntimeExports.jsx(FormControlLabel,{control:jsxRuntimeExports.jsx(Switch,{checked:g,onChange:r=>h(r.target.checked)}),label:"Hide Metadata"})}),jsxRuntimeExports.jsx(Box,{display:"flex",justifyContent:"flex-end",children:jsxRuntimeExports.jsxs(Button,{sx:{minWidth:160},variant:"outlined",onClick:()=>a({action:"reload-snapshots"},{method:"post",replace:!0,encType:"application/json"}),color:"primary",disabled:l,children:["refresh ",e]})})]})})]})});return s.length===0?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[w,jsxRuntimeExports.jsxs(Typography,{my:3,variant:"h4",align:"center",children:["You don't have any ",e," yet."]})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[w,jsxRuntimeExports.jsxs(Table,{children:[jsxRuntimeExports.jsxs(TableHead,{children:[jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableCell,{children:e==="reports"?"Report ID":e==="test suites"?"Test Suite ID":"indefined"}),jsxRuntimeExports.jsx(TableCell,{children:"Tags"}),jsxRuntimeExports.jsx(TableCell,{children:"Metadata"}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(TableSortLabel,{active:!!d,direction:d,onClick:()=>{u(r=>{if(r===void 0)return"desc";if(r==="desc")return"asc"})},children:"Timestamp"})}),jsxRuntimeExports.jsx(TableCell,{align:"center",children:"Actions"})]}),jsxRuntimeExports.jsx(TableRow,{})]}),jsxRuntimeExports.jsx(TableBody,{children:A.map(r=>jsxRuntimeExports.jsxs(TableRow,{children:[jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(TextWithCopyIcon,{showText:r.id,copyText:r.id})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Box,{maxWidth:250,children:jsxRuntimeExports.jsx(HidedTags,{onClick:f=>{c.includes(f)||R([...c,f])},tags:r.tags})})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(JsonView,{collapsed:g,src:r.metadata,theme:"atom",enableClipboard:!1})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsx(Typography,{variant:"body2",children:dayjs(r.timestamp).locale("en-gb").format("llll")})}),jsxRuntimeExports.jsx(TableCell,{children:jsxRuntimeExports.jsxs(Box,{display:"flex",justifyContent:"center",gap:1,children:[t!=null&&t.ViewButton?jsxRuntimeExports.jsx(t.ViewButton,{snapshotId:r.id,projectId:n}):jsxRuntimeExports.jsx(Button,{disabled:l,component:Link,to:`${r.id}`,children:"View"}),jsxRuntimeExports.jsx(DownloadButton,{disabled:l,downloadLink:`/api/projects/${n}/${r.id}/download`}),(t==null?void 0:t.additionalSnapshotActions)&&jsxRuntimeExports.jsx(t.additionalSnapshotActions,{snapshotId:r.id,projectId:n}),jsxRuntimeExports.jsx(Box,{children:jsxRuntimeExports.jsx(Tooltip,{title:"delete snapshot",placement:"top",children:jsxRuntimeExports.jsx(IconButton,{onClick:()=>{confirm("Are you sure?")===!0&&a({action:"delete-snapshot",snapshotId:r.id},{method:"post",replace:!0,encType:"application/json"})},color:"primary",disabled:l,children:jsxRuntimeExports.jsx(DeleteIcon,{})})})})]})})]},`r-${r.id}`))})]})]})};export{SnapshotsListTemplate,handle,shouldRevalidate}; diff --git a/src/evidently/ui/assets/static/js/vendor-DRRvL2bZ.js b/src/evidently/ui/assets/static/js/vendor-Bhc2M4pH.js similarity index 99% rename from src/evidently/ui/assets/static/js/vendor-DRRvL2bZ.js rename to src/evidently/ui/assets/static/js/vendor-Bhc2M4pH.js index 1f0eeae99e..0f7f5709cc 100644 --- a/src/evidently/ui/assets/static/js/vendor-DRRvL2bZ.js +++ b/src/evidently/ui/assets/static/js/vendor-Bhc2M4pH.js @@ -316,4 +316,4 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann `));const t=y.useMemo(()=>m({},k4,e.localeText),[e.localeText]);return y.useMemo(()=>m({},e,{localeText:t}),[e,t])},gt=()=>Zs().utils,bc=()=>Zs().defaultDates,rr=()=>Zs().localeText,hs=e=>{const t=gt(),n=y.useRef();return n.current===void 0&&(n.current=t.dateWithTimezone(void 0,e)),n.current};function ek(e,t,n,r){const{value:o,onError:s}=e,a=Zs(),i=y.useRef(r),l=t({adapter:a,value:o,props:e});return y.useEffect(()=>{s&&!n(l,i.current)&&s(l,o),i.current=l},[n,s,i,l,o]),l}const Xg=({timezone:e,value:t,defaultValue:n,onChange:r,valueManager:o})=>{var s,a;const i=gt(),l=y.useRef(n),c=(s=t??l.current)!=null?s:o.emptyValue,u=y.useMemo(()=>o.getTimezone(i,c),[i,o,c]),d=Ie(p=>u==null?p:o.setTimezone(i,u,p)),f=(a=e??u)!=null?a:"default",b=y.useMemo(()=>o.setTimezone(i,f,c),[o,i,f,c]),w=Ie((p,...S)=>{const h=d(p);r==null||r(h,...S)});return{value:b,handleValueChange:w,timezone:f}},vi=({name:e,timezone:t,value:n,defaultValue:r,onChange:o,valueManager:s})=>{const[a,i]=yn({name:e,state:"value",controlled:n,default:r??s.emptyValue}),l=Ie((c,...u)=>{i(c),o==null||o(c,...u)});return Xg({timezone:t,value:a,defaultValue:void 0,onChange:l,valueManager:s})},T4=e=>{const t=gt(),n=rr(),r=Zs(),s=Xt().direction==="rtl",{valueManager:a,fieldValueManager:i,valueType:l,validator:c,internalProps:u,internalProps:{value:d,defaultValue:f,referenceDate:b,onChange:w,format:p,formatDensity:S="dense",selectedSections:h,onSelectedSectionsChange:g,shouldRespectLeadingZeros:C=!1,timezone:x}}=e,{timezone:T,value:v,handleValueChange:k}=Xg({timezone:x,value:d,defaultValue:f,onChange:w,valueManager:a}),M=y.useMemo(()=>g4(t,T),[t,T]),$=y.useCallback((U,Q=null)=>i.getSectionsFromValue(t,U,Q,s,K=>Ab(t,T,n,p,K,S,C,s)),[i,p,n,s,C,t,S,T]),R=y.useMemo(()=>i.getValueStrFromSections($(a.emptyValue),s),[i,$,a.emptyValue,s]),[E,A]=y.useState(()=>{const U=$(v),Q={sections:U,value:v,referenceValue:a.emptyValue,tempValueStrAndroid:null},K=l4(U),H=a.getInitialReferenceValue({referenceDate:b,value:v,utils:t,props:u,granularity:K,timezone:T});return m({},Q,{referenceValue:H})}),[N,_]=yn({controlled:h,default:null,name:"useField",state:"selectedSectionIndexes"}),D=U=>{_(U),g==null||g(U),A(Q=>m({},Q,{selectedSectionQuery:null}))},O=y.useMemo(()=>{if(N==null)return null;if(N==="all")return{startIndex:0,endIndex:E.sections.length-1,shouldSelectBoundarySelectors:!0};if(typeof N=="number")return{startIndex:N,endIndex:N};if(typeof N=="string"){const U=E.sections.findIndex(Q=>Q.type===N);return{startIndex:U,endIndex:U}}return N},[N,E.sections]),j=({value:U,referenceValue:Q,sections:K})=>{A(oe=>m({},oe,{sections:K,value:U,referenceValue:Q,tempValueStrAndroid:null}));const H={validationError:c({adapter:r,value:U,props:m({},u,{value:U,timezone:T})})};k(U,H)},I=(U,Q)=>{const K=[...E.sections];return K[U]=m({},K[U],{value:Q,modified:!0}),ZS(K,s)},L=()=>{a.areValuesEqual(t,E.value,a.emptyValue)||j({value:a.emptyValue,referenceValue:E.referenceValue,sections:$(a.emptyValue)})},F=()=>{if(O==null)return;const U=E.sections[O.startIndex];if(U.value==="")return;const Q=i.getActiveDateManager(t,E,U),H=Q.getSections(E.sections).filter(ee=>ee.value!=="").length===1,oe=I(O.startIndex,""),me=H?null:t.date(new Date("")),ye=Q.getNewValuesFromNewActiveDate(me);(me!=null&&!t.isValid(me))!=(Q.date!=null&&!t.isValid(Q.date))?j(m({},ye,{sections:oe})):A(ee=>m({},ee,ye,{sections:oe,tempValueStrAndroid:null}))},J=U=>{const Q=(oe,me)=>{const ye=t.parse(oe,p);if(ye==null||!t.isValid(ye))return null;const ee=Ab(t,T,n,p,ye,S,C,s);return jb(t,T,ye,ee,me,!1)},K=i.parseValueStr(U,E.referenceValue,Q),H=i.updateReferenceValue(t,K,E.referenceValue);j({value:K,referenceValue:H,sections:$(K,E.sections)})},ie=({activeSection:U,newSectionValue:Q,shouldGoToNextSection:K})=>{K&&O&&O.startIndexm({},X,ee,{sections:oe,tempValueStrAndroid:null}))},ue=U=>A(Q=>m({},Q,{tempValueStrAndroid:U}));return y.useEffect(()=>{const U=$(E.value);A(Q=>m({},Q,{sections:U}))},[p,t.locale]),y.useEffect(()=>{let U=!1;a.areValuesEqual(t,E.value,v)?U=a.getTimezone(t,E.value)!==a.getTimezone(t,v):U=!0,U&&A(Q=>m({},Q,{value:v,referenceValue:i.updateReferenceValue(t,v,Q.referenceValue),sections:$(v)}))},[v]),{state:E,selectedSectionIndexes:O,setSelectedSections:D,clearValue:L,clearActiveSection:F,updateSectionValue:ie,updateValueFromValueStr:J,setTempAndroidValueStr:ue,sectionsValueBoundaries:M,placeholder:R,timezone:T}},P4=5e3,oa=e=>e.saveQuery!=null,M4=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,setTempAndroidValueStr:r,timezone:o})=>{const s=gt(),[a,i]=y.useState(null),l=Ie(()=>i(null));y.useEffect(()=>{var b;a!=null&&((b=e[a.sectionIndex])==null?void 0:b.type)!==a.sectionType&&l()},[e,a,l]),y.useEffect(()=>{if(a!=null){const b=setTimeout(()=>l(),P4);return()=>{window.clearTimeout(b)}}return()=>{}},[a,l]);const c=({keyPressed:b,sectionIndex:w},p,S)=>{const h=b.toLowerCase(),g=e[w];if(a!=null&&(!S||S(a.value))&&a.sectionIndex===w){const x=`${a.value}${h}`,T=p(x,g);if(!oa(T))return i({sectionIndex:w,value:x,sectionType:g.type}),T}const C=p(h,g);return oa(C)&&!C.saveQuery?(l(),null):(i({sectionIndex:w,value:h,sectionType:g.type}),oa(C)?null:C)},u=b=>{const w=(h,g,C)=>{const x=g.filter(T=>T.toLowerCase().startsWith(C));return x.length===0?{saveQuery:!1}:{sectionValue:x[0],shouldGoToNextSection:x.length===1}},p=(h,g,C,x)=>{const T=v=>YS(s,o,g.type,v);if(g.contentType==="letter")return w(g.format,T(g.format),h);if(C&&x!=null&&HS(s,C).contentType==="letter"){const v=T(C),k=w(C,v,h);return oa(k)?{saveQuery:!1}:m({},k,{sectionValue:x(k.sectionValue,v)})}return{saveQuery:!1}};return c(b,(h,g)=>{switch(g.type){case"month":{const C=x=>Lb(s,x,s.formats.month,g.format);return p(h,g,s.formats.month,C)}case"weekDay":{const C=(x,T)=>T.indexOf(x).toString();return p(h,g,s.formats.weekday,C)}case"meridiem":return p(h,g);default:return{saveQuery:!1}}})},d=b=>{const w=(S,h)=>{const g=+`${S}`,C=n[h.type]({currentDate:null,format:h.format,contentType:h.contentType});if(g>C.maximum)return{saveQuery:!1};if(gC.maximum||S.length===C.maximum.toString().length;return{sectionValue:GS(s,o,g,C,h),shouldGoToNextSection:x}};return c(b,(S,h)=>{if(h.contentType==="digit"||h.contentType==="digit-with-letter")return w(S,h);if(h.type==="month"){const g=QS(s,o,"digit","month","MM"),C=w(S,{type:h.type,format:"MM",hasLeadingZerosInFormat:g,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(oa(C))return C;const x=Lb(s,C.sectionValue,"MM",h.format);return m({},C,{sectionValue:x})}if(h.type==="weekDay"){const g=w(S,h);if(oa(g))return g;const C=If(s,o,h.format)[Number(g.sectionValue)-1];return m({},g,{sectionValue:C})}return{saveQuery:!1}},S=>!Number.isNaN(Number(S)))};return{applyCharacterEditing:Ie(b=>{const w=e[b.sectionIndex],S=!Number.isNaN(Number(b.keyPressed))?d(b):u(b);S==null?r(null):t({activeSection:w,newSectionValue:S.sectionValue,shouldGoToNextSection:S.shouldGoToNextSection})}),resetCharacterQuery:l}};function R4(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const $4=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},ld=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?ld(t.shadowRoot):t:null},D4="@media (pointer: fine)",E4=["onClick","onKeyDown","onFocus","onBlur","onMouseUp","onPaste","error","clearable","onClear","disabled"],_4=e=>{const t=gt(),{state:n,selectedSectionIndexes:r,setSelectedSections:o,clearValue:s,clearActiveSection:a,updateSectionValue:i,updateValueFromValueStr:l,setTempAndroidValueStr:c,sectionsValueBoundaries:u,placeholder:d,timezone:f}=T4(e),{inputRef:b,internalProps:w,internalProps:{readOnly:p=!1,unstableFieldRef:S,minutesStep:h},forwardedProps:{onClick:g,onKeyDown:C,onFocus:x,onBlur:T,onMouseUp:v,onPaste:k,error:M,clearable:$,onClear:R,disabled:E},fieldValueManager:A,valueManager:N,validator:_}=e,D=q(e.forwardedProps,E4),{applyCharacterEditing:O,resetCharacterQuery:j}=M4({sections:n.sections,updateSectionValue:i,sectionsValueBoundaries:u,setTempAndroidValueStr:c,timezone:f}),I=y.useRef(null),L=ut(b,I),F=y.useRef(void 0),ie=Xt().direction==="rtl",ue=y.useMemo(()=>b4(n.sections,ie),[n.sections,ie]),U=()=>{var G;if(p){o(null);return}const Z=(G=I.current.selectionStart)!=null?G:0;let te;Z<=n.sections[0].startInInput||Z>=n.sections[n.sections.length-1].endInInput?te=1:te=n.sections.findIndex(Ae=>Ae.startInInput-Ae.startSeparator.length>Z);const De=te===-1?n.sections.length-1:te-1;o(De)},Q=Ie((G,...Z)=>{G.isDefaultPrevented()||(g==null||g(G,...Z),U())}),K=Ie(G=>{v==null||v(G),G.preventDefault()}),H=Ie((...G)=>{x==null||x(...G);const Z=I.current;window.clearTimeout(F.current),F.current=setTimeout(()=>{!Z||Z!==I.current||r!=null||p||(Z.value.length&&Number(Z.selectionEnd)-Number(Z.selectionStart)===Z.value.length?o("all"):U())})}),oe=Ie((...G)=>{T==null||T(...G),o(null)}),me=Ie(G=>{if(k==null||k(G),p){G.preventDefault();return}const Z=G.clipboardData.getData("text");if(r&&r.startIndex===r.endIndex){const te=n.sections[r.startIndex],De=/^[a-zA-Z]+$/.test(Z),Ae=/^[0-9]+$/.test(Z),He=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(Z);if(te.contentType==="letter"&&De||te.contentType==="digit"&&Ae||te.contentType==="digit-with-letter"&&He)return;if(De||Ae){G.preventDefault();return}}G.preventDefault(),j(),l(Z)}),ye=Ie(G=>{if(p)return;const Z=G.target.value,te=G.nativeEvent.data,De=te&&te.length>1,Ae=De?te:Z,He=Ma(Ae);if(r==null||De){l(De?te:He);return}let Ue;if(r.startIndex===0&&r.endIndex===n.sections.length-1&&He.length===1)Ue=He;else{const Ee=Ma(A.getValueStrFromSections(n.sections,ie));let we=-1,ke=-1;for(let Se=0;Seqe.end)return;const wt=He.length-Ee.length+qe.end-Ma(qe.endSeparator||"").length;Ue=He.slice(qe.start+Ma(qe.startSeparator||"").length,wt)}if(y4()&&Ue.length===0){c(Ae);return}O({keyPressed:Ue,sectionIndex:r.startIndex})}),ee=Ie(G=>{switch(C==null||C(G),!0){case(G.key==="a"&&(G.ctrlKey||G.metaKey)):{G.preventDefault(),o("all");break}case G.key==="ArrowRight":{if(G.preventDefault(),r==null)o(ue.startIndex);else if(r.startIndex!==r.endIndex)o(r.endIndex);else{const Z=ue.neighbors[r.startIndex].rightIndex;Z!==null&&o(Z)}break}case G.key==="ArrowLeft":{if(G.preventDefault(),r==null)o(ue.endIndex);else if(r.startIndex!==r.endIndex)o(r.startIndex);else{const Z=ue.neighbors[r.startIndex].leftIndex;Z!==null&&o(Z)}break}case["Backspace","Delete"].includes(G.key):{if(G.preventDefault(),p)break;r==null||r.startIndex===0&&r.endIndex===n.sections.length-1?s():a(),j();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(G.key):{if(G.preventDefault(),p||r==null)break;const Z=n.sections[r.startIndex],te=A.getActiveDateManager(t,n,Z),De=d4(t,f,Z,G.key,u,te.date,{minutesStep:h});i({activeSection:Z,newSectionValue:De,shouldGoToNextSection:!1});break}}});Zt(()=>{if(!I.current)return;if(r==null){I.current.scrollLeft&&(I.current.scrollLeft=0);return}const G=n.sections[r.startIndex],Z=n.sections[r.endIndex];let te=G.startInInput,De=Z.endInInput;if(r.shouldSelectBoundarySelectors&&(te-=G.startSeparator.length,De+=Z.endSeparator.length),te!==I.current.selectionStart||De!==I.current.selectionEnd){const Ae=I.current.scrollTop;I.current===ld(document)&&I.current.setSelectionRange(te,De),I.current.scrollTop=Ae}});const pe=ek(m({},w,{value:n.value,timezone:f}),_,N.isSameError,N.defaultErrorState),X=y.useMemo(()=>M!==void 0?M:N.hasError(pe),[N,pe,M]);y.useEffect(()=>{!X&&!r&&j()},[n.referenceValue,r,X]),y.useEffect(()=>(I.current&&I.current===document.activeElement&&o("all"),()=>window.clearTimeout(F.current)),[]),y.useEffect(()=>{n.tempValueStrAndroid!=null&&r!=null&&(j(),a())},[n.tempValueStrAndroid]);const he=y.useMemo(()=>{var G;return(G=n.tempValueStrAndroid)!=null?G:A.getValueStrFromSections(n.sections,ie)},[n.sections,A,n.tempValueStrAndroid,ie]),se=y.useMemo(()=>r==null||n.sections[r.startIndex].contentType==="letter"?"text":"numeric",[r,n.sections]),Oe=I.current&&I.current===ld(document),Re=N.areValuesEqual(t,n.value,N.emptyValue),ge=!Oe&ℜy.useImperativeHandle(S,()=>({getSections:()=>n.sections,getActiveSectionIndex:()=>{var G,Z;const te=(G=I.current.selectionStart)!=null?G:0,De=(Z=I.current.selectionEnd)!=null?Z:0;if(te===0&&De===0)return null;const Ae=te<=n.sections[0].startInInput?1:n.sections.findIndex(He=>He.startInInput-He.startSeparator.length>te);return Ae===-1?n.sections.length-1:Ae-1},setSelectedSections:G=>o(G)}));const $e=Ie((G,...Z)=>{var te;G.preventDefault(),R==null||R(G,...Z),s(),I==null||(te=I.current)==null||te.focus(),o(0)});return m({placeholder:d,autoComplete:"off",disabled:!!E},D,{value:ge?"":he,inputMode:se,readOnly:p,onClick:Q,onFocus:H,onBlur:oe,onPaste:me,onChange:ye,onKeyDown:ee,onMouseUp:K,onClear:$e,error:X,ref:L,clearable:!!($&&!Re&&!p&&!E)})},tk=({props:e,value:t,adapter:n})=>{if(t===null)return null;const{shouldDisableDate:r,shouldDisableMonth:o,shouldDisableYear:s,disablePast:a,disableFuture:i,timezone:l}=e,c=n.utils.dateWithTimezone(void 0,l),u=br(n.utils,e.minDate,n.defaultDates.minDate),d=br(n.utils,e.maxDate,n.defaultDates.maxDate);switch(!0){case!n.utils.isValid(t):return"invalidDate";case!!(r&&r(t)):return"shouldDisableDate";case!!(o&&o(t)):return"shouldDisableMonth";case!!(s&&s(t)):return"shouldDisableYear";case!!(i&&n.utils.isAfterDay(t,c)):return"disableFuture";case!!(a&&n.utils.isBeforeDay(t,c)):return"disablePast";case!!(u&&n.utils.isBeforeDay(t,u)):return"minDate";case!!(d&&n.utils.isAfterDay(t,d)):return"maxDate";default:return null}},I4=({adapter:e,value:t,props:n})=>{if(t===null)return null;const{minTime:r,maxTime:o,minutesStep:s,shouldDisableClock:a,shouldDisableTime:i,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u,timezone:d}=n,f=e.utils.dateWithTimezone(void 0,d),b=yc(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(r&&b(r,t)):return"minTime";case!!(o&&b(t,o)):return"maxTime";case!!(u&&e.utils.isAfter(t,f)):return"disableFuture";case!!(c&&e.utils.isBefore(t,f)):return"disablePast";case!!(i&&i(t,"hours")):return"shouldDisableTime-hours";case!!(i&&i(t,"minutes")):return"shouldDisableTime-minutes";case!!(i&&i(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&a(e.utils.getHours(t),"hours")):return"shouldDisableClock-hours";case!!(a&&a(e.utils.getMinutes(t),"minutes")):return"shouldDisableClock-minutes";case!!(a&&a(e.utils.getSeconds(t),"seconds")):return"shouldDisableClock-seconds";case!!(s&&e.utils.getMinutes(t)%s!==0):return"minutesStep";default:return null}},Jg=({props:e,value:t,adapter:n})=>{const r=tk({adapter:n,value:t,props:e});return r!==null?r:I4({adapter:n,value:t,props:e})},nk=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],rk=["disablePast","disableFuture","minTime","maxTime","shouldDisableClock","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],ok=["minDateTime","maxDateTime"],O4=[...nk,...rk,...ok],sk=e=>O4.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{}),L4=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","readOnly","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef"],A4=(e,t)=>{const n=m({},e),r={},o=s=>{n.hasOwnProperty(s)&&(r[s]=n[s],delete n[s])};return L4.forEach(o),nk.forEach(o),rk.forEach(o),ok.forEach(o),{forwardedProps:n,internalProps:r}},N4=e=>{var t,n,r,o,s,a,i,l;const c=gt(),u=bc(),f=((t=e.ampm)!=null?t:c.is12HourCycleInCurrentLocale())?c.formats.keyboardDateTime12h:c.formats.keyboardDateTime24h;return m({},e,{disablePast:(n=e.disablePast)!=null?n:!1,disableFuture:(r=e.disableFuture)!=null?r:!1,format:(o=e.format)!=null?o:f,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:br(c,(s=e.minDateTime)!=null?s:e.minDate,u.minDate),maxDate:br(c,(a=e.maxDateTime)!=null?a:e.maxDate,u.maxDate),minTime:(i=e.minDateTime)!=null?i:e.minTime,maxTime:(l=e.maxDateTime)!=null?l:e.maxTime})},j4=({props:e,inputRef:t})=>{const n=N4(e),{forwardedProps:r,internalProps:o}=A4(n);return _4({inputRef:t,forwardedProps:r,internalProps:o,valueManager:Jn,fieldValueManager:C4,validator:Jg,valueType:"date-time"})},F4=St(P.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),B4=St(P.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),z4=St(P.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),V4=St(P.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar");St(P.jsxs(y.Fragment,{children:[P.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),P.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock");const U4=St(P.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),W4=St(P.jsxs(y.Fragment,{children:[P.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),P.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),H4=St(P.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function Y4(e){return Ce("MuiPickersArrowSwitcher",e)}be("MuiPickersArrowSwitcher",["root","spacer","button"]);const K4=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel"],G4=["ownerState"],Z4=["ownerState"],q4=V("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Q4=V("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),Fb=V(Dn,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})(({ownerState:e})=>m({},e.hidden&&{visibility:"hidden"})),X4=e=>{const{classes:t}=e;return xe({root:["root"],spacer:["spacer"],button:["button"]},Y4,t)},ak=y.forwardRef(function(t,n){var r,o,s,a;const l=Xt().direction==="rtl",c=ve({props:t,name:"MuiPickersArrowSwitcher"}),{children:u,className:d,slots:f,slotProps:b,isNextDisabled:w,isNextHidden:p,onGoToNext:S,nextLabel:h,isPreviousDisabled:g,isPreviousHidden:C,onGoToPrevious:x,previousLabel:T}=c,v=q(c,K4),k=c,M=X4(k),$={isDisabled:w,isHidden:p,goTo:S,label:h},R={isDisabled:g,isHidden:C,goTo:x,label:T},E=(r=f==null?void 0:f.previousIconButton)!=null?r:Fb,A=ct({elementType:E,externalSlotProps:b==null?void 0:b.previousIconButton,additionalProps:{size:"medium",title:R.label,"aria-label":R.label,disabled:R.isDisabled,edge:"end",onClick:R.goTo},ownerState:m({},k,{hidden:R.isHidden}),className:M.button}),N=(o=f==null?void 0:f.nextIconButton)!=null?o:Fb,_=ct({elementType:N,externalSlotProps:b==null?void 0:b.nextIconButton,additionalProps:{size:"medium",title:$.label,"aria-label":$.label,disabled:$.isDisabled,edge:"start",onClick:$.goTo},ownerState:m({},k,{hidden:$.isHidden}),className:M.button}),D=(s=f==null?void 0:f.leftArrowIcon)!=null?s:B4,O=ct({elementType:D,externalSlotProps:b==null?void 0:b.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),j=q(O,G4),I=(a=f==null?void 0:f.rightArrowIcon)!=null?a:z4,L=ct({elementType:I,externalSlotProps:b==null?void 0:b.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:void 0}),F=q(L,Z4);return P.jsxs(q4,m({ref:n,className:ae(M.root,d),ownerState:k},v,{children:[P.jsx(E,m({},A,{children:l?P.jsx(I,m({},F)):P.jsx(D,m({},j))})),u?P.jsx(sn,{variant:"subtitle1",component:"span",children:u}):P.jsx(Q4,{className:M.spacer,ownerState:k}),P.jsx(N,m({},_,{children:l?P.jsx(D,m({},j)):P.jsx(I,m({},F))}))]}))}),zl=36,Of=2,Lf=320,J4=280,Af=334,ik=232,Ki=48,eV=V(lN)({[`& .${ul.container}`]:{outline:0},[`& .${ul.paper}`]:{outline:0,minWidth:Lf}}),tV=V(bN)({"&:first-of-type":{padding:0}});function nV(e){var t,n;const{children:r,onDismiss:o,open:s,slots:a,slotProps:i}=e,l=(t=a==null?void 0:a.dialog)!=null?t:eV,c=(n=a==null?void 0:a.mobileTransition)!=null?n:mi;return P.jsx(l,m({open:s,onClose:o},i==null?void 0:i.dialog,{TransitionComponent:c,TransitionProps:i==null?void 0:i.mobileTransition,PaperComponent:a==null?void 0:a.mobilePaper,PaperProps:i==null?void 0:i.mobilePaper,children:P.jsx(tV,{children:r})}))}function rV(e){return Ce("MuiPickersPopper",e)}be("MuiPickersPopper",["root","paper"]);const oV="@media (prefers-reduced-motion: reduce)",Ba=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),Bb=Ba&&Ba[1]?parseInt(Ba[1],10):null,zb=Ba&&Ba[2]?parseInt(Ba[2],10):null,sV=Bb&&Bb<10||zb&&zb<13||!1,lk=()=>aS(oV,{defaultMatches:!1})||sV,aV=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],iV=e=>{const{classes:t}=e;return xe({root:["root"],paper:["paper"]},rV,t)},lV=V(gc,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),cV=V(Fr,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({ownerState:e})=>m({outline:0,transformOrigin:"top center"},e.placement.includes("top")&&{transformOrigin:"bottom center"}));function uV(e,t){return t.documentElement.clientWidth{if(!e)return;function l(){s.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),s.current=!1}},[e]);const a=Ie(l=>{if(!s.current)return;const c=r.current;r.current=!1;const u=Ft(o.current);if(!o.current||"clientX"in l&&uV(l,u))return;if(n.current){n.current=!1;return}let d;l.composedPath?d=l.composedPath().indexOf(o.current)>-1:d=!u.documentElement.contains(l.target)||o.current.contains(l.target),!d&&!c&&t(l)}),i=()=>{r.current=!0};return y.useEffect(()=>{if(e){const l=Ft(o.current),c=()=>{n.current=!0};return l.addEventListener("touchstart",a),l.addEventListener("touchmove",c),()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchmove",c)}}},[e,a]),y.useEffect(()=>{if(e){const l=Ft(o.current);return l.addEventListener("click",a),()=>{l.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,i,i]}const fV=y.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:s,paperSlotProps:a,paperClasses:i,onPaperClick:l,onPaperTouchStart:c}=e,u=q(e,aV),d=m({},o,{placement:r}),f=ct({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:i,ownerState:d});return P.jsx(n,m({},u,f,{onClick:b=>{var w;l(b),(w=f.onClick)==null||w.call(f,b)},onTouchStart:b=>{var w;c(b),(w=f.onTouchStart)==null||w.call(f,b)},ownerState:d,children:s}))});function pV(e){var t,n,r,o;const s=ve({props:e,name:"MuiPickersPopper"}),{anchorEl:a,children:i,containerRef:l=null,shouldRestoreFocus:c,onBlur:u,onDismiss:d,open:f,role:b,placement:w,slots:p,slotProps:S,reduceAnimations:h}=s;y.useEffect(()=>{function L(F){f&&(F.key==="Escape"||F.key==="Esc")&&d()}return document.addEventListener("keydown",L),()=>{document.removeEventListener("keydown",L)}},[d,f]);const g=y.useRef(null);y.useEffect(()=>{b==="tooltip"||c&&!c()||(f?g.current=ld(document):g.current&&g.current instanceof HTMLElement&&setTimeout(()=>{g.current instanceof HTMLElement&&g.current.focus()}))},[f,b,c]);const[C,x,T]=dV(f,u??d),v=y.useRef(null),k=ut(v,l),M=ut(k,C),$=s,R=iV($),E=lk(),A=h??E,N=L=>{L.key==="Escape"&&(L.stopPropagation(),d())},_=((t=p==null?void 0:p.desktopTransition)!=null?t:A)?mi:oi,D=(n=p==null?void 0:p.desktopTrapFocus)!=null?n:Ew,O=(r=p==null?void 0:p.desktopPaper)!=null?r:cV,j=(o=p==null?void 0:p.popper)!=null?o:lV,I=ct({elementType:j,externalSlotProps:S==null?void 0:S.popper,additionalProps:{transition:!0,role:b,open:f,anchorEl:a,placement:w,onKeyDown:N},className:R.root,ownerState:s});return P.jsx(j,m({},I,{children:({TransitionProps:L,placement:F})=>P.jsx(D,m({open:f,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:b==="tooltip",isEnabled:()=>!0},S==null?void 0:S.desktopTrapFocus,{children:P.jsx(_,m({},L,S==null?void 0:S.desktopTransition,{children:P.jsx(fV,{PaperComponent:O,ownerState:$,popperPlacement:F,ref:M,onPaperClick:x,onPaperTouchStart:T,paperClasses:R.paper,paperSlotProps:S==null?void 0:S.desktopPaper,children:i})}))}))}))}function ck(e){return Ce("MuiPickersToolbar",e)}be("MuiPickersToolbar",["root","content"]);const hV=e=>{const{classes:t,isLandscape:n}=e;return xe({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},ck,t)},mV=V("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>m({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3)},t.isLandscape&&{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"})),gV=V("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})(({ownerState:e})=>{var t;return{display:"flex",flexWrap:"wrap",width:"100%",justifyContent:e.isLandscape?"flex-start":"space-between",flexDirection:e.isLandscape?(t=e.landscapeDirection)!=null?t:"column":"row",flex:1,alignItems:e.isLandscape?"flex-start":"center"}}),vV=y.forwardRef(function(t,n){const r=ve({props:t,name:"MuiPickersToolbar"}),{children:o,className:s,toolbarTitle:a,hidden:i,titleId:l}=r,c=r,u=hV(c);return i?null:P.jsxs(mV,{ref:n,className:ae(u.root,s),ownerState:c,children:[P.jsx(sn,{color:"text.secondary",variant:"overline",id:l,children:a}),P.jsx(gV,{className:u.content,ownerState:c,children:o})]})});function yV(e){return Ce("MuiPickersToolbarText",e)}const Vb=be("MuiPickersToolbarText",["root","selected"]),bV=["className","selected","value"],xV=e=>{const{classes:t,selected:n}=e;return xe({root:["root",n&&"selected"]},yV,t)},CV=V(sn,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Vb.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${Vb.selected}`]:{color:(e.vars||e).palette.text.primary}})),uk=y.forwardRef(function(t,n){const r=ve({props:t,name:"MuiPickersToolbarText"}),{className:o,value:s}=r,a=q(r,bV),i=xV(r);return P.jsx(CV,m({ref:n,className:ae(o,i.root),component:"span"},a,{children:s}))}),wV=["align","className","selected","typographyClassName","value","variant","width"],SV=e=>{const{classes:t}=e;return xe({root:["root"]},ck,t)},kV=V(Ta,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),No=y.forwardRef(function(t,n){const r=ve({props:t,name:"MuiPickersToolbarButton"}),{align:o,className:s,selected:a,typographyClassName:i,value:l,variant:c,width:u}=r,d=q(r,wV),f=SV(r);return P.jsx(kV,m({variant:"text",ref:n,className:ae(s,f.root)},u?{sx:{width:u}}:{},d,{children:P.jsx(uk,{align:o,className:i,variant:c,value:l,selected:a})}))}),TV=({open:e,onOpen:t,onClose:n})=>{const r=y.useRef(typeof e=="boolean").current,[o,s]=y.useState(!1);y.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");s(e)}},[r,e]);const a=y.useCallback(i=>{r||s(i),i&&t&&t(),!i&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:a}},PV=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,s=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?s&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?s?!0:n(r.lastPublishedValue):!1},MV=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:s}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&s?a?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},RV=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},$V=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:s,onChange:a,value:i,defaultValue:l,closeOnSelect:c=r==="desktop",selectedSections:u,onSelectedSectionsChange:d,timezone:f}=e,{current:b}=y.useRef(l),{current:w}=y.useRef(i!==void 0),p=gt(),S=Zs(),[h,g]=yn({controlled:u,default:null,name:"usePickerValue",state:"selectedSections"}),{isOpen:C,setIsOpen:x}=TV(e),[T,v]=y.useState(()=>{let H;return i!==void 0?H=i:b!==void 0?H=b:H=t.emptyValue,{draft:H,lastPublishedValue:H,lastCommittedValue:H,lastControlledValue:i,hasBeenModifiedSinceMount:!1}}),{timezone:k,handleValueChange:M}=Xg({timezone:f,value:i,defaultValue:b,onChange:a,valueManager:t});ek(m({},e,{value:T.draft,timezone:k}),o,t.isSameError,t.defaultErrorState);const $=Ie(H=>{const oe={action:H,dateState:T,hasChanged:pe=>!t.areValuesEqual(p,H.value,pe),isControlled:w,closeOnSelect:c},me=PV(oe),ye=MV(oe),ee=RV(oe);if(v(pe=>m({},pe,{draft:H.value,lastPublishedValue:me?H.value:pe.lastPublishedValue,lastCommittedValue:ye?H.value:pe.lastCommittedValue,hasBeenModifiedSinceMount:!0})),me){const X={validationError:H.name==="setValueFromField"?H.context.validationError:o({adapter:S,value:H.value,props:m({},e,{value:H.value,timezone:k})})};H.name==="setValueFromShortcut"&&H.shortcut!=null&&(X.shortcut=H.shortcut),M(H.value,X)}ye&&s&&s(H.value),ee&&x(!1)});if(i!==void 0&&(T.lastControlledValue===void 0||!t.areValuesEqual(p,T.lastControlledValue,i))){const H=t.areValuesEqual(p,T.draft,i);v(oe=>m({},oe,{lastControlledValue:i},H?{}:{lastCommittedValue:i,lastPublishedValue:i,draft:i,hasBeenModifiedSinceMount:!0}))}const R=Ie(()=>{$({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),E=Ie(()=>{$({value:T.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),A=Ie(()=>{$({value:T.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),N=Ie(()=>{$({value:T.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),_=Ie(()=>{$({value:t.getTodayValue(p,k,n),name:"setValueFromAction",pickerAction:"today"})}),D=Ie(()=>x(!0)),O=Ie(()=>x(!1)),j=Ie((H,oe="partial")=>$({name:"setValueFromView",value:H,selectionState:oe})),I=Ie((H,oe,me)=>$({name:"setValueFromShortcut",value:H,changeImportance:oe??"accept",shortcut:me})),L=Ie((H,oe)=>$({name:"setValueFromField",value:H,context:oe})),F=Ie(H=>{g(H),d==null||d(H)}),J={onClear:R,onAccept:E,onDismiss:A,onCancel:N,onSetToday:_,onOpen:D,onClose:O},ie={value:T.draft,onChange:L,selectedSections:h,onSelectedSectionsChange:F},ue=y.useMemo(()=>t.cleanValue(p,T.draft),[p,t,T.draft]),U={value:ue,onChange:j,onClose:O,open:C,onSelectedSectionsChange:F},K=m({},J,{value:ue,onChange:j,onSelectShortcut:I,isValid:H=>{const oe=o({adapter:S,value:H,props:m({},e,{value:H,timezone:k})});return!t.hasError(oe)}});return{open:C,fieldProps:ie,viewProps:U,layoutProps:K,actions:J}};function xc({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:s,focusedView:a,onFocusedViewChange:i}){var l,c;const u=y.useRef(n),d=y.useRef(o),f=y.useRef(o.includes(n)?n:o[0]),[b,w]=yn({name:"useViews",state:"view",controlled:r,default:f.current}),p=y.useRef(s?b:null),[S,h]=yn({name:"useViews",state:"focusedView",controlled:a,default:p.current});y.useEffect(()=>{(u.current&&u.current!==n||d.current&&d.current.some(R=>!o.includes(R)))&&(w(o.includes(n)?n:o[0]),d.current=o,u.current=n)},[n,w,b,o]);const g=o.indexOf(b),C=(l=o[g-1])!=null?l:null,x=(c=o[g+1])!=null?c:null,T=Ie((R,E)=>{h(E?R:A=>R===A?null:A),i==null||i(R,E)}),v=Ie(R=>{R!==b&&(w(R),T(R,!0),t&&t(R))}),k=Ie(()=>{x&&v(x),T(x,!0)}),M=Ie((R,E,A)=>{const N=E==="finish",_=A?o.indexOf(A){e(R,E?"partial":"finish",A),E&&(v(E),T(E,!0))});return{view:b,setView:v,focusedView:S,setFocusedView:T,nextView:x,previousView:C,defaultView:f.current,goToNextView:k,setValueAndGoToNextView:M,setValueAndGoToView:$}}const DV=["className","sx"],EV=({props:e,propsFromPickerValue:t,additionalViewProps:n,inputRef:r,autoFocusView:o})=>{const{onChange:s,open:a,onSelectedSectionsChange:i,onClose:l}=t,{views:c,openTo:u,onViewChange:d,disableOpenPicker:f,viewRenderers:b,timezone:w}=e,p=q(e,DV),{view:S,setView:h,defaultView:g,focusedView:C,setFocusedView:x,setValueAndGoToNextView:T}=xc({view:void 0,views:c,openTo:u,onChange:s,onViewChange:d,autoFocus:o}),{hasUIView:v,viewModeLookup:k}=y.useMemo(()=>c.reduce((_,D)=>{let O;return f?O="field":b[D]!=null?O="UI":O="field",_.viewModeLookup[D]=O,O==="UI"&&(_.hasUIView=!0),_},{hasUIView:!1,viewModeLookup:{}}),[f,b,c]),M=y.useMemo(()=>c.reduce((_,D)=>b[D]!=null&&si(D)?_+1:_,0),[b,c]),$=k[S],R=Ie(()=>$==="UI"),[E,A]=y.useState($==="UI"?S:null);return E!==S&&k[S]==="UI"&&A(S),Zt(()=>{$==="field"&&a&&(l(),setTimeout(()=>{r==null||r.current.focus(),i(S)}))},[S]),Zt(()=>{if(!a)return;let _=S;$==="field"&&E!=null&&(_=E),_!==g&&k[_]==="UI"&&k[g]==="UI"&&(_=g),_!==S&&h(_),x(_,!0)},[a]),{hasUIView:v,shouldRestoreFocus:R,layoutProps:{views:c,view:E,onViewChange:h},renderCurrentView:()=>{if(E==null)return null;const _=b[E];return _==null?null:_(m({},p,n,t,{views:c,timezone:w,onChange:T,view:E,onViewChange:h,focusedView:C,onFocusedViewChange:x,showViewSwitcher:M>1,timeViewsCount:M}))}}};function Ub(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const _V=(e,t)=>{const[n,r]=y.useState(Ub);return Zt(()=>{const s=()=>{r(Ub())};return window.addEventListener("orientationchange",s),()=>{window.removeEventListener("orientationchange",s)}},[]),R4(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},IV=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,s=_V(n.views,o);return{layoutProps:m({},n,t,{isLandscape:s,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}},dk=(e,t="warning")=>{let n=!1;const r=Array.isArray(e)?e.join(` `):e;return()=>{n||(n=!0,t==="error"?console.error(r):console.warn(r))}};dk(["The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.","You can replace it with the `textField` component slot in most cases.","For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5)."]);const fk=({props:e,valueManager:t,valueType:n,wrapperVariant:r,inputRef:o,additionalViewProps:s,validator:a,autoFocusView:i})=>{const l=$V({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:a}),c=EV({props:e,inputRef:o,additionalViewProps:s,autoFocusView:i,propsFromPickerValue:l.viewProps}),u=IV({props:e,wrapperVariant:r,propsFromPickerValue:l.layoutProps,propsFromPickerViews:c.layoutProps});return{open:l.open,actions:l.actions,fieldProps:l.fieldProps,renderCurrentView:c.renderCurrentView,hasUIView:c.hasUIView,shouldRestoreFocus:c.shouldRestoreFocus,layoutProps:u.layoutProps}};function pk(e){return Ce("MuiPickersLayout",e)}const Rp=be("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","shortcuts"]),OV=["onAccept","onClear","onCancel","onSetToday","actions"];function LV(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:s}=e,a=q(e,OV),i=rr();if(s==null||s.length===0)return null;const l=s==null?void 0:s.map(c=>{switch(c){case"clear":return P.jsx(Ta,{onClick:n,children:i.clearButtonLabel},c);case"cancel":return P.jsx(Ta,{onClick:r,children:i.cancelButtonLabel},c);case"accept":return P.jsx(Ta,{onClick:t,children:i.okButtonLabel},c);case"today":return P.jsx(Ta,{onClick:o,children:i.todayButtonLabel},c);default:return null}});return P.jsx(pN,m({},a,{children:l}))}const AV=["items","changeImportance","isLandscape","onChange","isValid"],NV=["getValue"];function jV(e){const{items:t,changeImportance:n,onChange:r,isValid:o}=e,s=q(e,AV);if(t==null||t.length===0)return null;const a=t.map(i=>{let{getValue:l}=i,c=q(i,NV);const u=l({isValid:o});return{label:c.label,onClick:()=>{r(u,n,c)},disabled:!o(u)}});return P.jsx(hS,m({dense:!0,sx:[{maxHeight:Af,maxWidth:200,overflow:"auto"},...Array.isArray(s.sx)?s.sx:[s.sx]]},s,{children:a.map(i=>P.jsx(wF,{children:P.jsx(Bg,m({},i))},i.label))}))}const ev=e=>{if(e!==void 0)return Object.keys(e).reduce((t,n)=>m({},t,{[`${n.slice(0,1).toLowerCase()}${n.slice(1)}`]:e[n]}),{})};function FV(e){return e.view!==null}const BV=e=>{const{classes:t,isLandscape:n}=e;return xe({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},pk,t)},zV=e=>{var t,n;const{wrapperVariant:r,onAccept:o,onClear:s,onCancel:a,onSetToday:i,view:l,views:c,onViewChange:u,value:d,onChange:f,onSelectShortcut:b,isValid:w,isLandscape:p,disabled:S,readOnly:h,children:g,components:C,componentsProps:x,slots:T,slotProps:v}=e,k=T??ev(C),M=v??x,$=BV(e),R=(t=k==null?void 0:k.actionBar)!=null?t:LV,E=ct({elementType:R,externalSlotProps:M==null?void 0:M.actionBar,additionalProps:{onAccept:o,onClear:s,onCancel:a,onSetToday:i,actions:r==="desktop"?[]:["cancel","accept"],className:$.actionBar},ownerState:m({},e,{wrapperVariant:r})}),A=P.jsx(R,m({},E)),N=k==null?void 0:k.toolbar,_=ct({elementType:N,externalSlotProps:M==null?void 0:M.toolbar,additionalProps:{isLandscape:p,onChange:f,value:d,view:l,onViewChange:u,views:c,disabled:S,readOnly:h,className:$.toolbar},ownerState:m({},e,{wrapperVariant:r})}),D=FV(_)&&N?P.jsx(N,m({},_)):null,O=g,j=k==null?void 0:k.tabs,I=l&&j?P.jsx(j,m({view:l,onViewChange:u},M==null?void 0:M.tabs)):null,L=(n=k==null?void 0:k.shortcuts)!=null?n:jV,F=ct({elementType:L,externalSlotProps:M==null?void 0:M.shortcuts,additionalProps:{isValid:w,isLandscape:p,onChange:b,className:$.shortcuts},ownerState:{isValid:w,isLandscape:p,onChange:b,className:$.shortcuts,wrapperVariant:r}}),J=l&&L?P.jsx(L,m({},F)):null;return{toolbar:D,content:O,tabs:I,actionBar:A,shortcuts:J}},VV=e=>{const{isLandscape:t,classes:n}=e;return xe({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},pk,n)},hk=V("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Rp.toolbar}`]:t.isLandscape?{gridColumn:e.direction==="rtl"?3:1,gridRow:"2 / 3"}:{gridColumn:"2 / 4",gridRow:1},[`.${Rp.shortcuts}`]:t.isLandscape?{gridColumn:"2 / 4",gridRow:1}:{gridColumn:e.direction==="rtl"?3:1,gridRow:"2 / 3"},[`& .${Rp.actionBar}`]:{gridColumn:"1 / 4",gridRow:3}}));hk.propTypes={as:z.elementType,ownerState:z.shape({isLandscape:z.bool.isRequired}).isRequired,sx:z.oneOfType([z.arrayOf(z.oneOfType([z.func,z.object,z.bool])),z.func,z.object])};const UV=V("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),mk=function(t){const n=ve({props:t,name:"MuiPickersLayout"}),{toolbar:r,content:o,tabs:s,actionBar:a,shortcuts:i}=zV(n),{sx:l,className:c,isLandscape:u,ref:d,wrapperVariant:f}=n,b=n,w=VV(b);return P.jsxs(hk,{ref:d,sx:l,className:ae(c,w.root),ownerState:b,children:[u?i:r,u?r:i,P.jsx(UV,{className:w.contentWrapper,children:f==="desktop"?P.jsxs(y.Fragment,{children:[o,s]}):P.jsxs(y.Fragment,{children:[s,o]})}),a]})};function WV(e,{disableFuture:t,maxDate:n,timezone:r}){const o=gt();return y.useMemo(()=>{const s=o.dateWithTimezone(void 0,r),a=o.startOfMonth(t&&o.isBefore(s,n)?s:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function HV(e,{disablePast:t,minDate:n,timezone:r}){const o=gt();return y.useMemo(()=>{const s=o.dateWithTimezone(void 0,r),a=o.startOfMonth(t&&o.isAfter(s,n)?s:n);return!o.isBefore(a,e)},[t,n,e,o,r])}function tv(e,t,n,r){const o=gt(),s=a4(e,o),a=y.useCallback(i=>{const l=e==null?null:i4(e,i,!!t,o);n(l,r??"partial")},[t,e,n,r,o]);return{meridiemMode:s,handleMeridiemChange:a}}function YV(e){return Ce("MuiPickersDay",e)}const gs=be("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),KV=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],GV=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:s,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:i,classes:l}=e,c=a&&!i;return xe({root:["root",t&&!c&&"selected",s&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&i&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},YV,l)},gk=({theme:e,ownerState:t})=>m({},e.typography.caption,{width:zl,height:zl,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:We(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:We(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${gs.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${gs.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${gs.disabled}:not(.${gs.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${gs.disabled}&.${gs.selected}`]:{opacity:.6}},!t.disableMargin&&{margin:`0 ${Of}px`},t.outsideCurrentMonth&&t.showDaysOutsideCurrentMonth&&{color:(e.vars||e).palette.text.secondary},!t.disableHighlightToday&&t.today&&{[`&:not(.${gs.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}),vk=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},ZV=V(Qn,{name:"MuiPickersDay",slot:"Root",overridesResolver:vk})(gk),qV=V("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:vk})(({theme:e,ownerState:t})=>m({},gk({theme:e,ownerState:t}),{opacity:0,pointerEvents:"none"})),Ni=()=>{},QV=y.forwardRef(function(t,n){const r=ve({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:s,day:a,disabled:i=!1,disableHighlightToday:l=!1,disableMargin:c=!1,isAnimating:u,onClick:d,onDaySelect:f,onFocus:b=Ni,onBlur:w=Ni,onKeyDown:p=Ni,onMouseDown:S=Ni,onMouseEnter:h=Ni,outsideCurrentMonth:g,selected:C=!1,showDaysOutsideCurrentMonth:x=!1,children:T,today:v=!1}=r,k=q(r,KV),M=m({},r,{autoFocus:o,disabled:i,disableHighlightToday:l,disableMargin:c,selected:C,showDaysOutsideCurrentMonth:x,today:v}),$=GV(M),R=gt(),E=y.useRef(null),A=ut(E,n);Zt(()=>{o&&!i&&!u&&!g&&E.current.focus()},[o,i,u,g]);const N=D=>{S(D),g&&D.preventDefault()},_=D=>{i||f(a),g&&D.currentTarget.focus(),d&&d(D)};return g&&!x?P.jsx(qV,{className:ae($.root,$.hiddenDaySpacingFiller,s),ownerState:M,role:k.role}):P.jsx(ZV,m({className:ae($.root,s),ref:A,centerRipple:!0,disabled:i,tabIndex:C?0:-1,onKeyDown:D=>p(D,a),onFocus:D=>b(D,a),onBlur:D=>w(D,a),onMouseEnter:D=>h(D,a),onClick:_,onMouseDown:N},k,{ownerState:M,children:T||R.format(a,"dayOfMonth")}))}),XV=y.memo(QV),JV=e=>Ce("MuiPickersSlideTransition",e),sr=be("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),e3=["children","className","reduceAnimations","slideDirection","transKey","classes"],t3=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return xe(r,JV,t)},n3=V(pc,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${sr["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${sr["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${sr.slideEnterActive}`]:t.slideEnterActive},{[`.${sr.slideExit}`]:t.slideExit},{[`.${sr["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${sr["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${sr["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${sr["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${sr.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${sr.slideExit}`]:{transform:"translate(0%)"},[`& .${sr["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${sr["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function r3(e){const t=ve({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:s}=t,a=q(t,e3),i=t3(t),l=Xt();if(o)return P.jsx("div",{className:ae(i.root,r),children:n});const c={exit:i.exit,enterActive:i.enterActive,enter:i.enter,exitActive:i.exitActive};return P.jsx(n3,{className:ae(i.root,r),childFactory:u=>y.cloneElement(u,{classNames:c}),role:"presentation",children:P.jsx(Eg,m({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:c},a,{children:n}),s)})}const yk=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:s,disablePast:a,timezone:i})=>{const l=Zs();return y.useCallback(c=>tk({adapter:l,value:c,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:s,disablePast:a,timezone:i}})!==null,[l,e,t,n,r,o,s,a,i])},o3=e=>Ce("MuiDayCalendar",e);be("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const s3=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],a3=["ownerState"],i3=e=>{const{classes:t}=e;return xe({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},o3,t)},bk=(zl+Of*2)*6,l3=V("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),c3=V("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),u3=V(sn,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),d3=V(sn,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),f3=V(sn,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>m({},e.typography.caption,{width:zl,height:zl,padding:0,margin:`0 ${Of}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),p3=V("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:bk}),h3=V(r3,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:bk}),m3=V("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),g3=V("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${Of}px 0`,display:"flex",justifyContent:"center"});function v3(e){var t,n,r;let{parentProps:o,day:s,focusableDay:a,selectedDays:i,isDateDisabled:l,currentMonthNumber:c,isViewFocused:u}=e,d=q(e,s3);const{disabled:f,disableHighlightToday:b,isMonthSwitchingAnimating:w,showDaysOutsideCurrentMonth:p,components:S,componentsProps:h,slots:g,slotProps:C,timezone:x}=o,T=gt(),v=hs(x),k=a!==null&&T.isSameDay(s,a),M=i.some(j=>T.isSameDay(j,s)),$=T.isSameDay(s,v),R=(t=(n=g==null?void 0:g.day)!=null?n:S==null?void 0:S.Day)!=null?t:XV,E=ct({elementType:R,externalSlotProps:(r=C==null?void 0:C.day)!=null?r:h==null?void 0:h.day,additionalProps:m({disableHighlightToday:b,showDaysOutsideCurrentMonth:p,role:"gridcell",isAnimating:w,"data-timestamp":T.toJsDate(s).valueOf()},d),ownerState:m({},o,{day:s,selected:M})}),A=q(E,a3),N=y.useMemo(()=>f||l(s),[f,l,s]),_=y.useMemo(()=>T.getMonth(s)!==c,[T,s,c]),D=y.useMemo(()=>{const j=T.startOfMonth(T.setMonth(s,c));return p?T.isSameDay(s,T.startOfWeek(j)):T.isSameDay(s,j)},[c,s,p,T]),O=y.useMemo(()=>{const j=T.endOfMonth(T.setMonth(s,c));return p?T.isSameDay(s,T.endOfWeek(j)):T.isSameDay(s,j)},[c,s,p,T]);return P.jsx(R,m({},A,{day:s,disabled:N,autoFocus:u&&k,today:$,outsideCurrentMonth:_,isFirstVisibleCell:D,isLastVisibleCell:O,selected:M,tabIndex:k?0:-1,"aria-selected":M,"aria-current":$?"date":void 0}))}function y3(e){const t=ve({props:e,name:"MuiDayCalendar"}),{onFocusedDayChange:n,className:r,currentMonth:o,selectedDays:s,focusedDay:a,loading:i,onSelectedDaysChange:l,onMonthSwitchingAnimationEnd:c,readOnly:u,reduceAnimations:d,renderLoading:f=()=>P.jsx("span",{children:"..."}),slideDirection:b,TransitionProps:w,disablePast:p,disableFuture:S,minDate:h,maxDate:g,shouldDisableDate:C,shouldDisableMonth:x,shouldDisableYear:T,dayOfWeekFormatter:v,hasFocus:k,onFocusedViewChange:M,gridLabelId:$,displayWeekNumber:R,fixedWeekNumber:E,autoFocus:A,timezone:N}=t,_=hs(N),D=gt(),O=i3(t),I=Xt().direction==="rtl",L=v||((ge,$e)=>D.format($e,"weekdayShort").charAt(0).toUpperCase()),F=yk({shouldDisableDate:C,shouldDisableMonth:x,shouldDisableYear:T,minDate:h,maxDate:g,disablePast:p,disableFuture:S,timezone:N}),J=rr(),[ie,ue]=yn({name:"DayCalendar",state:"hasFocus",controlled:k,default:A??!1}),[U,Q]=y.useState(()=>a||_),K=Ie(ge=>{u||l(ge)}),H=ge=>{F(ge)||(n(ge),Q(ge),M==null||M(!0),ue(!0))},oe=Ie((ge,$e)=>{switch(ge.key){case"ArrowUp":H(D.addDays($e,-7)),ge.preventDefault();break;case"ArrowDown":H(D.addDays($e,7)),ge.preventDefault();break;case"ArrowLeft":{const G=D.addDays($e,I?1:-1),Z=D.addMonths($e,I?1:-1),te=fl({utils:D,date:G,minDate:I?G:D.startOfMonth(Z),maxDate:I?D.endOfMonth(Z):G,isDateDisabled:F,timezone:N});H(te||G),ge.preventDefault();break}case"ArrowRight":{const G=D.addDays($e,I?-1:1),Z=D.addMonths($e,I?-1:1),te=fl({utils:D,date:G,minDate:I?D.startOfMonth(Z):G,maxDate:I?G:D.endOfMonth(Z),isDateDisabled:F,timezone:N});H(te||G),ge.preventDefault();break}case"Home":H(D.startOfWeek($e)),ge.preventDefault();break;case"End":H(D.endOfWeek($e)),ge.preventDefault();break;case"PageUp":H(D.addMonths($e,1)),ge.preventDefault();break;case"PageDown":H(D.addMonths($e,-1)),ge.preventDefault();break}}),me=Ie((ge,$e)=>H($e)),ye=Ie((ge,$e)=>{ie&&D.isSameDay(U,$e)&&(M==null||M(!1))}),ee=D.getMonth(o),pe=y.useMemo(()=>s.filter(ge=>!!ge).map(ge=>D.startOfDay(ge)),[D,s]),X=ee,he=y.useMemo(()=>y.createRef(),[X]),se=D.startOfWeek(_),Oe=y.useMemo(()=>{const ge=D.startOfMonth(o),$e=D.endOfMonth(o);return F(U)||D.isAfterDay(U,$e)||D.isBeforeDay(U,ge)?fl({utils:D,date:U,minDate:ge,maxDate:$e,disablePast:p,disableFuture:S,isDateDisabled:F,timezone:N}):U},[o,S,p,U,F,D,N]),Re=y.useMemo(()=>{const ge=D.setTimezone(o,N),$e=D.getWeekArray(ge);let G=D.addMonths(ge,1);for(;E&&$e.length{$e.length{var G;const Z=D.format(ge,"weekdayShort").slice(0,2);return P.jsx(u3,{variant:"caption",role:"columnheader","aria-label":D.format(D.addDays(se,$e),"weekday"),className:O.weekDayLabel,children:(G=L==null?void 0:L(Z,ge))!=null?G:Z},Z+$e.toString())})]}),i?P.jsx(p3,{className:O.loadingContainer,children:f()}):P.jsx(h3,m({transKey:X,onExited:c,reduceAnimations:d,slideDirection:b,className:ae(r,O.slideTransition)},w,{nodeRef:he,children:P.jsx(m3,{ref:he,role:"rowgroup",className:O.monthContainer,children:Re.map((ge,$e)=>P.jsxs(g3,{role:"row",className:O.weekContainer,"aria-rowindex":$e+1,children:[R&&P.jsx(f3,{className:O.weekNumber,role:"rowheader","aria-label":J.calendarWeekNumberAriaLabelText(D.getWeekNumber(ge[0])),children:J.calendarWeekNumberText(D.getWeekNumber(ge[0]))}),ge.map((G,Z)=>P.jsx(v3,{parentProps:t,day:G,selectedDays:pe,focusableDay:Oe,onKeyDown:oe,onFocus:me,onBlur:ye,onDaySelect:K,isDateDisabled:F,currentMonthNumber:ee,isViewFocused:ie,"aria-colindex":Z+1},G.toString()))]},`week-${ge[0]}`))})}))]})}const b3=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return m({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"finishMonthSwitchingAnimation":return m({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const s=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return m({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:s&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:s?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},x3=e=>{const{value:t,referenceDate:n,defaultCalendarMonth:r,disableFuture:o,disablePast:s,disableSwitchToMonthOnDayFocus:a=!1,maxDate:i,minDate:l,onMonthChange:c,reduceAnimations:u,shouldDisableDate:d,timezone:f}=e,b=hs(f),w=gt(),p=y.useRef(b3(!!u,a,w)).current,S=y.useMemo(()=>{let M=null;return n?M=n:r&&(M=w.startOfMonth(r)),Jn.getInitialReferenceValue({value:t,utils:w,timezone:f,props:e,referenceDate:M,granularity:Mr.day})},[]),[h,g]=y.useReducer(p,{isMonthSwitchingAnimating:!1,focusedDay:t||b,currentMonth:w.startOfMonth(S),slideDirection:"left"}),C=y.useCallback(M=>{g(m({type:"changeMonth"},M)),c&&c(M.newMonth)},[c]),x=y.useCallback(M=>{const $=M;w.isSameMonth($,h.currentMonth)||C({newMonth:w.startOfMonth($),direction:w.isAfterDay($,h.currentMonth)?"left":"right"})},[h.currentMonth,C,w]),T=yk({shouldDisableDate:d,minDate:l,maxDate:i,disableFuture:o,disablePast:s,timezone:f}),v=y.useCallback(()=>{g({type:"finishMonthSwitchingAnimation"})},[]),k=Ie((M,$)=>{T(M)||g({type:"changeFocusedDay",focusedDay:M,withoutMonthSwitchingAnimation:$})});return{referenceDate:S,calendarState:h,changeMonth:x,changeFocusedDay:k,isDateDisabled:T,onMonthSwitchingAnimationEnd:v,handleChangeMonth:C}},C3=["ownerState"],w3=({clearable:e,fieldProps:t,InputProps:n,onClear:r,slots:o,slotProps:s,components:a,componentsProps:i})=>{var l,c,u,d,f,b;const w=rr(),p=(l=(c=o==null?void 0:o.clearButton)!=null?c:a==null?void 0:a.ClearButton)!=null?l:Dn,S=ct({elementType:p,externalSlotProps:(u=s==null?void 0:s.clearButton)!=null?u:i==null?void 0:i.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:w.fieldClearLabel}}),h=q(S,C3),g=(d=(f=o==null?void 0:o.clearIcon)!=null?f:a==null?void 0:a.ClearIcon)!=null?d:H4,C=ct({elementType:g,externalSlotProps:(b=s==null?void 0:s.clearIcon)!=null?b:i==null?void 0:i.clearIcon,ownerState:{}}),x=m({},n,{endAdornment:e?P.jsxs(y.Fragment,{children:[P.jsx(Ug,{position:"end",sx:{marginRight:n!=null&&n.endAdornment?-1:-1.5},children:P.jsx(p,m({},h,{onClick:r,children:P.jsx(g,m({fontSize:"small"},C))}))}),n==null?void 0:n.endAdornment]}):n==null?void 0:n.endAdornment}),T=m({},t,{sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(t.sx)?t.sx:[t.sx]]});return{InputProps:x,fieldProps:T}},S3=["components","componentsProps","slots","slotProps","InputProps","inputProps"],k3=["inputRef"],T3=["ref","onPaste","onKeyDown","inputMode","readOnly","clearable","onClear"],xk=y.forwardRef(function(t,n){var r,o,s;const a=ve({props:t,name:"MuiDateTimeField"}),{components:i,componentsProps:l,slots:c,slotProps:u,InputProps:d,inputProps:f}=a,b=q(a,S3),w=a,p=(r=(o=c==null?void 0:c.textField)!=null?o:i==null?void 0:i.TextField)!=null?r:FS,S=ct({elementType:p,externalSlotProps:(s=u==null?void 0:u.textField)!=null?s:l==null?void 0:l.textField,externalForwardedProps:b,ownerState:w}),{inputRef:h}=S,g=q(S,k3);g.inputProps=m({},f,g.inputProps),g.InputProps=m({},d,g.InputProps);const C=j4({props:g,inputRef:h}),{ref:x,onPaste:T,onKeyDown:v,inputMode:k,readOnly:M,clearable:$,onClear:R}=C,E=q(C,T3),{InputProps:A,fieldProps:N}=w3({onClear:R,clearable:$,fieldProps:E,InputProps:E.InputProps,slots:c,slotProps:u,components:i,componentsProps:l});return P.jsx(p,m({ref:n},N,{InputProps:m({},A,{readOnly:M}),inputProps:m({},E.inputProps,{inputMode:k,onPaste:T,onKeyDown:v,ref:x})}))});function P3(e){return Ce("MuiDateTimePickerTabs",e)}be("MuiDateTimePickerTabs",["root"]);const M3=e=>Fa(e)?"date":"time",R3=e=>e==="date"?"day":"hours",$3=e=>{const{classes:t}=e;return xe({root:["root"]},P3,t)},D3=V(j5,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${xu.indicator}`]:{bottom:"auto",top:0}}})),E3=function(t){const n=ve({props:t,name:"MuiDateTimePickerTabs"}),{dateIcon:r=P.jsx(U4,{}),onViewChange:o,timeIcon:s=P.jsx(W4,{}),view:a,hidden:i=typeof window>"u"||window.innerHeight<667}=n,l=rr(),c=$3(n),u=(d,f)=>{o(R3(f))};return i?null:P.jsxs(D3,{ownerState:n,variant:"fullWidth",value:M3(a),onChange:u,className:c.root,children:[P.jsx(db,{value:"date","aria-label":l.dateTableLabel,icon:P.jsx(y.Fragment,{children:r})}),P.jsx(db,{value:"time","aria-label":l.timeTableLabel,icon:P.jsx(y.Fragment,{children:s})})]})};function _3(e){return Ce("MuiDateTimePickerToolbar",e)}const $p=be("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),I3=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant"],O3=e=>{const{classes:t,theme:n,isLandscape:r}=e,o={root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",n.direction==="rtl"&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",n.direction==="rtl"&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",r&&"ampmLandscape"],ampmLabel:["ampmLabel"]};return xe(o,_3,t)},Ck=V(vV,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>({paddingLeft:t.toolbarVariant==="desktop"&&!t.isLandscape?24:16,paddingRight:t.toolbarVariant==="desktop"&&!t.isLandscape?0:16,borderBottom:t.toolbarVariant==="desktop"?`1px solid ${(e.vars||e).palette.divider}`:void 0,borderRight:t.toolbarVariant==="desktop"&&t.isLandscape?`1px solid ${(e.vars||e).palette.divider}`:void 0,justifyContent:"space-around",position:"relative"}));Ck.propTypes={as:z.elementType,classes:z.object,className:z.string,isLandscape:z.bool.isRequired,isMobileKeyboardViewOpen:z.bool,landscapeDirection:z.oneOf(["column","row"]),ownerState:z.object.isRequired,sx:z.oneOfType([z.arrayOf(z.oneOfType([z.func,z.object,z.bool])),z.func,z.object]),toggleMobileKeyboardView:z.func,toolbarTitle:z.node,viewType:z.oneOf(["date","time"])};const L3=V("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),wk=V("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})(({theme:e,ownerState:t})=>{const n=t.isLandscape&&t.toolbarVariant!=="desktop"?"column":"row";return m({display:"flex",flexDirection:n},t.toolbarVariant==="desktop"&&m({},!t.isLandscape&&{gap:9,marginRight:4,alignSelf:"flex-end"}),e.direction==="rtl"&&{flexDirection:`${n}-reverse`})}),A3=V("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})(({theme:e,ownerState:t})=>m({display:"flex"},t.toolbarVariant==="desktop"&&{gap:1.5},e.direction==="rtl"&&{flexDirection:"row-reverse"}));wk.propTypes={as:z.elementType,ownerState:z.object.isRequired,sx:z.oneOfType([z.arrayOf(z.oneOfType([z.func,z.object,z.bool])),z.func,z.object])};const Wb=V(uk,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})(({ownerState:e})=>({margin:e.toolbarVariant==="desktop"?0:"0 4px 0 2px",cursor:"default"})),N3=V("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${$p.ampmLabel}`]:t.ampmLabel},{[`&.${$p.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})(({ownerState:e})=>m({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12},e.isLandscape&&{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"},{[`& .${$p.ampmLabel}`]:{fontSize:17}}));function j3(e){const t=ve({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,onChange:s,view:a,isLandscape:i,onViewChange:l,toolbarFormat:c,toolbarPlaceholder:u="––",views:d,disabled:f,readOnly:b,toolbarVariant:w="mobile"}=t,p=q(t,I3),S=t,h=gt(),{meridiemMode:g,handleMeridiemChange:C}=tv(o,n,s),x=!!(n&&!r),T=w==="desktop",v=rr(),k=Xt(),M=O3(m({},S,{theme:k})),$=E=>n?h.format(E,"hours12h"):h.format(E,"hours24h"),R=y.useMemo(()=>o?c?h.formatByString(o,c):h.format(o,"shortDate"):u,[o,c,u,h]);return P.jsxs(Ck,m({toolbarTitle:v.dateTimePickerToolbarTitle,isLandscape:i,className:M.root},p,{ownerState:S,children:[P.jsxs(L3,{className:M.dateContainer,ownerState:S,children:[d.includes("year")&&P.jsx(No,{tabIndex:-1,variant:"subtitle1",onClick:()=>l("year"),selected:a==="year",value:o?h.format(o,"year"):"–"}),d.includes("day")&&P.jsx(No,{tabIndex:-1,variant:T?"h5":"h4",onClick:()=>l("day"),selected:a==="day",value:R})]}),P.jsxs(wk,{className:M.timeContainer,ownerState:S,children:[P.jsxs(A3,{className:M.timeDigitsContainer,ownerState:S,children:[d.includes("hours")&&P.jsx(No,{variant:T?"h5":"h3",width:T&&!i?Ki:void 0,onClick:()=>l("hours"),selected:a==="hours",value:o?$(o):"--"}),d.includes("minutes")&&P.jsxs(y.Fragment,{children:[P.jsx(Wb,{variant:T?"h5":"h3",value:":",className:M.separator,ownerState:S}),P.jsx(No,{variant:T?"h5":"h3",width:T&&!i?Ki:void 0,onClick:()=>l("minutes"),selected:a==="minutes",value:o?h.format(o,"minutes"):"--"})]}),d.includes("seconds")&&P.jsxs(y.Fragment,{children:[P.jsx(Wb,{variant:T?"h5":"h3",value:":",className:M.separator,ownerState:S}),P.jsx(No,{variant:T?"h5":"h3",width:T&&!i?Ki:void 0,onClick:()=>l("seconds"),selected:a==="seconds",value:o?h.format(o,"seconds"):"--"})]})]}),x&&!T&&P.jsxs(N3,{className:M.ampmSelection,ownerState:S,children:[P.jsx(No,{variant:"subtitle2",selected:g==="am",typographyClassName:M.ampmLabel,value:go(h,"am"),onClick:b?void 0:()=>C("am"),disabled:f}),P.jsx(No,{variant:"subtitle2",selected:g==="pm",typographyClassName:M.ampmLabel,value:go(h,"pm"),onClick:b?void 0:()=>C("pm"),disabled:f})]}),n&&T&&P.jsx(No,{variant:"h5",onClick:()=>l("meridiem"),selected:a==="meridiem",value:o&&g?go(h,g):"--",width:Ki})]})]}))}function Sk(e,t){var n,r,o,s,a,i,l,c,u,d,f;const b=gt(),w=bc(),p=ve({props:e,name:t}),S=(n=p.ampm)!=null?n:b.is12HourCycleInCurrentLocale(),h=y.useMemo(()=>{var x;return((x=p.localeText)==null?void 0:x.toolbarTitle)==null?p.localeText:m({},p.localeText,{dateTimePickerToolbarTitle:p.localeText.toolbarTitle})},[p.localeText]),g=(r=p.slots)!=null?r:ev(p.components),C=(o=p.slotProps)!=null?o:p.componentsProps;return m({},p,t4({views:p.views,openTo:p.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:S,localeText:h,orientation:(s=p.orientation)!=null?s:"portrait",disableIgnoringDatePartForTimeValidation:(a=p.disableIgnoringDatePartForTimeValidation)!=null?a:!!(p.minDateTime||p.maxDateTime||p.disablePast||p.disableFuture),disableFuture:(i=p.disableFuture)!=null?i:!1,disablePast:(l=p.disablePast)!=null?l:!1,minDate:br(b,(c=p.minDateTime)!=null?c:p.minDate,w.minDate),maxDate:br(b,(u=p.maxDateTime)!=null?u:p.maxDate,w.maxDate),minTime:(d=p.minDateTime)!=null?d:p.minTime,maxTime:(f=p.maxDateTime)!=null?f:p.maxTime,slots:m({toolbar:j3,tabs:E3},g),slotProps:m({},C,{toolbar:m({ampm:S},C==null?void 0:C.toolbar)})})}const F3=e=>Ce("MuiPickersFadeTransitionGroup",e);be("MuiPickersFadeTransitionGroup",["root"]);const B3=e=>{const{classes:t}=e;return xe({root:["root"]},F3,t)},z3=V(pc,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function kk(e){const t=ve({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:s}=t,a=B3(t),i=Xt();return o?n:P.jsx(z3,{className:ae(a.root,r),children:P.jsx(mi,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:i.transitions.duration.enteringScreen,enter:i.transitions.duration.enteringScreen,exit:0},children:n},s)})}function V3(e){return Ce("MuiPickersMonth",e)}const qc=be("MuiPickersMonth",["root","monthButton","disabled","selected"]),U3=["autoFocus","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow"],W3=e=>{const{disabled:t,selected:n,classes:r}=e;return xe({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},V3,r)},H3=V("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})(({ownerState:e})=>({flexBasis:e.monthsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),Y3=V("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${qc.disabled}`]:t.disabled},{[`&.${qc.selected}`]:t.selected}]})(({theme:e})=>m({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:We(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:We(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${qc.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${qc.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),K3=y.memo(function(t){const n=ve({props:t,name:"MuiPickersMonth"}),{autoFocus:r,children:o,disabled:s,selected:a,value:i,tabIndex:l,onClick:c,onKeyDown:u,onFocus:d,onBlur:f,"aria-current":b,"aria-label":w}=n,p=q(n,U3),S=y.useRef(null),h=W3(n);return Zt(()=>{if(r){var g;(g=S.current)==null||g.focus()}},[r]),P.jsx(H3,m({className:h.root,ownerState:n},p,{children:P.jsx(Y3,{ref:S,disabled:s,type:"button",role:"radio",tabIndex:s?-1:l,"aria-current":b,"aria-checked":a,"aria-label":w,onClick:g=>c(g,i),onKeyDown:g=>u(g,i),onFocus:g=>d(g,i),onBlur:g=>f(g,i),className:h.monthButton,ownerState:n,children:o})}))});function G3(e){return Ce("MuiMonthCalendar",e)}be("MuiMonthCalendar",["root"]);const Z3=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId"],q3=e=>{const{classes:t}=e;return xe({root:["root"]},G3,t)};function Q3(e,t){const n=gt(),r=bc(),o=ve({props:e,name:t});return m({disableFuture:!1,disablePast:!1},o,{minDate:br(n,o.minDate,r.minDate),maxDate:br(n,o.maxDate,r.maxDate)})}const X3=V("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Lf,boxSizing:"border-box"}),J3=y.forwardRef(function(t,n){const r=Q3(t,"MuiMonthCalendar"),{className:o,value:s,defaultValue:a,referenceDate:i,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:f,onChange:b,shouldDisableMonth:w,readOnly:p,disableHighlightToday:S,autoFocus:h=!1,onMonthFocus:g,hasFocus:C,onFocusedViewChange:x,monthsPerRow:T=3,timezone:v,gridLabelId:k}=r,M=q(r,Z3),{value:$,handleValueChange:R,timezone:E}=vi({name:"MonthCalendar",timezone:v,value:s,defaultValue:a,onChange:b,valueManager:Jn}),A=hs(E),N=hi(),_=gt(),D=y.useMemo(()=>Jn.getInitialReferenceValue({value:$,utils:_,props:r,timezone:E,referenceDate:i,granularity:Mr.month}),[]),O=r,j=q3(O),I=y.useMemo(()=>_.getMonth(A),[_,A]),L=y.useMemo(()=>$!=null?_.getMonth($):S?null:_.getMonth(D),[$,_,S,D]),[F,J]=y.useState(()=>L||I),[ie,ue]=yn({name:"MonthCalendar",state:"hasFocus",controlled:C,default:h??!1}),U=Ie(ee=>{ue(ee),x&&x(ee)}),Q=y.useCallback(ee=>{const pe=_.startOfMonth(u&&_.isAfter(A,f)?A:f),X=_.startOfMonth(c&&_.isBefore(A,d)?A:d),he=_.startOfMonth(ee);return _.isBefore(he,pe)||_.isAfter(he,X)?!0:w?w(he):!1},[c,u,d,f,A,w,_]),K=Ie((ee,pe)=>{if(p)return;const X=_.setMonth($??D,pe);R(X)}),H=Ie(ee=>{Q(_.setMonth($??D,ee))||(J(ee),U(!0),g&&g(ee))});y.useEffect(()=>{J(ee=>L!==null&&ee!==L?L:ee)},[L]);const oe=Ie((ee,pe)=>{switch(ee.key){case"ArrowUp":H((12+pe-3)%12),ee.preventDefault();break;case"ArrowDown":H((12+pe+3)%12),ee.preventDefault();break;case"ArrowLeft":H((12+pe+(N.direction==="ltr"?-1:1))%12),ee.preventDefault();break;case"ArrowRight":H((12+pe+(N.direction==="ltr"?1:-1))%12),ee.preventDefault();break}}),me=Ie((ee,pe)=>{H(pe)}),ye=Ie((ee,pe)=>{F===pe&&U(!1)});return P.jsx(X3,m({ref:n,className:ae(j.root,o),ownerState:O,role:"radiogroup","aria-labelledby":k},M,{children:Zg(_,$??D).map(ee=>{const pe=_.getMonth(ee),X=_.format(ee,"monthShort"),he=_.format(ee,"month"),se=pe===L,Oe=l||Q(ee);return P.jsx(K3,{selected:se,value:pe,onClick:K,onKeyDown:oe,autoFocus:ie&&pe===F,disabled:Oe,tabIndex:pe===F?0:-1,onFocus:me,onBlur:ye,"aria-current":I===pe?"date":void 0,"aria-label":he,monthsPerRow:T,children:X},X)})}))});function e6(e){return Ce("MuiPickersYear",e)}const Qc=be("MuiPickersYear",["root","yearButton","selected","disabled"]),t6=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow"],n6=e=>{const{disabled:t,selected:n,classes:r}=e;return xe({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},e6,r)},r6=V("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})(({ownerState:e})=>({flexBasis:e.yearsPerRow===3?"33.3%":"25%",display:"flex",alignItems:"center",justifyContent:"center"})),o6=V("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${Qc.disabled}`]:t.disabled},{[`&.${Qc.selected}`]:t.selected}]})(({theme:e})=>m({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:We(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:We(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${Qc.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${Qc.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),s6=y.memo(function(t){const n=ve({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:s,disabled:a,selected:i,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:b,"aria-current":w}=n,p=q(n,t6),S=y.useRef(null),h=n6(n);return y.useEffect(()=>{r&&S.current.focus()},[r]),P.jsx(r6,m({className:ae(h.root,o),ownerState:n},p,{children:P.jsx(o6,{ref:S,disabled:a,type:"button",role:"radio",tabIndex:a?-1:c,"aria-current":w,"aria-checked":i,onClick:g=>u(g,l),onKeyDown:g=>d(g,l),onFocus:g=>f(g,l),onBlur:g=>b(g,l),className:h.yearButton,ownerState:n,children:s})}))});function a6(e){return Ce("MuiYearCalendar",e)}be("MuiYearCalendar",["root"]);const i6=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsPerRow","timezone","gridLabelId"],l6=e=>{const{classes:t}=e;return xe({root:["root"]},a6,t)};function c6(e,t){var n;const r=gt(),o=bc(),s=ve({props:e,name:t});return m({disablePast:!1,disableFuture:!1},s,{yearsPerRow:(n=s.yearsPerRow)!=null?n:3,minDate:br(r,s.minDate,o.minDate),maxDate:br(r,s.maxDate,o.maxDate)})}const u6=V("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Lf,maxHeight:J4,boxSizing:"border-box",position:"relative"}),d6=y.forwardRef(function(t,n){const r=c6(t,"MuiYearCalendar"),{autoFocus:o,className:s,value:a,defaultValue:i,referenceDate:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:b,onChange:w,readOnly:p,shouldDisableYear:S,disableHighlightToday:h,onYearFocus:g,hasFocus:C,onFocusedViewChange:x,yearsPerRow:T,timezone:v,gridLabelId:k}=r,M=q(r,i6),{value:$,handleValueChange:R,timezone:E}=vi({name:"YearCalendar",timezone:v,value:a,defaultValue:i,onChange:w,valueManager:Jn}),A=hs(E),N=hi(),_=gt(),D=y.useMemo(()=>Jn.getInitialReferenceValue({value:$,utils:_,props:r,timezone:E,referenceDate:l,granularity:Mr.year}),[]),O=r,j=l6(O),I=y.useMemo(()=>_.getYear(A),[_,A]),L=y.useMemo(()=>$!=null?_.getYear($):h?null:_.getYear(D),[$,_,h,D]),[F,J]=y.useState(()=>L||I),[ie,ue]=yn({name:"YearCalendar",state:"hasFocus",controlled:C,default:o??!1}),U=Ie(X=>{ue(X),x&&x(X)}),Q=y.useCallback(X=>{if(d&&_.isBeforeYear(X,A)||u&&_.isAfterYear(X,A)||b&&_.isBeforeYear(X,b)||f&&_.isAfterYear(X,f))return!0;if(!S)return!1;const he=_.startOfYear(X);return S(he)},[u,d,f,b,A,S,_]),K=Ie((X,he)=>{if(p)return;const se=_.setYear($??D,he);R(se)}),H=Ie(X=>{Q(_.setYear($??D,X))||(J(X),U(!0),g==null||g(X))});y.useEffect(()=>{J(X=>L!==null&&X!==L?L:X)},[L]);const oe=Ie((X,he)=>{switch(X.key){case"ArrowUp":H(he-T),X.preventDefault();break;case"ArrowDown":H(he+T),X.preventDefault();break;case"ArrowLeft":H(he+(N.direction==="ltr"?-1:1)),X.preventDefault();break;case"ArrowRight":H(he+(N.direction==="ltr"?1:-1)),X.preventDefault();break}}),me=Ie((X,he)=>{H(he)}),ye=Ie((X,he)=>{F===he&&U(!1)}),ee=y.useRef(null),pe=ut(n,ee);return y.useEffect(()=>{if(o||ee.current===null)return;const X=ee.current.querySelector('[tabindex="0"]');if(!X)return;const he=X.offsetHeight,se=X.offsetTop,Oe=ee.current.clientHeight,Re=ee.current.scrollTop,ge=se+he;he>Oe||se{const he=_.getYear(X),se=he===L,Oe=c||Q(X);return P.jsx(s6,{selected:se,value:he,onClick:K,onKeyDown:oe,autoFocus:ie&&he===F,disabled:Oe,tabIndex:he===F?0:-1,onFocus:me,onBlur:ye,"aria-current":I===he?"date":void 0,yearsPerRow:T,children:_.format(X,"year")},_.format(X,"year"))})}))}),f6=e=>Ce("MuiPickersCalendarHeader",e),p6=be("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),h6=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone"],m6=["ownerState"],g6=e=>{const{classes:t}=e;return xe({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},f6,t)},v6=V("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:16,marginBottom:8,paddingLeft:24,paddingRight:12,maxHeight:30,minHeight:30}),y6=V("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>m({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),b6=V("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),x6=V(Dn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})(({ownerState:e})=>m({marginRight:"auto"},e.view==="year"&&{[`.${p6.switchViewIcon}`]:{transform:"rotate(180deg)"}})),C6=V(F4,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),w6=y.forwardRef(function(t,n){var r,o;const s=rr(),a=gt(),i=ve({props:t,name:"MuiPickersCalendarHeader"}),{slots:l,slotProps:c,currentMonth:u,disabled:d,disableFuture:f,disablePast:b,maxDate:w,minDate:p,onMonthChange:S,onViewChange:h,view:g,reduceAnimations:C,views:x,labelId:T,className:v,timezone:k}=i,M=q(i,h6),$=i,R=g6(i),E=(r=l==null?void 0:l.switchViewButton)!=null?r:x6,A=ct({elementType:E,externalSlotProps:c==null?void 0:c.switchViewButton,additionalProps:{size:"small","aria-label":s.calendarViewSwitchingButtonAriaLabel(g)},ownerState:$,className:R.switchViewButton}),N=(o=l==null?void 0:l.switchViewIcon)!=null?o:C6,_=ct({elementType:N,externalSlotProps:c==null?void 0:c.switchViewIcon,ownerState:void 0,className:R.switchViewIcon}),D=q(_,m6),O=()=>S(a.addMonths(u,1),"left"),j=()=>S(a.addMonths(u,-1),"right"),I=WV(u,{disableFuture:f,maxDate:w,timezone:k}),L=HV(u,{disablePast:b,minDate:p,timezone:k}),F=()=>{if(!(x.length===1||!h||d))if(x.length===2)h(x.find(J=>J!==g)||x[0]);else{const J=x.indexOf(g)!==0?0:1;h(x[J])}};return x.length===1&&x[0]==="year"?null:P.jsxs(v6,m({},M,{ownerState:$,className:ae(v,R.root),ref:n,children:[P.jsxs(y6,{role:"presentation",onClick:F,ownerState:$,"aria-live":"polite",className:R.labelContainer,children:[P.jsx(kk,{reduceAnimations:C,transKey:a.format(u,"monthAndYear"),children:P.jsx(b6,{id:T,ownerState:$,className:R.label,children:a.format(u,"monthAndYear")})}),x.length>1&&!d&&P.jsx(E,m({},A,{children:P.jsx(N,m({},D))}))]}),P.jsx(mi,{in:g==="day",children:P.jsx(ak,{slots:l,slotProps:c,onGoToPrevious:j,isPreviousDisabled:L,previousLabel:s.previousMonth,onGoToNext:O,isNextDisabled:I,nextLabel:s.nextMonth})})]}))}),Nf=V("div")({overflow:"hidden",width:Lf,maxHeight:Af,display:"flex",flexDirection:"column",margin:"0 auto"}),S6=e=>Ce("MuiDateCalendar",e);be("MuiDateCalendar",["root","viewTransitionContainer"]);const k6=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","defaultCalendarMonth","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","components","componentsProps","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsPerRow","monthsPerRow","timezone"],T6=e=>{const{classes:t}=e;return xe({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},S6,t)};function P6(e,t){var n,r,o,s,a,i,l;const c=gt(),u=bc(),d=lk(),f=ve({props:e,name:t});return m({},f,{loading:(n=f.loading)!=null?n:!1,disablePast:(r=f.disablePast)!=null?r:!1,disableFuture:(o=f.disableFuture)!=null?o:!1,openTo:(s=f.openTo)!=null?s:"day",views:(a=f.views)!=null?a:["year","day"],reduceAnimations:(i=f.reduceAnimations)!=null?i:d,renderLoading:(l=f.renderLoading)!=null?l:()=>P.jsx("span",{children:"..."}),minDate:br(c,f.minDate,u.minDate),maxDate:br(c,f.maxDate,u.maxDate)})}const M6=V(Nf,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:Af}),R6=V(kk,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),Tk=y.forwardRef(function(t,n){var r,o,s;const a=gt(),i=gr(),l=P6(t,"MuiDateCalendar"),{autoFocus:c,onViewChange:u,value:d,defaultValue:f,referenceDate:b,disableFuture:w,disablePast:p,defaultCalendarMonth:S,onChange:h,onYearChange:g,onMonthChange:C,reduceAnimations:x,shouldDisableDate:T,shouldDisableMonth:v,shouldDisableYear:k,view:M,views:$,openTo:R,className:E,disabled:A,readOnly:N,minDate:_,maxDate:D,disableHighlightToday:O,focusedView:j,onFocusedViewChange:I,showDaysOutsideCurrentMonth:L,fixedWeekNumber:F,dayOfWeekFormatter:J,components:ie,componentsProps:ue,slots:U,slotProps:Q,loading:K,renderLoading:H,displayWeekNumber:oe,yearsPerRow:me,monthsPerRow:ye,timezone:ee}=l,pe=q(l,k6),{value:X,handleValueChange:he,timezone:se}=vi({name:"DateCalendar",timezone:ee,value:d,defaultValue:f,onChange:h,valueManager:Jn}),{view:Oe,setView:Re,focusedView:ge,setFocusedView:$e,goToNextView:G,setValueAndGoToNextView:Z}=xc({view:M,views:$,openTo:R,onChange:he,onViewChange:u,autoFocus:c,focusedView:j,onFocusedViewChange:I}),{referenceDate:te,calendarState:De,changeFocusedDay:Ae,changeMonth:He,handleChangeMonth:Ue,isDateDisabled:Ee,onMonthSwitchingAnimationEnd:we}=x3({value:X,defaultCalendarMonth:S,referenceDate:b,reduceAnimations:x,onMonthChange:C,minDate:_,maxDate:D,shouldDisableDate:T,disablePast:p,disableFuture:w,timezone:se}),ke=A&&X||_,qe=A&&X||D,yt=`${i}-grid-label`,wt=ge!==null,Se=(r=(o=U==null?void 0:U.calendarHeader)!=null?o:ie==null?void 0:ie.CalendarHeader)!=null?r:w6,W=ct({elementType:Se,externalSlotProps:(s=Q==null?void 0:Q.calendarHeader)!=null?s:ue==null?void 0:ue.calendarHeader,additionalProps:{views:$,view:Oe,currentMonth:De.currentMonth,onViewChange:Re,onMonthChange:(Ye,Ge)=>Ue({newMonth:Ye,direction:Ge}),minDate:ke,maxDate:qe,disabled:A,disablePast:p,disableFuture:w,reduceAnimations:x,timezone:se,labelId:yt,slots:U,slotProps:Q},ownerState:l}),B=Ie(Ye=>{const Ge=a.startOfMonth(Ye),et=a.endOfMonth(Ye),st=Ee(Ye)?fl({utils:a,date:Ye,minDate:a.isBefore(_,Ge)?Ge:_,maxDate:a.isAfter(D,et)?et:D,disablePast:p,disableFuture:w,isDateDisabled:Ee,timezone:se}):Ye;st?(Z(st,"finish"),C==null||C(Ge)):(G(),He(Ge)),Ae(st,!0)}),Y=Ie(Ye=>{const Ge=a.startOfYear(Ye),et=a.endOfYear(Ye),st=Ee(Ye)?fl({utils:a,date:Ye,minDate:a.isBefore(_,Ge)?Ge:_,maxDate:a.isAfter(D,et)?et:D,disablePast:p,disableFuture:w,isDateDisabled:Ee,timezone:se}):Ye;st?(Z(st,"finish"),g==null||g(st)):(G(),He(Ge)),Ae(st,!0)}),fe=Ie(Ye=>he(Ye&&Xh(a,Ye,X??te),"finish"));y.useEffect(()=>{X!=null&&a.isValid(X)&&He(X)},[X]);const Pe=l,_e=T6(Pe),Be={disablePast:p,disableFuture:w,maxDate:D,minDate:_},je={disableHighlightToday:O,readOnly:N,disabled:A,timezone:se,gridLabelId:yt},Ne=y.useRef(Oe);y.useEffect(()=>{Ne.current!==Oe&&(ge===Ne.current&&$e(Oe,!0),Ne.current=Oe)},[ge,$e,Oe]);const lt=y.useMemo(()=>[X],[X]);return P.jsxs(M6,m({ref:n,className:ae(_e.root,E),ownerState:Pe},pe,{children:[P.jsx(Se,m({},W)),P.jsx(R6,{reduceAnimations:x,className:_e.viewTransitionContainer,transKey:Oe,ownerState:Pe,children:P.jsxs("div",{children:[Oe==="year"&&P.jsx(d6,m({},Be,je,{value:X,onChange:Y,shouldDisableYear:k,hasFocus:wt,onFocusedViewChange:Ye=>$e("year",Ye),yearsPerRow:me,referenceDate:te})),Oe==="month"&&P.jsx(J3,m({},Be,je,{hasFocus:wt,className:E,value:X,onChange:B,shouldDisableMonth:v,onFocusedViewChange:Ye=>$e("month",Ye),monthsPerRow:ye,referenceDate:te})),Oe==="day"&&P.jsx(y3,m({},De,Be,je,{onMonthSwitchingAnimationEnd:we,onFocusedDayChange:Ae,reduceAnimations:x,selectedDays:lt,onSelectedDaysChange:fe,shouldDisableDate:T,shouldDisableMonth:v,shouldDisableYear:k,hasFocus:wt,onFocusedViewChange:Ye=>$e("day",Ye),showDaysOutsideCurrentMonth:L,fixedWeekNumber:F,dayOfWeekFormatter:J,displayWeekNumber:oe,components:ie,componentsProps:ue,slots:U,slotProps:Q,loading:K,renderLoading:H}))]})})]}))}),za=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:b,maxDate:w,shouldDisableDate:p,shouldDisableMonth:S,shouldDisableYear:h,reduceAnimations:g,onMonthChange:C,monthsPerRow:x,onYearChange:T,yearsPerRow:v,defaultCalendarMonth:k,components:M,componentsProps:$,slots:R,slotProps:E,loading:A,renderLoading:N,disableHighlightToday:_,readOnly:D,disabled:O,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:I,sx:L,autoFocus:F,fixedWeekNumber:J,displayWeekNumber:ie,timezone:ue})=>P.jsx(Tk,{view:e,onViewChange:t,views:n.filter(Fa),focusedView:r&&Fa(r)?r:null,onFocusedViewChange:o,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:b,maxDate:w,shouldDisableDate:p,shouldDisableMonth:S,shouldDisableYear:h,reduceAnimations:g,onMonthChange:C,monthsPerRow:x,onYearChange:T,yearsPerRow:v,defaultCalendarMonth:k,components:M,componentsProps:$,slots:R,slotProps:E,loading:A,renderLoading:N,disableHighlightToday:_,readOnly:D,disabled:O,showDaysOutsideCurrentMonth:j,dayOfWeekFormatter:I,sx:L,autoFocus:F,fixedWeekNumber:J,displayWeekNumber:ie,timezone:ue});function $6(e){return Ce("MuiMultiSectionDigitalClock",e)}be("MuiMultiSectionDigitalClock",["root"]);function D6(e){return Ce("MuiMultiSectionDigitalClock",e)}const E6=be("MuiMultiSectionDigitalClock",["root","item"]),_6=["autoFocus","onChange","className","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],I6=e=>{const{classes:t}=e;return xe({root:["root"],item:["item"]},D6,t)},O6=V(Hg,{name:"MuiMultiSectionDigitalClockSection",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>({maxHeight:ik,width:56,padding:0,overflow:"hidden","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:t.alreadyRendered?"smooth":"auto"},"&:hover":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&:after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"}})),L6=V(Df,{name:"MuiMultiSectionDigitalClockSection",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:8,margin:"2px 4px",width:Ki,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:We(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:We(e.palette.primary.main,e.palette.action.focusOpacity)}})),A6=y.forwardRef(function(t,n){var r;const o=y.useRef(null),s=ut(n,o),a=y.useRef(null),i=ve({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:l,onChange:c,className:u,disabled:d,readOnly:f,items:b,active:w,slots:p,slotProps:S,skipDisabled:h}=i,g=q(i,_6),C=y.useMemo(()=>m({},i,{alreadyRendered:!!o.current}),[i]),x=I6(C),T=(r=p==null?void 0:p.digitalClockSectionItem)!=null?r:L6;return y.useEffect(()=>{if(o.current===null)return;const v=o.current.querySelector('[role="option"][aria-selected="true"]');if(!v||a.current===v){a.current!==v&&(a.current=v);return}a.current=v,w&&l&&v.focus();const k=v.offsetTop;o.current.scrollTop=k-4}),P.jsx(O6,m({ref:s,className:ae(x.root,u),ownerState:C,autoFocusItem:l&&w,role:"listbox"},g,{children:b.map(v=>{var k,M;if(h&&(k=v.isDisabled)!=null&&k.call(v,v.value))return null;const $=v.isSelected(v.value);return P.jsx(T,m({onClick:()=>!f&&c(v.value),selected:$,disabled:d||((M=v.isDisabled)==null?void 0:M.call(v,v.value)),disableRipple:f,role:"option","aria-disabled":f,"aria-label":v.ariaLabel,"aria-selected":$},S==null?void 0:S.digitalClockSectionItem,{children:v.label}),v.label)})}))}),N6=({now:e,value:t,utils:n,ampm:r,isDisabled:o,resolveAriaLabel:s,timeStep:a})=>{const i=t?n.getHours(t):null,l=[],c=d=>i===null?!1:r?d===12?i===12||i===0:i===d||i-12===d:i===d,u=r?11:23;for(let d=0;d<=u;d+=a){let f=n.format(n.setHours(e,d),r?"hours12h":"hours24h");const b=s(parseInt(f,10).toString());f=n.formatNumber(f),l.push({value:d,label:f,isSelected:c,isDisabled:o,ariaLabel:b})}return l},Hb=({value:e,isDisabled:t,timeStep:n,resolveLabel:r,resolveAriaLabel:o,hasValue:s=!0})=>{const a=i=>e===null?!1:s&&e===i;return[...Array.from({length:Math.ceil(60/n)},(i,l)=>{const c=n*l;return{value:c,label:r(c),isDisabled:t,isSelected:a,ariaLabel:o(c.toString())}})]},nv=({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const s=y.useMemo(()=>Jn.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:Mr.day,timezone:o,getTodayDate:()=>qg(n,o,"date")}),[]);return e??s},j6=["ampm","timeSteps","autoFocus","components","componentsProps","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableClock","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","skipDisabled","timezone"],F6=e=>{const{classes:t}=e;return xe({root:["root"]},$6,t)},B6=V(Nf,{name:"MuiMultiSectionDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),z6=y.forwardRef(function(t,n){const r=gt(),o=ve({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:s=r.is12HourCycleInCurrentLocale(),timeSteps:a,autoFocus:i,components:l,componentsProps:c,slots:u,slotProps:d,value:f,defaultValue:b,referenceDate:w,disableIgnoringDatePartForTimeValidation:p=!1,maxTime:S,minTime:h,disableFuture:g,disablePast:C,minutesStep:x=1,shouldDisableClock:T,shouldDisableTime:v,onChange:k,view:M,views:$=["hours","minutes"],openTo:R,onViewChange:E,focusedView:A,onFocusedViewChange:N,className:_,disabled:D,readOnly:O,skipDisabled:j=!1,timezone:I}=o,L=q(o,j6),{value:F,handleValueChange:J,timezone:ie}=vi({name:"MultiSectionDigitalClock",timezone:I,value:f,defaultValue:b,onChange:k,valueManager:Jn}),ue=rr(),U=hs(ie),Q=y.useMemo(()=>m({hours:1,minutes:5,seconds:5},a),[a]),K=nv({value:F,referenceDate:w,utils:r,props:o,timezone:ie}),H=Ie((Z,te,De)=>J(Z,te,De)),oe=y.useMemo(()=>!s||!$.includes("hours")||$.includes("meridiem")?$:[...$,"meridiem"],[s,$]),{view:me,setValueAndGoToView:ye,focusedView:ee}=xc({view:M,views:oe,openTo:R,onViewChange:E,onChange:H,focusedView:A,onFocusedViewChange:N}),pe=Ie(Z=>{ye(Z,null,"meridiem")}),{meridiemMode:X,handleMeridiemChange:he}=tv(K,s,pe,"finish"),se=y.useCallback((Z,te)=>{const De=yc(p,r),Ae=te==="hours"||te==="minutes"&&oe.includes("seconds"),He=({start:Ee,end:we})=>!(h&&De(h,we)||S&&De(Ee,S)||g&&De(Ee,U)||C&&De(U,Ae?we:Ee)),Ue=(Ee,we=1)=>{if(Ee%we!==0||T!=null&&T(Ee,te))return!1;if(v)switch(te){case"hours":return!v(r.setHours(K,Ee),"hours");case"minutes":return!v(r.setMinutes(K,Ee),"minutes");case"seconds":return!v(r.setSeconds(K,Ee),"seconds");default:return!1}return!0};switch(te){case"hours":{const Ee=Bl(Z,X,s),we=r.setHours(K,Ee),ke=r.setSeconds(r.setMinutes(we,0),0),qe=r.setSeconds(r.setMinutes(we,59),59);return!He({start:ke,end:qe})||!Ue(Ee)}case"minutes":{const Ee=r.setMinutes(K,Z),we=r.setSeconds(Ee,0),ke=r.setSeconds(Ee,59);return!He({start:we,end:ke})||!Ue(Z,x)}case"seconds":{const Ee=r.setSeconds(K,Z);return!He({start:Ee,end:Ee})||!Ue(Z)}default:throw new Error("not supported")}},[s,K,p,S,X,h,x,T,v,r,g,C,U,oe]),Oe=Ie((Z,te)=>{const De=oe.indexOf(Z),Ae=oe[De+1];ye(te,Ae,Z)}),Re=y.useCallback(Z=>{switch(Z){case"hours":return{onChange:te=>{const De=Bl(te,X,s);Oe("hours",r.setHours(K,De))},items:N6({now:U,value:F,ampm:s,utils:r,isDisabled:te=>D||se(te,"hours"),timeStep:Q.hours,resolveAriaLabel:ue.hoursClockNumberText})};case"minutes":return{onChange:te=>{Oe("minutes",r.setMinutes(K,te))},items:Hb({value:r.getMinutes(K),isDisabled:te=>D||se(te,"minutes"),resolveLabel:te=>r.format(r.setMinutes(U,te),"minutes"),timeStep:Q.minutes,hasValue:!!F,resolveAriaLabel:ue.minutesClockNumberText})};case"seconds":return{onChange:te=>{Oe("seconds",r.setSeconds(K,te))},items:Hb({value:r.getSeconds(K),isDisabled:te=>D||se(te,"seconds"),resolveLabel:te=>r.format(r.setSeconds(U,te),"seconds"),timeStep:Q.seconds,hasValue:!!F,resolveAriaLabel:ue.secondsClockNumberText})};case"meridiem":{const te=go(r,"am"),De=go(r,"pm");return{onChange:he,items:[{value:"am",label:te,isSelected:()=>!!F&&X==="am",ariaLabel:te},{value:"pm",label:De,isSelected:()=>!!F&&X==="pm",ariaLabel:De}]}}default:throw new Error(`Unknown view: ${Z} found.`)}},[U,F,s,r,Q.hours,Q.minutes,Q.seconds,ue.hoursClockNumberText,ue.minutesClockNumberText,ue.secondsClockNumberText,X,Oe,K,D,se,he]),ge=y.useMemo(()=>oe.reduce((Z,te)=>m({},Z,{[te]:Re(te)}),{}),[oe,Re]),$e=o,G=F6($e);return P.jsx(B6,m({ref:n,className:ae(G.root,_),ownerState:$e,role:"group"},L,{children:Object.entries(ge).map(([Z,te])=>P.jsx(A6,{items:te.items,onChange:te.onChange,active:me===Z,autoFocus:i??ee===Z,disabled:D,readOnly:O,slots:u??l,slotProps:d??c,skipDisabled:j,"aria-label":ue.selectViewText(Z)},Z))}))}),V6=V("div")({display:"flex",margin:"0 auto"});function U6(e){return Ce("MuiTimeClock",e)}be("MuiTimeClock",["root","arrowSwitcher"]);const ai=220,no=36,Vl={x:ai/2,y:ai/2},Pk={x:Vl.x,y:0},W6=Pk.x-Vl.x,H6=Pk.y-Vl.y,Y6=e=>e*(180/Math.PI),Mk=(e,t,n)=>{const r=t-Vl.x,o=n-Vl.y,s=Math.atan2(W6,H6)-Math.atan2(r,o);let a=Y6(s);a=Math.round(a/e)*e,a%=360;const i=Math.floor(a/e)||0,l=r**2+o**2,c=Math.sqrt(l);return{value:i,distance:c}},K6=(e,t,n=1)=>{const r=n*6;let{value:o}=Mk(r,e,t);return o=o*n%60,o},G6=(e,t,n)=>{const{value:r,distance:o}=Mk(30,e,t);let s=r||12;return n?s%=12:o{const{classes:t}=e;return xe({root:["root"],thumb:["thumb"]},Z6,t)},X6=V("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e,ownerState:t})=>m({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px"},t.shouldAnimate&&{transition:e.transitions.create(["transform","height"])})),J6=V("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e,ownerState:t})=>m({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:`calc(50% - ${no/2}px)`,border:`${(no-4)/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box"},t.hasSelected&&{backgroundColor:(e.vars||e).palette.primary.main}));function eU(e){const t=ve({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:o,viewValue:s}=t,a=q(t,q6),i=y.useRef(o);y.useEffect(()=>{i.current=o},[o]);const l=m({},t,{shouldAnimate:i.current!==o}),c=Q6(l),u=()=>{let f=360/(o==="hours"?12:60)*s;return o==="hours"&&s>12&&(f-=360),{height:Math.round((r?.26:.4)*ai),transform:`rotateZ(${f}deg)`}};return P.jsx(X6,m({style:u(),className:ae(n,c.root),ownerState:l},a,{children:P.jsx(J6,{ownerState:l,className:c.thumb})}))}function tU(e){return Ce("MuiClock",e)}be("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText"]);const nU=e=>{const{classes:t}=e;return xe({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton"],pmButton:["pmButton"],meridiemText:["meridiemText"]},tU,t)},rU=V("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),oU=V("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),sU=V("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),aU=V("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})(({ownerState:e})=>m({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none"},e.disabled?{}:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}})),iU=V("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),lU=V(Dn,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e,ownerState:t})=>m({zIndex:1,position:"absolute",bottom:8,left:8,paddingLeft:4,paddingRight:4,width:no},t.meridiemMode==="am"&&{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}})),cU=V(Dn,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e,ownerState:t})=>m({zIndex:1,position:"absolute",bottom:8,right:8,paddingLeft:4,paddingRight:4,width:no},t.meridiemMode==="pm"&&{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}})),Yb=V(sn,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function uU(e){const t=ve({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:s,value:a,handleMeridiemChange:i,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:d,selectedId:f,type:b,viewValue:w,disabled:p,readOnly:S,className:h}=t,g=t,C=gt(),x=rr(),T=y.useRef(!1),v=nU(g),k=l(w,b),M=!n&&b==="hours"&&(w<1||w>12),$=(L,F)=>{p||S||l(L,b)||d(L,F)},R=(L,F)=>{let{offsetX:J,offsetY:ie}=L;if(J===void 0){const U=L.target.getBoundingClientRect();J=L.changedTouches[0].clientX-U.left,ie=L.changedTouches[0].clientY-U.top}const ue=b==="seconds"||b==="minutes"?K6(J,ie,u):G6(J,ie,!!n);$(ue,F)},E=L=>{T.current=!0,R(L,"shallow")},A=L=>{T.current&&(R(L,"finish"),T.current=!1)},N=L=>{L.buttons>0&&R(L.nativeEvent,"shallow")},_=L=>{T.current&&(T.current=!1),R(L.nativeEvent,"finish")},D=y.useMemo(()=>b==="hours"?!0:w%5===0,[b,w]),O=b==="minutes"?u:1,j=y.useRef(null);Zt(()=>{o&&j.current.focus()},[o]);const I=L=>{if(!T.current)switch(L.key){case"Home":$(0,"partial"),L.preventDefault();break;case"End":$(b==="minutes"?59:23,"partial"),L.preventDefault();break;case"ArrowUp":$(w+O,"partial"),L.preventDefault();break;case"ArrowDown":$(w-O,"partial"),L.preventDefault();break}};return P.jsxs(rU,{className:ae(h,v.root),children:[P.jsxs(oU,{className:v.clock,children:[P.jsx(aU,{onTouchMove:E,onTouchEnd:A,onMouseUp:_,onMouseMove:N,ownerState:{disabled:p},className:v.squareMask}),!k&&P.jsxs(y.Fragment,{children:[P.jsx(iU,{className:v.pin}),a!=null&&P.jsx(eU,{type:b,viewValue:w,isInner:M,hasSelected:D})]}),P.jsx(sU,{"aria-activedescendant":f,"aria-label":x.clockLabelText(b,a,C),ref:j,role:"listbox",onKeyDown:I,tabIndex:0,className:v.wrapper,children:s})]}),n&&r&&P.jsxs(y.Fragment,{children:[P.jsx(lU,{onClick:S?void 0:()=>i("am"),disabled:p||c===null,ownerState:g,className:v.amButton,title:go(C,"am"),children:P.jsx(Yb,{variant:"caption",className:v.meridiemText,children:go(C,"am")})}),P.jsx(cU,{disabled:p||c===null,onClick:S?void 0:()=>i("pm"),ownerState:g,className:v.pmButton,title:go(C,"pm"),children:P.jsx(Yb,{variant:"caption",className:v.meridiemText,children:go(C,"pm")})})]})]})}function dU(e){return Ce("MuiClockNumber",e)}const Xc=be("MuiClockNumber",["root","selected","disabled"]),fU=["className","disabled","index","inner","label","selected"],pU=e=>{const{classes:t,selected:n,disabled:r}=e;return xe({root:["root",n&&"selected",r&&"disabled"]},dU,t)},hU=V("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${Xc.disabled}`]:t.disabled},{[`&.${Xc.selected}`]:t.selected}]})(({theme:e,ownerState:t})=>m({height:no,width:no,position:"absolute",left:`calc((100% - ${no}px) / 2)`,display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${Xc.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${Xc.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled}},t.inner&&m({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})));function Rk(e){const t=ve({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:o,inner:s,label:a,selected:i}=t,l=q(t,fU),c=t,u=pU(c),d=o%12/12*Math.PI*2-Math.PI/2,f=(ai-no-2)/2*(s?.65:1),b=Math.round(Math.cos(d)*f),w=Math.round(Math.sin(d)*f);return P.jsx(hU,m({className:ae(n,u.root),"aria-disabled":r?!0:void 0,"aria-selected":i?!0:void 0,role:"option",style:{transform:`translate(${b}px, ${w+(ai-no)/2}px`},ownerState:c},l,{children:a}))}const mU=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:s})=>{const a=t?s.getHours(t):null,i=[],l=e?1:0,c=e?12:23,u=d=>a===null?!1:e?d===12?a===12||a===0:a===d||a-12===d:a===d;for(let d=l;d<=c;d+=1){let f=d.toString();d===0&&(f="00");const b=!e&&(d===0||d>12);f=s.formatNumber(f);const w=u(d);i.push(P.jsx(Rk,{id:w?o:void 0,index:d,inner:b,selected:w,disabled:r(d),label:f,"aria-label":n(f)},d))}return i},Kb=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const s=e.formatNumber;return[[5,s("05")],[10,s("10")],[15,s("15")],[20,s("20")],[25,s("25")],[30,s("30")],[35,s("35")],[40,s("40")],[45,s("45")],[50,s("50")],[55,s("55")],[0,s("00")]].map(([a,i],l)=>{const c=a===t;return P.jsx(Rk,{label:i,id:c?o:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":r(i)},a)})},gU=["ampm","ampmInClock","autoFocus","components","componentsProps","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableClock","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],vU=e=>{const{classes:t}=e;return xe({root:["root"],arrowSwitcher:["arrowSwitcher"]},U6,t)},yU=V(Nf,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),bU=V(ak,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),xU=["hours","minutes"],CU=y.forwardRef(function(t,n){const r=gt(),o=ve({props:t,name:"MuiTimeClock"}),{ampm:s=r.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:i,components:l,componentsProps:c,slots:u,slotProps:d,value:f,defaultValue:b,referenceDate:w,disableIgnoringDatePartForTimeValidation:p=!1,maxTime:S,minTime:h,disableFuture:g,disablePast:C,minutesStep:x=1,shouldDisableClock:T,shouldDisableTime:v,showViewSwitcher:k,onChange:M,view:$,views:R=xU,openTo:E,onViewChange:A,focusedView:N,onFocusedViewChange:_,className:D,disabled:O,readOnly:j,timezone:I}=o,L=q(o,gU),F=u??ev(l),J=d??c,{value:ie,handleValueChange:ue,timezone:U}=vi({name:"TimeClock",timezone:I,value:f,defaultValue:b,onChange:M,valueManager:Jn}),Q=nv({value:ie,referenceDate:w,utils:r,props:o,timezone:U}),K=rr(),H=hs(U),{view:oe,setView:me,previousView:ye,nextView:ee,setValueAndGoToNextView:pe}=xc({view:$,views:R,openTo:E,onViewChange:A,onChange:ue,focusedView:N,onFocusedViewChange:_}),{meridiemMode:X,handleMeridiemChange:he}=tv(Q,s,pe),se=y.useCallback((G,Z)=>{const te=yc(p,r),De=Z==="hours"||Z==="minutes"&&R.includes("seconds"),Ae=({start:Ue,end:Ee})=>!(h&&te(h,Ee)||S&&te(Ue,S)||g&&te(Ue,H)||C&&te(H,De?Ee:Ue)),He=(Ue,Ee=1)=>{if(Ue%Ee!==0||T!=null&&T(Ue,Z))return!1;if(v)switch(Z){case"hours":return!v(r.setHours(Q,Ue),"hours");case"minutes":return!v(r.setMinutes(Q,Ue),"minutes");case"seconds":return!v(r.setSeconds(Q,Ue),"seconds");default:return!1}return!0};switch(Z){case"hours":{const Ue=Bl(G,X,s),Ee=r.setHours(Q,Ue),we=r.setSeconds(r.setMinutes(Ee,0),0),ke=r.setSeconds(r.setMinutes(Ee,59),59);return!Ae({start:we,end:ke})||!He(Ue)}case"minutes":{const Ue=r.setMinutes(Q,G),Ee=r.setSeconds(Ue,0),we=r.setSeconds(Ue,59);return!Ae({start:Ee,end:we})||!He(G,x)}case"seconds":{const Ue=r.setSeconds(Q,G);return!Ae({start:Ue,end:Ue})||!He(G)}default:throw new Error("not supported")}},[s,Q,p,S,X,h,x,T,v,r,g,C,H,R]),Oe=gr(),Re=y.useMemo(()=>{switch(oe){case"hours":{const G=(Z,te)=>{const De=Bl(Z,X,s);pe(r.setHours(Q,De),te)};return{onChange:G,viewValue:r.getHours(Q),children:mU({value:ie,utils:r,ampm:s,onChange:G,getClockNumberText:K.hoursClockNumberText,isDisabled:Z=>O||se(Z,"hours"),selectedId:Oe})}}case"minutes":{const G=r.getMinutes(Q),Z=(te,De)=>{pe(r.setMinutes(Q,te),De)};return{viewValue:G,onChange:Z,children:Kb({utils:r,value:G,onChange:Z,getClockNumberText:K.minutesClockNumberText,isDisabled:te=>O||se(te,"minutes"),selectedId:Oe})}}case"seconds":{const G=r.getSeconds(Q),Z=(te,De)=>{pe(r.setSeconds(Q,te),De)};return{viewValue:G,onChange:Z,children:Kb({utils:r,value:G,onChange:Z,getClockNumberText:K.secondsClockNumberText,isDisabled:te=>O||se(te,"seconds"),selectedId:Oe})}}default:throw new Error("You must provide the type for ClockView")}},[oe,r,ie,s,K.hoursClockNumberText,K.minutesClockNumberText,K.secondsClockNumberText,X,pe,Q,se,Oe,O]),ge=o,$e=vU(ge);return P.jsxs(yU,m({ref:n,className:ae($e.root,D),ownerState:ge},L,{children:[P.jsx(uU,m({autoFocus:i??!!N,ampmInClock:a&&R.includes("hours"),value:ie,type:oe,ampm:s,minutesStep:x,isTimeDisabled:se,meridiemMode:X,handleMeridiemChange:he,selectedId:Oe,disabled:O,readOnly:j},Re)),k&&P.jsx(bU,{className:$e.arrowSwitcher,slots:F,slotProps:J,onGoToPrevious:()=>me(ye),isPreviousDisabled:!ye,previousLabel:K.openPreviousView,onGoToNext:()=>me(ee),isNextDisabled:!ee,nextLabel:K.openNextView,ownerState:ge})]}))});function wU(e){return Ce("MuiDigitalClock",e)}const SU=be("MuiDigitalClock",["root","list","item"]),kU=["ampm","timeStep","autoFocus","components","componentsProps","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableClock","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","views","skipDisabled","timezone"],TU=e=>{const{classes:t}=e;return xe({root:["root"],list:["list"],item:["item"]},wU,t)},PU=V(Nf,{name:"MuiDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({ownerState:e})=>({overflowY:"auto",width:"100%","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:e.alreadyRendered?"smooth":"auto"},maxHeight:ik})),MU=V(Hg,{name:"MuiDigitalClock",slot:"List",overridesResolver:(e,t)=>t.list})({padding:0}),RU=V(Df,{name:"MuiDigitalClock",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:We(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:We(e.palette.primary.main,e.palette.action.focusOpacity)}})),$U=y.forwardRef(function(t,n){var r,o,s;const a=gt(),i=y.useRef(null),l=ut(n,i),c=ve({props:t,name:"MuiDigitalClock"}),{ampm:u=a.is12HourCycleInCurrentLocale(),timeStep:d=30,autoFocus:f,components:b,componentsProps:w,slots:p,slotProps:S,value:h,defaultValue:g,referenceDate:C,disableIgnoringDatePartForTimeValidation:x=!1,maxTime:T,minTime:v,disableFuture:k,disablePast:M,minutesStep:$=1,shouldDisableClock:R,shouldDisableTime:E,onChange:A,view:N,openTo:_,onViewChange:D,focusedView:O,onFocusedViewChange:j,className:I,disabled:L,readOnly:F,views:J=["hours"],skipDisabled:ie=!1,timezone:ue}=c,U=q(c,kU),{value:Q,handleValueChange:K,timezone:H}=vi({name:"DigitalClock",timezone:ue,value:h,defaultValue:g,onChange:A,valueManager:Jn}),oe=rr(),me=hs(H),ye=y.useMemo(()=>m({},c,{alreadyRendered:!!i.current}),[c]),ee=TU(ye),pe=(r=(o=p==null?void 0:p.digitalClockItem)!=null?o:b==null?void 0:b.DigitalClockItem)!=null?r:RU,X=ct({elementType:pe,externalSlotProps:(s=S==null?void 0:S.digitalClockItem)!=null?s:w==null?void 0:w.digitalClockItem,ownerState:{},className:ee.item}),he=nv({value:Q,referenceDate:C,utils:a,props:c,timezone:H}),se=Ie(G=>K(G,"finish","hours")),{setValueAndGoToNextView:Oe}=xc({view:N,views:J,openTo:_,onViewChange:D,onChange:se,focusedView:O,onFocusedViewChange:j}),Re=Ie(G=>{Oe(G,"finish")});y.useEffect(()=>{if(i.current===null)return;const G=i.current.querySelector('[role="listbox"] [role="option"][aria-selected="true"]');if(!G)return;const Z=G.offsetTop;i.current.scrollTop=Z-4});const ge=y.useCallback(G=>{const Z=yc(x,a),te=()=>!(v&&Z(v,G)||T&&Z(G,T)||k&&Z(G,me)||M&&Z(me,G)),De=()=>a.getMinutes(G)%$!==0||R!=null&&R(a.toJsDate(G).getTime(),"hours")?!1:E?!E(G,"hours"):!0;return!te()||!De()},[x,a,v,T,k,me,M,$,R,E]),$e=y.useMemo(()=>{const G=a.startOfDay(he);return[G,...Array.from({length:Math.ceil(24*60/d)-1},(Z,te)=>a.addMinutes(G,d*(te+1)))]},[he,d,a]);return P.jsx(PU,m({ref:l,className:ae(ee.root,I),ownerState:ye},U,{children:P.jsx(MU,{autoFocusItem:f||!!O,role:"listbox","aria-label":oe.timePickerToolbarTitle,className:ee.list,children:$e.map(G=>{if(ie&&ge(G))return null;const Z=a.isEqual(G,Q);return P.jsx(pe,m({onClick:()=>!F&&Re(G),selected:Z,disabled:L||ge(G),disableRipple:F,role:"option","aria-disabled":F,"aria-selected":Z},X,{children:a.format(G,u?"fullTime12h":"fullTime24h")}),a.toISO(G))})})}))}),Dp=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:b,maxTime:w,shouldDisableTime:p,shouldDisableClock:S,minutesStep:h,ampm:g,ampmInClock:C,components:x,componentsProps:T,slots:v,slotProps:k,readOnly:M,disabled:$,sx:R,autoFocus:E,showViewSwitcher:A,disableIgnoringDatePartForTimeValidation:N,timezone:_})=>P.jsx(CU,{view:e,onViewChange:t,focusedView:n&&si(n)?n:null,onFocusedViewChange:r,views:o.filter(si),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:b,maxTime:w,shouldDisableTime:p,shouldDisableClock:S,minutesStep:h,ampm:g,ampmInClock:C,components:x,componentsProps:T,slots:v,slotProps:k,readOnly:M,disabled:$,sx:R,autoFocus:E,showViewSwitcher:A,disableIgnoringDatePartForTimeValidation:N,timezone:_}),DU=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:b,maxTime:w,shouldDisableTime:p,shouldDisableClock:S,minutesStep:h,ampm:g,components:C,componentsProps:x,slots:T,slotProps:v,readOnly:k,disabled:M,sx:$,autoFocus:R,disableIgnoringDatePartForTimeValidation:E,timeSteps:A,skipDisabled:N,timezone:_})=>P.jsx($U,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(si),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:b,maxTime:w,shouldDisableTime:p,shouldDisableClock:S,minutesStep:h,ampm:g,components:C,componentsProps:x,slots:T,slotProps:v,readOnly:k,disabled:M,sx:$,autoFocus:R,disableIgnoringDatePartForTimeValidation:E,timeStep:A==null?void 0:A.minutes,skipDisabled:N,timezone:_}),EU=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:b,maxTime:w,shouldDisableTime:p,shouldDisableClock:S,minutesStep:h,ampm:g,components:C,componentsProps:x,slots:T,slotProps:v,readOnly:k,disabled:M,sx:$,autoFocus:R,disableIgnoringDatePartForTimeValidation:E,timeSteps:A,skipDisabled:N,timezone:_})=>P.jsx(z6,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(si),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:b,maxTime:w,shouldDisableTime:p,shouldDisableClock:S,minutesStep:h,ampm:g,components:C,componentsProps:x,slots:T,slotProps:v,readOnly:k,disabled:M,sx:$,autoFocus:R,disableIgnoringDatePartForTimeValidation:E,timeSteps:A,skipDisabled:N,timezone:_}),vs=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:b,minTime:w,maxDate:p,maxTime:S,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:C,shouldDisableTime:x,shouldDisableClock:T,reduceAnimations:v,minutesStep:k,ampm:M,onMonthChange:$,monthsPerRow:R,onYearChange:E,yearsPerRow:A,defaultCalendarMonth:N,components:_,componentsProps:D,slots:O,slotProps:j,loading:I,renderLoading:L,disableHighlightToday:F,readOnly:J,disabled:ie,showDaysOutsideCurrentMonth:ue,dayOfWeekFormatter:U,sx:Q,autoFocus:K,fixedWeekNumber:H,displayWeekNumber:oe,timezone:me,disableIgnoringDatePartForTimeValidation:ye,timeSteps:ee,skipDisabled:pe,timeViewsCount:X,shouldRenderTimeInASingleColumn:he})=>{var se,Oe;const Re=!!((se=Cf((Oe=j==null?void 0:j.actionBar)!=null?Oe:D==null?void 0:D.actionBar,{}))!=null&&(se=se.actions)!=null&&se.length),ge={view:jo(e)?e:"hours",onViewChange:t,focusedView:r&&jo(r)?r:null,onFocusedViewChange:o,views:n.filter(jo),value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:w,maxTime:S,shouldDisableTime:x,shouldDisableClock:T,minutesStep:k,ampm:M,components:_,componentsProps:D,slots:O,slotProps:j,readOnly:J,disabled:ie,autoFocus:K,disableIgnoringDatePartForTimeValidation:ye,timeSteps:ee,skipDisabled:pe,timezone:me};return P.jsxs(y.Fragment,{children:[P.jsxs(V6,{children:[P.jsx(Tk,{view:Fa(e)?e:"day",onViewChange:t,views:n.filter(Fa),focusedView:r&&Fa(r)?r:null,onFocusedViewChange:o,value:s,defaultValue:a,referenceDate:i,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:b,maxDate:p,shouldDisableDate:h,shouldDisableMonth:g,shouldDisableYear:C,reduceAnimations:v,onMonthChange:$,monthsPerRow:R,onYearChange:E,yearsPerRow:A,defaultCalendarMonth:N,components:_,componentsProps:D,slots:O,slotProps:j,loading:I,renderLoading:L,disableHighlightToday:F,readOnly:J,disabled:ie,showDaysOutsideCurrentMonth:ue,dayOfWeekFormatter:U,sx:Q,autoFocus:K,fixedWeekNumber:H,displayWeekNumber:oe,timezone:me}),X>0&&P.jsxs(y.Fragment,{children:[P.jsx(Wh,{orientation:"vertical"}),he?DU(m({},ge,{view:"hours",views:["hours"],focusedView:r&&jo(r)?"hours":null,sx:m({width:"auto",[`&.${SU.root}`]:{maxHeight:Af}},Array.isArray(Q)?Q:[Q])})):EU(m({},ge,{view:jo(e)?e:"hours",views:n.filter(jo),focusedView:r&&jo(r)?r:null,sx:m({borderBottom:0,width:"auto",[`.${E6.root}`]:{maxHeight:"100%"}},Array.isArray(Q)?Q:[Q])}))]})]}),Re&&P.jsx(Wh,{})]})},_U=["props","getOpenDialogAriaText"],IU=["ownerState"],OU=["ownerState"],LU=e=>{var t,n,r,o,s;let{props:a,getOpenDialogAriaText:i}=e,l=q(e,_U);const{slots:c,slotProps:u,className:d,sx:f,format:b,formatDensity:w,timezone:p,label:S,inputRef:h,readOnly:g,disabled:C,autoFocus:x,localeText:T,reduceAnimations:v}=a,k=gt(),M=y.useRef(null),$=y.useRef(null),R=gr(),E=(t=u==null||(n=u.toolbar)==null?void 0:n.hidden)!=null?t:!1,{open:A,actions:N,hasUIView:_,layoutProps:D,renderCurrentView:O,shouldRestoreFocus:j,fieldProps:I}=fk(m({},l,{props:a,inputRef:M,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),L=(r=c.inputAdornment)!=null?r:Ug,F=ct({elementType:L,externalSlotProps:u==null?void 0:u.inputAdornment,additionalProps:{position:"end"},ownerState:a}),J=q(F,IU),ie=(o=c.openPickerButton)!=null?o:Dn,ue=ct({elementType:ie,externalSlotProps:u==null?void 0:u.openPickerButton,additionalProps:{disabled:C||g,onClick:A?N.onClose:N.onOpen,"aria-label":i(I.value,k),edge:J.position},ownerState:a}),U=q(ue,OU),Q=c.openPickerIcon,K=c.field,H=ct({elementType:K,externalSlotProps:u==null?void 0:u.field,additionalProps:m({},I,E&&{id:R},{readOnly:g,disabled:C,className:d,sx:f,format:b,formatDensity:w,timezone:p,label:S,autoFocus:x&&!a.open,focused:A?!0:void 0}),ownerState:a});_&&(H.InputProps=m({},H.InputProps,{ref:$,[`${J.position}Adornment`]:P.jsx(L,m({},J,{children:P.jsx(ie,m({},U,{children:P.jsx(Q,m({},u==null?void 0:u.openPickerIcon))}))}))}));const oe=m({textField:c.textField,clearIcon:c.clearIcon,clearButton:c.clearButton},H.slots),me=(s=c.layout)!=null?s:mk,ye=ut(M,H.inputRef,h);let ee=R;E&&(S?ee=`${R}-label`:ee=void 0);const pe=m({},u,{toolbar:m({},u==null?void 0:u.toolbar,{titleId:R}),popper:m({"aria-labelledby":ee},u==null?void 0:u.popper)});return{renderPicker:()=>P.jsxs(XS,{localeText:T,children:[P.jsx(K,m({},H,{slots:oe,slotProps:pe,inputRef:ye})),P.jsx(pV,m({role:"dialog",placement:"bottom-start",anchorEl:$.current},N,{open:A,slots:c,slotProps:pe,shouldRestoreFocus:j,reduceAnimations:v,children:P.jsx(me,m({},D,pe==null?void 0:pe.layout,{slots:c,slotProps:pe,children:O()}))}))]})}},AU=["views","format"],$k=(e,t)=>{let{views:n,format:r}=t,o=q(t,AU);if(r)return r;const s=[],a=[];if(n.forEach(c=>{si(c)?a.push(c):s.push(c)}),a.length===0)return _b(e,m({views:s},o));if(s.length===0)return Ob(e,m({views:a},o));const i=Ob(e,m({views:a},o));return`${_b(e,m({views:s},o))} ${i}`},NU=(e,t,n)=>n?t.filter(r=>!jo(r)||r==="hours"):e?[...t,"meridiem"]:t,jU=(e,t)=>{var n,r;return 24*60/(((n=e.hours)!=null?n:1)*((r=e.minutes)!=null?r:5))<=t};function FU({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){const o=e??24,s=m({hours:1,minutes:5,seconds:5},n),a=jU(s,o);return{thresholdToRenderTimeInASingleColumn:o,timeSteps:s,shouldRenderTimeInASingleColumn:a,views:NU(t,r,a)}}const Dk=y.forwardRef(function(t,n){var r,o,s,a,i,l,c;const u=rr(),d=gt(),f=Sk(t,"MuiDesktopDateTimePicker"),{shouldRenderTimeInASingleColumn:b,thresholdToRenderTimeInASingleColumn:w,views:p,timeSteps:S}=FU(f),h=!f.viewRenderers||Object.keys(f.viewRenderers).length===0,g=h?{day:vs,month:vs,year:vs,hours:vs,minutes:vs,seconds:vs,meridiem:vs}:m({day:za,month:za,year:za,hours:null,minutes:null,seconds:null,meridiem:null},f.viewRenderers),C=(r=f.ampmInClock)!=null?r:!0,x=h?["accept"]:[],T=m({},f,{viewRenderers:g,format:$k(d,f),views:p,yearsPerRow:(o=f.yearsPerRow)!=null?o:4,ampmInClock:C,timeSteps:S,thresholdToRenderTimeInASingleColumn:w,shouldRenderTimeInASingleColumn:b,slots:m({field:xk,openPickerIcon:V4},f.slots),slotProps:m({},f.slotProps,{field:k=>{var M;return m({},Cf((M=f.slotProps)==null?void 0:M.field,k),sk(f),{ref:n})},toolbar:m({hidden:!0,ampmInClock:C,toolbarVariant:h?"desktop":"mobile"},(s=f.slotProps)==null?void 0:s.toolbar),tabs:m({hidden:!0},(a=f.slotProps)==null?void 0:a.tabs),actionBar:m({actions:x},(i=f.slotProps)==null?void 0:i.actionBar)})}),{renderPicker:v}=LU({props:T,valueManager:Jn,valueType:"date-time",getOpenDialogAriaText:(l=(c=T.localeText)==null?void 0:c.openDatePickerDialogue)!=null?l:u.openDatePickerDialogue,validator:Jg});return v()});Dk.propTypes={ampm:z.bool,ampmInClock:z.bool,autoFocus:z.bool,className:z.string,closeOnSelect:z.bool,components:z.object,componentsProps:z.object,dayOfWeekFormatter:z.func,defaultCalendarMonth:z.any,defaultValue:z.any,disabled:z.bool,disableFuture:z.bool,disableHighlightToday:z.bool,disableIgnoringDatePartForTimeValidation:z.bool,disableOpenPicker:z.bool,disablePast:z.bool,displayWeekNumber:z.bool,fixedWeekNumber:z.number,format:z.string,formatDensity:z.oneOf(["dense","spacious"]),inputRef:_C,label:z.node,loading:z.bool,localeText:z.object,maxDate:z.any,maxDateTime:z.any,maxTime:z.any,minDate:z.any,minDateTime:z.any,minTime:z.any,minutesStep:z.number,monthsPerRow:z.oneOf([3,4]),onAccept:z.func,onChange:z.func,onClose:z.func,onError:z.func,onMonthChange:z.func,onOpen:z.func,onSelectedSectionsChange:z.func,onViewChange:z.func,onYearChange:z.func,open:z.bool,openTo:z.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:z.oneOf(["landscape","portrait"]),readOnly:z.bool,reduceAnimations:z.bool,referenceDate:z.any,renderLoading:z.func,selectedSections:z.oneOfType([z.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),z.number,z.shape({endIndex:z.number.isRequired,startIndex:z.number.isRequired})]),shouldDisableClock:z.func,shouldDisableDate:z.func,shouldDisableMonth:z.func,shouldDisableTime:z.func,shouldDisableYear:z.func,showDaysOutsideCurrentMonth:z.bool,skipDisabled:z.bool,slotProps:z.object,slots:z.object,sx:z.oneOfType([z.arrayOf(z.oneOfType([z.func,z.object,z.bool])),z.func,z.object]),thresholdToRenderTimeInASingleColumn:z.number,timeSteps:z.shape({hours:z.number,minutes:z.number,seconds:z.number}),timezone:z.string,value:z.any,view:z.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:z.shape({day:z.func,hours:z.func,meridiem:z.func,minutes:z.func,month:z.func,seconds:z.func,year:z.func}),views:z.arrayOf(z.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsPerRow:z.oneOf([3,4])};const BU=["props","getOpenDialogAriaText"],zU=e=>{var t,n,r;let{props:o,getOpenDialogAriaText:s}=e,a=q(e,BU);const{slots:i,slotProps:l,className:c,sx:u,format:d,formatDensity:f,timezone:b,label:w,inputRef:p,readOnly:S,disabled:h,localeText:g}=o,C=gt(),x=y.useRef(null),T=gr(),v=(t=l==null||(n=l.toolbar)==null?void 0:n.hidden)!=null?t:!1,{open:k,actions:M,layoutProps:$,renderCurrentView:R,fieldProps:E}=fk(m({},a,{props:o,inputRef:x,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),A=i.field,N=ct({elementType:A,externalSlotProps:l==null?void 0:l.field,additionalProps:m({},E,v&&{id:T},!(h||S)&&{onClick:M.onOpen,onKeyDown:$4(M.onOpen)},{readOnly:S??!0,disabled:h,className:c,sx:u,format:d,formatDensity:f,timezone:b,label:w}),ownerState:o});N.inputProps=m({},N.inputProps,{"aria-label":s(E.value,C)});const _=m({textField:i.textField},N.slots),D=(r=i.layout)!=null?r:mk,O=ut(x,N.inputRef,p);let j=T;v&&(w?j=`${T}-label`:j=void 0);const I=m({},l,{toolbar:m({},l==null?void 0:l.toolbar,{titleId:T}),mobilePaper:m({"aria-labelledby":j},l==null?void 0:l.mobilePaper)});return{renderPicker:()=>P.jsxs(XS,{localeText:g,children:[P.jsx(A,m({},N,{slots:_,slotProps:I,inputRef:O})),P.jsx(nV,m({},M,{open:k,slots:i,slotProps:I,children:P.jsx(D,m({},$,I==null?void 0:I.layout,{slots:i,slotProps:I,children:R()}))}))]})}},Ek=y.forwardRef(function(t,n){var r,o,s,a,i;const l=rr(),c=gt(),u=Sk(t,"MuiMobileDateTimePicker"),d=m({day:za,month:za,year:za,hours:Dp,minutes:Dp,seconds:Dp},u.viewRenderers),f=(r=u.ampmInClock)!=null?r:!1,b=m({},u,{viewRenderers:d,format:$k(c,u),ampmInClock:f,slots:m({field:xk},u.slots),slotProps:m({},u.slotProps,{field:p=>{var S;return m({},Cf((S=u.slotProps)==null?void 0:S.field,p),sk(u),{ref:n})},toolbar:m({hidden:!1,ampmInClock:f},(o=u.slotProps)==null?void 0:o.toolbar),tabs:m({hidden:!1},(s=u.slotProps)==null?void 0:s.tabs)})}),{renderPicker:w}=zU({props:b,valueManager:Jn,valueType:"date-time",getOpenDialogAriaText:(a=(i=b.localeText)==null?void 0:i.openDatePickerDialogue)!=null?a:l.openDatePickerDialogue,validator:Jg});return w()});Ek.propTypes={ampm:z.bool,ampmInClock:z.bool,autoFocus:z.bool,className:z.string,closeOnSelect:z.bool,components:z.object,componentsProps:z.object,dayOfWeekFormatter:z.func,defaultCalendarMonth:z.any,defaultValue:z.any,disabled:z.bool,disableFuture:z.bool,disableHighlightToday:z.bool,disableIgnoringDatePartForTimeValidation:z.bool,disableOpenPicker:z.bool,disablePast:z.bool,displayWeekNumber:z.bool,fixedWeekNumber:z.number,format:z.string,formatDensity:z.oneOf(["dense","spacious"]),inputRef:_C,label:z.node,loading:z.bool,localeText:z.object,maxDate:z.any,maxDateTime:z.any,maxTime:z.any,minDate:z.any,minDateTime:z.any,minTime:z.any,minutesStep:z.number,monthsPerRow:z.oneOf([3,4]),onAccept:z.func,onChange:z.func,onClose:z.func,onError:z.func,onMonthChange:z.func,onOpen:z.func,onSelectedSectionsChange:z.func,onViewChange:z.func,onYearChange:z.func,open:z.bool,openTo:z.oneOf(["day","hours","minutes","month","seconds","year"]),orientation:z.oneOf(["landscape","portrait"]),readOnly:z.bool,reduceAnimations:z.bool,referenceDate:z.any,renderLoading:z.func,selectedSections:z.oneOfType([z.oneOf(["all","day","hours","meridiem","minutes","month","seconds","weekDay","year"]),z.number,z.shape({endIndex:z.number.isRequired,startIndex:z.number.isRequired})]),shouldDisableClock:z.func,shouldDisableDate:z.func,shouldDisableMonth:z.func,shouldDisableTime:z.func,shouldDisableYear:z.func,showDaysOutsideCurrentMonth:z.bool,slotProps:z.object,slots:z.object,sx:z.oneOfType([z.arrayOf(z.oneOfType([z.func,z.object,z.bool])),z.func,z.object]),timezone:z.string,value:z.any,view:z.oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:z.shape({day:z.func,hours:z.func,minutes:z.func,month:z.func,seconds:z.func,year:z.func}),views:z.arrayOf(z.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsPerRow:z.oneOf([3,4])};const VU=["desktopModeMediaQuery"],g8=y.forwardRef(function(t,n){const r=ve({props:t,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:o=D4}=r,s=q(r,VU);return aS(o,{defaultMatches:!0})?P.jsx(Dk,m({ref:n},s)):P.jsx(Ek,m({ref:n},s))});var UU={exports:{}};(function(e,t){(function(n,r){e.exports=r(US)})(Ws,function(n){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var o=r(n),s={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(a){var i=["th","st","nd","rd"],l=a%100;return"["+a+(i[(l-20)%10]||i[l]||i[0])+"]"}};return o.default.locale(s,null,!0),s})})(UU);var WU={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ws,function(){var n,r,o=1e3,s=6e4,a=36e5,i=864e5,l=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,c=31536e6,u=2628e6,d=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,f={years:c,months:u,days:i,hours:a,minutes:s,seconds:o,milliseconds:1,weeks:6048e5},b=function(v){return v instanceof x},w=function(v,k,M){return new x(v,M,k.$l)},p=function(v){return r.p(v)+"s"},S=function(v){return v<0},h=function(v){return S(v)?Math.ceil(v):Math.floor(v)},g=function(v){return Math.abs(v)},C=function(v,k){return v?S(v)?{negative:!0,format:""+g(v)+k}:{negative:!1,format:""+v+k}:{negative:!1,format:""}},x=function(){function v(M,$,R){var E=this;if(this.$d={},this.$l=R,M===void 0&&(this.$ms=0,this.parseFromMilliseconds()),$)return w(M*f[p($)],this);if(typeof M=="number")return this.$ms=M,this.parseFromMilliseconds(),this;if(typeof M=="object")return Object.keys(M).forEach(function(_){E.$d[p(_)]=M[_]}),this.calMilliseconds(),this;if(typeof M=="string"){var A=M.match(d);if(A){var N=A.slice(2).map(function(_){return _!=null?Number(_):0});return this.$d.years=N[0],this.$d.months=N[1],this.$d.weeks=N[2],this.$d.days=N[3],this.$d.hours=N[4],this.$d.minutes=N[5],this.$d.seconds=N[6],this.calMilliseconds(),this}}return this}var k=v.prototype;return k.calMilliseconds=function(){var M=this;this.$ms=Object.keys(this.$d).reduce(function($,R){return $+(M.$d[R]||0)*f[R]},0)},k.parseFromMilliseconds=function(){var M=this.$ms;this.$d.years=h(M/c),M%=c,this.$d.months=h(M/u),M%=u,this.$d.days=h(M/i),M%=i,this.$d.hours=h(M/a),M%=a,this.$d.minutes=h(M/s),M%=s,this.$d.seconds=h(M/o),M%=o,this.$d.milliseconds=M},k.toISOString=function(){var M=C(this.$d.years,"Y"),$=C(this.$d.months,"M"),R=+this.$d.days||0;this.$d.weeks&&(R+=7*this.$d.weeks);var E=C(R,"D"),A=C(this.$d.hours,"H"),N=C(this.$d.minutes,"M"),_=this.$d.seconds||0;this.$d.milliseconds&&(_+=this.$d.milliseconds/1e3,_=Math.round(1e3*_)/1e3);var D=C(_,"S"),O=M.negative||$.negative||E.negative||A.negative||N.negative||D.negative,j=A.format||N.format||D.format?"T":"",I=(O?"-":"")+"P"+M.format+$.format+E.format+j+A.format+N.format+D.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(M){var $=M||"YYYY-MM-DDTHH:mm:ss",R={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return $.replace(l,function(E,A){return A||String(R[E])})},k.as=function(M){return this.$ms/f[p(M)]},k.get=function(M){var $=this.$ms,R=p(M);return R==="milliseconds"?$%=1e3:$=R==="weeks"?h($/f[R]):this.$d[R],$||0},k.add=function(M,$,R){var E;return E=$?M*f[p($)]:b(M)?M.$ms:w(M,this).$ms,w(this.$ms+E*(R?-1:1),this)},k.subtract=function(M,$){return this.add(M,$,!0)},k.locale=function(M){var $=this.clone();return $.$l=M,$},k.clone=function(){return w(this.$ms,this)},k.humanize=function(M){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!M)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},v}(),T=function(v,k,M){return v.add(k.years()*M,"y").add(k.months()*M,"M").add(k.days()*M,"d").add(k.hours()*M,"h").add(k.minutes()*M,"m").add(k.seconds()*M,"s").add(k.milliseconds()*M,"ms")};return function(v,k,M){n=M,r=M().$utils(),M.duration=function(E,A){var N=M.locale();return w(E,{$l:N},A)},M.isDuration=b;var $=k.prototype.add,R=k.prototype.subtract;k.prototype.add=function(E,A){return b(E)?T(this,E,1):$.bind(this)(E,A)},k.prototype.subtract=function(E,A){return b(E)?T(this,E,-1):R.bind(this)(E,A)}}})})(WU);var _k={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ws,function(){var n="week",r="year";return function(o,s,a){var i=s.prototype;i.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=a(this).startOf(r).add(1,r).date(c),d=a(this).endOf(n);if(u.isBefore(d))return 1}var f=a(this).startOf(r).date(c).startOf(n).subtract(1,"millisecond"),b=this.diff(f,n,!0);return b<0?a(this).startOf("week").week():Math.ceil(b)},i.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(_k);var HU=_k.exports;const YU=Eo(HU);var Ik={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ws,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d\d/,s=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},l=function(p){return(p=+p)+(p>68?1900:2e3)},c=function(p){return function(S){this[p]=+S}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(S){if(!S||S==="Z")return 0;var h=S.match(/([+-]|\d\d)/g),g=60*h[1]+(+h[2]||0);return g===0?0:h[0]==="+"?-g:g}(p)}],d=function(p){var S=i[p];return S&&(S.indexOf?S:S.s.concat(S.f))},f=function(p,S){var h,g=i.meridiem;if(g){for(var C=1;C<=24;C+=1)if(p.indexOf(g(C,0,S))>-1){h=C>12;break}}else h=p===(S?"pm":"PM");return h},b={A:[a,function(p){this.afternoon=f(p,!1)}],a:[a,function(p){this.afternoon=f(p,!0)}],S:[/\d/,function(p){this.milliseconds=100*+p}],SS:[o,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[o,c("day")],Do:[a,function(p){var S=i.ordinal,h=p.match(/\d+/);if(this.day=h[0],S)for(var g=1;g<=31;g+=1)S(g).replace(/\[|\]/g,"")===p&&(this.day=g)}],M:[s,c("month")],MM:[o,c("month")],MMM:[a,function(p){var S=d("months"),h=(d("monthsShort")||S.map(function(g){return g.slice(0,3)})).indexOf(p)+1;if(h<1)throw new Error;this.month=h%12||h}],MMMM:[a,function(p){var S=d("months").indexOf(p)+1;if(S<1)throw new Error;this.month=S%12||S}],Y:[/[+-]?\d+/,c("year")],YY:[o,function(p){this.year=l(p)}],YYYY:[/\d{4}/,c("year")],Z:u,ZZ:u};function w(p){var S,h;S=p,h=i&&i.formats;for(var g=(p=S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,R,E){var A=E&&E.toUpperCase();return R||h[E]||n[E]||h[A].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(N,_,D){return _||D.slice(1)})})).match(r),C=g.length,x=0;x-1)return new Date((j==="X"?1e3:1)*O);var L=w(j)(O),F=L.year,J=L.month,ie=L.day,ue=L.hours,U=L.minutes,Q=L.seconds,K=L.milliseconds,H=L.zone,oe=new Date,me=ie||(F||J?1:oe.getDate()),ye=F||oe.getFullYear(),ee=0;F&&!J||(ee=J>0?J-1:oe.getMonth());var pe=ue||0,X=U||0,he=Q||0,se=K||0;return H?new Date(Date.UTC(ye,ee,me,pe,X,he,se+60*H.offset*1e3)):I?new Date(Date.UTC(ye,ee,me,pe,X,he,se)):new Date(ye,ee,me,pe,X,he,se)}catch{return new Date("")}}(T,M,v),this.init(),A&&A!==!0&&(this.$L=this.locale(A).$L),E&&T!=this.format(M)&&(this.$d=new Date("")),i={}}else if(M instanceof Array)for(var N=M.length,_=1;_<=N;_+=1){k[1]=M[_-1];var D=h.apply(this,k);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}_===N&&(this.$d=new Date(""))}else C.call(this,x)}}})})(Ik);var KU=Ik.exports;const GU=Eo(KU);var Ok={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ws,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,s){var a=o.prototype,i=a.format;s.en.formats=n,a.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var c=this.$locale().formats,u=function(d,f){return d.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(b,w,p){var S=p&&p.toUpperCase();return w||f[p]||n[p]||f[S].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(h,g,C){return g||C.slice(1)})})}(l,c===void 0?{}:c);return i.call(this,u)}}})})(Ok);var ZU=Ok.exports;const qU=Eo(ZU);var Lk={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Ws,function(){return function(n,r,o){r.prototype.isBetween=function(s,a,i,l){var c=o(s),u=o(a),d=(l=l||"()")[0]==="(",f=l[1]===")";return(d?this.isAfter(c,i):!this.isBefore(c,i))&&(f?this.isBefore(u,i):!this.isAfter(u,i))||(d?this.isBefore(c,i):!this.isAfter(c,i))&&(f?this.isAfter(u,i):!this.isBefore(u,i))}}})})(Lk);var QU=Lk.exports;const XU=Eo(QU);gn.extend(GU);gn.extend(qU);gn.extend(XU);const JU=dk(["Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale"]),eW={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},tW={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",weekday:"dddd",weekdayShort:"ddd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",fullDateWithWeekday:"dddd, LL",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",monthAndYear:"MMMM YYYY",monthAndDate:"MMMM D",fullTime:"LT",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",fullDateTime:"lll",fullDateTime12h:"ll hh:mm A",fullDateTime24h:"ll HH:mm",keyboardDateTime:"L LT",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},Ep=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(` `),Gb=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(` -`),nW=(e,t)=>t?(...n)=>e(...n).locale(t):e;class v8{constructor({locale:t,formats:n,instance:r}={}){var o;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=eW,this.setLocaleToValue=s=>{const a=this.getCurrentLocaleCode();return a===s.locale()?s:s.locale(a)},this.hasUTCPlugin=()=>typeof gn.utc<"u",this.hasTimezonePlugin=()=>typeof gn.tz<"u",this.isSame=(s,a,i)=>{const l=this.setTimezone(a,this.getTimezone(s));return s.format(i)===l.format(i)},this.cleanTimezone=s=>{switch(s){case"default":return;case"system":return gn.tz.guess();default:return s}},this.createSystemDate=s=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(s);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const a=gn.tz.guess();return a!=="UTC"?gn.tz(s,a):gn(s)}return gn(s)},this.createUTCDate=s=>{if(!this.hasUTCPlugin())throw new Error(Ep);return gn.utc(s)},this.createTZDate=(s,a)=>{if(!this.hasUTCPlugin())throw new Error(Ep);if(!this.hasTimezonePlugin())throw new Error(Gb);const i=s!==void 0&&!s.endsWith("Z");return gn(s).tz(this.cleanTimezone(a),i)},this.getLocaleFormats=()=>{const s=gn.Ls,a=this.locale||"en";let i=s[a];return i===void 0&&(JU(),i=s.en),i.formats},this.adjustOffset=s=>{if(!this.hasTimezonePlugin())return s;const a=this.getTimezone(s);if(a!=="UTC"){var i,l;const c=s.tz(this.cleanTimezone(a),!0);return((i=c.$offset)!=null?i:0)===((l=s.$offset)!=null?l:0)?s:c}return s},this.date=s=>s===null?null:this.dayjs(s),this.dateWithTimezone=(s,a)=>{if(s===null)return null;let i;return a==="UTC"?i=this.createUTCDate(s):a==="system"||a==="default"&&!this.hasTimezonePlugin()?i=this.createSystemDate(s):i=this.createTZDate(s,a),this.locale===void 0?i:i.locale(this.locale)},this.getTimezone=s=>{if(this.hasTimezonePlugin()){var a;const i=(a=s.$x)==null?void 0:a.$timezone;if(i)return i}return this.hasUTCPlugin()&&s.isUTC()?"UTC":"system"},this.setTimezone=(s,a)=>{if(this.getTimezone(s)===a)return s;if(a==="UTC"){if(!this.hasUTCPlugin())throw new Error(Ep);return s.utc()}if(a==="system")return s.local();if(!this.hasTimezonePlugin()){if(a==="default")return s;throw new Error(Gb)}return gn.tz(s,this.cleanTimezone(a))},this.toJsDate=s=>s.toDate(),this.parseISO=s=>this.dayjs(s),this.toISO=s=>s.toISOString(),this.parse=(s,a)=>s===""?null:this.dayjs(s,a,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=s=>{const a=this.getLocaleFormats(),i=l=>l.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(c,u,d)=>u||d.slice(1));return s.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(l,c,u)=>{const d=u&&u.toUpperCase();return c||a[u]||i(a[d])})},this.getFormatHelperText=s=>this.expandFormat(s).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=s=>s===null,this.isValid=s=>this.dayjs(s).isValid(),this.format=(s,a)=>this.formatByString(s,this.formats[a]),this.formatByString=(s,a)=>this.dayjs(s).format(a),this.formatNumber=s=>s,this.getDiff=(s,a,i)=>s.diff(a,i),this.isEqual=(s,a)=>s===null&&a===null?!0:this.dayjs(s).toDate().getTime()===this.dayjs(a).toDate().getTime(),this.isSameYear=(s,a)=>this.isSame(s,a,"YYYY"),this.isSameMonth=(s,a)=>this.isSame(s,a,"YYYY-MM"),this.isSameDay=(s,a)=>this.isSame(s,a,"YYYY-MM-DD"),this.isSameHour=(s,a)=>s.isSame(a,"hour"),this.isAfter=(s,a)=>s>a,this.isAfterYear=(s,a)=>this.hasUTCPlugin()?!this.isSameYear(s,a)&&s.utc()>a.utc():s.isAfter(a,"year"),this.isAfterDay=(s,a)=>this.hasUTCPlugin()?!this.isSameDay(s,a)&&s.utc()>a.utc():s.isAfter(a,"day"),this.isBefore=(s,a)=>sthis.hasUTCPlugin()?!this.isSameYear(s,a)&&s.utc()this.hasUTCPlugin()?!this.isSameDay(s,a)&&s.utc()s>=a&&s<=i,this.startOfYear=s=>this.adjustOffset(s.startOf("year")),this.startOfMonth=s=>this.adjustOffset(s.startOf("month")),this.startOfWeek=s=>this.adjustOffset(s.startOf("week")),this.startOfDay=s=>this.adjustOffset(s.startOf("day")),this.endOfYear=s=>this.adjustOffset(s.endOf("year")),this.endOfMonth=s=>this.adjustOffset(s.endOf("month")),this.endOfWeek=s=>this.adjustOffset(s.endOf("week")),this.endOfDay=s=>this.adjustOffset(s.endOf("day")),this.addYears=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"year"):s.add(a,"year")),this.addMonths=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"month"):s.add(a,"month")),this.addWeeks=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"week"):s.add(a,"week")),this.addDays=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"day"):s.add(a,"day")),this.addHours=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"hour"):s.add(a,"hour")),this.addMinutes=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"minute"):s.add(a,"minute")),this.addSeconds=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"second"):s.add(a,"second")),this.getYear=s=>s.year(),this.getMonth=s=>s.month(),this.getDate=s=>s.date(),this.getHours=s=>s.hour(),this.getMinutes=s=>s.minute(),this.getSeconds=s=>s.second(),this.getMilliseconds=s=>s.millisecond(),this.setYear=(s,a)=>this.adjustOffset(s.set("year",a)),this.setMonth=(s,a)=>this.adjustOffset(s.set("month",a)),this.setDate=(s,a)=>this.adjustOffset(s.set("date",a)),this.setHours=(s,a)=>this.adjustOffset(s.set("hour",a)),this.setMinutes=(s,a)=>this.adjustOffset(s.set("minute",a)),this.setSeconds=(s,a)=>this.adjustOffset(s.set("second",a)),this.setMilliseconds=(s,a)=>this.adjustOffset(s.set("millisecond",a)),this.getDaysInMonth=s=>s.daysInMonth(),this.getNextMonth=s=>this.addMonths(s,1),this.getPreviousMonth=s=>this.addMonths(s,-1),this.getMonthArray=s=>{const i=[s.startOf("year")];for(;i.length<12;){const l=i[i.length-1];i.push(this.addMonths(l,1))}return i},this.mergeDateAndTime=(s,a)=>s.hour(a.hour()).minute(a.minute()).second(a.second()),this.getWeekdays=()=>{const s=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map(a=>this.formatByString(this.addDays(s,a),"dd"))},this.getWeekArray=s=>{const a=this.setLocaleToValue(s),i=a.startOf("month").startOf("week"),l=a.endOf("month").endOf("week");let c=0,u=i;const d=[];for(;us.week(),this.getYearRange=(s,a)=>{const i=s.startOf("year"),l=a.endOf("year"),c=[];let u=i;for(;us==="am"?"AM":"PM",this.rawDayJsInstance=r,this.dayjs=nW((o=this.rawDayJsInstance)!=null?o:gn,t),this.locale=t,this.formats=m({},tW,n),gn.extend(YU)}}var pt;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const a of o)s[a]=a;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(i=>typeof o[o[i]]!="number"),a={};for(const i of s)a[i]=o[i];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&s.push(a);return s},e.find=(o,s)=>{for(const a of o)if(s(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(pt||(pt={}));var em;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(em||(em={}));const Fe=pt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Wo=e=>{switch(typeof e){case"undefined":return Fe.undefined;case"string":return Fe.string;case"number":return isNaN(e)?Fe.nan:Fe.number;case"boolean":return Fe.boolean;case"function":return Fe.function;case"bigint":return Fe.bigint;case"symbol":return Fe.symbol;case"object":return Array.isArray(e)?Fe.array:e===null?Fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Fe.promise:typeof Map<"u"&&e instanceof Map?Fe.map:typeof Set<"u"&&e instanceof Set?Fe.set:typeof Date<"u"&&e instanceof Date?Fe.date:Fe.object;default:return Fe.unknown}},Me=pt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),rW=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Er extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let i=r,l=0;for(;ln.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Er.create=e=>new Er(e);const Ul=(e,t)=>{let n;switch(e.code){case Me.invalid_type:e.received===Fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,pt.jsonStringifyReplacer)}`;break;case Me.unrecognized_keys:n=`Unrecognized key(s) in object: ${pt.joinValues(e.keys,", ")}`;break;case Me.invalid_union:n="Invalid input";break;case Me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${pt.joinValues(e.options)}`;break;case Me.invalid_enum_value:n=`Invalid enum value. Expected ${pt.joinValues(e.options)}, received '${e.received}'`;break;case Me.invalid_arguments:n="Invalid function arguments";break;case Me.invalid_return_type:n="Invalid function return type";break;case Me.invalid_date:n="Invalid date";break;case Me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:pt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Me.custom:n="Invalid input";break;case Me.invalid_intersection_types:n="Intersection results could not be merged";break;case Me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Me.not_finite:n="Number must be finite";break;default:n=t.defaultError,pt.assertNever(e)}return{message:n}};let Ak=Ul;function oW(e){Ak=e}function cd(){return Ak}const ud=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],a={...o,path:s};let i="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)i=c(a,{data:t,defaultError:i}).message;return{...o,path:s,message:o.message||i}},sW=[];function ze(e,t){const n=ud({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,cd(),Ul].filter(r=>!!r)});e.common.issues.push(n)}class xn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Qe;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n)r.push({key:await o.key,value:await o.value});return xn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:a}=o;if(s.status==="aborted"||a.status==="aborted")return Qe;s.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[s.value]=a.value)}return{status:t.value,value:r}}}const Qe=Object.freeze({status:"aborted"}),Nk=e=>({status:"dirty",value:e}),Tn=e=>({status:"valid",value:e}),tm=e=>e.status==="aborted",nm=e=>e.status==="dirty",Wl=e=>e.status==="valid",dd=e=>typeof Promise<"u"&&e instanceof Promise;var Ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ke||(Ke={}));class ao{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Zb=(e,t)=>{if(Wl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Er(e.common.issues);return this._error=n,this._error}}};function Je(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,i)=>a.code!=="invalid_type"?{message:i.defaultError}:typeof i.data>"u"?{message:r??i.defaultError}:{message:n??i.defaultError},description:o}}class rt{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Wo(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new xn,ctx:{common:t.parent.common,data:t.data,parsedType:Wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(dd(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Wo(t)},s=this._parseSync({data:t,path:o.path,parent:o});return Zb(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Wo(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(dd(o)?o:Promise.resolve(o));return Zb(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const a=t(o),i=()=>s.addIssue({code:Me.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(i(),!1)):a?!0:(i(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Lr({schema:this,typeName:Ze.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return yo.create(this,this._def)}nullable(){return Us.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _r.create(this,this._def)}promise(){return li.create(this,this._def)}or(t){return Gl.create([this,t],this._def)}and(t){return Zl.create(this,t,this._def)}transform(t){return new Lr({...Je(this._def),schema:this,typeName:Ze.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ec({...Je(this._def),innerType:this,defaultValue:n,typeName:Ze.ZodDefault})}brand(){return new Fk({typeName:Ze.ZodBranded,type:this,...Je(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new md({...Je(this._def),innerType:this,catchValue:n,typeName:Ze.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Cc.create(this,t)}readonly(){return vd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const aW=/^c[^\s-]{8,}$/i,iW=/^[a-z][a-z0-9]*$/,lW=/^[0-9A-HJKMNP-TV-Z]{26}$/,cW=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,uW=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,dW="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _p;const fW=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,pW=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,hW=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function mW(e,t){return!!((t==="v4"||!t)&&fW.test(e)||(t==="v6"||!t)&&pW.test(e))}class Rr extends rt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Fe.string){const s=this._getOrReturnCtx(t);return ze(s,{code:Me.invalid_type,expected:Fe.string,received:s.parsedType}),Qe}const r=new xn;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.lengths.value&&(o=this._getOrReturnCtx(t,o),ze(o,{code:Me.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=t.data.length>s.value,i=t.data.lengtht.test(o),{validation:n,code:Me.invalid_string,...Ke.errToObj(r)})}_addCheck(t){return new Rr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ke.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Ke.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ke.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ke.errToObj(n)})}nonempty(t){return this.min(1,Ke.errToObj(t))}trim(){return new Rr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Rr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Rr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Rr({checks:[],typeName:Ze.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Je(e)})};function gW(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return s%a/Math.pow(10,o)}class ss extends rt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Fe.number){const s=this._getOrReturnCtx(t);return ze(s,{code:Me.invalid_type,expected:Fe.number,received:s.parsedType}),Qe}let r;const o=new xn;for(const s of this._def.checks)s.kind==="int"?pt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.datas.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?gW(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.not_finite,message:s.message}),o.dirty()):pt.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ke.toString(n))}setLimit(t,n,r,o){return new ss({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ke.toString(o)}]})}_addCheck(t){return new ss({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ke.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&pt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew ss({checks:[],typeName:Ze.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Je(e)});class as extends rt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Fe.bigint){const s=this._getOrReturnCtx(t);return ze(s,{code:Me.invalid_type,expected:Fe.bigint,received:s.parsedType}),Qe}let r;const o=new xn;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.datas.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):pt.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ke.toString(n))}setLimit(t,n,r,o){return new as({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ke.toString(o)}]})}_addCheck(t){return new as({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ke.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new as({checks:[],typeName:Ze.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Je(e)})};class Hl extends rt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Fe.boolean){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.boolean,received:r.parsedType}),Qe}return Tn(t.data)}}Hl.create=e=>new Hl({typeName:Ze.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Je(e)});class zs extends rt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Fe.date){const s=this._getOrReturnCtx(t);return ze(s,{code:Me.invalid_type,expected:Fe.date,received:s.parsedType}),Qe}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ze(s,{code:Me.invalid_date}),Qe}const r=new xn;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()s.value&&(o=this._getOrReturnCtx(t,o),ze(o,{code:Me.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):pt.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new zs({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ke.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew zs({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ze.ZodDate,...Je(e)});class fd extends rt{_parse(t){if(this._getType(t)!==Fe.symbol){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.symbol,received:r.parsedType}),Qe}return Tn(t.data)}}fd.create=e=>new fd({typeName:Ze.ZodSymbol,...Je(e)});class Yl extends rt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.undefined,received:r.parsedType}),Qe}return Tn(t.data)}}Yl.create=e=>new Yl({typeName:Ze.ZodUndefined,...Je(e)});class Kl extends rt{_parse(t){if(this._getType(t)!==Fe.null){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.null,received:r.parsedType}),Qe}return Tn(t.data)}}Kl.create=e=>new Kl({typeName:Ze.ZodNull,...Je(e)});class ii extends rt{constructor(){super(...arguments),this._any=!0}_parse(t){return Tn(t.data)}}ii.create=e=>new ii({typeName:Ze.ZodAny,...Je(e)});class Es extends rt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Tn(t.data)}}Es.create=e=>new Es({typeName:Ze.ZodUnknown,...Je(e)});class Do extends rt{_parse(t){const n=this._getOrReturnCtx(t);return ze(n,{code:Me.invalid_type,expected:Fe.never,received:n.parsedType}),Qe}}Do.create=e=>new Do({typeName:Ze.ZodNever,...Je(e)});class pd extends rt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.void,received:r.parsedType}),Qe}return Tn(t.data)}}pd.create=e=>new pd({typeName:Ze.ZodVoid,...Je(e)});class _r extends rt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Fe.array)return ze(n,{code:Me.invalid_type,expected:Fe.array,received:n.parsedType}),Qe;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,i=n.data.lengtho.maxLength.value&&(ze(n,{code:Me.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,i)=>o.type._parseAsync(new ao(n,a,n.path,i)))).then(a=>xn.mergeArray(r,a));const s=[...n.data].map((a,i)=>o.type._parseSync(new ao(n,a,n.path,i)));return xn.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new _r({...this._def,minLength:{value:t,message:Ke.toString(n)}})}max(t,n){return new _r({...this._def,maxLength:{value:t,message:Ke.toString(n)}})}length(t,n){return new _r({...this._def,exactLength:{value:t,message:Ke.toString(n)}})}nonempty(t){return this.min(1,t)}}_r.create=(e,t)=>new _r({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ze.ZodArray,...Je(t)});function ua(e){if(e instanceof At){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=yo.create(ua(r))}return new At({...e._def,shape:()=>t})}else return e instanceof _r?new _r({...e._def,type:ua(e.element)}):e instanceof yo?yo.create(ua(e.unwrap())):e instanceof Us?Us.create(ua(e.unwrap())):e instanceof io?io.create(e.items.map(t=>ua(t))):e}class At extends rt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=pt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Fe.object){const c=this._getOrReturnCtx(t);return ze(c,{code:Me.invalid_type,expected:Fe.object,received:c.parsedType}),Qe}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof Do&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||i.push(c);const l=[];for(const c of a){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ao(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Do){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of i)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")i.length>0&&(ze(o,{code:Me.unrecognized_keys,keys:i}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of i){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ao(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key;c.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>xn.mergeObjectSync(r,c)):xn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ke.errToObj,new At({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,a,i;const l=(a=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(i=Ke.errToObj(t).message)!==null&&i!==void 0?i:l}:{message:l}}}:{}})}strip(){return new At({...this._def,unknownKeys:"strip"})}passthrough(){return new At({...this._def,unknownKeys:"passthrough"})}extend(t){return new At({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new At({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ze.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new At({...this._def,catchall:t})}pick(t){const n={};return pt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}omit(t){const n={};return pt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}deepPartial(){return ua(this)}partial(t){const n={};return pt.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new At({...this._def,shape:()=>n})}required(t){const n={};return pt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof yo;)s=s._def.innerType;n[r]=s}}),new At({...this._def,shape:()=>n})}keyof(){return jk(pt.objectKeys(this.shape))}}At.create=(e,t)=>new At({shape:()=>e,unknownKeys:"strip",catchall:Do.create(),typeName:Ze.ZodObject,...Je(t)});At.strictCreate=(e,t)=>new At({shape:()=>e,unknownKeys:"strict",catchall:Do.create(),typeName:Ze.ZodObject,...Je(t)});At.lazycreate=(e,t)=>new At({shape:e,unknownKeys:"strip",catchall:Do.create(),typeName:Ze.ZodObject,...Je(t)});class Gl extends rt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const i of s)if(i.result.status==="valid")return i.result;for(const i of s)if(i.result.status==="dirty")return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(i=>new Er(i.ctx.common.issues));return ze(n,{code:Me.invalid_union,unionErrors:a}),Qe}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let s;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const i=a.map(l=>new Er(l));return ze(n,{code:Me.invalid_union,unionErrors:i}),Qe}}get options(){return this._def.options}}Gl.create=(e,t)=>new Gl({options:e,typeName:Ze.ZodUnion,...Je(t)});const Cu=e=>e instanceof Ql?Cu(e.schema):e instanceof Lr?Cu(e.innerType()):e instanceof Xl?[e.value]:e instanceof is?e.options:e instanceof Jl?Object.keys(e.enum):e instanceof ec?Cu(e._def.innerType):e instanceof Yl?[void 0]:e instanceof Kl?[null]:null;class jf extends rt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Fe.object)return ze(n,{code:Me.invalid_type,expected:Fe.object,received:n.parsedType}),Qe;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ze(n,{code:Me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Qe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const a=Cu(s.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const i of a){if(o.has(i))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(i)}`);o.set(i,s)}}return new jf({typeName:Ze.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Je(r)})}}function rm(e,t){const n=Wo(e),r=Wo(t);if(e===t)return{valid:!0,data:e};if(n===Fe.object&&r===Fe.object){const o=pt.objectKeys(t),s=pt.objectKeys(e).filter(i=>o.indexOf(i)!==-1),a={...e,...t};for(const i of s){const l=rm(e[i],t[i]);if(!l.valid)return{valid:!1};a[i]=l.data}return{valid:!0,data:a}}else if(n===Fe.array&&r===Fe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s{if(tm(s)||tm(a))return Qe;const i=rm(s.value,a.value);return i.valid?((nm(s)||nm(a))&&n.dirty(),{status:n.value,value:i.data}):(ze(r,{code:Me.invalid_intersection_types}),Qe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>o(s,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Zl.create=(e,t,n)=>new Zl({left:e,right:t,typeName:Ze.ZodIntersection,...Je(n)});class io extends rt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.array)return ze(r,{code:Me.invalid_type,expected:Fe.array,received:r.parsedType}),Qe;if(r.data.lengththis._def.items.length&&(ze(r,{code:Me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,i)=>{const l=this._def.items[i]||this._def.rest;return l?l._parse(new ao(r,a,r.path,i)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>xn.mergeArray(n,a)):xn.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new io({...this._def,rest:t})}}io.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new io({items:e,typeName:Ze.ZodTuple,rest:null,...Je(t)})};class ql extends rt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.object)return ze(r,{code:Me.invalid_type,expected:Fe.object,received:r.parsedType}),Qe;const o=[],s=this._def.keyType,a=this._def.valueType;for(const i in r.data)o.push({key:s._parse(new ao(r,i,r.path,i)),value:a._parse(new ao(r,r.data[i],r.path,i))});return r.common.async?xn.mergeObjectAsync(n,o):xn.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof rt?new ql({keyType:t,valueType:n,typeName:Ze.ZodRecord,...Je(r)}):new ql({keyType:Rr.create(),valueType:t,typeName:Ze.ZodRecord,...Je(n)})}}class hd extends rt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.map)return ze(r,{code:Me.invalid_type,expected:Fe.map,received:r.parsedType}),Qe;const o=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([i,l],c)=>({key:o._parse(new ao(r,i,r.path,[c,"key"])),value:s._parse(new ao(r,l,r.path,[c,"value"]))}));if(r.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Qe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),i.set(c.value,u.value)}return{status:n.value,value:i}})}else{const i=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Qe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),i.set(c.value,u.value)}return{status:n.value,value:i}}}}hd.create=(e,t,n)=>new hd({valueType:t,keyType:e,typeName:Ze.ZodMap,...Je(n)});class Vs extends rt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.set)return ze(r,{code:Me.invalid_type,expected:Fe.set,received:r.parsedType}),Qe;const o=this._def;o.minSize!==null&&r.data.sizeo.maxSize.value&&(ze(r,{code:Me.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Qe;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const i=[...r.data.values()].map((l,c)=>s._parse(new ao(r,l,r.path,c)));return r.common.async?Promise.all(i).then(l=>a(l)):a(i)}min(t,n){return new Vs({...this._def,minSize:{value:t,message:Ke.toString(n)}})}max(t,n){return new Vs({...this._def,maxSize:{value:t,message:Ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Vs.create=(e,t)=>new Vs({valueType:e,minSize:null,maxSize:null,typeName:Ze.ZodSet,...Je(t)});class Va extends rt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Fe.function)return ze(n,{code:Me.invalid_type,expected:Fe.function,received:n.parsedType}),Qe;function r(i,l){return ud({data:i,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cd(),Ul].filter(c=>!!c),issueData:{code:Me.invalid_arguments,argumentsError:l}})}function o(i,l){return ud({data:i,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cd(),Ul].filter(c=>!!c),issueData:{code:Me.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof li){const i=this;return Tn(async function(...l){const c=new Er([]),u=await i._def.args.parseAsync(l,s).catch(b=>{throw c.addIssue(r(l,b)),c}),d=await Reflect.apply(a,this,u);return await i._def.returns._def.type.parseAsync(d,s).catch(b=>{throw c.addIssue(o(d,b)),c})})}else{const i=this;return Tn(function(...l){const c=i._def.args.safeParse(l,s);if(!c.success)throw new Er([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=i._def.returns.safeParse(u,s);if(!d.success)throw new Er([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Va({...this._def,args:io.create(t).rest(Es.create())})}returns(t){return new Va({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Va({args:t||io.create([]).rest(Es.create()),returns:n||Es.create(),typeName:Ze.ZodFunction,...Je(r)})}}class Ql extends rt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Ql.create=(e,t)=>new Ql({getter:e,typeName:Ze.ZodLazy,...Je(t)});class Xl extends rt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ze(n,{received:n.data,code:Me.invalid_literal,expected:this._def.value}),Qe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Xl.create=(e,t)=>new Xl({value:e,typeName:Ze.ZodLiteral,...Je(t)});function jk(e,t){return new is({values:e,typeName:Ze.ZodEnum,...Je(t)})}class is extends rt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ze(n,{expected:pt.joinValues(r),received:n.parsedType,code:Me.invalid_type}),Qe}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ze(n,{received:n.data,code:Me.invalid_enum_value,options:r}),Qe}return Tn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return is.create(t)}exclude(t){return is.create(this.options.filter(n=>!t.includes(n)))}}is.create=jk;class Jl extends rt{_parse(t){const n=pt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Fe.string&&r.parsedType!==Fe.number){const o=pt.objectValues(n);return ze(r,{expected:pt.joinValues(o),received:r.parsedType,code:Me.invalid_type}),Qe}if(n.indexOf(t.data)===-1){const o=pt.objectValues(n);return ze(r,{received:r.data,code:Me.invalid_enum_value,options:o}),Qe}return Tn(t.data)}get enum(){return this._def.values}}Jl.create=(e,t)=>new Jl({values:e,typeName:Ze.ZodNativeEnum,...Je(t)});class li extends rt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Fe.promise&&n.common.async===!1)return ze(n,{code:Me.invalid_type,expected:Fe.promise,received:n.parsedType}),Qe;const r=n.parsedType===Fe.promise?n.data:Promise.resolve(n.data);return Tn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}li.create=(e,t)=>new li({type:e,typeName:Ze.ZodPromise,...Je(t)});class Lr extends rt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:a=>{ze(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const a=o.transform(r.data,s);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(i=>this._def.schema._parseAsync({data:i,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(o.type==="refinement"){const a=i=>{const l=o.refinement(i,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Qe:(i.status==="dirty"&&n.dirty(),a(i.value),{status:n.value,value:i.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>i.status==="aborted"?Qe:(i.status==="dirty"&&n.dirty(),a(i.value).then(()=>({status:n.value,value:i.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Wl(a))return a;const i=o.transform(a.value,s);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:i}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Wl(a)?Promise.resolve(o.transform(a.value,s)).then(i=>({status:n.value,value:i})):a);pt.assertNever(o)}}Lr.create=(e,t,n)=>new Lr({schema:e,typeName:Ze.ZodEffects,effect:t,...Je(n)});Lr.createWithPreprocess=(e,t,n)=>new Lr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ze.ZodEffects,...Je(n)});class yo extends rt{_parse(t){return this._getType(t)===Fe.undefined?Tn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}yo.create=(e,t)=>new yo({innerType:e,typeName:Ze.ZodOptional,...Je(t)});class Us extends rt{_parse(t){return this._getType(t)===Fe.null?Tn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Us.create=(e,t)=>new Us({innerType:e,typeName:Ze.ZodNullable,...Je(t)});class ec extends rt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ec.create=(e,t)=>new ec({innerType:e,typeName:Ze.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Je(t)});class md extends rt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return dd(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Er(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Er(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}md.create=(e,t)=>new md({innerType:e,typeName:Ze.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Je(t)});class gd extends rt{_parse(t){if(this._getType(t)!==Fe.nan){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.nan,received:r.parsedType}),Qe}return{status:"valid",value:t.data}}}gd.create=e=>new gd({typeName:Ze.ZodNaN,...Je(e)});const vW=Symbol("zod_brand");class Fk extends rt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Cc extends rt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Qe:s.status==="dirty"?(n.dirty(),Nk(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Qe:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Cc({in:t,out:n,typeName:Ze.ZodPipeline})}}class vd extends rt{_parse(t){const n=this._def.innerType._parse(t);return Wl(n)&&(n.value=Object.freeze(n.value)),n}}vd.create=(e,t)=>new vd({innerType:e,typeName:Ze.ZodReadonly,...Je(t)});const Bk=(e,t={},n)=>e?ii.create().superRefine((r,o)=>{var s,a;if(!e(r)){const i=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(a=(s=i.fatal)!==null&&s!==void 0?s:n)!==null&&a!==void 0?a:!0,c=typeof i=="string"?{message:i}:i;o.addIssue({code:"custom",...c,fatal:l})}}):ii.create(),yW={object:At.lazycreate};var Ze;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ze||(Ze={}));const bW=(e,t={message:`Input not instance of ${e.name}`})=>Bk(n=>n instanceof e,t),zk=Rr.create,Vk=ss.create,xW=gd.create,CW=as.create,Uk=Hl.create,wW=zs.create,SW=fd.create,kW=Yl.create,TW=Kl.create,PW=ii.create,MW=Es.create,RW=Do.create,$W=pd.create,DW=_r.create,EW=At.create,_W=At.strictCreate,IW=Gl.create,OW=jf.create,LW=Zl.create,AW=io.create,NW=ql.create,jW=hd.create,FW=Vs.create,BW=Va.create,zW=Ql.create,VW=Xl.create,UW=is.create,WW=Jl.create,HW=li.create,qb=Lr.create,YW=yo.create,KW=Us.create,GW=Lr.createWithPreprocess,ZW=Cc.create,qW=()=>zk().optional(),QW=()=>Vk().optional(),XW=()=>Uk().optional(),JW={string:e=>Rr.create({...e,coerce:!0}),number:e=>ss.create({...e,coerce:!0}),boolean:e=>Hl.create({...e,coerce:!0}),bigint:e=>as.create({...e,coerce:!0}),date:e=>zs.create({...e,coerce:!0})},eH=Qe;var y8=Object.freeze({__proto__:null,defaultErrorMap:Ul,setErrorMap:oW,getErrorMap:cd,makeIssue:ud,EMPTY_PATH:sW,addIssueToContext:ze,ParseStatus:xn,INVALID:Qe,DIRTY:Nk,OK:Tn,isAborted:tm,isDirty:nm,isValid:Wl,isAsync:dd,get util(){return pt},get objectUtil(){return em},ZodParsedType:Fe,getParsedType:Wo,ZodType:rt,ZodString:Rr,ZodNumber:ss,ZodBigInt:as,ZodBoolean:Hl,ZodDate:zs,ZodSymbol:fd,ZodUndefined:Yl,ZodNull:Kl,ZodAny:ii,ZodUnknown:Es,ZodNever:Do,ZodVoid:pd,ZodArray:_r,ZodObject:At,ZodUnion:Gl,ZodDiscriminatedUnion:jf,ZodIntersection:Zl,ZodTuple:io,ZodRecord:ql,ZodMap:hd,ZodSet:Vs,ZodFunction:Va,ZodLazy:Ql,ZodLiteral:Xl,ZodEnum:is,ZodNativeEnum:Jl,ZodPromise:li,ZodEffects:Lr,ZodTransformer:Lr,ZodOptional:yo,ZodNullable:Us,ZodDefault:ec,ZodCatch:md,ZodNaN:gd,BRAND:vW,ZodBranded:Fk,ZodPipeline:Cc,ZodReadonly:vd,custom:Bk,Schema:rt,ZodSchema:rt,late:yW,get ZodFirstPartyTypeKind(){return Ze},coerce:JW,any:PW,array:DW,bigint:CW,boolean:Uk,date:wW,discriminatedUnion:OW,effect:qb,enum:UW,function:BW,instanceof:bW,intersection:LW,lazy:zW,literal:VW,map:jW,nan:xW,nativeEnum:WW,never:RW,null:TW,nullable:KW,number:Vk,object:EW,oboolean:XW,onumber:QW,optional:YW,ostring:qW,pipeline:ZW,preprocess:GW,promise:HW,record:NW,set:FW,strictObject:_W,string:zk,symbol:SW,transformer:qb,tuple:AW,undefined:kW,union:IW,unknown:MW,void:$W,NEVER:eH,ZodIssueCode:Me,quotelessJson:rW,ZodError:Er});export{Fr as $,wH as A,YL as B,f8 as C,g8 as D,$H as E,FN as F,FH as G,WH as H,Dn as I,uH as J,mR as K,XS as L,Df as M,oH as N,Xj as O,TH as P,OS as Q,ur as R,qH as S,sn as T,Ta as U,sH as V,fH as W,lH as X,j5 as Y,db as Z,zR as _,kH as a,Qn as a$,u8 as a0,ZB as a1,d8 as a2,Xt as a3,dH as a4,FS as a5,rH as a6,gc as a7,oi as a8,vI as a9,e8 as aA,i8 as aB,t8 as aC,c8 as aD,IH as aE,GH as aF,KH as aG,LH as aH,jH as aI,NH as aJ,AH as aK,jh as aL,s_ as aM,be as aN,Ce as aO,V as aP,m as aQ,We as aR,q as aS,Zt as aT,xe as aU,ve as aV,hi as aW,yn as aX,Ie as aY,pc as aZ,mi as a_,Hg as aa,Bg as ab,fz as ac,zz as ad,f5 as ae,id as af,y5 as ag,bz as ah,p8 as ai,MH as aj,LF as ak,Ro as al,Mo as am,EH as an,_H as ao,Eo as ap,qR as aq,n8 as ar,tH as as,a8 as at,OH as au,vH as av,Ws as aw,BH as ax,xH as ay,RH as az,aH as b,ut as b0,Eg as b1,St as b2,ne as b3,gr as b4,ZH as b5,z as b6,pN as b7,Ew as b8,Ft as b9,GA as bA,Dg as bB,yH as bC,Ug as ba,lN as bb,ul as bc,bN as bd,aS as be,xu as bf,CH as bg,QH as bh,bH as bi,SH as bj,HH as bk,VH as bl,zH as bm,s8 as bn,PH as bo,gH as bp,mH as bq,Od as br,Fc as bs,o8 as bt,l8 as bu,DH as bv,YH as bw,UH as bx,r8 as by,JH as bz,js as c,hH as d,h8 as e,nH as f,HR as g,m8 as h,pC as i,P as j,v8 as k,XH as l,Jw as m,dS as n,Ef as o,Tw as p,pH as q,y as r,gn as s,cH as t,vR as u,av as v,LE as w,iH as x,gR as y,y8 as z}; +`),nW=(e,t)=>t?(...n)=>e(...n).locale(t):e;class v8{constructor({locale:t,formats:n,instance:r}={}){var o;this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.rawDayJsInstance=void 0,this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=eW,this.setLocaleToValue=s=>{const a=this.getCurrentLocaleCode();return a===s.locale()?s:s.locale(a)},this.hasUTCPlugin=()=>typeof gn.utc<"u",this.hasTimezonePlugin=()=>typeof gn.tz<"u",this.isSame=(s,a,i)=>{const l=this.setTimezone(a,this.getTimezone(s));return s.format(i)===l.format(i)},this.cleanTimezone=s=>{switch(s){case"default":return;case"system":return gn.tz.guess();default:return s}},this.createSystemDate=s=>{if(this.rawDayJsInstance)return this.rawDayJsInstance(s);if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const a=gn.tz.guess();return a!=="UTC"?gn.tz(s,a):gn(s)}return gn(s)},this.createUTCDate=s=>{if(!this.hasUTCPlugin())throw new Error(Ep);return gn.utc(s)},this.createTZDate=(s,a)=>{if(!this.hasUTCPlugin())throw new Error(Ep);if(!this.hasTimezonePlugin())throw new Error(Gb);const i=s!==void 0&&!s.endsWith("Z");return gn(s).tz(this.cleanTimezone(a),i)},this.getLocaleFormats=()=>{const s=gn.Ls,a=this.locale||"en";let i=s[a];return i===void 0&&(JU(),i=s.en),i.formats},this.adjustOffset=s=>{if(!this.hasTimezonePlugin())return s;const a=this.getTimezone(s);if(a!=="UTC"){var i,l;const c=s.tz(this.cleanTimezone(a),!0);return((i=c.$offset)!=null?i:0)===((l=s.$offset)!=null?l:0)?s:c}return s},this.date=s=>s===null?null:this.dayjs(s),this.dateWithTimezone=(s,a)=>{if(s===null)return null;let i;return a==="UTC"?i=this.createUTCDate(s):a==="system"||a==="default"&&!this.hasTimezonePlugin()?i=this.createSystemDate(s):i=this.createTZDate(s,a),this.locale===void 0?i:i.locale(this.locale)},this.getTimezone=s=>{if(this.hasTimezonePlugin()){var a;const i=(a=s.$x)==null?void 0:a.$timezone;if(i)return i}return this.hasUTCPlugin()&&s.isUTC()?"UTC":"system"},this.setTimezone=(s,a)=>{if(this.getTimezone(s)===a)return s;if(a==="UTC"){if(!this.hasUTCPlugin())throw new Error(Ep);return s.utc()}if(a==="system")return s.local();if(!this.hasTimezonePlugin()){if(a==="default")return s;throw new Error(Gb)}return gn.tz(s,this.cleanTimezone(a))},this.toJsDate=s=>s.toDate(),this.parseISO=s=>this.dayjs(s),this.toISO=s=>s.toISOString(),this.parse=(s,a)=>s===""?null:this.dayjs(s,a,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=s=>{const a=this.getLocaleFormats(),i=l=>l.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(c,u,d)=>u||d.slice(1));return s.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(l,c,u)=>{const d=u&&u.toUpperCase();return c||a[u]||i(a[d])})},this.getFormatHelperText=s=>this.expandFormat(s).replace(/a/gi,"(a|p)m").toLocaleLowerCase(),this.isNull=s=>s===null,this.isValid=s=>this.dayjs(s).isValid(),this.format=(s,a)=>this.formatByString(s,this.formats[a]),this.formatByString=(s,a)=>this.dayjs(s).format(a),this.formatNumber=s=>s,this.getDiff=(s,a,i)=>s.diff(a,i),this.isEqual=(s,a)=>s===null&&a===null?!0:this.dayjs(s).toDate().getTime()===this.dayjs(a).toDate().getTime(),this.isSameYear=(s,a)=>this.isSame(s,a,"YYYY"),this.isSameMonth=(s,a)=>this.isSame(s,a,"YYYY-MM"),this.isSameDay=(s,a)=>this.isSame(s,a,"YYYY-MM-DD"),this.isSameHour=(s,a)=>s.isSame(a,"hour"),this.isAfter=(s,a)=>s>a,this.isAfterYear=(s,a)=>this.hasUTCPlugin()?!this.isSameYear(s,a)&&s.utc()>a.utc():s.isAfter(a,"year"),this.isAfterDay=(s,a)=>this.hasUTCPlugin()?!this.isSameDay(s,a)&&s.utc()>a.utc():s.isAfter(a,"day"),this.isBefore=(s,a)=>sthis.hasUTCPlugin()?!this.isSameYear(s,a)&&s.utc()this.hasUTCPlugin()?!this.isSameDay(s,a)&&s.utc()s>=a&&s<=i,this.startOfYear=s=>this.adjustOffset(s.startOf("year")),this.startOfMonth=s=>this.adjustOffset(s.startOf("month")),this.startOfWeek=s=>this.adjustOffset(s.startOf("week")),this.startOfDay=s=>this.adjustOffset(s.startOf("day")),this.endOfYear=s=>this.adjustOffset(s.endOf("year")),this.endOfMonth=s=>this.adjustOffset(s.endOf("month")),this.endOfWeek=s=>this.adjustOffset(s.endOf("week")),this.endOfDay=s=>this.adjustOffset(s.endOf("day")),this.addYears=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"year"):s.add(a,"year")),this.addMonths=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"month"):s.add(a,"month")),this.addWeeks=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"week"):s.add(a,"week")),this.addDays=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"day"):s.add(a,"day")),this.addHours=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"hour"):s.add(a,"hour")),this.addMinutes=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"minute"):s.add(a,"minute")),this.addSeconds=(s,a)=>this.adjustOffset(a<0?s.subtract(Math.abs(a),"second"):s.add(a,"second")),this.getYear=s=>s.year(),this.getMonth=s=>s.month(),this.getDate=s=>s.date(),this.getHours=s=>s.hour(),this.getMinutes=s=>s.minute(),this.getSeconds=s=>s.second(),this.getMilliseconds=s=>s.millisecond(),this.setYear=(s,a)=>this.adjustOffset(s.set("year",a)),this.setMonth=(s,a)=>this.adjustOffset(s.set("month",a)),this.setDate=(s,a)=>this.adjustOffset(s.set("date",a)),this.setHours=(s,a)=>this.adjustOffset(s.set("hour",a)),this.setMinutes=(s,a)=>this.adjustOffset(s.set("minute",a)),this.setSeconds=(s,a)=>this.adjustOffset(s.set("second",a)),this.setMilliseconds=(s,a)=>this.adjustOffset(s.set("millisecond",a)),this.getDaysInMonth=s=>s.daysInMonth(),this.getNextMonth=s=>this.addMonths(s,1),this.getPreviousMonth=s=>this.addMonths(s,-1),this.getMonthArray=s=>{const i=[s.startOf("year")];for(;i.length<12;){const l=i[i.length-1];i.push(this.addMonths(l,1))}return i},this.mergeDateAndTime=(s,a)=>s.hour(a.hour()).minute(a.minute()).second(a.second()),this.getWeekdays=()=>{const s=this.dayjs().startOf("week");return[0,1,2,3,4,5,6].map(a=>this.formatByString(this.addDays(s,a),"dd"))},this.getWeekArray=s=>{const a=this.setLocaleToValue(s),i=a.startOf("month").startOf("week"),l=a.endOf("month").endOf("week");let c=0,u=i;const d=[];for(;us.week(),this.getYearRange=(s,a)=>{const i=s.startOf("year"),l=a.endOf("year"),c=[];let u=i;for(;us==="am"?"AM":"PM",this.rawDayJsInstance=r,this.dayjs=nW((o=this.rawDayJsInstance)!=null?o:gn,t),this.locale=t,this.formats=m({},tW,n),gn.extend(YU)}}var pt;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{const s={};for(const a of o)s[a]=a;return s},e.getValidEnumValues=o=>{const s=e.objectKeys(o).filter(i=>typeof o[o[i]]!="number"),a={};for(const i of s)a[i]=o[i];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(s){return o[s]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const s=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&s.push(a);return s},e.find=(o,s)=>{for(const a of o)if(s(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,s=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(o,s)=>typeof s=="bigint"?s.toString():s})(pt||(pt={}));var em;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(em||(em={}));const Fe=pt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Wo=e=>{switch(typeof e){case"undefined":return Fe.undefined;case"string":return Fe.string;case"number":return isNaN(e)?Fe.nan:Fe.number;case"boolean":return Fe.boolean;case"function":return Fe.function;case"bigint":return Fe.bigint;case"symbol":return Fe.symbol;case"object":return Array.isArray(e)?Fe.array:e===null?Fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Fe.promise:typeof Map<"u"&&e instanceof Map?Fe.map:typeof Set<"u"&&e instanceof Set?Fe.set:typeof Date<"u"&&e instanceof Date?Fe.date:Fe.object;default:return Fe.unknown}},Me=pt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),rW=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Er extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(s){return s.message},r={_errors:[]},o=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let i=r,l=0;for(;ln.message){const n={},r=[];for(const o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Er.create=e=>new Er(e);const Ul=(e,t)=>{let n;switch(e.code){case Me.invalid_type:e.received===Fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,pt.jsonStringifyReplacer)}`;break;case Me.unrecognized_keys:n=`Unrecognized key(s) in object: ${pt.joinValues(e.keys,", ")}`;break;case Me.invalid_union:n="Invalid input";break;case Me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${pt.joinValues(e.options)}`;break;case Me.invalid_enum_value:n=`Invalid enum value. Expected ${pt.joinValues(e.options)}, received '${e.received}'`;break;case Me.invalid_arguments:n="Invalid function arguments";break;case Me.invalid_return_type:n="Invalid function return type";break;case Me.invalid_date:n="Invalid date";break;case Me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:pt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Me.custom:n="Invalid input";break;case Me.invalid_intersection_types:n="Intersection results could not be merged";break;case Me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Me.not_finite:n="Number must be finite";break;default:n=t.defaultError,pt.assertNever(e)}return{message:n}};let Ak=Ul;function oW(e){Ak=e}function cd(){return Ak}const ud=e=>{const{data:t,path:n,errorMaps:r,issueData:o}=e,s=[...n,...o.path||[]],a={...o,path:s};let i="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)i=c(a,{data:t,defaultError:i}).message;return{...o,path:s,message:o.message||i}},sW=[];function ze(e,t){const n=ud({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,cd(),Ul].filter(r=>!!r)});e.common.issues.push(n)}class xn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const o of n){if(o.status==="aborted")return Qe;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const o of n)r.push({key:await o.key,value:await o.value});return xn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const o of n){const{key:s,value:a}=o;if(s.status==="aborted"||a.status==="aborted")return Qe;s.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[s.value]=a.value)}return{status:t.value,value:r}}}const Qe=Object.freeze({status:"aborted"}),Nk=e=>({status:"dirty",value:e}),Tn=e=>({status:"valid",value:e}),tm=e=>e.status==="aborted",nm=e=>e.status==="dirty",Wl=e=>e.status==="valid",dd=e=>typeof Promise<"u"&&e instanceof Promise;var Ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ke||(Ke={}));class ao{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Zb=(e,t)=>{if(Wl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Er(e.common.issues);return this._error=n,this._error}}};function Je(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,i)=>a.code!=="invalid_type"?{message:i.defaultError}:typeof i.data>"u"?{message:r??i.defaultError}:{message:n??i.defaultError},description:o}}class rt{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Wo(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new xn,ctx:{common:t.parent.common,data:t.data,parsedType:Wo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(dd(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const o={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Wo(t)},s=this._parseSync({data:t,path:o.path,parent:o});return Zb(o,s)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Wo(t)},o=this._parse({data:t,path:r.path,parent:r}),s=await(dd(o)?o:Promise.resolve(o));return Zb(r,s)}refine(t,n){const r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,s)=>{const a=t(o),i=()=>s.addIssue({code:Me.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(i(),!1)):a?!0:(i(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Lr({schema:this,typeName:Ze.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return yo.create(this,this._def)}nullable(){return Us.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _r.create(this,this._def)}promise(){return li.create(this,this._def)}or(t){return Gl.create([this,t],this._def)}and(t){return Zl.create(this,t,this._def)}transform(t){return new Lr({...Je(this._def),schema:this,typeName:Ze.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ec({...Je(this._def),innerType:this,defaultValue:n,typeName:Ze.ZodDefault})}brand(){return new Fk({typeName:Ze.ZodBranded,type:this,...Je(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new md({...Je(this._def),innerType:this,catchValue:n,typeName:Ze.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Cc.create(this,t)}readonly(){return vd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const aW=/^c[^\s-]{8,}$/i,iW=/^[a-z][a-z0-9]*$/,lW=/^[0-9A-HJKMNP-TV-Z]{26}$/,cW=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,uW=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,dW="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _p;const fW=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,pW=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,hW=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function mW(e,t){return!!((t==="v4"||!t)&&fW.test(e)||(t==="v6"||!t)&&pW.test(e))}class Rr extends rt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Fe.string){const s=this._getOrReturnCtx(t);return ze(s,{code:Me.invalid_type,expected:Fe.string,received:s.parsedType}),Qe}const r=new xn;let o;for(const s of this._def.checks)if(s.kind==="min")t.data.lengths.value&&(o=this._getOrReturnCtx(t,o),ze(o,{code:Me.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=t.data.length>s.value,i=t.data.lengtht.test(o),{validation:n,code:Me.invalid_string,...Ke.errToObj(r)})}_addCheck(t){return new Rr({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ke.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Ke.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ke.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ke.errToObj(n)})}nonempty(t){return this.min(1,Ke.errToObj(t))}trim(){return new Rr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Rr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Rr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new Rr({checks:[],typeName:Ze.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Je(e)})};function gW(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,s=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return s%a/Math.pow(10,o)}class ss extends rt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Fe.number){const s=this._getOrReturnCtx(t);return ze(s,{code:Me.invalid_type,expected:Fe.number,received:s.parsedType}),Qe}let r;const o=new xn;for(const s of this._def.checks)s.kind==="int"?pt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?t.datas.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?gW(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.not_finite,message:s.message}),o.dirty()):pt.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ke.toString(n))}setLimit(t,n,r,o){return new ss({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ke.toString(o)}]})}_addCheck(t){return new ss({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ke.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&pt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew ss({checks:[],typeName:Ze.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Je(e)});class as extends rt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==Fe.bigint){const s=this._getOrReturnCtx(t);return ze(s,{code:Me.invalid_type,expected:Fe.bigint,received:s.parsedType}),Qe}let r;const o=new xn;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.datas.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ze(r,{code:Me.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):pt.assertNever(s);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ke.toString(n))}setLimit(t,n,r,o){return new as({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ke.toString(o)}]})}_addCheck(t){return new as({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ke.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new as({checks:[],typeName:Ze.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Je(e)})};class Hl extends rt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Fe.boolean){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.boolean,received:r.parsedType}),Qe}return Tn(t.data)}}Hl.create=e=>new Hl({typeName:Ze.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Je(e)});class zs extends rt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Fe.date){const s=this._getOrReturnCtx(t);return ze(s,{code:Me.invalid_type,expected:Fe.date,received:s.parsedType}),Qe}if(isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return ze(s,{code:Me.invalid_date}),Qe}const r=new xn;let o;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()s.value&&(o=this._getOrReturnCtx(t,o),ze(o,{code:Me.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):pt.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new zs({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ke.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew zs({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ze.ZodDate,...Je(e)});class fd extends rt{_parse(t){if(this._getType(t)!==Fe.symbol){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.symbol,received:r.parsedType}),Qe}return Tn(t.data)}}fd.create=e=>new fd({typeName:Ze.ZodSymbol,...Je(e)});class Yl extends rt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.undefined,received:r.parsedType}),Qe}return Tn(t.data)}}Yl.create=e=>new Yl({typeName:Ze.ZodUndefined,...Je(e)});class Kl extends rt{_parse(t){if(this._getType(t)!==Fe.null){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.null,received:r.parsedType}),Qe}return Tn(t.data)}}Kl.create=e=>new Kl({typeName:Ze.ZodNull,...Je(e)});class ii extends rt{constructor(){super(...arguments),this._any=!0}_parse(t){return Tn(t.data)}}ii.create=e=>new ii({typeName:Ze.ZodAny,...Je(e)});class Es extends rt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Tn(t.data)}}Es.create=e=>new Es({typeName:Ze.ZodUnknown,...Je(e)});class Do extends rt{_parse(t){const n=this._getOrReturnCtx(t);return ze(n,{code:Me.invalid_type,expected:Fe.never,received:n.parsedType}),Qe}}Do.create=e=>new Do({typeName:Ze.ZodNever,...Je(e)});class pd extends rt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.void,received:r.parsedType}),Qe}return Tn(t.data)}}pd.create=e=>new pd({typeName:Ze.ZodVoid,...Je(e)});class _r extends rt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==Fe.array)return ze(n,{code:Me.invalid_type,expected:Fe.array,received:n.parsedType}),Qe;if(o.exactLength!==null){const a=n.data.length>o.exactLength.value,i=n.data.lengtho.maxLength.value&&(ze(n,{code:Me.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,i)=>o.type._parseAsync(new ao(n,a,n.path,i)))).then(a=>xn.mergeArray(r,a));const s=[...n.data].map((a,i)=>o.type._parseSync(new ao(n,a,n.path,i)));return xn.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new _r({...this._def,minLength:{value:t,message:Ke.toString(n)}})}max(t,n){return new _r({...this._def,maxLength:{value:t,message:Ke.toString(n)}})}length(t,n){return new _r({...this._def,exactLength:{value:t,message:Ke.toString(n)}})}nonempty(t){return this.min(1,t)}}_r.create=(e,t)=>new _r({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ze.ZodArray,...Je(t)});function ua(e){if(e instanceof At){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=yo.create(ua(r))}return new At({...e._def,shape:()=>t})}else return e instanceof _r?new _r({...e._def,type:ua(e.element)}):e instanceof yo?yo.create(ua(e.unwrap())):e instanceof Us?Us.create(ua(e.unwrap())):e instanceof io?io.create(e.items.map(t=>ua(t))):e}class At extends rt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=pt.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Fe.object){const c=this._getOrReturnCtx(t);return ze(c,{code:Me.invalid_type,expected:Fe.object,received:c.parsedType}),Qe}const{status:r,ctx:o}=this._processInputParams(t),{shape:s,keys:a}=this._getCached(),i=[];if(!(this._def.catchall instanceof Do&&this._def.unknownKeys==="strip"))for(const c in o.data)a.includes(c)||i.push(c);const l=[];for(const c of a){const u=s[c],d=o.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new ao(o,d,o.path,c)),alwaysSet:c in o.data})}if(this._def.catchall instanceof Do){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of i)l.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(c==="strict")i.length>0&&(ze(o,{code:Me.unrecognized_keys,keys:i}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of i){const d=o.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new ao(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key;c.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>xn.mergeObjectSync(r,c)):xn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Ke.errToObj,new At({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,s,a,i;const l=(a=(s=(o=this._def).errorMap)===null||s===void 0?void 0:s.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(i=Ke.errToObj(t).message)!==null&&i!==void 0?i:l}:{message:l}}}:{}})}strip(){return new At({...this._def,unknownKeys:"strip"})}passthrough(){return new At({...this._def,unknownKeys:"passthrough"})}extend(t){return new At({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new At({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ze.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new At({...this._def,catchall:t})}pick(t){const n={};return pt.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}omit(t){const n={};return pt.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new At({...this._def,shape:()=>n})}deepPartial(){return ua(this)}partial(t){const n={};return pt.objectKeys(this.shape).forEach(r=>{const o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new At({...this._def,shape:()=>n})}required(t){const n={};return pt.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof yo;)s=s._def.innerType;n[r]=s}}),new At({...this._def,shape:()=>n})}keyof(){return jk(pt.objectKeys(this.shape))}}At.create=(e,t)=>new At({shape:()=>e,unknownKeys:"strip",catchall:Do.create(),typeName:Ze.ZodObject,...Je(t)});At.strictCreate=(e,t)=>new At({shape:()=>e,unknownKeys:"strict",catchall:Do.create(),typeName:Ze.ZodObject,...Je(t)});At.lazycreate=(e,t)=>new At({shape:e,unknownKeys:"strip",catchall:Do.create(),typeName:Ze.ZodObject,...Je(t)});class Gl extends rt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function o(s){for(const i of s)if(i.result.status==="valid")return i.result;for(const i of s)if(i.result.status==="dirty")return n.common.issues.push(...i.ctx.common.issues),i.result;const a=s.map(i=>new Er(i.ctx.common.issues));return ze(n,{code:Me.invalid_union,unionErrors:a}),Qe}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let s;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const i=a.map(l=>new Er(l));return ze(n,{code:Me.invalid_union,unionErrors:i}),Qe}}get options(){return this._def.options}}Gl.create=(e,t)=>new Gl({options:e,typeName:Ze.ZodUnion,...Je(t)});const Cu=e=>e instanceof Ql?Cu(e.schema):e instanceof Lr?Cu(e.innerType()):e instanceof Xl?[e.value]:e instanceof is?e.options:e instanceof Jl?Object.keys(e.enum):e instanceof ec?Cu(e._def.innerType):e instanceof Yl?[void 0]:e instanceof Kl?[null]:null;class jf extends rt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Fe.object)return ze(n,{code:Me.invalid_type,expected:Fe.object,received:n.parsedType}),Qe;const r=this.discriminator,o=n.data[r],s=this.optionsMap.get(o);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(ze(n,{code:Me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Qe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const o=new Map;for(const s of n){const a=Cu(s.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const i of a){if(o.has(i))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(i)}`);o.set(i,s)}}return new jf({typeName:Ze.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Je(r)})}}function rm(e,t){const n=Wo(e),r=Wo(t);if(e===t)return{valid:!0,data:e};if(n===Fe.object&&r===Fe.object){const o=pt.objectKeys(t),s=pt.objectKeys(e).filter(i=>o.indexOf(i)!==-1),a={...e,...t};for(const i of s){const l=rm(e[i],t[i]);if(!l.valid)return{valid:!1};a[i]=l.data}return{valid:!0,data:a}}else if(n===Fe.array&&r===Fe.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let s=0;s{if(tm(s)||tm(a))return Qe;const i=rm(s.value,a.value);return i.valid?((nm(s)||nm(a))&&n.dirty(),{status:n.value,value:i.data}):(ze(r,{code:Me.invalid_intersection_types}),Qe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>o(s,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Zl.create=(e,t,n)=>new Zl({left:e,right:t,typeName:Ze.ZodIntersection,...Je(n)});class io extends rt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.array)return ze(r,{code:Me.invalid_type,expected:Fe.array,received:r.parsedType}),Qe;if(r.data.lengththis._def.items.length&&(ze(r,{code:Me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,i)=>{const l=this._def.items[i]||this._def.rest;return l?l._parse(new ao(r,a,r.path,i)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>xn.mergeArray(n,a)):xn.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new io({...this._def,rest:t})}}io.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new io({items:e,typeName:Ze.ZodTuple,rest:null,...Je(t)})};class ql extends rt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.object)return ze(r,{code:Me.invalid_type,expected:Fe.object,received:r.parsedType}),Qe;const o=[],s=this._def.keyType,a=this._def.valueType;for(const i in r.data)o.push({key:s._parse(new ao(r,i,r.path,i)),value:a._parse(new ao(r,r.data[i],r.path,i))});return r.common.async?xn.mergeObjectAsync(n,o):xn.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof rt?new ql({keyType:t,valueType:n,typeName:Ze.ZodRecord,...Je(r)}):new ql({keyType:Rr.create(),valueType:t,typeName:Ze.ZodRecord,...Je(n)})}}class hd extends rt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.map)return ze(r,{code:Me.invalid_type,expected:Fe.map,received:r.parsedType}),Qe;const o=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([i,l],c)=>({key:o._parse(new ao(r,i,r.path,[c,"key"])),value:s._parse(new ao(r,l,r.path,[c,"value"]))}));if(r.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Qe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),i.set(c.value,u.value)}return{status:n.value,value:i}})}else{const i=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Qe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),i.set(c.value,u.value)}return{status:n.value,value:i}}}}hd.create=(e,t,n)=>new hd({valueType:t,keyType:e,typeName:Ze.ZodMap,...Je(n)});class Vs extends rt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.set)return ze(r,{code:Me.invalid_type,expected:Fe.set,received:r.parsedType}),Qe;const o=this._def;o.minSize!==null&&r.data.sizeo.maxSize.value&&(ze(r,{code:Me.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Qe;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const i=[...r.data.values()].map((l,c)=>s._parse(new ao(r,l,r.path,c)));return r.common.async?Promise.all(i).then(l=>a(l)):a(i)}min(t,n){return new Vs({...this._def,minSize:{value:t,message:Ke.toString(n)}})}max(t,n){return new Vs({...this._def,maxSize:{value:t,message:Ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Vs.create=(e,t)=>new Vs({valueType:e,minSize:null,maxSize:null,typeName:Ze.ZodSet,...Je(t)});class Va extends rt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Fe.function)return ze(n,{code:Me.invalid_type,expected:Fe.function,received:n.parsedType}),Qe;function r(i,l){return ud({data:i,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cd(),Ul].filter(c=>!!c),issueData:{code:Me.invalid_arguments,argumentsError:l}})}function o(i,l){return ud({data:i,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,cd(),Ul].filter(c=>!!c),issueData:{code:Me.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof li){const i=this;return Tn(async function(...l){const c=new Er([]),u=await i._def.args.parseAsync(l,s).catch(b=>{throw c.addIssue(r(l,b)),c}),d=await Reflect.apply(a,this,u);return await i._def.returns._def.type.parseAsync(d,s).catch(b=>{throw c.addIssue(o(d,b)),c})})}else{const i=this;return Tn(function(...l){const c=i._def.args.safeParse(l,s);if(!c.success)throw new Er([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=i._def.returns.safeParse(u,s);if(!d.success)throw new Er([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Va({...this._def,args:io.create(t).rest(Es.create())})}returns(t){return new Va({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Va({args:t||io.create([]).rest(Es.create()),returns:n||Es.create(),typeName:Ze.ZodFunction,...Je(r)})}}class Ql extends rt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Ql.create=(e,t)=>new Ql({getter:e,typeName:Ze.ZodLazy,...Je(t)});class Xl extends rt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ze(n,{received:n.data,code:Me.invalid_literal,expected:this._def.value}),Qe}return{status:"valid",value:t.data}}get value(){return this._def.value}}Xl.create=(e,t)=>new Xl({value:e,typeName:Ze.ZodLiteral,...Je(t)});function jk(e,t){return new is({values:e,typeName:Ze.ZodEnum,...Je(t)})}class is extends rt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return ze(n,{expected:pt.joinValues(r),received:n.parsedType,code:Me.invalid_type}),Qe}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return ze(n,{received:n.data,code:Me.invalid_enum_value,options:r}),Qe}return Tn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return is.create(t)}exclude(t){return is.create(this.options.filter(n=>!t.includes(n)))}}is.create=jk;class Jl extends rt{_parse(t){const n=pt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Fe.string&&r.parsedType!==Fe.number){const o=pt.objectValues(n);return ze(r,{expected:pt.joinValues(o),received:r.parsedType,code:Me.invalid_type}),Qe}if(n.indexOf(t.data)===-1){const o=pt.objectValues(n);return ze(r,{received:r.data,code:Me.invalid_enum_value,options:o}),Qe}return Tn(t.data)}get enum(){return this._def.values}}Jl.create=(e,t)=>new Jl({values:e,typeName:Ze.ZodNativeEnum,...Je(t)});class li extends rt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Fe.promise&&n.common.async===!1)return ze(n,{code:Me.invalid_type,expected:Fe.promise,received:n.parsedType}),Qe;const r=n.parsedType===Fe.promise?n.data:Promise.resolve(n.data);return Tn(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}}li.create=(e,t)=>new li({type:e,typeName:Ze.ZodPromise,...Je(t)});class Lr extends rt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ze.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,s={addIssue:a=>{ze(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),o.type==="preprocess"){const a=o.transform(r.data,s);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(i=>this._def.schema._parseAsync({data:i,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(o.type==="refinement"){const a=i=>{const l=o.refinement(i,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Qe:(i.status==="dirty"&&n.dirty(),a(i.value),{status:n.value,value:i.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>i.status==="aborted"?Qe:(i.status==="dirty"&&n.dirty(),a(i.value).then(()=>({status:n.value,value:i.value}))))}if(o.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Wl(a))return a;const i=o.transform(a.value,s);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:i}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Wl(a)?Promise.resolve(o.transform(a.value,s)).then(i=>({status:n.value,value:i})):a);pt.assertNever(o)}}Lr.create=(e,t,n)=>new Lr({schema:e,typeName:Ze.ZodEffects,effect:t,...Je(n)});Lr.createWithPreprocess=(e,t,n)=>new Lr({schema:t,effect:{type:"preprocess",transform:e},typeName:Ze.ZodEffects,...Je(n)});class yo extends rt{_parse(t){return this._getType(t)===Fe.undefined?Tn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}yo.create=(e,t)=>new yo({innerType:e,typeName:Ze.ZodOptional,...Je(t)});class Us extends rt{_parse(t){return this._getType(t)===Fe.null?Tn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Us.create=(e,t)=>new Us({innerType:e,typeName:Ze.ZodNullable,...Je(t)});class ec extends rt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ec.create=(e,t)=>new ec({innerType:e,typeName:Ze.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Je(t)});class md extends rt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return dd(o)?o.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Er(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Er(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}md.create=(e,t)=>new md({innerType:e,typeName:Ze.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Je(t)});class gd extends rt{_parse(t){if(this._getType(t)!==Fe.nan){const r=this._getOrReturnCtx(t);return ze(r,{code:Me.invalid_type,expected:Fe.nan,received:r.parsedType}),Qe}return{status:"valid",value:t.data}}}gd.create=e=>new gd({typeName:Ze.ZodNaN,...Je(e)});const vW=Symbol("zod_brand");class Fk extends rt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Cc extends rt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Qe:s.status==="dirty"?(n.dirty(),Nk(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Qe:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new Cc({in:t,out:n,typeName:Ze.ZodPipeline})}}class vd extends rt{_parse(t){const n=this._def.innerType._parse(t);return Wl(n)&&(n.value=Object.freeze(n.value)),n}}vd.create=(e,t)=>new vd({innerType:e,typeName:Ze.ZodReadonly,...Je(t)});const Bk=(e,t={},n)=>e?ii.create().superRefine((r,o)=>{var s,a;if(!e(r)){const i=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(a=(s=i.fatal)!==null&&s!==void 0?s:n)!==null&&a!==void 0?a:!0,c=typeof i=="string"?{message:i}:i;o.addIssue({code:"custom",...c,fatal:l})}}):ii.create(),yW={object:At.lazycreate};var Ze;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ze||(Ze={}));const bW=(e,t={message:`Input not instance of ${e.name}`})=>Bk(n=>n instanceof e,t),zk=Rr.create,Vk=ss.create,xW=gd.create,CW=as.create,Uk=Hl.create,wW=zs.create,SW=fd.create,kW=Yl.create,TW=Kl.create,PW=ii.create,MW=Es.create,RW=Do.create,$W=pd.create,DW=_r.create,EW=At.create,_W=At.strictCreate,IW=Gl.create,OW=jf.create,LW=Zl.create,AW=io.create,NW=ql.create,jW=hd.create,FW=Vs.create,BW=Va.create,zW=Ql.create,VW=Xl.create,UW=is.create,WW=Jl.create,HW=li.create,qb=Lr.create,YW=yo.create,KW=Us.create,GW=Lr.createWithPreprocess,ZW=Cc.create,qW=()=>zk().optional(),QW=()=>Vk().optional(),XW=()=>Uk().optional(),JW={string:e=>Rr.create({...e,coerce:!0}),number:e=>ss.create({...e,coerce:!0}),boolean:e=>Hl.create({...e,coerce:!0}),bigint:e=>as.create({...e,coerce:!0}),date:e=>zs.create({...e,coerce:!0})},eH=Qe;var y8=Object.freeze({__proto__:null,defaultErrorMap:Ul,setErrorMap:oW,getErrorMap:cd,makeIssue:ud,EMPTY_PATH:sW,addIssueToContext:ze,ParseStatus:xn,INVALID:Qe,DIRTY:Nk,OK:Tn,isAborted:tm,isDirty:nm,isValid:Wl,isAsync:dd,get util(){return pt},get objectUtil(){return em},ZodParsedType:Fe,getParsedType:Wo,ZodType:rt,ZodString:Rr,ZodNumber:ss,ZodBigInt:as,ZodBoolean:Hl,ZodDate:zs,ZodSymbol:fd,ZodUndefined:Yl,ZodNull:Kl,ZodAny:ii,ZodUnknown:Es,ZodNever:Do,ZodVoid:pd,ZodArray:_r,ZodObject:At,ZodUnion:Gl,ZodDiscriminatedUnion:jf,ZodIntersection:Zl,ZodTuple:io,ZodRecord:ql,ZodMap:hd,ZodSet:Vs,ZodFunction:Va,ZodLazy:Ql,ZodLiteral:Xl,ZodEnum:is,ZodNativeEnum:Jl,ZodPromise:li,ZodEffects:Lr,ZodTransformer:Lr,ZodOptional:yo,ZodNullable:Us,ZodDefault:ec,ZodCatch:md,ZodNaN:gd,BRAND:vW,ZodBranded:Fk,ZodPipeline:Cc,ZodReadonly:vd,custom:Bk,Schema:rt,ZodSchema:rt,late:yW,get ZodFirstPartyTypeKind(){return Ze},coerce:JW,any:PW,array:DW,bigint:CW,boolean:Uk,date:wW,discriminatedUnion:OW,effect:qb,enum:UW,function:BW,instanceof:bW,intersection:LW,lazy:zW,literal:VW,map:jW,nan:xW,nativeEnum:WW,never:RW,null:TW,nullable:KW,number:Vk,object:EW,oboolean:XW,onumber:QW,optional:YW,ostring:qW,pipeline:ZW,preprocess:GW,promise:HW,record:NW,set:FW,strictObject:_W,string:zk,symbol:SW,transformer:qb,tuple:AW,undefined:kW,union:IW,unknown:MW,void:$W,NEVER:eH,ZodIssueCode:Me,quotelessJson:rW,ZodError:Er});export{Fr as $,wH as A,YL as B,f8 as C,g8 as D,$H as E,FN as F,FH as G,WH as H,Dn as I,uH as J,mR as K,XS as L,Df as M,oH as N,Xj as O,TH as P,OS as Q,ur as R,qH as S,sn as T,Ta as U,sH as V,fH as W,lH as X,j5 as Y,db as Z,zR as _,kH as a,Qn as a$,u8 as a0,ZB as a1,d8 as a2,Xt as a3,dH as a4,FS as a5,rH as a6,gc as a7,oi as a8,vI as a9,e8 as aA,i8 as aB,t8 as aC,c8 as aD,IH as aE,GH as aF,KH as aG,LH as aH,jH as aI,NH as aJ,AH as aK,jh as aL,s_ as aM,be as aN,Ce as aO,V as aP,m as aQ,We as aR,q as aS,Zt as aT,xe as aU,ve as aV,hi as aW,yn as aX,Ie as aY,pc as aZ,mi as a_,Hg as aa,Bg as ab,fz as ac,zz as ad,f5 as ae,id as af,y5 as ag,bz as ah,p8 as ai,MH as aj,LF as ak,Ro as al,Mo as am,EH as an,_H as ao,Eo as ap,qR as aq,n8 as ar,tH as as,a8 as at,OH as au,vH as av,Ws as aw,BH as ax,xH as ay,RH as az,aH as b,ut as b0,Eg as b1,St as b2,ne as b3,gr as b4,ZH as b5,z as b6,pN as b7,Ew as b8,Ft as b9,GA as bA,Dg as bB,yH as bC,Ug as ba,lN as bb,ul as bc,bN as bd,aS as be,xu as bf,CH as bg,QH as bh,bH as bi,SH as bj,HH as bk,VH as bl,zH as bm,s8 as bn,PH as bo,gH as bp,mH as bq,Od as br,Fc as bs,o8 as bt,l8 as bu,DH as bv,YH as bw,UH as bx,r8 as by,JH as bz,js as c,hH as d,nH as e,h8 as f,HR as g,m8 as h,pC as i,P as j,v8 as k,XH as l,Jw as m,dS as n,Ef as o,Tw as p,pH as q,y as r,gn as s,cH as t,vR as u,av as v,LE as w,iH as x,gR as y,y8 as z}; diff --git a/ui/packages/evidently-ui-lib/src/api/client-heplers.ts b/ui/packages/evidently-ui-lib/src/api/client-heplers.ts new file mode 100644 index 0000000000..ad7623b715 --- /dev/null +++ b/ui/packages/evidently-ui-lib/src/api/client-heplers.ts @@ -0,0 +1,62 @@ +import createClient from 'openapi-fetch' +import { json } from 'react-router-dom' +import type { ErrorData, ErrorResponse } from '~/api/types/utils' + +import { BackendPaths } from '~/api/types' + +export type API_CLIENT_TYPE = ReturnType> + +type ClientGenericResponse = + | { + data: D + error?: never + response: Response + } + | { + data?: never + error: ErrorResponse + response: Response + } + +type ResponseParserArgs = { notThrowExc: boolean } + +type DetermineReturnType = T extends { + notThrowExc: true +} + ? typeof returnErrorIfResponseNotOk + : T extends { notThrowExc: false } + ? typeof throwErrorIfResponseNotOk + : T extends {} + ? typeof throwErrorIfResponseNotOk + : never + +export function responseParser(args?: T): DetermineReturnType { + if (args?.notThrowExc) { + return returnErrorIfResponseNotOk as DetermineReturnType + } + + return throwErrorIfResponseNotOk as DetermineReturnType +} + +const throwErrorIfResponseNotOk = ( + genResponse: R +): NonNullable => { + const { data, error, response } = genResponse + if (error) { + throw json(error, { status: response.status }) + } + + return data +} + +const returnErrorIfResponseNotOk = ( + genResponse: R +): NonNullable | ErrorData => { + const { data, error, response } = genResponse + + if (error) { + return { error: { ...error, status_code: response.status } } + } + + return data +} diff --git a/ui/packages/evidently-ui-lib/src/api/providers/dashboard.ts b/ui/packages/evidently-ui-lib/src/api/providers/dashboard.ts deleted file mode 100644 index 717e82fb76..0000000000 --- a/ui/packages/evidently-ui-lib/src/api/providers/dashboard.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { json } from 'react-router-dom' -import createClient from 'openapi-fetch' - -import { JSONParseExtended } from '~/api/JsonParser' -import type { BackendPaths, DashboardInfoModel } from '~/api/types' -import type { ErrorResponse, JSONStrExtended } from '~/api/types/utils' -import type { DashboardProvider } from '~/api/types/providers/dashboard' - -import { AdditionalGraphInfo, WidgetInfo } from '~/api' - -export const getDashboardProvider: (baseUrl?: string) => DashboardProvider = (baseUrl) => { - const client = createClient({ baseUrl }) - - return { - async getProjectDashboard({ project, options }) { - const { data, error, response } = await client.GET('/api/projects/{project_id}/dashboard', { - parseAs: 'text', - params: { - path: { project_id: project.id }, - query: { - timestamp_start: options.timestamp_start, - timestamp_end: options.timestamp_end - } - } - }) - - if (error) { - throw json(error satisfies ErrorResponse, { status: response.status }) - } - - return JSONParseExtended(data satisfies JSONStrExtended) - }, - async getSnapshotDashboard({ project, snapshot }) { - const { data, error, response } = await client.GET( - '/api/projects/{project_id}/{snapshot_id}/data', - { - parseAs: 'text', - params: { - path: { project_id: project.id, snapshot_id: snapshot.id } - } - } - ) - - if (error) { - throw json(error satisfies ErrorResponse, { status: response.status }) - } - - return JSONParseExtended(data satisfies JSONStrExtended) - }, - async getDashboardGraph({ project, snapshot, graph }) { - const { data, error, response } = await client.GET( - '/api/projects/{project_id}/{snapshot_id}/graphs_data/{graph_id}', - { - parseAs: 'text', - params: { - path: { - project_id: project.id, - snapshot_id: snapshot.id, - graph_id: encodeURIComponent(graph.id) - } - } - } - ) - - if (error) { - throw json(error satisfies ErrorResponse, { status: response.status }) - } - - return JSONParseExtended(data satisfies JSONStrExtended) - } - } -} diff --git a/ui/packages/evidently-ui-lib/src/api/providers/projects.ts b/ui/packages/evidently-ui-lib/src/api/providers/projects.ts deleted file mode 100644 index 22dc849840..0000000000 --- a/ui/packages/evidently-ui-lib/src/api/providers/projects.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { json } from 'react-router-dom' -import createClient from 'openapi-fetch' - -import type { ProjectsProvider } from '~/api/types/providers/projects' -import type { BackendPaths } from '~/api/types' -import type { ErrorResponse } from '~/api/types/utils' - -import { ensureID } from '~/api/utils' - -export const getProjectsProvider: (baseUrl?: string) => ProjectsProvider = (baseUrl) => { - const client = createClient({ baseUrl }) - - return { - async list() { - const { data, error, response } = await client.GET('/api/projects') - - if (error) { - throw json(error satisfies ErrorResponse, { status: response.status }) - } - - return data.map(ensureID) - }, - async update({ body }) { - const { data, error } = await client.POST('/api/projects/{project_id}/info', { - params: { path: { project_id: body.id } }, - body: body - }) - - if (error) { - return { error } - } - - return ensureID(data) - }, - async get({ id }) { - const { data, error, response } = await client.GET('/api/projects/{project_id}/info', { - params: { path: { project_id: id } } - }) - - if (error) { - throw json(error satisfies ErrorResponse, { status: response.status }) - } - - return ensureID(data) - }, - async delete({ id }) { - const { error } = await client.DELETE('/api/projects/{project_id}', { - params: { path: { project_id: id } } - }) - - if (error) { - return { error } - } - - return null - }, - async create({ body }) { - const { data, error } = await client.POST('/api/projects', { body }) - - if (error) { - return { error } - } - - return ensureID(data) - }, - async reloadSnapshots({ project }) { - const { error } = await client.GET('/api/projects/{project_id}/reload', { - params: { path: { project_id: project.id } } - }) - - if (error) { - return { error } - } - - return null - }, - async deleteSnapshot({ project, snapshot }) { - const { error } = await client.DELETE('/api/projects/{project_id}/{snapshot_id}', { - params: { path: { project_id: project.id, snapshot_id: snapshot.id } } - }) - - if (error) { - return { error } - } - - return null - }, - async listReports({ project }) { - const { data, error, response } = await client.GET('/api/projects/{project_id}/reports', { - params: { path: { project_id: project.id } } - }) - - if (error) { - throw json(error satisfies ErrorResponse, { status: response.status }) - } - - return data.map(ensureID) - }, - async listTestSuites({ project }) { - const { data, error, response } = await client.GET('/api/projects/{project_id}/test_suites', { - params: { path: { project_id: project.id } } - }) - - if (error) { - throw json(error satisfies ErrorResponse, { status: response.status }) - } - - return data.map(ensureID) - } - } -} diff --git a/ui/packages/evidently-ui-lib/src/api/providers/version.ts b/ui/packages/evidently-ui-lib/src/api/providers/version.ts deleted file mode 100644 index 7a5127ea51..0000000000 --- a/ui/packages/evidently-ui-lib/src/api/providers/version.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { json } from 'react-router-dom' -import createClient from 'openapi-fetch' - -import type { BackendPaths } from '~/api/types' -import type { ErrorResponse } from '~/api/types/utils' -import type { VersionProvider } from '~/api/types/providers/version' - -export const getVersionProvider: (baseUrl?: string) => VersionProvider = (baseUrl) => { - const client = createClient({ baseUrl }) - - return { - async getVersion() { - const { data, error, response } = await client.GET('/api/version') - - if (error) { - throw json(error satisfies ErrorResponse, { - // @ts-ignore - status: response.status - }) - } - - return data - } - } -} diff --git a/ui/packages/evidently-ui-lib/src/api/types/providers/dashboard.ts b/ui/packages/evidently-ui-lib/src/api/types/providers/dashboard.ts deleted file mode 100644 index feb0907c54..0000000000 --- a/ui/packages/evidently-ui-lib/src/api/types/providers/dashboard.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { AdditionalGraphInfo, WidgetInfo } from '~/api' -import { DashboardInfoModel } from '~/api/types' -import { ID } from '~/api/types/utils' - -export type DashboardProvider = { - getProjectDashboard(args: { - project: ID - options: { - timestamp_start?: null | string - timestamp_end?: null | string - } - }): Promise - - getSnapshotDashboard(args: { project: ID; snapshot: ID }): Promise - - getDashboardGraph(args: { - project: ID - snapshot: ID - graph: ID - }): Promise -} diff --git a/ui/packages/evidently-ui-lib/src/api/types/providers/projects.ts b/ui/packages/evidently-ui-lib/src/api/types/providers/projects.ts deleted file mode 100644 index 275fb9e4e2..0000000000 --- a/ui/packages/evidently-ui-lib/src/api/types/providers/projects.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { CreateCRUD, ErrorData, ID, StrictID } from '~/api/types/utils' -import { ProjectModel, TestSuiteModel, ReportModel } from '~/api/types' - -export type ProjectsProvider = CreateCRUD & { - reloadSnapshots: (args: { project: ID }) => Promise - listReports: (args: { project: ID }) => Promise[]> - listTestSuites: (args: { project: ID }) => Promise[]> - deleteSnapshot: (args: { project: ID; snapshot: ID }) => Promise -} diff --git a/ui/packages/evidently-ui-lib/src/api/types/providers/version.ts b/ui/packages/evidently-ui-lib/src/api/types/providers/version.ts deleted file mode 100644 index 3b876f46e1..0000000000 --- a/ui/packages/evidently-ui-lib/src/api/types/providers/version.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { VersionModel } from '~/api/types' - -export type VersionProvider = { - getVersion(): Promise -} diff --git a/ui/packages/evidently-ui-lib/src/api/types/utils.ts b/ui/packages/evidently-ui-lib/src/api/types/utils.ts index 80807fbbc1..48741c5141 100644 --- a/ui/packages/evidently-ui-lib/src/api/types/utils.ts +++ b/ui/packages/evidently-ui-lib/src/api/types/utils.ts @@ -9,17 +9,6 @@ export type ErrorResponse = { status_code: number | false; detail: string } export type ErrorData = { error: ErrorResponse } -export type CreateCRUD = { - // loaders - list(): Promise[]> - get(args: ID): Promise> - - // actions - delete(id: ID): Promise - update({ body }: { body: StrictID }): Promise | ErrorData | null> - create({ body }: { body: Entity }): Promise | ErrorData | null> -} - /////////////////////////////// // TYPES TEST // see details here: diff --git a/ui/packages/evidently-ui-lib/src/routes-components/dashboard/data.tsx b/ui/packages/evidently-ui-lib/src/routes-components/dashboard/data.tsx index fed779bce9..ef8e4490b9 100644 --- a/ui/packages/evidently-ui-lib/src/routes-components/dashboard/data.tsx +++ b/ui/packages/evidently-ui-lib/src/routes-components/dashboard/data.tsx @@ -6,9 +6,11 @@ export type LoaderData = DashboardInfoModel import { FILTER_QUERY_PARAMS } from '~/components/DashboardDateFilter' import { DashboardInfoModel } from '~/api/types' -import { DashboardProvider } from '~/api/types/providers/dashboard' -export const getLoaderAction: GetLoaderAction = ({ api }) => ({ +import { API_CLIENT_TYPE, responseParser } from '~/api/client-heplers' +import { JSONParseExtended } from '~/api/JsonParser' + +export const getLoaderAction: GetLoaderAction = ({ api }) => ({ loader: ({ params, request }) => { invariant(params.projectId, 'missing projectId') @@ -25,12 +27,15 @@ export const getLoaderAction: GetLoaderAction = ( timestamp_end = null } - return api.getProjectDashboard({ - project: { id: params.projectId }, - options: { - timestamp_start, - timestamp_end - } - }) + return api + .GET('/api/projects/{project_id}/dashboard', { + params: { + path: { project_id: params.projectId }, + query: { timestamp_start, timestamp_end } + }, + parseAs: 'text' + }) + .then(responseParser()) + .then(JSONParseExtended) } }) diff --git a/ui/packages/evidently-ui-lib/src/routes-components/home/data.tsx b/ui/packages/evidently-ui-lib/src/routes-components/home/data.tsx index a9f9a23726..800af59ebd 100644 --- a/ui/packages/evidently-ui-lib/src/routes-components/home/data.tsx +++ b/ui/packages/evidently-ui-lib/src/routes-components/home/data.tsx @@ -1,9 +1,9 @@ +import { API_CLIENT_TYPE, responseParser } from '~/api/client-heplers' import { VersionModel } from '~/api/types' -import { VersionProvider } from '~/api/types/providers/version' import { GetLoaderAction } from '~/api/utils' export type LoaderData = VersionModel -export const getLoaderAction: GetLoaderAction = ({ api }) => ({ - loader: () => api.getVersion() +export const getLoaderAction: GetLoaderAction = ({ api }) => ({ + loader: () => api.GET('/api/version').then(responseParser()) }) diff --git a/ui/packages/evidently-ui-lib/src/routes-components/projectId/data.tsx b/ui/packages/evidently-ui-lib/src/routes-components/projectId/data.tsx index ba677b71e0..8986d57676 100644 --- a/ui/packages/evidently-ui-lib/src/routes-components/projectId/data.tsx +++ b/ui/packages/evidently-ui-lib/src/routes-components/projectId/data.tsx @@ -1,16 +1,19 @@ import invariant from 'tiny-invariant' +import { API_CLIENT_TYPE, responseParser } from '~/api/client-heplers' import { ProjectModel } from '~/api/types' -import { ProjectsProvider } from '~/api/types/providers/projects' import { StrictID } from '~/api/types/utils' -import { GetLoaderAction } from '~/api/utils' +import { ensureID, GetLoaderAction } from '~/api/utils' export type LoaderData = StrictID -export const getLoaderAction: GetLoaderAction = ({ api }) => ({ +export const getLoaderAction: GetLoaderAction = ({ api }) => ({ loader: ({ params }) => { const { projectId } = params invariant(projectId, 'missing projectId') - return api.get({ id: projectId }) + return api + .GET('/api/projects/{project_id}/info', { params: { path: { project_id: projectId } } }) + .then(responseParser()) + .then(ensureID) } }) diff --git a/ui/packages/evidently-ui-lib/src/routes-components/projectsList/data.tsx b/ui/packages/evidently-ui-lib/src/routes-components/projectsList/data.tsx index 45c3722021..862fc6cf40 100644 --- a/ui/packages/evidently-ui-lib/src/routes-components/projectsList/data.tsx +++ b/ui/packages/evidently-ui-lib/src/routes-components/projectsList/data.tsx @@ -1,8 +1,9 @@ import { z } from 'zod' +import { API_CLIENT_TYPE, responseParser } from '~/api/client-heplers' import { ProjectModel } from '~/api/types' -import { ProjectsProvider } from '~/api/types/providers/projects' + import { StrictID } from '~/api/types/utils' -import { expectJsonRequest, GetLoaderAction } from '~/api/utils' +import { ensureID, expectJsonRequest, GetLoaderAction } from '~/api/utils' export type LoaderData = StrictID[] @@ -19,8 +20,13 @@ export const deleteProjectAction = z.object({ projectId: z.string().uuid() }) -export const getLoaderAction: GetLoaderAction = ({ api }) => ({ - loader: () => api.list(), +export const getLoaderAction: GetLoaderAction = ({ api }) => ({ + loader: () => + api + .GET('/api/projects') + .then(responseParser()) + .then((p) => p.map(ensureID)), + action: async ({ request }) => { expectJsonRequest(request) @@ -28,16 +34,25 @@ export const getLoaderAction: GetLoaderAction = ({ const json = (await request.json()) as StrictID if (createNewProjectSchema.safeParse(json).success) { - return api.create({ body: json }) + return api.POST('/api/projects', { body: json }).then(responseParser({ notThrowExc: true })) } const isDeleteAction = deleteProjectAction.safeParse(json) if (isDeleteAction.success) { - return api.delete({ id: isDeleteAction.data.projectId }) + return api + .DELETE('/api/projects/{project_id}', { + params: { path: { project_id: isDeleteAction.data.projectId } } + }) + .then(responseParser({ notThrowExc: true })) } if (editProjectSchema.safeParse(json).success) { - return api.update({ body: json }) + return api + .POST('/api/projects/{project_id}/info', { + params: { path: { project_id: json.id } }, + body: json + }) + .then(responseParser({ notThrowExc: true })) } throw 'Undefined action' diff --git a/ui/packages/evidently-ui-lib/src/routes-components/snapshotId/data.tsx b/ui/packages/evidently-ui-lib/src/routes-components/snapshotId/data.tsx index fa97c48b75..ed0f289446 100644 --- a/ui/packages/evidently-ui-lib/src/routes-components/snapshotId/data.tsx +++ b/ui/packages/evidently-ui-lib/src/routes-components/snapshotId/data.tsx @@ -1,17 +1,24 @@ import invariant from 'tiny-invariant' import type { GetLoaderAction } from '~/api/utils' -import { DashboardProvider } from '~/api/types/providers/dashboard' import { DashboardInfoModel } from '~/api/types' +import { API_CLIENT_TYPE, responseParser } from '~/api/client-heplers' +import { JSONParseExtended } from '~/api/JsonParser' export type LoaderData = DashboardInfoModel -export const getLoaderAction: GetLoaderAction = ({ api }) => ({ +export const getLoaderAction: GetLoaderAction = ({ api }) => ({ loader: ({ params }) => { const { projectId, snapshotId } = params invariant(projectId, 'missing projectId') invariant(snapshotId, 'missing testSuiteId') - return api.getSnapshotDashboard({ project: { id: projectId }, snapshot: { id: snapshotId } }) + return api + .GET('/api/projects/{project_id}/{snapshot_id}/data', { + params: { path: { project_id: projectId, snapshot_id: snapshotId } }, + parseAs: 'text' + }) + .then(responseParser()) + .then(JSONParseExtended) } }) diff --git a/ui/packages/evidently-ui-lib/src/routes-components/snapshotId/index.tsx b/ui/packages/evidently-ui-lib/src/routes-components/snapshotId/index.tsx index f98e484b49..5523c06d68 100644 --- a/ui/packages/evidently-ui-lib/src/routes-components/snapshotId/index.tsx +++ b/ui/packages/evidently-ui-lib/src/routes-components/snapshotId/index.tsx @@ -5,8 +5,9 @@ import DashboardContext, { CreateDashboardContextState } from '~/contexts/Dashbo import { crumbFunction } from '~/components/BreadCrumbs' import { LoaderData } from './data' import { Grid } from '@mui/material' -import { DashboardProvider } from '~/api/types/providers/dashboard' import { AdditionalGraphInfo, WidgetInfo } from '~/api' +import { API_CLIENT_TYPE, responseParser } from '~/api/client-heplers' +import { JSONParseExtended } from '~/api/JsonParser' export const handle: { crumb: crumbFunction; hide: Record } = { crumb: (_, { pathname, params }) => ({ to: pathname, linkText: String(params.snapshotId) }), @@ -15,7 +16,7 @@ export const handle: { crumb: crumbFunction; hide: Record { +export const SnapshotTemplate = ({ api }: { api: API_CLIENT_TYPE }) => { const { projectId, snapshotId } = useParams() invariant(projectId, 'missing projectId') invariant(snapshotId, 'missing snapshotId') @@ -26,17 +27,33 @@ export const SnapshotTemplate = ({ api }: { api: DashboardProvider }) => { - api.getDashboardGraph({ - project: { id: projectId }, - snapshot: { id: snapshotId }, - graph: { id: graphId } - }) as Promise, + api + .GET('/api/projects/{project_id}/{snapshot_id}/graphs_data/{graph_id}', { + params: { + path: { + project_id: projectId, + snapshot_id: snapshotId, + graph_id: encodeURIComponent(graphId) + } + }, + parseAs: 'text' + }) + .then(responseParser()) + .then(JSONParseExtended), getAdditionWidgetData: (widgetId) => - api.getDashboardGraph({ - project: { id: projectId }, - snapshot: { id: snapshotId }, - graph: { id: widgetId } - }) as Promise + api + .GET('/api/projects/{project_id}/{snapshot_id}/graphs_data/{graph_id}', { + params: { + path: { + project_id: projectId, + snapshot_id: snapshotId, + graph_id: encodeURIComponent(widgetId) + } + }, + parseAs: 'text' + }) + .then(responseParser()) + .then(JSONParseExtended) })} > diff --git a/ui/packages/evidently-ui-lib/src/routes-components/snapshots/data.tsx b/ui/packages/evidently-ui-lib/src/routes-components/snapshots/data.tsx index 18a3b46f48..fba461bcd9 100644 --- a/ui/packages/evidently-ui-lib/src/routes-components/snapshots/data.tsx +++ b/ui/packages/evidently-ui-lib/src/routes-components/snapshots/data.tsx @@ -1,10 +1,10 @@ import { ActionFunctionArgs } from 'react-router-dom' import invariant from 'tiny-invariant' import { expectJsonRequest, GetLoaderAction } from '~/api/utils' -import { ProjectsProvider } from '~/api/types/providers/projects' import { ReportModel, TestSuiteModel } from '~/api/types' import { z } from 'zod' import { ErrorData } from '~/api/types/utils' +import { API_CLIENT_TYPE, responseParser } from '~/api/client-heplers' export type ReportsLoaderData = ReportModel[] @@ -23,7 +23,7 @@ export const deleteSnapshotSchema = z.object({ }) const getAction = - (api: ProjectsProvider) => + (api: API_CLIENT_TYPE) => async ({ request, params }: ActionFunctionArgs) => { invariant(params.projectId, 'missing projectId') expectJsonRequest(request) @@ -33,16 +33,23 @@ const getAction = const reloadParse = reloadSnapshotSchema.safeParse(data) if (reloadParse.success) { - return api.reloadSnapshots({ project: { id: params.projectId } }) + return api + .GET('/api/projects/{project_id}/reload', { + params: { path: { project_id: params.projectId } } + }) + .then(responseParser({ notThrowExc: true })) } const deleteParse = deleteSnapshotSchema.safeParse(data) if (deleteParse.success) { - return api.deleteSnapshot({ - project: { id: params.projectId }, - snapshot: { id: deleteParse.data.snapshotId } - }) + return api + .DELETE('/api/projects/{project_id}/{snapshot_id}', { + params: { + path: { project_id: params.projectId, snapshot_id: deleteParse.data.snapshotId } + } + }) + .then(responseParser({ notThrowExc: true })) } return { @@ -50,9 +57,7 @@ const getAction = } satisfies ErrorData } -export const injectReportsAPI: GetLoaderAction = ({ - api -}) => ({ +export const injectReportsAPI: GetLoaderAction = ({ api }) => ({ loader: ({ params }) => { invariant(params.projectId, 'missing projectId') @@ -60,14 +65,18 @@ export const injectReportsAPI: GetLoaderAction = ({ +export const injectTestSuitesAPI: GetLoaderAction = ({ api }) => ({ loader: ({ params }) => { @@ -77,7 +86,11 @@ export const injectTestSuitesAPI: GetLoaderAction { - return + return } return { Component, ...rest } diff --git a/ui/service/src/Routes/projects/projectId/dashboard/index.tsx b/ui/service/src/Routes/projects/projectId/dashboard/index.tsx index a6164c3d23..a768bb23d3 100644 --- a/ui/service/src/Routes/projects/projectId/dashboard/index.tsx +++ b/ui/service/src/Routes/projects/projectId/dashboard/index.tsx @@ -1,9 +1,9 @@ import { GenericErrorBoundary } from 'evidently-ui-lib/components/Error' import { RouteObject } from 'evidently-ui-lib/shared-dependencies/react-router-dom' import { getLoaderAction } from 'evidently-ui-lib/routes-components/dashboard/data' -import { dashboardProvider } from '~/api' +import { clientAPI } from '~/api' -const { loader } = getLoaderAction({ api: dashboardProvider }) +const { loader } = getLoaderAction({ api: clientAPI }) export default { index: true, diff --git a/ui/service/src/Routes/projects/projectId/index.tsx b/ui/service/src/Routes/projects/projectId/index.tsx index b3d3b069e9..f1a258f914 100644 --- a/ui/service/src/Routes/projects/projectId/index.tsx +++ b/ui/service/src/Routes/projects/projectId/index.tsx @@ -1,9 +1,9 @@ import { GenericErrorBoundary } from 'evidently-ui-lib/components/Error' import { RouteObject } from 'evidently-ui-lib/shared-dependencies/react-router-dom' import { getLoaderAction } from 'evidently-ui-lib/routes-components/projectId/data' -import { projectProvider } from '~/api' +import { clientAPI } from '~/api' -const { loader } = getLoaderAction({ api: projectProvider }) +const { loader } = getLoaderAction({ api: clientAPI }) //////////////////// // children routes diff --git a/ui/service/src/Routes/projects/projectId/reports/index.tsx b/ui/service/src/Routes/projects/projectId/reports/index.tsx index 7f17b1509e..b45ad86175 100644 --- a/ui/service/src/Routes/projects/projectId/reports/index.tsx +++ b/ui/service/src/Routes/projects/projectId/reports/index.tsx @@ -1,9 +1,9 @@ import { ActionsErrorSnackbar, GenericErrorBoundary } from 'evidently-ui-lib/components/Error' import { RouteObject } from 'evidently-ui-lib/shared-dependencies/react-router-dom' import { injectReportsAPI } from 'evidently-ui-lib/routes-components/snapshots/data' -import { projectProvider } from '~/api' +import { clientAPI } from '~/api' -const { loader, action } = injectReportsAPI({ api: projectProvider }) +const { loader, action } = injectReportsAPI({ api: clientAPI }) //////////////////// // children routes diff --git a/ui/service/src/Routes/projects/projectId/test-suites/index.tsx b/ui/service/src/Routes/projects/projectId/test-suites/index.tsx index c6bed77ba9..d33389634f 100644 --- a/ui/service/src/Routes/projects/projectId/test-suites/index.tsx +++ b/ui/service/src/Routes/projects/projectId/test-suites/index.tsx @@ -1,11 +1,11 @@ import { RouteObject } from 'evidently-ui-lib/shared-dependencies/react-router-dom' import { injectTestSuitesAPI } from 'evidently-ui-lib/routes-components/snapshots/data' -import { projectProvider } from '~/api' +import { clientAPI } from '~/api' import TestSuiteRoute from './testSuiteId' import { ActionsErrorSnackbar, GenericErrorBoundary } from 'evidently-ui-lib/components/Error' -const { loader, action } = injectTestSuitesAPI({ api: projectProvider }) +const { loader, action } = injectTestSuitesAPI({ api: clientAPI }) export default { id: 'test_suites', diff --git a/ui/service/src/Routes/projectsList/index.tsx b/ui/service/src/Routes/projectsList/index.tsx index 4e842b55dc..6540c4590d 100644 --- a/ui/service/src/Routes/projectsList/index.tsx +++ b/ui/service/src/Routes/projectsList/index.tsx @@ -1,9 +1,9 @@ import { ActionsErrorSnackbar, GenericErrorBoundary } from 'evidently-ui-lib/components/Error' import { RouteObject } from 'evidently-ui-lib/shared-dependencies/react-router-dom' import { getLoaderAction } from 'evidently-ui-lib/routes-components/projectsList/data' -import { projectProvider } from '~/api' +import { clientAPI } from '~/api' -const { loader, action } = getLoaderAction({ api: projectProvider }) +const { loader, action } = getLoaderAction({ api: clientAPI }) export default { index: true, diff --git a/ui/service/src/api/index.ts b/ui/service/src/api/index.ts index d9761a5a0b..5d352412bb 100644 --- a/ui/service/src/api/index.ts +++ b/ui/service/src/api/index.ts @@ -1,7 +1,4 @@ -import { getDashboardProvider } from 'evidently-ui-lib/api/providers/dashboard' -import { getProjectsProvider } from 'evidently-ui-lib/api/providers/projects' -import { getVersionProvider } from 'evidently-ui-lib/api/providers/version' +import { BackendPaths } from 'evidently-ui-lib/api/types' +import { createClient } from 'evidently-ui-lib/shared-dependencies/openapi-fetch' -export const dashboardProvider = getDashboardProvider('/') -export const projectProvider = getProjectsProvider('/') -export const versionProvider = getVersionProvider('/') +export const clientAPI = createClient({ baseUrl: '/' })