@nebula.js/sn-tabbed-container 1.1.4 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-specification/spec.json +1 -1
- package/core/esm/index.js +2 -2
- package/dist/sn-tabbed-container.js +2 -2
- package/dist/sn-tabbed-container.systemjs.js +3 -3
- package/package.json +7 -7
- package/sn-tabbed-container-ext/dist/sn-tabbed-container.js +2 -2
- package/sn-tabbed-container-ext/sn-tabbed-container.qext +1 -1
package/core/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-tabbed-container
|
|
2
|
+
* @nebula.js/sn-tabbed-container v2.0.1
|
|
3
3
|
* Copyright (c) 2025 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -86,4 +86,4 @@ import{useOptions as e,useEffect as t,useState as r,onTakeSnapshot as n,useKeybo
|
|
|
86
86
|
}
|
|
87
87
|
`),js.rippleVisible,Gs,550,(({theme:e})=>e.transitions.easing.easeInOut),js.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),js.child,js.childLeaving,Hs,550,(({theme:e})=>e.transitions.easing.easeInOut),js.childPulsate,Ws,(({theme:e})=>e.transitions.easing.easeInOut)),Vs=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiTouchRipple"}),{center:n=!1,classes:o={},className:i}=r,a=z(r,Ns),[l,s]=v.useState([]),c=v.useRef(0),d=v.useRef(null);v.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const u=v.useRef(!1),p=li(),h=v.useRef(null),f=v.useRef(null),m=v.useCallback((e=>{const{pulsate:t,rippleX:r,rippleY:n,rippleSize:i,cb:a}=e;s((e=>[...e,zr.jsx(Us,{classes:{ripple:fo(o.ripple,js.ripple),rippleVisible:fo(o.rippleVisible,js.rippleVisible),ripplePulsate:fo(o.ripplePulsate,js.ripplePulsate),child:fo(o.child,js.child),childLeaving:fo(o.childLeaving,js.childLeaving),childPulsate:fo(o.childPulsate,js.childPulsate)},timeout:550,pulsate:t,rippleX:r,rippleY:n,rippleSize:i},c.current)])),c.current+=1,d.current=a}),[o]),b=v.useCallback(((e={},t={},r=()=>{})=>{const{pulsate:o=!1,center:i=n||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&u.current)return void(u.current=!1);"touchstart"===(null==e?void 0:e.type)&&(u.current=!0);const l=a?null:f.current,s=l?l.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,d,b;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(s.width/2),d=Math.round(s.height/2);else{const{clientX:t,clientY:r}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-s.left),d=Math.round(r-s.top)}if(i)b=Math.sqrt((2*s.width**2+s.height**2)/3),b%2==0&&(b+=1);else{const e=2*Math.max(Math.abs((l?l.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((l?l.clientHeight:0)-d),d)+2;b=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{m({pulsate:o,rippleX:c,rippleY:d,rippleSize:b,cb:r})},p.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):m({pulsate:o,rippleX:c,rippleY:d,rippleSize:b,cb:r})}),[n,m,p]),g=v.useCallback((()=>{b({},{pulsate:!0})}),[b]),y=v.useCallback(((e,t)=>{if(p.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void p.start(0,(()=>{y(e,t)}));h.current=null,s((e=>e.length>0?e.slice(1):e)),d.current=t}),[p]);return v.useImperativeHandle(t,(()=>({pulsate:g,start:b,stop:y})),[g,b,y]),zr.jsx(Ys,$({className:fo(js.root,o.root,i),ref:f},a,{children:zr.jsx(_s,{component:null,exit:!0,children:l})}))}));function qs(e){return go("MuiButtonBase",e)}const Ks=vo("MuiButtonBase",["root","disabled","focusVisible"]),Xs=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Zs=Ul("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Ks.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Js=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiButtonBase"}),{action:n,centerRipple:o=!1,children:i,className:a,component:l="button",disabled:s=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:u=!1,LinkComponent:p="a",onBlur:h,onClick:f,onContextMenu:m,onDragLeave:b,onFocus:g,onFocusVisible:y,onKeyDown:x,onKeyUp:E,onMouseDown:S,onMouseLeave:C,onMouseUp:w,onTouchEnd:R,onTouchMove:k,onTouchStart:A,tabIndex:_=0,TouchRippleProps:I,touchRippleRef:T,type:L}=r,O=z(r,Xs),P=v.useRef(null),M=v.useRef(null),j=ni(M,T),{isFocusVisibleRef:N,onFocus:B,onBlur:D,ref:F}=bi(),[G,H]=v.useState(!1);s&&G&&H(!1),v.useImperativeHandle(n,(()=>({focusVisible:()=>{H(!0),P.current.focus()}})),[]);const[W,Y]=v.useState(!1);v.useEffect((()=>{Y(!0)}),[]);const U=W&&!c&&!s;function V(e,t,r=d){return ri((n=>{t&&t(n);return!r&&M.current&&M.current[e](n),!0}))}v.useEffect((()=>{G&&u&&!c&&W&&M.current.pulsate()}),[c,u,G,W]);const q=V("start",S),K=V("stop",m),X=V("stop",b),Z=V("stop",w),J=V("stop",(e=>{G&&e.preventDefault(),C&&C(e)})),Q=V("start",A),ee=V("stop",R),te=V("stop",k),re=V("stop",(e=>{D(e),!1===N.current&&H(!1),h&&h(e)}),!1),ne=ri((e=>{P.current||(P.current=e.currentTarget),B(e),!0===N.current&&(H(!0),y&&y(e)),g&&g(e)})),oe=()=>{const e=P.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},ie=v.useRef(!1),ae=ri((e=>{u&&!ie.current&&G&&M.current&&" "===e.key&&(ie.current=!0,M.current.stop(e,(()=>{M.current.start(e)}))),e.target===e.currentTarget&&oe()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&oe()&&"Enter"===e.key&&!s&&(e.preventDefault(),f&&f(e))})),le=ri((e=>{u&&" "===e.key&&M.current&&G&&!e.defaultPrevented&&(ie.current=!1,M.current.stop(e,(()=>{M.current.pulsate(e)}))),E&&E(e),f&&e.target===e.currentTarget&&oe()&&" "===e.key&&!e.defaultPrevented&&f(e)}));let se=l;"button"===se&&(O.href||O.to)&&(se=p);const ce={};"button"===se?(ce.type=void 0===L?"button":L,ce.disabled=s):(O.href||O.to||(ce.role="button"),s&&(ce["aria-disabled"]=s));const de=ni(t,F,P),ue=$({},r,{centerRipple:o,component:l,disabled:s,disableRipple:c,disableTouchRipple:d,focusRipple:u,tabIndex:_,focusVisible:G}),pe=(e=>{const{disabled:t,focusVisible:r,focusVisibleClassName:n,classes:o}=e,i=Si({root:["root",t&&"disabled",r&&"focusVisible"]},qs,o);return r&&n&&(i.root+=` ${n}`),i})(ue);return zr.jsxs(Zs,$({as:se,className:fo(pe.root,a),ownerState:ue,onBlur:re,onClick:f,onContextMenu:K,onFocus:ne,onKeyDown:ae,onKeyUp:le,onMouseDown:q,onMouseLeave:J,onMouseUp:Z,onDragLeave:X,onTouchEnd:ee,onTouchMove:te,onTouchStart:Q,ref:de,tabIndex:s?-1:_,type:L},ce,O,{children:[i,U?zr.jsx(Vs,$({ref:j,center:o},I)):null]}))}));function Qs(e){return go("MuiTypography",e)}vo("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const ec=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],tc=Ul("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.variant&&t[r.variant],"inherit"!==r.align&&t[`align${nn(r.align)}`],r.noWrap&&t.noWrap,r.gutterBottom&&t.gutterBottom,r.paragraph&&t.paragraph]}})((({theme:e,ownerState:t})=>$({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16}))),rc={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},nc={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},oc=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiTypography"}),n=(e=>nc[e]||e)(r.color),o=so($({},r,{color:n})),{align:i="inherit",className:a,component:l,gutterBottom:s=!1,noWrap:c=!1,paragraph:d=!1,variant:u="body1",variantMapping:p=rc}=o,h=z(o,ec),f=$({},o,{align:i,color:n,className:a,component:l,gutterBottom:s,noWrap:c,paragraph:d,variant:u,variantMapping:p}),m=l||(d?"p":p[u]||rc[u])||"span",b=(e=>{const{align:t,gutterBottom:r,noWrap:n,paragraph:o,variant:i,classes:a}=e;return Si({root:["root",i,"inherit"!==e.align&&`align${nn(t)}`,r&&"gutterBottom",n&&"noWrap",o&&"paragraph"]},Qs,a)})(f);return zr.jsx(tc,$({as:m,ref:t,ownerState:f,className:fo(b.root,a)},h))}));const ic=v.forwardRef((function(e,t){const{children:r,container:n,disablePortal:o=!1}=e,[i,a]=v.useState(null),l=ni(v.isValidElement(r)?_i(r):null,t);if(Ho((()=>{o||a(function(e){return"function"==typeof e?e():e}(n)||document.body)}),[n,o]),Ho((()=>{if(i&&!o)return Jo(t,i),()=>{Jo(t,null)}}),[t,i,o]),o){if(v.isValidElement(r)){const e={ref:l};return v.cloneElement(r,e)}return zr.jsx(v.Fragment,{children:r})}return zr.jsx(v.Fragment,{children:i?T.createPortal(r,i):i})})),ac=["onChange","maxRows","minRows","style","value"];function lc(e){return parseInt(e,10)||0}const sc={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function cc(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const dc=v.forwardRef((function(e,t){const{onChange:r,maxRows:n,minRows:o=1,style:i,value:a}=e,l=z(e,ac),{current:s}=v.useRef(null!=a),c=v.useRef(null),d=ni(t,c),u=v.useRef(null),p=v.useRef(null),h=v.useCallback((()=>{const t=c.current,r=p.current;if(!t||!r)return;const i=Zo(t).getComputedStyle(t);if("0px"===i.width)return{outerHeightStyle:0,overflowing:!1};r.style.width=i.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");const a=i.boxSizing,l=lc(i.paddingBottom)+lc(i.paddingTop),s=lc(i.borderBottomWidth)+lc(i.borderTopWidth),d=r.scrollHeight;r.value="x";const u=r.scrollHeight;let h=d;o&&(h=Math.max(Number(o)*u,h)),n&&(h=Math.min(Number(n)*u,h)),h=Math.max(h,u);return{outerHeightStyle:h+("border-box"===a?l+s:0),overflowing:Math.abs(h-d)<=1}}),[n,o,e.placeholder]),f=ri((()=>{const e=c.current,t=h();if(!e||!t||cc(t))return!1;const r=t.outerHeightStyle;return null!=u.current&&u.current!==r})),m=v.useCallback((()=>{const e=c.current,t=h();if(!e||!t||cc(t))return;const r=t.outerHeightStyle;u.current!==r&&(u.current=r,e.style.height=`${r}px`),e.style.overflow=t.overflowing?"hidden":""}),[h]),b=v.useRef(-1);Ho((()=>{const e=Ko(m),t=null==c?void 0:c.current;if(!t)return;const r=Zo(t);let n;return r.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(n=new ResizeObserver((()=>{f()&&(n.unobserve(t),cancelAnimationFrame(b.current),m(),b.current=requestAnimationFrame((()=>{n.observe(t)})))})),n.observe(t)),()=>{e.clear(),cancelAnimationFrame(b.current),r.removeEventListener("resize",e),n&&n.disconnect()}}),[h,m,f]),Ho((()=>{m()}));return zr.jsxs(v.Fragment,{children:[zr.jsx("textarea",$({value:a,onChange:e=>{s||m(),r&&r(e)},ref:d,rows:o,style:i},l)),zr.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:p,tabIndex:-1,style:$({},sc,i,{paddingTop:0,paddingBottom:0})})]})}));const uc=v.createContext(void 0);function pc(){return v.useContext(uc)}function hc(e){return zr.jsx(ao,$({},e,{defaultTheme:hl,themeId:N}))}function fc(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function mc(e){return go("MuiInputBase",e)}const bc=vo("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),gc=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],vc=Ul("div",{name:"MuiInputBase",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.formControl&&t.formControl,r.startAdornment&&t.adornedStart,r.endAdornment&&t.adornedEnd,r.error&&t.error,"small"===r.size&&t.sizeSmall,r.multiline&&t.multiline,r.color&&t[`color${nn(r.color)}`],r.fullWidth&&t.fullWidth,r.hiddenLabel&&t.hiddenLabel]}})((({theme:e,ownerState:t})=>$({},e.typography.body1,{color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${bc.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&$({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"}))),yc=Ul("input",{name:"MuiInputBase",slot:"Input",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.input,"small"===r.size&&t.inputSizeSmall,r.multiline&&t.inputMultiline,"search"===r.type&&t.inputTypeSearch,r.startAdornment&&t.inputAdornedStart,r.endAdornment&&t.inputAdornedEnd,r.hiddenLabel&&t.inputHiddenLabel]}})((({theme:e,ownerState:t})=>{const r="light"===e.palette.mode,n=$({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5},{transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})}),o={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:r?.42:.5};return $({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&:-ms-input-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${bc.formControl} &`]:{"&::-webkit-input-placeholder":o,"&::-moz-placeholder":o,"&:-ms-input-placeholder":o,"&::-ms-input-placeholder":o,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus:-ms-input-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${bc.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===t.size&&{paddingTop:1},t.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===t.type&&{MozAppearance:"textfield"})})),xc=zr.jsx(hc,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Ec=v.forwardRef((function(e,t){var r;const n=ls({props:e,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:l,components:s={},componentsProps:c={},defaultValue:d,disabled:u,disableInjectingGlobalStyles:p,endAdornment:h,fullWidth:f=!1,id:m,inputComponent:b="input",inputProps:g={},inputRef:y,maxRows:x,minRows:E,multiline:S=!1,name:C,onBlur:w,onChange:R,onClick:k,onFocus:A,onKeyDown:_,onKeyUp:I,placeholder:T,readOnly:L,renderSuffix:O,rows:P,slotProps:j={},slots:N={},startAdornment:B,type:D="text",value:F}=n,G=z(n,gc),H=null!=g.value?g.value:F,{current:W}=v.useRef(null!=H),Y=v.useRef(),U=v.useCallback((e=>{}),[]),V=ni(Y,y,g.ref,U),[q,K]=v.useState(!1),X=pc(),Z=function({props:e,states:t,muiFormControl:r}){return t.reduce(((t,n)=>(t[n]=e[n],r&&void 0===e[n]&&(t[n]=r[n]),t)),{})}({props:n,muiFormControl:X,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Z.focused=X?X.focused:q,v.useEffect((()=>{!X&&u&&q&&(K(!1),w&&w())}),[X,u,q,w]);const J=X&&X.onFilled,Q=X&&X.onEmpty,ee=v.useCallback((e=>{!function(e,t=!1){return e&&(fc(e.value)&&""!==e.value||t&&fc(e.defaultValue)&&""!==e.defaultValue)}(e)?Q&&Q():J&&J()}),[J,Q]);Ho((()=>{W&&ee({value:H})}),[H,ee,W]);v.useEffect((()=>{ee(Y.current)}),[]);let te=b,re=g;S&&"input"===te&&(re=$(P?{type:void 0,minRows:P,maxRows:P}:{type:void 0,maxRows:x,minRows:E},re),te=dc);v.useEffect((()=>{X&&X.setAdornedStart(Boolean(B))}),[X,B]);const ne=$({},n,{color:Z.color||"primary",disabled:Z.disabled,endAdornment:h,error:Z.error,focused:Z.focused,formControl:X,fullWidth:f,hiddenLabel:Z.hiddenLabel,multiline:S,size:Z.size,startAdornment:B,type:D}),oe=(e=>{const{classes:t,color:r,disabled:n,error:o,endAdornment:i,focused:a,formControl:l,fullWidth:s,hiddenLabel:c,multiline:d,readOnly:u,size:p,startAdornment:h,type:f}=e;return Si({root:["root",`color${nn(r)}`,n&&"disabled",o&&"error",s&&"fullWidth",a&&"focused",l&&"formControl",p&&"medium"!==p&&`size${nn(p)}`,d&&"multiline",h&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",u&&"readOnly"],input:["input",n&&"disabled","search"===f&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",h&&"inputAdornedStart",i&&"inputAdornedEnd",u&&"readOnly"]},mc,t)})(ne),ie=N.root||s.Root||vc,ae=j.root||c.root||{},le=N.input||s.Input||yc;return re=$({},re,null!=(r=j.input)?r:c.input),zr.jsxs(v.Fragment,{children:[!p&&xc,zr.jsxs(ie,$({},ae,!Ci(ie)&&{ownerState:$({},ne,ae.ownerState)},{ref:t,onClick:e=>{Y.current&&e.currentTarget===e.target&&Y.current.focus(),k&&k(e)}},G,{className:fo(oe.root,ae.className,l,L&&"MuiInputBase-readOnly"),children:[B,zr.jsx(uc.Provider,{value:null,children:zr.jsx(le,$({ownerState:ne,"aria-invalid":Z.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:d,disabled:Z.disabled,id:m,onAnimationStart:e=>{ee("mui-auto-fill-cancel"===e.animationName?Y.current:{value:"x"})},name:C,placeholder:T,readOnly:L,required:Z.required,rows:P,value:H,onKeyDown:_,onKeyUp:I,type:D},re,!Ci(le)&&{as:te,ownerState:$({},ne,re.ownerState)},{ref:V,className:fo(oe.input,re.className,L&&"MuiInputBase-readOnly"),onBlur:e=>{w&&w(e),g.onBlur&&g.onBlur(e),X&&X.onBlur?X.onBlur(e):K(!1)},onChange:(e,...t)=>{if(!W){const t=e.target||Y.current;if(null==t)throw new Error(M(1));ee({value:t.value})}g.onChange&&g.onChange(e,...t),R&&R(e,...t)},onFocus:e=>{Z.disabled?e.stopPropagation():(A&&A(e),g.onFocus&&g.onFocus(e),X&&X.onFocus?X.onFocus(e):K(!0))}}))}),h,O?O($({},Z,{startAdornment:B})):null]}))]})})),Sc=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Cc={entering:{opacity:1},entered:{opacity:1}},wc=v.forwardRef((function(e,t){const r=fl(),n={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:a,easing:l,in:s,onEnter:c,onEntered:d,onEntering:u,onExit:p,onExited:h,onExiting:f,style:m,timeout:b=n,TransitionComponent:g=Ss}=e,y=z(e,Sc),x=v.useRef(null),E=ni(x,_i(a),t),S=e=>t=>{if(e){const r=x.current;void 0===t?e(r):e(r,t)}},C=S(u),w=S(((e,t)=>{Is(e);const n=Ts({style:m,timeout:b,easing:l},{mode:"enter"});e.style.webkitTransition=r.transitions.create("opacity",n),e.style.transition=r.transitions.create("opacity",n),c&&c(e,t)})),R=S(d),k=S(f),A=S((e=>{const t=Ts({style:m,timeout:b,easing:l},{mode:"exit"});e.style.webkitTransition=r.transitions.create("opacity",t),e.style.transition=r.transitions.create("opacity",t),p&&p(e)})),_=S(h);return zr.jsx(g,$({appear:i,in:s,nodeRef:x,onEnter:w,onEntered:R,onEntering:C,onExit:A,onExited:_,onExiting:k,addEndListener:e=>{o&&o(x.current,e)},timeout:b},y,{children:(e,t)=>v.cloneElement(a,$({style:$({opacity:0,visibility:"exited"!==e||s?void 0:"hidden"},Cc[e],m,a.props.style),ref:E},t))}))}));function Rc(e){return go("MuiBackdrop",e)}vo("MuiBackdrop",["root","invisible"]);const kc=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],Ac=Ul("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.invisible&&t.invisible]}})((({ownerState:e})=>$({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"}))),_c=v.forwardRef((function(e,t){var r,n,o;const i=ls({props:e,name:"MuiBackdrop"}),{children:a,className:l,component:s="div",components:c={},componentsProps:d={},invisible:u=!1,open:p,slotProps:h={},slots:f={},TransitionComponent:m=wc,transitionDuration:b}=i,g=z(i,kc),v=$({},i,{component:s,invisible:u}),y=(e=>{const{classes:t,invisible:r}=e;return Si({root:["root",r&&"invisible"]},Rc,t)})(v),x=null!=(r=h.root)?r:d.root;return zr.jsx(m,$({in:p,timeout:b},g,{children:zr.jsx(Ac,$({"aria-hidden":!0},x,{as:null!=(n=null!=(o=f.root)?o:c.Root)?n:s,className:fo(y.root,l,null==x?void 0:x.className),ownerState:$({},v,null==x?void 0:x.ownerState),classes:y,ref:t,children:a}))}))})),Ic=vo("MuiBox",["root"]),Tc=pl(),Lc=function(e={}){const{themeId:t,defaultTheme:r,defaultClassName:n="MuiBox-root",generateClassName:o}=e,i=Fr("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Zn);return v.forwardRef((function(e,a){const l=oo(r),s=so(e),{className:c,component:d="div"}=s,u=z(s,mo);return zr.jsx(i,$({as:d,ref:a,className:fo(c,o?o(n):n),theme:t&&l[t]||l},u))}))}({themeId:N,defaultTheme:Tc,defaultClassName:Ic.root,generateClassName:po.generate});function Oc(e){return go("MuiButton",e)}const Pc=vo("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Mc=v.createContext({}),jc=v.createContext(void 0),Nc=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],$c=e=>$({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),zc=Ul(Js,{shouldForwardProp:e=>Yl(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`${r.variant}${nn(r.color)}`],t[`size${nn(r.size)}`],t[`${r.variant}Size${nn(r.size)}`],"inherit"===r.color&&t.colorInherit,r.disableElevation&&t.disableElevation,r.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var r,n;const o="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],i="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return $({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":$({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Xi(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===t.variant&&"inherit"!==t.color&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Xi(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===t.variant&&"inherit"!==t.color&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Xi(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:e.vars?e.vars.palette.Button.inheritContainedHoverBg:i,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},"contained"===t.variant&&"inherit"!==t.color&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":$({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Pc.focusVisible}`]:$({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Pc.disabled}`]:$({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"contained"===t.variant&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},"text"===t.variant&&{padding:"6px 8px"},"text"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main},"outlined"===t.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${Xi(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(r=(n=e.palette).getContrastText)?void 0:r.call(n,e.palette.grey[300]),backgroundColor:e.vars?e.vars.palette.Button.inheritContainedBg:o,boxShadow:(e.vars||e).shadows[2]},"contained"===t.variant&&"inherit"!==t.color&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},"inherit"===t.color&&{color:"inherit",borderColor:"currentColor"},"small"===t.size&&"text"===t.variant&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"text"===t.variant&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"outlined"===t.variant&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"outlined"===t.variant&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},"small"===t.size&&"contained"===t.variant&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},"large"===t.size&&"contained"===t.variant&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})}),(({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Pc.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Pc.disabled}`]:{boxShadow:"none"}})),Bc=Ul("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.startIcon,t[`iconSize${nn(r.size)}`]]}})((({ownerState:e})=>$({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},$c(e)))),Dc=Ul("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.endIcon,t[`iconSize${nn(r.size)}`]]}})((({ownerState:e})=>$({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},$c(e)))),Fc=v.forwardRef((function(e,t){const r=v.useContext(Mc),n=v.useContext(jc),o=ls({props:Go(r,e),name:"MuiButton"}),{children:i,color:a="primary",component:l="button",className:s,disabled:c=!1,disableElevation:d=!1,disableFocusRipple:u=!1,endIcon:p,focusVisibleClassName:h,fullWidth:f=!1,size:m="medium",startIcon:b,type:g,variant:y="text"}=o,x=z(o,Nc),E=$({},o,{color:a,component:l,disabled:c,disableElevation:d,disableFocusRipple:u,fullWidth:f,size:m,type:g,variant:y}),S=(e=>{const{color:t,disableElevation:r,fullWidth:n,size:o,variant:i,classes:a}=e;return $({},a,Si({root:["root",i,`${i}${nn(t)}`,`size${nn(o)}`,`${i}Size${nn(o)}`,`color${nn(t)}`,r&&"disableElevation",n&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${nn(o)}`],endIcon:["icon","endIcon",`iconSize${nn(o)}`]},Oc,a))})(E),C=b&&zr.jsx(Bc,{className:S.startIcon,ownerState:E,children:b}),w=p&&zr.jsx(Dc,{className:S.endIcon,ownerState:E,children:p}),R=n||"";return zr.jsxs(zc,$({ownerState:E,className:fo(r.className,S.root,s,R),component:l,disabled:c,focusRipple:!u,focusVisibleClassName:fo(S.focusVisible,h),ref:t,type:g},x,{classes:S,children:[C,i,w]}))}));function Gc(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Hc(e){return parseInt(Zo(e).getComputedStyle(e).paddingRight,10)||0}function Wc(e,t,r,n,o){const i=[t,r,...n];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),r=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),r="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||r}(e);t&&r&&Gc(e,o)}))}function Yc(e,t){let r=-1;return e.some(((e,n)=>!!t(e)&&(r=n,!0))),r}function Uc(e,t){const r=[],n=e.container;if(!t.disableScrollLock){if(function(e){const t=Xo(e);return t.body===e?Zo(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(n)){const e=gi(Xo(n));r.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${Hc(n)+e}px`;const t=Xo(n).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{r.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Hc(t)+e}px`}))}let e;if(n.parentNode instanceof DocumentFragment)e=Xo(n).body;else{const t=n.parentElement,r=Zo(n);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===r.getComputedStyle(t).overflowY?t:n}r.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{r.forEach((({value:e,el:t,property:r})=>{e?t.style.setProperty(r,e):t.style.removeProperty(r)}))}}const Vc=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function qc(e){const t=[],r=[];return Array.from(e.querySelectorAll(Vc)).forEach(((e,n)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let r=t(`[name="${e.name}"]:checked`);return r||(r=t(`[name="${e.name}"]`)),r!==e}(e))}(e)&&(0===o?t.push(e):r.push({documentOrder:n,tabIndex:o,node:e}))})),r.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function Kc(){return!0}function Xc(e){const{children:t,disableAutoFocus:r=!1,disableEnforceFocus:n=!1,disableRestoreFocus:o=!1,getTabbable:i=qc,isEnabled:a=Kc,open:l}=e,s=v.useRef(!1),c=v.useRef(null),d=v.useRef(null),u=v.useRef(null),p=v.useRef(null),h=v.useRef(!1),f=v.useRef(null),m=ni(_i(t),f),b=v.useRef(null);v.useEffect((()=>{l&&f.current&&(h.current=!r)}),[r,l]),v.useEffect((()=>{if(!l||!f.current)return;const e=Xo(f.current);return f.current.contains(e.activeElement)||(f.current.hasAttribute("tabIndex")||f.current.setAttribute("tabIndex","-1"),h.current&&f.current.focus()),()=>{o||(u.current&&u.current.focus&&(s.current=!0,u.current.focus()),u.current=null)}}),[l]),v.useEffect((()=>{if(!l||!f.current)return;const e=Xo(f.current),t=t=>{b.current=t,!n&&a()&&"Tab"===t.key&&e.activeElement===f.current&&t.shiftKey&&(s.current=!0,d.current&&d.current.focus())},r=()=>{const t=f.current;if(null===t)return;if(!e.hasFocus()||!a()||s.current)return void(s.current=!1);if(t.contains(e.activeElement))return;if(n&&e.activeElement!==c.current&&e.activeElement!==d.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!h.current)return;let r=[];if(e.activeElement!==c.current&&e.activeElement!==d.current||(r=i(f.current)),r.length>0){var o,l;const e=Boolean((null==(o=b.current)?void 0:o.shiftKey)&&"Tab"===(null==(l=b.current)?void 0:l.key)),t=r[0],n=r[r.length-1];"string"!=typeof t&&"string"!=typeof n&&(e?n.focus():t.focus())}else t.focus()};e.addEventListener("focusin",r),e.addEventListener("keydown",t,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&r()}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",r),e.removeEventListener("keydown",t,!0)}}),[r,n,o,a,l,i]);const g=e=>{null===u.current&&(u.current=e.relatedTarget),h.current=!0};return zr.jsxs(v.Fragment,{children:[zr.jsx("div",{tabIndex:l?0:-1,onFocus:g,ref:c,"data-testid":"sentinelStart"}),v.cloneElement(t,{ref:m,onFocus:e=>{null===u.current&&(u.current=e.relatedTarget),h.current=!0,p.current=e.target;const r=t.props.onFocus;r&&r(e)}}),zr.jsx("div",{tabIndex:l?0:-1,onFocus:g,ref:d,"data-testid":"sentinelEnd"})]})}const Zc=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let r=this.modals.indexOf(e);if(-1!==r)return r;r=this.modals.length,this.modals.push(e),e.modalRef&&Gc(e.modalRef,!1);const n=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);Wc(t,e.mount,e.modalRef,n,!0);const o=Yc(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),r):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:n}),r)}mount(e,t){const r=Yc(this.containers,(t=>-1!==t.modals.indexOf(e))),n=this.containers[r];n.restore||(n.restore=Uc(n,t))}remove(e,t=!0){const r=this.modals.indexOf(e);if(-1===r)return r;const n=Yc(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[n];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(r,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&Gc(e.modalRef,t),Wc(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(n,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&Gc(e.modalRef,!1)}return r}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Jc(e){const{container:t,disableEscapeKeyDown:r=!1,disableScrollLock:n=!1,manager:o=Zc,closeAfterTransition:i=!1,onTransitionEnter:a,onTransitionExited:l,children:s,onClose:c,open:d,rootRef:u}=e,p=v.useRef({}),h=v.useRef(null),f=v.useRef(null),m=ni(f,u),[b,g]=v.useState(!d),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(s);let x=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(x=!1);const E=()=>(p.current.modalRef=f.current,p.current.mount=h.current,p.current),S=()=>{o.mount(E(),{disableScrollLock:n}),f.current&&(f.current.scrollTop=0)},C=ri((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Xo(h.current).body;o.add(E(),e),f.current&&S()})),w=v.useCallback((()=>o.isTopModal(E())),[o]),R=ri((e=>{h.current=e,e&&(d&&w()?S():f.current&&Gc(f.current,x))})),k=v.useCallback((()=>{o.remove(E(),x)}),[x,o]);v.useEffect((()=>()=>{k()}),[k]),v.useEffect((()=>{d?C():y&&i||k()}),[d,k,y,i,C]);const A=e=>t=>{var n;null==(n=e.onKeyDown)||n.call(e,t),"Escape"===t.key&&229!==t.which&&w()&&(r||(t.stopPropagation(),c&&c(t,"escapeKeyDown")))},_=e=>t=>{var r;null==(r=e.onClick)||r.call(e,t),t.target===t.currentTarget&&c&&c(t,"backdropClick")};return{getRootProps:(t={})=>{const r=wi(e);delete r.onTransitionEnter,delete r.onTransitionExited;const n=$({},r,t);return $({role:"presentation"},n,{onKeyDown:A(n),ref:m})},getBackdropProps:(e={})=>$({"aria-hidden":!0},e,{onClick:_(e),open:d}),getTransitionProps:()=>({onEnter:qo((()=>{g(!1),a&&a()}),null==s?void 0:s.props.onEnter),onExited:qo((()=>{g(!0),l&&l(),i&&k()}),null==s?void 0:s.props.onExited)}),rootRef:m,portalRef:R,isTopModal:w,exited:b,hasTransition:y}}function Qc(e){return go("MuiModal",e)}vo("MuiModal",["root","hidden","backdrop"]);const ed=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],td=Ul("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.open&&r.exited&&t.hidden]}})((({theme:e,ownerState:t})=>$({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"}))),rd=Ul(_c,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),nd=v.forwardRef((function(e,t){var r,n,o,i,a,l;const s=ls({name:"MuiModal",props:e}),{BackdropComponent:c=rd,BackdropProps:d,className:u,closeAfterTransition:p=!1,children:h,container:f,component:m,components:b={},componentsProps:g={},disableAutoFocus:y=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:E=!1,disablePortal:S=!1,disableRestoreFocus:C=!1,disableScrollLock:w=!1,hideBackdrop:R=!1,keepMounted:k=!1,onBackdropClick:A,open:_,slotProps:I,slots:T}=s,L=z(s,ed),O=$({},s,{closeAfterTransition:p,disableAutoFocus:y,disableEnforceFocus:x,disableEscapeKeyDown:E,disablePortal:S,disableRestoreFocus:C,disableScrollLock:w,hideBackdrop:R,keepMounted:k}),{getRootProps:P,getBackdropProps:M,getTransitionProps:j,portalRef:N,isTopModal:B,exited:D,hasTransition:F}=Jc($({},O,{rootRef:t})),G=$({},O,{exited:D}),H=(e=>{const{open:t,exited:r,classes:n}=e;return Si({root:["root",!t&&r&&"hidden"],backdrop:["backdrop"]},Qc,n)})(G),W={};if(void 0===h.props.tabIndex&&(W.tabIndex="-1"),F){const{onEnter:e,onExited:t}=j();W.onEnter=e,W.onExited=t}const Y=null!=(r=null!=(n=null==T?void 0:T.root)?n:b.Root)?r:td,U=null!=(o=null!=(i=null==T?void 0:T.backdrop)?i:b.Backdrop)?o:c,V=null!=(a=null==I?void 0:I.root)?a:g.root,q=null!=(l=null==I?void 0:I.backdrop)?l:g.backdrop,K=Ai({elementType:Y,externalSlotProps:V,externalForwardedProps:L,getSlotProps:P,additionalProps:{ref:t,as:m},ownerState:G,className:fo(u,null==V?void 0:V.className,null==H?void 0:H.root,!G.open&&G.exited&&(null==H?void 0:H.hidden))}),X=Ai({elementType:U,externalSlotProps:q,additionalProps:d,getSlotProps:e=>M($({},e,{onClick:t=>{A&&A(t),null!=e&&e.onClick&&e.onClick(t)}})),className:fo(null==q?void 0:q.className,null==d?void 0:d.className,null==H?void 0:H.backdrop),ownerState:G});return k||_||F&&!D?zr.jsx(ic,{ref:N,container:f,disablePortal:S,children:zr.jsxs(Y,$({},K,{children:[!R&&c?zr.jsx(U,$({},X)):null,zr.jsx(Xc,{disableEnforceFocus:x,disableAutoFocus:y,disableRestoreFocus:C,isEnabled:B,open:_,children:v.cloneElement(h,W)})]}))}):null}));function od(e){return go("MuiDivider",e)}const id=vo("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),ad=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],ld=Ul("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.absolute&&t.absolute,t[r.variant],r.light&&t.light,"vertical"===r.orientation&&t.vertical,r.flexItem&&t.flexItem,r.children&&t.withChildren,r.children&&"vertical"===r.orientation&&t.withChildrenVertical,"right"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignRight,"left"===r.textAlign&&"vertical"!==r.orientation&&t.textAlignLeft]}})((({theme:e,ownerState:t})=>$({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:Xi(e.palette.divider,.08)},"inset"===t.variant&&{marginLeft:72},"middle"===t.variant&&"horizontal"===t.orientation&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},"middle"===t.variant&&"vertical"===t.orientation&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},"vertical"===t.orientation&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"})),(({ownerState:e})=>$({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}})),(({theme:e,ownerState:t})=>$({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}})),(({theme:e,ownerState:t})=>$({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}})),(({ownerState:e})=>$({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}}))),sd=Ul("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.wrapper,"vertical"===r.orientation&&t.wrapperVertical]}})((({theme:e,ownerState:t})=>$({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},"vertical"===t.orientation&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}))),cd=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiDivider"}),{absolute:n=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:l=!1,light:s=!1,orientation:c="horizontal",role:d=("hr"!==a?"separator":void 0),textAlign:u="center",variant:p="fullWidth"}=r,h=z(r,ad),f=$({},r,{absolute:n,component:a,flexItem:l,light:s,orientation:c,role:d,textAlign:u,variant:p}),m=(e=>{const{absolute:t,children:r,classes:n,flexItem:o,light:i,orientation:a,textAlign:l,variant:s}=e;return Si({root:["root",t&&"absolute",s,i&&"light","vertical"===a&&"vertical",o&&"flexItem",r&&"withChildren",r&&"vertical"===a&&"withChildrenVertical","right"===l&&"vertical"!==a&&"textAlignRight","left"===l&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},od,n)})(f);return zr.jsx(ld,$({as:a,className:fo(m.root,i),role:d,ref:t,ownerState:f},h,{children:o?zr.jsx(sd,{className:m.wrapper,ownerState:f,children:o}):null}))}));cd.muiSkipListHighlight=!0;const dd=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function ud(e){return`scale(${e}, ${e**2})`}const pd={entering:{opacity:1,transform:ud(1)},entered:{opacity:1,transform:"none"}},hd="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),fd=v.forwardRef((function(e,t){const{addEndListener:r,appear:n=!0,children:o,easing:i,in:a,onEnter:l,onEntered:s,onEntering:c,onExit:d,onExited:u,onExiting:p,style:h,timeout:f="auto",TransitionComponent:m=Ss}=e,b=z(e,dd),g=li(),y=v.useRef(),x=fl(),E=v.useRef(null),S=ni(E,_i(o),t),C=e=>t=>{if(e){const r=E.current;void 0===t?e(r):e(r,t)}},w=C(c),R=C(((e,t)=>{Is(e);const{duration:r,delay:n,easing:o}=Ts({style:h,timeout:f,easing:i},{mode:"enter"});let a;"auto"===f?(a=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=a):a=r,e.style.transition=[x.transitions.create("opacity",{duration:a,delay:n}),x.transitions.create("transform",{duration:hd?a:.666*a,delay:n,easing:o})].join(","),l&&l(e,t)})),k=C(s),A=C(p),_=C((e=>{const{duration:t,delay:r,easing:n}=Ts({style:h,timeout:f,easing:i},{mode:"exit"});let o;"auto"===f?(o=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=o):o=t,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:r}),x.transitions.create("transform",{duration:hd?o:.666*o,delay:hd?r:r||.333*o,easing:n})].join(","),e.style.opacity=0,e.style.transform=ud(.75),d&&d(e)})),I=C(u);return zr.jsx(m,$({appear:n,in:a,nodeRef:E,onEnter:R,onEntered:k,onEntering:w,onExit:_,onExited:I,onExiting:A,addEndListener:e=>{"auto"===f&&g.start(y.current||0,e),r&&r(E.current,e)},timeout:"auto"===f?null:f},b,{children:(e,t)=>v.cloneElement(o,$({style:$({opacity:0,transform:ud(.75),visibility:"exited"!==e||a?void 0:"hidden"},pd[e],h,o.props.style),ref:S},t))}))}));function md(e){return go("MuiInputAdornment",e)}fd.muiSupportAuto=!0;const bd=vo("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var gd;const vd=["children","className","component","disablePointerEvents","disableTypography","position","variant"],yd=Ul("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`position${nn(r.position)}`],!0===r.disablePointerEvents&&t.disablePointerEvents,t[r.variant]]}})((({theme:e,ownerState:t})=>$({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${bd.positionStart}&:not(.${bd.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"}))),xd=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiInputAdornment"}),{children:n,className:o,component:i="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:s,variant:c}=r,d=z(r,vd),u=pc()||{};let p=c;c&&u.variant,u&&!p&&(p=u.variant);const h=$({},r,{hiddenLabel:u.hiddenLabel,size:u.size,disablePointerEvents:a,position:s,variant:p}),f=(e=>{const{classes:t,disablePointerEvents:r,hiddenLabel:n,position:o,size:i,variant:a}=e;return Si({root:["root",r&&"disablePointerEvents",o&&`position${nn(o)}`,a,n&&"hiddenLabel",i&&`size${nn(i)}`]},md,t)})(h);return zr.jsx(uc.Provider,{value:null,children:zr.jsx(yd,$({as:i,ownerState:h,className:fo(f.root,o),ref:t},d,{children:"string"!=typeof n||l?zr.jsxs(v.Fragment,{children:["start"===s?gd||(gd=zr.jsx("span",{className:"notranslate",children:""})):null,n]}):zr.jsx(oc,{color:"text.secondary",children:n})}))})})),Ed=v.createContext({});function Sd(e){return go("MuiList",e)}vo("MuiList",["root","padding","dense","subheader"]);const Cd=["children","className","component","dense","disablePadding","subheader"],wd=Ul("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,!r.disablePadding&&t.padding,r.dense&&t.dense,r.subheader&&t.subheader]}})((({ownerState:e})=>$({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0}))),Rd=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiList"}),{children:n,className:o,component:i="ul",dense:a=!1,disablePadding:l=!1,subheader:s}=r,c=z(r,Cd),d=v.useMemo((()=>({dense:a})),[a]),u=$({},r,{component:i,dense:a,disablePadding:l}),p=(e=>{const{classes:t,disablePadding:r,dense:n,subheader:o}=e;return Si({root:["root",!r&&"padding",n&&"dense",o&&"subheader"]},Sd,t)})(u);return zr.jsx(Ed.Provider,{value:d,children:zr.jsxs(wd,$({as:i,className:fo(p.root,o),ref:t,ownerState:u},c,{children:[s,n]}))})}));function kd(e){return go("MuiListItem",e)}const Ad=vo("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);function _d(e){return go("MuiListItemButton",e)}const Id=vo("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Td=["alignItems","autoFocus","component","children","dense","disableGutters","divider","focusVisibleClassName","selected","className"],Ld=Ul(Js,{shouldForwardProp:e=>Yl(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,"flex-start"===r.alignItems&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>$({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Id.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Id.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Id.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Id.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Id.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}))),Od=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiListItemButton"}),{alignItems:n="center",autoFocus:o=!1,component:i="div",children:a,dense:l=!1,disableGutters:s=!1,divider:c=!1,focusVisibleClassName:d,selected:u=!1,className:p}=r,h=z(r,Td),f=v.useContext(Ed),m=v.useMemo((()=>({dense:l||f.dense||!1,alignItems:n,disableGutters:s})),[n,f.dense,l,s]),b=v.useRef(null);Ho((()=>{o&&b.current&&b.current.focus()}),[o]);const g=$({},r,{alignItems:n,dense:m.dense,disableGutters:s,divider:c,selected:u}),y=(e=>{const{alignItems:t,classes:r,dense:n,disabled:o,disableGutters:i,divider:a,selected:l}=e;return $({},r,Si({root:["root",n&&"dense",!i&&"gutters",a&&"divider",o&&"disabled","flex-start"===t&&"alignItemsFlexStart",l&&"selected"]},_d,r))})(g),x=ni(b,t);return zr.jsx(Ed.Provider,{value:m,children:zr.jsx(Ld,$({ref:x,href:h.href||h.to,component:(h.href||h.to)&&"div"===i?"button":i,focusVisibleClassName:fo(y.focusVisible,d),ownerState:g,className:fo(y.root,p)},h,{classes:y,children:a}))})}));function Pd(e){return go("MuiListItemSecondaryAction",e)}vo("MuiListItemSecondaryAction",["root","disableGutters"]);const Md=["className"],jd=Ul("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.disableGutters&&t.disableGutters]}})((({ownerState:e})=>$({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0}))),Nd=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiListItemSecondaryAction"}),{className:n}=r,o=z(r,Md),i=$({},r,{disableGutters:v.useContext(Ed).disableGutters}),a=(e=>{const{disableGutters:t,classes:r}=e;return Si({root:["root",t&&"disableGutters"]},Pd,r)})(i);return zr.jsx(jd,$({className:fo(a.root,n),ownerState:i,ref:t},o))}));Nd.muiName="ListItemSecondaryAction";const $d=["className"],zd=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Bd=Ul("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,"flex-start"===r.alignItems&&t.alignItemsFlexStart,r.divider&&t.divider,!r.disableGutters&&t.gutters,!r.disablePadding&&t.padding,r.button&&t.button,r.hasSecondaryAction&&t.secondaryAction]}})((({theme:e,ownerState:t})=>$({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&$({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Id.root}`]:{paddingRight:48}},{[`&.${Ad.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ad.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ad.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Ad.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ad.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48}))),Dd=Ul("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Fd=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiListItem"}),{alignItems:n="center",autoFocus:o=!1,button:i=!1,children:a,className:l,component:s,components:c={},componentsProps:d={},ContainerComponent:u="li",ContainerProps:{className:p}={},dense:h=!1,disabled:f=!1,disableGutters:m=!1,disablePadding:b=!1,divider:g=!1,focusVisibleClassName:y,secondaryAction:x,selected:E=!1,slotProps:S={},slots:C={}}=r,w=z(r.ContainerProps,$d),R=z(r,zd),k=v.useContext(Ed),A=v.useMemo((()=>({dense:h||k.dense||!1,alignItems:n,disableGutters:m})),[n,k.dense,h,m]),_=v.useRef(null);Ho((()=>{o&&_.current&&_.current.focus()}),[o]);const I=v.Children.toArray(a),T=I.length&&(L=I[I.length-1],O=["ListItemSecondaryAction"],v.isValidElement(L)&&-1!==O.indexOf(null!=(P=L.type.muiName)?P:null==(M=L.type)||null==(M=M._payload)||null==(M=M.value)?void 0:M.muiName));var L,O,P,M;const j=$({},r,{alignItems:n,autoFocus:o,button:i,dense:A.dense,disabled:f,disableGutters:m,disablePadding:b,divider:g,hasSecondaryAction:T,selected:E}),N=(e=>{const{alignItems:t,button:r,classes:n,dense:o,disabled:i,disableGutters:a,disablePadding:l,divider:s,hasSecondaryAction:c,selected:d}=e;return Si({root:["root",o&&"dense",!a&&"gutters",!l&&"padding",s&&"divider",i&&"disabled",r&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",d&&"selected"],container:["container"]},kd,n)})(j),B=ni(_,t),D=C.root||c.Root||Bd,F=S.root||d.root||{},G=$({className:fo(N.root,F.className,l),disabled:f},R);let H=s||"li";return i&&(G.component=s||"div",G.focusVisibleClassName=fo(Ad.focusVisible,y),H=Js),T?(H=G.component||s?H:"div","li"===u&&("li"===H?H="div":"li"===G.component&&(G.component="div")),zr.jsx(Ed.Provider,{value:A,children:zr.jsxs(Dd,$({as:u,className:fo(N.container,p),ref:B,ownerState:j},w,{children:[zr.jsx(D,$({},F,!Ci(D)&&{as:H,ownerState:$({},j,F.ownerState)},G,{children:I})),I.pop()]}))})):zr.jsx(Ed.Provider,{value:A,children:zr.jsxs(D,$({},F,{as:H,ref:B},!Ci(D)&&{ownerState:$({},j,F.ownerState)},G,{children:[I,x&&zr.jsx(Nd,{children:x})]}))})}));function Gd(e){return go("MuiListItemIcon",e)}const Hd=vo("MuiListItemIcon",["root","alignItemsFlexStart"]),Wd=["className"],Yd=Ul("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,"flex-start"===r.alignItems&&t.alignItemsFlexStart]}})((({theme:e,ownerState:t})=>$({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}))),Ud=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiListItemIcon"}),{className:n}=r,o=z(r,Wd),i=$({},r,{alignItems:v.useContext(Ed).alignItems}),a=(e=>{const{alignItems:t,classes:r}=e;return Si({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Gd,r)})(i);return zr.jsx(Yd,$({className:fo(a.root,n),ownerState:i,ref:t},o))})),Vd=vo("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),qd=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Kd(e,t,r){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:r?null:e.firstChild}function Xd(e,t,r){return e===t?r?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:r?null:e.lastChild}function Zd(e,t){if(void 0===t)return!0;let r=e.innerText;return void 0===r&&(r=e.textContent),r=r.trim().toLowerCase(),0!==r.length&&(t.repeating?r[0]===t.keys[0]:0===r.indexOf(t.keys.join("")))}function Jd(e,t,r,n,o,i){let a=!1,l=o(e,t,!!t&&r);for(;l;){if(l===e.firstChild){if(a)return!1;a=!0}const t=!n&&(l.disabled||"true"===l.getAttribute("aria-disabled"));if(l.hasAttribute("tabindex")&&Zd(l,i)&&!t)return l.focus(),!0;l=o(e,l,r)}return!1}const Qd=v.forwardRef((function(e,t){const{actions:r,autoFocus:n=!1,autoFocusItem:o=!1,children:i,className:a,disabledItemsFocusable:l=!1,disableListWrap:s=!1,onKeyDown:c,variant:d="selectedMenu"}=e,u=z(e,qd),p=v.useRef(null),h=v.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Ho((()=>{n&&p.current.focus()}),[n]),v.useImperativeHandle(r,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const r=!p.current.style.width;if(e.clientHeight<p.current.clientHeight&&r){const r=`${gi(Xo(e))}px`;p.current.style["rtl"===t?"paddingLeft":"paddingRight"]=r,p.current.style.width=`calc(100% + ${r})`}return p.current}})),[]);const f=ni(p,t);let m=-1;v.Children.forEach(i,((e,t)=>{v.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===m)&&(m=t),m===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(m+=1,m>=i.length&&(m=-1))):m===t&&(m+=1,m>=i.length&&(m=-1))}));const b=v.Children.map(i,((e,t)=>{if(t===m){const t={};return o&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),v.cloneElement(e,t)}return e}));return zr.jsx(Rd,$({role:"menu",ref:f,className:a,onKeyDown:e=>{const t=p.current,r=e.key,n=Xo(t).activeElement;if("ArrowDown"===r)e.preventDefault(),Jd(t,n,s,l,Kd);else if("ArrowUp"===r)e.preventDefault(),Jd(t,n,s,l,Xd);else if("Home"===r)e.preventDefault(),Jd(t,null,s,l,Kd);else if("End"===r)e.preventDefault(),Jd(t,null,s,l,Xd);else if(1===r.length){const o=h.current,i=r.toLowerCase(),a=performance.now();o.keys.length>0&&(a-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=a,o.keys.push(i);const s=n&&!o.repeating&&Zd(n,o);o.previousKeyMatched&&(s||Jd(t,n,!1,l,Kd,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:n?0:-1},u,{children:b}))}));function eu(e){return go("MuiPopover",e)}vo("MuiPopover",["root","paper"]);const tu=["onEntering"],ru=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],nu=["slotProps"];function ou(e,t){let r=0;return"number"==typeof t?r=t:"center"===t?r=e.height/2:"bottom"===t&&(r=e.height),r}function iu(e,t){let r=0;return"number"==typeof t?r=t:"center"===t?r=e.width/2:"right"===t&&(r=e.width),r}function au(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function lu(e){return"function"==typeof e?e():e}const su=Ul(nd,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),cu=Ul(Ms,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),du=v.forwardRef((function(e,t){var r,n,o;const i=ls({props:e,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:c,anchorReference:d="anchorEl",children:u,className:p,container:h,elevation:f=8,marginThreshold:m=16,open:b,PaperProps:g={},slots:y,slotProps:x,transformOrigin:E={vertical:"top",horizontal:"left"},TransitionComponent:S=fd,transitionDuration:C="auto",TransitionProps:{onEntering:w}={},disableScrollLock:R=!1}=i,k=z(i.TransitionProps,tu),A=z(i,ru),_=null!=(r=null==x?void 0:x.paper)?r:g,I=v.useRef(),T=ni(I,_.ref),L=$({},i,{anchorOrigin:s,anchorReference:d,elevation:f,marginThreshold:m,externalPaperSlotProps:_,transformOrigin:E,TransitionComponent:S,transitionDuration:C,TransitionProps:k}),O=(e=>{const{classes:t}=e;return Si({root:["root"],paper:["paper"]},eu,t)})(L),P=v.useCallback((()=>{if("anchorPosition"===d)return c;const e=lu(l),t=(e&&1===e.nodeType?e:Xo(I.current).body).getBoundingClientRect();return{top:t.top+ou(t,s.vertical),left:t.left+iu(t,s.horizontal)}}),[l,s.horizontal,s.vertical,c,d]),M=v.useCallback((e=>({vertical:ou(e,E.vertical),horizontal:iu(e,E.horizontal)})),[E.horizontal,E.vertical]),j=v.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},r=M(t);if("none"===d)return{top:null,left:null,transformOrigin:au(r)};const n=P();let o=n.top-r.vertical,i=n.left-r.horizontal;const a=o+t.height,s=i+t.width,c=Zo(lu(l)),u=c.innerHeight-m,p=c.innerWidth-m;if(null!==m&&o<m){const e=o-m;o-=e,r.vertical+=e}else if(null!==m&&a>u){const e=a-u;o-=e,r.vertical+=e}if(null!==m&&i<m){const e=i-m;i-=e,r.horizontal+=e}else if(s>p){const e=s-p;i-=e,r.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:au(r)}}),[l,d,P,M,m]),[N,B]=v.useState(b),D=v.useCallback((()=>{const e=I.current;if(!e)return;const t=j(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,B(!0)}),[j]);v.useEffect((()=>(R&&window.addEventListener("scroll",D),()=>window.removeEventListener("scroll",D))),[l,R,D]);v.useEffect((()=>{b&&D()})),v.useImperativeHandle(a,(()=>b?{updatePosition:()=>{D()}}:null),[b,D]),v.useEffect((()=>{if(!b)return;const e=Ko((()=>{D()})),t=Zo(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[l,b,D]);let F=C;"auto"!==C||S.muiSupportAuto||(F=void 0);const G=h||(l?Xo(lu(l)).body:void 0),H=null!=(n=null==y?void 0:y.root)?n:su,W=null!=(o=null==y?void 0:y.paper)?o:cu,Y=Ai({elementType:W,externalSlotProps:$({},_,{style:N?_.style:$({},_.style,{opacity:0})}),additionalProps:{elevation:f,ref:T},ownerState:L,className:fo(O.paper,null==_?void 0:_.className)}),U=Ai({elementType:H,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:A,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:G,open:b},ownerState:L,className:fo(O.root,p)}),{slotProps:V}=U,q=z(U,nu);return zr.jsx(H,$({},q,!Ci(H)&&{slotProps:V,disableScrollLock:R},{children:zr.jsx(S,$({appear:!0,in:b,onEntering:(e,t)=>{w&&w(e,t),D()},onExited:()=>{B(!1)},timeout:F},k,{children:zr.jsx(W,$({},Y,{children:u}))}))}))}));function uu(e){return go("MuiMenu",e)}vo("MuiMenu",["root","paper","list"]);const pu=["onEntering"],hu=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],fu={vertical:"top",horizontal:"right"},mu={vertical:"top",horizontal:"left"},bu=Ul(du,{shouldForwardProp:e=>Yl(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),gu=Ul(cu,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),vu=Ul(Qd,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),yu=v.forwardRef((function(e,t){var r,n;const o=ls({props:e,name:"MuiMenu"}),{autoFocus:i=!0,children:a,className:l,disableAutoFocusItem:s=!1,MenuListProps:c={},onClose:d,open:u,PaperProps:p={},PopoverClasses:h,transitionDuration:f="auto",TransitionProps:{onEntering:m}={},variant:b="selectedMenu",slots:g={},slotProps:y={}}=o,x=z(o.TransitionProps,pu),E=z(o,hu),S=Ni(),C=$({},o,{autoFocus:i,disableAutoFocusItem:s,MenuListProps:c,onEntering:m,PaperProps:p,transitionDuration:f,TransitionProps:x,variant:b}),w=(e=>{const{classes:t}=e;return Si({root:["root"],paper:["paper"],list:["list"]},uu,t)})(C),R=i&&!s&&u,k=v.useRef(null);let A=-1;v.Children.map(a,((e,t)=>{v.isValidElement(e)&&(e.props.disabled||("selectedMenu"===b&&e.props.selected||-1===A)&&(A=t))}));const _=null!=(r=g.paper)?r:gu,I=null!=(n=y.paper)?n:p,T=Ai({elementType:g.root,externalSlotProps:y.root,ownerState:C,className:[w.root,l]}),L=Ai({elementType:_,externalSlotProps:I,ownerState:C,className:w.paper});return zr.jsx(bu,$({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:S?"right":"left"},transformOrigin:S?fu:mu,slots:{paper:_,root:g.root},slotProps:{root:T,paper:L},open:u,ref:t,transitionDuration:f,TransitionProps:$({onEntering:(e,t)=>{k.current&&k.current.adjustStyleForScrollbar(e,{direction:S?"rtl":"ltr"}),m&&m(e,t)}},x),ownerState:C},E,{classes:h,children:zr.jsx(vu,$({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:k,autoFocus:i&&(-1===A||s),autoFocusItem:R,variant:b},c,{className:fo(w.list,c.className),children:a}))}))}));function xu(e){return go("MuiMenuItem",e)}const Eu=vo("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Su=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],Cu=Ul(Js,{shouldForwardProp:e=>Yl(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.dense&&t.dense,r.divider&&t.divider,!r.disableGutters&&t.gutters]}})((({theme:e,ownerState:t})=>$({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Eu.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Eu.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Eu.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Xi(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Eu.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Eu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${id.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${id.inset}`]:{marginLeft:52},[`& .${Vd.root}`]:{marginTop:0,marginBottom:0},[`& .${Vd.inset}`]:{paddingLeft:36},[`& .${Hd.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&$({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${Hd.root} svg`]:{fontSize:"1.25rem"}})))),wu=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiMenuItem"}),{autoFocus:n=!1,component:o="li",dense:i=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:s,role:c="menuitem",tabIndex:d,className:u}=r,p=z(r,Su),h=v.useContext(Ed),f=v.useMemo((()=>({dense:i||h.dense||!1,disableGutters:l})),[h.dense,i,l]),m=v.useRef(null);Ho((()=>{n&&m.current&&m.current.focus()}),[n]);const b=$({},r,{dense:f.dense,divider:a,disableGutters:l}),g=(e=>{const{disabled:t,dense:r,divider:n,disableGutters:o,selected:i,classes:a}=e;return $({},a,Si({root:["root",r&&"dense",t&&"disabled",!o&&"gutters",n&&"divider",i&&"selected"]},xu,a))})(r),y=ni(m,t);let x;return r.disabled||(x=void 0!==d?d:-1),zr.jsx(Ed.Provider,{value:f,children:zr.jsx(Cu,$({ref:y,role:c,tabIndex:x,component:o,focusVisibleClassName:fo(g.focusVisible,s),className:fo(g.root,u)},p,{ownerState:b,classes:g}))})}));function Ru(e){return go("MuiTab",e)}const ku=vo("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),Au=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],_u=Ul(Js,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.label&&r.icon&&t.labelIcon,t[`textColor${nn(r.textColor)}`],r.fullWidth&&t.fullWidth,r.wrapped&&t.wrapped,{[`& .${ku.iconWrapper}`]:t.iconWrapper}]}})((({theme:e,ownerState:t})=>$({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${ku.iconWrapper}`]:$({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,[`&.${ku.selected}`]:{opacity:1},[`&.${ku.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${ku.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${ku.disabled}`]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,[`&.${ku.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${ku.disabled}`]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}))),Iu=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiTab"}),{className:n,disabled:o=!1,disableFocusRipple:i=!1,fullWidth:a,icon:l,iconPosition:s="top",indicator:c,label:d,onChange:u,onClick:p,onFocus:h,selected:f,selectionFollowsFocus:m,textColor:b="inherit",value:g,wrapped:y=!1}=r,x=z(r,Au),E=$({},r,{disabled:o,disableFocusRipple:i,selected:f,icon:!!l,iconPosition:s,label:!!d,fullWidth:a,textColor:b,wrapped:y}),S=(e=>{const{classes:t,textColor:r,fullWidth:n,wrapped:o,icon:i,label:a,selected:l,disabled:s}=e;return Si({root:["root",i&&a&&"labelIcon",`textColor${nn(r)}`,n&&"fullWidth",o&&"wrapped",l&&"selected",s&&"disabled"],iconWrapper:["iconWrapper"]},Ru,t)})(E),C=l&&d&&v.isValidElement(l)?v.cloneElement(l,{className:fo(S.iconWrapper,l.props.className)}):l;return zr.jsxs(_u,$({focusRipple:!i,className:fo(S.root,n),ref:t,role:"tab","aria-selected":f,disabled:o,onClick:e=>{!f&&u&&u(e,g),p&&p(e)},onFocus:e=>{m&&!f&&u&&u(e,g),h&&h(e)},ownerState:E,tabIndex:f?0:-1},x,{children:["top"===s||"start"===s?zr.jsxs(v.Fragment,{children:[C,d]}):zr.jsxs(v.Fragment,{children:[d,C]}),c]}))}));var Tu=ps(zr.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Lu=ps(zr.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Ou(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const Pu=["onChange"],Mu={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function ju(e){return go("MuiTabScrollButton",e)}const Nu=vo("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),$u=["className","slots","slotProps","direction","orientation","disabled"],zu=Ul(Js,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.orientation&&t[r.orientation]]}})((({ownerState:e})=>$({width:40,flexShrink:0,opacity:.8,[`&.${Nu.disabled}`]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}))),Bu=v.forwardRef((function(e,t){var r,n;const o=ls({props:e,name:"MuiTabScrollButton"}),{className:i,slots:a={},slotProps:l={},direction:s}=o,c=z(o,$u),d=$({isRtl:Ni()},o),u=(e=>{const{classes:t,orientation:r,disabled:n}=e;return Si({root:["root",r,n&&"disabled"]},ju,t)})(d),p=null!=(r=a.StartScrollButtonIcon)?r:Tu,h=null!=(n=a.EndScrollButtonIcon)?n:Lu,f=Ai({elementType:p,externalSlotProps:l.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),m=Ai({elementType:h,externalSlotProps:l.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return zr.jsx(zu,$({component:"div",className:fo(u.root,i),ref:t,role:null,ownerState:d,tabIndex:null},c,{children:"left"===s?zr.jsx(p,$({},f)):zr.jsx(h,$({},m))}))}));function Du(e){return go("MuiTabs",e)}const Fu=vo("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),Gu=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],Hu=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,Wu=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,Yu=(e,t,r)=>{let n=!1,o=r(e,t);for(;o;){if(o===e.firstChild){if(n)return;n=!0}const t=o.disabled||"true"===o.getAttribute("aria-disabled");if(o.hasAttribute("tabindex")&&!t)return void o.focus();o=r(e,o)}},Uu=Ul("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[{[`& .${Fu.scrollButtons}`]:t.scrollButtons},{[`& .${Fu.scrollButtons}`]:r.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,r.vertical&&t.vertical]}})((({ownerState:e,theme:t})=>$({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{[`& .${Fu.scrollButtons}`]:{[t.breakpoints.down("sm")]:{display:"none"}}}))),Vu=Ul("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.scroller,r.fixed&&t.fixed,r.hideScrollbar&&t.hideScrollbar,r.scrollableX&&t.scrollableX,r.scrollableY&&t.scrollableY]}})((({ownerState:e})=>$({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"}))),qu=Ul("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.flexContainer,r.vertical&&t.flexContainerVertical,r.centered&&t.centered]}})((({ownerState:e})=>$({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"}))),Ku=Ul("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})((({ownerState:e,theme:t})=>$({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0}))),Xu=Ul((function(e){const{onChange:t}=e,r=z(e,Pu),n=v.useRef(),o=v.useRef(null),i=()=>{n.current=o.current.offsetHeight-o.current.clientHeight};return Ho((()=>{const e=Ko((()=>{const e=n.current;i(),e!==n.current&&t(n.current)})),r=Zo(o.current);return r.addEventListener("resize",e),()=>{e.clear(),r.removeEventListener("resize",e)}}),[t]),v.useEffect((()=>{i(),t(n.current)}),[t]),zr.jsx("div",$({style:Mu},r,{ref:o}))}))({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Zu={},Ju=v.forwardRef((function(e,t){const r=ls({props:e,name:"MuiTabs"}),n=fl(),o=Ni(),{"aria-label":i,"aria-labelledby":a,action:l,centered:s=!1,children:c,className:d,component:u="div",allowScrollButtonsMobile:p=!1,indicatorColor:h="primary",onChange:f,orientation:m="horizontal",ScrollButtonComponent:b=Bu,scrollButtons:g="auto",selectionFollowsFocus:y,slots:x={},slotProps:E={},TabIndicatorProps:S={},TabScrollButtonProps:C={},textColor:w="primary",value:R,variant:k="standard",visibleScrollbar:A=!1}=r,_=z(r,Gu),I="scrollable"===k,T="vertical"===m,L=T?"scrollTop":"scrollLeft",O=T?"top":"left",P=T?"bottom":"right",M=T?"clientHeight":"clientWidth",j=T?"height":"width",N=$({},r,{component:u,allowScrollButtonsMobile:p,indicatorColor:h,orientation:m,vertical:T,scrollButtons:g,textColor:w,variant:k,visibleScrollbar:A,fixed:!I,hideScrollbar:I&&!A,scrollableX:I&&!T,scrollableY:I&&T,centered:s&&!I,scrollButtonsHideMobile:!p}),B=(e=>{const{vertical:t,fixed:r,hideScrollbar:n,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:l,classes:s}=e;return Si({root:["root",t&&"vertical"],scroller:["scroller",r&&"fixed",n&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",l&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]},Du,s)})(N),D=Ai({elementType:x.StartScrollButtonIcon,externalSlotProps:E.startScrollButtonIcon,ownerState:N}),F=Ai({elementType:x.EndScrollButtonIcon,externalSlotProps:E.endScrollButtonIcon,ownerState:N}),[G,H]=v.useState(!1),[W,Y]=v.useState(Zu),[U,V]=v.useState(!1),[q,K]=v.useState(!1),[X,Z]=v.useState(!1),[J,Q]=v.useState({overflow:"hidden",scrollbarWidth:0}),ee=new Map,te=v.useRef(null),re=v.useRef(null),ne=()=>{const e=te.current;let t,r;if(e){const r=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Ei(e,o?"rtl":"ltr"),scrollWidth:e.scrollWidth,top:r.top,bottom:r.bottom,left:r.left,right:r.right}}if(e&&!1!==R){const e=re.current.children;if(e.length>0){const t=e[ee.get(R)];r=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:r}},oe=ri((()=>{const{tabsMeta:e,tabMeta:t}=ne();let r,n=0;if(T)r="top",t&&e&&(n=t.top-e.top+e.scrollTop);else if(r=o?"right":"left",t&&e){const i=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;n=(o?-1:1)*(t[r]-e[r]+i)}const i={[r]:n,[j]:t?t[j]:0};if(isNaN(W[r])||isNaN(W[j]))Y(i);else{const e=Math.abs(W[r]-i[r]),t=Math.abs(W[j]-i[j]);(e>=1||t>=1)&&Y(i)}})),ie=(e,{animation:t=!0}={})=>{t?function(e,t,r,n={},o=()=>{}){const{ease:i=Ou,duration:a=300}=n;let l=null;const s=t[e];let c=!1;const d=()=>{c=!0},u=n=>{if(c)return void o(new Error("Animation cancelled"));null===l&&(l=n);const d=Math.min(1,(n-l)/a);t[e]=i(d)*(r-s)+s,d>=1?requestAnimationFrame((()=>{o(null)})):requestAnimationFrame(u)};s===r?o(new Error("Element already at target position")):requestAnimationFrame(u)}(L,te.current,e,{duration:n.transitions.duration.standard}):te.current[L]=e},ae=e=>{let t=te.current[L];T?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===xi()?-1:1),ie(t)},le=()=>{const e=te.current[M];let t=0;const r=Array.from(re.current.children);for(let n=0;n<r.length;n+=1){const o=r[n];if(t+o[M]>e){0===n&&(t=e);break}t+=o[M]}return t},se=()=>{ae(-1*le())},ce=()=>{ae(le())},de=v.useCallback((e=>{Q({overflow:null,scrollbarWidth:e})}),[]),ue=ri((e=>{const{tabsMeta:t,tabMeta:r}=ne();if(r&&t)if(r[O]<t[O]){const n=t[L]+(r[O]-t[O]);ie(n,{animation:e})}else if(r[P]>t[P]){const n=t[L]+(r[P]-t[P]);ie(n,{animation:e})}})),pe=ri((()=>{I&&!1!==g&&Z(!X)}));v.useEffect((()=>{const e=Ko((()=>{te.current&&oe()}));let t;const r=r=>{r.forEach((e=>{e.removedNodes.forEach((e=>{var r;null==(r=t)||r.unobserve(e)})),e.addedNodes.forEach((e=>{var r;null==(r=t)||r.observe(e)}))})),e(),pe()},n=Zo(te.current);let o;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(re.current.children).forEach((e=>{t.observe(e)}))),"undefined"!=typeof MutationObserver&&(o=new MutationObserver(r),o.observe(re.current,{childList:!0})),()=>{var r,i;e.clear(),n.removeEventListener("resize",e),null==(r=o)||r.disconnect(),null==(i=t)||i.disconnect()}}),[oe,pe]),v.useEffect((()=>{const e=Array.from(re.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&I&&!1!==g){const r=e[0],n=e[t-1],o={root:te.current,threshold:.99},i=new IntersectionObserver((e=>{V(!e[0].isIntersecting)}),o);i.observe(r);const a=new IntersectionObserver((e=>{K(!e[0].isIntersecting)}),o);return a.observe(n),()=>{i.disconnect(),a.disconnect()}}}),[I,g,X,null==c?void 0:c.length]),v.useEffect((()=>{H(!0)}),[]),v.useEffect((()=>{oe()})),v.useEffect((()=>{ue(Zu!==W)}),[ue,W]),v.useImperativeHandle(l,(()=>({updateIndicator:oe,updateScrollButtons:pe})),[oe,pe]);const he=zr.jsx(Ku,$({},S,{className:fo(B.indicator,S.className),ownerState:N,style:$({},W,S.style)}));let fe=0;const me=v.Children.map(c,(e=>{if(!v.isValidElement(e))return null;const t=void 0===e.props.value?fe:e.props.value;ee.set(t,fe);const r=t===R;return fe+=1,v.cloneElement(e,$({fullWidth:"fullWidth"===k,indicator:r&&!G&&he,selected:r,selectionFollowsFocus:y,onChange:f,textColor:w,value:t},1!==fe||!1!==R||e.props.tabIndex?{}:{tabIndex:0}))})),be=(()=>{const e={};e.scrollbarSizeListener=I?zr.jsx(Xu,{onChange:de,className:fo(B.scrollableX,B.hideScrollbar)}):null;const t=I&&("auto"===g&&(U||q)||!0===g);return e.scrollButtonStart=t?zr.jsx(b,$({slots:{StartScrollButtonIcon:x.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:D},orientation:m,direction:o?"right":"left",onClick:se,disabled:!U},C,{className:fo(B.scrollButtons,C.className)})):null,e.scrollButtonEnd=t?zr.jsx(b,$({slots:{EndScrollButtonIcon:x.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:F},orientation:m,direction:o?"left":"right",onClick:ce,disabled:!q},C,{className:fo(B.scrollButtons,C.className)})):null,e})();return zr.jsxs(Uu,$({className:fo(B.root,d),ownerState:N,ref:t,as:u},_,{children:[be.scrollButtonStart,be.scrollbarSizeListener,zr.jsxs(Vu,{className:B.scroller,ownerState:N,style:{overflow:J.overflow,[T?"margin"+(o?"Left":"Right"):"marginBottom"]:A?void 0:-J.scrollbarWidth},ref:te,children:[zr.jsx(qu,{"aria-label":i,"aria-labelledby":a,"aria-orientation":"vertical"===m?"vertical":null,className:B.flexContainer,ownerState:N,onKeyDown:e=>{const t=re.current,r=Xo(t).activeElement;if("tab"!==r.getAttribute("role"))return;let n="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(n="ArrowRight",i="ArrowLeft"),e.key){case n:e.preventDefault(),Yu(t,r,Wu);break;case i:e.preventDefault(),Yu(t,r,Hu);break;case"Home":e.preventDefault(),Yu(t,null,Hu);break;case"End":e.preventDefault(),Yu(t,null,Wu)}},ref:re,role:"tablist",children:me}),G&&he]}),be.scrollButtonEnd]}))}));function Qu(e){return zr.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:zr.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})}var ep=function({fontSize:e="medium",children:t=null,className:r=""}={}){const n="small"===e?"16px":"20px",o="small"===e?"-2px 0":void 0;return zr.jsx("i",{style:{fontSize:n,margin:o,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:r,children:t})};function tp(e={}){return zr.jsx(ep,{...e,children:zr.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[zr.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),zr.jsx("path",{fill:"#FFFFFF",fillRule:"evenodd",d:"m12.627 6.617-4.206 4.205-1.037-1.035a1.25 1.25 0 1 0-1.768 1.767l1.92 1.919a1.25 1.25 0 0 0 1.769 0l5.09-5.089a1.25 1.25 0 1 0-1.768-1.768Z",clipRule:"evenodd"})]})})}function rp(e={}){return zr.jsx(ep,{fontSize:"medium",...e,children:zr.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[zr.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),zr.jsx("path",{d:"M11 8C11 9.65685 9.65685 11 8 11C6.34315 11 5 9.65685 5 8C5 6.34315 6.34315 5 8 5C9.65685 5 11 6.34315 11 8Z",stroke:"none",fill:"white"})]})})}function np(e){return zr.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:zr.jsx("path",{d:"m9.345 8 3.982 3.982a.951.951 0 0 1-1.345 1.345L8 9.345l-3.982 3.982a.951.951 0 0 1-1.345-1.345L6.655 8 2.673 4.018a.951.951 0 0 1 1.345-1.345L8 6.655l3.982-3.982a.951.951 0 1 1 1.345 1.345L9.345 8Z"})})}function op(e={}){return zr.jsx(ep,{...e,children:zr.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:zr.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[zr.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),zr.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function ip(e={}){return zr.jsx(ep,{fontSize:"medium",...e,children:zr.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:zr.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:zr.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function ap({className:e}){return zr.jsx(ep,{fontSize:"small",className:e,children:zr.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:zr.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:zr.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:zr.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[zr.jsx("path",{d:"M4.06624695,13.2115849 L7.28588573,9.1870364 C7.3893886,9.05765782 7.36841219,8.8688701 7.23903361,8.76536724 C7.18583969,8.72281211 7.11974654,8.69962788 7.05162509,8.69962788 L0.3,8.69962788 C0.134314575,8.69962788 -1.25807407e-14,8.83394246 -1.26010313e-14,8.99962788 C-1.26093738e-14,9.06774933 0.0231842256,9.13384248 0.0657393572,9.1870364 L3.28537814,13.2115849 C3.45788292,13.4272158 3.7725291,13.4621765 3.98816007,13.2896718 C4.01699242,13.2666059 4.04318107,13.2404172 4.06624695,13.2115849 Z",opacity:"0.300390625"}),zr.jsx("path",{d:"M4.06624695,0.187670888 L7.28588573,4.21221937 C7.3893886,4.34159795 7.36841219,4.53038566 7.23903361,4.63388852 C7.18583969,4.67644366 7.11974654,4.69962788 7.05162509,4.69962788 L0.3,4.69962788 C0.134314575,4.69962788 2.1918781e-12,4.56531331 2.19185781e-12,4.39962788 C2.19184946e-12,4.33150643 0.0231842256,4.26541328 0.0657393572,4.21221937 L3.28537814,0.187670888 C3.45788292,-0.0279600799 3.7725291,-0.0629207673 3.98816007,0.109584007 C4.01699242,0.132649888 4.04318107,0.158838536 4.06624695,0.187670888 Z"})]})})})})})}function lp(e={}){return zr.jsx(ep,{...e,children:zr.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:zr.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:zr.jsx("rect",{stroke:Xl.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}const sp={MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{}}},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:ts,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"},transition:"unset",color:"var(--sprout-common-foreground-color-default)",boxShadow:"none","&:hover":{backgroundColor:"var(--sprout-common-background-color-hover)"},"&:active":{backgroundColor:"var(--sprout-common-background-color-pressed)"},"&.Mui-disabled":{backgroundColor:"var(--sprout-common-background-color-disabled)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"calc(var(--sprout-focus-border-default-width) / -2)",backgroundColor:"var(--sprout-focus-background-color-default)",zIndex:100}},text:{padding:"8px 16px",backgroundColor:"transparent"},textPrimary:{color:"var(--sprout-brand-primary-color-default)"},textSecondary:{color:"var(--sprout-info-color-default)"},textWarning:{color:"var(--sprout-warning-color-default)"},textError:{color:"var(--sprout-danger-color-default)"},outlined:{padding:"7px 16px",border:"var(--sprout-common-border-moderate)",backgroundColor:"var(--sprout-common-background-color-enabled)","&.Mui-focusVisible":{borderColor:"transparent"},"&:hover":{border:"var(--sprout-common-border-moderate)"}},outlinedPrimary:{borderColor:"var(--sprout-brand-primary-color-default)",color:"var(--sprout-brand-primary-color-default)","&:hover":{borderColor:"var(--sprout-brand-primary-color-default)"}},outlinedSecondary:{borderColor:"var(--sprout-info-color-default)",color:"var(--sprout-info-color-default)","&:hover":{borderColor:"var(--sprout-info-color-default)"}},outlinedWarning:{borderColor:"var(--sprout-warning-color-default)",color:"var(--sprout-warning-color-default)","&:hover":{borderColor:"var(--sprout-warning-color-default)"}},outlinedError:{borderColor:"var(--sprout-danger-color-default)",color:"var(--sprout-danger-color-default)","&:hover":{borderColor:"var(--sprout-danger-color-default)"}},contained:{color:"var(--sprout-brand-primary-color-inverse)",backgroundColor:"var(--sprout-brand-primary-color-default)",padding:"8px 16px","&:hover":{backgroundColor:"var(--sprout-brand-primary-color-hover)"},"&:active":{backgroundColor:"var(--sprout-brand-primary-color-pressed)"},"&.Mui-focusVisible":{outline:"var(--sprout-focus-border-default)",outlineOffset:"var(--sprout-focus-border-default-width)",background:"var(--sprout-brand-primary-color-focus)"}},containedError:{backgroundColor:"var(--sprout-danger-color-default)","&:hover":{backgroundColor:"var(--sprout-danger-color-hover)"},"&:active":{backgroundColor:"var(--sprout-danger-color-pressed)"},"&.Mui-focusVisible":{outlineColor:"var(--sprout-danger-color-inverse)",backgroundColor:"var(--sprout-danger-color-focus)"}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]}};var cp=e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:Xl.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:Xl.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:zr.jsx(Qu,{"aria-hidden":"true",viewBox:"0 0 16 16",width:16,height:16})},styleOverrides:{root:{padding:"0px 12px 0px 16px",minHeight:"auto",boxShadow:`inset 0px -1px 0px 0px ${Xl.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:Xl.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${Xl.MISC_FOCUS_BORDER}`,borderRadius:ts,backgroundColor:Xl.GREYSCALE_0_03},"&.Mui-expanded":{minHeight:"auto"}},content:{overflow:"hidden",textOverflow:"ellipsis","&.Mui-expanded":{margin:"12px 0px"}}}},MuiAppBar:{defaultProps:{elevation:0},styleOverrides:{root:{flex:"0 0 48px",boxShadow:`inset 0 -1px 0 0 ${Xl.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:Xl.WHITE,color:Xl.TEXT_PRIMARY}}},MuiBadge:{styleOverrides:{badge:{height:"16px",minWidth:"16px",fontSize:"12px",padding:"0px 5px"},anchorOriginTopRightRectangular:{top:"-3px",right:"-3px"}}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusVisibleClassName:"sprout-focus-visible"}},MuiButtonGroup:{defaultProps:{disableRipple:!0},styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:14,borderRadius:ts},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${Xl.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:Xl.GREYSCALE_0_15,backgroundColor:Xl.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:Xl.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${Xl.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:Xl.GREEN_PALE},"&:active":{backgroundColor:Xl.GREEN_DARK},"&.Mui-focusVisible":{borderColor:Xl.GREEN_PALE,boxShadow:`0 0 0 3px ${Vo(Xl.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:Xl.BLUE_PALE},"&:active":{backgroundColor:Xl.BLUE_DARK},"&.Mui-focusVisible":{borderColor:Xl.BLUE_PALE,boxShadow:`0 0 0 3px ${Vo(Xl.BLUE_PALE,.5)}`}}},variants:[{props:{size:"small"},style:{height:"24px"}},{props:{size:"large"},style:{height:"40px"}}]},MuiButton:{defaultProps:{color:"inherit",disableRipple:!0,focusVisibleClassName:"sprout-focus-visible"},styleOverrides:{root:{height:"32px",lineHeight:"16px",minWidth:"24px",fontSize:14,borderRadius:ts,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:Xl.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${Xl.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:Xl.GREYSCALE_0_15,backgroundColor:Xl.GREYSCALE_100_60,"&:active":{backgroundColor:Xl.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:Xl.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${Xl.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:Xl.PURPLE,"&.Mui-focusVisible":{borderColor:Xl.PURPLE,boxShadow:`0 0 0 3px ${Vo(Xl.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:Xl.GREEN,"&.Mui-focusVisible":{borderColor:Xl.GREEN,boxShadow:`0 0 0 3px ${Vo(Xl.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:Xl.BLUE,"&.Mui-focusVisible":{borderColor:Xl.BLUE,boxShadow:`0 0 0 3px ${Vo(Xl.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:Xl.ORANGE,"&.Mui-focusVisible":{borderColor:Xl.ORANGE,boxShadow:`0 0 0 3px ${Vo(Xl.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:Xl.RED,"&.Mui-focusVisible":{borderColor:Xl.RED,boxShadow:`0 0 0 3px ${Vo(Xl.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:Xl.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:Xl.PURPLE_PALE},"&:active":{backgroundColor:Xl.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:Xl.PURPLE_PALE,boxShadow:`0 0 0 3px ${Vo(Xl.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:Xl.GREEN_PALE},"&:active":{backgroundColor:Xl.GREEN_DARK},"&.Mui-focusVisible":{borderColor:Xl.GREEN_PALE,boxShadow:`0 0 0 3px ${Vo(Xl.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:Xl.BLUE_PALE},"&:active":{backgroundColor:Xl.BLUE_DARK},"&.Mui-focusVisible":{borderColor:Xl.BLUE_PALE,boxShadow:`0 0 0 3px ${Vo(Xl.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:Xl.ORANGE_PALE},"&:active":{backgroundColor:Xl.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:Xl.ORANGE_PALE,boxShadow:`0 0 0 3px ${Vo(Xl.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:Xl.RED_PALE},"&:active":{backgroundColor:Xl.RED_DARK},"&.Mui-focusVisible":{borderColor:Xl.RED_PALE,boxShadow:`0 0 0 3px ${Vo(Xl.RED_PALE,.5)}`}},sizeSmall:{fontSize:12,height:"24px","& > svg:only-child, & > i:only-child":{marginLeft:"-7px",marginRight:"-7px"}},sizeLarge:{fontSize:16,height:"40px",lineHeight:"20px","& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},textSizeSmall:{padding:"4px 11px"},textSizeLarge:{padding:"10px 19px"},outlinedSizeSmall:{padding:"3px 11px"},outlinedSizeLarge:{padding:"9px 19px"},containedSizeSmall:{padding:"4px 11px"},containedSizeLarge:{padding:"10px 19px"}},variants:[]},MuiCardActionArea:{styleOverrides:{root:{height:"100%","&.MuiCardActionArea-focusHighlight":{opacity:0},"&:hover":{boxShadow:"none",backgroundColor:Xl.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:Xl.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:ts,boxShadow:`inset 0 0 0 2px ${Xl.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:zr.jsx(np,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:Zl,borderRadius:ts,color:Xl.TEXT_PRIMARY,backgroundColor:Xl.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:Xl.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${Xl.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:Xl.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:Xl.GREYSCALE_0_05,color:Xl.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:Xl.GREEN,borderColor:Xl.GREEN},"&.MuiChip-outlinedInfo":{color:Xl.BLUE,borderColor:Xl.BLUE},"&.MuiChip-outlinedWarning":{color:Xl.ORANGE,borderColor:Xl.ORANGE},"&.MuiChip-outlinedError":{color:Xl.RED,borderColor:Xl.RED}},outlined:{border:`solid 1px ${Xl.GREYSCALE_0_15}`,backgroundColor:Xl.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:ts,boxShadow:"none",backgroundColor:Xl.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:Xl.GREEN,borderColor:Xl.GREEN},outlinedSecondary:{color:Xl.BLUE,borderColor:Xl.BLUE},label:{fontFamily:as.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:zr.jsx(np,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:zr.jsx(Qu,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),forcePopupIcon:!0},styleOverrides:{root:{"& .MuiAutocomplete-endAdornment > button":{border:"none",backgroundColor:"unset"}},input:{"&.MuiAutocomplete-input":{padding:"6px 4px"}},inputRoot:{padding:"0px 2px",boxSizing:"border-box",borderRadius:ts},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:ts,fontSize:Jl,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:Xl.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${Xl.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:Xl.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:Xl.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:Xl.GREYSCALE_0_05}}},popupIndicator:{borderRadius:ts,border:`solid 1px ${Xl.GREYSCALE_0_15}`,color:Xl.GREYSCALE_0_60,marginRight:0,width:es,height:es},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${Xl.GREYSCALE_0_15}`},clearIndicator:{borderRadius:ts,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:Xl.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:Jl}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:Zl,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:Xl.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:Xl.GREYSCALE_25,fontSize:Zl,fontFamily:as.FONT_FAMILY,fontWeight:os,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:Xl.TEXT_PRIMARY},"&.Mui-error":{color:Xl.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:Xl.TEXT_SECONDARY,content:"'(optional)'",fontWeight:ns,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:Xl.TEXT_SECONDARY,content:"'(required)'",fontWeight:ns,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:Jl,lineHeight:"16px",backgroundColor:Xl.WHITE,borderRadius:ts,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Xl.GREYSCALE_0_05}`,borderColor:Xl.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Xl.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${Xl.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${Xl.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Xl.RED}`,boxShadow:`0px 0px 0px 1px ${Xl.RED}, inset 0 2px 0 0 ${Xl.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${Xl.GREYSCALE_0_10}`,borderColor:Xl.GREYSCALE_0_10,backgroundColor:Xl.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:Xl.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:Xl.GREYSCALE_0_15,borderRadius:ts,boxShadow:`inset 0 2px 0 0 ${Xl.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>zr.jsx(Qu,{...e,"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),MenuProps:{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}}},styleOverrides:{select:{padding:"7px 12px",borderRadius:"3px !important",minHeight:"1em","& em":{color:Xl.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:Xl.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:Xl.GREYSCALE_0_03},"&:active":{backgroundColor:Xl.GREYSCALE_0_10},"&:focus":{backgroundColor:Xl.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${Xl.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${Xl.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:Xl.GREYSCALE_0_30,"&:hover":{backgroundColor:Xl.GREYSCALE_0_0,borderColor:Xl.GREYSCALE_0_15},"& ~svg":{color:Xl.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${Xl.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:ts}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:Xl.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${Xl.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:Xl.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:Jl,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:Zl,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:Zl,fontWeight:os,color:Xl.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:os}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${Xl.GREYSCALE_0_15}, 0px 0px 0px 1px ${Xl.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:zr.jsx(ip,{}),checkedIcon:zr.jsx(rp,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:Xl.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${Xl.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:Xl.GREEN_PALE,boxShadow:`0 0 0 3px ${Vo(Xl.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:Xl.BLUE_PALE,boxShadow:`0 0 0 3px ${Vo(Xl.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:Xl.GREYSCALE_0_20}},"&.Mui-disabled":{fill:Xl.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:zr.jsx(lp,{}),checkedIcon:zr.jsx(tp,{}),indeterminateIcon:zr.jsx(op,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:ts,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:Xl.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:Xl.GREYSCALE_0_55,color:Xl.GREYSCALE_0_03}}},"&.sprout-focus-visible i":{boxShadow:"0px 0px 0px 2px #0275D9",g:{rect:{stroke:"none"}}}}}},"&.Mui-disabled":{"& i":{pointerEvents:"auto",cursor:"not-allowed !important",color:Xl.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:Xl.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:Xl.GREYSCALE_0_55,"&:hover":{color:Xl.GREYSCALE_25}}}}}},MuiCircularProgress:{defaultProps:{thickness:3,disableShrink:!0}},MuiDialog:{defaultProps:{fullWidth:!0}},MuiDialogActions:{styleOverrides:{root:{padding:"16px"}}},MuiDialogTitle:{styleOverrides:{root:{display:"flex",alignItems:"center",justifyContent:"space-between",boxSizing:"content-box",minHeight:"31px",padding:"16px 16px 16px 24px",fontSize:"16px",lineHeight:"24px"}}},MuiDialogContentText:{defaultProps:{variant:"body2"},styleOverrides:{root:{marginBottom:0}}},MuiDialogContent:{styleOverrides:{root:{padding:"16px 24px !important"}}},MuiDivider:{styleOverrides:{middle:{margin:"4px 8px"}}},MuiLink:{defaultProps:{underline:"none",color:Xl.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:Xl.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:Jl,color:Xl.TEXT_PRIMARY,lineHeight:"16px",fontWeight:os},secondary:{fontSize:Zl,color:Xl.GREYSCALE_45,fontWeight:ns,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:Jl,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:Jl,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:Xl.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:Zl,borderBottom:`solid 1px ${Xl.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:Jl,color:Xl.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:Xl.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:Xl.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:Xl.GREYSCALE_0_10},"&:not(.Mui-disabled)":{"&::after":{content:'url(\'data:image/svg+xml,<?xml version="1.0" encoding="UTF-8"?>%0A<svg width="8px" height="7px" viewBox="0 0 8 7" version="1.1"%0A xmlns="http://www.w3.org/2000/svg"%0A xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="Tick">%0A <g stroke="none" stroke-width="1" fill-rule="evenodd">%0A <g transform="translate(0.000000, -1.000000)">%0A <path d="M7.51662484,1.29325 C7.12545778,0.90225 6.49218732,0.90225 6.10202068,1.29325 L2.73658335,4.65725 L1.90722914,3.82925 C1.5170625,3.43825 0.883792042,3.43825 0.492624979,3.82925 C0.102458344,4.21925 0.102458344,4.85225 0.492624979,5.24325 L2.02928127,6.77825 C2.4194479,7.16925 3.05271836,7.16925 3.44388542,6.77825 L7.51662484,2.70725 C7.9077919,2.31725 7.9077919,1.68425 7.51662484,1.29325"></path>%0A </g>%0A </g>%0A</svg>%0A\')',fontFamily:"LUI icons",position:"absolute",fontSize:"10px",right:"10px",color:Xl.RED}}},"&.Mui-focusVisible":{backgroundColor:Xl.GREYSCALE_0_03}},divider:{marginTop:"8px",marginBottom:"8px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiMenu:{styleOverrides:{list:{paddingTop:"4px",paddingBottom:"4px"},paper:{marginTop:"4px !important",marginBottom:"4px",background:Xl.WHITE,boxShadow:"0 0 0 1px rgba(0,0,0,0.05), 0 4px 10px 0 rgba(0,0,0,0.15) !important",borderRadius:"2px !important"}}},MuiSlider:{styleOverrides:{root:{color:Xl.GREEN,height:"24px","&.Mui-disabled":{color:Xl.GREYSCALE_0_15}},rail:{backgroundColor:Xl.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${Xl.GREYSCALE_0_05}`,borderRadius:ts,boxShadow:`inset 0px 0px 0px 1px ${Xl.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${Xl.GREYSCALE_0_05}`,borderRadius:ts},thumb:{height:"16px",width:"16px",borderRadius:ts,backgroundColor:Xl.WHITE,boxShadow:`0px 1px 2px 0px ${Xl.GREYSCALE_0_15}, 0px 0px 0px 1px ${Xl.GREYSCALE_0_05}`,"&:hover":{borderRadius:ts,boxShadow:`0 2px 4px 0 ${Xl.GREYSCALE_0_30}, 0 0 0 1px ${Xl.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${Xl.GREYSCALE_0_15}, 0 0 0 1px ${Xl.GREYSCALE_0_06}, 0 0 0 2px ${Xl.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${Xl.GREYSCALE_0_15}, 0 0 0 1px ${Xl.GREYSCALE_0_06}, 0 0 0 2px ${Xl.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:Xl.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:Xl.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:Xl.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:Xl.GREYSCALE_0_15},markLabel:{color:Xl.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:Xl.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:Xl.WHITE,color:Xl.GREYSCALE_25}}},MuiSwitch:{defaultProps:{color:"primary",size:"small"},styleOverrides:{root:{padding:"10px",width:"60px",height:"40px","& .MuiSwitch-switchBase":{"&:hover":{backgroundColor:"unset"},"&.Mui-checked":{"&:hover":{backgroundColor:"unset"}}}},switchBase:{padding:"12px","&.Mui-disabled":{"&.MuiSwitch-thumb":{backgroundColor:Xl.GREYSCALE_100_50}},"&.Mui-checked + .MuiSwitch-track":{opacity:1},"&.Mui-disabled + .MuiSwitch-track":{opacity:.12},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"}},colorPrimary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:Xl.GREEN_PALE,boxShadow:`0 0 0 3px ${Vo(Xl.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:Xl.BLUE_PALE,boxShadow:`0 0 0 3px ${Vo(Xl.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:Xl.GREYSCALE_0_15,borderRadius:ts},thumb:{height:"16px",width:"16px",borderRadius:ts,backgroundColor:Xl.GREYSCALE_100},sizeSmall:{height:"32px",width:"52px",padding:"8px 10px","& .MuiSwitch-thumb":{height:"12px",width:"12px"},"& .MuiSwitch-switchBase":{padding:"10px 12px"}}}},MuiTextField:{defaultProps:{margin:"dense",variant:"outlined"},styleOverrides:{root:{marginBottom:0}}},MuiTab:{styleOverrides:{root:{fontSize:Jl,fontWeight:os,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${Xl.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${Xl.MISC_FOCUS_BORDER}`,backgroundColor:Xl.GREYSCALE_0_03,borderRadius:ts},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:Xl.GREYSCALE_25,"&.Mui-selected":{color:Xl.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:Jl,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:ts,"&:hover":{backgroundColor:Xl.GREYSCALE_0_03},"&.Mui-disabled":{opacity:"unset","& .MuiSvgIcon-root":{opacity:.3}}},vertical:{padding:"8px",boxSizing:"border-box","& .MuiTabs-indicator":{left:0,right:"unset",transition:"none",clipPath:"inset(12px 0 12px 0)",marginLeft:"1px"},"& .MuiTabs-scrollButtons":{flexDirection:"column",position:"relative","&:first-child":{marginBottom:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${Xl.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${Xl.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:ts,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:Xl.GREYSCALE_0_05},"&:hover":{backgroundColor:Xl.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${Xl.GREYSCALE_85}`,borderRight:`1px solid ${Xl.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:os,backgroundColor:Xl.GREYSCALE_98},paddingCheckbox:{width:"40px",padding:"0px"},paddingNone:{padding:"0px"},sizeSmall:{padding:"0px 8px",height:"29px","&.MuiTableCell-head":{height:"31px"},"&.MuiTableCell-paddingCheckbox":{width:"40px",padding:"0px"}},stickyHeader:{backgroundColor:Xl.GREYSCALE_98,borderBottom:`1px solid ${Xl.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${Xl.GREYSCALE_85}`,borderTop:`1px solid ${Xl.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:Xl.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:Xl.GREYSCALE_0_05,"&:hover":{backgroundColor:Xl.GREYSCALE_0_03}},"&&:hover":{backgroundColor:Xl.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>zr.jsx(ap,{className:e})},styleOverrides:{root:{display:"flex",justifyContent:"space-between","&:hover":{"& icon":{opacity:.5}},"&.Mui-active":{"&& icon":{opacity:1}}},icon:{opacity:0},iconDirectionDesc:{transform:"rotate(180deg)"},iconDirectionAsc:{transform:"rotate(0deg)"}}},MuiTable:{styleOverrides:{root:{borderLeft:`1px solid ${Xl.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:Jl,borderRadius:ts,padding:"7px 16px",border:`1px solid ${Xl.GREYSCALE_0_15}`,backgroundColor:Xl.GREYSCALE_100_60,color:Xl.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:Xl.GREYSCALE_0_10,border:`1px solid ${Xl.GREYSCALE_0_30}`},"&:hover":{backgroundColor:Xl.GREYSCALE_0_03,border:`1px solid ${Xl.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:Xl.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${Xl.MISC_FOCUS_BORDER}`,border:`1px solid ${Xl.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:Xl.GREYSCALE_25,backgroundColor:Xl.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:Xl.GREYSCALE_0_10,border:`1px solid ${Xl.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:Zl,height:24,width:24,padding:7},sizeLarge:{fontSize:Ql,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:Jl,borderRadius:ts}}},MuiToolbar:{defaultProps:{disableGutters:!0},styleOverrides:{root:{display:"flex",flex:1,padding:"0 16px"},dense:{minHeight:"46px",padding:"0 8px"}}},MuiTooltip:{defaultProps:{arrow:!0,enterNextDelay:300,enterDelay:400},styleOverrides:{arrow:{color:Xl.GREYSCALE_20},tooltip:{backgroundColor:Xl.GREYSCALE_20,fontSize:Zl,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}},...e?{...sp}:{}});var dp=()=>({mode:"light",primary:{ultraLight:Xl.GREEN_ULTRA_LIGHT,light:Xl.GREEN_PALE,main:Xl.GREEN,dark:Xl.GREEN_DARK,extraDark:Xl.GREEN_EXTRA_DARK,contrastText:Xl.WHITE},secondary:{ultraLight:Xl.BLUE_ULTRA_LIGHT,light:Xl.BLUE_PALE,main:Xl.BLUE,dark:Xl.BLUE_DARK,extraDark:Xl.BLUE_EXTRA_DARK,contrastText:Xl.WHITE},error:{ultraLight:Xl.RED_ULTRA_LIGHT,light:Xl.RED_PALE,main:Xl.RED,dark:Xl.RED_DARK,extraDark:Xl.RED_EXTRA_DARK,contrastText:Xl.WHITE},warning:{ultraLight:Xl.ORANGE_ULTRA_LIGHT,light:Xl.ORANGE_PALE,main:Xl.ORANGE,dark:Xl.ORANGE_DARK,extraDark:Xl.ORANGE_EXTRA_DARK,contrastText:Xl.WHITE},success:{ultraLight:Xl.GREEN_ULTRA_LIGHT,light:Xl.GREEN_PALE,main:Xl.GREEN,dark:Xl.GREEN_DARK,extraDark:Xl.GREEN_EXTRA_DARK,contrastText:Xl.WHITE},info:{ultraLight:Xl.BLUE_ULTRA_LIGHT,light:Xl.BLUE_PALE,main:Xl.BLUE,dark:Xl.BLUE_DARK,extraDark:Xl.BLUE_EXTRA_DARK,contrastText:Xl.WHITE},text:{primary:Xl.TEXT_PRIMARY,secondary:Xl.TEXT_SECONDARY,disabled:Xl.GREYSCALE_0_30},action:{hover:Xl.GREYSCALE_0_03,hoverOpacity:.03,selected:Xl.GREYSCALE_0_05,selectedOpacity:.05,focus:Xl.MISC_FOCUS_BORDER},amethyst:{ultraLight:Xl.WHITE,main:Xl.PURPLE,light:Xl.PURPLE_PALE,dark:Xl.PURPLE_DARK,extraDark:Xl.GREYSCALE_0_0,contrastText:Xl.WHITE},background:{paper:Xl.WHITE,default:Xl.GREYSCALE_95},divider:Xl.GREYSCALE_0_15});var up=e=>dp();var pp=(e,t=!1)=>{const r=((e,t)=>cp(t))(0,t);return{components:r,palette:up(e),breakpoints:{keys:["xs","sm","md","lg","xl"],values:{xs:0,sm:600,md:960,lg:1280,xl:1920}},spacing:8,shadows:["none","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 1px 2px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 2px 4px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 4px 10px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)","0px 6px 20px 0px rgba(0,0,0,0.15)"],transitions:{easing:{easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration:{standard:300,short:250,enteringScreen:225,shorter:200,leavingScreen:195,shortest:150,complex:375}},typography:{fontSize:Jl,fontWeightLight:rs,fontWeightRegular:ns,fontWeightMedium:os,fontWeightBold:is,htmlFontSize:Jl,fontFamily:as.FONT_FAMILY,button:{fontWeight:os,fontSize:Jl,textTransform:"none"},body1:{fontSize:Ql,lineHeight:"24px"},body2:{fontSize:Jl,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:es,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:Ql,fontWeight:os,lineHeight:"16px"},h6:{fontSize:Jl,fontWeight:os,lineHeight:"16px"},caption:{color:Xl.TEXT_SECONDARY},subtitle1:{fontSize:Jl,color:Xl.TEXT_SECONDARY},subtitle2:{fontSize:Zl,color:Xl.TEXT_SECONDARY}},shape:{borderRadius:ts}}};function hp(e){return pl({...pp("light"),direction:e})}class fp{constructor({translator:e}){P(this,"translator",void 0),P(this,"muiTheme",void 0),P(this,"containers",{}),P(this,"sync",(({element:e,sharedContainerUtilities:t,translator:r,containerId:n,dataHandler:o,renderHelper:i})=>{this.translator=r,this.containers[n]={element:e,sharedContainerUtilities:t,dataHandler:o,renderHelper:i}})),P(this,"setMuiTheme",(e=>{this.muiTheme=hp(e)})),P(this,"destroy",(e=>{delete this.containers[e]})),this.translator=e}}const mp=["container","sn-layout-container","sn-tabbed-container","listbox","qlik-tabbed-container","qlik-show-hide-container","qlik-trellis-container","qlik-on-demand-reporting","sn-analysis-autochart"];class bp{constructor(e,t){P(this,"embed",void 0),P(this,"translator",void 0),P(this,"charts",{}),P(this,"getCharts",(()=>{var e;return this.charts=(null===(e=this.embed)||void 0===e?void 0:e.getRegisteredTypes()).reduce(((e,t)=>{var r,n;if(!(mp.includes(t.id)||!1===(null===(r=t.libraryInfo)||void 0===r?void 0:r.isLibraryItem)||null!==(n=t.libraryInfo)&&void 0!==n&&n.deprecated)){var o;const r=t;null!==(o=r.libraryInfo)&&void 0!==o&&o.translationKey&&(r.libraryInfo.translation=this.translator.get(r.libraryInfo.translationKey)),e[t.id||t.type]=r}return e}),{}),this.charts})),P(this,"getChart",(e=>(this.charts[e]||this.getCharts(),this.charts[e]))),this.embed=e,this.translator=t}}var gp,vp=L;gp=vp.createRoot,vp.hydrateRoot;const yp=x(((e,t)=>zr.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",height:"16px",fill:"currentColor","aria-hidden":"true",role:"img",ref:t,...e,children:zr.jsx("path",{d:"M9.057 11.164a6 6 0 1 1 2.112-2.116 1 1 0 0 1 .052.044l4.176 4.08a1 1 0 0 1 .009 1.422l-.707.707a1 1 0 0 1-1.406.008l-4.185-4.087a1 1 0 0 1-.05-.058ZM10.5 6a4.5 4.5 0 1 0-9 0 4.5 4.5 0 0 0 9 0"})}))),xp="rgb(89, 89, 89)",Ep=_r(Lc)({display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}),Sp=_r(Lc)({display:"flex",justifyContent:"center",alignItems:"center",height:"100%"}),Cp=_r(Rd,{shouldForwardProp:e=>"width"!==e})((({width:e})=>({"&.MuiList-root":{paddingTop:0,paddingBottom:0,width:e||250,maxHeight:250,overflow:"auto"}}))),wp=_r(oc)({color:xp,fontSize:"12px",fontFamily:"inherit",lineHeight:"24px",margin:"0px"}),Rp=_r(Ud)({"&.MuiListItemIcon-root":{minWidth:32,color:xp,marginRight:"0px"}}),kp=_r(cd)({"&.MuiDivider-root":{borderBottom:"3px solid #595959"}}),Ap=_r(Fc)({"&.MuiButton-contained":{backgroundColor:xp,color:"rgb(255, 255, 255)"},"&.MuiButton-outlined":{backgroundColor:"rgb(255, 255, 255)",borderColor:xp,color:xp,border:"1px solid rgb(179, 179, 179)","&:hover":{backgroundColor:"rgb(255, 255, 255)",border:`1px solid ${xp}`}}}),_p=_r(us)({width:"1em",height:"1em",paddingBottom:"8px"}),Ip=_r(us)({width:"16px",height:"16px"}),Tp=({name:e,items:t,onSelect:r})=>y.createElement(y.Fragment,null,y.createElement(Fd,{key:e,dense:!0},y.createElement(wp,{noWrap:!0,fontWeight:"bold"},e)),y.createElement(kp,null),t.map((e=>{var t;return y.createElement(Fd,{key:null!==(t=e.qExtendsId)&&void 0!==t?t:e.name,divider:!0,disablePadding:!0,disableGutters:!0},y.createElement(Od,{sx:{minHeight:"32px",height:"auto"},onClick:()=>{r(e)},disableRipple:!0,dense:!0},e.iconPath&&y.createElement(Rp,null,e.IconDefinition?y.createElement(e.IconDefinition,null):y.createElement(Ip,{viewBox:"0 0 16 16"},y.createElement("path",{d:e.iconPath}))),y.createElement(wp,{noWrap:!0,title:e.translation||e.name},e.translation||e.name)))}))),Lp=({categories:e,anchorEl:t,onClose:r,onSelect:n,width:o})=>{const[i,a]=R(""),l=!!t;return k((()=>{l&&a("")}),[l]),y.createElement(du,{open:l,anchorEl:t,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},sx:{marginTop:"5px"}},y.createElement(Ec,{fullWidth:!0,onChange:e=>{a(e.target.value)},startAdornment:y.createElement(xd,{position:"start"},y.createElement(yp,null))}),y.createElement(kp,null),y.createElement(Cp,{width:o},e.map((e=>{const t=e.items.filter((e=>{const t=e.translation||e.name;return(null==t?void 0:t.toLocaleLowerCase().indexOf(i.toLocaleLowerCase()))>-1}));return t.length>0&&y.createElement(Tp,{key:e.name,name:e.name,items:t,onSelect:n})}))))},Op=({anchorEl:e,onClose:t,dataHandler:r,translator:n,sharedContainerUtilities:o,width:i})=>{const[a,l]=R([]),[s,c]=R({});k((()=>{if(e&&r){(async()=>{const e=await r.getMasterVizList();l(e),c(r.getCharts())})().catch((()=>{}))}}),[e,r]);const d=[],u=[],p=new Map,h=Object.values(s);if(0===h.length&&0===a.length)return null;h.forEach((e=>{var t;if(!e.libraryInfo||!e.libraryInfo.isThirdParty&&e.libraryInfo.visible)d.push(e);else if(e.libraryInfo.visible)if(null!==(t=e.libraryInfo.bundle)&&void 0!==t&&t.name){const t=e.libraryInfo.bundle.name,r=p.get(t);r?r.push(e):p.set(t,[e])}else u.push(e)}));const f=e=>e.map((e=>{var t,r,n,o;return{iconPath:null===(t=e.libraryInfo)||void 0===t?void 0:t.iconPath,IconDefinition:null===(r=e.libraryInfo)||void 0===r?void 0:r.IconDefinition,name:e.id,translation:(null===(n=e.libraryInfo)||void 0===n?void 0:n.translation)||(null===(o=e.libraryInfo)||void 0===o?void 0:o.name)||e.id||"",type:e.id}})).sort(((e,t)=>(e.translation||e.name).localeCompare(t.translation||t.name))),m=[{name:n.get("LayoutContainer.Object.MasterItems"),items:a.map((e=>{var t,r;return{qExtendsId:e.qExtendsId,iconPath:null===(t=s[e.visualization])||void 0===t||null===(t=t.libraryInfo)||void 0===t?void 0:t.iconPath,IconDefinition:null===(r=s[e.visualization])||void 0===r||null===(r=r.libraryInfo)||void 0===r?void 0:r.IconDefinition,name:e.name,type:e.visualization}})).sort(((e,t)=>e.name.localeCompare(t.name)))},{name:n.get("LayoutContainer.Object.Charts"),items:d.map((e=>{var t,r,n,o,i;return{iconPath:(null===(t=e.libraryInfo)||void 0===t?void 0:t.iconPath)||"",IconDefinition:null===(r=e.libraryInfo)||void 0===r?void 0:r.IconDefinition,name:(null===(n=e.libraryInfo)||void 0===n?void 0:n.name)||e.id,type:(null===(o=e.libraryInfo)||void 0===o?void 0:o.template)||e.id,translation:(null===(i=e.libraryInfo)||void 0===i?void 0:i.translation)||e.id||""}})).sort(((e,t)=>e.translation.localeCompare(t.translation)))},{name:n.get("LayoutContainer.Object.CustomObjects"),items:f(u)}];for(const[e,t]of p)m.push({name:e,items:f(t)});return y.createElement(Lp,{categories:m,anchorEl:e,onSelect:e=>{if(!r)return;const{qExtendsId:n}=e;(n?r.addMasterObjectAsChild({initProps:{qExtendsId:n,qInfo:{qType:"undefined"}}}):r.addVizAsChild({type:e.type,objectInitProps:{label:e.translation}})).then((e=>{null!=e&&e.id&&(null==o||o.setSelected([e.id]))})).catch((e=>{console.warn(e)})).finally((()=>{t()}))},onClose:t,width:i})},Pp=e=>{var t,r;const n=jp(e);return null!==(t=null===(r=e.objects)||void 0===r?void 0:r.map((e=>{const{childRefId:t}=e;if(!t)return e;const r=n[t];return r?{...e,id:r}:e})))&&void 0!==t?t:[]},Mp=(e,t)=>{var r;return null==e||null===(r=e.qChildList)||void 0===r||null===(r=r.qItems)||void 0===r?void 0:r.find((e=>{var r;return(null==e||null===(r=e.qData)||void 0===r?void 0:r.childRefId)===t}))},jp=e=>{var t;return null==e||null===(t=e.qChildList)||void 0===t||null===(t=t.qItems)||void 0===t?void 0:t.reduce(((e,t)=>{var r,n;return e[null==t||null===(r=t.qData)||void 0===r?void 0:r.childRefId]=null==t||null===(n=t.qInfo)||void 0===n?void 0:n.qId,e}),{})};var Np=Mp,$p=e=>{const t={...e};return t.objects=Pp(t),t},zp=e=>{var t;return null==e||null===(t=e.qChildList)||void 0===t||null===(t=t.qItems)||void 0===t?void 0:t.reduce(((e,t)=>{var r,n;return e[null==t||null===(r=t.qInfo)||void 0===r?void 0:r.qId]=null===(n=t.qData)||void 0===n?void 0:n.childRefId,e}),{})},Bp=e=>e.objects.reduce(((e,t)=>(e[t.childRefId]=t,e)),{}),Dp=(e,t)=>{var r;if(!e)return t;const n=Mp(e,t);return null==n||null===(r=n.qInfo)||void 0===r?void 0:r.qId};class Fp{constructor({app:e,data:t}){P(this,"layout",void 0),P(this,"app",void 0),P(this,"activeId",""),P(this,"data",void 0),P(this,"properties",void 0),P(this,"setSelectedChild",(e=>{var t;null===(t=this.activeContainer)||void 0===t||null===(t=t.sharedContainerUtilities)||void 0===t||t.setSelected(e)})),P(this,"addChild",(({initProps:e,objectInitProps:t,children:r})=>{if(!this.activeContainer)return;const{dataHandler:n}=this.activeContainer;if(null!=e&&e.qExtendsId){const{qExtendsId:o,qInfo:i}=e;return null==n?void 0:n.addMasterObjectAsChild({initProps:{qExtendsId:o,qInfo:i},objectInitProps:t,children:r})}return null==n?void 0:n.addVizAsChild({type:null==e?void 0:e.visualization,initProps:e,objectInitProps:t,children:r})})),P(this,"deleteChild",(async e=>{if(!this.activeContainer)return;const{dataHandler:t}=this.activeContainer;await(null==t?void 0:t.deleteChildren([e]))})),P(this,"duplicateChild",(async e=>{var t;const{childRefId:r,...n}=e,o=this.getEngineId(r);if(!o)return;const i=await(null===(t=this.app)||void 0===t?void 0:t.getObject(o));if(i&&this.activeContainer){const{sharedContainerUtilities:e}=this.activeContainer,t=await i.getFullPropertyTree(),r=t.qProperty,o=t.qChildren,a=await this.addChild({initProps:r,children:o,objectInitProps:n});a&&(null==e||e.setSelected([a.id]))}})),P(this,"openAddChildPopover",(e=>{if(this.activeContainer&&this.activeContainer.dataHandler&&this.data.muiTheme){const t=((e,t)=>{const r=e.getElementsByClassName(t);let n;return 0===r.length?(n=document.createElement("div"),n.className=t,e.appendChild(n)):n=r[0],gp(n)})(this.activeContainer.element,"add-child-popover"),r=()=>{t.unmount()};null==t||t.render(y.createElement(ql,{theme:this.data.muiTheme},y.createElement(Op,{translator:this.data.translator,anchorEl:e,dataHandler:this.activeContainer.dataHandler,onClose:r,width:220,sharedContainerUtilities:this.activeContainer.sharedContainerUtilities})))}})),P(this,"setModel",(e=>{this.activeId=e.id})),P(this,"setLayout",(e=>{this.layout=e})),P(this,"getLayout",(()=>this.layout)),P(this,"getEngineId",(e=>Dp(this.layout,e))),P(this,"setProperties",(e=>{this.properties=e})),P(this,"canAddDimension",(()=>!1)),P(this,"canAddMeasure",(()=>!1)),P(this,"canColorBy",(()=>!1)),P(this,"getDimensions",(()=>[])),P(this,"getMeasures",(()=>[])),P(this,"minDimensions",(()=>0)),P(this,"minMeasures",(()=>0)),P(this,"maxDimensions",(()=>0)),P(this,"maxMeasures",(()=>0)),this.app=e,this.data=t}get activeContainer(){return this.data.containers[this.activeId]}getObject(e){const t=this.getEngineId(e);var r;if(t)return null===(r=this.activeContainer)||void 0===r?void 0:r.renderHelper.objectMap.get(t)}}function Gp(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Hp(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,l=[],s=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;s=!1}else for(;!(s=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);s=!0);}catch(e){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return l}}(e,t)||Up(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yp(e){return function(e){if(Array.isArray(e))return Gp(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Up(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Up(e,t){if(e){if("string"==typeof e)return Gp(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Gp(e,t):void 0}}var Vp,qp="top",Kp="top-right",Xp="right",Zp="bottom-right",Jp="bottom",Qp="bottom-left",eh="left",th="top-left";Hp(Hp(Hp(Hp(Hp(Hp(Hp(Hp(Hp(Hp(Vp={},"equal-equal",[qp,Jp]),"equal-higher",[Jp,Zp]),"equal-lower",[qp,Kp]),"equal-void",[qp,Jp]),"higher-equal",[eh,Qp,qp,Kp]),"higher-higher-acute",[Jp,Qp,eh,Kp]),"higher-higher-obtuse",[Jp,qp]),"higher-lower-negative",[qp,Kp,Xp]),"higher-lower-positive",[Jp,Qp,eh]),"higher-void",[qp]),Hp(Hp(Hp(Hp(Hp(Hp(Hp(Hp(Hp(Hp(Vp,"lower-equal",[qp]),"lower-higher-negative",[qp,th]),"lower-higher-positive",[Zp]),"lower-lower-acute",[qp,th,eh,Kp,Xp]),"lower-lower-obtuse",[qp,Jp]),"lower-void",[qp]),"void-equal",[qp]),"void-higher",[qp,Jp]),"void-lower",[qp,Jp,eh]),"void-void",[qp]),Hp(Vp,"unclassified",[qp,Jp,Xp,eh,Kp,Zp,Qp,th]);var rh=["American Typewriter, serif","Andalé Mono, monospace","Arial Black, sans-serif","Arial, sans-serif","Bradley Hand, cursive","Brush Script MT, cursive","Comic Sans MS, cursive","Courier, monospace","Didot, serif","Georgia, serif","Impact, sans-serif","Lucida Console, monospace","Luminari, fantasy","Monaco, monospace","QlikView Sans, sans-serif","Source Sans Pro, sans-serif","Tahoma, sans-serif","Times New Roman, serif","Trebuchet MS, sans-serif","Verdana, sans-serif"],nh=["Abril Fatface, serif","Bangers, fantasy","Bebas Neue, sans serif","EB Garamond, serif","Fredoka One, fantasy","Graduate, fantasy","Gravitas One, serif","Indie Flower, fantasy","Inter, sans-serif","Lobster, fantasy","Montserrat, sans-serif","Nixie One, sans-serif","Noto Sans, sans-serif","Open Sans, sans-serif","PT Serif, serif","Pacifico, cursive","Permanent Marker, fantasy","QlikView Sans, sans-serif","Raleway, sans-serif","Rammetto One, fantasy","Roboto, sans-serif","Source Sans Pro, sans-serif","Titan One, fantasy","Yanone Kaffeesatz, sans-serif"];var oh=function(e){return{value:e,label:e.charAt(0).toUpperCase()+e.slice(1),groupHeader:!1,disabled:!1,styles:{fontFamily:e}}};function ih(e){var t=e.theme,r=e.translator,n=e.defaultValue,o=e.flags,i=[],a=t.getStyle("","","fontFamilies");return Array.isArray(a)&&a.length?i.push.apply(i,Yp(new Set([n].concat(Yp(a.map((function(e){return e.split(",").map((function(e){return e.trim()})).map((function(e){return e.replace(/\s+/g," ").trim()})).filter(Boolean).join(", ")}))))))):i.push(n),[{value:"ThemeHeader",label:r.get("properties.themeFonts"),metaText:r.get("properties.theme"),groupHeader:!0}].concat(Yp(i.map((function(e){return oh(e)}))),[{value:"DefaultHeader",label:r.get("properties.allFonts"),metaText:r.get("properties.default"),groupHeader:!0}],Yp(function(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?nh:rh}(o).map((function(e){return oh(e)}))))}function ah(e){var t=e.theme,r=e.translator,n=e.id,o=e.path,i=e.flags,a=function(){return t.getStyle(n,o,"fontFamily")};return{getDefaultValue:function(){return a()},getOptions:function(){return ih({theme:t,translator:r,defaultValue:a(),flags:i})}}}var lh,sh,ch=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],dh=function(e){return{value:e,label:e,groupHeader:!1,disabled:!1}};function uh(e){var t=e.theme,r=e.translator,n=e.id,o=e.path,i=function(){return t.getStyle(n,o,"fontSize")};return{getDefaultValue:function(){return i()},getOptions:function(){return function(e){var t=e.translator,r=e.defaultValue,n=[],o=e.theme.getStyle("","","fontSizes");return Array.isArray(o)&&o.length?n.push.apply(n,Yp(new Set([r].concat(Yp(o))))):n.push(r),[{value:"ThemeHeader",label:t.get("properties.themeFontSizes"),metaText:t.get("properties.theme"),groupHeader:!0}].concat(Yp(n.map((function(e){return dh(e)}))),[{value:"DefaultHeader",label:t.get("properties.allFontSizes"),metaText:t.get("properties.default"),groupHeader:!0}],Yp(ch.map((function(e){return dh(e)}))))}({theme:t,translator:r,defaultValue:i()})}}}function ph(e){var t=e.theme,r=e.translator,n=e.id,o=e.path;return{fontFamily:ah({theme:t,translator:r,id:n,path:o,flags:e.flags}),fontSize:uh({theme:t,translator:r,id:n,path:o})}}var hh=function(){if(sh)return lh;sh=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(r){if(!r||"[object Object]"!==t.call(r))return!1;var n,o=e.call(r,"constructor"),i=r.constructor&&r.constructor.prototype&&e.call(r.constructor.prototype,"isPrototypeOf");if(r.constructor&&!o&&!i)return!1;for(n in r);return void 0===n||e.call(r,n)},a=function(e,t){r&&"__proto__"===t.name?r(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(t,r){if("__proto__"===r){if(!e.call(t,r))return;if(n)return n(t,r).value}return t[r]};return lh=function e(){var t,r,n,s,c,d,u=arguments[0],p=1,h=arguments.length,f=!1;for("boolean"==typeof u&&(f=u,u=arguments[1]||{},p=2),(null==u||"object"!=typeof u&&"function"!=typeof u)&&(u={});p<h;++p)if(null!=(t=arguments[p]))for(r in t)n=l(u,r),u!==(s=l(t,r))&&(f&&s&&(i(s)||(c=o(s)))?(c?(c=!1,d=n&&o(n)?n:[]):d=n&&i(n)?n:{},a(u,{name:r,newValue:e(f,d,s)})):void 0!==s&&a(u,{name:r,newValue:s}));return u},lh}();function fh(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function mh(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function bh(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(hh);var gh=1/.7,vh="\\s*([+-]?\\d+)\\s*",yh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Eh=/^#([0-9a-f]{3,8})$/,Sh=new RegExp(`^rgb\\(${vh},${vh},${vh}\\)$`),Ch=new RegExp(`^rgb\\(${xh},${xh},${xh}\\)$`),wh=new RegExp(`^rgba\\(${vh},${vh},${vh},${yh}\\)$`),Rh=new RegExp(`^rgba\\(${xh},${xh},${xh},${yh}\\)$`),kh=new RegExp(`^hsl\\(${yh},${xh},${xh}\\)$`),Ah=new RegExp(`^hsla\\(${yh},${xh},${xh},${yh}\\)$`),_h={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Ih(){return this.rgb().formatHex()}function Th(){return this.rgb().formatRgb()}function Lh(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=Eh.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Oh(t):3===r?new Nh(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Ph(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Ph(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Sh.exec(e))?new Nh(t[1],t[2],t[3],1):(t=Ch.exec(e))?new Nh(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=wh.exec(e))?Ph(t[1],t[2],t[3],t[4]):(t=Rh.exec(e))?Ph(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=kh.exec(e))?Gh(t[1],t[2]/100,t[3]/100,1):(t=Ah.exec(e))?Gh(t[1],t[2]/100,t[3]/100,t[4]):_h.hasOwnProperty(e)?Oh(_h[e]):"transparent"===e?new Nh(NaN,NaN,NaN,0):null}function Oh(e){return new Nh(e>>16&255,e>>8&255,255&e,1)}function Ph(e,t,r,n){return n<=0&&(e=t=r=NaN),new Nh(e,t,r,n)}function Mh(e){return e instanceof bh||(e=Lh(e)),e?new Nh((e=e.rgb()).r,e.g,e.b,e.opacity):new Nh}function jh(e,t,r,n){return 1===arguments.length?Mh(e):new Nh(e,t,r,null==n?1:n)}function Nh(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function $h(){return`#${Fh(this.r)}${Fh(this.g)}${Fh(this.b)}`}function zh(){const e=Bh(this.opacity);return`${1===e?"rgb(":"rgba("}${Dh(this.r)}, ${Dh(this.g)}, ${Dh(this.b)}${1===e?")":`, ${e})`}`}function Bh(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dh(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Fh(e){return((e=Dh(e))<16?"0":"")+e.toString(16)}function Gh(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Wh(e,t,r,n)}function Hh(e){if(e instanceof Wh)return new Wh(e.h,e.s,e.l,e.opacity);if(e instanceof bh||(e=Lh(e)),!e)return new Wh;if(e instanceof Wh)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,o=Math.min(t,r,n),i=Math.max(t,r,n),a=NaN,l=i-o,s=(i+o)/2;return l?(a=t===i?(r-n)/l+6*(r<n):r===i?(n-t)/l+2:(t-r)/l+4,l/=s<.5?i+o:2-i-o,a*=60):l=s>0&&s<1?0:a,new Wh(a,l,s,e.opacity)}function Wh(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Yh(e){return(e=(e||0)%360)<0?e+360:e}function Uh(e){return Math.max(0,Math.min(1,e||0))}function Vh(e,t,r){return 255*(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)}fh(bh,Lh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ih,formatHex:Ih,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Hh(this).formatHsl()},formatRgb:Th,toString:Th}),fh(Nh,jh,mh(bh,{brighter(e){return e=null==e?gh:Math.pow(gh,e),new Nh(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Nh(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Nh(Dh(this.r),Dh(this.g),Dh(this.b),Bh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$h,formatHex:$h,formatHex8:function(){return`#${Fh(this.r)}${Fh(this.g)}${Fh(this.b)}${Fh(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:zh,toString:zh})),fh(Wh,(function(e,t,r,n){return 1===arguments.length?Hh(e):new Wh(e,t,r,null==n?1:n)}),mh(bh,{brighter(e){return e=null==e?gh:Math.pow(gh,e),new Wh(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Wh(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,o=2*r-n;return new Nh(Vh(e>=240?e-240:e+120,o,n),Vh(e,o,n),Vh(e<120?e+240:e-120,o,n),this.opacity)},clamp(){return new Wh(Yh(this.h),Uh(this.s),Uh(this.l),Bh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Bh(this.opacity);return`${1===e?"hsl(":"hsla("}${Yh(this.h)}, ${100*Uh(this.s)}%, ${100*Uh(this.l)}%${1===e?")":`, ${e})`}`}}));const qh=Math.PI/180,Kh=180/Math.PI,Xh=4/29,Zh=6/29,Jh=3*Zh*Zh;function Qh(e){if(e instanceof ef)return new ef(e.l,e.a,e.b,e.opacity);if(e instanceof af)return lf(e);e instanceof Nh||(e=Mh(e));var t,r,n=of(e.r),o=of(e.g),i=of(e.b),a=tf((.2225045*n+.7168786*o+.0606169*i)/1);return n===o&&o===i?t=r=a:(t=tf((.4360747*n+.3850649*o+.1430804*i)/.96422),r=tf((.0139322*n+.0971045*o+.7141733*i)/.82521)),new ef(116*a-16,500*(t-a),200*(a-r),e.opacity)}function ef(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function tf(e){return e>.008856451679035631?Math.pow(e,1/3):e/Jh+Xh}function rf(e){return e>Zh?e*e*e:Jh*(e-Xh)}function nf(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function of(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function af(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function lf(e){if(isNaN(e.h))return new ef(e.l,0,0,e.opacity);var t=e.h*qh;return new ef(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}fh(ef,(function(e,t,r,n){return 1===arguments.length?Qh(e):new ef(e,t,r,null==n?1:n)}),mh(bh,{brighter(e){return new ef(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new ef(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return new Nh(nf(3.1338561*(t=.96422*rf(t))-1.6168667*(e=1*rf(e))-.4906146*(r=.82521*rf(r))),nf(-.9787684*t+1.9161415*e+.033454*r),nf(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),fh(af,(function(e,t,r,n){return 1===arguments.length?function(e){if(e instanceof af)return new af(e.h,e.c,e.l,e.opacity);if(e instanceof ef||(e=Qh(e)),0===e.a&&0===e.b)return new af(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Kh;return new af(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new af(e,t,r,null==n?1:n)}),mh(bh,{brighter(e){return new af(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new af(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return lf(this).rgb()}}));var sf=e=>()=>e;function cf(e,t){var r=t-e;return r?function(e,t){return function(r){return e+r*t}}(e,r):sf(isNaN(e)?t:e)}!function e(t){var r=function(e){return 1==(e=+e)?cf:function(t,r){return r-t?function(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}(t,r,e):sf(isNaN(t)?r:t)}}(t);function n(e,t){var n=r((e=jh(e)).r,(t=jh(t)).r),o=r(e.g,t.g),i=r(e.b,t.b),a=cf(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=e,n}(1);var df="center",uf="bottom";function pf(e,t,r){if(void 0===e||void 0===t)return r;for(var n=t.split("."),o=e,i=0;i<n.length;++i){var a=n[i];if(void 0===o[a])return r;o=o[a]}return o}[{key:"NoDataExist",alignment:df,condition:function(e){var t=e.layoutService;if(!t)return!1;var r=t.meta.size;return r.x*r.y==0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:df,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every((function(e){return"NaN"===e.qMin&&"NaN"===e.qMax}))}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:df,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var r=t.getHyperCubeValue("qDimensionInfo.0");return r&&(r.qMax<r.qMin||"NaN"===r.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:df},{key:"DataRangeIncludingZero",alignment:uf},{key:"LimitedData",alignment:uf},{key:"NegativeOrZeroValues",alignment:uf}].reduce((function(e,t){return e[t.key]=t,e}),{});var hf,ff=["__proto__","constructor"];function mf(e,t,r){if(void 0!==e&&void 0!==t){var n=t.split("."),o=n[n.length-1];if(!ff.some((function(e){return n.includes(e)}))){for(var i=e,a=0;a<n.length-1;++a){var l=n[a];void 0===i[l]&&(i[l]=Number.isNaN(+n[a+1])?{}:[]),i=i[l]}void 0!==r?i[o]=r:delete i[o]}}}function bf(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function gf(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=yf)):void 0===t&&(t=vf);for(var r,n,o,i,a,l=new Sf(e),s=[l];r=s.pop();)if((o=t(r.data))&&(a=(o=Array.from(o)).length))for(r.children=o,i=a-1;i>=0;--i)s.push(n=o[i]=new Sf(o[i])),n.parent=r,n.depth=r.depth+1;return l.eachBefore(Ef)}function vf(e){return e.children}function yf(e){return Array.isArray(e)?e[1]:null}function xf(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Ef(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Sf(e){this.data=e,this.depth=this.height=0,this.parent=null}Sf.prototype=gf.prototype={constructor:Sf,count:function(){return this.eachAfter(bf)},each:function(e,t){let r=-1;for(const n of this)e.call(t,n,++r,this);return this},eachAfter:function(e,t){for(var r,n,o,i=this,a=[i],l=[],s=-1;i=a.pop();)if(l.push(i),r=i.children)for(n=0,o=r.length;n<o;++n)a.push(r[n]);for(;i=l.pop();)e.call(t,i,++s,this);return this},eachBefore:function(e,t){for(var r,n,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),r=o.children)for(n=r.length-1;n>=0;--n)i.push(r[n]);return this},find:function(e,t){let r=-1;for(const n of this)if(e.call(t,n,++r,this))return n},sum:function(e){return this.eachAfter((function(t){for(var r=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)r+=n[o].value;t.value=r}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),o=null;for(e=r.pop(),t=n.pop();e===t;)o=e,e=r.pop(),t=n.pop();return o}(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var o=n.length;e!==r;)n.splice(o,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(r){r!==e&&t.push({source:r.parent,target:r})})),t},copy:function(){return gf(this).eachBefore(xf)},[Symbol.iterator]:function*(){var e,t,r,n,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(r=0,n=t.length;r<n;++r)i.push(t[r])}while(i.length)}},hf=function(e){
|
|
88
88
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
89
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,o,i,a,l,s,c,d,u,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),b=m.search(/[0-9\-\+#]/),g=p-b,v=e.substring(g,g+1),y=g+("."===v||","===v?1:0),x=b>0?e.substring(y,p):"";if(r=(t="-"===(e=e.substring(h,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=l)&&(t=(+t).toFixed(l+1)),d=e[0].split(i),e[0]=d.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],s=d[1]&&d[d.length-1].length){for(m="",g=(u=t[0]).length%s,p=u.length,y=0;y<p;y++)m+=u.charAt(y),!((y-g+1)%s)&&y<p-s&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),f+(r?"-":"")+n+x}},hf({exports:{}});var Cf="'Source Sans Pro', 'Arial', 'sans-serif'",wf="#333333",Rf="#595959",kf="#737373",Af="#cccccc",_f="#e6e6e6";function If(e){var t={};return[].concat(Yp(e),Yp([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Rf],["object","axis.label.name","fontFamily",Cf],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Af],["object","axis.line.minor","color",_f],["object","axis.title","color"],["object","axis.title","fontFamily",Cf],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",_f],["object","grid.line.major","color",Af],["object","grid.line.minor","color",_f],["object","label.value","color",Rf],["object","label.value","fontFamily",Cf],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Rf],[!1,"label.value","lightColor",_f],["object","outOfRange","color","#999"],["object","legend.title","color",wf],["object","legend.title","fontFamily",Cf],["object","legend.title","fontSize","15px"],["object","legend.label","color",Rf],["object","legend.label","fontFamily",Cf],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",wf],["object","referenceLine.label.name","fontFamily",Cf],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",_f],["object","referenceLine.outOfBounds","fontFamily",Cf],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",kf,function(e){return"transparent"===e?kf:e}]])).reduce((function(e,r){var n="".concat(r[0],"-").concat(r[1],"-").concat(r[2],"}");return t[n]||(t[n]=!0,e.push(r)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var Tf=function(e){return e};function Lf(e){var t=e.theme,r=e.id,n=e.transform,o=e.extend,i=e.matrix,a={},l=n.reduce((function(e,t){var r=Wp(t,2),n=r[0],o=r[1];return e[n]=o,e}),{});return i.forEach((function(e){var n=Wp(e,5),o=n[0],i=n[1],s=n[2],c=n[3],d=n[4],u=void 0===d?function(e){return e}:d,p=function(e){var t=e.theme,r=e.base,n=e.path,o=e.attribute,i=e.defaultValue,a=void 0===i?void 0:i;if(!t||!1===r)return a;var l=t.getStyle(r,n,o);return void 0===l?a:l}({theme:t,base:"object"===o&&r?"".concat("object",".").concat(r):o,path:i,attribute:s,defaultValue:c}),h=(l["".concat(i,".").concat(s)]||Tf)(u(p));mf(a,[i,s].filter(Boolean).join("."),h)})),o.forEach((function(e){var t=Wp(e,2),r=t[0],n=t[1];mf(a,r,n)})),a}const Of={qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",containerChildId:"/containerChildId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition"}};function Pf(e){if(!e.objects)return{};const t=Bp(e);return{container_id:e.qInfo.qId,objects:e.qChildList.qItems.map((r=>{var n;return{chart_type:r.qData.visualization,chart_id:r.qInfo.qId,chart_isMaster:!!r.qData.qExtendsId,tab_isVisible:0!==(null===(n=t[r.qData.childRefId])||void 0===n?void 0:n.condition),tab_isActive:r.qData.childRefId===e.cachedTabId}}))}}const Mf=({ref:e,theme:t,change:r})=>({component:"inline-wrapper",items:{bgColorDropdown:{ref:`${e}.useColorExpression`,width:9.5,component:"dropdown",change(t){(pf(t,`${e}.color`)||pf(t,`${e}.colorExpression`))&&(mf(t,`${e}.color`,void 0),mf(t,`${e}.colorExpression`,void 0)),null==r||r(t)},options:[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],defaultValue:!1,placeholder:"properties.colorMode.primary"},bgColorPicker:{component:"color-picker",ref:`${e}.color`,width:1,show:t=>!pf(t,`${e}.useColorExpression`),disableNone:!1,defaultValue:()=>{var r;return{color:null!==(r=null==t?void 0:t.getStyle("object.tabbedContainer",e,"color"))&&void 0!==r?r:"none"}},showAlpha:!0,change:e=>{null==r||r(e)}},bgColorExpression:{component:"input-field-expression",ref:`${e}.colorExpression`,show:t=>pf(t,`${e}.useColorExpression`)}}}),jf=({theme:e})=>({bgColorAllWrapper:Mf({ref:"background.unselected"}),selectedTab:{translation:"properties.chartType.selected",component:"text"},bgColorSelectedWrapper:Mf({ref:"background.selected"}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:Mf({ref:"background.hover",theme:e,change:e=>{mf(e,"indicator.hover.color",pf(e,"background.hover.color")),mf(e,"indicator.hover.useColorExpression",pf(e,"background.hover.useColorExpression"))}})},show:(e,t)=>"left"===t.layout.orientation}}),Nf=({paths:e,fontResolver:t,theme:r})=>{const n=`${e.theme}.fontSize`;return{fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.size`,options:()=>t.getOptions(n),defaultValue:()=>t.getDefaultValue(n),show:e=>{var t;return!1!==(null===(t=e.icon)||void 0===t?void 0:t.show)}},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:r.getStyle("object.tabbedContainer",e.theme,"color")}),show:e=>{var t;return!1!==(null===(t=e.icon)||void 0===t?void 0:t.show)}}}},position:{type:"string",ref:"icon.position",component:"dropdown",options:[{value:"start",translation:"properties.dock.start"},{value:"top",translation:"properties.dock.top"},{value:"end",translation:"properties.dock.end"},{value:"bottom",translation:"properties.dock.bottom"}],defaultValue:(e,{layout:t})=>"left"===t.orientation?"top":"start",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"icon.show",component:"switch",defaultValue:!0,show:e=>"tab"===e.key}}},$f=({theme:e})=>({colorWrapper:Mf({ref:"indicator.selected",theme:e}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:Mf({ref:"indicator.hover",theme:e,change:e=>{mf(e,"background.hover.color",pf(e,"indicator.hover.color")),mf(e,"background.hover.useColorExpression",pf(e,"indicator.hover.useColorExpression"))}})},show:(e,t)=>"left"!==t.layout.orientation}}),zf=({paths:e,fontResolver:t,theme:r})=>{const n=`${e.theme}.fontFamily`,o=`${e.theme}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e.ref}.fontFamily`,options:()=>t.getOptions(n),defaultValue:()=>t.getDefaultValue(n),change:(e,t,r)=>{var n;const o=null===(n=e.label)||void 0===n?void 0:n.fontFamily,i=(e=>{const t=[];return e.objects.forEach((e=>{var r,n;const o=null===(r=e.components)||void 0===r?void 0:r.find((e=>"tab"===e.key)),i=null==o||null===(n=o.label)||void 0===n?void 0:n.fontFamily;i&&-1===t.indexOf(i)&&t.push(i)})),t})(r);o&&-1===i.indexOf(o)&&i.push(o),r.fontsUsed=i}},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.fontSize`,options:()=>t.getOptions(o),defaultValue:()=>t.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:r.getStyle("object.tabbedContainer",e.theme,"color")})}}},alignment:{component:"text-align-buttons",ref:"label.alignment",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"label.show",component:"switch",defaultValue:!0}}},Bf=({ref:e,key:t,fontResolver:r,theme:n})=>({translation:"Object.Container.Props.Label",component:"panel-section",items:{label:{component:"items",ref:e,key:t,items:zf({paths:{ref:"label",theme:"label.value"},fontResolver:r,theme:n})}}}),Df=({ref:e,key:t})=>({translation:"Visualizations.Descriptions.Width",component:"panel-section",items:{width:{component:"items",ref:e,key:t,items:{unit:{type:"string",ref:"width.unit",component:"dropdown",options:[{value:"%",translation:"Object.Table.Column.Percentage"},{value:"px",translation:"Object.Table.Column.Pixels"}],defaultValue:"%",change:e=>{var t,r;if(void 0!==(null===(t=e.width)||void 0===t?void 0:t.value)&&"%"===(null===(r=e.width)||void 0===r?void 0:r.unit))for(let t=0;t<e.width.value.length;t++)e.width.value[t]>100?e.width.value[t]=100:e.width.value[t]<5&&(e.width.value[t]=5)}},valuePixel:{translation:"properties.axis.minMax",component:"slider",ref:"width.value",range:!0,step:1,min:0,max:800,show:e=>{var t;return"px"===(null===(t=e.width)||void 0===t?void 0:t.unit)},defaultValue:[0,360]},valuePercentage:{translation:"properties.axis.minMax",component:"slider",type:"array",ref:"width.value",range:!0,step:1,min:5,max:100,show:e=>{var t,r;return!(null!==(t=e.width)&&void 0!==t&&t.unit)||"px"!==(null===(r=e.width)||void 0===r?void 0:r.unit)},defaultValue:[5,20]}}}}}),Ff=({theme:e,ref:t,key:r})=>({translation:"Object.TabbedContainer.Indicator",component:"panel-section",items:{indicator:{component:"items",ref:t,key:r,items:$f({theme:e})}}}),Gf=({ref:e,key:t,fontResolver:r,theme:n})=>({translation:"properties.icon",component:"panel-section",items:{icon:{component:"items",ref:e,key:t,items:Nf({paths:{ref:"icon",theme:"icon.value"},fontResolver:r,theme:n})}},show:(e,{layout:t})=>!0===t.showIcons}),Hf=({theme:e,ref:t,key:r})=>({translation:"Object.OrgChart.BackgroundColor",component:"panel-section",items:{background:{component:"items",ref:t,key:r,items:"tab"===r?{bgColorWrapper:Mf({ref:"background"})}:jf({theme:e})}}}),Wf=({fontResolver:e,theme:t})=>{const r="components",n="tab";return{component:"styling-panel",chartTitle:"Object.Container",tabTitle:"scripteditor.dataconnectors.delimiter.tab",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:r,items:{label:Bf({ref:r,key:n,fontResolver:e,theme:t}),width:{...Df({ref:r,key:n}),show:(e,{layout:t})=>"left"!==t.orientation},icon:Gf({ref:r,key:n,fontResolver:e,theme:t}),background:Hf({ref:r,key:n,theme:t})}}},Yf={ref:"label",type:"string",translation:"Object.Container.Props.Label",defaultValue:"",expression:"optional"},Uf={ref:"condition",translation:"Object.Container.Props.ShowCondition",component:"expression",defaultValue:{qValueExpression:{qExpr:""}},expressionType:"ValueExpression",expression:"always"},Vf=e=>({component:"button",translation:"Object.Container.Props.EditProperties",disabled:(e,t)=>{var r,n,o;const i=t.getLayout(),a=null===(r=Np(i,e.childRefId))||void 0===r?void 0:r.qMeta;return!(null!=a&&null!==(n=a.privileges)&&void 0!==n&&n.includes("update")&&null!==(o=i.permissions)&&void 0!==o&&o.update)},action(t,r,{app:n}){const{sense:o}=e.env.anything,i=r.getEngineId(t.childRefId);i&&(o.propertyPanel.show({id:i,app:n,parent:"current",headerLabel:t.label}),r.setSelectedChild([i]))}}),qf=e=>{const{sense:t}=e.env.anything;return{label:Yf,condition:Uf,styling:Wf({fontResolver:e.fontResolver,theme:null==t?void 0:t.theme}),editProperties:Vf(e)}},Kf={translation:"Object.Container.Props.Chart",component:"text",show:e=>e.objects?e.objects.length<=1:e.children.length<=1},Xf={translation:"Common.Charts",component:"text",show:e=>e.objects?e.objects.length>1:e.children.length>1},Zf=e=>({type:"array",ref:"objects",itemTitleRef:e=>e.label,allowAdd:!0,customAdd:!0,allowMove:!0,allowRemove:!0,customRemove:!0,addTranslation:"Object.Container.Props.Add",cId:"childRefId",grouped:!0,add(e,t,r){const n=document.querySelector(".pp-toplist-add-button");null!==n&&r.openAddChildPopover(n)},remove(e,t,r){r.deleteChild(e.childRefId).catch((()=>{}))},items:qf(e)}),Jf=e=>({type:"items",translation:"Object.Container.Props.Content",items:{chartLabel:Kf,chartsLabel:Xf,chartList:Zf(e)}}),Qf={type:"boolean",translation:"Object.Container.Props.ShowTabs",ref:"showTabs",defaultValue:!0,component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},em={type:"boolean",translation:"Object.Container.Props.UseDropdown",label:"Menu",ref:"useDropdown",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},tm={type:"boolean",translation:"Object.Container.Props.UseScrollButtons",ref:"useScrollButton",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!0,show:e=>e.showTabs},rm={type:"boolean",translation:"Object.Container.Props.ShowIcons",ref:"showIcons",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},nm={type:"string",translation:"Object.Container.Props.DefaultTab",ref:"defaultTabId",component:"dropdown",defaultValue:void 0,options(e,t){const r=t.getLayout();return r?r.objects.map((e=>({translation:e.label,value:e.childRefId}))):[]},change(e,t){const r=Dp(t.getLayout(),e.defaultTabId);r&&t.setSelectedChild([r])},show:e=>e.objects.length>0},om={type:"string",translation:"properties.orientation",ref:"orientation",component:"dropdown",options:[{value:"top",translation:"properties.orientation.horizontal"},{value:"left",translation:"properties.orientation.vertical"}],defaultValue:"top",show:e=>e.showTabs},im=({fontResolver:e,theme:t})=>{const r="components",n="tabs";return{component:"styling-panel",chartTitle:"Object.TabContainer",tabTitle:"Object.Container.Props.ShowTabs",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{label:Bf({ref:r,key:n,fontResolver:e,theme:t}),width:Df({ref:r,key:n}),indicator:Ff({ref:r,key:n,theme:t}),icon:Gf({ref:r,key:n,fontResolver:e,theme:t}),background:Hf({ref:r,key:n,theme:t})}}},am={items:{details:{show:e=>!0===e.showDetails}}},lm=e=>{const{sense:t}=e.env.anything;return{type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:im({fontResolver:e.fontResolver,theme:null==t?void 0:t.theme}),container:{type:"items",items:{showTabs:Qf,useDropdown:em,useScrollButton:tm,showIcons:rm,orientation:om,defaultTabId:nm}}}}},sm=e=>({uses:"settings",items:{general:am,presentation:lm(e)}}),cm=e=>({type:"items",component:"accordion",items:{content:Jf(e),settings:sm(e)}}),dm=e=>{const{sense:t}=e.env.anything,r=function(e){var t=e.theme,r=e.translator,n=e.config,o=void 0===n?{}:n,i=e.flags,a=function(e){var t=e.config,r=void 0===t?{}:t,n=r.id,o=r.paths;return{id:void 0===n?"object":"".concat("object",".").concat(n),paths:Array.isArray(o)?o:[]}}({config:o}),l=a.id,s=a.paths,c={};s.forEach((function(e){for(var n=e.split("."),o=c,a=0;a<n.length;a++){var s=n[a];a===n.length-1?o[s]=ph({theme:t,translator:r,id:l,path:e,flags:i}):void 0===o[s]&&(o[s]={}),o=o[s]}}));var d=function(e){for(var t=e.split("."),r=c,n=0;n<t.length;n++){var o=t[n];if(void 0===r[o])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));r=r[o]}return r};return c.getDefaultValue=function(e){return d(e).getDefaultValue()},c.getOptions=function(e){return d(e).getOptions()},c}({theme:null==t?void 0:t.theme,translator:e.env.translator,flags:e.env.flags,config:{id:"tabbedContainer",paths:["label.value","icon.value"]}}),n=function(e){return{async getDropOptions(e,t,r){const{item:n}=t,o=e.getCreatePropertyHandler();if(o.setModel(e.model),"state"===t.item.type){var i;const n=await e.model.getProperties();return o.setProperties(n),o.setLayout(null===(i=e.model)||void 0===i?void 0:i.layout),this.getDropStateOptions(t,o,e.model,r)}if("visualization"===n.type)return t.menu.addItem({translation:["Object.Container.DropItem",n.name],tid:"addvisualization",select(){var e;null===(e=o.addChild({initProps:{qExtendsId:n.id,qInfo:{qType:"undefined"}}}))||void 0===e||e.then((e=>{e&&o.setSelectedChild([e.id])}))}}),void r();const a=await t.item.getDropOption(t.item);"newObject"===(null==a?void 0:a.id)&&t.menu.addItem({translation:["Object.Container.DropItem",n.name],tid:"createvisualization",select(){var e,t;null===(e=o.addChild({initProps:{...a.args.init,visualization:a.args.template},children:null===(t=a.args.children)||void 0===t?void 0:t.map((e=>({qProperty:e})))}))||void 0===e||e.then((e=>{e&&o.setSelectedChild([e.id])}))}}),r()},async addChild(t,r){const{model:n}=this,o=new Fp({app:n.app,data:e.propertyHandlerData});return o.setModel(n),{childModel:await o.addChild({initProps:t,children:r}),handler:o}},canReceive(e){if(this.model.layout.qExtendsId)return!1;if("libraryitem"===e.type){const{item:t}=e;if("template"===t.type&&mp.includes(t.template))return!1;if("visualization"===t.type&&mp.includes(t.visualization))return!1}return"gridcell"!==e.type||!mp.includes(e.cell.model.layout.visualization)}}}(e);return{definition:cm({...e,fontResolver:r}),support:{snapshot:!1,export:!0,sharing:!1,exportData:!1,viewData:!1},hidePatchPanel:()=>!0,getCreatePropertyHandler:t=>new Fp({app:t,data:e.propertyHandlerData}),...n,addChild:async function(e,t){const{childModel:r,handler:o}=await n.addChild.apply(this,[e,t]);r&&o.setSelectedChild([r.id])},migrate:{properties:(e,t)=>((async(e,t)=>{if(!e.objects){const{objects:r,defaultTabId:n,components:o,orientation:i,showDetails:a}=await t.getEffectiveProperties(),l=await t.getFullPropertyTree();if(!l.qProperty.objects&&r){const s=[];l.qChildren.forEach((e=>{const r=e.qProperty;if(r.qInfo.qId){const n=async n=>{const o=await t.getChild(n),i=await o.getEffectiveProperties();return{...e,qProperty:{...r,childRefId:i.childRefId}}};s.push(n(r.qInfo.qId))}}));const c=await Promise.all(s),d={...e,objects:r,defaultTabId:null!=n?n:"",components:o,qChildListDef:Of,orientation:i,showDetails:a};t.clearSoftPatches(),await t.setFullPropertyTree({...l,qProperty:d,qChildren:c})}}})(e,t),e)},exportProperties:null,importProperties:(e,t)=>{const r={...e.properties};return"masterobject"!==e.properties.qInfo.qType&&(r.qInfo.qType=t.qInfo.qType),r.visualization=t.visualization,{qProperty:r,qChildren:e.qChildren}},extendMetrics:Pf}},um=e=>e.reduce(((e,{id:t,data:r})=>(r&&(e[t]=r),e)),{}),pm=async e=>{const t=[];for(const[r,n]of e){const e={id:r,data:void 0},o=n;t.push(o.getViewState().then((e=>({id:r,data:e}))).catch((()=>e)))}const r=await Promise.all(t);return{viewStates:um(r)}},hm=async e=>{const t=[];for(const[r,n]of e){const e={id:r,data:void 0},o=n;t.push(o.getSnapshotLayout().then((e=>({id:r,data:e}))).catch((()=>e)))}const r=await Promise.all(t);return um(r)},fm=(e,t)=>(n((async r=>{const n=r,{snapshotData:o}=n;if(o){const r=$p(n),i=t(e.objectMap,r),[a,l]=await Promise.all([hm(i.objectMap),pm(i.objectMap)]);o.objectsData={layouts:a},n.objects=i.objects,o.viewState=l}return r})),{getViewState:()=>pm(e.objectMap)});let mm=function(e){return e.COPY="ctrl+c",e.CUT="ctrl+x",e.PASTE="ctrl+v",e.OPEN_CONTEXT_MENU="shift+F10",e.ESCAPE="Escape",e.SPACE=" ",e.ENTER="Enter",e.BACKSPACE="Backspace",e.DELETE="Delete",e.SHIFT="Shift",e}({}),bm=function(e){return e.KEY_DOWN="keydown",e.KEY_UP="keyup",e.FOCUS_OUT="focusout",e}({});var gm,vm;!function(e){e.TAB_MENU="tab-menu",e.TAB_MENU_ITEM="tab-menu-item",e.ACTIVE_TAB="active-tab-button",e.TAB_WRAPPER="tab-wrapper",e.TAB="tab-button",e.TAB_EXTRA_PRIO="MuiTab-root",e.TAB_LABEL="tab-label",e.TABS_ICON="tab-icon",e.ACTIVE_TAB_PANEL="active-tab-panel",e.TAB_INDICATOR="MuiTabs-indicator"}(gm||(gm={})),function(e){e.TABS="& .tab-button.MuiTab-root, .tab-button.active-tab-button",e.TABS_HOVER="& .tab-button.MuiTab-root:hover",e.TABS_LABEL="& .tab-label",e.TABS_ICON="& .tab-icon svg",e.TABS_WRAPPER="& .tab-wrapper",e.TAB_INDICATOR="& .MuiTabs-indicator"}(vm||(vm={}));const ym=e=>{var t;return null===(t=e.getElementsByClassName(gm.ACTIVE_TAB))||void 0===t?void 0:t[0]},xm=e=>{var t;return null===(t=e.getElementsByClassName(gm.ACTIVE_TAB_PANEL))||void 0===t?void 0:t[0]},Em=({element:e,setAccessibility:n,accessibility:a,renderHelper:l,interactions:s,env:c,models:d})=>{const{modifiedLayout:{showTabs:u,objects:p,orientation:h},translator:f}=d;t((()=>{(()=>{const t="top"===h?f.get("TabContainer.Navigation.Horizontal"):f.get("TabContainer.Navigation.Vertical"),r=((e,t)=>e.map((e=>e.label||t.get("TabContainer.Object.Untitled"))).join(", "))(p,f);e.setAttribute("aria-label",f.get("TabContainer.Object.Description",[r,u?t:""]))})()}),[e,u,p,f,h]);const m=c.flags.isEnabled("VIZ-7_NEW_SHEET"),b=o(),g=i((()=>()=>{var e;(n(!1),b.enabled)&&(null===(e=b.blur)||void 0===e||e.call(b,!0))}),[b,n]),v=i((()=>t=>{switch(t.shiftKey?`shift+${t.key}`:t.key){case mm.ESCAPE:var r;t.stopPropagation(),null===(r=b.blur)||void 0===r||r.call(b,!0);break;case mm.ENTER:case mm.SPACE:{t.stopPropagation();const r=t.target;var n;if(null!=r&&r.classList.contains(gm.ACTIVE_TAB))null===(n=xm(e))||void 0===n||n.focus();break}}}),[e,b]),y=i((()=>t=>{const r=t.shiftKey?`shift+${t.key}`:t.key,n=l.objectMap.values().next().value,o=l.objectApis.values().next().value;switch(r){case mm.ESCAPE:{const r=ym(e);m?(({event:e,objectApi:t,activeTab:r})=>{var n;e.stopPropagation(),(null==t?void 0:t.viewDataToggled)&&(null===(n=t.support)||void 0===n?void 0:n.call(t,"viewData"))?t.toggleDataView():null==r||r.focus()})({event:t,objectApi:o,activeTab:r}):(({event:e,objectApi:t,activeTab:r})=>{var n,o;e.stopPropagation(),(null==t?void 0:t.viewDataToggled)&&(null===(n=t.supportViewData)||void 0===n?void 0:n.call(t))?null===(o=t.toggleDataView)||void 0===o||o.call(t):null==r||r.focus()})({event:t,objectApi:n,activeTab:r});break}case mm.ENTER:case mm.SPACE:{const r=xm(e);m?(({event:e,objectApi:t,activeTab:r})=>{var n,o,i;if(!t)return;e.stopPropagation(),null===(n=t.setOnBlurHandler)||void 0===n||n.call(t,(()=>{var e;null==r||r.focus(),null===(e=t.setOnBlurHandler)||void 0===e||e.call(t,void 0)})),!t.viewDataToggled&&(null===(o=t.support)||void 0===o?void 0:o.call(t,"viewData"))?t.toggleDataView():null===(i=t.toggleFocus)||void 0===i||i.call(t,!0)})({event:t,objectApi:o,activeTab:r}):(({event:e,objectApi:t,activeTab:r})=>{var n,o,i,a;if(!t)return;e.stopPropagation(),null===(n=t.setOnBlurHandler)||void 0===n||n.call(t,(()=>{var e;null==r||r.focus(),null===(e=t.setOnBlurHandler)||void 0===e||e.call(t,void 0)})),!t.viewDataToggled&&(null===(o=t.supportViewData)||void 0===o?void 0:o.call(t))?null===(a=t.toggleDataView)||void 0===a||a.call(t):t.viewDataToggled&&"function"==typeof(null===(i=t.dataViewObject)||void 0===i?void 0:i.focus)?t.dataViewObject.focus():"function"==typeof t.focus&&t.focus()})({event:t,objectApi:n,activeTab:r});break}case mm.OPEN_CONTEXT_MENU:t.stopPropagation(),null!=n&&n.viewDataToggled||e!==document.activeElement&&(g(),e.focus())}}),[e,g,m,l]),x=i((()=>e=>{const t=e.target;null!=t&&t.classList.contains(gm.ACTIVE_TAB_PANEL)?y(e):v(e)}),[v,y]);t((()=>(a&&e.addEventListener(bm.KEY_DOWN,x),()=>{e.removeEventListener(bm.KEY_DOWN,x)})),[e,a,x]);const[E,S]=r(!1);t((()=>{E&&(S(!1),window.setTimeout((()=>{var t,r;return null===(t=null!==(r=(e=>{var t;return null===(t=e.getElementsByClassName(gm.TAB_MENU))||void 0===t?void 0:t[0]})(e))&&void 0!==r?r:ym(e))||void 0===t?void 0:t.focus()}),0))}),[e,E]),t((()=>{n(!1)}),[s.edit,n]),t((()=>{const t=t=>{const r=t.relatedTarget;null!=e&&e.contains(r)||null!=r&&r.classList.contains(gm.TAB_MENU_ITEM)||null==g||g()};return b.enabled&&b.active&&!s.edit&&(n(!0),S(!0),e.addEventListener(bm.FOCUS_OUT,t)),()=>{e.removeEventListener(bm.FOCUS_OUT,t)}}),[b])},Sm=e=>{const[t]=r(e);return[t,function(e){Object.assign(t,e)}]},Cm={getChar(e){let t,r=e;return r>9?(t=65+r-10,t>90&&(t+=6)):r=`${r}`.charCodeAt(0),!t||[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(r+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),r=Math.floor(e/62);return r>0?this.base62(r)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};const wm={qInfo:{qId:"MasterObjectList",qType:"MasterObjectList"},qAppObjectListDef:{qType:"masterobject",qData:{name:"/qMetaDef/title",labelExpression:"/labelExpression",visualization:"/visualization",tags:"/qMetaDef/tags"}}};class Rm{constructor(e){P(this,"sessionObject",void 0),P(this,"getOrCreateSessionObject",(async e=>{const t=wm.qInfo.qId;this.sessionObject=await e.getObject(t).catch((()=>e.createSessionObject(wm)))})),P(this,"getMasterVisualizations",(async()=>{try{if(!this.sessionObject)return[];const e=await this.sessionObject.getLayout();return("qAppObjectList"in e?e.qAppObjectList.qItems:e).map((e=>({...e.qData,qExtendsId:e.qInfo.qId}))).filter((e=>!mp.includes(e.visualization)))}catch(e){return[]}})),this.getOrCreateSessionObject(e).catch((()=>{}))}}let km=function(e){return e[e.TOP=0]="TOP",e[e.BOTTOM=1]="BOTTOM",e[e.UP=2]="UP",e[e.DOWN=3]="DOWN",e}({});class Am{constructor({embed:e,model:t,app:r,translator:n,mutex:o}){P(this,"model",void 0),P(this,"embed",void 0),P(this,"app",void 0),P(this,"undoRedoModel",void 0),P(this,"chartList",void 0),P(this,"masterVizList",void 0),P(this,"mutex",void 0),P(this,"rememberAsGroup",(async e=>{let t;this.undoRedoModel&&(t=await this.undoRedoModel.startGroup());const r=await e();return t&&this.undoRedoModel&&await this.undoRedoModel.endGroup(t),r})),P(this,"generateProperties",(async(e,t)=>await this.embed.generateProperties({type:e,properties:t}))),P(this,"addVizAsChild",(async({type:e,initProps:t,objectInitProps:r,children:n})=>{try{const o=await this.generateProperties(e,t);let i=(null==r?void 0:r.label)||(null==t?void 0:t.title);if(!i){const r=this.getChart(null==t?void 0:t.visualization),n=null==r?void 0:r.libraryInfo;i=(null==n?void 0:n.translation)||(null==n?void 0:n.name)||e}const a={...r,label:i};return await this.addChild(o,n,a)}catch(e){return}})),P(this,"addMasterObjectAsChild",(async({initProps:e,objectInitProps:t,children:r})=>{try{if(!e||!e.qExtendsId||!this.app)return;const n=await this.app.getObject(e.qExtendsId),o=await n.getProperties(),i=(null==t?void 0:t.label)||o.title||o.qMetaDef.title,a={...e,qInfo:{qType:"childObject"}},l={...t,label:i};return await this.addChild(a,r,l)}catch(e){return}})),P(this,"deleteChildren",(async e=>{const{model:t}=this;if(0===e.length||!t)return!1;try{await this.mutex.lock();const r=await t.getFullPropertyTree(),{qChildren:n,qProperty:o}=r,i=new Set(e);return r.qChildren=n.filter((({qProperty:e})=>{const t=e.childRefId;return!t||!i.has(t)})),r.qProperty.objects=o.objects.filter((e=>!i.has(e.childRefId))),await t.setFullPropertyTree(r),!0}catch(e){return!1}finally{this.mutex.unlock()}})),P(this,"moveChild",(async(e,t)=>{if(this.model)try{await this.mutex.lock();const r=await this.model.getProperties(),{objects:n}=r,o=n.findIndex((e=>e.childRefId===t));let i=!1;switch(e){case km.TOP:{if(0===o)break;const e=n.splice(o,1)[0];n.unshift(e),i=!0;break}case km.BOTTOM:{if(o===n.length-1)break;const e=n.splice(o,1)[0];n.push(e),i=!0;break}case km.UP:{if(0===o)break;const e=n.splice(o,1)[0];n.splice(o-1,0,e),i=!0;break}case km.DOWN:{if(o===n.length-1)break;const e=n.splice(o,1)[0];n.splice(o+1,0,e),i=!0;break}}i&&await this.model.setProperties(r)}finally{this.mutex.unlock()}})),P(this,"getCharts",(()=>{var e;return(null===(e=this.chartList)||void 0===e?void 0:e.getCharts())||{}})),P(this,"getMasterVizList",(()=>{var e;return(null===(e=this.masterVizList)||void 0===e?void 0:e.getMasterVisualizations())||Promise.resolve([])})),P(this,"getChart",(e=>{var t;return null===(t=this.chartList)||void 0===t?void 0:t.getChart(e)})),P(this,"getChartLabelById",((e,t)=>{var r,n;const o=null==e||null===(r=e.qChildList)||void 0===r?void 0:r.qItems.find((e=>e.qInfo.qId===t));if(!o)return"";const{visualization:i,title:a}=o.qData;if(a)return a;const l=this.getChart(i);return(null==l||null===(n=l.libraryInfo)||void 0===n?void 0:n.translation)||i})),this.model=t,this.embed=e,this.app=r;const i=r;i&&i.getUndoInfoObject&&i.getUndoInfoObject().then((e=>{this.undoRedoModel=e})).catch((()=>{})),r&&(this.masterVizList=new Rm(r)),e&&n&&(this.chartList=new bp(e,n)),this.mutex=o}async addChild(e,t,r){if(this.model&&!mp.includes(e.visualization))try{await this.mutex.lock();const{model:n}=this,o=async()=>{e.childRefId=Cm.id();const o=await n.createChild(e);if(o){const t=await n.getProperties();t.objects.unshift({childRefId:e.childRefId,...r,condition:{qValueExpression:{qExpr:""}}}),await n.setProperties(t)}return t&&o&&await Promise.all(t.map((({qProperty:e})=>o.createChild(e)))),o};return await this.rememberAsGroup(o)}catch(e){return}finally{this.mutex.unlock()}}}class _m{constructor(e){P(this,"locked",!1),P(this,"tasks",[]),P(this,"id",void 0),P(this,"lock",(async()=>this.locked?new Promise((e=>{this.tasks.push(e)})):(this.locked=!0,!0))),P(this,"unlock",(()=>{if(this.tasks.length>0){const e=this.tasks.shift();null==e||e(!0)}else this.locked=!1})),this.id=e}}const Im={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},Tm={index:-1,color:"none",alpha:1},Lm=e=>{let t=parseFloat(e[1]),r=parseFloat(e[3]),n=parseFloat(e[5]);return t%=360,r/=100,n/=100,t=Math.max(0,Math.min(t,360)),r=Math.max(0,Math.min(r,1)),n=Math.max(0,Math.min(n,1)),{h:t,s:r,l:n,v:n}},Om=(e,t,r,n,o=1)=>{let i,a,l,s=[];switch(r=Math.floor(r)){case 0:s=[e,t,0];break;case 1:s=[t,e,0];break;case 2:s=[0,e,t];break;case 3:s=[0,t,e];break;case 4:s=[t,0,e];break;case 5:s=[e,0,t];break;default:s=[0,0,0]}return i=s[0]+n,a=s[1]+n,l=s[2]+n,i=Math.round(255*i),a=Math.round(255*a),l=Math.round(255*l),`rgba(${i},${a},${l},${o})`},Pm=e=>{const{h:t,s:r,l:n}=Lm(e),o=e.length>7?parseFloat(e[7]):1,i=n<=.5?2*n*r:(2-2*n)*r,a=t/60,l=i*(1-Math.abs(a%2-1));return Om(i,l,a,n-.5*i,o)},Mm={resolveExpression:({colorExpression:e=""})=>{let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${t[3]})`;if(t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return`rgba(${t[1]},${t[2]},${t[3]},${t[4]})`;if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e),t){const e=Math.round(Number(t[1])/255*100)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return Pm(t);if(t=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return Pm(t);if(t=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return(e=>{const{h:t,s:r,v:n}=Lm(e),o=n*r,i=t/60,a=o*(1-Math.abs(i%2-1));return Om(o,a,i,n-o)})(t);if(t=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e),t)return e;if(t=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e),t)return e;const r=e&&Im[e.toLowerCase()];if(r){const e=void 0!==r.a?r.a:1;return`rgba(${r.r},${r.g},${r.b},${e})`}return"none"},getColor({style:e,defaultColor:t,theme:r}){const n=(null==e?void 0:e.color)||Tm;let o;return o=null!=e&&e.useColorExpression?Mm.resolveExpression(e):"string"==typeof n?n:(null==r?void 0:r.getColorPickerColor(n))||"",o&&"none"!==o?o:t}};class jm{constructor({modifiedLayout:e,themeService:t}){var r;P(this,"modifiedLayout",void 0),P(this,"themeStyle",void 0),P(this,"style",void 0),P(this,"objectMap",void 0),P(this,"activeTabId",void 0),P(this,"theme",void 0),P(this,"getTabsWidth",(e=>{const t=this.resolveComponentStyle({compPath:"width.value",themePath:"tabWidth.value"});if(void 0===t||2!==t.length||e!==this.modifiedLayout.orientation)return{};const r=this.resolveComponentStyle({compPath:"width.unit",themePath:"tabWidth.unit",defaultValue:"%"});return{minWidth:`${t[0]}${r}`,maxWidth:`${t[1]}${r}`}})),P(this,"getTabWidth",(e=>{var t;const r=null==e?void 0:e.value,n=null!==(t=null==e?void 0:e.unit)&&void 0!==t?t:"%";if(void 0===r||2!==r.length||"left"===this.modifiedLayout.orientation)return{};return{minWidth:`${r[0]}${n}`,maxWidth:`${r[1]}${n}`}})),P(this,"getColorStyle",((e,t=e)=>{const r=this.resolveComponentStyle({compPath:e,themePath:t}),n=Mm.getColor({style:r,theme:this.theme});return null!=n?n:r})),P(this,"getTabBackgroundStyle",((e,t)=>{let r;if(this.activeTabId===e){const e=this.resolveComponentStyle({compPath:"background.selected",themePath:""});r=Mm.getColor({style:e,theme:this.theme})}return null!=r?r:Mm.getColor({style:t,theme:this.theme})})),P(this,"createTabClasses",(()=>{var e;return null===(e=this.modifiedLayout.objects)||void 0===e?void 0:e.reduce(((e,t)=>{var r;const n=null==t?void 0:t.childRefId,o=null==t||null===(r=t.components)||void 0===r?void 0:r.find((e=>"tab"===e.key));return e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}`]={textAlign:pf(o,"label.alignment"),backgroundColor:this.getTabBackgroundStyle(n,null==o?void 0:o.background),...this.getTabWidth(null==o?void 0:o.width)},e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}:hover`]={..."left"===this.modifiedLayout.orientation&&{backgroundColor:this.getColorStyle("background.hover","background.hover.color")}},e[`#tab-label-${this.modifiedLayout.qInfo.qId}-${n}`]={fontSize:pf(o,"label.fontSize"),fontFamily:pf(o,"label.fontFamily"),color:Mm.getColor({style:pf(o,"label.color"),theme:this.theme})},e[`#tab-icon-${this.modifiedLayout.qInfo.qId}-${n} svg`]={height:pf(o,"icon.size"),color:Mm.getColor({style:pf(o,"icon.color"),theme:this.theme})},e}),{})})),P(this,"createTabsClasses",(()=>({[vm.TABS_LABEL]:{fontSize:this.resolveComponentStyle({compPath:"label.fontSize",themePath:"label.value.fontSize"}),fontFamily:this.resolveComponentStyle({compPath:"label.fontFamily",themePath:"label.value.fontFamily"}),color:this.resolveComponentStyle({compPath:"label.color.color",themePath:"label.value.color"})},[vm.TABS_ICON]:{height:this.resolveComponentStyle({compPath:"icon.size",themePath:"icon.value.fontSize"}),color:this.getColorStyle("icon.color","icon.value.color")},[vm.TABS]:{textAlign:this.resolveComponentStyle({compPath:"label.alignment",themePath:"label.textAlignment"}),...this.getTabsWidth("top")},[vm.TABS_HOVER]:{..."top"===this.modifiedLayout.orientation&&{borderBottomColor:this.getColorStyle("indicator.hover","indicator.hover.color")}},[vm.TABS_WRAPPER]:{...this.getTabsWidth("left"),backgroundColor:this.getColorStyle("background.unselected","")},[vm.TAB_INDICATOR]:{backgroundColor:this.getColorStyle("indicator.selected","indicator.selected.color")}}))),P(this,"createStyleClasses",(()=>({...this.createTabsClasses(),...this.createTabClasses()}))),P(this,"resolveComponentStyle",(({key:e="tabs",compPath:t,themePath:r=t,defaultValue:n})=>{var o,i,a;const l=null===(o=this.modifiedLayout.components)||void 0===o?void 0:o.find((t=>t.key===e));return null!==(i=null!==(a=pf(l,t))&&void 0!==a?a:pf(this.themeStyle,r))&&void 0!==i?i:n})),this.modifiedLayout=e;const{cachedTabId:n,defaultTabId:o,objects:i}=this.modifiedLayout;this.activeTabId=n||o||(null===(r=i[0])||void 0===r?void 0:r.childRefId)||"",this.themeStyle=t.getStyles(),this.theme=t.getTheme(),this.objectMap=Bp(this.modifiedLayout),this.style=this.createStyleClasses()}getStyleClasses(){return this.style}getTabStyle(e){var t;return null===(t=this.objectMap[e].components)||void 0===t?void 0:t.find((e=>"tab"===e.key))}}const Nm=()=>{const t=a(),n=l(),o=s(),m=c(),b=d(),g=u(),v=e(),y=p(),x=h(),E=function(e){var t=e.theme,r=e.config,n=void 0===r?{}:r,o=n.id,i=n.resolve,a=void 0===i?[]:i,l=n.transform,s=void 0===l?[]:l,c=n.extend,d=void 0===c?[]:c,u={theme:t,matrix:If(a),styles:void 0};return u.styles=Lf({theme:t,id:o,transform:s,extend:d,matrix:u.matrix}),{getStyles:function(){return u.styles},getTheme:function(){return u.theme},setTheme:function(e){u.theme=e,u.styles=Lf({theme:e,id:o,transform:s,extend:d,matrix:u.matrix})}}}({theme:f(),config:{id:"tabbedContainer",resolve:[["object.tabbedContainer","indicator.selected","color"],["object.tabbedContainer","indicator.hover","color"],["object.tabbedContainer","background.hover","color"],["object.tabbedContainer","icon.value","color"],["object.tabbedContainer","icon.value","fontSize"]]}}),S=i((()=>new bp(m,g)),[m,g]),[C]=r((()=>new _m(b.id))),[w,R]=r(!1),k=i((()=>m&&b&&n?new Am({embed:m,model:b,app:n,translator:g,mutex:C}):void 0),[m,b,n,g,C]),A=i((()=>$p(o)),[o]),_=i((()=>new jm({modifiedLayout:A,themeService:E})),[A,E]);return i((()=>({app:n,modifiedLayout:A,embed:m,model:b,emitter:y,interactions:x,dataHandler:k,chartList:S,styleModel:_,mutex:C,options:v,accessibility:w,setAccessibility:R,translator:g,element:t})),[A,m,b,n,y,x,k,S,_,C,v,w,g,t])},$m=({dataHandler:e,modifiedLayout:t,translator:r,sharedContainerUtilities:n,Icon:o})=>{const[i,a]=R(void 0);if(!e||!t)return null;const l=!t.qExtendsId;return y.createElement(Sp,null,y.createElement(Ep,null,y.createElement(o,null),l?y.createElement(y.Fragment,null,y.createElement(Ap,{sx:{width:250,height:32,fontFamily:"inherit"},className:"init-button",variant:i?"contained":"outlined",onClick:e=>{a(e.currentTarget)},"aria-label":r.get("LayoutContainer.EmptyList.AddContent"),disableRipple:!0},r.get("LayoutContainer.EmptyList.AddContent")),y.createElement(Op,{translator:r,anchorEl:i,dataHandler:e,onClose:()=>{a(void 0)},sharedContainerUtilities:n})):y.createElement(oc,{variant:"inherit"},r.get("LayoutContainer.EmptyList.EmptyHint"))))};class zm{constructor(e){P(this,"_rendered",new Set),P(this,"_objectMap",new Map),P(this,"_objectApis",new Map),P(this,"_resolver",void 0),P(this,"_dependencyData",void 0),P(this,"_recreateMap",new Map),P(this,"createTimerForRendering",(()=>{if(!this.resolver){let e;const t=setTimeout((()=>{this.doResolve()}),9e4),r=new Promise((t=>{e=t}));this._resolver={promise:r,resolve:e,timer:t}}return this._resolver})),P(this,"doResolve",(()=>{var e,t,r;this.resolver&&(clearTimeout(null===(e=this.resolver)||void 0===e?void 0:e.timer),null===(t=(r=this.resolver).resolve)||void 0===t||t.call(r,!0),this._resolver=void 0)})),P(this,"tryToResolve",(()=>{const{visibleLayoutObjects:e}=this._dependencyData;if(this.resolver){(0===e.length||e.every((e=>this.rendered.has(e.id))))&&this.doResolve()}})),this._dependencyData=e}set dependencyData(e){this._dependencyData=e}get rendered(){return this._rendered}get objectMap(){return this._objectMap}get objectApis(){return this._objectApis}get resolver(){return this._resolver}get recreateMap(){return this._recreateMap}syncObjects(e){const t=new Set,r=new Set([...Array.from(this.objectMap.keys()),...Array.from(this.objectApis.keys()),...this.rendered]),n=new Set(r);let o=!1;return e.forEach((e=>{r.has(e.id)?(this.rendered.has(e.id)&&t.add(e.id),n.delete(e.id)):o=!0})),n.forEach((e=>{var t;const r=this.objectMap.get(e);var n;r&&(this.confirmPotentialSelections(r),null===(n=r.destroy)||void 0===n||n.call(r),this.objectMap.delete(e));null===(t=this.objectApis.get(e))||void 0===t||t.destroy(),this.objectApis.delete(e)})),this._rendered=t,this.tryToResolve(),o}destroy(){for(const e of this.objectApis.values())e.destroy();this._objectMap=new Map,this._objectApis=new Map}saveObject(e,t){this.objectMap.set(e,t)}saveObjectApi(e,t){this._objectApis.set(e,t)}onRendered(e){this.rendered.add(e),this.tryToResolve()}getChildrenObjects(){const{visibleLayoutObjects:e}=this._dependencyData,t=[];return e.forEach((e=>{const r=this.objectMap.get(e.id);r&&t.push(r)})),t}getChildLayout(e){const{modifiedLayout:t}=this._dependencyData;return t.qChildList.qItems.find((t=>t.qInfo.qId===e))}getObjectOptions(e){var t,r;const{viewState:n,modifiedLayout:o,options:i}=this._dependencyData,{chartAnimations:a,direction:l,progressiveRendering:s,freeResize:c,navigation:d}=i;return{isReadonly:!1,setController:t=>{this.saveObject(e,t)},onRendered:()=>{this.onRendered(e)},onInitialRender:()=>{this.onRendered(e)},isParentMaster:!(null==o||!o.qExtendsId),isSnapshot:!!o.snapshotData,...!(null==n||null===(t=n.viewStates)||void 0===t||!t[e])&&{viewState:null==n?void 0:n.viewStates[e]},...!(null==n||null===(r=n.layouts)||void 0===r||!r[e])&&{layout:n.layouts[e]},direction:l,chartAnimations:a,progressiveRendering:s,freeResize:c,navigation:d,disableThemeBorder:!1,fallbackToClient:i.fallbackToClient}}confirmPotentialSelections(e){e&&"selectionsApi"in e&&e.selectionsApi.active&&e.selectionsApi.confirm()}}const Bm=()=>y.createElement(_p,{viewBox:"0 0 16 16"},y.createElement("path",{d:"M15 6V5H5V2H1.5a.5.5 0 0 0-.5.5V6H0V2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v4h-1Zm-5-4H6v2h4V2Zm4.5 0H11v2h4V2.5a.5.5 0 0 0-.5-.5Zm1.5 9h-1V8h1v3Zm0 3a1 1 0 0 1-1 1h-1v-1h.6a.4.4 0 0 0 .4-.4V13h1v1Zm-7 1v-1h3v1H9Zm-5 0v-1h3v1H4Zm-3 0a1 1 0 0 1-1-1v-1h1v.6c0 .22.18.4.4.4H2v1H1ZM0 8h1v3H0V8Zm4-.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4ZM5 11h6V8H5v3Z"})),Dm=({libraryInfo:e,style:t,id:r})=>y.createElement("div",{style:t,"data-testid":"tab-chart-icon",id:r,className:gm.TABS_ICON},y.createElement(e.IconDefinition,null)),Fm=({style:e,id:t})=>y.createElement("div",{style:e,"data-testid":"tab-hidden-icon",id:t},y.createElement(Ip,{viewBox:"0 0 16 16"},y.createElement("path",{d:"m13.441.795.764.646-1.839 2.174c.568.434 1.076.914 1.522 1.385a13.79 13.79 0 0 1 2.109 3 13.798 13.798 0 0 1-2.108 3c-1.382 1.457-3.345 3-5.89 3-1.34 0-2.52-.428-3.536-1.045l-1.904 2.25-.764-.646L13.441.795ZM11.72 4.379l-1.427 1.686a3 3 0 0 1-3.82 4.516l-1.354 1.6c.86.497 1.819.819 2.88.819 2.121 0 3.834-1.287 5.161-2.685A12.666 12.666 0 0 0 14.857 8a12.691 12.691 0 0 0-1.697-2.315c-.35-.37-.727-.73-1.132-1.063l-.308-.243ZM8 2a6.428 6.428 0 0 1 2.242.412l.305.123-.681.805A5.359 5.359 0 0 0 8 3C5.877 3 4.164 4.287 2.837 5.685A12.664 12.664 0 0 0 1.14 8a12.66 12.66 0 0 0 1.697 2.315l.301.308.311.299-.646.765A14.567 14.567 0 0 1 2.109 11 13.791 13.791 0 0 1 0 8a13.801 13.801 0 0 1 2.109-3C3.49 3.543 5.454 2 8 2Zm1.633 4.845-2.5 2.956a1.999 1.999 0 0 0 2.5-2.956Zm-3.917-.793a3 3 0 0 1 2.692-1.025l.202.035-.809.948A2 2 0 0 0 6 7.967l.003.152-.808.947a3 3 0 0 1 .521-3.014Z"}))),Gm=()=>y.createElement(Ip,{viewBox:"0 0 16 16"},y.createElement("path",{d:"M12 4H6V3h6v1ZM6 8.5h4v-1H6v1Zm9 4.5H6v-1h9v1ZM3 11a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1Zm0-5.5a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1ZM3 2a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h1Zm0 1H2v1h1V3Z"})),Hm=Ul(Bu)({width:28,overflow:"hidden"}),Wm=Ul(Bu)({height:28,width:"100%",overflow:"hidden",alignItems:"center","&::before":{visibility:"hidden"}}),Ym=({chartObject:e,embed:t,renderHelper:r,direction:n,interactions:o,env:i})=>{const a=A(null),{id:l}=e;k((()=>{if(l&&a.current){const e=r.getObjectOptions(l)||{};e.disableThemeBorder=!0,t.render({id:l,element:a.current,options:e}).then((e=>{r.saveObjectApi(l,e)})).catch((e=>{var t;const n=null===(t=r.getChildLayout(l))||void 0===t||null===(t=t.qInfo)||void 0===t?void 0:t.qType;console.error("Could not render chart with id",l,n,e)}))}}),[l,t,r,n]);const s=_((()=>()=>{if(null!=e&&e.id&&i.anything){const t=null==e?void 0:e.label,{sense:n}=i.anything,o="current",a=r.objectMap.get(e.id);a&&n.propertyPanel.show({model:a.model,parent:o,headerLabel:t,keepCurrentActiveCell:!0})}}),[i,e,r]);return k((()=>{const e=null==a?void 0:a.current;return e&&null!=o&&o.edit&&e.addEventListener("dblclick",s),()=>{null==e||e.removeEventListener("dblclick",s)}}),[a,s,o]),y.createElement("div",{ref:a,style:{position:"relative",height:"100%",width:"100%"},"data-testid":`tab-panel-${e.childRefId}`})};var Um;!function(e){e.TABS_HEIGHT="36px"}(Um||(Um={}));const Vm=(e,t)=>e.find((e=>e.childRefId===t)),qm=(e,t)=>!t.edit&&0===e.condition,Km=({charts:e,handleChangeTab:t,activeTabId:r,element:n,translator:o,accessibility:i,disabled:a})=>{const[l,s]=y.useState(null),c=Boolean(l),d=()=>{s(null)},u=I((e=>{null==e||e.focus()}),[]);return y.createElement(y.Fragment,null,y.createElement(Fc,{onClick:e=>{s(e.currentTarget)},disabled:a,"aria-haspopup":"menu","data-testid":"chartTabMenuDropdownButton",tabIndex:i?0:-1,"aria-label":o.get("Container.Label.Visualizations"),className:gm.TAB_MENU,sx:{m:"2px"}},y.createElement(Gm,null)),y.createElement(yu,{anchorEl:l,open:c,onClose:d,elevation:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},MenuListProps:{sx:{py:0}},slotProps:{paper:{sx:{maxHeight:"500px",maxWidth:"500px"}}}},e.map((e=>y.createElement(wu,{className:gm.TAB_MENU_ITEM,ref:r===e.childRefId&&c?u:null,key:`chartTabMenu-${e.childRefId}`,onClick:()=>{(e=>{t(e.childRefId),d(),window.setTimeout((()=>{var e;null===(e=n.getElementsByClassName(gm.ACTIVE_TAB_PANEL))||void 0===e||null===(e=e[0])||void 0===e||e.focus()}),0)})(e)},sx:{...r===e.childRefId?{backgroundColor:"rgba(0, 0, 0, 0.1)"}:{}},"aria-label":e.label,title:e.label},y.createElement(oc,{variant:"inherit",noWrap:!0},e.label))))))},Xm=({label:e,id:t})=>y.createElement(Lc,{className:gm.TAB_LABEL,id:`tab-label-${t}`,sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",overflow:"hidden",flexWrap:"wrap"}},y.createElement("span",{style:{width:"100%",overflowWrap:"break-word",hyphens:"auto",fontWeight:"bold",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",lineHeight:"normal",overflow:"hidden"}},e)),Zm=({libraryInfo:e,chart:t,iconPosition:r,id:n})=>{let o;switch(r){case"bottom":o={marginTop:"6px"};break;case"top":o={marginBottom:"6px"};break;case"end":o={marginInlineStart:"8px"};break;default:o={marginInlineEnd:"8px"}}o.display="flex",o.alignItems="center",o.height="100%",o.flex="1 0 0";return 0===t.condition?y.createElement(Fm,{id:`${gm.TABS_ICON}-${n}`,style:o}):e?y.createElement(Dm,{id:`${gm.TABS_ICON}-${n}`,libraryInfo:e,style:o}):null},Jm=({models:e,activeTabId:t,handleChangeTab:r})=>{const{modifiedLayout:n,chartList:o,interactions:i,accessibility:a}=e,l=null==o?void 0:o.getCharts(),s=n.objects.filter((e=>!qm(e,i))),{orientation:c,tabContainerStyle:d,ScrollButtonComponent:u}=(({orientation:e})=>"left"===e?{orientation:"vertical",tabContainerStyle:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"25%",flexShrink:0},ScrollButtonComponent:Wm}:{orientation:"horizontal",tabContainerStyle:{display:"flex",flexDirection:"row",alignItems:"center"},ScrollButtonComponent:Hm})(n),p=!1===i.active&&!i.edit,[h,f]=R(!1),m=I((e=>{if(e){const t=e.getElementsByClassName("MuiTabs-flexContainer")[0];if(t)return void f("vertical"===c?t.scrollHeight>t.offsetHeight:t.scrollWidth>t.offsetWidth)}f(!1)}),[c]);return y.createElement(Lc,{className:gm.TAB_WRAPPER,sx:d,ref:e=>{m(e)}},n.useDropdown&&h&&y.createElement(Km,{charts:s,handleChangeTab:r,activeTabId:t,accessibility:a,translator:e.translator,element:e.element,disabled:p}),y.createElement(Ju,{value:t,onChange:(e,t)=>{r(t)},ScrollButtonComponent:u,variant:"scrollable",orientation:c,scrollButtons:!!n.useScrollButton&&"auto",TabScrollButtonProps:{...p&&{disabled:!0}},sx:{height:"100%",width:"100%",minHeight:Um.TABS_HEIGHT}},s.map((r=>{var o,i,s,d,u;const h=null===(o=Np(n,r.childRefId))||void 0===o||null===(o=o.qData)||void 0===o?void 0:o.visualization,f=h&&(null==l||null===(i=l[h])||void 0===i?void 0:i.libraryInfo),m=e.styleModel.getTabStyle(r.childRefId),b=0===r.condition||n.showIcons&&f&&!1!==(null==m||null===(s=m.icon)||void 0===s?void 0:s.show),g="vertical"===c?"top":"start",v=e.styleModel.resolveComponentStyle({compPath:"icon.position",defaultValue:g}),x=e.styleModel.resolveComponentStyle({compPath:"label.show"}),E=r.label&&(null!==(d=null==m||null===(u=m.label)||void 0===u?void 0:u.show)&&void 0!==d?d:!1!==x),S=`${n.qInfo.qId}-${r.childRefId}`;return y.createElement(Iu,{className:`${gm.TAB} ${t===r.childRefId?gm.ACTIVE_TAB:""}`,disabled:p,id:`tab-${S}`,value:r.childRefId,title:r.label,label:E?y.createElement(Xm,{label:r.label,id:S}):void 0,icon:b?y.createElement(Zm,{libraryInfo:f,chart:r,iconPosition:v,id:S}):"",iconPosition:v,key:r.childRefId,"data-testid":`container-tab-${r.childRefId}`,sx:{textAlign:"vertical"!==c||n.showIcons?"center":"start",minWidth:"vertical"===c?"100%":void 0,minHeight:Um.TABS_HEIGHT,padding:"6px 16px","&:hover":{paddingBottom:"4px"},"&.Mui-disabled":{opacity:"inherit"}},"aria-label":r.label,"aria-controls":`tab-panel-${S}`,tabIndex:a&&t===r.childRefId?0:-1})}))))},Qm=({models:e,renderHelper:t,activeTabId:r,handleChangeTab:n,env:o})=>{const{modifiedLayout:i,embed:a,interactions:l,options:s,styleModel:c,accessibility:d}=e,u=i.objects,p=l.edit||!!u.find((e=>0!==e.condition)),h=i.showTabs&&p,f="left"===i.orientation?"row":"column",m=c.getStyleClasses();return y.createElement(Lc,{sx:{display:"flex",flexDirection:f,height:"100%",width:"100%",direction:s.direction,...m}},h&&y.createElement(Jm,{models:e,activeTabId:r,handleChangeTab:n}),u.map((e=>{const n=`tab-panel-${i.qInfo.qId}-${e.childRefId}`,c=r===e.childRefId&&!qm(e,l);return y.createElement(Lc,{role:"tabpanel",id:n,key:n,"aria-label":e.label,sx:{height:"100%",width:"100%",padding:"2px",boxSizing:"border-box",direction:"ltr",flex:"1 0 0","&:focus-visible":{boxShadow:"inset 0 0 0 2px #0275D9",borderRadius:"3px",zIndex:1200}},...c?{className:gm.ACTIVE_TAB_PANEL,tabIndex:d?0:-1}:{hidden:!0}},c&&y.createElement(Ym,{chartObject:e,renderHelper:t,direction:s.direction,embed:a,interactions:l,env:o}))})))};let eb=function(e){return e.COPY="copy",e.PASTE="paste",e.RESET_COPY_BUFFER="resetCopyBuffer",e}({}),tb=function(e){return e.COPY="copy",e.PASTE="paste-and-replace",e.DUPLICATE="duplicate",e.DELETE="delete",e.CUT="cut",e.EDIT_PROPERTIES="edit",e.ZOOM_IN="zoom-in",e.VISUAL_EXPLORATION="visual-exploration",e.MONITOR_IN_HUB="addto",e.TAKE_SNAP_SHOT="take-snapshot",e.SNAP_SHOT_GROUP="snapshotGroup",e.REORDER_LAYERS_GROUP="reorder-layers-group",e.BRING_TO_FRONT="bring-to-front",e.BRING_FORWARD="bring-forward",e.SEND_TO_BACK="send-to-back",e.SEND_BACKWARDS="send-backwards",e.CONTAINER_HEADER="container-header",e.CHART_HEADER="chart-header",e.ALERT_GROUP="alertGroup",e.ADD_TO_MASTER_ITEMS="add-to-master-items",e.UNLINK_VISUALIZATION="unlink",e.DEVELOPER="object-developer",e.SHOW_DETAILS="object-info",e.EXPLAIN_KEY_DRIVERS_OLD_ID="explainKeyDrivers",e.EXPLAIN_KEY_DRIVERS="key-driver",e.SUBSCRIBE="subscribe",e.NOTES_GROUP="notesGroup",e.DOWNLOAD="download",e.SHARE_IMAGE="share",e}({});const rb=[tb.PASTE,tb.ZOOM_IN,tb.VISUAL_EXPLORATION],nb=[tb.VISUAL_EXPLORATION,tb.ALERT_GROUP,tb.SHOW_DETAILS,tb.EXPLAIN_KEY_DRIVERS,tb.EXPLAIN_KEY_DRIVERS_OLD_ID],ob=[tb.DELETE,tb.CUT,tb.ADD_TO_MASTER_ITEMS,tb.UNLINK_VISUALIZATION],ib=[tb.PASTE],ab=(e,t)=>{const{childRefId:r}=e.model.layout,n=t.objects.find((e=>e.childRefId===r));return{...e,additionalData:{label:null==n?void 0:n.label}}},lb=(e,t,r,n,o)=>{const i=t.getSupportFunction(tb.COPY);if(!i)return void e.deleteItem(tb.COPY);const a=()=>{i(ab(r,n)).catch((()=>{}))},l=e.items.find((e=>e.id===tb.COPY));if(l)l.updateItem({select:a});else if(o){const t=e.items.findIndex((e=>e.id===tb.CUT)),r=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.copy",tid:tb.COPY,id:tb.COPY,icon:"copy",select:a,items:[]},r)}},sb=e=>e.interactions.edit&&!e.modifiedLayout.qExtendsId,cb=async(e,t,r,n)=>{const o=t.getBuilder("default");if(!o)return;const i=await o();i.addItem({translation:"contextMenu.containerOptionsHeader",tid:tb.CONTAINER_HEADER,id:tb.CONTAINER_HEADER,bold:!0,items:[]},0);const a=sb(r);i.items.forEach((e=>{(nb.includes(e.id)||!a&&ib.includes(e.id))&&i.deleteItem(e.id)})),a&&await(async(e,t,r)=>{var n;const o=t.getSupportFunction(eb.PASTE),i=await(null==o||null===(n=o())||void 0===n?void 0:n.catch((()=>{})));if(!i||mp.includes(i.template))return void e.deleteItem(tb.PASTE);const a=()=>{r()},l=e.items.find((e=>e.id===tb.PASTE));if(l)l.updateItem({translation:"contextMenu.paste",select:a});else{const t=e.items.findLastIndex((e=>e.id===tb.COPY||e.id===tb.DEVELOPER||e.id===tb.CONTAINER_HEADER)),r=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.paste",tid:tb.PASTE,id:tb.PASTE,icon:"paste",select:a,items:[]},r)}})(i,t,n),e.updateItem({items:i.items}),1===e.items.length&&e.deleteItem(tb.CONTAINER_HEADER)},db=e=>{const t={[tb.MONITOR_IN_HUB]:!0,[tb.SUBSCRIBE]:!0,[tb.NOTES_GROUP]:!0,[tb.DOWNLOAD]:!0,[tb.SHARE_IMAGE]:!0};e.items.forEach((r=>{t[r.id]?e.deleteItem(r.id):r.items&&db(r)}))},ub=(e,t,r,n,o,i)=>a=>{const{dataHandler:l,modifiedLayout:s}=n;if(sb(n)){r.isInvalid||(((e,t,r,n)=>{const{model:o,modifiedLayout:i}=r,a=e.items.findLastIndex((e=>e.id===tb.CHART_HEADER||e.id===tb.REORDER_LAYERS_GROUP)),l=a>=0?1+a:void 0;e.addItem({translation:"Object.Container.Props.EditProperties",tid:tb.EDIT_PROPERTIES,id:tb.EDIT_PROPERTIES,icon:tb.EDIT_PROPERTIES,items:[],select:()=>{const{childRefId:e}=t.model.layout,r=i.objects.find((t=>t.childRefId===e)),a=null==r?void 0:r.label,{sense:l}=n.anything,s=o;l.propertyPanel.show({model:t.model,parent:s,headerLabel:a})}},l)})(a,r,n,o),((e,t,r,n,o,i)=>{const a=n.getSupportFunction(tb.COPY);if(!a)return void e.deleteItem(tb.CUT);const l=()=>{o&&a(ab(r,i)).then((async()=>{await(null==o?void 0:o.deleteChildren([t]))})).catch((()=>{}))},s=e.items.find((e=>e.id===tb.CUT));if(s)s.updateItem({select:l});else{const t=e.items.findLastIndex((e=>e.id===tb.ADD_TO_MASTER_ITEMS||e.id===tb.UNLINK_VISUALIZATION||e.id===tb.EDIT_PROPERTIES||e.id===tb.REORDER_LAYERS_GROUP||e.id===tb.DEVELOPER)),r=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.cut",tid:tb.CUT,id:tb.CUT,icon:"cut",select:l,items:[]},r)}})(a,t,r,e,l,s),lb(a,e,r,s,!0),((e,t,r,n,o)=>{const i=t.getSupportFunction(eb.COPY),a=t.getSupportFunction(eb.PASTE);if(!i||!a)return void e.deleteItem(tb.DUPLICATE);const l=()=>{i(ab(r,n)).then((()=>{o()})).catch((()=>{}))},s=e.items.find((e=>e.id===tb.DUPLICATE));if(s)s.updateItem({select:l});else{const t=e.items.findIndex((e=>e.id===tb.COPY)),r=t>=0?1+t:void 0;e.addItem({translation:"Common.Duplicate",tid:tb.DUPLICATE,id:tb.DUPLICATE,icon:tb.DUPLICATE,items:[],select:l},r)}})(a,e,r,s,i)),((e,t,r)=>{const n=()=>{r&&r.deleteChildren([t]).catch((()=>{}))},o=e.items.find((e=>e.id===tb.DELETE));if(o)o.updateItem({select:n});else{const t=e.items.findLastIndex((e=>e.id===tb.DUPLICATE||e.id===tb.ADD_TO_MASTER_ITEMS||e.id===tb.UNLINK_VISUALIZATION||e.id===tb.REORDER_LAYERS_GROUP||e.id===tb.DEVELOPER)),r=t>=0?1+t:void 0;e.addItem({translation:"Common.Delete",tid:tb.DELETE,id:tb.DELETE,icon:"bin",items:[],select:n},r)}})(a,t,l)}else lb(a,e,r,s,!1)},pb=(e,t,r,n)=>{b((async(o,i,a)=>{var l;if(!a)return!1;const s=((e,t)=>()=>{if(!e)return;const r=t.getSupportFunction(eb.PASTE);r&&r().then((async({template:t,init:r,children:n,additionalData:o})=>{const{label:i}=o,a={label:i};r.qExtendsId?await e.addMasterObjectAsChild({initProps:r,children:n,objectInitProps:a}):await e.addVizAsChild({type:t,initProps:r,children:n,objectInitProps:a})})).catch((e=>{e&&t.getSupportFunction(eb.RESET_COPY_BUFFER)}))})(r.dataHandler,a);if(await cb(o,a,r,s),db(o),!(e=>{var t;let r;r="qv-radial-contextmenu"===e.type?null===(t=e.touches[0])||void 0===t?void 0:t.target:e.target;return r&&((e,t)=>{let r=e;for(;r;){var n;if(null!==(n=r.classList)&&void 0!==n&&n.contains(t))return r;r=r.parentNode}return null})(r,gm.ACTIVE_TAB_PANEL)})(i))return!0;const c=null===(l=r.modifiedLayout.objects.find((t=>t.childRefId===e)))||void 0===l?void 0:l.id;if(!c)return!0;const d=t.objectMap.get(c);if(!d)return!0;const u=ub(a,e,d,r,n,s),p=await(async(e,t,r,n)=>{const o=sb(r),i=e.getBuilder("object");if(!i)return;const a=await i(t);return a.addItem({translation:"contextMenu.chartOptionsHeader",tid:tb.CHART_HEADER,id:tb.CHART_HEADER,bold:!0,items:[]},0),n(a),a.items.forEach((e=>{(rb.includes(e.id)||!o&&ob.includes(e.id))&&a.deleteItem(e.id)})),1===a.items.length&&a.deleteItem(tb.CHART_HEADER),a})(a,d,r,u);return!p||(o.items.length>0&&p.addItem({translation:"contextMenu.subMenuContainerOptions",tid:"tabbed-container-menu",id:"tabbed-container-menu",icon:"tabbed-container",items:[...o.items]},p.items.length),o.updateItem({items:p.items}),!0)}))},hb=({element:n,models:o,env:a})=>{var l;const s=((e,n)=>{const[o,i]=r(void 0);return t((()=>{if(0===e.getElementsByClassName(n).length){const t=document.createElement("div");t.className=n,e.appendChild(t);const r=gp(t);i(r)}return()=>{null==o||o.unmount()}}),[e,n,o]),o})(n,"init-component"),{options:c,modifiedLayout:d,interactions:u,model:p}=o,{cachedTabId:h,defaultTabId:f,objects:b,qChildList:g}=d,v=hp(c.direction),x=(t=>{const{viewState:r}=e(),{snapshotData:n}=t;if(n){var o;const{layouts:e}=n.objectsData;return{layouts:e,viewStates:null===(o=n.viewState)||void 0===o?void 0:o.viewStates}}if(r){const{viewStates:e}=r;return{viewStates:e}}})(d),E=h||f||(null===(l=b[0])||void 0===l?void 0:l.childRefId)||"",S={modifiedLayout:d,activeTabId:E,env:a},[C,w]=Sm(S);w(S);const R=i((()=>d.objects.filter((e=>E===e.childRefId))),[E,d.objects]),{renderHelper:k}=(e=>{const{visibleLayoutObjects:n,options:o}=e,[i]=r((()=>new zm(e))),[,a]=r(o);return i.dependencyData=e,m((async()=>{var e,t;return a((e=>(e!==o&&n.forEach((e=>i.recreateMap.set(e.id,!0))),o))),i.syncObjects(n)?null===(t=i.createTimerForRendering())||void 0===t?void 0:t.promise:null===(e=i.resolver)||void 0===e?void 0:e.promise}),[n,o]),t((()=>()=>{i.destroy()}),[i]),{renderHelper:i}})({modifiedLayout:d,visibleLayoutObjects:R,viewState:x,options:c});pb(E,k,o,a);const[A]=r({current:void 0}),_=i((()=>e=>{(async({model:e,patchList:t})=>{if(null!=e&&e.applyPatches){const r=await e.getEffectiveProperties(),n=[];t.forEach((e=>{const{newValue:t,propertyName:o}=e,i=void 0!==r[o]?"Replace":"Add";t?n.push({qPath:`/${o}`,qOp:i,qValue:t&&JSON.stringify(t)}):"Replace"===i&&n.push({qPath:`/${o}`,qOp:"Remove"})})),n.length>0&&await e.applyPatches(n,!0)}})({model:p,patchList:[{newValue:e,propertyName:"cachedTabId"}]})}),[p]),I=i((()=>({setSelected:e=>{var t;const r=null===(t=C.modifiedLayout.objects.find((t=>t.id===e[0])))||void 0===t?void 0:t.childRefId;r?_(r):A.current=e[0]}})),[_,C,A]);t((()=>{const e=(({chartObjects:e,activeTabId:t})=>{var r;return!Vm(e,t)&&e.length>0?null===(r=e[0])||void 0===r?void 0:r.childRefId:t})({chartObjects:C.modifiedLayout.objects,activeTabId:C.activeTabId});if(e!==C.activeTabId)_(e);else if(A.current){var t;const e=null===(t=C.modifiedLayout.objects.find((e=>e.id===A.current)))||void 0===t?void 0:t.childRefId;e&&_(e)}A.current=void 0}),[null==d?void 0:d.objects.length,C,A,_]),t((()=>{const e=(({chartObjects:e,activeTabId:t,interactions:r})=>{const n=Vm(e,t);if(!n||qm(n,r)){const r=e.find((e=>0!==e.condition));return(null==r?void 0:r.childRefId)||t}return t})({chartObjects:C.modifiedLayout.objects,activeTabId:C.activeTabId,interactions:u});e!==C.activeTabId&&_(e)}),[u,null==d?void 0:d.objects,C,_]);const T=0===g.qItems.length&&u.edit;return t((()=>{null==s||s.render(y.createElement(ql,{theme:v},T?y.createElement($m,{Icon:Bm,dataHandler:o.dataHandler,modifiedLayout:o.modifiedLayout,translator:o.translator,sharedContainerUtilities:I}):null,!T&&y.createElement(Qm,{models:o,renderHelper:k,activeTabId:E,handleChangeTab:_,env:a})))}),[s,o,v,T,k,E,I,_,a]),{renderHelper:k,sharedContainerUtilities:I,activeTabId:E}};var fb={targets:[]};const mb={showTitles:!0,title:"",subtitle:"",footnote:"",disableNavMenu:!0,showDetails:!1,objects:[],qChildListDef:{qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition"}},showTabs:!0,useScrollButton:!0,useDropdown:!1,showIcons:!1,components:[],defaultTabId:"",orientation:"top",fontsUsed:[]};!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".init-component {\n height: 100%;\n overflow: hidden;\n}\n");const bb=(e,t)=>{let r=!0;const n=t.objects.reduce(((t,n)=>{const o=n.id;if(0!==n.condition){const i=e.get(o);return i&&(e=>e.supportExport())(i)&&(r=!1,t.objectMap.set(o,i)),t.objects.push(n),t}return t}),{objects:[],objectMap:new Map});return r?{objects:[],objectMap:new Map}:n};function gb(n){const o=new fp({translator:n.translator});return{qae:{properties:mb,data:fb},ext:dm({env:n,propertyHandlerData:o}),component(){const a=Nm(),l=u();i((()=>{!function(e){if(e&&e.get&&e.add){const t="LayoutContainer.EmptyList.AddContent";if(e.get(t)!==t)return;Object.keys(O).forEach((t=>{e.add(O[t])}))}}(l)}),[l]);const{dataHandler:s,model:c,accessibility:d,setAccessibility:p,interactions:h,element:f,modifiedLayout:m}=a,{renderHelper:b,sharedContainerUtilities:v,activeTabId:y}=hb({element:f,models:a,env:n});(({propertyHandlerData:r,element:n,sharedContainerUtilities:o,translator:i,containerId:a,dataHandler:l,renderHelper:s})=>{const c=e();a&&r.sync({containerId:a,element:n,sharedContainerUtilities:o,translator:i,dataHandler:l,renderHelper:s}),t((()=>{r.setMuiTheme(c.direction)}),[c.direction,r]),t((()=>()=>{a&&r.destroy(a)}),[a,r,c.direction])})({containerId:(null==c?void 0:c.id)||"",element:f,sharedContainerUtilities:v,translator:l,dataHandler:s,propertyHandlerData:o,renderHelper:b});const[x,E]=r(!0);(({isContainerActive:e,activeTabId:r,modifiedLayout:n,renderHelper:o})=>{const a={modifiedLayout:n,activeTabId:r,renderHelper:o,isContainerActive:e},[l,s]=Sm(a);s(a);const c=i((()=>()=>{const e=zp(l.modifiedLayout);for(const[t,r]of l.renderHelper.objectMap.entries()){const n=l.isContainerActive&&l.activeTabId===e[t];"setIsActive"in r&&r.setIsActive(n)}}),[l]);t((()=>{l.isContainerActive&&c()}),[o.objectMap,c,l]),t((()=>{c()}),[e,c])})({isContainerActive:x,activeTabId:y,renderHelper:b,modifiedLayout:m}),Em({element:f,accessibility:d,setAccessibility:p,renderHelper:b,interactions:h,env:n,models:a});const{getViewState:S}=fm(b,bb);g((()=>({getViewState:S,getChildrenObjects:()=>(e=>e.map((e=>{if(e.canReceive){const t=e=>"libraryitem"===e.type&&("field"===e.item.type||"measure"===e.item.type||"dimension"===e.item.type);return{...e,canReceive:r=>t(r)&&e.canReceive(r)}}return e})))(b.getChildrenObjects()),updateActiveState(e){E(e)}})),[])}}}export{gb as default};
|
|
89
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var r,n,o,i,a,l,s,c,d,u,p=e.length,h=e.search(/[0-9\-\+#]/),f=h>0?e.substring(0,h):"",m=e.split("").reverse().join(""),b=m.search(/[0-9\-\+#]/),g=p-b,v=e.substring(g,g+1),y=g+("."===v||","===v?1:0),x=b>0?e.substring(y,p):"";if(r=(t="-"===(e=e.substring(h,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(n=e.match(/[^\d\-\+#]/g))&&n[n.length-1]||".",i=n&&n[1]&&n[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",l=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=l)&&(t=(+t).toFixed(l+1)),d=e[0].split(i),e[0]=d.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0==+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],s=d[1]&&d[d.length-1].length){for(m="",g=(u=t[0]).length%s,p=u.length,y=0;y<p;y++)m+=u.charAt(y),!((y-g+1)%s)&&y<p-s&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(n=t.join(""))&&""!==n||(r=!1),f+(r?"-":"")+n+x}},hf({exports:{}});var Cf="'Source Sans Pro', 'Arial', 'sans-serif'",wf="#333333",Rf="#595959",kf="#737373",Af="#cccccc",_f="#e6e6e6";function If(e){var t={};return[].concat(Yp(e),Yp([["","","color"],["object","","fontFamily"],["object","axis.label.name","color",Rf],["object","axis.label.name","fontFamily",Cf],["object","axis.label.name","fontSize","12px"],["object","axis.line.major","color",Af],["object","axis.line.minor","color",_f],["object","axis.title","color"],["object","axis.title","fontFamily",Cf],["object","axis.title","fontSize","13px"],["object","grid.line.highContrast","color",_f],["object","grid.line.major","color",Af],["object","grid.line.minor","color",_f],["object","label.value","color",Rf],["object","label.value","fontFamily",Cf],["object","label.value","fontSize","12px"],[!1,"label.value","darkColor",Rf],[!1,"label.value","lightColor",_f],["object","outOfRange","color","#999"],["object","legend.title","color",wf],["object","legend.title","fontFamily",Cf],["object","legend.title","fontSize","15px"],["object","legend.label","color",Rf],["object","legend.label","fontFamily",Cf],["object","legend.label","fontSize","13px"],["object","referenceLine.label.name","color",wf],["object","referenceLine.label.name","fontFamily",Cf],["object","referenceLine.label.name","fontSize","12px"],["object","referenceLine.outOfBounds","color",_f],["object","referenceLine.outOfBounds","fontFamily",Cf],["object","referenceLine.outOfBounds","fontSize","12px"],["object","referenceLine.outOfBounds","backgroundColor",kf,function(e){return"transparent"===e?kf:e}]])).reduce((function(e,r){var n="".concat(r[0],"-").concat(r[1],"-").concat(r[2],"}");return t[n]||(t[n]=!0,e.push(r)),e}),[]).sort((function(e,t){return(e[0].split?e[0].split(".").length:0)-(t[0].split?t[0].split(".").length:0)}))}var Tf=function(e){return e};function Lf(e){var t=e.theme,r=e.id,n=e.transform,o=e.extend,i=e.matrix,a={},l=n.reduce((function(e,t){var r=Wp(t,2),n=r[0],o=r[1];return e[n]=o,e}),{});return i.forEach((function(e){var n=Wp(e,5),o=n[0],i=n[1],s=n[2],c=n[3],d=n[4],u=void 0===d?function(e){return e}:d,p=function(e){var t=e.theme,r=e.base,n=e.path,o=e.attribute,i=e.defaultValue,a=void 0===i?void 0:i;if(!t||!1===r)return a;var l=t.getStyle(r,n,o);return void 0===l?a:l}({theme:t,base:"object"===o&&r?"".concat("object",".").concat(r):o,path:i,attribute:s,defaultValue:c}),h=(l["".concat(i,".").concat(s)]||Tf)(u(p));mf(a,[i,s].filter(Boolean).join("."),h)})),o.forEach((function(e){var t=Wp(e,2),r=t[0],n=t[1];mf(a,r,n)})),a}const Of={qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",containerChildId:"/containerChildId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition"}};function Pf(e){if(!e.objects)return{};const t=Bp(e);return{container_id:e.qInfo.qId,objects:e.qChildList.qItems.map((r=>{var n;return{chart_type:r.qData.visualization,chart_id:r.qInfo.qId,chart_isMaster:!!r.qData.qExtendsId,tab_isVisible:0!==(null===(n=t[r.qData.childRefId])||void 0===n?void 0:n.condition),tab_isActive:r.qData.childRefId===e.cachedTabId}}))}}const Mf=({ref:e,theme:t,change:r})=>({component:"inline-wrapper",items:{bgColorDropdown:{ref:`${e}.useColorExpression`,width:9,component:"dropdown",change(t){(pf(t,`${e}.color`)||pf(t,`${e}.colorExpression`))&&(mf(t,`${e}.color`,void 0),mf(t,`${e}.colorExpression`,void 0)),null==r||r(t)},options:[{value:!1,translation:"properties.colorMode.primary"},{value:!0,translation:"properties.colorMode.byExpression"}],defaultValue:!1,placeholder:"properties.colorMode.primary"},bgColorPicker:{component:"color-picker",ref:`${e}.color`,width:3,show:t=>!pf(t,`${e}.useColorExpression`),disableNone:!1,defaultValue:()=>{var r;return{color:null!==(r=null==t?void 0:t.getStyle("object.tabbedContainer",e,"color"))&&void 0!==r?r:"none"}},showAlpha:!0,change:e=>{null==r||r(e)}},bgColorExpression:{component:"input-field-expression",ref:`${e}.colorExpression`,show:t=>pf(t,`${e}.useColorExpression`)}}}),jf=({theme:e})=>({bgColorAllWrapper:Mf({ref:"background.unselected"}),selectedTab:{translation:"properties.chartType.selected",component:"text"},bgColorSelectedWrapper:Mf({ref:"background.selected"}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:Mf({ref:"background.hover",theme:e,change:e=>{mf(e,"indicator.hover.color",pf(e,"background.hover.color")),mf(e,"indicator.hover.useColorExpression",pf(e,"background.hover.useColorExpression"))}})},show:(e,t)=>"left"===t.layout.orientation}}),Nf=({paths:e,fontResolver:t,theme:r})=>{const n=`${e.theme}.fontSize`;return{fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.size`,options:()=>t.getOptions(n),defaultValue:()=>t.getDefaultValue(n),show:e=>{var t;return!1!==(null===(t=e.icon)||void 0===t?void 0:t.show)}},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:r.getStyle("object.tabbedContainer",e.theme,"color")}),show:e=>{var t;return!1!==(null===(t=e.icon)||void 0===t?void 0:t.show)}}}},position:{type:"string",ref:"icon.position",component:"dropdown",options:[{value:"start",translation:"properties.dock.start"},{value:"top",translation:"properties.dock.top"},{value:"end",translation:"properties.dock.end"},{value:"bottom",translation:"properties.dock.bottom"}],defaultValue:(e,{layout:t})=>"left"===t.orientation?"top":"start",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"icon.show",component:"switch",defaultValue:!0,show:e=>"tab"===e.key}}},$f=({theme:e})=>({colorWrapper:Mf({ref:"indicator.selected",theme:e}),colorHoverWrapper:{component:"items",items:{hoverLabel:{translation:"Object.TabbedContainer.Hover",component:"text"},hover:Mf({ref:"indicator.hover",theme:e,change:e=>{mf(e,"background.hover.color",pf(e,"indicator.hover.color")),mf(e,"background.hover.useColorExpression",pf(e,"indicator.hover.useColorExpression"))}})},show:(e,t)=>"left"!==t.layout.orientation}}),zf=({paths:e,fontResolver:t,theme:r})=>{const n=`${e.theme}.fontFamily`,o=`${e.theme}.fontSize`;return{fontFamilyItem:{component:"dropdown",ref:`${e.ref}.fontFamily`,options:()=>t.getOptions(n),defaultValue:()=>t.getDefaultValue(n),change:(e,t,r)=>{var n;const o=null===(n=e.label)||void 0===n?void 0:n.fontFamily,i=(e=>{const t=[];return e.objects.forEach((e=>{var r,n;const o=null===(r=e.components)||void 0===r?void 0:r.find((e=>"tab"===e.key)),i=null==o||null===(n=o.label)||void 0===n?void 0:n.fontFamily;i&&-1===t.indexOf(i)&&t.push(i)})),t})(r);o&&-1===i.indexOf(o)&&i.push(o),r.fontsUsed=i}},fontWrapperItem:{component:"inline-wrapper",items:{fontSizeItem:{component:"dropdown",ref:`${e.ref}.fontSize`,options:()=>t.getOptions(o),defaultValue:()=>t.getDefaultValue(o)},fontColorItem:{component:"color-picker",width:!1,ref:`${e.ref}.color`,defaultValue:()=>({color:r.getStyle("object.tabbedContainer",e.theme,"color")})}}},alignment:{component:"text-align-buttons",ref:"label.alignment",show:e=>"tabs"===e.key},hide:{type:"boolean",translation:"properties.show",ref:"label.show",component:"switch",defaultValue:!0}}},Bf=({ref:e,key:t,fontResolver:r,theme:n})=>({translation:"Object.Container.Props.Label",component:"panel-section",items:{label:{component:"items",ref:e,key:t,items:zf({paths:{ref:"label",theme:"label.value"},fontResolver:r,theme:n})}}}),Df=({ref:e,key:t})=>({translation:"Visualizations.Descriptions.Width",component:"panel-section",items:{width:{component:"items",ref:e,key:t,items:{unit:{type:"string",ref:"width.unit",component:"dropdown",options:[{value:"%",translation:"Object.Table.Column.Percentage"},{value:"px",translation:"Object.Table.Column.Pixels"}],defaultValue:"%",change:e=>{var t,r;if(void 0!==(null===(t=e.width)||void 0===t?void 0:t.value)&&"%"===(null===(r=e.width)||void 0===r?void 0:r.unit))for(let t=0;t<e.width.value.length;t++)e.width.value[t]>100?e.width.value[t]=100:e.width.value[t]<5&&(e.width.value[t]=5)}},valuePixel:{translation:"properties.axis.minMax",component:"slider",ref:"width.value",range:!0,step:1,min:0,max:800,show:e=>{var t;return"px"===(null===(t=e.width)||void 0===t?void 0:t.unit)},defaultValue:[0,360]},valuePercentage:{translation:"properties.axis.minMax",component:"slider",type:"array",ref:"width.value",range:!0,step:1,min:5,max:100,show:e=>{var t,r;return!(null!==(t=e.width)&&void 0!==t&&t.unit)||"px"!==(null===(r=e.width)||void 0===r?void 0:r.unit)},defaultValue:[5,20]}}}}}),Ff=({theme:e,ref:t,key:r})=>({translation:"Object.TabbedContainer.Indicator",component:"panel-section",items:{indicator:{component:"items",ref:t,key:r,items:$f({theme:e})}}}),Gf=({ref:e,key:t,fontResolver:r,theme:n})=>({translation:"properties.icon",component:"panel-section",items:{icon:{component:"items",ref:e,key:t,items:Nf({paths:{ref:"icon",theme:"icon.value"},fontResolver:r,theme:n})}},show:(e,{layout:t})=>!0===t.showIcons}),Hf=({theme:e,ref:t,key:r})=>({translation:"Object.OrgChart.BackgroundColor",component:"panel-section",items:{background:{component:"items",ref:t,key:r,items:"tab"===r?{bgColorWrapper:Mf({ref:"background"})}:jf({theme:e})}}}),Wf=({fontResolver:e,theme:t})=>{const r="components",n="tab";return{component:"styling-panel",chartTitle:"Object.Container",tabTitle:"scripteditor.dataconnectors.delimiter.tab",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",ref:r,items:{label:Bf({ref:r,key:n,fontResolver:e,theme:t}),width:{...Df({ref:r,key:n}),show:(e,{layout:t})=>"left"!==t.orientation},icon:Gf({ref:r,key:n,fontResolver:e,theme:t}),background:Hf({ref:r,key:n,theme:t})}}},Yf={ref:"label",type:"string",translation:"Object.Container.Props.Label",defaultValue:"",expression:"optional"},Uf={ref:"condition",translation:"Object.Container.Props.ShowCondition",component:"expression",defaultValue:{qValueExpression:{qExpr:""}},expressionType:"ValueExpression",expression:"always"},Vf=e=>({component:"button",translation:"Object.Container.Props.EditProperties",disabled:(e,t)=>{var r,n,o;const i=t.getLayout(),a=null===(r=Np(i,e.childRefId))||void 0===r?void 0:r.qMeta;return!(null!=a&&null!==(n=a.privileges)&&void 0!==n&&n.includes("update")&&null!==(o=i.permissions)&&void 0!==o&&o.update)},action(t,r,{app:n}){const{sense:o}=e.env.anything,i=r.getEngineId(t.childRefId);i&&(o.propertyPanel.show({id:i,app:n,parent:"current",headerLabel:t.label}),r.setSelectedChild([i]))}}),qf=e=>{const{sense:t}=e.env.anything;return{label:Yf,condition:Uf,styling:Wf({fontResolver:e.fontResolver,theme:null==t?void 0:t.theme}),editProperties:Vf(e)}},Kf={translation:"Object.Container.Props.Chart",component:"text",show:e=>e.objects?e.objects.length<=1:e.children.length<=1},Xf={translation:"Common.Charts",component:"text",show:e=>e.objects?e.objects.length>1:e.children.length>1},Zf=e=>({type:"array",ref:"objects",itemTitleRef:e=>e.label,allowAdd:!0,customAdd:!0,allowMove:!0,allowRemove:!0,customRemove:!0,addTranslation:"Object.Container.Props.Add",cId:"childRefId",grouped:!0,add(e,t,r){const n=document.querySelector(".pp-toplist-add-button");null!==n&&r.openAddChildPopover(n)},remove(e,t,r){r.deleteChild(e.childRefId).catch((()=>{}))},items:qf(e)}),Jf=e=>({type:"items",translation:"Object.Container.Props.Content",items:{chartLabel:Kf,chartsLabel:Xf,chartList:Zf(e)}}),Qf={type:"boolean",translation:"Object.Container.Props.ShowTabs",ref:"showTabs",defaultValue:!0,component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},em={type:"boolean",translation:"Object.Container.Props.UseDropdown",label:"Menu",ref:"useDropdown",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},tm={type:"boolean",translation:"Object.Container.Props.UseScrollButtons",ref:"useScrollButton",component:"switch",options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"properties.off"}],defaultValue:!0,show:e=>e.showTabs},rm={type:"boolean",translation:"Object.Container.Props.ShowIcons",ref:"showIcons",component:"switch",options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}],defaultValue:!1,show:e=>e.showTabs},nm={type:"string",translation:"Object.Container.Props.DefaultTab",ref:"defaultTabId",component:"dropdown",defaultValue:void 0,options(e,t){const r=t.getLayout();return r?r.objects.map((e=>({translation:e.label,value:e.childRefId}))):[]},change(e,t){const r=Dp(t.getLayout(),e.defaultTabId);r&&t.setSelectedChild([r])},show:e=>e.objects.length>0},om={type:"string",translation:"properties.orientation",ref:"orientation",component:"dropdown",options:[{value:"top",translation:"properties.orientation.horizontal"},{value:"left",translation:"properties.orientation.vertical"}],defaultValue:"top",show:e=>e.showTabs},im=({fontResolver:e,theme:t})=>{const r="components",n="tabs";return{component:"styling-panel",chartTitle:"Object.TabContainer",tabTitle:"Object.Container.Props.ShowTabs",translation:"LayerStyleEditor.component.styling",subtitle:"LayerStyleEditor.component.styling",useGeneral:!0,useBackground:!0,items:{label:Bf({ref:r,key:n,fontResolver:e,theme:t}),width:Df({ref:r,key:n}),indicator:Ff({ref:r,key:n,theme:t}),icon:Gf({ref:r,key:n,fontResolver:e,theme:t}),background:Hf({ref:r,key:n,theme:t})}}},am={items:{details:{show:e=>!0===e.showDetails}}},lm=e=>{const{sense:t}=e.env.anything;return{type:"items",translation:"properties.presentation",grouped:!0,items:{stylingPanel:im({fontResolver:e.fontResolver,theme:null==t?void 0:t.theme}),container:{type:"items",items:{showTabs:Qf,useDropdown:em,useScrollButton:tm,showIcons:rm,orientation:om,defaultTabId:nm}}}}},sm=e=>({uses:"settings",items:{general:am,presentation:lm(e)}}),cm=e=>({type:"items",component:"accordion",items:{content:Jf(e),settings:sm(e)}}),dm=e=>{const{sense:t}=e.env.anything,r=function(e){var t=e.theme,r=e.translator,n=e.config,o=void 0===n?{}:n,i=e.flags,a=function(e){var t=e.config,r=void 0===t?{}:t,n=r.id,o=r.paths;return{id:void 0===n?"object":"".concat("object",".").concat(n),paths:Array.isArray(o)?o:[]}}({config:o}),l=a.id,s=a.paths,c={};s.forEach((function(e){for(var n=e.split("."),o=c,a=0;a<n.length;a++){var s=n[a];a===n.length-1?o[s]=ph({theme:t,translator:r,id:l,path:e,flags:i}):void 0===o[s]&&(o[s]={}),o=o[s]}}));var d=function(e){for(var t=e.split("."),r=c,n=0;n<t.length;n++){var o=t[n];if(void 0===r[o])throw new Error("font-resolver: Path '".concat(e,"' could not be resolved."));r=r[o]}return r};return c.getDefaultValue=function(e){return d(e).getDefaultValue()},c.getOptions=function(e){return d(e).getOptions()},c}({theme:null==t?void 0:t.theme,translator:e.env.translator,flags:e.env.flags,config:{id:"tabbedContainer",paths:["label.value","icon.value"]}}),n=function(e){return{async getDropOptions(e,t,r){const{item:n}=t,o=e.getCreatePropertyHandler();if(o.setModel(e.model),"state"===t.item.type){var i;const n=await e.model.getProperties();return o.setProperties(n),o.setLayout(null===(i=e.model)||void 0===i?void 0:i.layout),this.getDropStateOptions(t,o,e.model,r)}if("visualization"===n.type)return t.menu.addItem({translation:["Object.Container.DropItem",n.name],tid:"addvisualization",select(){var e;null===(e=o.addChild({initProps:{qExtendsId:n.id,qInfo:{qType:"undefined"}}}))||void 0===e||e.then((e=>{e&&o.setSelectedChild([e.id])}))}}),void r();const a=await t.item.getDropOption(t.item);"newObject"===(null==a?void 0:a.id)&&t.menu.addItem({translation:["Object.Container.DropItem",n.name],tid:"createvisualization",select(){var e,t;null===(e=o.addChild({initProps:{...a.args.init,visualization:a.args.template},children:null===(t=a.args.children)||void 0===t?void 0:t.map((e=>({qProperty:e})))}))||void 0===e||e.then((e=>{e&&o.setSelectedChild([e.id])}))}}),r()},async addChild(t,r){const{model:n}=this,o=new Fp({app:n.app,data:e.propertyHandlerData});return o.setModel(n),{childModel:await o.addChild({initProps:t,children:r}),handler:o}},canReceive(e){if(this.model.layout.qExtendsId)return!1;if("libraryitem"===e.type){const{item:t}=e;if("template"===t.type&&mp.includes(t.template))return!1;if("visualization"===t.type&&mp.includes(t.visualization))return!1}return"gridcell"!==e.type||!mp.includes(e.cell.model.layout.visualization)}}}(e);return{definition:cm({...e,fontResolver:r}),support:{snapshot:!1,export:!0,sharing:!1,exportData:!1,viewData:!1},hidePatchPanel:()=>!0,getCreatePropertyHandler:t=>new Fp({app:t,data:e.propertyHandlerData}),...n,addChild:async function(e,t){const{childModel:r,handler:o}=await n.addChild.apply(this,[e,t]);r&&o.setSelectedChild([r.id])},migrate:{properties:(e,t)=>((async(e,t)=>{if(!e.objects){const{objects:r,defaultTabId:n,components:o,orientation:i,showDetails:a}=await t.getEffectiveProperties(),l=await t.getFullPropertyTree();if(!l.qProperty.objects&&r){const s=[];l.qChildren.forEach((e=>{const r=e.qProperty;if(r.qInfo.qId){const n=async n=>{const o=await t.getChild(n),i=await o.getEffectiveProperties();return{...e,qProperty:{...r,childRefId:i.childRefId}}};s.push(n(r.qInfo.qId))}}));const c=await Promise.all(s),d={...e,objects:r,defaultTabId:null!=n?n:"",components:o,qChildListDef:Of,orientation:i,showDetails:a};t.clearSoftPatches(),await t.setFullPropertyTree({...l,qProperty:d,qChildren:c})}}})(e,t),e)},exportProperties:null,importProperties:(e,t)=>{const r={...e.properties};return"masterobject"!==e.properties.qInfo.qType&&(r.qInfo.qType=t.qInfo.qType),r.visualization=t.visualization,{qProperty:r,qChildren:e.qChildren}},extendMetrics:Pf}},um=e=>e.reduce(((e,{id:t,data:r})=>(r&&(e[t]=r),e)),{}),pm=async e=>{const t=[];for(const[r,n]of e){const e={id:r,data:void 0},o=n;t.push(o.getViewState().then((e=>({id:r,data:e}))).catch((()=>e)))}const r=await Promise.all(t);return{viewStates:um(r)}},hm=async e=>{const t=[];for(const[r,n]of e){const e={id:r,data:void 0},o=n;t.push(o.getSnapshotLayout().then((e=>({id:r,data:e}))).catch((()=>e)))}const r=await Promise.all(t);return um(r)},fm=(e,t)=>(n((async r=>{const n=r,{snapshotData:o}=n;if(o){const r=$p(n),i=t(e.objectMap,r),[a,l]=await Promise.all([hm(i.objectMap),pm(i.objectMap)]);o.objectsData={layouts:a},n.objects=i.objects,o.viewState=l}return r})),{getViewState:()=>pm(e.objectMap)});let mm=function(e){return e.COPY="ctrl+c",e.CUT="ctrl+x",e.PASTE="ctrl+v",e.OPEN_CONTEXT_MENU="shift+F10",e.ESCAPE="Escape",e.SPACE=" ",e.ENTER="Enter",e.BACKSPACE="Backspace",e.DELETE="Delete",e.SHIFT="Shift",e}({}),bm=function(e){return e.KEY_DOWN="keydown",e.KEY_UP="keyup",e.FOCUS_OUT="focusout",e}({});var gm,vm;!function(e){e.TAB_MENU="tab-menu",e.TAB_MENU_ITEM="tab-menu-item",e.ACTIVE_TAB="active-tab-button",e.TAB_WRAPPER="tab-wrapper",e.TAB="tab-button",e.TAB_EXTRA_PRIO="MuiTab-root",e.TAB_LABEL="tab-label",e.TABS_ICON="tab-icon",e.ACTIVE_TAB_PANEL="active-tab-panel",e.TAB_INDICATOR="MuiTabs-indicator"}(gm||(gm={})),function(e){e.TABS="& .tab-button.MuiTab-root, .tab-button.active-tab-button",e.TABS_HOVER="& .tab-button.MuiTab-root:hover",e.TABS_LABEL="& .tab-label",e.TABS_ICON="& .tab-icon svg",e.TABS_WRAPPER="& .tab-wrapper",e.TAB_INDICATOR="& .MuiTabs-indicator"}(vm||(vm={}));const ym=e=>{var t;return null===(t=e.getElementsByClassName(gm.ACTIVE_TAB))||void 0===t?void 0:t[0]},xm=e=>{var t;return null===(t=e.getElementsByClassName(gm.ACTIVE_TAB_PANEL))||void 0===t?void 0:t[0]},Em=({element:e,setAccessibility:n,accessibility:a,renderHelper:l,interactions:s,env:c,models:d})=>{const{modifiedLayout:{showTabs:u,objects:p,orientation:h},translator:f}=d;t((()=>{(()=>{const t="top"===h?f.get("TabContainer.Navigation.Horizontal"):f.get("TabContainer.Navigation.Vertical"),r=((e,t)=>e.map((e=>e.label||t.get("TabContainer.Object.Untitled"))).join(", "))(p,f);e.setAttribute("aria-label",f.get("TabContainer.Object.Description",[r,u?t:""]))})()}),[e,u,p,f,h]);const m=c.flags.isEnabled("VIZ-7_NEW_SHEET"),b=o(),g=i((()=>()=>{var e;(n(!1),b.enabled)&&(null===(e=b.blur)||void 0===e||e.call(b,!0))}),[b,n]),v=i((()=>t=>{switch(t.shiftKey?`shift+${t.key}`:t.key){case mm.ESCAPE:var r;t.stopPropagation(),null===(r=b.blur)||void 0===r||r.call(b,!0);break;case mm.ENTER:case mm.SPACE:{t.stopPropagation();const r=t.target;var n;if(null!=r&&r.classList.contains(gm.ACTIVE_TAB))null===(n=xm(e))||void 0===n||n.focus();break}}}),[e,b]),y=i((()=>t=>{const r=t.shiftKey?`shift+${t.key}`:t.key,n=l.objectMap.values().next().value,o=l.objectApis.values().next().value;switch(r){case mm.ESCAPE:{const r=ym(e);m?(({event:e,objectApi:t,activeTab:r})=>{var n;e.stopPropagation(),(null==t?void 0:t.viewDataToggled)&&(null===(n=t.support)||void 0===n?void 0:n.call(t,"viewData"))?t.toggleDataView():null==r||r.focus()})({event:t,objectApi:o,activeTab:r}):(({event:e,objectApi:t,activeTab:r})=>{var n,o;e.stopPropagation(),(null==t?void 0:t.viewDataToggled)&&(null===(n=t.supportViewData)||void 0===n?void 0:n.call(t))?null===(o=t.toggleDataView)||void 0===o||o.call(t):null==r||r.focus()})({event:t,objectApi:n,activeTab:r});break}case mm.ENTER:case mm.SPACE:{const r=xm(e);m?(({event:e,objectApi:t,activeTab:r})=>{var n,o,i;if(!t)return;e.stopPropagation(),null===(n=t.setOnBlurHandler)||void 0===n||n.call(t,(()=>{var e;null==r||r.focus(),null===(e=t.setOnBlurHandler)||void 0===e||e.call(t,void 0)})),!t.viewDataToggled&&(null===(o=t.support)||void 0===o?void 0:o.call(t,"viewData"))?t.toggleDataView():null===(i=t.toggleFocus)||void 0===i||i.call(t,!0)})({event:t,objectApi:o,activeTab:r}):(({event:e,objectApi:t,activeTab:r})=>{var n,o,i,a;if(!t)return;e.stopPropagation(),null===(n=t.setOnBlurHandler)||void 0===n||n.call(t,(()=>{var e;null==r||r.focus(),null===(e=t.setOnBlurHandler)||void 0===e||e.call(t,void 0)})),!t.viewDataToggled&&(null===(o=t.supportViewData)||void 0===o?void 0:o.call(t))?null===(a=t.toggleDataView)||void 0===a||a.call(t):t.viewDataToggled&&"function"==typeof(null===(i=t.dataViewObject)||void 0===i?void 0:i.focus)?t.dataViewObject.focus():"function"==typeof t.focus&&t.focus()})({event:t,objectApi:n,activeTab:r});break}case mm.OPEN_CONTEXT_MENU:t.stopPropagation(),null!=n&&n.viewDataToggled||e!==document.activeElement&&(g(),e.focus())}}),[e,g,m,l]),x=i((()=>e=>{const t=e.target;null!=t&&t.classList.contains(gm.ACTIVE_TAB_PANEL)?y(e):v(e)}),[v,y]);t((()=>(a&&e.addEventListener(bm.KEY_DOWN,x),()=>{e.removeEventListener(bm.KEY_DOWN,x)})),[e,a,x]);const[E,S]=r(!1);t((()=>{E&&(S(!1),window.setTimeout((()=>{var t,r;return null===(t=null!==(r=(e=>{var t;return null===(t=e.getElementsByClassName(gm.TAB_MENU))||void 0===t?void 0:t[0]})(e))&&void 0!==r?r:ym(e))||void 0===t?void 0:t.focus()}),0))}),[e,E]),t((()=>{n(!1)}),[s.edit,n]),t((()=>{const t=t=>{const r=t.relatedTarget;null!=e&&e.contains(r)||null!=r&&r.classList.contains(gm.TAB_MENU_ITEM)||null==g||g()};return b.enabled&&b.active&&!s.edit&&(n(!0),S(!0),e.addEventListener(bm.FOCUS_OUT,t)),()=>{e.removeEventListener(bm.FOCUS_OUT,t)}}),[b])},Sm=e=>{const[t]=r(e);return[t,function(e){Object.assign(t,e)}]},Cm={getChar(e){let t,r=e;return r>9?(t=65+r-10,t>90&&(t+=6)):r=`${r}`.charCodeAt(0),!t||[48,111,79,105,73,108].indexOf(t)>-1?this.getChar(r+1):String.fromCharCode(t)},base62(e){const t=this.getChar(e%62),r=Math.floor(e/62);return r>0?this.base62(r)+t:t},id(){return this.base62(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};const wm={qInfo:{qId:"MasterObjectList",qType:"MasterObjectList"},qAppObjectListDef:{qType:"masterobject",qData:{name:"/qMetaDef/title",labelExpression:"/labelExpression",visualization:"/visualization",tags:"/qMetaDef/tags"}}};class Rm{constructor(e){P(this,"sessionObject",void 0),P(this,"getOrCreateSessionObject",(async e=>{const t=wm.qInfo.qId;this.sessionObject=await e.getObject(t).catch((()=>e.createSessionObject(wm)))})),P(this,"getMasterVisualizations",(async()=>{try{if(!this.sessionObject)return[];const e=await this.sessionObject.getLayout();return("qAppObjectList"in e?e.qAppObjectList.qItems:e).map((e=>({...e.qData,qExtendsId:e.qInfo.qId}))).filter((e=>!mp.includes(e.visualization)))}catch(e){return[]}})),this.getOrCreateSessionObject(e).catch((()=>{}))}}let km=function(e){return e[e.TOP=0]="TOP",e[e.BOTTOM=1]="BOTTOM",e[e.UP=2]="UP",e[e.DOWN=3]="DOWN",e}({});class Am{constructor({embed:e,model:t,app:r,translator:n,mutex:o}){P(this,"model",void 0),P(this,"embed",void 0),P(this,"app",void 0),P(this,"undoRedoModel",void 0),P(this,"chartList",void 0),P(this,"masterVizList",void 0),P(this,"mutex",void 0),P(this,"rememberAsGroup",(async e=>{let t;this.undoRedoModel&&(t=await this.undoRedoModel.startGroup());const r=await e();return t&&this.undoRedoModel&&await this.undoRedoModel.endGroup(t),r})),P(this,"generateProperties",(async(e,t)=>await this.embed.generateProperties({type:e,properties:t}))),P(this,"addVizAsChild",(async({type:e,initProps:t,objectInitProps:r,children:n})=>{try{const o=await this.generateProperties(e,t);let i=(null==r?void 0:r.label)||(null==t?void 0:t.title);if(!i){const r=this.getChart(null==t?void 0:t.visualization),n=null==r?void 0:r.libraryInfo;i=(null==n?void 0:n.translation)||(null==n?void 0:n.name)||e}const a={...r,label:i};return await this.addChild(o,n,a)}catch(e){return}})),P(this,"addMasterObjectAsChild",(async({initProps:e,objectInitProps:t,children:r})=>{try{if(!e||!e.qExtendsId||!this.app)return;const n=await this.app.getObject(e.qExtendsId),o=await n.getProperties(),i=(null==t?void 0:t.label)||o.title||o.qMetaDef.title,a={...e,qInfo:{qType:"childObject"}},l={...t,label:i};return await this.addChild(a,r,l)}catch(e){return}})),P(this,"deleteChildren",(async e=>{const{model:t}=this;if(0===e.length||!t)return!1;try{await this.mutex.lock();const r=await t.getFullPropertyTree(),{qChildren:n,qProperty:o}=r,i=new Set(e);return r.qChildren=n.filter((({qProperty:e})=>{const t=e.childRefId;return!t||!i.has(t)})),r.qProperty.objects=o.objects.filter((e=>!i.has(e.childRefId))),await t.setFullPropertyTree(r),!0}catch(e){return!1}finally{this.mutex.unlock()}})),P(this,"moveChild",(async(e,t)=>{if(this.model)try{await this.mutex.lock();const r=await this.model.getProperties(),{objects:n}=r,o=n.findIndex((e=>e.childRefId===t));let i=!1;switch(e){case km.TOP:{if(0===o)break;const e=n.splice(o,1)[0];n.unshift(e),i=!0;break}case km.BOTTOM:{if(o===n.length-1)break;const e=n.splice(o,1)[0];n.push(e),i=!0;break}case km.UP:{if(0===o)break;const e=n.splice(o,1)[0];n.splice(o-1,0,e),i=!0;break}case km.DOWN:{if(o===n.length-1)break;const e=n.splice(o,1)[0];n.splice(o+1,0,e),i=!0;break}}i&&await this.model.setProperties(r)}finally{this.mutex.unlock()}})),P(this,"getCharts",(()=>{var e;return(null===(e=this.chartList)||void 0===e?void 0:e.getCharts())||{}})),P(this,"getMasterVizList",(()=>{var e;return(null===(e=this.masterVizList)||void 0===e?void 0:e.getMasterVisualizations())||Promise.resolve([])})),P(this,"getChart",(e=>{var t;return null===(t=this.chartList)||void 0===t?void 0:t.getChart(e)})),P(this,"getChartLabelById",((e,t)=>{var r,n;const o=null==e||null===(r=e.qChildList)||void 0===r?void 0:r.qItems.find((e=>e.qInfo.qId===t));if(!o)return"";const{visualization:i,title:a}=o.qData;if(a)return a;const l=this.getChart(i);return(null==l||null===(n=l.libraryInfo)||void 0===n?void 0:n.translation)||i})),this.model=t,this.embed=e,this.app=r;const i=r;i&&i.getUndoInfoObject&&i.getUndoInfoObject().then((e=>{this.undoRedoModel=e})).catch((()=>{})),r&&(this.masterVizList=new Rm(r)),e&&n&&(this.chartList=new bp(e,n)),this.mutex=o}async addChild(e,t,r){if(this.model&&!mp.includes(e.visualization))try{await this.mutex.lock();const{model:n}=this,o=async()=>{e.childRefId=Cm.id();const o=await n.createChild(e);if(o){const t=await n.getProperties();t.objects.unshift({childRefId:e.childRefId,...r,condition:{qValueExpression:{qExpr:""}}}),await n.setProperties(t)}return t&&o&&await Promise.all(t.map((({qProperty:e})=>o.createChild(e)))),o};return await this.rememberAsGroup(o)}catch(e){return}finally{this.mutex.unlock()}}}class _m{constructor(e){P(this,"locked",!1),P(this,"tasks",[]),P(this,"id",void 0),P(this,"lock",(async()=>this.locked?new Promise((e=>{this.tasks.push(e)})):(this.locked=!0,!0))),P(this,"unlock",(()=>{if(this.tasks.length>0){const e=this.tasks.shift();null==e||e(!0)}else this.locked=!1})),this.id=e}}const Im={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},rebeccapurple:{r:102,g:51,b:153},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:255,g:255,b:255,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},Tm={index:-1,color:"none",alpha:1},Lm=e=>{let t=parseFloat(e[1]),r=parseFloat(e[3]),n=parseFloat(e[5]);return t%=360,r/=100,n/=100,t=Math.max(0,Math.min(t,360)),r=Math.max(0,Math.min(r,1)),n=Math.max(0,Math.min(n,1)),{h:t,s:r,l:n,v:n}},Om=(e,t,r,n,o=1)=>{let i,a,l,s=[];switch(r=Math.floor(r)){case 0:s=[e,t,0];break;case 1:s=[t,e,0];break;case 2:s=[0,e,t];break;case 3:s=[0,t,e];break;case 4:s=[t,0,e];break;case 5:s=[e,0,t];break;default:s=[0,0,0]}return i=s[0]+n,a=s[1]+n,l=s[2]+n,i=Math.round(255*i),a=Math.round(255*a),l=Math.round(255*l),`rgba(${i},${a},${l},${o})`},Pm=e=>{const{h:t,s:r,l:n}=Lm(e),o=e.length>7?parseFloat(e[7]):1,i=n<=.5?2*n*r:(2-2*n)*r,a=t/60,l=i*(1-Math.abs(a%2-1));return Om(i,l,a,n-.5*i,o)},Mm={resolveExpression:({colorExpression:e=""})=>{let t=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e);if(t)return`rgb(${t[1]},${t[2]},${t[3]})`;if(t=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return`rgba(${t[1]},${t[2]},${t[3]},${t[4]})`;if(t=/^argb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e),t){const e=Math.round(Number(t[1])/255*100)/100;return`rgba(${t[2]},${t[3]},${t[4]},${e})`}if(t=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return Pm(t);if(t=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(e),t)return Pm(t);if(t=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(e),t)return(e=>{const{h:t,s:r,v:n}=Lm(e),o=n*r,i=t/60,a=o*(1-Math.abs(i%2-1));return Om(o,a,i,n-o)})(t);if(t=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e),t)return e;if(t=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e),t)return e;const r=e&&Im[e.toLowerCase()];if(r){const e=void 0!==r.a?r.a:1;return`rgba(${r.r},${r.g},${r.b},${e})`}return"none"},getColor({style:e,defaultColor:t,theme:r}){const n=(null==e?void 0:e.color)||Tm;let o;return o=null!=e&&e.useColorExpression?Mm.resolveExpression(e):"string"==typeof n?n:(null==r?void 0:r.getColorPickerColor(n))||"",o&&"none"!==o?o:t}},jm=()=>y.createElement(_p,{viewBox:"0 0 16 16"},y.createElement("path",{d:"M15 6V5H5V2H1.5a.5.5 0 0 0-.5.5V6H0V2a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v4h-1Zm-5-4H6v2h4V2Zm4.5 0H11v2h4V2.5a.5.5 0 0 0-.5-.5Zm1.5 9h-1V8h1v3Zm0 3a1 1 0 0 1-1 1h-1v-1h.6a.4.4 0 0 0 .4-.4V13h1v1Zm-7 1v-1h3v1H9Zm-5 0v-1h3v1H4Zm-3 0a1 1 0 0 1-1-1v-1h1v.6c0 .22.18.4.4.4H2v1H1ZM0 8h1v3H0V8Zm4-.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-.5.5h-7a.5.5 0 0 1-.5-.5v-4ZM5 11h6V8H5v3Z"})),Nm=({libraryInfo:e,style:t,id:r})=>y.createElement("div",{style:t,"data-testid":"tab-chart-icon",id:r,className:gm.TABS_ICON},y.createElement(e.IconDefinition,null)),$m=({style:e,id:t})=>y.createElement("div",{style:e,"data-testid":"tab-hidden-icon",id:t},y.createElement(Ip,{viewBox:"0 0 16 16"},y.createElement("path",{d:"m13.441.795.764.646-1.839 2.174c.568.434 1.076.914 1.522 1.385a13.79 13.79 0 0 1 2.109 3 13.798 13.798 0 0 1-2.108 3c-1.382 1.457-3.345 3-5.89 3-1.34 0-2.52-.428-3.536-1.045l-1.904 2.25-.764-.646L13.441.795ZM11.72 4.379l-1.427 1.686a3 3 0 0 1-3.82 4.516l-1.354 1.6c.86.497 1.819.819 2.88.819 2.121 0 3.834-1.287 5.161-2.685A12.666 12.666 0 0 0 14.857 8a12.691 12.691 0 0 0-1.697-2.315c-.35-.37-.727-.73-1.132-1.063l-.308-.243ZM8 2a6.428 6.428 0 0 1 2.242.412l.305.123-.681.805A5.359 5.359 0 0 0 8 3C5.877 3 4.164 4.287 2.837 5.685A12.664 12.664 0 0 0 1.14 8a12.66 12.66 0 0 0 1.697 2.315l.301.308.311.299-.646.765A14.567 14.567 0 0 1 2.109 11 13.791 13.791 0 0 1 0 8a13.801 13.801 0 0 1 2.109-3C3.49 3.543 5.454 2 8 2Zm1.633 4.845-2.5 2.956a1.999 1.999 0 0 0 2.5-2.956Zm-3.917-.793a3 3 0 0 1 2.692-1.025l.202.035-.809.948A2 2 0 0 0 6 7.967l.003.152-.808.947a3 3 0 0 1 .521-3.014Z"}))),zm=()=>y.createElement(Ip,{viewBox:"0 0 16 16"},y.createElement("path",{d:"M12 4H6V3h6v1ZM6 8.5h4v-1H6v1Zm9 4.5H6v-1h9v1ZM3 11a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1Zm0-5.5a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h1Zm0 1H2v1h1v-1ZM3 2a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h1Zm0 1H2v1h1V3Z"})),Bm=Ul(Bu)({width:28,overflow:"hidden"}),Dm=Ul(Bu)({height:28,width:"100%",overflow:"hidden",alignItems:"center","&::before":{visibility:"hidden"}}),Fm=(e,t)=>e.find((e=>e.childRefId===t)),Gm=(e,t)=>!t.edit&&0===e.condition,Hm=e=>{var t;const{objects:r,defaultTabId:n,cachedTabId:o}=e;return o||(n&&r.some((e=>e.childRefId===n))?n:(null===(t=r[0])||void 0===t?void 0:t.childRefId)||"")};class Wm{constructor({modifiedLayout:e,themeService:t}){P(this,"modifiedLayout",void 0),P(this,"themeStyle",void 0),P(this,"style",void 0),P(this,"objectMap",void 0),P(this,"activeTabId",void 0),P(this,"theme",void 0),P(this,"getTabsWidth",(e=>{const t=this.resolveComponentStyle({compPath:"width.value",themePath:"tabWidth.value"});if(void 0===t||2!==t.length||e!==this.modifiedLayout.orientation)return{};const r=this.resolveComponentStyle({compPath:"width.unit",themePath:"tabWidth.unit",defaultValue:"%"});return{minWidth:`${t[0]}${r}`,maxWidth:`${t[1]}${r}`}})),P(this,"getTabWidth",(e=>{var t;const r=null==e?void 0:e.value,n=null!==(t=null==e?void 0:e.unit)&&void 0!==t?t:"%";if(void 0===r||2!==r.length||"left"===this.modifiedLayout.orientation)return{};return{minWidth:`${r[0]}${n}`,maxWidth:`${r[1]}${n}`}})),P(this,"getColorStyle",((e,t=e)=>{const r=this.resolveComponentStyle({compPath:e,themePath:t}),n=Mm.getColor({style:r,theme:this.theme});return null!=n?n:r})),P(this,"getTabBackgroundStyle",((e,t)=>{let r;if(this.activeTabId===e){const e=this.resolveComponentStyle({compPath:"background.selected",themePath:""});r=Mm.getColor({style:e,theme:this.theme})}return null!=r?r:Mm.getColor({style:t,theme:this.theme})})),P(this,"createTabClasses",(()=>{var e;return null===(e=this.modifiedLayout.objects)||void 0===e?void 0:e.reduce(((e,t)=>{var r;const n=null==t?void 0:t.childRefId,o=null==t||null===(r=t.components)||void 0===r?void 0:r.find((e=>"tab"===e.key));return e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}`]={textAlign:pf(o,"label.alignment"),backgroundColor:this.getTabBackgroundStyle(n,null==o?void 0:o.background),...this.getTabWidth(null==o?void 0:o.width)},e[`#tab-${this.modifiedLayout.qInfo.qId}-${n}:hover`]={..."left"===this.modifiedLayout.orientation&&{backgroundColor:this.getColorStyle("background.hover","background.hover.color")}},e[`#tab-label-${this.modifiedLayout.qInfo.qId}-${n}`]={fontSize:pf(o,"label.fontSize"),fontFamily:pf(o,"label.fontFamily"),color:Mm.getColor({style:pf(o,"label.color"),theme:this.theme})},e[`#tab-icon-${this.modifiedLayout.qInfo.qId}-${n} svg`]={height:pf(o,"icon.size"),color:Mm.getColor({style:pf(o,"icon.color"),theme:this.theme})},e}),{})})),P(this,"createTabsClasses",(()=>({[vm.TABS_LABEL]:{fontSize:this.resolveComponentStyle({compPath:"label.fontSize",themePath:"label.value.fontSize"}),fontFamily:this.resolveComponentStyle({compPath:"label.fontFamily",themePath:"label.value.fontFamily"}),color:this.resolveComponentStyle({compPath:"label.color.color",themePath:"label.value.color"})},[vm.TABS_ICON]:{height:this.resolveComponentStyle({compPath:"icon.size",themePath:"icon.value.fontSize"}),color:this.getColorStyle("icon.color","icon.value.color")},[vm.TABS]:{textAlign:this.resolveComponentStyle({compPath:"label.alignment",themePath:"label.textAlignment"}),...this.getTabsWidth("top")},[vm.TABS_HOVER]:{..."top"===this.modifiedLayout.orientation&&{borderBottomColor:this.getColorStyle("indicator.hover","indicator.hover.color")}},[vm.TABS_WRAPPER]:{...this.getTabsWidth("left"),backgroundColor:this.getColorStyle("background.unselected","")},[vm.TAB_INDICATOR]:{backgroundColor:this.getColorStyle("indicator.selected","indicator.selected.color")}}))),P(this,"createStyleClasses",(()=>({...this.createTabsClasses(),...this.createTabClasses()}))),P(this,"resolveComponentStyle",(({key:e="tabs",compPath:t,themePath:r=t,defaultValue:n})=>{var o,i,a;const l=null===(o=this.modifiedLayout.components)||void 0===o?void 0:o.find((t=>t.key===e));return null!==(i=null!==(a=pf(l,t))&&void 0!==a?a:pf(this.themeStyle,r))&&void 0!==i?i:n})),this.modifiedLayout=e,this.activeTabId=Hm(this.modifiedLayout),this.themeStyle=t.getStyles(),this.theme=t.getTheme(),this.objectMap=Bp(this.modifiedLayout),this.style=this.createStyleClasses()}getStyleClasses(){return this.style}getTabStyle(e){var t;return null===(t=this.objectMap[e].components)||void 0===t?void 0:t.find((e=>"tab"===e.key))}}const Ym=()=>{const t=a(),n=l(),o=s(),m=c(),b=d(),g=u(),v=e(),y=p(),x=h(),E=function(e){var t=e.theme,r=e.config,n=void 0===r?{}:r,o=n.id,i=n.resolve,a=void 0===i?[]:i,l=n.transform,s=void 0===l?[]:l,c=n.extend,d=void 0===c?[]:c,u={theme:t,matrix:If(a),styles:void 0};return u.styles=Lf({theme:t,id:o,transform:s,extend:d,matrix:u.matrix}),{getStyles:function(){return u.styles},getTheme:function(){return u.theme},setTheme:function(e){u.theme=e,u.styles=Lf({theme:e,id:o,transform:s,extend:d,matrix:u.matrix})}}}({theme:f(),config:{id:"tabbedContainer",resolve:[["object.tabbedContainer","indicator.selected","color"],["object.tabbedContainer","indicator.hover","color"],["object.tabbedContainer","background.hover","color"],["object.tabbedContainer","icon.value","color"],["object.tabbedContainer","icon.value","fontSize"]]}}),S=i((()=>new bp(m,g)),[m,g]),[C]=r((()=>new _m(b.id))),[w,R]=r(!1),k=i((()=>m&&b&&n?new Am({embed:m,model:b,app:n,translator:g,mutex:C}):void 0),[m,b,n,g,C]),A=i((()=>$p(o)),[o]),_=i((()=>new Wm({modifiedLayout:A,themeService:E})),[A,E]);return i((()=>({app:n,modifiedLayout:A,embed:m,model:b,emitter:y,interactions:x,dataHandler:k,chartList:S,styleModel:_,mutex:C,options:v,accessibility:w,setAccessibility:R,translator:g,element:t})),[A,m,b,n,y,x,k,S,_,C,v,w,g,t])},Um=({dataHandler:e,modifiedLayout:t,translator:r,sharedContainerUtilities:n,Icon:o})=>{const[i,a]=R(void 0);if(!e||!t)return null;const l=!t.qExtendsId;return y.createElement(Sp,null,y.createElement(Ep,null,y.createElement(o,null),l?y.createElement(y.Fragment,null,y.createElement(Ap,{sx:{width:250,height:32,fontFamily:"inherit"},className:"init-button",variant:i?"contained":"outlined",onClick:e=>{a(e.currentTarget)},"aria-label":r.get("LayoutContainer.EmptyList.AddContent"),disableRipple:!0},r.get("LayoutContainer.EmptyList.AddContent")),y.createElement(Op,{translator:r,anchorEl:i,dataHandler:e,onClose:()=>{a(void 0)},sharedContainerUtilities:n})):y.createElement(oc,{variant:"inherit"},r.get("LayoutContainer.EmptyList.EmptyHint"))))};class Vm{constructor(e){P(this,"_rendered",new Set),P(this,"_objectMap",new Map),P(this,"_objectApis",new Map),P(this,"_resolver",void 0),P(this,"_dependencyData",void 0),P(this,"_recreateMap",new Map),P(this,"createTimerForRendering",(()=>{if(!this.resolver){let e;const t=setTimeout((()=>{this.doResolve()}),9e4),r=new Promise((t=>{e=t}));this._resolver={promise:r,resolve:e,timer:t}}return this._resolver})),P(this,"doResolve",(()=>{var e,t,r;this.resolver&&(clearTimeout(null===(e=this.resolver)||void 0===e?void 0:e.timer),null===(t=(r=this.resolver).resolve)||void 0===t||t.call(r,!0),this._resolver=void 0)})),P(this,"tryToResolve",(()=>{const{visibleLayoutObjects:e}=this._dependencyData;if(this.resolver){(0===e.length||e.every((e=>this.rendered.has(e.id))))&&this.doResolve()}})),this._dependencyData=e}set dependencyData(e){this._dependencyData=e}get rendered(){return this._rendered}get objectMap(){return this._objectMap}get objectApis(){return this._objectApis}get resolver(){return this._resolver}get recreateMap(){return this._recreateMap}syncObjects(e){const t=new Set,r=new Set([...Array.from(this.objectMap.keys()),...Array.from(this.objectApis.keys()),...this.rendered]),n=new Set(r);let o=!1;return e.forEach((e=>{r.has(e.id)?(this.rendered.has(e.id)&&t.add(e.id),n.delete(e.id)):o=!0})),n.forEach((e=>{var t;const r=this.objectMap.get(e);var n;r&&(this.confirmPotentialSelections(r),null===(n=r.destroy)||void 0===n||n.call(r),this.objectMap.delete(e));null===(t=this.objectApis.get(e))||void 0===t||t.destroy(),this.objectApis.delete(e)})),this._rendered=t,this.tryToResolve(),o}destroy(){for(const e of this.objectApis.values())e.destroy();this._objectMap=new Map,this._objectApis=new Map}saveObject(e,t){this.objectMap.set(e,t)}saveObjectApi(e,t){this._objectApis.set(e,t)}onRendered(e){this.rendered.add(e),this.tryToResolve()}getChildrenObjects(){const{visibleLayoutObjects:e}=this._dependencyData,t=[];return e.forEach((e=>{const r=this.objectMap.get(e.id);r&&t.push(r)})),t}getChildLayout(e){const{modifiedLayout:t}=this._dependencyData;return t.qChildList.qItems.find((t=>t.qInfo.qId===e))}getObjectOptions(e){var t,r;const{viewState:n,modifiedLayout:o,options:i}=this._dependencyData,{chartAnimations:a,direction:l,progressiveRendering:s,freeResize:c,navigation:d}=i;return{isReadonly:!1,setController:t=>{this.saveObject(e,t)},onRendered:()=>{this.onRendered(e)},onInitialRender:()=>{this.onRendered(e)},isParentMaster:!(null==o||!o.qExtendsId),isSnapshot:!!o.snapshotData,...!(null==n||null===(t=n.viewStates)||void 0===t||!t[e])&&{viewState:null==n?void 0:n.viewStates[e]},...!(null==n||null===(r=n.layouts)||void 0===r||!r[e])&&{layout:n.layouts[e]},direction:l,chartAnimations:a,progressiveRendering:s,freeResize:c,navigation:d,disableThemeBorder:!1,fallbackToClient:i.fallbackToClient}}confirmPotentialSelections(e){e&&"selectionsApi"in e&&e.selectionsApi.active&&e.selectionsApi.confirm()}}const qm=({chartObject:e,embed:t,renderHelper:r,direction:n,interactions:o,env:i})=>{const a=A(null),{id:l}=e;k((()=>{if(l&&a.current){const e=r.getObjectOptions(l)||{};e.disableThemeBorder=!0,t.render({id:l,element:a.current,options:e}).then((e=>{r.saveObjectApi(l,e)})).catch((e=>{var t;const n=null===(t=r.getChildLayout(l))||void 0===t||null===(t=t.qInfo)||void 0===t?void 0:t.qType;console.error("Could not render chart with id",l,n,e)}))}}),[l,t,r,n]);const s=_((()=>()=>{if(null!=e&&e.id&&i.anything){const t=null==e?void 0:e.label,{sense:n}=i.anything,o="current",a=r.objectMap.get(e.id);a&&n.propertyPanel.show({model:a.model,parent:o,headerLabel:t,keepCurrentActiveCell:!0})}}),[i,e,r]);return k((()=>{const e=null==a?void 0:a.current;return e&&null!=o&&o.edit&&e.addEventListener("dblclick",s),()=>{null==e||e.removeEventListener("dblclick",s)}}),[a,s,o]),y.createElement("div",{ref:a,style:{position:"relative",height:"100%",width:"100%"},"data-testid":`tab-panel-${e.childRefId}`})};var Km;!function(e){e.TABS_HEIGHT="36px"}(Km||(Km={}));const Xm=({charts:e,handleChangeTab:t,activeTabId:r,element:n,translator:o,accessibility:i,disabled:a})=>{const[l,s]=y.useState(null),c=Boolean(l),d=()=>{s(null)},u=I((e=>{null==e||e.focus()}),[]);return y.createElement(y.Fragment,null,y.createElement(Fc,{onClick:e=>{s(e.currentTarget)},disabled:a,"aria-haspopup":"menu","data-testid":"chartTabMenuDropdownButton",tabIndex:i?0:-1,"aria-label":o.get("Container.Label.Visualizations"),className:gm.TAB_MENU,sx:{m:"2px"}},y.createElement(zm,null)),y.createElement(yu,{anchorEl:l,open:c,onClose:d,elevation:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},MenuListProps:{sx:{py:0}},slotProps:{paper:{sx:{maxHeight:"500px",maxWidth:"500px"}}}},e.map((e=>y.createElement(wu,{className:gm.TAB_MENU_ITEM,ref:r===e.childRefId&&c?u:null,key:`chartTabMenu-${e.childRefId}`,onClick:()=>{(e=>{t(e.childRefId),d(),window.setTimeout((()=>{var e;null===(e=n.getElementsByClassName(gm.ACTIVE_TAB_PANEL))||void 0===e||null===(e=e[0])||void 0===e||e.focus()}),0)})(e)},sx:{...r===e.childRefId?{backgroundColor:"rgba(0, 0, 0, 0.1)"}:{}},"aria-label":e.label,title:e.label},y.createElement(oc,{variant:"inherit",noWrap:!0},e.label))))))},Zm=({label:e,id:t})=>y.createElement(Lc,{className:gm.TAB_LABEL,id:`tab-label-${t}`,sx:{width:"100%",height:"100%",display:"flex",alignItems:"center",overflow:"hidden",flexWrap:"wrap"}},y.createElement("span",{style:{width:"100%",overflowWrap:"break-word",hyphens:"auto",fontWeight:"bold",display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",lineHeight:"normal",overflow:"hidden"}},e)),Jm=({libraryInfo:e,chart:t,iconPosition:r,id:n})=>{let o;switch(r){case"bottom":o={marginTop:"6px"};break;case"top":o={marginBottom:"6px"};break;case"end":o={marginInlineStart:"8px"};break;default:o={marginInlineEnd:"8px"}}o.display="flex",o.alignItems="center",o.height="100%",o.flex="1 0 0";return 0===t.condition?y.createElement($m,{id:`${gm.TABS_ICON}-${n}`,style:o}):e?y.createElement(Nm,{id:`${gm.TABS_ICON}-${n}`,libraryInfo:e,style:o}):null},Qm=({models:e,activeTabId:t,handleChangeTab:r})=>{const{modifiedLayout:n,chartList:o,interactions:i,accessibility:a}=e,l=null==o?void 0:o.getCharts(),s=n.objects.filter((e=>!Gm(e,i))),{orientation:c,tabContainerStyle:d,ScrollButtonComponent:u}=(({orientation:e})=>"left"===e?{orientation:"vertical",tabContainerStyle:{display:"flex",flexDirection:"column",alignItems:"center",maxWidth:"25%",flexShrink:0},ScrollButtonComponent:Dm}:{orientation:"horizontal",tabContainerStyle:{display:"flex",flexDirection:"row",alignItems:"center"},ScrollButtonComponent:Bm})(n),p=!1===i.active&&!i.edit,[h,f]=R(!1),m=I((e=>{if(e){const t=e.getElementsByClassName("MuiTabs-flexContainer")[0];if(t)return void f("vertical"===c?t.scrollHeight>t.offsetHeight:t.scrollWidth>t.offsetWidth)}f(!1)}),[c]);return y.createElement(Lc,{className:gm.TAB_WRAPPER,sx:d,ref:e=>{m(e)}},n.useDropdown&&h&&y.createElement(Xm,{charts:s,handleChangeTab:r,activeTabId:t,accessibility:a,translator:e.translator,element:e.element,disabled:p}),y.createElement(Ju,{value:t,onChange:(e,t)=>{r(t)},ScrollButtonComponent:u,variant:"scrollable",orientation:c,scrollButtons:!!n.useScrollButton&&"auto",TabScrollButtonProps:{...p&&{disabled:!0}},sx:{height:"100%",width:"100%",minHeight:Km.TABS_HEIGHT}},s.map((r=>{var o,i,s,d,u;const h=null===(o=Np(n,r.childRefId))||void 0===o||null===(o=o.qData)||void 0===o?void 0:o.visualization,f=h&&(null==l||null===(i=l[h])||void 0===i?void 0:i.libraryInfo),m=e.styleModel.getTabStyle(r.childRefId),b=0===r.condition||n.showIcons&&f&&!1!==(null==m||null===(s=m.icon)||void 0===s?void 0:s.show),g="vertical"===c?"top":"start",v=e.styleModel.resolveComponentStyle({compPath:"icon.position",defaultValue:g}),x=e.styleModel.resolveComponentStyle({compPath:"label.show"}),E=r.label&&(null!==(d=null==m||null===(u=m.label)||void 0===u?void 0:u.show)&&void 0!==d?d:!1!==x),S=`${n.qInfo.qId}-${r.childRefId}`;return y.createElement(Iu,{className:`${gm.TAB} ${t===r.childRefId?gm.ACTIVE_TAB:""}`,disabled:p,id:`tab-${S}`,value:r.childRefId,title:r.label,label:E?y.createElement(Zm,{label:r.label,id:S}):void 0,icon:b?y.createElement(Jm,{libraryInfo:f,chart:r,iconPosition:v,id:S}):"",iconPosition:v,key:r.childRefId,"data-testid":`container-tab-${r.childRefId}`,sx:{textAlign:"vertical"!==c||n.showIcons?"center":"start",minWidth:"vertical"===c?"100%":void 0,minHeight:Km.TABS_HEIGHT,padding:"6px 16px","&:hover":{paddingBottom:"4px"},"&.Mui-disabled":{opacity:"inherit"}},"aria-label":r.label,"aria-controls":`tab-panel-${S}`,tabIndex:a&&t===r.childRefId?0:-1})}))))},eb=({models:e,renderHelper:t,activeTabId:r,handleChangeTab:n,env:o})=>{const{modifiedLayout:i,embed:a,interactions:l,options:s,styleModel:c,accessibility:d}=e,u=i.objects,p=l.edit||!!u.find((e=>0!==e.condition)),h=i.showTabs&&p,f="left"===i.orientation?"row":"column",m=c.getStyleClasses();return y.createElement(Lc,{sx:{display:"flex",flexDirection:f,height:"100%",width:"100%",direction:s.direction,...m}},h&&y.createElement(Qm,{models:e,activeTabId:r,handleChangeTab:n}),u.map((e=>{const n=`tab-panel-${i.qInfo.qId}-${e.childRefId}`,c=r===e.childRefId&&!Gm(e,l);return y.createElement(Lc,{role:"tabpanel",id:n,key:n,"aria-label":e.label,sx:{height:"100%",width:"100%",padding:"2px",boxSizing:"border-box",direction:"ltr",flex:"1 0 0","&:focus-visible":{boxShadow:"inset 0 0 0 2px #0275D9",borderRadius:"3px",zIndex:1200}},...c?{className:gm.ACTIVE_TAB_PANEL,tabIndex:d?0:-1}:{hidden:!0}},c&&y.createElement(qm,{chartObject:e,renderHelper:t,direction:s.direction,embed:a,interactions:l,env:o}))})))};let tb=function(e){return e.COPY="copy",e.PASTE="paste",e.RESET_COPY_BUFFER="resetCopyBuffer",e}({}),rb=function(e){return e.COPY="copy",e.PASTE="paste-and-replace",e.DUPLICATE="duplicate",e.DELETE="delete",e.CUT="cut",e.EDIT_PROPERTIES="edit",e.ZOOM_IN="zoom-in",e.VISUAL_EXPLORATION="visual-exploration",e.MONITOR_IN_HUB="addto",e.TAKE_SNAP_SHOT="take-snapshot",e.SNAP_SHOT_GROUP="snapshotGroup",e.REORDER_LAYERS_GROUP="reorder-layers-group",e.BRING_TO_FRONT="bring-to-front",e.BRING_FORWARD="bring-forward",e.SEND_TO_BACK="send-to-back",e.SEND_BACKWARDS="send-backwards",e.CONTAINER_HEADER="container-header",e.CHART_HEADER="chart-header",e.ALERT_GROUP="alertGroup",e.ADD_TO_MASTER_ITEMS="add-to-master-items",e.UNLINK_VISUALIZATION="unlink",e.DEVELOPER="object-developer",e.SHOW_DETAILS="object-info",e.EXPLAIN_KEY_DRIVERS_OLD_ID="explainKeyDrivers",e.EXPLAIN_KEY_DRIVERS="key-driver",e.SUBSCRIBE="subscribe",e.NOTES_GROUP="notesGroup",e.DOWNLOAD="download",e.SHARE_IMAGE="share",e}({});const nb=[rb.PASTE,rb.ZOOM_IN,rb.VISUAL_EXPLORATION],ob=[rb.VISUAL_EXPLORATION,rb.ALERT_GROUP,rb.SHOW_DETAILS,rb.EXPLAIN_KEY_DRIVERS,rb.EXPLAIN_KEY_DRIVERS_OLD_ID],ib=[rb.DELETE,rb.CUT,rb.ADD_TO_MASTER_ITEMS,rb.UNLINK_VISUALIZATION],ab=[rb.PASTE],lb=(e,t)=>{const{childRefId:r}=e.model.layout,n=t.objects.find((e=>e.childRefId===r));return{...e,additionalData:{label:null==n?void 0:n.label}}},sb=(e,t,r,n,o)=>{const i=t.getSupportFunction(rb.COPY);if(!i)return void e.deleteItem(rb.COPY);const a=()=>{i(lb(r,n)).catch((()=>{}))},l=e.items.find((e=>e.id===rb.COPY));if(l)l.updateItem({select:a});else if(o){const t=e.items.findIndex((e=>e.id===rb.CUT)),r=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.copy",tid:rb.COPY,id:rb.COPY,icon:"copy",select:a,items:[]},r)}},cb=e=>e.interactions.edit&&!e.modifiedLayout.qExtendsId,db=async(e,t,r,n)=>{const o=t.getBuilder("default");if(!o)return;const i=await o();i.addItem({translation:"contextMenu.containerOptionsHeader",tid:rb.CONTAINER_HEADER,id:rb.CONTAINER_HEADER,bold:!0,items:[]},0);const a=cb(r);i.items.forEach((e=>{(ob.includes(e.id)||!a&&ab.includes(e.id))&&i.deleteItem(e.id)})),a&&await(async(e,t,r)=>{var n;const o=t.getSupportFunction(tb.PASTE),i=await(null==o||null===(n=o())||void 0===n?void 0:n.catch((()=>{})));if(!i||mp.includes(i.template))return void e.deleteItem(rb.PASTE);const a=()=>{r()},l=e.items.find((e=>e.id===rb.PASTE));if(l)l.updateItem({translation:"contextMenu.paste",select:a});else{const t=e.items.findLastIndex((e=>e.id===rb.COPY||e.id===rb.DEVELOPER||e.id===rb.CONTAINER_HEADER)),r=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.paste",tid:rb.PASTE,id:rb.PASTE,icon:"paste",select:a,items:[]},r)}})(i,t,n),e.updateItem({items:i.items}),1===e.items.length&&e.deleteItem(rb.CONTAINER_HEADER)},ub=e=>{const t={[rb.MONITOR_IN_HUB]:!0,[rb.SUBSCRIBE]:!0,[rb.NOTES_GROUP]:!0,[rb.DOWNLOAD]:!0,[rb.SHARE_IMAGE]:!0};e.items.forEach((r=>{t[r.id]?e.deleteItem(r.id):r.items&&ub(r)}))},pb=(e,t,r,n,o,i)=>a=>{const{dataHandler:l,modifiedLayout:s}=n;if(cb(n)){r.isInvalid||(((e,t,r,n)=>{const{model:o,modifiedLayout:i}=r,a=e.items.findLastIndex((e=>e.id===rb.CHART_HEADER||e.id===rb.REORDER_LAYERS_GROUP)),l=a>=0?1+a:void 0;e.addItem({translation:"Object.Container.Props.EditProperties",tid:rb.EDIT_PROPERTIES,id:rb.EDIT_PROPERTIES,icon:rb.EDIT_PROPERTIES,items:[],select:()=>{const{childRefId:e}=t.model.layout,r=i.objects.find((t=>t.childRefId===e)),a=null==r?void 0:r.label,{sense:l}=n.anything,s=o;l.propertyPanel.show({model:t.model,parent:s,headerLabel:a})}},l)})(a,r,n,o),((e,t,r,n,o,i)=>{const a=n.getSupportFunction(rb.COPY);if(!a)return void e.deleteItem(rb.CUT);const l=()=>{o&&a(lb(r,i)).then((async()=>{await(null==o?void 0:o.deleteChildren([t]))})).catch((()=>{}))},s=e.items.find((e=>e.id===rb.CUT));if(s)s.updateItem({select:l});else{const t=e.items.findLastIndex((e=>e.id===rb.ADD_TO_MASTER_ITEMS||e.id===rb.UNLINK_VISUALIZATION||e.id===rb.EDIT_PROPERTIES||e.id===rb.REORDER_LAYERS_GROUP||e.id===rb.DEVELOPER)),r=t>=0?1+t:void 0;e.addItem({translation:"contextMenu.cut",tid:rb.CUT,id:rb.CUT,icon:"cut",select:l,items:[]},r)}})(a,t,r,e,l,s),sb(a,e,r,s,!0),((e,t,r,n,o)=>{const i=t.getSupportFunction(tb.COPY),a=t.getSupportFunction(tb.PASTE);if(!i||!a)return void e.deleteItem(rb.DUPLICATE);const l=()=>{i(lb(r,n)).then((()=>{o()})).catch((()=>{}))},s=e.items.find((e=>e.id===rb.DUPLICATE));if(s)s.updateItem({select:l});else{const t=e.items.findIndex((e=>e.id===rb.COPY)),r=t>=0?1+t:void 0;e.addItem({translation:"Common.Duplicate",tid:rb.DUPLICATE,id:rb.DUPLICATE,icon:rb.DUPLICATE,items:[],select:l},r)}})(a,e,r,s,i)),((e,t,r)=>{const n=()=>{r&&r.deleteChildren([t]).catch((()=>{}))},o=e.items.find((e=>e.id===rb.DELETE));if(o)o.updateItem({select:n});else{const t=e.items.findLastIndex((e=>e.id===rb.DUPLICATE||e.id===rb.ADD_TO_MASTER_ITEMS||e.id===rb.UNLINK_VISUALIZATION||e.id===rb.REORDER_LAYERS_GROUP||e.id===rb.DEVELOPER)),r=t>=0?1+t:void 0;e.addItem({translation:"Common.Delete",tid:rb.DELETE,id:rb.DELETE,icon:"bin",items:[],select:n},r)}})(a,t,l)}else sb(a,e,r,s,!1)},hb=(e,t,r,n)=>{b((async(o,i,a)=>{var l;if(!a)return!1;const s=((e,t)=>()=>{if(!e)return;const r=t.getSupportFunction(tb.PASTE);r&&r().then((async({template:t,init:r,children:n,additionalData:o})=>{const{label:i}=o,a={label:i};r.qExtendsId?await e.addMasterObjectAsChild({initProps:r,children:n,objectInitProps:a}):await e.addVizAsChild({type:t,initProps:r,children:n,objectInitProps:a})})).catch((e=>{e&&t.getSupportFunction(tb.RESET_COPY_BUFFER)}))})(r.dataHandler,a);if(await db(o,a,r,s),ub(o),!(e=>{var t;let r;r="qv-radial-contextmenu"===e.type?null===(t=e.touches[0])||void 0===t?void 0:t.target:e.target;return r&&((e,t)=>{let r=e;for(;r;){var n;if(null!==(n=r.classList)&&void 0!==n&&n.contains(t))return r;r=r.parentNode}return null})(r,gm.ACTIVE_TAB_PANEL)})(i))return!0;const c=null===(l=r.modifiedLayout.objects.find((t=>t.childRefId===e)))||void 0===l?void 0:l.id;if(!c)return!0;const d=t.objectMap.get(c);if(!d)return!0;const u=pb(a,e,d,r,n,s),p=await(async(e,t,r,n)=>{const o=cb(r),i=e.getBuilder("object");if(!i)return;const a=await i(t);return a.addItem({translation:"contextMenu.chartOptionsHeader",tid:rb.CHART_HEADER,id:rb.CHART_HEADER,bold:!0,items:[]},0),n(a),a.items.forEach((e=>{(nb.includes(e.id)||!o&&ib.includes(e.id))&&a.deleteItem(e.id)})),1===a.items.length&&a.deleteItem(rb.CHART_HEADER),a})(a,d,r,u);return!p||(o.items.length>0&&p.addItem({translation:"contextMenu.subMenuContainerOptions",tid:"tabbed-container-menu",id:"tabbed-container-menu",icon:"tabbed-container",items:[...o.items]},p.items.length),o.updateItem({items:p.items}),!0)}))},fb=({element:n,models:o,env:a})=>{const l=((e,n)=>{const[o,i]=r(void 0);return t((()=>{if(0===e.getElementsByClassName(n).length){const t=document.createElement("div");t.className=n,e.appendChild(t);const r=gp(t);i(r)}return()=>{null==o||o.unmount()}}),[e,n,o]),o})(n,"init-component"),{options:s,modifiedLayout:c,interactions:d,model:u}=o,{qChildList:p}=c,h=hp(s.direction),f=(t=>{const{viewState:r}=e(),{snapshotData:n}=t;if(n){var o;const{layouts:e}=n.objectsData;return{layouts:e,viewStates:null===(o=n.viewState)||void 0===o?void 0:o.viewStates}}if(r){const{viewStates:e}=r;return{viewStates:e}}})(c),b=i((()=>Hm(c)),[c]),g={modifiedLayout:c,activeTabId:b,env:a},[v,x]=Sm(g);x(g);const E=i((()=>c.objects.filter((e=>b===e.childRefId))),[b,c.objects]),{renderHelper:S}=(e=>{const{visibleLayoutObjects:n,options:o}=e,[i]=r((()=>new Vm(e))),[,a]=r(o);return i.dependencyData=e,m((async()=>{var e,t;return a((e=>(e!==o&&n.forEach((e=>i.recreateMap.set(e.id,!0))),o))),i.syncObjects(n)?null===(t=i.createTimerForRendering())||void 0===t?void 0:t.promise:null===(e=i.resolver)||void 0===e?void 0:e.promise}),[n,o]),t((()=>()=>{i.destroy()}),[i]),{renderHelper:i}})({modifiedLayout:c,visibleLayoutObjects:E,viewState:f,options:s});hb(b,S,o,a);const[C]=r({current:void 0}),w=i((()=>e=>{(async({model:e,patchList:t})=>{if(null!=e&&e.applyPatches){const r=await e.getEffectiveProperties(),n=[];t.forEach((e=>{const{newValue:t,propertyName:o}=e,i=void 0!==r[o]?"Replace":"Add";t?n.push({qPath:`/${o}`,qOp:i,qValue:t&&JSON.stringify(t)}):"Replace"===i&&n.push({qPath:`/${o}`,qOp:"Remove"})})),n.length>0&&await e.applyPatches(n,!0)}})({model:u,patchList:[{newValue:e,propertyName:"cachedTabId"}]})}),[u]),R=i((()=>({setSelected:e=>{var t;const r=null===(t=v.modifiedLayout.objects.find((t=>t.id===e[0])))||void 0===t?void 0:t.childRefId;r?w(r):C.current=e[0]}})),[w,v,C]);t((()=>{const e=(({chartObjects:e,activeTabId:t})=>{var r;return!Fm(e,t)&&e.length>0?null===(r=e[0])||void 0===r?void 0:r.childRefId:t})({chartObjects:v.modifiedLayout.objects,activeTabId:v.activeTabId});if(e!==v.activeTabId)w(e);else if(C.current){var t;const e=null===(t=v.modifiedLayout.objects.find((e=>e.id===C.current)))||void 0===t?void 0:t.childRefId;e&&w(e)}C.current=void 0}),[null==c?void 0:c.objects.length,v,C,w]),t((()=>{const e=(({chartObjects:e,activeTabId:t,interactions:r})=>{const n=Fm(e,t);if(!n||Gm(n,r)){const r=e.find((e=>0!==e.condition));return(null==r?void 0:r.childRefId)||t}return t})({chartObjects:v.modifiedLayout.objects,activeTabId:v.activeTabId,interactions:d});e!==v.activeTabId&&w(e)}),[d,null==c?void 0:c.objects,v,w]);const k=0===p.qItems.length&&d.edit;return t((()=>{null==l||l.render(y.createElement(ql,{theme:h},k?y.createElement(Um,{Icon:jm,dataHandler:o.dataHandler,modifiedLayout:o.modifiedLayout,translator:o.translator,sharedContainerUtilities:R}):null,!k&&y.createElement(eb,{models:o,renderHelper:S,activeTabId:b,handleChangeTab:w,env:a})))}),[l,o,h,k,S,b,R,w,a]),{renderHelper:S,sharedContainerUtilities:R,activeTabId:b}};var mb={targets:[]};const bb={showTitles:!0,title:"",subtitle:"",footnote:"",disableNavMenu:!0,showDetails:!1,objects:[],qChildListDef:{qData:{visualization:"/visualization",qExtendsId:"/qExtendsId",title:"/title",childRefId:"/childRefId",showCondition:"/showCondition"}},showTabs:!0,useScrollButton:!0,useDropdown:!1,showIcons:!1,components:[],defaultTabId:"",orientation:"top",fontsUsed:[]};!function(e,t){void 0===t&&(t={});var r=t.insertAt;if("undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===r&&n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".init-component {\n height: 100%;\n overflow: hidden;\n}\n");const gb=(e,t)=>{let r=!0;const n=t.objects.reduce(((t,n)=>{const o=n.id;if(0!==n.condition){const i=e.get(o);return i&&(e=>e.supportExport())(i)&&(r=!1,t.objectMap.set(o,i)),t.objects.push(n),t}return t}),{objects:[],objectMap:new Map});return r?{objects:[],objectMap:new Map}:n};function vb(n){const o=new fp({translator:n.translator});return{qae:{properties:bb,data:mb},ext:dm({env:n,propertyHandlerData:o}),component(){const a=Ym(),l=u();i((()=>{!function(e){if(e&&e.get&&e.add){const t="LayoutContainer.EmptyList.AddContent";if(e.get(t)!==t)return;Object.keys(O).forEach((t=>{e.add(O[t])}))}}(l)}),[l]);const{dataHandler:s,model:c,accessibility:d,setAccessibility:p,interactions:h,element:f,modifiedLayout:m}=a,{renderHelper:b,sharedContainerUtilities:v,activeTabId:y}=fb({element:f,models:a,env:n});(({propertyHandlerData:r,element:n,sharedContainerUtilities:o,translator:i,containerId:a,dataHandler:l,renderHelper:s})=>{const c=e();a&&r.sync({containerId:a,element:n,sharedContainerUtilities:o,translator:i,dataHandler:l,renderHelper:s}),t((()=>{r.setMuiTheme(c.direction)}),[c.direction,r]),t((()=>()=>{a&&r.destroy(a)}),[a,r,c.direction])})({containerId:(null==c?void 0:c.id)||"",element:f,sharedContainerUtilities:v,translator:l,dataHandler:s,propertyHandlerData:o,renderHelper:b});const[x,E]=r(!0);(({isContainerActive:e,activeTabId:r,modifiedLayout:n,renderHelper:o})=>{const a={modifiedLayout:n,activeTabId:r,renderHelper:o,isContainerActive:e},[l,s]=Sm(a);s(a);const c=i((()=>()=>{const e=zp(l.modifiedLayout);for(const[t,r]of l.renderHelper.objectMap.entries()){const n=l.isContainerActive&&l.activeTabId===e[t];"setIsActive"in r&&r.setIsActive(n)}}),[l]);t((()=>{l.isContainerActive&&c()}),[o.objectMap,c,l]),t((()=>{c()}),[e,c])})({isContainerActive:x,activeTabId:y,renderHelper:b,modifiedLayout:m}),Em({element:f,accessibility:d,setAccessibility:p,renderHelper:b,interactions:h,env:n,models:a});const{getViewState:S}=fm(b,gb);g((()=>({getViewState:S,getChildrenObjects:()=>(e=>e.map((e=>{if(e.canReceive){const t=e=>"libraryitem"===e.type&&("field"===e.item.type||"measure"===e.item.type||"dimension"===e.item.type);return{...e,canReceive:r=>t(r)&&e.canReceive(r)}}return e})))(b.getChildrenObjects()),updateActiveState(e){E(e)}})),[])}}}export{vb as default};
|