@nebula.js/sn-pivot-table 7.41.0 → 7.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/sn-pivot-table v7.
|
|
2
|
+
* @nebula.js/sn-pivot-table v7.42.0
|
|
3
3
|
* Copyright (c) 2026 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -87,4 +87,4 @@ function Gr(e,t){let n;return n=t?Lr(e).withConfig({displayName:t.label,shouldFo
|
|
|
87
87
|
}
|
|
88
88
|
`),ll.rippleVisible,ml,550,({theme:e})=>e.transitions.easing.easeInOut,ll.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,ll.child,ll.childLeaving,gl,550,({theme:e})=>e.transitions.easing.easeInOut,ll.childPulsate,vl,({theme:e})=>e.transitions.easing.easeInOut),xl=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiTouchRipple"}),{center:r=!1,classes:i={},className:a}=n,s=Te(n,cl),[l,c]=o.useState([]),u=o.useRef(0),d=o.useRef(null);o.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const p=o.useRef(!1),f=aa(),h=o.useRef(null),m=o.useRef(null),g=o.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c(e=>[...e,hi.jsx(yl,{classes:{ripple:Ci(i.ripple,ll.ripple),rippleVisible:Ci(i.rippleVisible,ll.rippleVisible),ripplePulsate:Ci(i.ripplePulsate,ll.ripplePulsate),child:Ci(i.child,ll.child),childLeaving:Ci(i.childLeaving,ll.childLeaving),childPulsate:Ci(i.childPulsate,ll.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)]),u.current+=1,d.current=a},[i]),v=o.useCallback((e={},t={},n=()=>{})=>{const{pulsate:o=!1,center:i=r||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&p.current)return void(p.current=!1);"touchstart"===(null==e?void 0:e.type)&&(p.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===h.current&&(h.current=()=>{g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},f.start(80,()=>{h.current&&(h.current(),h.current=null)})):g({pulsate:o,rippleX:c,rippleY:u,rippleSize:d,cb:n})},[r,g,f]),b=o.useCallback(()=>{v({},{pulsate:!0})},[v]),y=o.useCallback((e,t)=>{if(f.clear(),"touchend"===(null==e?void 0:e.type)&&h.current)return h.current(),h.current=null,void f.start(0,()=>{y(e,t)});h.current=null,c(e=>e.length>0?e.slice(1):e),d.current=t},[f]);return o.useImperativeHandle(t,()=>({pulsate:b,start:v,stop:y}),[b,v,y]),hi.jsx(bl,qe({className:Ci(ll.root,i.root,a),ref:m},s,{children:hi.jsx(tl,{component:null,exit:!0,children:l})}))});function Sl(e){return Di("MuiButtonBase",e)}const wl=Li("MuiButtonBase",["root","disabled","focusVisible"]),Cl=["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"],El=Ms("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"},[`&.${wl.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Il=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiButtonBase"}),{action:r,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:p=!1,LinkComponent:f="a",onBlur:h,onClick:m,onContextMenu:g,onDragLeave:v,onFocus:b,onFocusVisible:y,onKeyDown:x,onKeyUp:S,onMouseDown:w,onMouseLeave:C,onMouseUp:E,onTouchEnd:I,onTouchMove:D,onTouchStart:L,tabIndex:R=0,TouchRippleProps:M,touchRippleRef:A,type:P}=n,q=Te(n,Cl),T=o.useRef(null),k=o.useRef(null),O=na(k,A),{isFocusVisibleRef:N,onFocus:_,onBlur:j,ref:F}=ma(),[z,W]=o.useState(!1);c&&z&&W(!1),o.useImperativeHandle(r,()=>({focusVisible:()=>{W(!0),T.current.focus()}}),[]);const[$,V]=o.useState(!1);o.useEffect(()=>{V(!0)},[]);const H=$&&!u&&!c;function B(e,t,n=d){return ta(r=>{t&&t(r);return!n&&k.current&&k.current[e](r),!0})}o.useEffect(()=>{z&&p&&!u&&$&&k.current.pulsate()},[u,p,z,$]);const G=B("start",w),U=B("stop",g),Y=B("stop",v),K=B("stop",E),X=B("stop",e=>{z&&e.preventDefault(),C&&C(e)}),J=B("start",L),Z=B("stop",I),Q=B("stop",D),ee=B("stop",e=>{j(e),!1===N.current&&W(!1),h&&h(e)},!1),te=ta(e=>{T.current||(T.current=e.currentTarget),_(e),!0===N.current&&(W(!0),y&&y(e)),b&&b(e)}),ne=()=>{const e=T.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=o.useRef(!1),oe=ta(e=>{p&&!re.current&&z&&k.current&&" "===e.key&&(re.current=!0,k.current.stop(e,()=>{k.current.start(e)})),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),m&&m(e))}),ie=ta(e=>{p&&" "===e.key&&k.current&&z&&!e.defaultPrevented&&(re.current=!1,k.current.stop(e,()=>{k.current.pulsate(e)})),S&&S(e),m&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&m(e)});let ae=l;"button"===ae&&(q.href||q.to)&&(ae=f);const se={};"button"===ae?(se.type=void 0===P?"button":P,se.disabled=c):(q.href||q.to||(se.role="button"),c&&(se["aria-disabled"]=c));const le=na(t,F,T),ce=qe({},n,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:p,tabIndex:R,focusVisible:z}),ue=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=va({root:["root",t&&"disabled",n&&"focusVisible"]},Sl,o);return n&&r&&(i.root+=` ${r}`),i})(ce);return hi.jsxs(El,qe({as:ae,className:Ci(ue.root,s),ownerState:ce,onBlur:ee,onClick:m,onContextMenu:U,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:G,onMouseLeave:X,onMouseUp:K,onDragLeave:Y,onTouchEnd:Z,onTouchMove:Q,onTouchStart:J,ref:le,tabIndex:c?-1:R,type:P},se,q,{children:[a,H?hi.jsx(xl,qe({ref:O,center:i},M)):null]}))});function Dl(e){return Di("MuiTypography",e)}Li("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Ll=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Rl=Ms("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t[`align${lo(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>qe({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})),Ml={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},Al={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},Pl=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiTypography"}),r=(e=>Al[e]||e)(n.color),o=bi(qe({},n,{color:r})),{align:i="inherit",className:a,component:s,gutterBottom:l=!1,noWrap:c=!1,paragraph:u=!1,variant:d="body1",variantMapping:p=Ml}=o,f=Te(o,Ll),h=qe({},o,{align:i,color:r,className:a,component:s,gutterBottom:l,noWrap:c,paragraph:u,variant:d,variantMapping:p}),m=s||(u?"p":p[d]||Ml[d])||"span",g=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e;return va({root:["root",i,"inherit"!==e.align&&`align${lo(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]},Dl,a)})(h);return hi.jsx(Rl,qe({as:m,ref:t,ownerState:h,className:Ci(g.root,a)},f))});const ql=o.forwardRef(function(e,t){const{children:n,container:r,disablePortal:i=!1}=e,[a,s]=o.useState(null),l=na(o.isValidElement(n)?Ca(n):null,t);if(Wi(()=>{i||s(function(e){return"function"==typeof e?e():e}(r)||document.body)},[r,i]),Wi(()=>{if(a&&!i)return Xi(t,a),()=>{Xi(t,null)}},[t,a,i]),i){if(o.isValidElement(n)){const e={ref:l};return o.cloneElement(n,e)}return hi.jsx(o.Fragment,{children:n})}return hi.jsx(o.Fragment,{children:a?I.createPortal(n,a):a})}),Tl=["onChange","maxRows","minRows","style","value"];function kl(e){return parseInt(e,10)||0}const Ol={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function Nl(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const _l=o.forwardRef(function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:a,value:s}=e,l=Te(e,Tl),{current:c}=o.useRef(null!=s),u=o.useRef(null),d=na(t,u),p=o.useRef(null),f=o.useRef(null),h=o.useCallback(()=>{const t=u.current,n=f.current;if(!t||!n)return;const o=Ki(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const a=o.boxSizing,s=kl(o.paddingBottom)+kl(o.paddingTop),l=kl(o.borderBottomWidth)+kl(o.borderTopWidth),c=n.scrollHeight;n.value="x";const d=n.scrollHeight;let p=c;i&&(p=Math.max(Number(i)*d,p)),r&&(p=Math.min(Number(r)*d,p)),p=Math.max(p,d);return{outerHeightStyle:p+("border-box"===a?s+l:0),overflowing:Math.abs(p-c)<=1}},[r,i,e.placeholder]),m=ta(()=>{const e=u.current,t=h();if(!e||!t||Nl(t))return!1;const n=t.outerHeightStyle;return null!=p.current&&p.current!==n}),g=o.useCallback(()=>{const e=u.current,t=h();if(!e||!t||Nl(t))return;const n=t.outerHeightStyle;p.current!==n&&(p.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""},[h]),v=o.useRef(-1);Wi(()=>{const e=Ui(g),t=null==u?void 0:u.current;if(!t)return;const n=Ki(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver(()=>{m()&&(r.unobserve(t),cancelAnimationFrame(v.current),g(),v.current=requestAnimationFrame(()=>{r.observe(t)}))}),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(v.current),n.removeEventListener("resize",e),r&&r.disconnect()}},[h,g,m]),Wi(()=>{g()});return hi.jsxs(o.Fragment,{children:[hi.jsx("textarea",qe({value:s,onChange:e=>{c||g(),n&&n(e)},ref:d,rows:i,style:a},l)),hi.jsx("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:f,tabIndex:-1,style:qe({},Ol,a,{paddingTop:0,paddingBottom:0})})]})});function jl({props:e,states:t,muiFormControl:n}){return t.reduce((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t),{})}const Fl=o.createContext(void 0);function zl(){return o.useContext(Fl)}function Wl(e){return hi.jsx(gi,qe({},e,{defaultTheme:ps,themeId:Pe}))}function $l(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function Vl(e,t=!1){return e&&($l(e.value)&&""!==e.value||t&&$l(e.defaultValue)&&""!==e.defaultValue)}function Hl(e){return Di("MuiInputBase",e)}const Bl=Li("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),Gl=["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"],Ul=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${lo(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},Yl=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Kl=Ms("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Ul})(({theme:e,ownerState:t})=>qe({},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",[`&.${Bl.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"}},t.multiline&&qe({padding:"4px 0 5px"},"small"===t.size&&{paddingTop:1}),t.fullWidth&&{width:"100%"})),Xl=Ms("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Yl})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode,r=qe({color:"currentColor"},e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:n?.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:n?.42:.5};return qe({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":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Bl.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},[`&.${Bl.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"})}),Jl=hi.jsx(Wl,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Zl=o.forwardRef(function(e,t){var n;const r=Ts({props:e,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:a,autoFocus:s,className:l,components:c={},componentsProps:u={},defaultValue:d,disabled:p,disableInjectingGlobalStyles:f,endAdornment:h,fullWidth:m=!1,id:g,inputComponent:v="input",inputProps:b={},inputRef:y,maxRows:x,minRows:S,multiline:w=!1,name:C,onBlur:E,onChange:I,onClick:D,onFocus:L,onKeyDown:R,onKeyUp:M,placeholder:A,readOnly:P,renderSuffix:q,rows:T,slotProps:k={},slots:O={},startAdornment:N,type:_="text",value:j}=r,F=Te(r,Gl),z=null!=b.value?b.value:j,{current:W}=o.useRef(null!=z),$=o.useRef(),V=o.useCallback(e=>{},[]),H=na($,y,b.ref,V),[B,G]=o.useState(!1),U=zl(),Y=jl({props:r,muiFormControl:U,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Y.focused=U?U.focused:B,o.useEffect(()=>{!U&&p&&B&&(G(!1),E&&E())},[U,p,B,E]);const K=U&&U.onFilled,X=U&&U.onEmpty,J=o.useCallback(e=>{Vl(e)?K&&K():X&&X()},[K,X]);Wi(()=>{W&&J({value:z})},[z,J,W]);o.useEffect(()=>{J($.current)},[]);let Z=v,Q=b;w&&"input"===Z&&(Q=qe(T?{type:void 0,minRows:T,maxRows:T}:{type:void 0,maxRows:x,minRows:S},Q),Z=_l);o.useEffect(()=>{U&&U.setAdornedStart(Boolean(N))},[U,N]);const ee=qe({},r,{color:Y.color||"primary",disabled:Y.disabled,endAdornment:h,error:Y.error,focused:Y.focused,formControl:U,fullWidth:m,hiddenLabel:Y.hiddenLabel,multiline:w,size:Y.size,startAdornment:N,type:_}),te=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:p,startAdornment:f,type:h}=e;return va({root:["root",`color${lo(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",p&&"medium"!==p&&`size${lo(p)}`,u&&"multiline",f&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===h&&"inputTypeSearch",u&&"inputMultiline","small"===p&&"inputSizeSmall",c&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]},Hl,t)})(ee),ne=O.root||c.Root||Kl,re=k.root||u.root||{},oe=O.input||c.Input||Xl;return Q=qe({},Q,null!=(n=k.input)?n:u.input),hi.jsxs(o.Fragment,{children:[!f&&Jl,hi.jsxs(ne,qe({},re,!ba(ne)&&{ownerState:qe({},ee,re.ownerState)},{ref:t,onClick:e=>{$.current&&e.currentTarget===e.target&&$.current.focus(),D&&D(e)}},F,{className:Ci(te.root,re.className,l,P&&"MuiInputBase-readOnly"),children:[N,hi.jsx(Fl.Provider,{value:null,children:hi.jsx(oe,qe({ownerState:ee,"aria-invalid":Y.error,"aria-describedby":i,autoComplete:a,autoFocus:s,defaultValue:d,disabled:Y.disabled,id:g,onAnimationStart:e=>{J("mui-auto-fill-cancel"===e.animationName?$.current:{value:"x"})},name:C,placeholder:A,readOnly:P,required:Y.required,rows:T,value:z,onKeyDown:R,onKeyUp:M,type:_},Q,!ba(oe)&&{as:Z,ownerState:qe({},ee,Q.ownerState)},{ref:H,className:Ci(te.input,Q.className,P&&"MuiInputBase-readOnly"),onBlur:e=>{E&&E(e),b.onBlur&&b.onBlur(e),U&&U.onBlur?U.onBlur(e):G(!1)},onChange:(e,...t)=>{if(!W){const t=e.target||$.current;if(null==t)throw new Error(Me(1));J({value:t.value})}b.onChange&&b.onChange(e,...t),I&&I(e,...t)},onFocus:e=>{Y.disabled?e.stopPropagation():(L&&L(e),b.onFocus&&b.onFocus(e),U&&U.onFocus?U.onFocus(e):G(!0))}}))}),h,q?q(qe({},Y,{startAdornment:N})):null]}))]})});function Ql(e){return Di("MuiInput",e)}const ec=qe({},Bl,Li("MuiInput",["root","underline","input"]));function tc(e){return Di("MuiOutlinedInput",e)}const nc=qe({},Bl,Li("MuiOutlinedInput",["root","notchedOutline","input"]));function rc(e){return Di("MuiFilledInput",e)}const oc=qe({},Bl,Li("MuiFilledInput",["root","underline","input"]));var ic=js(hi.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");const ac=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],sc={entering:{opacity:1},entered:{opacity:1}},lc=o.forwardRef(function(e,t){const n=fs(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:p,onExit:f,onExited:h,onExiting:m,style:g,timeout:v=r,TransitionComponent:b=Ys}=e,y=Te(e,ac),x=o.useRef(null),S=na(x,Ca(s),t),w=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},C=w(p),E=w((e,t)=>{nl(e);const r=rl({style:g,timeout:v,easing:l},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),u&&u(e,t)}),I=w(d),D=w(m),L=w(e=>{const t=rl({style:g,timeout:v,easing:l},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),f&&f(e)}),R=w(h);return hi.jsx(b,qe({appear:a,in:c,nodeRef:x,onEnter:E,onEntered:I,onEntering:C,onExit:L,onExited:R,onExiting:D,addEndListener:e=>{i&&i(x.current,e)},timeout:v},y,{children:(e,t)=>o.cloneElement(s,qe({style:qe({opacity:0,visibility:"exited"!==e||c?void 0:"hidden"},sc[e],g,s.props.style),ref:S},t))}))});function cc(e){return Di("MuiBackdrop",e)}Li("MuiBackdrop",["root","invisible"]);const uc=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],dc=Ms("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>qe({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"})),pc=o.forwardRef(function(e,t){var n,r,o;const i=Ts({props:e,name:"MuiBackdrop"}),{children:a,className:s,component:l="div",components:c={},componentsProps:u={},invisible:d=!1,open:p,slotProps:f={},slots:h={},TransitionComponent:m=lc,transitionDuration:g}=i,v=Te(i,uc),b=qe({},i,{component:l,invisible:d}),y=(e=>{const{classes:t,invisible:n}=e;return va({root:["root",n&&"invisible"]},cc,t)})(b),x=null!=(n=f.root)?n:u.root;return hi.jsx(m,qe({in:p,timeout:g},v,{children:hi.jsx(dc,qe({"aria-hidden":!0},x,{as:null!=(r=null!=(o=h.root)?o:c.Root)?r:l,className:Ci(y.root,s,null==x?void 0:x.className),ownerState:qe({},b,null==x?void 0:x.ownerState),classes:y,ref:t,children:a}))}))}),fc=Li("MuiBox",["root"]),hc=ds(),mc=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:i}=e,a=Gr("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(ni);return o.forwardRef(function(e,o){const s=ci(n),l=bi(e),{className:c,component:u="div"}=l,d=Te(l,Ei);return hi.jsx(a,qe({as:u,ref:o,className:Ci(c,i?i(r):r),theme:t&&s[t]||s},d))})}({themeId:Pe,defaultTheme:hc,defaultClassName:fc.root,generateClassName:Si.generate});function gc(e){return Di("MuiButton",e)}const vc=Li("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"]),bc=o.createContext({}),yc=o.createContext(void 0),xc=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Sc=e=>qe({},"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}}),wc=Ms(Il,{shouldForwardProp:e=>Rs(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${lo(n.color)}`],t[`size${lo(n.size)}`],t[`${n.variant}Size${lo(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;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 qe({},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":qe({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha(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})`:Ba.alpha(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})`:Ba.alpha(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":qe({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${vc.focusVisible}`]:qe({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${vc.disabled}`]:qe({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 ${Ba.alpha(e.palette[t.color].main,.5)}`},"contained"===t.variant&&{color:e.vars?e.vars.palette.text.primary:null==(n=(r=e.palette).getContrastText)?void 0:n.call(r,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"},[`&.${vc.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${vc.disabled}`]:{boxShadow:"none"}}),Cc=Ms("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${lo(n.size)}`]]}})(({ownerState:e})=>qe({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},Sc(e))),Ec=Ms("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${lo(n.size)}`]]}})(({ownerState:e})=>qe({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},Sc(e))),Ic=o.forwardRef(function(e,t){const n=o.useContext(bc),r=o.useContext(yc),i=Ts({props:zi(n,e),name:"MuiButton"}),{children:a,color:s="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:p=!1,endIcon:f,focusVisibleClassName:h,fullWidth:m=!1,size:g="medium",startIcon:v,type:b,variant:y="text"}=i,x=Te(i,xc),S=qe({},i,{color:s,component:l,disabled:u,disableElevation:d,disableFocusRipple:p,fullWidth:m,size:g,type:b,variant:y}),w=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e;return qe({},a,va({root:["root",i,`${i}${lo(t)}`,`size${lo(o)}`,`${i}Size${lo(o)}`,`color${lo(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${lo(o)}`],endIcon:["icon","endIcon",`iconSize${lo(o)}`]},gc,a))})(S),C=v&&hi.jsx(Cc,{className:w.startIcon,ownerState:S,children:v}),E=f&&hi.jsx(Ec,{className:w.endIcon,ownerState:S,children:f}),I=r||"";return hi.jsxs(wc,qe({ownerState:S,className:Ci(n.className,w.root,c,I),component:l,disabled:u,focusRipple:!p,focusVisibleClassName:Ci(w.focusVisible,h),ref:t,type:b},x,{classes:w,children:[C,a,E]}))});function Dc(e){return Di("PrivateSwitchBase",e)}Li("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const Lc=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],Rc=Ms(Il,{name:"MuiSwitchBase"})(({ownerState:e})=>qe({padding:9,borderRadius:"50%"},"start"===e.edge&&{marginLeft:"small"===e.size?-3:-12},"end"===e.edge&&{marginRight:"small"===e.size?-3:-12})),Mc=Ms("input",{name:"MuiSwitchBase",shouldForwardProp:Rs})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),Ac=o.forwardRef(function(e,t){const{autoFocus:n,checked:r,checkedIcon:o,className:i,defaultChecked:a,disabled:s,disableFocusRipple:l=!1,edge:c=!1,icon:u,id:d,inputProps:p,inputRef:f,name:h,onBlur:m,onChange:g,onFocus:v,readOnly:b,required:y=!1,tabIndex:x,type:S,value:w}=e,C=Te(e,Lc),[E,I]=ea({controlled:r,default:Boolean(a),name:"SwitchBase",state:"checked"}),D=zl();let L=s;D&&void 0===L&&(L=D.disabled);const R="checkbox"===S||"radio"===S,M=qe({},e,{checked:E,disabled:L,disableFocusRipple:l,edge:c}),A=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e;return va({root:["root",n&&"checked",r&&"disabled",o&&`edge${lo(o)}`],input:["input"]},Dc,t)})(M);return hi.jsxs(Rc,qe({component:"span",className:Ci(A.root,i),centerRipple:!0,focusRipple:!l,disabled:L,tabIndex:null,role:void 0,onFocus:e=>{v&&v(e),D&&D.onFocus&&D.onFocus(e)},onBlur:e=>{m&&m(e),D&&D.onBlur&&D.onBlur(e)},ownerState:M,ref:t},C,{children:[hi.jsx(Mc,qe({autoFocus:n,checked:r,defaultChecked:a,className:A.input,disabled:L,id:R?d:void 0,name:h,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;I(t),g&&g(e,t)},readOnly:b,ref:f,required:y,ownerState:M,tabIndex:x,type:S},"checkbox"===S&&void 0===w?{}:{value:w},p)),E?o:u]}))});var Pc=js(hi.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),qc=js(hi.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Tc=js(hi.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function kc(e){return Di("MuiCheckbox",e)}const Oc=Li("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),Nc=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],_c=Ms(Ac,{shouldForwardProp:e=>Rs(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${lo(n.size)}`],"default"!==n.color&&t[`color${lo(n.color)}`]]}})(({theme:e,ownerState:t})=>qe({color:(e.vars||e).palette.text.secondary},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${"default"===t.color?e.vars.palette.action.activeChannel:e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:Ba.alpha("default"===t.color?e.palette.action.active:e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==t.color&&{[`&.${Oc.checked}, &.${Oc.indeterminate}`]:{color:(e.vars||e).palette[t.color].main},[`&.${Oc.disabled}`]:{color:(e.vars||e).palette.action.disabled}})),jc=hi.jsx(qc,{}),Fc=hi.jsx(Pc,{}),zc=hi.jsx(Tc,{}),Wc=o.forwardRef(function(e,t){var n,r;const i=Ts({props:e,name:"MuiCheckbox"}),{checkedIcon:a=jc,color:s="primary",icon:l=Fc,indeterminate:c=!1,indeterminateIcon:u=zc,inputProps:d,size:p="medium",className:f}=i,h=Te(i,Nc),m=c?u:l,g=c?u:a,v=qe({},i,{color:s,indeterminate:c,size:p}),b=(e=>{const{classes:t,indeterminate:n,color:r,size:o}=e;return qe({},t,va({root:["root",n&&"indeterminate",`color${lo(r)}`,`size${lo(o)}`]},kc,t))})(v);return hi.jsx(_c,qe({type:"checkbox",inputProps:qe({"data-indeterminate":c},d),icon:o.cloneElement(m,{fontSize:null!=(n=m.props.fontSize)?n:p}),checkedIcon:o.cloneElement(g,{fontSize:null!=(r=g.props.fontSize)?r:p}),ownerState:v,ref:t,className:Ci(b.root,f)},h,{classes:b}))});function $c(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Vc(e){return parseInt(Ki(e).getComputedStyle(e).paddingRight,10)||0}function Hc(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&$c(e,o)})}function Bc(e,t){let n=-1;return e.some((e,r)=>!!t(e)&&(n=r,!0)),n}function Gc(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=Yi(e);return t.body===e?Ki(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=ga(Yi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Vc(r)+e}px`;const t=Yi(r).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${Vc(t)+e}px`})}let e;if(r.parentNode instanceof DocumentFragment)e=Yi(r).body;else{const t=r.parentElement,n=Ki(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.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()=>{n.forEach(({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)})}}const Uc=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Yc(e){const t=[],n=[];return Array.from(e.querySelectorAll(Uc)).forEach((e,r)=>{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 n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))}),n.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:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:a=Yc,isEnabled:s=Kc,open:l}=e,c=o.useRef(!1),u=o.useRef(null),d=o.useRef(null),p=o.useRef(null),f=o.useRef(null),h=o.useRef(!1),m=o.useRef(null),g=na(Ca(t),m),v=o.useRef(null);o.useEffect(()=>{l&&m.current&&(h.current=!n)},[n,l]),o.useEffect(()=>{if(!l||!m.current)return;const e=Yi(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{i||(p.current&&p.current.focus&&(c.current=!0,p.current.focus()),p.current=null)}},[l]),o.useEffect(()=>{if(!l||!m.current)return;const e=Yi(m.current),t=t=>{v.current=t,!r&&s()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!s()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==f.current)f.current=null;else if(null!==f.current)return;if(!h.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=a(m.current)),n.length>0){var o,i;const e=Boolean((null==(o=v.current)?void 0:o.shiftKey)&&"Tab"===(null==(i=v.current)?void 0:i.key)),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval(()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()},50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}},[n,r,i,s,l,a]);const b=e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0};return hi.jsxs(o.Fragment,{children:[hi.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),o.cloneElement(t,{ref:g,onFocus:e=>{null===p.current&&(p.current=e.relatedTarget),h.current=!0,f.current=e.target;const n=t.props.onFocus;n&&n(e)}}),hi.jsx("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}const Jc=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&$c(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}(t);Hc(t,e.mount,e.modalRef,r,!0);const o=Bc(this.containers,e=>e.container===t);return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=Bc(this.containers,t=>-1!==t.modals.indexOf(e)),r=this.containers[n];r.restore||(r.restore=Gc(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=Bc(this.containers,t=>-1!==t.modals.indexOf(e)),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&$c(e.modalRef,t),Hc(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&$c(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Zc(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=Jc,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:l,children:c,onClose:u,open:d,rootRef:p}=e,f=o.useRef({}),h=o.useRef(null),m=o.useRef(null),g=na(m,p),[v,b]=o.useState(!d),y=function(e){return!!e&&e.props.hasOwnProperty("in")}(c);let x=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(x=!1);const S=()=>(f.current.modalRef=m.current,f.current.mount=h.current,f.current),w=()=>{i.mount(S(),{disableScrollLock:r}),m.current&&(m.current.scrollTop=0)},C=ta(()=>{const e=function(e){return"function"==typeof e?e():e}(t)||Yi(h.current).body;i.add(S(),e),m.current&&w()}),E=o.useCallback(()=>i.isTopModal(S()),[i]),I=ta(e=>{h.current=e,e&&(d&&E()?w():m.current&&$c(m.current,x))}),D=o.useCallback(()=>{i.remove(S(),x)},[x,i]);o.useEffect(()=>()=>{D()},[D]),o.useEffect(()=>{d?C():y&&a||D()},[d,D,y,a,C]);const L=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&E()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},R=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=ya(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r=qe({},n,t);return qe({role:"presentation"},r,{onKeyDown:L(r),ref:g})},getBackdropProps:(e={})=>qe({"aria-hidden":!0},e,{onClick:R(e),open:d}),getTransitionProps:()=>({onEnter:Gi(()=>{b(!1),s&&s()},null==c?void 0:c.props.onEnter),onExited:Gi(()=>{b(!0),l&&l(),a&&D()},null==c?void 0:c.props.onExited)}),rootRef:g,portalRef:I,isTopModal:E,exited:v,hasTransition:y}}function Qc(e){return Di("MuiModal",e)}Li("MuiModal",["root","hidden","backdrop"]);const eu=["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"],tu=Ms("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>qe({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),nu=Ms(pc,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),ru=o.forwardRef(function(e,t){var n,r,i,a,s,l;const c=Ts({name:"MuiModal",props:e}),{BackdropComponent:u=nu,BackdropProps:d,className:p,closeAfterTransition:f=!1,children:h,container:m,component:g,components:v={},componentsProps:b={},disableAutoFocus:y=!1,disableEnforceFocus:x=!1,disableEscapeKeyDown:S=!1,disablePortal:w=!1,disableRestoreFocus:C=!1,disableScrollLock:E=!1,hideBackdrop:I=!1,keepMounted:D=!1,onBackdropClick:L,open:R,slotProps:M,slots:A}=c,P=Te(c,eu),q=qe({},c,{closeAfterTransition:f,disableAutoFocus:y,disableEnforceFocus:x,disableEscapeKeyDown:S,disablePortal:w,disableRestoreFocus:C,disableScrollLock:E,hideBackdrop:I,keepMounted:D}),{getRootProps:T,getBackdropProps:k,getTransitionProps:O,portalRef:N,isTopModal:_,exited:j,hasTransition:F}=Zc(qe({},q,{rootRef:t})),z=qe({},q,{exited:j}),W=(e=>{const{open:t,exited:n,classes:r}=e;return va({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},Qc,r)})(z),$={};if(void 0===h.props.tabIndex&&($.tabIndex="-1"),F){const{onEnter:e,onExited:t}=O();$.onEnter=e,$.onExited=t}const V=null!=(n=null!=(r=null==A?void 0:A.root)?r:v.Root)?n:tu,H=null!=(i=null!=(a=null==A?void 0:A.backdrop)?a:v.Backdrop)?i:u,B=null!=(s=null==M?void 0:M.root)?s:b.root,G=null!=(l=null==M?void 0:M.backdrop)?l:b.backdrop,U=wa({elementType:V,externalSlotProps:B,externalForwardedProps:P,getSlotProps:T,additionalProps:{ref:t,as:g},ownerState:z,className:Ci(p,null==B?void 0:B.className,null==W?void 0:W.root,!z.open&&z.exited&&(null==W?void 0:W.hidden))}),Y=wa({elementType:H,externalSlotProps:G,additionalProps:d,getSlotProps:e=>k(qe({},e,{onClick:t=>{L&&L(t),null!=e&&e.onClick&&e.onClick(t)}})),className:Ci(null==G?void 0:G.className,null==d?void 0:d.className,null==W?void 0:W.backdrop),ownerState:z});return D||R||F&&!j?hi.jsx(ql,{ref:N,container:m,disablePortal:w,children:hi.jsxs(V,qe({},U,{children:[!I&&u?hi.jsx(H,qe({},Y)):null,hi.jsx(Xc,{disableEnforceFocus:x,disableAutoFocus:y,disableRestoreFocus:C,isEnabled:_,open:R,children:o.cloneElement(h,$)})]}))}):null});function ou(e){return Di("MuiDivider",e)}const iu=Li("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),au=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],su=Ms("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,"vertical"===n.orientation&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&"vertical"===n.orientation&&t.withChildrenVertical,"right"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignRight,"left"===n.textAlign&&"vertical"!==n.orientation&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>qe({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)`:Ba.alpha(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})=>qe({},e.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}),({theme:e,ownerState:t})=>qe({},t.children&&"vertical"!==t.orientation&&{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}),({theme:e,ownerState:t})=>qe({},t.children&&"vertical"===t.orientation&&{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}),({ownerState:e})=>qe({},"right"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},"left"===e.textAlign&&"vertical"!==e.orientation&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),lu=Ms("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,"vertical"===n.orientation&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>qe({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)`})),cu=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiDivider"}),{absolute:r=!1,children:o,className:i,component:a=(o?"div":"hr"),flexItem:s=!1,light:l=!1,orientation:c="horizontal",role:u=("hr"!==a?"separator":void 0),textAlign:d="center",variant:p="fullWidth"}=n,f=Te(n,au),h=qe({},n,{absolute:r,component:a,flexItem:s,light:l,orientation:c,role:u,textAlign:d,variant:p}),m=(e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return va({root:["root",t&&"absolute",l,i&&"light","vertical"===a&&"vertical",o&&"flexItem",n&&"withChildren",n&&"vertical"===a&&"withChildrenVertical","right"===s&&"vertical"!==a&&"textAlignRight","left"===s&&"vertical"!==a&&"textAlignLeft"],wrapper:["wrapper","vertical"===a&&"wrapperVertical"]},ou,r)})(h);return hi.jsx(su,qe({as:a,className:Ci(m.root,i),role:u,ref:t,ownerState:h},f,{children:o?hi.jsx(lu,{className:m.wrapper,ownerState:h,children:o}):null}))});cu.muiSkipListHighlight=!0;const uu=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],du=Ms(Kl,{shouldForwardProp:e=>Rs(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Ul(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{var n;const r="light"===e.palette.mode,o=r?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",i=r?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=r?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=r?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return qe({position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i}},[`&.${oc.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:i},[`&.${oc.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${null==(n=(e.vars||e).palette[t.color||"primary"])?void 0:n.main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${oc.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${oc.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:o}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${oc.disabled}, .${oc.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${oc.disabled}:before`]:{borderBottomStyle:"dotted"}},t.startAdornment&&{paddingLeft:12},t.endAdornment&&{paddingRight:12},t.multiline&&qe({padding:"25px 12px 8px"},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9}))}),pu=Ms(Xl,{name:"MuiFilledInput",slot:"Input",overridesResolver:Yl})(({theme:e,ownerState:t})=>qe({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{paddingTop:21,paddingBottom:4},t.hiddenLabel&&{paddingTop:16,paddingBottom:17},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0},t.hiddenLabel&&"small"===t.size&&{paddingTop:8,paddingBottom:9},t.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})),fu=o.forwardRef(function(e,t){var n,r,o,i;const a=Ts({props:e,name:"MuiFilledInput"}),{components:s={},componentsProps:l,fullWidth:c=!1,inputComponent:u="input",multiline:d=!1,slotProps:p,slots:f={},type:h="text"}=a,m=Te(a,uu),g=qe({},a,{fullWidth:c,inputComponent:u,multiline:d,type:h}),v=(e=>{const{classes:t,disableUnderline:n}=e;return qe({},t,va({root:["root",!n&&"underline"],input:["input"]},rc,t))})(a),b={root:{ownerState:g},input:{ownerState:g}},y=(null!=p?p:l)?Zr(b,null!=p?p:l):b,x=null!=(n=null!=(r=f.root)?r:s.Root)?n:du,S=null!=(o=null!=(i=f.input)?i:s.Input)?o:pu;return hi.jsx(Zl,qe({slots:{root:x,input:S},componentsProps:y,fullWidth:c,inputComponent:u,multiline:d,ref:t,type:h},m,{classes:v}))});fu.muiName="Input";const hu=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function mu(e){return`scale(${e}, ${e**2})`}const gu={entering:{opacity:1,transform:mu(1)},entered:{opacity:1,transform:"none"}},vu="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),bu=o.forwardRef(function(e,t){const{addEndListener:n,appear:r=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:f,style:h,timeout:m="auto",TransitionComponent:g=Ys}=e,v=Te(e,hu),b=aa(),y=o.useRef(),x=fs(),S=o.useRef(null),w=na(S,Ca(i),t),C=e=>t=>{if(e){const n=S.current;void 0===t?e(n):e(n,t)}},E=C(u),I=C((e,t)=>{nl(e);const{duration:n,delay:r,easing:o}=rl({style:h,timeout:m,easing:a},{mode:"enter"});let i;"auto"===m?(i=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=i):i=n,e.style.transition=[x.transitions.create("opacity",{duration:i,delay:r}),x.transitions.create("transform",{duration:vu?i:.666*i,delay:r,easing:o})].join(","),l&&l(e,t)}),D=C(c),L=C(f),R=C(e=>{const{duration:t,delay:n,easing:r}=rl({style:h,timeout:m,easing:a},{mode:"exit"});let o;"auto"===m?(o=x.transitions.getAutoHeightDuration(e.clientHeight),y.current=o):o=t,e.style.transition=[x.transitions.create("opacity",{duration:o,delay:n}),x.transitions.create("transform",{duration:vu?o:.666*o,delay:vu?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=mu(.75),d&&d(e)}),M=C(p);return hi.jsx(g,qe({appear:r,in:s,nodeRef:S,onEnter:I,onEntered:D,onEntering:E,onExit:R,onExited:M,onExiting:L,addEndListener:e=>{"auto"===m&&b.start(y.current||0,e),n&&n(S.current,e)},timeout:"auto"===m?null:m},v,{children:(e,t)=>o.cloneElement(i,qe({style:qe({opacity:0,transform:mu(.75),visibility:"exited"!==e||s?void 0:"hidden"},gu[e],h,i.props.style),ref:w},t))}))});bu.muiSupportAuto=!0;const yu=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],xu=Ms(Kl,{shouldForwardProp:e=>Rs(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Ul(e,t),!n.disableUnderline&&t.underline]}})(({theme:e,ownerState:t})=>{let n="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),qe({position:"relative"},t.formControl&&{"label + &":{marginTop:16}},!t.disableUnderline&&{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t.color].main}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ec.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ec.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ec.disabled}, .${ec.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${ec.disabled}:before`]:{borderBottomStyle:"dotted"}})}),Su=Ms(Xl,{name:"MuiInput",slot:"Input",overridesResolver:Yl})({}),wu=o.forwardRef(function(e,t){var n,r,o,i;const a=Ts({props:e,name:"MuiInput"}),{disableUnderline:s,components:l={},componentsProps:c,fullWidth:u=!1,inputComponent:d="input",multiline:p=!1,slotProps:f,slots:h={},type:m="text"}=a,g=Te(a,yu),v=(e=>{const{classes:t,disableUnderline:n}=e;return qe({},t,va({root:["root",!n&&"underline"],input:["input"]},Ql,t))})(a),b={root:{ownerState:{disableUnderline:s}}},y=(null!=f?f:c)?Zr(null!=f?f:c,b):b,x=null!=(n=null!=(r=h.root)?r:l.Root)?n:xu,S=null!=(o=null!=(i=h.input)?i:l.Input)?o:Su;return hi.jsx(Zl,qe({slots:{root:x,input:S},slotProps:y,fullWidth:u,inputComponent:d,multiline:p,ref:t,type:m},g,{classes:v}))});function Cu(e){return Di("MuiInputAdornment",e)}wu.muiName="Input";const Eu=Li("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var Iu;const Du=["children","className","component","disablePointerEvents","disableTypography","position","variant"],Lu=Ms("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${lo(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]}})(({theme:e,ownerState:t})=>qe({display:"flex",height:"0.01em",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active},"filled"===t.variant&&{[`&.${Eu.positionStart}&:not(.${Eu.hiddenLabel})`]:{marginTop:16}},"start"===t.position&&{marginRight:8},"end"===t.position&&{marginLeft:8},!0===t.disablePointerEvents&&{pointerEvents:"none"})),Ru=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiInputAdornment"}),{children:r,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u}=n,d=Te(n,Du),p=zl()||{};let f=u;u&&p.variant,p&&!f&&(f=p.variant);const h=qe({},n,{hiddenLabel:p.hiddenLabel,size:p.size,disablePointerEvents:s,position:c,variant:f}),m=(e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e;return va({root:["root",n&&"disablePointerEvents",o&&`position${lo(o)}`,a,r&&"hiddenLabel",i&&`size${lo(i)}`]},Cu,t)})(h);return hi.jsx(Fl.Provider,{value:null,children:hi.jsx(Lu,qe({as:a,ownerState:h,className:Ci(m.root,i),ref:t},d,{children:"string"!=typeof r||l?hi.jsxs(o.Fragment,{children:["start"===c?Iu||(Iu=hi.jsx("span",{className:"notranslate",children:""})):null,r]}):hi.jsx(Pl,{color:"text.secondary",children:r})}))})});function Mu(e){return Di("MuiLink",e)}const Au=Li("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),Pu={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},qu=({theme:e,ownerState:t})=>{const n=(e=>Pu[e]||e)(t.color),r=uo(e,`palette.${n}`,!1)||t.color,o=uo(e,`palette.${n}Channel`);return"vars"in e&&o?`rgba(${o} / 0.4)`:Ba.alpha(r,.4)},Tu=["className","color","component","onBlur","onFocus","TypographyClasses","underline","variant","sx"],ku=Ms(Pl,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${lo(n.underline)}`],"button"===n.component&&t.button]}})(({theme:e,ownerState:t})=>qe({},"none"===t.underline&&{textDecoration:"none"},"hover"===t.underline&&{textDecoration:"none","&:hover":{textDecoration:"underline"}},"always"===t.underline&&qe({textDecoration:"underline"},"inherit"!==t.color&&{textDecorationColor:qu({theme:e,ownerState:t})},{"&:hover":{textDecorationColor:"inherit"}}),"button"===t.component&&{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Au.focusVisible}`]:{outline:"auto"}})),Ou=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiLink"}),{className:r,color:i="primary",component:a="a",onBlur:s,onFocus:l,TypographyClasses:c,underline:u="always",variant:d="inherit",sx:p}=n,f=Te(n,Tu),{isFocusVisibleRef:h,onBlur:m,onFocus:g,ref:v}=ma(),[b,y]=o.useState(!1),x=na(t,v),S=qe({},n,{color:i,component:a,focusVisible:b,underline:u,variant:d}),w=(e=>{const{classes:t,component:n,focusVisible:r,underline:o}=e;return va({root:["root",`underline${lo(o)}`,"button"===n&&"button",r&&"focusVisible"]},Mu,t)})(S);return hi.jsx(ku,qe({color:i,className:Ci(w.root,r),classes:c,component:a,onBlur:e=>{m(e),!1===h.current&&y(!1),s&&s(e)},onFocus:e=>{g(e),!0===h.current&&y(!0),l&&l(e)},ref:x,ownerState:S,variant:d,sx:[...Object.keys(Pu).includes(i)?[]:[{color:i}],...Array.isArray(p)?p:[p]]},f))}),Nu=o.createContext({});function _u(e){return Di("MuiList",e)}Li("MuiList",["root","padding","dense","subheader"]);const ju=["children","className","component","dense","disablePadding","subheader"],Fu=Ms("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>qe({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),zu=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiList"}),{children:r,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c}=n,u=Te(n,ju),d=o.useMemo(()=>({dense:s}),[s]),p=qe({},n,{component:a,dense:s,disablePadding:l}),f=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return va({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},_u,t)})(p);return hi.jsx(Nu.Provider,{value:d,children:hi.jsxs(Fu,qe({as:a,className:Ci(f.root,i),ref:t,ownerState:p},u,{children:[c,r]}))})});function Wu(e){return Di("MuiListItem",e)}const $u=Li("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),Vu=Li("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Hu(e){return Di("MuiListItemSecondaryAction",e)}Li("MuiListItemSecondaryAction",["root","disableGutters"]);const Bu=["className"],Gu=Ms("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>qe({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),Uu=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiListItemSecondaryAction"}),{className:r}=n,i=Te(n,Bu),a=qe({},n,{disableGutters:o.useContext(Nu).disableGutters}),s=(e=>{const{disableGutters:t,classes:n}=e;return va({root:["root",t&&"disableGutters"]},Hu,n)})(a);return hi.jsx(Gu,qe({className:Ci(s.root,r),ownerState:a,ref:t},i))});Uu.muiName="ListItemSecondaryAction";const Yu=["className"],Ku=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Xu=Ms("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})(({theme:e,ownerState:t})=>qe({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&qe({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{[`& > .${Vu.root}`]:{paddingRight:48}},{[`&.${$u.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${$u.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${$u.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${$u.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"}},[`&.${$u.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ba.alpha(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})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Ju=Ms("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),Zu=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiListItem"}),{alignItems:r="center",autoFocus:i=!1,button:a=!1,children:s,className:l,component:c,components:u={},componentsProps:d={},ContainerComponent:p="li",ContainerProps:{className:f}={},dense:h=!1,disabled:m=!1,disableGutters:g=!1,disablePadding:v=!1,divider:b=!1,focusVisibleClassName:y,secondaryAction:x,selected:S=!1,slotProps:w={},slots:C={}}=n,E=Te(n.ContainerProps,Yu),I=Te(n,Ku),D=o.useContext(Nu),L=o.useMemo(()=>({dense:h||D.dense||!1,alignItems:r,disableGutters:g}),[r,D.dense,h,g]),R=o.useRef(null);Wi(()=>{i&&R.current&&R.current.focus()},[i]);const M=o.Children.toArray(s),A=M.length&&(P=M[M.length-1],q=["ListItemSecondaryAction"],o.isValidElement(P)&&-1!==q.indexOf(null!=(T=P.type.muiName)?T:null==(k=P.type)||null==(k=k._payload)||null==(k=k.value)?void 0:k.muiName));var P,q,T,k;const O=qe({},n,{alignItems:r,autoFocus:i,button:a,dense:L.dense,disabled:m,disableGutters:g,disablePadding:v,divider:b,hasSecondaryAction:A,selected:S}),N=(e=>{const{alignItems:t,button:n,classes:r,dense:o,disabled:i,disableGutters:a,disablePadding:s,divider:l,hasSecondaryAction:c,selected:u}=e;return va({root:["root",o&&"dense",!a&&"gutters",!s&&"padding",l&&"divider",i&&"disabled",n&&"button","flex-start"===t&&"alignItemsFlexStart",c&&"secondaryAction",u&&"selected"],container:["container"]},Wu,r)})(O),_=na(R,t),j=C.root||u.Root||Xu,F=w.root||d.root||{},z=qe({className:Ci(N.root,F.className,l),disabled:m},I);let W=c||"li";return a&&(z.component=c||"div",z.focusVisibleClassName=Ci($u.focusVisible,y),W=Il),A?(W=z.component||c?W:"div","li"===p&&("li"===W?W="div":"li"===z.component&&(z.component="div")),hi.jsx(Nu.Provider,{value:L,children:hi.jsxs(Ju,qe({as:p,className:Ci(N.container,f),ref:_,ownerState:O},E,{children:[hi.jsx(j,qe({},F,!ba(j)&&{as:W,ownerState:qe({},O,F.ownerState)},z,{children:M})),M.pop()]}))})):hi.jsx(Nu.Provider,{value:L,children:hi.jsxs(j,qe({},F,{as:W,ref:_},!ba(j)&&{ownerState:qe({},O,F.ownerState)},z,{children:[M,x&&hi.jsx(Uu,{children:x})]}))})});function Qu(e){return Di("MuiListItemIcon",e)}const ed=Li("MuiListItemIcon",["root","alignItemsFlexStart"]),td=["className"],nd=Ms("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>qe({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8})),rd=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiListItemIcon"}),{className:r}=n,i=Te(n,td),a=qe({},n,{alignItems:o.useContext(Nu).alignItems}),s=(e=>{const{alignItems:t,classes:n}=e;return va({root:["root","flex-start"===t&&"alignItemsFlexStart"]},Qu,n)})(a);return hi.jsx(nd,qe({className:Ci(s.root,r),ownerState:a,ref:t},i))}),od=Li("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),id=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function ad(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function sd(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function ld(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function cd(e,t,n,r,o,i){let a=!1,s=o(e,t,!!t&&n);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const t=!r&&(s.disabled||"true"===s.getAttribute("aria-disabled"));if(s.hasAttribute("tabindex")&&ld(s,i)&&!t)return s.focus(),!0;s=o(e,s,n)}return!1}const ud=o.forwardRef(function(e,t){const{actions:n,autoFocus:r=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu"}=e,p=Te(e,id),f=o.useRef(null),h=o.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Wi(()=>{r&&f.current.focus()},[r]),o.useImperativeHandle(n,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!f.current.style.width;if(e.clientHeight<f.current.clientHeight&&n){const n=`${ga(Yi(e))}px`;f.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,f.current.style.width=`calc(100% + ${n})`}return f.current}}),[]);const m=na(f,t);let g=-1;o.Children.forEach(a,(e,t)=>{o.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===g)&&(g=t),g===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(g+=1,g>=a.length&&(g=-1))):g===t&&(g+=1,g>=a.length&&(g=-1))});const v=o.Children.map(a,(e,t)=>{if(t===g){const t={};return i&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),o.cloneElement(e,t)}return e});return hi.jsx(zu,qe({role:"menu",ref:m,className:s,onKeyDown:e=>{const t=f.current,n=e.key,r=Yi(t).activeElement;if("ArrowDown"===n)e.preventDefault(),cd(t,r,c,l,ad);else if("ArrowUp"===n)e.preventDefault(),cd(t,r,c,l,sd);else if("Home"===n)e.preventDefault(),cd(t,null,c,l,ad);else if("End"===n)e.preventDefault(),cd(t,null,c,l,sd);else if(1===n.length){const o=h.current,i=n.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=r&&!o.repeating&&ld(r,o);o.previousKeyMatched&&(s||cd(t,r,!1,l,ad,o))?e.preventDefault():o.previousKeyMatched=!1}u&&u(e)},tabIndex:r?0:-1},p,{children:v}))});function dd(e){return Di("MuiPopover",e)}Li("MuiPopover",["root","paper"]);const pd=["onEntering"],fd=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],hd=["slotProps"];function md(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function gd(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function vd(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function bd(e){return"function"==typeof e?e():e}const yd=Ms(ru,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),xd=Ms(sl,{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}),Sd=o.forwardRef(function(e,t){var n,r,i;const a=Ts({props:e,name:"MuiPopover"}),{action:s,anchorEl:l,anchorOrigin:c={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:d="anchorEl",children:p,className:f,container:h,elevation:m=8,marginThreshold:g=16,open:v,PaperProps:b={},slots:y,slotProps:x,transformOrigin:S={vertical:"top",horizontal:"left"},TransitionComponent:w=bu,transitionDuration:C="auto",TransitionProps:{onEntering:E}={},disableScrollLock:I=!1}=a,D=Te(a.TransitionProps,pd),L=Te(a,fd),R=null!=(n=null==x?void 0:x.paper)?n:b,M=o.useRef(),A=na(M,R.ref),P=qe({},a,{anchorOrigin:c,anchorReference:d,elevation:m,marginThreshold:g,externalPaperSlotProps:R,transformOrigin:S,TransitionComponent:w,transitionDuration:C,TransitionProps:D}),q=(e=>{const{classes:t}=e;return va({root:["root"],paper:["paper"]},dd,t)})(P),T=o.useCallback(()=>{if("anchorPosition"===d)return u;const e=bd(l),t=(e&&1===e.nodeType?e:Yi(M.current).body).getBoundingClientRect();return{top:t.top+md(t,c.vertical),left:t.left+gd(t,c.horizontal)}},[l,c.horizontal,c.vertical,u,d]),k=o.useCallback(e=>({vertical:md(e,S.vertical),horizontal:gd(e,S.horizontal)}),[S.horizontal,S.vertical]),O=o.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=k(t);if("none"===d)return{top:null,left:null,transformOrigin:vd(n)};const r=T();let o=r.top-n.vertical,i=r.left-n.horizontal;const a=o+t.height,s=i+t.width,c=Ki(bd(l)),u=c.innerHeight-g,p=c.innerWidth-g;if(null!==g&&o<g){const e=o-g;o-=e,n.vertical+=e}else if(null!==g&&a>u){const e=a-u;o-=e,n.vertical+=e}if(null!==g&&i<g){const e=i-g;i-=e,n.horizontal+=e}else if(s>p){const e=s-p;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:vd(n)}},[l,d,T,k,g]),[N,_]=o.useState(v),j=o.useCallback(()=>{const e=M.current;if(!e)return;const t=O(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,_(!0)},[O]);o.useEffect(()=>(I&&window.addEventListener("scroll",j),()=>window.removeEventListener("scroll",j)),[l,I,j]);o.useEffect(()=>{v&&j()}),o.useImperativeHandle(s,()=>v?{updatePosition:()=>{j()}}:null,[v,j]),o.useEffect(()=>{if(!v)return;const e=Ui(()=>{j()}),t=Ki(l);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[l,v,j]);let F=C;"auto"!==C||w.muiSupportAuto||(F=void 0);const z=h||(l?Yi(bd(l)).body:void 0),W=null!=(r=null==y?void 0:y.root)?r:yd,$=null!=(i=null==y?void 0:y.paper)?i:xd,V=wa({elementType:$,externalSlotProps:qe({},R,{style:N?R.style:qe({},R.style,{opacity:0})}),additionalProps:{elevation:m,ref:A},ownerState:P,className:Ci(q.paper,null==R?void 0:R.className)}),H=wa({elementType:W,externalSlotProps:(null==x?void 0:x.root)||{},externalForwardedProps:L,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:z,open:v},ownerState:P,className:Ci(q.root,f)}),{slotProps:B}=H,G=Te(H,hd);return hi.jsx(W,qe({},G,!ba(W)&&{slotProps:B,disableScrollLock:I},{children:hi.jsx(w,qe({appear:!0,in:v,onEntering:(e,t)=>{E&&E(e,t),j()},onExited:()=>{_(!1)},timeout:F},D,{children:hi.jsx($,qe({},V,{children:p}))}))}))});function wd(e){return Di("MuiMenu",e)}Li("MuiMenu",["root","paper","list"]);const Cd=["onEntering"],Ed=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Id={vertical:"top",horizontal:"right"},Dd={vertical:"top",horizontal:"left"},Ld=Ms(Sd,{shouldForwardProp:e=>Rs(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Rd=Ms(xd,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Md=Ms(ud,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Ad=o.forwardRef(function(e,t){var n,r;const i=Ts({props:e,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:l,disableAutoFocusItem:c=!1,MenuListProps:u={},onClose:d,open:p,PaperProps:f={},PopoverClasses:h,transitionDuration:m="auto",TransitionProps:{onEntering:g}={},variant:v="selectedMenu",slots:b={},slotProps:y={}}=i,x=Te(i.TransitionProps,Cd),S=Te(i,Ed),w=(()=>{const e=o.useContext(Ma);return null!=e&&e})(),C=qe({},i,{autoFocus:a,disableAutoFocusItem:c,MenuListProps:u,onEntering:g,PaperProps:f,transitionDuration:m,TransitionProps:x,variant:v}),E=(e=>{const{classes:t}=e;return va({root:["root"],paper:["paper"],list:["list"]},wd,t)})(C),I=a&&!c&&p,D=o.useRef(null);let L=-1;o.Children.map(s,(e,t)=>{o.isValidElement(e)&&(e.props.disabled||("selectedMenu"===v&&e.props.selected||-1===L)&&(L=t))});const R=null!=(n=b.paper)?n:Rd,M=null!=(r=y.paper)?r:f,A=wa({elementType:b.root,externalSlotProps:y.root,ownerState:C,className:[E.root,l]}),P=wa({elementType:R,externalSlotProps:M,ownerState:C,className:E.paper});return hi.jsx(Ld,qe({onClose:d,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?Id:Dd,slots:{paper:R,root:b.root},slotProps:{root:A,paper:P},open:p,ref:t,transitionDuration:m,TransitionProps:qe({onEntering:(e,t)=>{D.current&&D.current.adjustStyleForScrollbar(e,{direction:w?"rtl":"ltr"}),g&&g(e,t)}},x),ownerState:C},S,{classes:h,children:hi.jsx(Md,qe({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),d&&d(e,"tabKeyDown"))},actions:D,autoFocus:a&&(-1===L||c),autoFocusItem:I,variant:v},u,{className:Ci(E.list,u.className),children:s}))}))});function Pd(e){return Di("MuiMenuItem",e)}const qd=Li("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Td=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],kd=Ms(Il,{shouldForwardProp:e=>Rs(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>qe({},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"}},[`&.${qd.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${qd.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${qd.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Ba.alpha(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})`:Ba.alpha(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${qd.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${qd.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${iu.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${iu.inset}`]:{marginLeft:52},[`& .${od.root}`]:{marginTop:0,marginBottom:0},[`& .${od.inset}`]:{paddingLeft:36},[`& .${ed.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&qe({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${ed.root} svg`]:{fontSize:"1.25rem"}}))),Od=o.forwardRef(function(e,t){const n=Ts({props:e,name:"MuiMenuItem"}),{autoFocus:r=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:p}=n,f=Te(n,Td),h=o.useContext(Nu),m=o.useMemo(()=>({dense:a||h.dense||!1,disableGutters:l}),[h.dense,a,l]),g=o.useRef(null);Wi(()=>{r&&g.current&&g.current.focus()},[r]);const v=qe({},n,{dense:m.dense,divider:s,disableGutters:l}),b=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e;return qe({},a,va({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},Pd,a))})(n),y=na(g,t);let x;return n.disabled||(x=void 0!==d?d:-1),hi.jsx(Nu.Provider,{value:m,children:hi.jsx(kd,qe({ref:y,role:u,tabIndex:x,component:i,focusVisibleClassName:Ci(b.focusVisible,c),className:Ci(b.root,p)},f,{ownerState:v,classes:b}))})});function Nd(e){return Di("MuiNativeSelect",e)}const _d=Li("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),jd=["className","disabled","error","IconComponent","inputRef","variant"],Fd=({ownerState:e,theme:t})=>qe({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":qe({},t.vars?{backgroundColor:`rgba(${t.vars.palette.common.onBackgroundChannel} / 0.05)`}:{backgroundColor:"light"===t.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},[`&.${_d.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(t.vars||t).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===e.variant&&{"&&&":{paddingRight:32}},"outlined"===e.variant&&{borderRadius:(t.vars||t).shape.borderRadius,"&:focus":{borderRadius:(t.vars||t).shape.borderRadius},"&&&":{paddingRight:32}}),zd=Ms("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Rs,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${_d.multiple}`]:t.multiple}]}})(Fd),Wd=({ownerState:e,theme:t})=>qe({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(t.vars||t).palette.action.active,[`&.${_d.disabled}`]:{color:(t.vars||t).palette.action.disabled}},e.open&&{transform:"rotate(180deg)"},"filled"===e.variant&&{right:7},"outlined"===e.variant&&{right:7}),$d=Ms("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${lo(n.variant)}`],n.open&&t.iconOpen]}})(Wd),Vd=o.forwardRef(function(e,t){const{className:n,disabled:r,error:i,IconComponent:a,inputRef:s,variant:l="standard"}=e,c=Te(e,jd),u=qe({},e,{disabled:r,variant:l,error:i}),d=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return va({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${lo(n)}`,i&&"iconOpen",r&&"disabled"]},Nd,t)})(u);return hi.jsxs(o.Fragment,{children:[hi.jsx(zd,qe({ownerState:u,className:Ci(d.select,n),disabled:r,ref:s||t},c)),e.multiple?null:hi.jsx($d,{as:a,ownerState:u,className:d.icon})]})});var Hd;const Bd=["children","classes","className","label","notched"],Gd=Ms("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Rs})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Ud=Ms("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Rs})(({ownerState:e,theme:t})=>qe({float:"unset",width:"auto",overflow:"hidden"},!e.withLabel&&{padding:0,lineHeight:"11px",transition:t.transitions.create("width",{duration:150,easing:t.transitions.easing.easeOut})},e.withLabel&&qe({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:t.transitions.create("max-width",{duration:50,easing:t.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},e.notched&&{maxWidth:"100%",transition:t.transitions.create("max-width",{duration:100,easing:t.transitions.easing.easeOut,delay:50})})));const Yd=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],Kd=Ms(Kl,{shouldForwardProp:e=>Rs(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:Ul})(({theme:e,ownerState:t})=>{const n="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return qe({position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${nc.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:n}},[`&.${nc.focused} .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette[t.color].main,borderWidth:2},[`&.${nc.error} .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${nc.disabled} .${nc.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}},t.startAdornment&&{paddingLeft:14},t.endAdornment&&{paddingRight:14},t.multiline&&qe({padding:"16.5px 14px"},"small"===t.size&&{padding:"8.5px 14px"}))}),Xd=Ms(function(e){const{className:t,label:n,notched:r}=e,o=Te(e,Bd),i=null!=n&&""!==n,a=qe({},e,{notched:r,withLabel:i});return hi.jsx(Gd,qe({"aria-hidden":!0,className:t,ownerState:a},o,{children:hi.jsx(Ud,{ownerState:a,children:i?hi.jsx("span",{children:n}):Hd||(Hd=hi.jsx("span",{className:"notranslate",children:""}))})}))},{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),Jd=Ms(Xl,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:Yl})(({theme:e,ownerState:t})=>qe({padding:"16.5px 14px"},!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===t.size&&{padding:"8.5px 14px"},t.multiline&&{padding:0},t.startAdornment&&{paddingLeft:0},t.endAdornment&&{paddingRight:0})),Zd=o.forwardRef(function(e,t){var n,r,i,a,s;const l=Ts({props:e,name:"MuiOutlinedInput"}),{components:c={},fullWidth:u=!1,inputComponent:d="input",label:p,multiline:f=!1,notched:h,slots:m={},type:g="text"}=l,v=Te(l,Yd),b=(e=>{const{classes:t}=e;return qe({},t,va({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},tc,t))})(l),y=zl(),x=jl({props:l,muiFormControl:y,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),S=qe({},l,{color:x.color||"primary",disabled:x.disabled,error:x.error,focused:x.focused,formControl:y,fullWidth:u,hiddenLabel:x.hiddenLabel,multiline:f,size:x.size,type:g}),w=null!=(n=null!=(r=m.root)?r:c.Root)?n:Kd,C=null!=(i=null!=(a=m.input)?a:c.Input)?i:Jd;return hi.jsx(Zl,qe({slots:{root:w,input:C},renderSuffix:e=>hi.jsx(Xd,{ownerState:S,className:b.notchedOutline,label:null!=p&&""!==p&&x.required?s||(s=hi.jsxs(o.Fragment,{children:[p," ","*"]})):p,notched:void 0!==h?h:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:u,inputComponent:d,multiline:f,ref:t,type:g},v,{classes:qe({},b,{notchedOutline:null})}))});function Qd(e){return Di("MuiSelect",e)}Zd.muiName="Input";const ep=Li("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var tp;const np=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],rp=Ms("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${ep.select}`]:t.select},{[`&.${ep.select}`]:t[n.variant]},{[`&.${ep.error}`]:t.error},{[`&.${ep.multiple}`]:t.multiple}]}})(Fd,{[`&.${ep.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),op=Ms("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${lo(n.variant)}`],n.open&&t.iconOpen]}})(Wd),ip=Ms("input",{shouldForwardProp:e=>Ls(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function ap(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function sp(e){return null==e||"string"==typeof e&&!e.trim()}const lp=o.forwardRef(function(e,t){var n;const{"aria-describedby":r,"aria-label":i,autoFocus:a,autoWidth:s,children:l,className:c,defaultOpen:u,defaultValue:d,disabled:p,displayEmpty:f,error:h=!1,IconComponent:m,inputRef:g,labelId:v,MenuProps:b={},multiple:y,name:x,onBlur:S,onChange:w,onClose:C,onFocus:E,onOpen:I,open:D,readOnly:L,renderValue:R,SelectDisplayProps:M={},tabIndex:A,value:P,variant:q="standard"}=e,T=Te(e,np),[k,O]=ea({controlled:P,default:d,name:"Select"}),[N,_]=ea({controlled:D,default:u,name:"Select"}),j=o.useRef(null),F=o.useRef(null),[z,W]=o.useState(null),{current:$}=o.useRef(null!=D),[V,H]=o.useState(),B=na(t,g),G=o.useCallback(e=>{F.current=e,e&&W(e)},[]),U=null==z?void 0:z.parentNode;o.useImperativeHandle(B,()=>({focus:()=>{F.current.focus()},node:j.current,value:k}),[k]),o.useEffect(()=>{u&&N&&z&&!$&&(H(s?null:U.clientWidth),F.current.focus())},[z,s]),o.useEffect(()=>{a&&F.current.focus()},[a]),o.useEffect(()=>{if(!v)return;const e=Yi(F.current).getElementById(v);if(e){const t=()=>{getSelection().isCollapsed&&F.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}},[v]);const Y=(e,t)=>{e?I&&I(t):C&&C(t),$||(H(s?null:U.clientWidth),_(e))},K=o.Children.toArray(l),X=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(y){n=Array.isArray(k)?k.slice():[];const t=k.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),k!==n&&(O(n),w)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:x}}),w(o,e)}y||Y(!1,t)}},J=null!==z&&N;let Z,Q;delete T["aria-invalid"];const ee=[];let te=!1;(Vl({value:k})||f)&&(R?Z=R(k):te=!0);const ne=K.map(e=>{if(!o.isValidElement(e))return null;let t;if(y){if(!Array.isArray(k))throw new Error(Me(2));t=k.some(t=>ap(t,e.props.value)),t&&te&&ee.push(e.props.children)}else t=ap(k,e.props.value),t&&te&&(Q=e.props.children);return o.cloneElement(e,{"aria-selected":t?"true":"false",onClick:X(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});te&&(Z=y?0===ee.length?null:ee.reduce((e,t,n)=>(e.push(t),n<ee.length-1&&e.push(", "),e),[]):Q);let re,oe=V;!s&&$&&z&&(oe=U.clientWidth),re=void 0!==A?A:p?null:0;const ie=M.id||(x?`mui-component-select-${x}`:void 0),ae=qe({},e,{variant:q,value:k,open:J,error:h}),se=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e;return va({select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${lo(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]},Qd,t)})(ae),le=qe({},b.PaperProps,null==(n=b.slotProps)?void 0:n.paper),ce=Qi();return hi.jsxs(o.Fragment,{children:[hi.jsx(rp,qe({ref:G,tabIndex:re,role:"combobox","aria-controls":ce,"aria-disabled":p?"true":void 0,"aria-expanded":J?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[v,ie].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:e=>{if(!L){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),Y(!0,e))}},onMouseDown:p||L?null:e=>{0===e.button&&(e.preventDefault(),F.current.focus(),Y(!0,e))},onBlur:e=>{!J&&S&&(Object.defineProperty(e,"target",{writable:!0,value:{value:k,name:x}}),S(e))},onFocus:E},M,{ownerState:ae,className:Ci(M.className,se.select,c),id:ie,children:sp(Z)?tp||(tp=hi.jsx("span",{className:"notranslate",children:""})):Z})),hi.jsx(ip,qe({"aria-invalid":h,value:Array.isArray(k)?k.join(","):k,name:x,ref:j,"aria-hidden":!0,onChange:e=>{const t=K.find(t=>t.props.value===e.target.value);void 0!==t&&(O(t.props.value),w&&w(e,t))},tabIndex:-1,disabled:p,className:se.nativeInput,autoFocus:a,ownerState:ae},T)),hi.jsx(op,{as:m,className:se.icon,ownerState:ae}),hi.jsx(Ad,qe({id:`menu-${x||""}`,anchorEl:U,open:J,onClose:e=>{Y(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},b,{MenuListProps:qe({"aria-labelledby":v,role:"listbox","aria-multiselectable":y?"true":void 0,disableListWrap:!0,id:ce},b.MenuListProps),slotProps:qe({},b.slotProps,{paper:qe({},le,{style:qe({minWidth:oe},null!=le?le.style:null)})}),children:ne}))]})}),cp=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],up=["root"],dp={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>Rs(e)&&"variant"!==e,slot:"Root"},pp=Ms(wu,dp)(""),fp=Ms(Zd,dp)(""),hp=Ms(fu,dp)(""),mp=o.forwardRef(function(e,t){const n=Ts({name:"MuiSelect",props:e}),{autoWidth:r=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=ic,id:d,input:p,inputProps:f,label:h,labelId:m,MenuProps:g,multiple:v=!1,native:b=!1,onClose:y,onOpen:x,open:S,renderValue:w,SelectDisplayProps:C,variant:E="outlined"}=n,I=Te(n,cp),D=b?Vd:lp,L=jl({props:n,muiFormControl:zl(),states:["variant","error"]}),R=L.variant||E,M=qe({},n,{variant:R,classes:a}),A=(e=>{const{classes:t}=e;return t})(M),P=Te(A,up),q=p||{standard:hi.jsx(pp,{ownerState:M}),outlined:hi.jsx(fp,{label:h,ownerState:M}),filled:hi.jsx(hp,{ownerState:M})}[R],T=na(t,Ca(q));return hi.jsx(o.Fragment,{children:o.cloneElement(q,qe({inputComponent:D,inputProps:qe({children:i,error:L.error,IconComponent:u,variant:R,type:void 0,multiple:v},b?{id:d}:{autoWidth:r,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:g,onClose:y,onOpen:x,open:S,renderValue:w,SelectDisplayProps:qe({id:d},C)},f,{classes:f?Zr(P,f.classes):P},p?p.props.inputProps:{})},(v&&b||c)&&"outlined"===R?{notched:!0}:{},{ref:T,className:Ci(q.props.className,s,A.root)},!p&&{variant:R},I))})});mp.muiName="Select";const gp={GREYSCALE_0:"#000000",GREYSCALE_5:"#0E0E0E",GREYSCALE_10:"#1A1A1A",GREYSCALE_15:"#262626",GREYSCALE_20:"#333333",GREYSCALE_25:"#404040",GREYSCALE_30:"#4D4D4D",GREYSCALE_35:"#595959",GREYSCALE_40:"#666666",GREYSCALE_45:"#737373",GREYSCALE_50:"#808080",GREYSCALE_55:"#8C8C8C",GREYSCALE_60:"#999999",GREYSCALE_65:"#A6A6A6",GREYSCALE_70:"#B3B3B3",GREYSCALE_75:"#BFBFBF",GREYSCALE_80:"#CCCCCC",GREYSCALE_85:"#D9D9D9",GREYSCALE_90:"#E6E6E6",GREYSCALE_95:"#F2F2F2",GREYSCALE_98:"#FAFAFA",GREYSCALE_100:"#FFFFFF"},vp={WHITE:"#FFFFFF",GREEN_ULTRA_LIGHT:"#F2F9F5",GREEN:"#00873D",GREEN_PALE:"#15AA51",GREEN_DARK:"#0D6932",GREEN_EXTRA_DARK:"#094923",BLUE_ULTRA_LIGHT:"#EDF7FC",BLUE:"#005DB9",BLUE_PALE:"#048DEC",BLUE_DARK:"#003A8F",BLUE_EXTRA_DARK:"#002D6D",RED_ULTRA_LIGHT:"#FEF2F6",RED:"#D7004B",RED_PALE:"#F15A81",RED_DARK:"#8B0041",RED_EXTRA_DARK:"#5C002B",ORANGE_ULTRA_LIGHT:"#FFF7EB",ORANGE:"#EF6D00",ORANGE_PALE:"#FF9800",ORANGE_DARK:"#BF3900",ORANGE_EXTRA_DARK:"#611100",PURPLE:"#655dc6",PURPLE_PALE:"#8D8BCE",PURPLE_DARK:"#413885",...gp,GREYSCALE_0_0:"rgba(0, 0, 0, 0)",GREYSCALE_0_03:"rgba(0, 0, 0, 0.03)",GREYSCALE_0_05:"rgba(0, 0, 0, 0.05)",GREYSCALE_0_06:"rgba(0, 0, 0, 0.06)",GREYSCALE_0_10:"rgba(0, 0, 0, 0.1)",GREYSCALE_0_15:"rgba(0, 0, 0, 0.15)",GREYSCALE_0_20:"rgba(0, 0, 0, 0.2)",GREYSCALE_0_30:"rgba(0, 0, 0, 0.3)",GREYSCALE_0_42:"rgba(0, 0, 0, 0.42)",GREYSCALE_0_55:"rgba(0, 0, 0, 0.55)",GREYSCALE_0_60:"rgba(0, 0, 0, 0.6)",GREYSCALE_100_15:"rgba(255, 255, 255, 0.15)",GREYSCALE_100_50:"rgba(255, 255, 255, 0.5)",GREYSCALE_100_60:"rgba(255, 255, 255, 0.6)",MISC_FOCUS_BORDER:"#0275D9",TEXT_PRIMARY:"#404040",TEXT_SECONDARY:"rgba(0, 0, 0, 0.55)"},bp=12,yp=14,xp=16,Sp=24,wp=3,Cp=300,Ep=400,Ip=600,Dp=700,Lp={FONT_FAMILY:"'Source Sans Pro', 'HelveticaNeue', 'Helvetica Neue', Helvetica, Arial, sans-serif"};function Rp(e){return hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:hi.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5L8 9Z"})})}function Mp({fontSize:e="medium",children:t=null,className:n=""}={}){return hi.jsx("i",{style:{fontSize:"small"===e?"16px":"20px",margin:"small"===e?"-2px 0":void 0,display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},className:n,children:t})}function Ap(e={}){return hi.jsx(Mp,{...e,children:hi.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20",children:[hi.jsx("rect",{width:"20",height:"20",fill:"currentColor",rx:"3"}),hi.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 Pp(e={}){return hi.jsx(Mp,{fontSize:"medium",...e,children:hi.jsxs("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[hi.jsx("rect",{stroke:"none",width:"16",height:"16",rx:"8",fill:"currentColor"}),hi.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 qp(e){return hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",...e,children:hi.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 Tp(e={}){return hi.jsx(Mp,{...e,children:hi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:hi.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[hi.jsx("rect",{fill:"currentColor",x:"0",y:"0",width:"16",height:"16",rx:"3"}),hi.jsx("rect",{fill:"#FFFFFF",x:"4",y:"7",width:"8",height:"2",rx:"1"})]})})})}function kp(e={}){return hi.jsx(Mp,{fontSize:"medium",...e,children:hi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:hi.jsx("g",{strokeWidth:"1",fillRule:"evenodd",fillOpacity:"0.603119339",strokeOpacity:"0.146654212",children:hi.jsx("rect",{stroke:"currentStroke",fill:"currentFill",x:"0.5",y:"0.5",width:"15",height:"15",rx:"7.5"})})})})}function Op({className:e}){return hi.jsx(Mp,{fontSize:"small",className:e,children:hi.jsx("svg",{width:"8px",height:"14px",viewBox:"0 0 8 14",version:"1.1","aria-labelledby":"SortIcon",children:hi.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:hi.jsx("g",{transform:"translate(-4.000000, -1.000000)",fill:"#404040",fillRule:"nonzero",children:hi.jsxs("g",{transform:"translate(4.324187, 1.300372)",children:[hi.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"}),hi.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 Np(e={}){return hi.jsx(Mp,{...e,children:hi.jsx("svg",{width:"1em",height:"1em",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:hi.jsx("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:hi.jsx("rect",{stroke:vp.GREYSCALE_0_42,fill:"currentColor",x:"0.5",y:"0.5",width:"15",height:"15",rx:"3"})})})})}var _p=e=>({MuiAccordion:{styleOverrides:{root:{backgroundColor:vp.GREYSCALE_98,"&:before":{backgroundColor:"unset"},"&.Mui-expanded":{margin:"0px"}}}},MuiAccordionDetails:{styleOverrides:{root:{backgroundColor:vp.WHITE}}},MuiAccordionSummary:{defaultProps:{expandIcon:hi.jsx(Rp,{"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 ${vp.GREYSCALE_0_15}`,"&.Mui-focusVisible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`inset 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`,borderRadius:wp,backgroundColor:vp.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 ${vp.GREYSCALE_0_15}`},colorPrimary:{backgroundColor:vp.WHITE,color:vp.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:wp},text:{padding:"8px 16px","&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`}},outlined:{padding:"7px 16px",borderColor:vp.GREYSCALE_0_15,backgroundColor:vp.GREYSCALE_100_60,"&.Mui-focusVisible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${vp.MISC_FOCUS_BORDER}`}},contained:{padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"}},groupedContainedPrimary:{"&:hover":{backgroundColor:vp.GREEN_PALE},"&:active":{backgroundColor:vp.GREEN_DARK},"&.Mui-focusVisible":{borderColor:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},groupedContainedSecondary:{"&:hover":{backgroundColor:vp.BLUE_PALE},"&:active":{backgroundColor:vp.BLUE_DARK},"&.Mui-focusVisible":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.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:wp,"& > i:only-child, & > svg:only-child":{marginLeft:"-9px",marginRight:"-9px"}},text:{padding:"8px 16px","&:active":{backgroundColor:vp.GREYSCALE_0_10},"&.Mui-focusVisible":{boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`}},outlined:({ownerState:e})=>({padding:"7px 16px",borderColor:vp.GREYSCALE_0_42,backgroundColor:vp.GREYSCALE_100_60,"&:active":{backgroundColor:vp.GREYSCALE_0_10},"&.Mui-focusVisible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 1px ${vp.MISC_FOCUS_BORDER}`},..."amethyst"===e.color&&{borderColor:vp.PURPLE,"&.Mui-focusVisible":{borderColor:vp.PURPLE,boxShadow:`0 0 0 3px ${Bi(vp.PURPLE_PALE,.5)}`}}}),outlinedPrimary:{borderColor:vp.GREEN,"&.Mui-focusVisible":{borderColor:vp.GREEN,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},outlinedSecondary:{borderColor:vp.BLUE,"&.Mui-focusVisible":{borderColor:vp.BLUE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},outlinedWarning:{borderColor:vp.ORANGE,"&.Mui-focusVisible":{borderColor:vp.ORANGE,boxShadow:`0 0 0 3px ${Bi(vp.ORANGE_PALE,.5)}`}},outlinedError:{borderColor:vp.RED,"&.Mui-focusVisible":{borderColor:vp.RED,boxShadow:`0 0 0 3px ${Bi(vp.RED_PALE,.5)}`}},contained:({ownerState:e})=>({color:vp.WHITE,padding:"8px 16px",boxShadow:"none","&:hover":{boxShadow:"none"},"&:active":{boxShadow:"none"},..."amethyst"===e.color&&{"&:hover":{backgroundColor:vp.PURPLE_PALE},"&:active":{backgroundColor:vp.PURPLE_DARK},"&.Mui-focusVisible":{borderColor:vp.PURPLE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.PURPLE_PALE,.5)}`}}}),containedPrimary:{"&:hover":{backgroundColor:vp.GREEN_PALE},"&:active":{backgroundColor:vp.GREEN_DARK},"&.Mui-focusVisible":{borderColor:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},containedSecondary:{"&:hover":{backgroundColor:vp.BLUE_PALE},"&:active":{backgroundColor:vp.BLUE_DARK},"&.Mui-focusVisible":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},containedWarning:{"&:hover":{backgroundColor:vp.ORANGE_PALE},"&:active":{backgroundColor:vp.ORANGE_DARK},"&.Mui-focusVisible":{borderColor:vp.ORANGE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.ORANGE_PALE,.5)}`}},containedError:{"&:hover":{backgroundColor:vp.RED_PALE},"&:active":{backgroundColor:vp.RED_DARK},"&.Mui-focusVisible":{borderColor:vp.RED_PALE,boxShadow:`0 0 0 3px ${Bi(vp.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:vp.GREYSCALE_0_03,"&.MuiCardActionArea-focusHighlight":{opacity:0}},"&:active":{backgroundColor:vp.GREYSCALE_95,boxShadow:"none"},"&.Mui-focusVisible":{borderRadius:wp,boxShadow:`inset 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`,"&.MuiCardActionArea-focusHighlight":{opacity:0}}}}},MuiChip:{defaultProps:{deleteIcon:hi.jsx(qp,{"aria-hidden":"true",viewBox:"0 0 16 16",width:12,height:12}),variant:"outlined"},styleOverrides:{root:{height:"24px",fontSize:bp,borderRadius:wp,color:vp.TEXT_PRIMARY,backgroundColor:vp.GREYSCALE_100_15,"&.sprout-focus-visible":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0px 0px 0px 1px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{backgroundColor:vp.GREYSCALE_0_03},"&.Mui-disabled":{backgroundColor:vp.GREYSCALE_0_05,color:vp.GREYSCALE_0_30,border:"none",opacity:1},"&.MuiChip-outlinedSuccess":{color:vp.GREEN,borderColor:vp.GREEN},"&.MuiChip-outlinedInfo":{color:vp.BLUE,borderColor:vp.BLUE},"&.MuiChip-outlinedWarning":{color:vp.ORANGE,borderColor:vp.ORANGE},"&.MuiChip-outlinedError":{color:vp.RED,borderColor:vp.RED}},outlined:{border:`solid 1px ${vp.GREYSCALE_0_15}`,backgroundColor:vp.GREYSCALE_100_15,".MuiChip-clickable&:active ":{boxSizing:"border-box",borderRadius:wp,boxShadow:"none",backgroundColor:vp.GREYSCALE_0_10},"&.MuiChip-deleteIconSmall":{height:13,color:"inherit"}},outlinedPrimary:{color:vp.GREEN,borderColor:vp.GREEN},outlinedSecondary:{color:vp.BLUE,borderColor:vp.BLUE},label:{fontFamily:Lp.FONT_FAMILY,lineHeight:"16px"}}},MuiAutocomplete:{defaultProps:{clearIcon:hi.jsx(qp,{"aria-hidden":"true",viewBox:"0 0 16 16",height:12,width:12}),popupIcon:hi.jsx(Rp,{"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:wp},listbox:{padding:"0","& .MuiAutocomplete-option":{height:"32px",minHeight:"32px"}},option:{borderRadius:wp,fontSize:yp,height:"32px",padding:"6px 16px",minHeight:"32px","&.MuiAutocomplete-option.Mui-focused":{backgroundColor:vp.GREYSCALE_0_03,"&.Mui-focusVisible":{border:`solid 2px ${vp.MISC_FOCUS_BORDER}`,padding:"4px 14px"}},'&.MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:vp.GREYSCALE_0_05,"&.Mui-focused":{backgroundColor:vp.GREYSCALE_0_05},"&.Mui-focusVisible":{backgroundColor:vp.GREYSCALE_0_05}}},popupIndicator:{borderRadius:wp,border:`solid 1px ${vp.GREYSCALE_0_15}`,color:vp.GREYSCALE_0_60,marginRight:0,width:Sp,height:Sp},paper:{marginTop:"4px",boxShadow:`0px 2px 4px 0px ${vp.GREYSCALE_0_15}`},clearIndicator:{borderRadius:wp,marginRight:"4px"},popupIndicatorOpen:{backgroundColor:vp.GREYSCALE_0_10}}},MuiFormControlLabel:{styleOverrides:{root:{marginLeft:"-10px"},label:{fontSize:yp}}},MuiFormHelperText:{styleOverrides:{root:{fontSize:bp,lineHeight:"16px",margin:"4px 0 0 0","&.Mui-error":{color:vp.RED}},contained:{marginLeft:0,marginRight:0}}},MuiFormLabel:{styleOverrides:{root:{color:vp.GREYSCALE_25,fontSize:bp,fontFamily:Lp.FONT_FAMILY,fontWeight:Ip,fontStretch:"normal",fontStyle:"normal",letterSpacing:"normal",lineHeight:1,"&.Mui-focused":{color:vp.TEXT_PRIMARY},"&.Mui-error":{color:vp.TEXT_SECONDARY},"&[optional=true]":{"&:after":{color:vp.TEXT_SECONDARY,content:"'(optional)'",fontWeight:Ep,marginLeft:"4px"}}},asterisk:{visibility:"collapse",display:"inline-flex","&::after":{visibility:"visible",color:vp.TEXT_SECONDARY,content:"'(required)'",fontWeight:Ep,marginLeft:"4px"}}}},MuiOutlinedInput:{defaultProps:{notched:!1},styleOverrides:{root:{fontSize:yp,lineHeight:"16px",backgroundColor:vp.WHITE,borderRadius:wp,"&:not(.Mui-focused):not(.Mui-error):not(.Mui-disabled):hover .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.GREYSCALE_0_05}`,borderColor:vp.GREYSCALE_0_30},"&.Mui-focused:not(.Mui-error) .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.MISC_FOCUS_BORDER}`,boxShadow:`0px 0px 0px 1px ${vp.MISC_FOCUS_BORDER}, inset 0 2px 0 0 ${vp.GREYSCALE_0_05}`},"&.Mui-focused.Mui-error .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.RED}`,boxShadow:`0px 0px 0px 1px ${vp.RED}, inset 0 2px 0 0 ${vp.GREYSCALE_0_05}`},"&.Mui-disabled":{backgroundColor:"transparent"},"&.Mui-disabled .MuiOutlinedInput-notchedOutline":{border:`solid 1px ${vp.GREYSCALE_0_10}`,borderColor:vp.GREYSCALE_0_10,backgroundColor:vp.GREYSCALE_0_05}},adornedStart:{paddingLeft:0},adornedEnd:{paddingRight:0},input:{color:vp.TEXT_PRIMARY,padding:"6px 12px","&.Mui-disabled":{opacity:.45}},inputSizeSmall:{padding:"0px 12px"},notchedOutline:{borderColor:vp.GREYSCALE_0_15,borderRadius:wp,boxShadow:`inset 0 2px 0 0 ${vp.GREYSCALE_0_05}`},multiline:{padding:"0"}}},MuiSelect:{defaultProps:{IconComponent:e=>hi.jsx(Rp,{...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:vp.TEXT_SECONDARY},"& ~svg":{position:"absolute",right:"12px",top:"unset",cursor:"pointer"},"&[aria-expanded=true]":{backgroundColor:vp.GREYSCALE_0_05},"& ~fieldset":{boxShadow:"none !important",border:"none !important",backgroundColor:"unset !important"},"&:hover":{backgroundColor:vp.GREYSCALE_0_03},"&:active":{backgroundColor:vp.GREYSCALE_0_10},"&:focus":{backgroundColor:vp.GREYSCALE_0_03,borderRadius:"3px !important",border:`solid 1px ${vp.MISC_FOCUS_BORDER}`,boxShadow:`inset 0px 0px 0px 1px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{opacity:"unset",color:vp.GREYSCALE_0_30,"&:hover":{backgroundColor:vp.GREYSCALE_0_0,borderColor:vp.GREYSCALE_0_15},"& ~svg":{color:vp.GREYSCALE_0_30}}},outlined:{border:`solid 1px ${vp.GREYSCALE_0_15}`},nativeInput:{height:"42px"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:wp}}},MuiInput:{styleOverrides:{root:{"&.Mui-focused":{borderColor:vp.MISC_FOCUS_BORDER,boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`}}}},MuiInputAdornment:{styleOverrides:{root:{padding:"4px 8px",color:vp.GREYSCALE_55},positionStart:{marginRight:0},positionEnd:{marginLeft:0}}},MuiInputBase:{styleOverrides:{root:{fieldset:{boxShadow:"none"}},input:{height:"20px",fontSize:yp,padding:"8px 12px",lineHeight:"16px","&.MuiInputBase-inputAdornedStart":{paddingLeft:0},"&.MuiInputBase-inputAdornedEnd":{paddingRight:0}},sizeSmall:{height:"24px",input:{fontSize:bp,paddingLeft:"8px"}}}},MuiInputLabel:{defaultProps:{shrink:!0},styleOverrides:{outlined:{fontSize:bp,fontWeight:Ip,color:vp.GREYSCALE_25,"&.MuiInputLabel-shrink":{transform:"translate(0px, -16px)",fontWeight:Ip}}}},MuiPopover:{styleOverrides:{paper:{minWidth:"160px",top:"60px",marginTop:"5px","&ul":{padding:"0px"},boxShadow:`0px 4px 10px ${vp.GREYSCALE_0_15}, 0px 0px 0px 1px ${vp.GREYSCALE_0_05}`}}},MuiRadio:{defaultProps:{size:"small",icon:hi.jsx(kp,{}),checkedIcon:hi.jsx(Pp,{})},styleOverrides:{root:{"&:hover":{backgroundColor:"unset"},fill:vp.GREYSCALE_100_60,stroke:"black","&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:"50%",boxShadow:`0 0 0 2px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-checked":{"&.MuiRadio-colorPrimary":{"&.sprout-focus-visible i":{borderColor:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},"&.MuiRadio-colorSecondary":{"&.sprout-focus-visible i":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},"&.Mui-disabled":{color:vp.GREYSCALE_0_20}},"&.Mui-disabled":{fill:vp.GREYSCALE_0_20,stroke:"none"}}}},MuiCheckbox:{defaultProps:{size:"small",icon:hi.jsx(Np,{}),checkedIcon:hi.jsx(Ap,{}),indeterminateIcon:hi.jsx(Tp,{})},styleOverrides:{root:{borderWidth:1,"&:hover":{backgroundColor:"unset"},"&.sprout-focus-visible":{borderColor:"transparent",boxShadow:"none"},"&.sprout-focus-visible i":{borderRadius:wp,boxShadow:" 0px 0px 0px 2px #FFFFFF, 0px 0px 0px 4px #177FE6"},"&:not(.Mui-disabled)":{"&:not(.Mui-checked)":{"&:not(.MuiCheckbox-indeterminate)":{color:vp.GREYSCALE_100_60,"&:hover":{g:{rect:{stroke:vp.GREYSCALE_0_55,color:vp.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:vp.GREYSCALE_0_15,g:{rect:{stroke:"none"}}}}},colorPrimary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{"&:hover":{color:vp.GREEN_DARK}}}},colorSecondary:{"&.MuiCheckbox-root":{"&:not(.Mui-disabled)":{color:vp.GREYSCALE_0_55,"&:hover":{color:vp.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:vp.MISC_FOCUS_BORDER}},MuiListItemIcon:{styleOverrides:{root:{color:vp.GREYSCALE_25,minWidth:"16px",marginRight:"16px"}}},MuiListItemText:{styleOverrides:{root:{fontSize:"12px"},primary:{fontSize:yp,color:vp.TEXT_PRIMARY,lineHeight:"16px",fontWeight:Ip},secondary:{fontSize:bp,color:vp.GREYSCALE_45,fontWeight:Ep,lineHeight:"16px"}}},MuiListItem:{styleOverrides:{root:{fontSize:yp,minHeight:"32px"},gutters:{paddingLeft:"12px",paddingRight:"12px"}}},MuiListItemButton:{styleOverrides:{root:{fontSize:yp,height:"32px"}}},MuiListSubheader:{styleOverrides:{root:{'&[role="option"]':{color:vp.TEXT_PRIMARY,lineHeight:1.33,padding:"4px 12px",fontWeight:600,fontSize:bp,borderBottom:`solid 1px ${vp.GREYSCALE_0_15}`,pointerEvents:"none"}}}},MuiList:{styleOverrides:{padding:{paddingTop:"0px",paddingBottom:"0px"}}},MuiMenuItem:{styleOverrides:{root:{fontSize:yp,color:vp.GREYSCALE_25,height:"32px",'[class*="MuiListItemIcon-root"]':{minWidth:"16px"},"&:hover":{backgroundColor:vp.GREYSCALE_0_03},"&.Mui-selected":{backgroundColor:"unset","&:hover":{backgroundColor:vp.GREYSCALE_0_10},"&.Mui-focusVisible":{backgroundColor:vp.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:vp.RED}}},"&.Mui-focusVisible":{backgroundColor:vp.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:vp.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:vp.GREEN,height:"24px","&.Mui-disabled":{color:vp.GREYSCALE_0_15}},rail:{backgroundColor:vp.GREYSCALE_0_05,height:"4px",opacity:"1",border:`solid 1px ${vp.GREYSCALE_0_05}`,borderRadius:wp,boxShadow:`inset 0px 0px 0px 1px ${vp.GREYSCALE_0_05}`},track:{height:"4px",backgroundColor:"currentColor",opacity:"1",border:`solid 1px ${vp.GREYSCALE_0_05}`,borderRadius:wp},thumb:{height:"16px",width:"16px",borderRadius:wp,backgroundColor:vp.WHITE,boxShadow:`0px 1px 2px 0px ${vp.GREYSCALE_0_15}, 0px 0px 0px 1px ${vp.GREYSCALE_0_05}`,"&:hover":{borderRadius:wp,boxShadow:`0 2px 4px 0 ${vp.GREYSCALE_0_30}, 0 0 0 1px ${vp.GREYSCALE_0_06}`},"&:focus":{boxShadow:`0 1px 2px 0 ${vp.GREYSCALE_0_15}, 0 0 0 1px ${vp.GREYSCALE_0_06}, 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-focusVisible":{boxShadow:`0 1px 2px 0 ${vp.GREYSCALE_0_15}, 0 0 0 1px ${vp.GREYSCALE_0_06}, 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`},"&.Mui-disabled":{width:"16px",height:"16px",marginTop:"-5px",marginLeft:"-8px",backgroundColor:vp.GREYSCALE_90},"& .custom-bar":{height:"8px",width:"1px",backgroundColor:vp.GREYSCALE_0_30,marginLeft:1,marginRight:1}},mark:{width:"1px",height:"4px",margin:"16px 0px 0px 0px",backgroundColor:vp.GREYSCALE_0_15},markActive:{opacity:1,backgroundColor:vp.GREYSCALE_0_15},markLabel:{color:vp.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"},markLabelActive:{color:vp.TEXT_SECONDARY,transform:"translateX(-50%)",top:"35px"}}},MuiSnackbar:{defaultProps:{anchorOrigin:{vertical:"bottom",horizontal:"center"}}},MuiSnackbarContent:{styleOverrides:{root:{backgroundColor:vp.WHITE,color:vp.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:vp.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:vp.GREEN_PALE,boxShadow:`0 0 0 3px ${Bi(vp.GREEN_PALE,.5)}`}},colorSecondary:{"&.sprout-focus-visible + .MuiSwitch-track":{borderColor:vp.BLUE_PALE,boxShadow:`0 0 0 3px ${Bi(vp.BLUE_PALE,.5)}`}},track:{opacity:1,backgroundColor:vp.GREYSCALE_0_15,borderRadius:wp},thumb:{height:"16px",width:"16px",borderRadius:wp,backgroundColor:vp.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:yp,fontWeight:Ip,textTransform:"none",minWidth:"auto",boxSizing:"border-box",paddingBottom:"12px","&:hover":{borderBottom:`2px solid ${vp.GREYSCALE_80}`,paddingBottom:"10px"},"&.sprout-focus-visible":{boxShadow:`inset 0 0 0 2px ${vp.MISC_FOCUS_BORDER}`,backgroundColor:vp.GREYSCALE_0_03,borderRadius:wp},"&.Mui-disabled":{opacity:.3}},textColorPrimary:{color:vp.GREYSCALE_25,"&.Mui-selected":{color:vp.GREYSCALE_25}},textColorInherit:{opacity:"unset"},labelIcon:{minWidth:"40px",minHeight:"48px"}}},MuiTabs:{defaultProps:{indicatorColor:"primary",textColor:"primary"},styleOverrides:{root:{fontSize:yp,fontWeight:"bold"},scroller:{height:"100%"},flexContainer:{"&:not(.MuiTabs-flexContainerVertical)":{height:"100%",marginLeft:2,marginRight:2}},indicator:{height:2},scrollButtons:{borderRadius:wp,"&:hover":{backgroundColor:vp.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 ${vp.GREYSCALE_0_15}`,position:"absolute",bottom:0,left:0}},"&:last-child":{marginTop:"4px","&::before":{content:'""',display:"block",width:"100%",height:"1px",borderBottom:`1px solid ${vp.GREYSCALE_0_15}`,position:"absolute",top:0,left:0}}},"& .MuiTab-root":{fontWeight:"normal",borderRadius:wp,marginBlock:"4px","&:first-child":{marginTop:"0px"},"&:last-child":{marginBottom:"0px"},"&.Mui-selected":{backgroundColor:vp.GREYSCALE_0_05},"&:hover":{backgroundColor:vp.GREYSCALE_0_03,borderBottomColor:"transparent"}}}}},MuiTableCell:{styleOverrides:{root:{padding:"0px 8px 0px 16px",borderBottom:`1px solid ${vp.GREYSCALE_85}`,borderRight:`1px solid ${vp.GREYSCALE_85}`,height:"39px"},head:{height:"41px",fontWeight:Ip,backgroundColor:vp.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:vp.GREYSCALE_98,borderBottom:`1px solid ${vp.GREYSCALE_85}`}}},MuiTableContainer:{styleOverrides:{root:{borderBottom:`1px solid ${vp.GREYSCALE_85}`,borderTop:`1px solid ${vp.GREYSCALE_85}`}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:vp.GREYSCALE_98}}},MuiTableRow:{styleOverrides:{root:{"&.Mui-selected":{backgroundColor:vp.GREYSCALE_0_05,"&:hover":{backgroundColor:vp.GREYSCALE_0_03}},"&&:hover":{backgroundColor:vp.GREYSCALE_0_03}}}},MuiTableSortLabel:{defaultProps:{IconComponent:({className:e})=>hi.jsx(Op,{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 ${vp.GREYSCALE_85}`}}},MuiToggleButton:{styleOverrides:{root:{height:32,lineHeight:"16px",width:32,fontSize:yp,borderRadius:wp,padding:"7px 16px",border:`1px solid ${vp.GREYSCALE_0_15}`,backgroundColor:vp.GREYSCALE_100_60,color:vp.GREYSCALE_25,zIndex:1,"&:active":{backgroundColor:vp.GREYSCALE_0_10,border:`1px solid ${vp.GREYSCALE_0_30}`},"&:hover":{backgroundColor:vp.GREYSCALE_0_03,border:`1px solid ${vp.GREYSCALE_0_30}`},"&.sprout-focus-visible":{backgroundColor:vp.GREYSCALE_0_03,boxShadow:`0 0 0 1px ${vp.MISC_FOCUS_BORDER}`,border:`1px solid ${vp.MISC_FOCUS_BORDER}`,zIndex:2},"&.Mui-selected":{color:vp.GREYSCALE_25,backgroundColor:vp.GREYSCALE_0_10,zIndex:2,"&:hover":{backgroundColor:vp.GREYSCALE_0_10,border:`1px solid ${vp.GREYSCALE_0_15}`}}},sizeSmall:{fontSize:bp,height:24,width:24,padding:7},sizeLarge:{fontSize:xp,height:40,width:40,lineHeight:"20px"}}},MuiToggleButtonGroup:{styleOverrides:{root:{height:"32px",lineHeight:"16px",fontSize:yp,borderRadius:wp}}},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:vp.GREYSCALE_20},tooltip:{backgroundColor:vp.GREYSCALE_20,fontSize:bp,lineHeight:"16px"},popper:{whiteSpace:"pre-line"}}}});const jp=e=>({mode:"light",primary:{ultraLight:vp.GREEN_ULTRA_LIGHT,light:vp.GREEN_PALE,main:vp.GREEN,dark:vp.GREEN_DARK,extraDark:vp.GREEN_EXTRA_DARK,contrastText:vp.WHITE},secondary:{ultraLight:vp.BLUE_ULTRA_LIGHT,light:vp.BLUE_PALE,main:vp.BLUE,dark:vp.BLUE_DARK,extraDark:vp.BLUE_EXTRA_DARK,contrastText:vp.WHITE},error:{ultraLight:vp.RED_ULTRA_LIGHT,light:vp.RED_PALE,main:vp.RED,dark:vp.RED_DARK,extraDark:vp.RED_EXTRA_DARK,contrastText:vp.WHITE},warning:{ultraLight:vp.ORANGE_ULTRA_LIGHT,light:vp.ORANGE_PALE,main:vp.ORANGE,dark:vp.ORANGE_DARK,extraDark:vp.ORANGE_EXTRA_DARK,contrastText:vp.WHITE},success:{ultraLight:vp.GREEN_ULTRA_LIGHT,light:vp.GREEN_PALE,main:vp.GREEN,dark:vp.GREEN_DARK,extraDark:vp.GREEN_EXTRA_DARK,contrastText:vp.WHITE},info:{ultraLight:vp.BLUE_ULTRA_LIGHT,light:vp.BLUE_PALE,main:vp.BLUE,dark:vp.BLUE_DARK,extraDark:vp.BLUE_EXTRA_DARK,contrastText:vp.WHITE},text:{primary:vp.TEXT_PRIMARY,secondary:vp.TEXT_SECONDARY,disabled:vp.GREYSCALE_0_30},action:{hover:vp.GREYSCALE_0_03,hoverOpacity:.03,selected:vp.GREYSCALE_0_05,selectedOpacity:.05,focus:vp.MISC_FOCUS_BORDER},amethyst:{ultraLight:vp.WHITE,main:vp.PURPLE,light:vp.PURPLE_PALE,dark:vp.PURPLE_DARK,extraDark:vp.GREYSCALE_0_0,contrastText:vp.WHITE},background:{paper:vp.WHITE,default:vp.GREYSCALE_95},divider:vp.GREYSCALE_0_15}),Fp=(e="light")=>ds({components:_p(),palette:jp(),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:yp,fontWeightLight:Cp,fontWeightRegular:Ep,fontWeightMedium:Ip,fontWeightBold:Dp,htmlFontSize:yp,fontFamily:Lp.FONT_FAMILY,button:{fontWeight:Ip,fontSize:yp,textTransform:"none"},body1:{fontSize:xp,lineHeight:"24px"},body2:{fontSize:yp,lineHeight:"20px"},h1:{fontSize:32,lineHeight:"32px"},h2:{fontSize:28,lineHeight:"32px"},h3:{fontSize:Sp,lineHeight:"24px"},h4:{fontSize:20,lineHeight:"24px"},h5:{fontSize:xp,fontWeight:Ip,lineHeight:"16px"},h6:{fontSize:yp,fontWeight:Ip,lineHeight:"16px"},caption:{color:vp.TEXT_SECONDARY},subtitle1:{fontSize:yp,color:vp.TEXT_SECONDARY},subtitle2:{fontSize:bp,color:vp.TEXT_SECONDARY}},shape:{borderRadius:wp}});function zp(e){return"init"in e}function Wp(e){return"function"==typeof e.write}function $p(e){return"v"in e||"e"in e}function Vp(e){if("e"in e)throw e.e;if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("v"in e))throw new Error("[Bug] atom state is not initialized");return e.v}function Hp(e){return"function"==typeof(null==e?void 0:e.then)}function Bp(e,t,n){if(!n.p.has(e)){n.p.add(e);const r=()=>n.p.delete(e);t.then(r,r)}}function Gp(e,t,n){const r=n.get(e),o=null==r?void 0:r.t,i=t.p;if(!(null==o?void 0:o.size))return i;if(!i.size)return o;const a=new Set(o);for(const e of i)a.add(e);return a}const Up=()=>{const e={},t=new WeakMap,n=n=>{var r,o;null==(r=t.get(e))||r.forEach(e=>e(n)),null==(o=t.get(n))||o.forEach(e=>e())};return n.add=(n,r)=>{const o=n||e;let i=t.get(o);return i||(i=new Set,t.set(o,i)),i.add(r),()=>{i.delete(r),i.size||t.delete(o)}},n};function Yp(e){return e.i||(e.i=Up()),e.r||(e.r=Up()),e.c||(e.c=Up()),e.m||(e.m=Up()),e.u||(e.u=Up()),e.f||(e.f=(()=>{const e=new Set,t=()=>e.forEach(e=>e());return t.add=t=>(e.add(t),()=>e.delete(t)),t})()),e}const Kp=(e,t,n,...r)=>n.read(...r),Xp=(e,t,n,...r)=>n.write(...r),Jp=(e,t,n)=>n.INTERNAL_onInit(t),Zp=(e,t,n,r)=>{var o;return null==(o=n.onMount)?void 0:o.call(n,r)},Qp=(e,t,n)=>{var r;const o=e[0];let i=o.get(n);if(!i){const a=e[6],s=e[9];i={d:new Map,p:new Set,n:0},o.set(n,i),null==(r=a.i)||r.call(a,n),function(e){return!!e.INTERNAL_onInit}(n)&&s(e,t,n)}return i},ef=(e,t)=>{var n;const r=e[1],o=e[3],i=e[4],a=e[5],s=e[6],l=e[13];if(!(s.f||o.size||i.size||a.size))return;const c=[],u=e=>{try{e()}catch(e){c.push(e)}};do{s.f&&u(s.f);const c=new Set;for(const e of o){const t=null==(n=r.get(e))?void 0:n.l;if(t)for(const e of t)c.add(e)}o.clear();for(const e of a)c.add(e);a.clear();for(const e of i)c.add(e);i.clear();for(const e of c)u(e);o.size&&l(e,t)}while(o.size||a.size||i.size);if(c.length)throw new AggregateError(c)},tf=(e,n)=>{const r=e[1],o=e[2],i=e[3],a=e[11],s=e[14],l=e[17];if(!i.size)return;const c=[],u=[],d=new WeakSet,p=new WeakSet,f=[],h=[];for(const t of i)f.push(t),h.push(a(e,n,t));for(;f.length;){const i=f.length-1,s=f[i],l=h[i];if(p.has(s))f.pop(),h.pop();else if(d.has(s)){if(o.get(s)===l.n)c.push(s),u.push(l);else if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&o.has(s))throw new Error("[Bug] invalidated atom exists");p.add(s),f.pop(),h.pop()}else{d.add(s);for(const t of Gp(s,l,r))d.has(t)||(f.push(t),h.push(a(e,n,t)))}}for(let t=c.length-1;t>=0;--t){const r=c[t],a=u[t];let d=!1;for(const e of a.d.keys())if(e!==r&&i.has(e)){d=!0;break}d&&(o.set(r,a.n),s(e,n,r),l(e,n,r)),o.delete(r)}},nf=new WeakSet,rf=(e,n,r)=>{var o,i;const a=e[1],s=e[2],l=e[3],c=e[6],u=e[7],d=e[11],p=e[12],f=e[13],h=e[14],m=e[16],g=e[17],v=e[20],b=e[26],y=e[28],x=d(e,n,r),S=y[0];if($p(x)){if(a.has(r)&&s.get(r)!==x.n||x.m===S)return x.m=S,x;let t=!1;for(const[r,o]of x.d)if(h(e,n,r).n!==o){t=!0;break}if(!t)return x.m=S,x}let w=!0;const C=new Set(x.d.keys()),E=()=>{for(const e of C)x.d.delete(e)},I=()=>{if(a.has(r)){const t=!l.size;g(e,n,r),t&&(f(e,n),p(e,n))}},D=t=>{var o;if(t===r){const r=d(e,n,t);if(!$p(r)){if(!zp(t))throw new Error("no atom init");v(e,n,t,t.init)}return Vp(r)}const i=h(e,n,t);try{return Vp(i)}finally{C.delete(t),x.d.set(t,i.n),Hp(x.v)&&Bp(r,x.v,i),a.has(r)&&(null==(o=a.get(t))||o.t.add(r)),w||I()}};let L,R;const M={get signal(){return L||(L=new AbortController),L.signal},get setSelf(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&console.warn("[DEPRECATED] setSelf is deprecated and will be removed in v3."),"production"===(t.meta.env?t.meta.env.MODE:void 0)||Wp(r)||console.warn("setSelf function cannot be used with read-only atom"),!R&&Wp(r)&&(R=(...o)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&w&&console.warn("setSelf function cannot be called in sync"),!w)try{return m(e,n,r,o)}finally{f(e,n),p(e,n)}}),R}},A=x.n,P=s.get(r)===A;try{"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&nf.delete(n);const i=u(e,n,r,D,M);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&nf.has(n)&&console.warn("Detected store mutation during atom read. This is not supported."),v(e,n,r,i),Hp(i)){b(e,n,i,()=>null==L?void 0:L.abort());const t=()=>{E(),I()};i.then(t,t)}else E();return null==(o=c.r)||o.call(c,r),x.m=S,x}catch(e){if(function(e){if(!(e instanceof Error))return!1;const t=e.name,n=e.message.toLowerCase();return("RangeError"===t||"InternalError"===t)&&(n.includes("call stack")||n.includes("too much recursion")||n.includes("stack overflow"))}(e))throw e;return delete x.v,x.e=e,++x.n,x.m=S,x}finally{w=!1,x.n!==A&&P&&(s.set(r,x.n),l.add(r),null==(i=c.c)||i.call(c,r))}},of=(e,t,n)=>{const r=e[1],o=e[2],i=e[11],a=[n];for(;a.length;){const n=a.pop(),s=i(e,t,n);for(const l of Gp(n,s,r)){const n=i(e,t,l);o.get(l)!==n.n&&(o.set(l,n.n),a.push(l))}}},af=(e,n,r,o)=>{const i=e[3],a=e[6],s=e[8],l=e[11],c=e[12],u=e[13],d=e[14],p=e[15],f=e[16],h=e[17],m=e[20],g=e[28];let v=!0;const b=t=>Vp(d(e,n,t)),y=(o,...s)=>{var d;const b=l(e,n,o);try{if(o===r){if(!zp(o))throw new Error("atom not writable");"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&nf.add(n);const r=b.n,l=s[0];return m(e,n,o,l),h(e,n,o),void(r!==b.n&&(++g[0],i.add(o),p(e,n,o),null==(d=a.c)||d.call(a,o)))}return f(e,n,o,s)}finally{v||(u(e,n),c(e,n))}};try{return s(e,n,r,b,y,...o)}finally{v=!1}},sf=(e,t,n)=>{var r;const o=e[1],i=e[3],a=e[6],s=e[11],l=e[15],c=e[18],u=e[19],d=s(e,t,n),p=o.get(n);if(p&&d.d.size>0){for(const[o,u]of d.d)if(!p.d.has(o)){const d=s(e,t,o);c(e,t,o).t.add(n),p.d.add(o),u!==d.n&&(i.add(o),l(e,t,o),null==(r=a.c)||r.call(a,o))}for(const r of p.d)if(!d.d.has(r)){p.d.delete(r);const o=u(e,t,r);null==o||o.t.delete(n)}}},lf=(e,t,n)=>{var r;const o=e[1],i=e[4],a=e[6],s=e[10],l=e[11],c=e[12],u=e[13],d=e[14],p=e[16],f=e[18],h=l(e,t,n);let m=o.get(n);if(!m){d(e,t,n);for(const r of h.d.keys()){f(e,t,r).t.add(n)}if(m={l:new Set,d:new Set(h.d.keys()),t:new Set},o.set(n,m),Wp(n)&&function(e){return!!e.onMount}(n)){const r=()=>{let r=!0;const o=(...o)=>{try{return p(e,t,n,o)}finally{r||(u(e,t),c(e,t))}};try{const i=s(e,t,n,o);i&&(m.u=()=>{r=!0;try{i()}finally{r=!1}})}finally{r=!1}};i.add(r)}null==(r=a.m)||r.call(a,n)}return m},cf=(e,t,n)=>{var r,o;const i=e[1],a=e[5],s=e[6],l=e[11],c=e[19],u=l(e,t,n);let d=i.get(n);if(!d||d.l.size)return d;let p=!1;for(const e of d.t)if(null==(r=i.get(e))?void 0:r.d.has(n)){p=!0;break}if(p)return d;d.u&&a.add(d.u),d=void 0,i.delete(n);for(const r of u.d.keys()){const o=c(e,t,r);null==o||o.t.delete(n)}null==(o=s.u)||o.call(s,n)},uf=(e,t,n,r)=>{const o=e[11],i=e[27],a=o(e,t,n),s="v"in a,l=a.v;if(Hp(r))for(const i of a.d.keys())Bp(n,r,o(e,t,i));a.v=r,delete a.e,s&&Object.is(l,a.v)||(++a.n,Hp(l)&&i(e,t,l))},df=(e,t,n)=>Vp((0,e[14])(e,t,n)),pf=(e,t,n,...r)=>{const o=e[3],i=e[12],a=e[13],s=e[16],l=o.size;try{return s(e,t,n,r)}finally{o.size!==l&&(a(e,t),i(e,t))}},ff=(e,t,n,r)=>{const o=e[12],i=e[18],a=e[19],s=i(e,t,n).l;return s.add(r),o(e,t),()=>{s.delete(r),a(e,t,n),o(e,t)}},hf=(e,t,n,r)=>{const o=e[25];let i=o.get(n);if(!i){i=new Set,o.set(n,i);const e=()=>o.delete(n);n.then(e,e)}i.add(r)},mf=(e,t,n)=>{const r=e[25].get(n);null==r||r.forEach(e=>e())},gf=new WeakMap;function vf(e){const n=gf.get(e);if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!n)throw new Error("Store must be created by buildStore to read its building blocks");const r=n[24];return r?r(n,e):n}function bf(...e){const t={get:e=>r(n,t,e),set:(e,...r)=>o(n,t,e,...r),sub:(e,r)=>i(n,t,e,r)},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Kp,Xp,Jp,Zp,Qp,ef,tf,rf,of,af,sf,lf,cf,uf,df,pf,ff,void 0,new WeakMap,hf,mf,[0]].map((t,n)=>e[n]||t);gf.set(t,Object.freeze(n));const r=n[21],o=n[22],i=n[23];return t}let yf,xf=0;function Sf(e,n){const r="atom"+ ++xf,o={toString(){return"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&this.debugLabel?r+":"+this.debugLabel:r}};return"function"==typeof e?o.read=e:(o.init=e,o.read=wf,o.write=Cf),n&&(o.write=n),o}function wf(e){return e(this)}function Cf(e,t,n){return t(this,"function"==typeof n?n(e(this)):n)}function Ef(){return bf()}const If=c(void 0);function Df(e){const n=h(If);return(null==e?void 0:e.store)||n||(yf||(yf=Ef(),"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=yf),globalThis.__JOTAI_DEFAULT_STORE__!==yf&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),yf)}function Lf({children:e,store:t}){const n=l(null);return t?r(If.Provider,{value:t},e):(null===n.current&&(n.current=Ef()),r(If.Provider,{value:n.current},e))}const Rf=e=>"function"==typeof(null==e?void 0:e.then),Mf=e=>{e.status||(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}))},Af=n.use||(e=>{if("pending"===e.status)throw e;if("fulfilled"===e.status)return e.value;throw"rejected"===e.status?e.reason:(Mf(e),e)}),Pf=new WeakMap,qf=(e,t,n)=>{const r=vf(e),o=r[26];let i=Pf.get(t);return i||(i=new Promise((a,s)=>{let l=t;const c=e=>t=>{l===e&&a(t)},u=e=>t=>{l===e&&s(t)},d=()=>{try{const t=n();Rf(t)?(Pf.set(t,i),l=t,t.then(c(t),u(t)),o(r,e,t,d)):a(t)}catch(e){s(e)}};t.then(c(t),u(t)),o(r,e,t,d)}),Pf.set(t,i)),i};function Tf(e,t){const{delay:r,unstable_promiseStatus:o=!n.use}={},i=Df(t),[[a,s,l],c]=d(t=>{const n=i.get(e);return Object.is(t[0],n)&&t[1]===i&&t[2]===e?t:[n,i,e]},void 0,()=>[i.get(e),i,e]);let u=a;if(s===i&&l===e||(c(),u=i.get(e)),p(()=>{const t=i.sub(e,()=>{if(o)try{const t=i.get(e);Rf(t)&&Mf(qf(i,t,()=>i.get(e)))}catch(e){}if("number"==typeof r)return console.warn("[DEPRECATED] delay option is deprecated and will be removed in v3.\n\nMigration guide:\n\nCreate a custom hook like the following.\n\nfunction useAtomValueWithDelay<Value>(\n atom: Atom<Value>,\n options: { delay: number },\n): Value {\n const { delay } = options\n const store = useStore(options)\n const [value, setValue] = useState(() => store.get(atom))\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n setTimeout(() => setValue(store.get(atom)), delay)\n })\n return unsub\n }, [store, atom, delay])\n return value\n}\n"),void setTimeout(c,r);c()});return c(),t},[i,e,r,o]),f(u),Rf(u)){const t=qf(i,u,()=>i.get(e));return o&&Mf(t),Af(t)}return u}function kf(e,n){const r=Df(n);return u((...n)=>{if("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&!("write"in e))throw new Error("not writable atom");return r.set(e,...n)},[r,e])}function Of(e,t){return[Tf(e,t),kf(e,t)]}t.meta.env&&t.meta.env.MODE;!function(e=()=>{try{return window.localStorage}catch(e){return void("production"!==(t.meta.env?t.meta.env.MODE:void 0)&&"undefined"!=typeof window&&console.warn(e))}},n){var r;let o,i;const a={getItem:(t,r)=>{var a,s;const l=e=>{if(o!==(e=e||"")){try{i=JSON.parse(e,null==n?void 0:n.reviver)}catch(e){return r}o=e}return i},c=null!=(s=null==(a=e())?void 0:a.getItem(t))?s:null;return(e=>"function"==typeof(null==e?void 0:e.then))(c)?c.then(l):l(c)},setItem:(t,n)=>{var r;return null==(r=e())?void 0:r.setItem(t,JSON.stringify(n,void 0))},removeItem:t=>{var n;return null==(n=e())?void 0:n.removeItem(t)}};let s;try{s=null==(r=e())?void 0:r.subscribe}catch(e){}var l;!s&&"undefined"!=typeof window&&"function"==typeof window.addEventListener&&window.Storage&&(s=(t,n)=>{if(!(e()instanceof window.Storage))return()=>{};const r=r=>{r.storageArea===e()&&r.key===t&&n(r.newValue)};return window.addEventListener("storage",r),()=>{window.removeEventListener("storage",r)}}),s&&(a.subscribe=(l=s,(e,t,r)=>l(e,e=>{let o;try{o=JSON.parse(e||"",null==n?void 0:n.reviver)}catch(e){o=r}t(o)})))}();const Nf=(e,t,n)=>(t.has(n)?t:t.set(n,e())).get(n),_f=new WeakMap,jf=()=>{};const Ff=new WeakMap;function zf(e,t){const n=Df(t),r=Wf(n);for(const[o,...i]of e)r.has(o)&&!(null==t?void 0:t.dangerouslyForceHydrate)||(r.add(o),n.set(o,...i))}const Wf=e=>{let t=Ff.get(e);return t||(t=new WeakSet,Ff.set(e,t)),t};function $f(){return Boolean("undefined"!=typeof process&&process.env?.NODE_ENV&&!1)}function Vf(e){const t=Sf(()=>[]),n=Sf(function(e){const[r,o,i]=e(t);i.has(n)&&(r.forEach(e),++o.n)});return n.effect=e,n.INTERNAL_onInit=e=>{const r=vf(e),o=r[1],i=r[3],a=Yp(r[6]),s=r[11],l=r[12],c=r[13],u=r[14],d=r[15],p=r[16],f=r[17],h=r[20],m=new Set;let g,v=0,b=!1,y=!1,x=!1;function S(){if(v)return;m.clear();let t=!0;const w=i=>{if(x)return e.get(i);if(i===n){const t=s(r,e,i);if(!$p(t)){if(!zp(i))throw new Error("no atom init");h(r,e,i,i.init)}return Vp(t)}const a=u(r,e,i);try{return Vp(a)}finally{C.d.set(i,a.n),o.get(i)?.t.add(n),t?m.add(i):o.has(i)&&(f(r,e,n),c(r,e),l(r,e))}};w.peek=e.get;const E=(o,...u)=>{const m=s(r,e,o);try{if(++v,o===n){if(!zp(o))throw new Error("atom not writable");const t=m.n,n=u[0];return h(r,e,o,n),f(r,e,o),void(t!==m.n&&(i.add(o),a.c?.(o),d(r,e,o)))}return p(r,e,o,u)}finally{t||(c(r,e),l(r,e)),--v}};E.recurse=(t,...o)=>{if(x){if($f())throw new Error("set.recurse is not allowed in cleanup")}else try{return b=!0,f(r,e,n),E(t,...o)}finally{c(r,e),b=!1,y&&(y=!1,S())}};try{g?.();const e=n.effect(w,E);if("function"!=typeof e)return;g=()=>{if(!v)try{return t=!0,x=!0,e()}finally{t=!1,x=!1,g=void 0}}}finally{t=!1,m.forEach(t=>{C.d.set(t,s(r,e,t).n)}),f(r,e,n),c(r,e)}}const w=function(e,t){let n=Hf.get(e);n||(n=new Set,Hf.set(e,n),t.f.add(function(){for(const e of n)n.delete(e),e()}));return n}(e,a),C=s(r,e,n);C.v=void 0,Object.assign(e.get(t),[m,C,o]),a.c.add(n,function(){i.delete(n)}),a.m.add(n,function(){w.add(S),g&&w.delete(g)}),a.u.add(n,function(){w.delete(S),g&&w.add(g)}),a.c.add(n,function(){b?y=!0:w.add(S)})},$f()&&(Object.defineProperty(t,"debugLabel",{get:()=>n.debugLabel?`${n.debugLabel}:ref`:void 0,configurable:!0,enumerable:!0}),t.debugPrivate=!0),n}const Hf=new WeakMap;const Bf=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r?await t.moveDimensionToAlternative(n):await t.moveMeasureToAlternative(n))},Gf=async(e,t,n)=>{const r=e.get(n);void 0!==r&&("dimension"===r?await t.moveDimensionFromAlternative(n):await t.moveMeasureFromAlternative(n))},Uf=e=>{const{type:t,handler:n,model:r,fieldTypeById:o,handlerQueue:i}=e;void 0!==n&&void 0!==r&&i&&i.add(async()=>{switch(t){case"apply":for(const t of e.localChecked)await Gf(o,n,t);for(const t of e.localUnchecked)await Bf(o,n,t);break;case"checked":await Gf(o,n,e.cId);break;case"unchecked":await Bf(o,n,e.cId)}})},Yf=Sf(),Kf=Sf(),Xf=Sf(),Jf=Sf(e=>e(Xf)?.translate??(e=>e)),Zf=Sf(""),Qf=Sf(e=>{const t=e(Zf).toLowerCase().trim();return({title:e})=>e.toLowerCase().trim().includes(t)}),eh=Sf(e=>e(Xf)?.getBooleanFlag??(()=>!1)),th=e=>7005!==e.qError?.qErrorCode,nh=new WeakMap,rh={qInfo:{qType:"AlternativeLayout"},qHyperCubeDef:{qMode:"S",qDimensions:[],qMeasures:[],qInitialDataFetch:[{qTop:0,qLeft:0,qHeight:0,qWidth:0}],excludedNoOfLeftDims:-1,qCalcCond:{qv:"0"}}},oh=function(e,n=jf){return((e,t,n)=>{const r=Nf(()=>new WeakMap,_f,t);return Nf(e,r,n)})(()=>{const r=new WeakMap,o=new WeakMap,i=Sf(0),a=Sf([]);a.INTERNAL_onInit=e=>{e.set(a,[()=>e.set(i,e=>e+1)])},"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(i.debugPrivate=!0,a.debugPrivate=!0);const s=Sf(t=>{let l;t(i);try{l=t(s)}catch(e){}const c=t(e);if(!(e=>"function"==typeof(null==e?void 0:e.then))(c))return{v:c};if(c!==(null==l?void 0:l.p)&&c.then(e=>{o.set(c,e);const[n]=t(a);n()},e=>{r.set(c,e);const[n]=t(a);n()}),r.has(c))throw r.get(c);return o.has(c)?{p:c,v:o.get(c)}:l&&"v"in l?{p:c,f:n(l.v),v:l.v}:{p:c,f:n()}});return s.init=void 0,"production"!==(t.meta.env?t.meta.env.MODE:void 0)&&(s.debugPrivate=!0),Sf(e=>{const t=e(s);return"f"in t?t.f:t.v},(t,n,...r)=>n(e,...r))},e,n)}(Sf(async e=>{const t=e(Yf);if(t){if(nh.has(t))return nh.get(t);try{const e=await t.app.createSessionObject(rh);return nh.set(t,e),e}catch(e){return void console.error("Error creating alternative layout model:",e)}}})),ih=Sf(null),ah=Sf(),sh=Vf((e,t)=>{const n=e(Yf),r=e(oh);if(!n||!r)return;const o=async()=>{const e=await n.getLayout();if(e.qSelectionInfo?.qInSelections)return;const o=await n.getEffectiveProperties();await r.applyPatches([{qOp:"replace",qPath:"/qHyperCubeDef/qDimensions",qValue:JSON.stringify(o.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qDimensions??[])},{qOp:"replace",qPath:"/qHyperCubeDef/qMeasures",qValue:JSON.stringify(o.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qMeasures??[])}]);const i=await r.getLayout();t(ah,{layout:structuredClone(e),properties:structuredClone(o),altLayout:structuredClone(i)}),t(ih,null)};return o(),n.Invalidated?.bind(o),()=>{n.Invalidated?.unbind(o)}}),lh=Sf(e=>e(ah)?.layout),ch=Sf(e=>e(ah)?.altLayout),uh=Sf(e=>e(ah)?.properties),dh=Sf(e=>{const t=e(ah)?.layout;return t?.qHyperCube.qDimensionInfo.filter(th)??[]}),ph=Sf(e=>{const t=e(ah)?.layout;return t?.qHyperCube.qMeasureInfo.filter(th)??[]}),fh=Sf(e=>{const t=e(uh),n=new Map;return t?(t.qHyperCubeDef.qDimensions.forEach(e=>{n.set(e.qDef.cId,"dimension")}),t.qHyperCubeDef.qMeasures.forEach(e=>{n.set(e.qDef.cId,"measure")}),t.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qDimensions?.forEach(e=>{n.set(e.qDef.cId,"dimension")}),t.qHyperCubeDef.qLayoutExclude?.qHyperCubeDef.qMeasures?.forEach(e=>{n.set(e.qDef.cId,"measure")}),n):n});class hh{#e=[];#t=!1;#n=!1;#r;#o;#i;#a;constructor({onQueueCompleted:e}){this.#r=e}#s(){this.#o=void 0,this.#i=void 0,this.#a=void 0}pause(){this.#o&&(clearTimeout(this.#a),this.#i?.(),this.#s());const{promise:e,resolve:t}=Promise.withResolvers();this.#o=e,this.#i=t,this.#a=setTimeout(()=>{this.abort("Aborting queue after being paused for too long")},6e4)}async continue(e=0){const t=this.#i;var n;await(n=e,new Promise(e=>{setTimeout(e,n)})),t===this.#i&&(t?.(),clearTimeout(this.#a),this.#s())}abort(e="Queue aborted"){clearTimeout(this.#a),(this.#e.length>0||this.#t)&&console.warn(`[SequentialPromiseQueue] ${e}`),this.#n=!0,this.#e=[],this.#i?.(),this.#s()}add(e){this.#e.push(e),this.#t||this.#l()}async#l(){if(!this.#t){for(this.#t=!0,this.#n=!1;this.#e.length>0;)if(this.#o)await this.#o;else try{const e=this.#e.shift();await(e?.())}catch(e){return console.error("[SequentialPromiseQueue] Error executing action:",e),this.#e=[],void(this.#t=!1)}try{this.#n||await(this.#r?.())}catch(e){console.error("[SequentialPromiseQueue] Error executing onQueueCompleted:",e)}finally{this.#t=!1,this.#e.length>0&&this.#l()}}}}const mh=Sf(null),gh=Vf((e,t)=>{const n=e(Yf),r=e(Kf),o=new hh({onQueueCompleted:async()=>{n&&r&&await n.applyPatches([{qPath:"/qHyperCubeDef",qOp:"replace",qValue:JSON.stringify(r.properties.qHyperCubeDef)}],!0)}});t(mh,o);const i=()=>{o.pause()},a=()=>{o.continue(500)},s=()=>{o.abort()};return n?.Invalidated?.bind(i),n?.Validated?.bind(a),n?.Cancelled?.bind(s),n?.Closing?.bind(s),()=>{o.abort(),n?.Invalidated?.unbind(i),n?.Validated?.unbind(a),n?.Cancelled?.unbind(s),n?.Closing?.unbind(s)}}),vh=Sf(e=>{const t=[...e(dh),...e(ph)].map(e=>e.cId);return new Set(t)}),bh=Sf(new Set),yh=Sf(new Set),xh=Sf(e=>{const t=e(bh),n=e(yh);return e(vh).difference(n).union(t)}),Sh=Vf((e,t)=>{e(vh),t(bh,new Set),t(yh,new Set)}),wh=Sf(e=>e(xh),(e,t,n)=>{if("string"!=typeof n)return;const r=e(xh).has(n),o=new Set(e(yh)),i=new Set(e(bh));r?(o.add(n),i.delete(n)):(i.add(n),o.delete(n)),t(yh,o),t(bh,i),Uf({type:r?"unchecked":"checked",cId:n,handler:e(Kf),model:e(Yf),fieldTypeById:e(fh),handlerQueue:e(mh)})}),Ch=({props:e,children:t})=>(zf([[Yf,e.args.model],[Xf,e.args.apis],[Kf,e.args.handler]]),Tf(Sh),Tf(sh),Tf(gh),t);function Eh(e,t){const n=new Set(e),r=new Set(t);return e===t||n.size===r.size&&Array.from(n).every(r.has.bind(r))}function Ih(e){return"write"in e}const Dh=new WeakMap,Lh={},{read:Rh,write:Mh}=Sf(null);function Ah(e,t,n){const[r,o,i,,a]=e,s=r.get(t);if(s)return s;if(n===e){let r=o.get(t);return r||(r=[kh(e,t,n),n],o.set(t,r)),r}const l=n??Lh;let c=i.get(l);c||(c=new WeakMap,i.set(l,c));let u=c.get(t);if(!u){const[r,o]=a?Ah(a,t,n):[t];u=[t.read===Rh?r:kh(e,t,o),o],c.set(t,u)}return u}function Ph(e){for(const t of e[5])t()}function qh(e,t,n,r,o){if(n.read===Rh&&Ih(n)&&Ih(t)&&n.write!==Mh&&e!==r){const{write:i}=n;return t.write=Th(e,n.write.bind(n),r,o),()=>{t.write=i}}}function Th(e,t,n,r=n){return function(o,i,...a){return t(function(t){const[r]=Ah(e,t,n);return o(r)},function(t,...o){const[a]=Ah(e,t,n),s=qh(e,a,t,n,r);try{return i(a,...o)}finally{null==s||s()}},...a)}}function kh(e,t,n){const r=Object.getOwnPropertyDescriptors(t);Object.keys(r).filter(e=>["read","write","debugLabel"].includes(e)).forEach(e=>r[e].configurable=!0);const o=Object.getPrototypeOf(t),i=Object.create(o,r);return i.read!==Rh&&(i.read=function(e,t,n){return function(r,o){return t(function(t){const[o]=Ah(e,t,n);return r(o)},o)}}(e,t.read.bind(t),n)),Ih(i)&&Ih(t)&&i.write!==Mh&&(i.write=Th(e,t.write.bind(t),n)),i}function Oh({atoms:e=[],atomFamilies:t=[],parentStore:n,name:r}){const o=new WeakSet(e),i=Dh.get(n),a=(null==i?void 0:i[3])??n,s=[new WeakMap,new WeakMap,new WeakMap,a,i,new Set,void 0],l=s[0],c=s[5],u=function(e){const t=e[3],n=[...vf(t)],r=n[21],o=n[22],i=n[23],a={};let s,l;return n[21]=h(r),n[22]=p,n[23]=h(i),n[24]=function(e){return s??(s=m(e[0],c)),l??(l=[s,m(e[1],u),m(e[2]),g(e[3]),e[4],e[5],b(e[6]),h(e[7]),h(e[8]),h(e[9]),h(e[10]),d(s,e[11]),(t,...r)=>e[12](n,...r),(t,...r)=>e[13](n,...r),h(e[14]),h(e[15]),h(e[16]),h(e[17]),h(e[18]),h(e[19]),h(e[20]),h(e[21]),h(e[22]),h(e[23]),()=>e,e[25],(t,...r)=>e[26](n,...r),(t,...r)=>e[27](n,...r),e[28],...e.slice(25)]),l},bf(...n);function c(t){const n=new WeakMap;return function(r){let o=n.get(r);if(o)return o;const i=t(r);if(!i)return;let a,s;return o=new Proxy(i,{get:(t,n)=>"d"===n?a??(a=m(i.d,function(t){return n=>t(Ah(e,n)[0])})):"p"===n?s??(s=g(i.p)):Reflect.get(i,n)}),n.set(r,o),o}}function u(e){const t=new WeakMap;return function(n){let r=t.get(n);if(r)return r;const o=e(n);return o?(r={...o,d:g(o.d),t:g(o.t),get u(){return o.u},set u(e){o.u=e}},t.set(n,r),r):void 0}}function d(e,t){const n=h(t);return function(t,r,o){const i=e.get(o);if(i)return i;const a=n(t,r,o);return e.set(o,a),e.get(o)}}function p(t,n,r,...i){const[a,s]=Ah(e,r),l=qh(e,a,r,s,e);try{return o(t,n,a,...i)}finally{null==l||l()}}function f(t,n){return function(r,...o){const[i]=Ah(e,r);return(n?n(t):t)(i,...o)}}function h(t){return function(r,o,i,...a){const[s]=Ah(e,i);return t(n,o,s,...a)}}function m(e,t){const n={get:f(e.get.bind(e),t),set:f(e.set.bind(e)),has:f(e.has.bind(e)),delete:f(e.delete.bind(e))};if("function"==typeof e.keys){const t=e,r=n;r.keys=t.keys.bind(t),r[Symbol.iterator]=t[Symbol.iterator].bind(t),Object.defineProperty(n,"size",{enumerable:!1,configurable:!0,get:()=>t.size})}return n}function g(t){return{get size(){return t.size},add:f(t.add.bind(t)),has:f(t.has.bind(t)),delete:f(t.delete.bind(t)),clear:t.clear.bind(t),forEach:e=>t.forEach(f(e)),*[Symbol.iterator](){for(const n of t)yield Ah(e,n)[0]}}}function v(t){if(!t)return;const n=f(t);return n.add=function(n,r){if(void 0===n)return t.add(void 0,r);const[o]=Ah(e,n);return t.add(o,r)},n}function b(e){const t={get f(){return e.f},set f(t){e.f=t}};return Object.defineProperties(t,Object.fromEntries(["r","c","m","u"].map(t=>[t,{get:()=>a[t]??(a[t]=v(e[t])),set(n){delete a[t],e[t]=n},configurable:!0,enumerable:!0}]))),Object.assign(t,e)}}(s);s[6]=u,Object.assign(u,{name:r}),Dh.set(u,s);for(const t of new Set(e))l.set(t,[kh(s,t,s),s]);for(const e of new Set(t)){for(const t of e.getParams()){const n=e(t);l.has(n)||l.set(n,[kh(s,n,s),s])}const t=e.unstable_listen(({type:e,atom:t})=>{"CREATE"!==e||l.has(t)?"REMOVE"===e&&!o.has(t)&&l.delete(t):l.set(t,[kh(s,t,s),s])});c.add(t)}return u}const Nh=function(e,t){return function(n){const{atoms:o=[],atomFamilies:i=[],children:a,scope:s,name:l}=n,c=t(),u=Array.from(o,e=>Array.isArray(e)?e[0]:e);function d(){return[s??Oh({atoms:u,atomFamilies:i,parentStore:c,name:l}),function(e){return c!==e.parentStore||!Eh(u,e.atoms)||!Eh(i,e.atomFamilies)||s!==e.providedScope}]}const[[f,h],g]=m(d);if(h({atoms:u,atomFamilies:i,parentStore:c,providedScope:s})){const e=Dh.get(f);e&&Ph(e),g(d)}return zf(Array.from(o).filter(Array.isArray),{store:f}),p(()=>{const e=Dh.get(f);return()=>{e&&Ph(e)}},[f]),r(e,{store:f,children:a})}}(Lf,Df);var _h=Object.defineProperty,jh=Object.defineProperties,Fh=Object.getOwnPropertyDescriptors,zh=Object.getOwnPropertySymbols,Wh=Object.prototype.hasOwnProperty,$h=Object.prototype.propertyIsEnumerable,Vh=(e,t,n)=>t in e?_h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hh=(e,t)=>{for(var n in t||(t={}))Wh.call(t,n)&&Vh(e,n,t[n]);if(zh)for(var n of zh(t))$h.call(t,n)&&Vh(e,n,t[n]);return e},Bh=(e,t)=>jh(e,Fh(t));function Gh(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function Uh(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function Yh(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function Kh(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(Yh(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const c=Object.entries(e);let u,d,p=-1,f=-1;for(const[e,t]of c)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(u=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&Yh(i)){const r=null==i.initialGroup?void 0:Uh(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:Uh(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return Bh(Hh({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return Bh(Hh({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=Uh(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==u||null==d||u===d&&p===f){if(null!=u&&u===d&&p===f&&Yh(i)){const t=null==i.group?void 0:Uh(e,i.group),r=null!=i.group&&t!==u,o=i.index!==p;if(r||o){const r=null==i.group?u:t;if(null!=r){if(u===r)return Bh(Hh({},e),{[u]:n(e[u],p,i.index)});const t=e[u][p];return Bh(Hh({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(u===d)return Bh(Hh({},e),{[u]:n(e[u],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,v=e[u][p];return Bh(Hh({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[d]:[...e[d].slice(0,f+g),v,...e[d].slice(f+g)]})}(e,t,Gh)}function Xh(e,t){let n=null;const r=new Map,o=new Set;function i(o){let s;if(void 0===t)s=r.get(o);else for(const[e,n]of r)if(t(e,o)){s=n;break}if(void 0!==s){if(!n?.(s[1],o))return s[0];i.remove(o)}const l=e(o);return r.set(o,[l,Date.now()]),a("CREATE",o,l),l}function a(e,t,n){for(const r of o)r({type:e,param:t,atom:n})}return i.unstable_listen=e=>(o.add(e),()=>{o.delete(e)}),i.getParams=()=>r.keys(),i.remove=e=>{if(void 0===t){if(!r.has(e))return;const[t]=r.get(e);r.delete(e),a("REMOVE",e,t)}else for(const[n,[o]]of r)if(t(n,e)){r.delete(n),a("REMOVE",n,o);break}},i.setShouldRemove=e=>{if(n=e,n)for(const[e,[t,o]]of r)n(o,e)&&(r.delete(e),a("REMOVE",e,t))},i}const Jh=({itemIndex:e,sectionIndex:t})=>void 0!==e?`${t}-${e}`:`${t}`,Zh=Sf(),Qh=Sf(e=>e(Zh)?.numberOfSections??0),em=Sf(e=>e(Zh)?.numberOfItemsInSection??[]),tm=Sf(e=>e(Zh)?.keyExtractor??Jh),nm=Sf(e=>e(Zh)?.emptyTexts??(()=>({title:"No items",message:"There are no items to display."}))),rm=Sf(e=>e(Zh)?.onDragEnd),om=Sf(e=>e(Zh)?.onDragOver),im=Sf(e=>e(Zh)?.itemRenderer),am=Sf(e=>e(Zh)?.headerRenderer),sm=Sf(e=>e(Zh)?.dragOverlayRenderer),lm=Sf(e=>e(Zh)?.onClick),cm=Sf(e=>{const t=e(Qh),n=e(em),r=e(tm),o={};for(let e=0;e<t;e++)o[e]=Array.from({length:n[e]},(t,n)=>r({sectionIndex:e,itemIndex:n}));return o}),um=Sf(null),dm=Sf(e=>e(um),(e,t,n)=>{if(null===n)return void t(um,null);const r=e(um);t(um,{...r,...n})}),pm=Xh(e=>Sf(null,(t,n,r)=>{let o;"over"===e?o=t(om):"end"===e&&(o=t(rm),n(dm,null));const{source:i,target:a}=r.operation;if("start"===e)return void n(dm,{id:i.id,startSection:i.data.sectionKey,startIndex:i.data.itemIndex,startSectionIndex:i.data.sectionIndex});if(null===a)return void n(dm,{toIndex:void 0,toSectionIndex:void 0});const s=i.data.sectionIndex!==a.data.sectionIndex;let l;if(s){const e=Kh(t(cm),r)[a.data.sectionIndex].indexOf(i.id);l=-1!==e?e:a.sortable?.index??0}else l=a.sortable?.index??0;if("over"===e){const e=t(dm)?.startIndex;n(dm,{toIndex:!s&&void 0!==e&&l>e?l+1:l,toSectionIndex:a.data.sectionIndex})}o?.({id:i.id,toIndex:l,toSection:a.data.sectionKey,fromSection:i.data.sectionKey,startSection:t(dm)?.startSection??i.data.sectionKey,event:r})})),fm=[Zh,Qh,em,tm,nm,rm,im,am,lm,dm],hm=[pm],mm=({props:e,children:t})=>{const n=kf(Zh);return g(()=>{n(e)},[e,n]),t};var gm=Symbol.for("preact-signals");function vm(){if(wm>1)wm--;else{var e,t=!1;for(!function(){var e=Dm;for(Dm=void 0;void 0!==e;)e.S.v===e.v&&(e.S.i=e.i),e=e.o}();void 0!==Sm;){var n=Sm;for(Sm=void 0,Cm++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Pm(n))try{n.c()}catch(n){t||(e=n,t=!0)}n=r}}if(Cm=0,wm--,t)throw e}}function bm(e){if(wm>0)return e();Im=++Em,wm++;try{return e()}finally{vm()}}var ym=void 0;function xm(e){var t=ym;ym=void 0;try{return e()}finally{ym=t}}var Sm=void 0,wm=0,Cm=0,Em=0,Im=0,Dm=void 0,Lm=0;function Rm(e){if(void 0!==ym){var t=e.n;if(void 0===t||t.t!==ym)return t={i:0,S:e,p:ym.s,n:void 0,t:ym,e:void 0,x:void 0,r:t},void 0!==ym.s&&(ym.s.n=t),ym.s=t,e.n=t,32&ym.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=ym.s,t.n=void 0,ym.s.n=t,ym.s=t),t}}function Mm(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function Am(e,t){return new Mm(e,t)}function Pm(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function qm(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Tm(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function km(e,t){Mm.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Lm-1,this.f=4}function Om(e,t){return new km(e,t)}function Nm(e){var t=e.m;if(e.m=void 0,"function"==typeof t){wm++;var n=ym;ym=void 0;try{t()}catch(t){throw e.f&=-2,e.f|=8,_m(e),t}finally{ym=n,vm()}}}function _m(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Nm(e)}function jm(e){if(ym!==this)throw new Error("Out-of-order effect");Tm(this),ym=e,this.f&=-2,8&this.f&&_m(this),vm()}function Fm(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name}function zm(e,t){var n=new Fm(e,t);try{n.c()}catch(e){throw n.d(),e}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}Mm.prototype.brand=gm,Mm.prototype.h=function(){return!0},Mm.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:xm(function(){var e;null==(e=t.W)||e.call(t)}))},Mm.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&xm(function(){var e;null==(e=t.Z)||e.call(t)}))}},Mm.prototype.subscribe=function(e){var t=this;return zm(function(){var n=t.value;xm(function(){return e(n)})},{name:"sub"})},Mm.prototype.valueOf=function(){return this.value},Mm.prototype.toString=function(){return this.value+""},Mm.prototype.toJSON=function(){return this.value},Mm.prototype.peek=function(){var e=this;return xm(function(){return e.value})},Object.defineProperty(Mm.prototype,"value",{get:function(){var e=Rm(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Cm>100)throw new Error("Cycle detected");!function(e){0!==wm&&0===Cm&&e.l!==Im&&(e.l=Im,Dm={S:e,v:e.v,i:e.i,o:Dm})}(this),this.v=e,this.i++,Lm++,wm++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{vm()}}}}),km.prototype=new Mm,km.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===Lm)return!0;if(this.g=Lm,this.f|=1,this.i>0&&!Pm(this))return this.f&=-2,!0;var e=ym;try{qm(this),ym=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return ym=e,Tm(this),this.f&=-2,!0},km.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}Mm.prototype.S.call(this,e)},km.prototype.U=function(e){if(void 0!==this.t&&(Mm.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},km.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(km.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=Rm(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Fm.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},Fm.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Nm(this),qm(this),wm++;var e=ym;return ym=this,jm.bind(this,e)},Fm.prototype.N=function(){2&this.f||(this.f|=2,this.u=Sm,Sm=this)},Fm.prototype.d=function(){this.f|=8,1&this.f||_m(this)},Fm.prototype.dispose=function(){this.d()};var Wm,$m,Vm,Hm,Bm,Gm,Um,Ym,Km,Xm,Jm,Zm,Qm,eg,tg,ng,rg,og,ig,ag,sg=Object.create,lg=Object.defineProperty,cg=Object.defineProperties,ug=Object.getOwnPropertyDescriptor,dg=Object.getOwnPropertyDescriptors,pg=Object.getOwnPropertySymbols,fg=Object.prototype.hasOwnProperty,hg=Object.prototype.propertyIsEnumerable,mg=e=>{throw TypeError(e)},gg=(e,t,n)=>t in e?lg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vg=(e,t)=>lg(e,"name",{value:t,configurable:!0}),bg=["class","method","getter","setter","accessor","field","value","get","set"],yg=e=>void 0!==e&&"function"!=typeof e?mg("Function expected"):e,xg=(e,t,n,r,o)=>({kind:bg[e],name:t,metadata:r,addInitializer:e=>n._?mg("Already initialized"):o.push(yg(e||null))}),Sg=(e,t)=>{return gg(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r},wg=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},Cg=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=bg[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&ug(d<4?o:{get[n](){return Dg(this,i)},set[n](e){return Rg(this,i,e)}},n));d?f&&d<4&&vg(i,(d>2?"set ":d>1?"get ":"")+n):vg(o,n);for(var y=r.length-1;y>=0;y--)c=xg(d,n,l={},e[3],v),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>Ig(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?Dg:Mg)(e,o,4^d?i:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>Rg(e,o,t,4^d?i:b.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:b[m]:d>4?void 0:{get:b.get,set:b.set}:o,c),l._=1,4^d||void 0===s?yg(s)&&(d>4?g.unshift(s):d?f?i=s:b[m]=s:o=s):"object"!=typeof s||null===s?mg("Object expected"):(yg(a=s.get)&&(b.get=a),yg(a=s.set)&&(b.set=a),yg(a=s.init)&&g.unshift(a));return d||Sg(e,o),b&&lg(o,n,b),f?4^d?i:b:o},Eg=(e,t,n)=>t.has(e)||mg("Cannot "+n),Ig=(e,t)=>Object(t)!==t?mg('Cannot use the "in" operator on this value'):e.has(t),Dg=(e,t,n)=>(Eg(e,t,"read from private field"),n?n.call(e):t.get(e)),Lg=(e,t,n)=>t.has(e)?mg("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Rg=(e,t,n,r)=>(Eg(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Mg=(e,t,n)=>(Eg(e,t,"access private method"),n);function Ag(e,t){if(t){let n;return Om(()=>{const r=e();return r&&n&&t(n,r)?n:(n=r,r)})}return Om(e)}function Pg(e,t){if(Object.is(e,t))return!0;if(null===e||null===t)return!1;if("function"==typeof e&&"function"==typeof t)return e===t;if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;return!e.some((e,n)=>!Pg(e,t[n]))}if("object"==typeof e&&"object"==typeof t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;return!n.some(n=>!Pg(e[n],t[n]))}return!1}function qg({get:e},t){return{init:e=>Am(e),get(){return e.call(this).value},set(t){const n=e.call(this);n.peek()!==t&&(n.value=t)}}}function Tg(e,t){const n=new WeakMap;return function(){let t=n.get(this);return t||(t=Ag(e.bind(this)),n.set(this,t)),t.value}}function kg(e=!0){return function(t,n){n.addInitializer(function(){const t="field"===n.kind||n.static?this:Object.getPrototypeOf(this),r=Object.getOwnPropertyDescriptor(t,n.name);r&&Object.defineProperty(t,n.name,((e,t)=>cg(e,dg(t)))(((e,t)=>{for(var n in t||(t={}))fg.call(t,n)&&gg(e,n,t[n]);if(pg)for(var n of pg(t))hg.call(t,n)&&gg(e,n,t[n]);return e})({},r),{enumerable:e}))})}}function Og(...e){const t=e.map(e=>zm(e));return()=>t.forEach(e=>e())}Gm=[qg],Bm=[qg],Hm=[qg],Vm=[kg()],$m=[kg()],Wm=[kg()];var Ng,_g=class{constructor(e,t=Object.is){this.defaultValue=e,this.equals=t,wg(Um,5,this),Lg(this,Zm),Lg(this,Ym,wg(Um,8,this)),wg(Um,11,this),Lg(this,Qm,wg(Um,12,this)),wg(Um,15,this),Lg(this,rg,wg(Um,16,this)),wg(Um,19,this),this.reset=this.reset.bind(this),this.reset()}get current(){return Dg(this,Zm,ig)}get initial(){return Dg(this,Zm,Xm)}get previous(){return Dg(this,Zm,tg)}set current(e){const t=xm(()=>Dg(this,Zm,ig));e&&t&&this.equals(t,e)||bm(()=>{Dg(this,Zm,Xm)||Rg(this,Zm,e,Jm),Rg(this,Zm,t,ng),Rg(this,Zm,e,ag)})}reset(e=this.defaultValue){bm(()=>{Rg(this,Zm,void 0,ng),Rg(this,Zm,e,Jm),Rg(this,Zm,e,ag)})}};function jg(e){return xm(()=>{const t={};for(const n in e)t[n]=e[n];return t})}Um=[,,,sg(null)],Ym=new WeakMap,Zm=new WeakSet,Qm=new WeakMap,rg=new WeakMap,Km=Cg(Um,20,"#initial",Gm,Zm,Ym),Xm=Km.get,Jm=Km.set,eg=Cg(Um,20,"#previous",Bm,Zm,Qm),tg=eg.get,ng=eg.set,og=Cg(Um,20,"#current",Hm,Zm,rg),ig=og.get,ag=og.set,Cg(Um,2,"current",Vm,_g),Cg(Um,2,"initial",$m,_g),Cg(Um,2,"previous",Wm,_g),Sg(Um,_g);Ng=new WeakMap;var Fg,zg,Wg,$g,Vg,Hg=Object.create,Bg=Object.defineProperty,Gg=Object.getOwnPropertyDescriptor,Ug=Object.getOwnPropertySymbols,Yg=Object.prototype.hasOwnProperty,Kg=Object.prototype.propertyIsEnumerable,Xg=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Jg=e=>{throw TypeError(e)},Zg=Math.pow,Qg=(e,t,n)=>t in e?Bg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ev=["class","method","getter","setter","accessor","field","value","get","set"],tv=e=>void 0!==e&&"function"!=typeof e?Jg("Function expected"):e,nv=(e,t,n,r,o)=>({kind:ev[e],name:t,metadata:r,addInitializer:e=>n._?Jg("Already initialized"):o.push(tv(e||null))}),rv=(e,t,n,r,o,i)=>{for(var a,s,l,c,u=7&t,d=ev[u+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,Gg(o,n)),h=r.length-1;h>=0;h--)(l=nv(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,tv(a)&&(f[d]=a);return f&&Bg(o,n,f),o},ov=(e,t,n)=>t.has(e)||Jg("Cannot "+n),iv=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},av=class e{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r,this.scale={x:1,y:1}}get inverseScale(){return{x:1/this.scale.x,y:1/this.scale.y}}translate(t,n){const{top:r,left:o,width:i,height:a,scale:s}=this,l=new e(o+t,r+n,i,a);return l.scale=((e,t)=>{for(var n in t||(t={}))Yg.call(t,n)&&Qg(e,n,t[n]);if(Ug)for(var n of Ug(t))Kg.call(t,n)&&Qg(e,n,t[n]);return e})({},s),l}get boundingRectangle(){const{width:e,height:t,left:n,top:r,right:o,bottom:i}=this;return{width:e,height:t,left:n,top:r,right:o,bottom:i}}get center(){const{left:e,top:t,right:n,bottom:r}=this;return new iv((e+n)/2,(t+r)/2)}get area(){const{width:e,height:t}=this;return e*t}equals(t){if(!(t instanceof e))return!1;const{left:n,top:r,width:o,height:i}=this;return n===t.left&&r===t.top&&o===t.width&&i===t.height}containsPoint(e){const{top:t,left:n,bottom:r,right:o}=this;return t<=e.y&&e.y<=r&&n<=e.x&&e.x<=o}intersectionArea(t){return t instanceof e?function(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){return a*s}return 0}(this,t):0}intersectionRatio(e){const{area:t}=this,n=this.intersectionArea(e);return n/(e.area+t-n)}get bottom(){const{top:e,height:t}=this;return e+t}get right(){const{left:e,width:t}=this;return e+t}get aspectRatio(){const{width:e,height:t}=this;return e/t}get corners(){return[{x:this.left,y:this.top},{x:this.right,y:this.top},{x:this.left,y:this.bottom},{x:this.right,y:this.bottom}]}static from({top:t,left:n,width:r,height:o}){return new e(n,t,r,o)}static delta(e,t,n={x:"center",y:"center"}){const r=(e,t)=>{const r=n[t],o="x"===t?e.left:e.top,i="x"===t?e.width:e.height;return"start"==r?o:"end"==r?o+i:o+i/2};return iv.delta({x:r(e,"x"),y:r(e,"y")},{x:r(t,"x"),y:r(t,"y")})}static intersectionRatio(t,n){return e.from(t).intersectionRatio(e.from(n))}};var sv,lv=class extends(Wg=_g,zg=[Tg],Fg=[Tg],Wg){constructor(e){var t,n,r;super(iv.from(e),(e,t)=>iv.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})(Vg,5,this),t=this,r=0,(n=$g).has(t)?Jg("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return iv.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=iv.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(ov(a=this,s=$g,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);bm(()=>{((e,t,n)=>{ov(e,t,"write to private field"),t.set(e,n)})(this,$g,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(iv.from(e)),this.velocity={x:0,y:0}}};function cv({x:e,y:t},n){const r=Math.abs(e),o=Math.abs(t);return"number"==typeof n?Math.sqrt(Zg(r,2)+Zg(o,2))>n:"x"in n&&"y"in n?r>n.x&&o>n.y:"x"in n?r>n.x:"y"in n&&o>n.y}Vg=(e=>{var t;return[,,,Hg(null!=(t=null==e?void 0:e[Xg("metadata")])?t:null)]})(Wg),$g=new WeakMap,rv(Vg,2,"delta",zg,lv),rv(Vg,2,"direction",Fg,lv),sv=Vg,Qg(lv,Xg("metadata"),sv[3]);var uv,dv,pv,fv,hv=(e=>(e.Horizontal="x",e.Vertical="y",e))(hv||{}),mv=Object.values(hv),gv=Object.create,vv=Object.defineProperty,bv=Object.defineProperties,yv=Object.getOwnPropertyDescriptor,xv=Object.getOwnPropertyDescriptors,Sv=Object.getOwnPropertySymbols,wv=Object.prototype.hasOwnProperty,Cv=Object.prototype.propertyIsEnumerable,Ev=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Iv=e=>{throw TypeError(e)},Dv=(e,t,n)=>t in e?vv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lv=(e,t)=>{for(var n in t||(t={}))wv.call(t,n)&&Dv(e,n,t[n]);if(Sv)for(var n of Sv(t))Cv.call(t,n)&&Dv(e,n,t[n]);return e},Rv=(e,t)=>bv(e,xv(t)),Mv=(e,t)=>vv(e,"name",{value:t,configurable:!0}),Av=(e,t)=>{var n={};for(var r in e)wv.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Sv)for(var r of Sv(e))t.indexOf(r)<0&&Cv.call(e,r)&&(n[r]=e[r]);return n},Pv=e=>{var t;return[,,,gv(null!=(t=null==e?void 0:e[Ev("metadata")])?t:null)]},qv=["class","method","getter","setter","accessor","field","value","get","set"],Tv=e=>void 0!==e&&"function"!=typeof e?Iv("Function expected"):e,kv=(e,t,n,r,o)=>({kind:qv[e],name:t,metadata:r,addInitializer:e=>n._?Iv("Already initialized"):o.push(Tv(e||null))}),Ov=(e,t)=>Dv(t,Ev("metadata"),e[3]),Nv=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},_v=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=qv[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&yv(d<4?o:{get[n](){return zv(this,i)},set[n](e){return $v(this,i,e)}},n));d?f&&d<4&&Mv(i,(d>2?"set ":d>1?"get ":"")+n):Mv(o,n);for(var y=r.length-1;y>=0;y--)c=kv(d,n,l={},e[3],v),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>Fv(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?zv:Vv)(e,o,4^d?i:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>$v(e,o,t,4^d?i:b.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:b[m]:d>4?void 0:{get:b.get,set:b.set}:o,c),l._=1,4^d||void 0===s?Tv(s)&&(d>4?g.unshift(s):d?f?i=s:b[m]=s:o=s):"object"!=typeof s||null===s?Iv("Object expected"):(Tv(a=s.get)&&(b.get=a),Tv(a=s.set)&&(b.set=a),Tv(a=s.init)&&g.unshift(a));return d||Ov(e,o),b&&vv(o,n,b),f?4^d?i:b:o},jv=(e,t,n)=>t.has(e)||Iv("Cannot "+n),Fv=(e,t)=>Object(t)!==t?Iv('Cannot use the "in" operator on this value'):e.has(t),zv=(e,t,n)=>(jv(e,t,"read from private field"),n?n.call(e):t.get(e)),Wv=(e,t,n)=>t.has(e)?Iv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$v=(e,t,n,r)=>(jv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Vv=(e,t,n)=>(jv(e,t,"access private method"),n);function Hv(e,t){return{plugin:e,options:t}}function Bv(e){return t=>Hv(e,t)}function Gv(e){return"function"==typeof e?{plugin:e,options:void 0}:e}uv=[qg];var Uv=class{constructor(e,t){this.manager=e,this.options=t,Wv(this,pv,Nv(dv,8,this,!1)),Nv(dv,11,this),Wv(this,fv,new Set)}enable(){this.disabled=!1}disable(){this.disabled=!0}isDisabled(){return xm(()=>this.disabled)}configure(e){this.options=e}registerEffect(e){const t=zm(e.bind(this));return zv(this,fv).add(t),t}destroy(){zv(this,fv).forEach(e=>e())}static configure(e){return Hv(this,e)}};dv=Pv(null),pv=new WeakMap,fv=new WeakMap,_v(dv,4,"disabled",uv,Uv,pv),Ov(dv,Uv);var Yv,Kv=class extends Uv{},Xv=class{constructor(e){this.manager=e,this.instances=new Map,Wv(this,Yv,[])}get values(){return Array.from(this.instances.values())}set values(e){const t=e.map(Gv).reduce((e,t)=>{const n=e.find(({plugin:e})=>e===t.plugin);return n?(n.options=t.options,e):[...e,t]},[]),n=t.map(({plugin:e})=>e);for(const e of zv(this,Yv))if(!n.includes(e)){if(e.prototype instanceof Kv)continue;this.unregister(e)}for(const{plugin:e,options:n}of t)this.register(e,n);$v(this,Yv,n)}get(e){return this.instances.get(e)}register(e,t){const n=this.instances.get(e);if(n)return n.options!==t&&(n.options=t),n;const r=new e(this.manager,t);return this.instances.set(e,r),r}unregister(e){const t=this.instances.get(e);t&&(t.destroy(),this.instances.delete(e))}destroy(){for(const e of this.instances.values())e.destroy();this.instances.clear()}};function Jv(e,t){return e.priority===t.priority?e.type===t.type?t.value-e.value:t.type-e.type:t.priority-e.priority}Yv=new WeakMap;var Zv,Qv,eb,tb,nb,rb,ob,ib,ab,sb,lb,cb,ub=[],db=class extends Uv{constructor(e){super(e),Wv(this,Zv),Wv(this,Qv),this.computeCollisions=this.computeCollisions.bind(this),$v(this,Qv,Am(ub)),this.destroy=Og(()=>{const e=this.computeCollisions(),t=xm(()=>this.manager.dragOperation.position.current);if(e!==ub){const e=zv(this,Zv);if($v(this,Zv,t),e&&t.x==e.x&&t.y==e.y)return}else $v(this,Zv,void 0);zv(this,Qv).value=e},()=>{const{dragOperation:e}=this.manager;e.status.initialized&&this.forceUpdate()})}forceUpdate(e=!0){xm(()=>{e?zv(this,Qv).value=this.computeCollisions():$v(this,Zv,void 0)})}computeCollisions(e,t){const{registry:n,dragOperation:r}=this.manager,{source:o,shape:i,status:a}=r;if(!a.initialized||!i)return ub;const s=[],l=[];for(const i of null!=e?e:n.droppables){if(i.disabled)continue;if(o&&!i.accepts(o))continue;const e=null!=t?t:i.collisionDetector;if(!e)continue;l.push(i),i.shape;const n=xm(()=>e({droppable:i,dragOperation:r}));n&&(null!=i.collisionPriority&&(n.priority=i.collisionPriority),s.push(n))}return 0===l.length?ub:(s.sort(Jv),s)}get collisions(){return zv(this,Qv).value}};Zv=new WeakMap,Qv=new WeakMap,nb=[qg],tb=[qg],eb=[qg];var pb=class e{constructor(e,t){Wv(this,ab,Nv(ib,8,this)),Nv(ib,11,this),Wv(this,sb),Wv(this,lb,Nv(ib,12,this)),Nv(ib,15,this),Wv(this,cb,Nv(ib,16,this)),Nv(ib,19,this);const{effects:n,id:r,data:o={},disabled:i=!1,register:a=!0}=e;let s=r;$v(this,sb,Am(r)),this.manager=t,this.data=o,this.disabled=i,this.effects=()=>{var e;return[()=>{const{id:e,manager:t}=this;if(e!==s)return s=e,null==t||t.registry.register(this),()=>null==t?void 0:t.registry.unregister(this)},...null!=(e=null==n?void 0:n())?e:[]]},this.register=this.register.bind(this),this.unregister=this.unregister.bind(this),this.destroy=this.destroy.bind(this),t&&a&&queueMicrotask(this.register)}get id(){var t,n;const r=zv(this,sb).value;return null!=(n=null==(t=e.pendingIdChanges)?void 0:t.get(this))?n:r}set id(t){var n,r;t!==(null!=(r=null==(n=e.pendingIdChanges)?void 0:n.get(this))?r:zv(this,sb).peek())&&(e.pendingIdChanges||(e.pendingIdChanges=new Map,queueMicrotask(()=>{var t;return Vv(t=e,rb,ob).call(t)})),e.pendingIdChanges.set(this,t))}register(){var e;return null==(e=this.manager)?void 0:e.registry.register(this)}unregister(){var e;null==(e=this.manager)||e.registry.unregister(this)}destroy(){var e;null==(e=this.manager)||e.registry.unregister(this)}};ib=Pv(null),rb=new WeakSet,ob=function(){const e=pb.pendingIdChanges;pb.pendingIdChanges=null,e&&bm(()=>{for(const[t,n]of e)zv(t,sb).value=n})},ab=new WeakMap,sb=new WeakMap,lb=new WeakMap,cb=new WeakMap,_v(ib,4,"manager",nb,pb,ab),_v(ib,4,"data",tb,pb,lb),_v(ib,4,"disabled",eb,pb,cb),Wv(pb,rb),Ov(ib,pb),pb.pendingIdChanges=null;var fb,hb,mb,gb,vb,bb,yb,xb,Sb,wb,Cb,Eb,Ib,Db,Lb,Rb,Mb,Ab,Pb,qb,Tb,kb,Ob,Nb,_b=pb,jb=class{constructor(){this.map=Am(new Map),this.cleanupFunctions=new WeakMap,this.register=(e,t)=>{const n=this.map.peek(),r=n.get(e),o=()=>this.unregister(e,t);if(r===t)return o;if(r&&r.id===e){const e=this.cleanupFunctions.get(r);null==e||e(),this.cleanupFunctions.delete(r)}const i=new Map(n);for(const[r,o]of n)if(o===t&&r!==e){i.delete(r);break}i.set(e,t),this.map.value=i;const a=Og(...t.effects());return this.cleanupFunctions.set(t,a),o},this.unregister=(e,t)=>{const n=this.map.peek();if(n.get(e)!==t)return;const r=this.cleanupFunctions.get(t);null==r||r(),this.cleanupFunctions.delete(t);const o=new Map(n);o.delete(e),this.map.value=o}}[Symbol.iterator](){return this.map.peek().values()}get value(){return this.map.value.values()}has(e){return this.map.value.has(e)}get(e){return this.map.value.get(e)}destroy(){for(const e of this){const t=this.cleanupFunctions.get(e);null==t||t(),e.destroy()}this.map.value=new Map}},Fb=class extends(yb=_b,bb=[qg],vb=[qg],gb=[qg],mb=[Tg],hb=[Tg],fb=[Tg],yb){constructor(e,t){var n=e,{modifiers:r,type:o,sensors:i,plugins:a,effects:s}=n,l=Av(n,["modifiers","type","sensors","plugins","effects"]);super(Rv(Lv({},l),{effects:()=>{var e;return[...null!=(e=null==s?void 0:s())?e:[],()=>{const{manager:e,plugins:t}=this;if(e&&t)for(const n of t){const{plugin:t}=Gv(n);e.registry.plugins.register(t)}}]}}),t),Nv(xb,5,this),Wv(this,Sb,Nv(xb,8,this)),Nv(xb,11,this),Wv(this,wb,Nv(xb,12,this)),Nv(xb,15,this),Wv(this,Cb,Nv(xb,16,this,this.isDragSource?"dragging":"idle")),Nv(xb,19,this),this.type=o,this.sensors=i,this.modifiers=r,this.alignment=l.alignment,this.plugins=a}pluginConfig(e){if(this.plugins)for(const t of this.plugins){const n=Gv(t);if(n.plugin===e)return n.options}}get isDropping(){return"dropping"===this.status&&this.isDragSource}get isDragging(){return"dragging"===this.status&&this.isDragSource}get isDragSource(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.source)?void 0:t.id)===this.id}};xb=Pv(yb),Sb=new WeakMap,wb=new WeakMap,Cb=new WeakMap,_v(xb,4,"type",bb,Fb,Sb),_v(xb,4,"modifiers",vb,Fb,wb),_v(xb,4,"status",gb,Fb,Cb),_v(xb,2,"isDropping",mb,Fb),_v(xb,2,"isDragging",hb,Fb),_v(xb,2,"isDragSource",fb,Fb),Ov(xb,Fb);var zb=class extends(Ab=_b,Mb=[qg],Rb=[qg],Lb=[qg],Db=[qg],Ib=[qg],Eb=[Tg],Ab){constructor(e,t){var n=e,{accept:r,collisionDetector:o,collisionPriority:i,type:a}=n;super(Av(n,["accept","collisionDetector","collisionPriority","type"]),t),Nv(Pb,5,this),Wv(this,qb,Nv(Pb,8,this)),Nv(Pb,11,this),Wv(this,Tb,Nv(Pb,12,this)),Nv(Pb,15,this),Wv(this,kb,Nv(Pb,16,this)),Nv(Pb,19,this),Wv(this,Ob,Nv(Pb,20,this)),Nv(Pb,23,this),Wv(this,Nb,Nv(Pb,24,this)),Nv(Pb,27,this),this.accept=r,this.collisionDetector=o,this.collisionPriority=i,this.type=a}accepts(e){const{accept:t}=this;return!t||("function"==typeof t?t(e):!!e.type&&(Array.isArray(t)?t.includes(e.type):e.type===t))}get isDropTarget(){var e,t;return(null==(t=null==(e=this.manager)?void 0:e.dragOperation.target)?void 0:t.id)===this.id}};Pb=Pv(Ab),qb=new WeakMap,Tb=new WeakMap,kb=new WeakMap,Ob=new WeakMap,Nb=new WeakMap,_v(Pb,4,"accept",Mb,zb,qb),_v(Pb,4,"type",Rb,zb,Tb),_v(Pb,4,"collisionDetector",Lb,zb,kb),_v(Pb,4,"collisionPriority",Db,zb,Ob),_v(Pb,4,"shape",Ib,zb,Nb),_v(Pb,2,"isDropTarget",Eb,zb),Ov(Pb,zb);var Wb=class{constructor(){this.registry=new Map}addEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));return r.add(t),n.set(e,r),()=>this.removeEventListener(e,t)}removeEventListener(e,t){const{registry:n}=this,r=new Set(n.get(e));r.delete(t),n.set(e,r)}dispatch(e,...t){const{registry:n}=this,r=n.get(e);if(r)for(const e of r)e(...t)}},$b=class extends Wb{constructor(e){super(),this.manager=e}dispatch(e,t){const n=[t,this.manager];super.dispatch(e,...n)}};function Vb(e,t=!0){let n=!1;return Rv(Lv({},e),{cancelable:t,get defaultPrevented(){return n},preventDefault(){t&&(n=!0)}})}var Hb,Bb,Gb,Ub,Yb,Kb,Xb,Jb,Zb,Qb=class extends Kv{constructor(e){super(e);let t=[];this.destroy=Og(()=>{const{dragOperation:n,collisionObserver:r}=e;n.status.initializing&&(t=[],r.enable())},()=>{const{collisionObserver:n,monitor:r}=e,{collisions:o}=n;if(n.isDisabled())return;if(_b.pendingIdChanges)return;const i=Vb({collisions:o});if(r.dispatch("collision",i),i.defaultPrevented)return;if(((e,t)=>e.map(({id:e})=>e).join("")===t.map(({id:e})=>e).join(""))(o,t))return;t=o;const[a]=o;xm(()=>{var t;(null==a?void 0:a.id)!==(null==(t=e.dragOperation.target)?void 0:t.id)&&(n.disable(),e.actions.setDropTarget(null==a?void 0:a.id).then(()=>{n.enable()}))})})}},ey=(e=>(e[e.Lowest=0]="Lowest",e[e.Low=1]="Low",e[e.Normal=2]="Normal",e[e.High=3]="High",e[e.Highest=4]="Highest",e))(ey||{}),ty=(e=>(e[e.Collision=0]="Collision",e[e.ShapeIntersection=1]="ShapeIntersection",e[e.PointerIntersection=2]="PointerIntersection",e))(ty||{});Xb=[qg],Kb=[Tg],Yb=[Tg],Ub=[Tg],Gb=[Tg],Bb=[Tg],Hb=[Tg];var ny=class{constructor(){Nv(Jb,5,this),Wv(this,Zb,Nv(Jb,8,this,"idle")),Nv(Jb,11,this)}get current(){return this.value}get idle(){return"idle"===this.value}get initializing(){return"initializing"===this.value}get initialized(){const{value:e}=this;return"idle"!==e&&"initialization-pending"!==e}get dragging(){return"dragging"===this.value}get dropped(){return"dropped"===this.value}set(e){this.value=e}};Jb=Pv(null),Zb=new WeakMap,_v(Jb,4,"value",Xb,ny,Zb),_v(Jb,2,"current",Kb,ny),_v(Jb,2,"idle",Yb,ny),_v(Jb,2,"initializing",Ub,ny),_v(Jb,2,"initialized",Gb,ny),_v(Jb,2,"dragging",Bb,ny),_v(Jb,2,"dropped",Hb,ny),Ov(Jb,ny);var ry,oy=class{constructor(e){this.manager=e}setDragSource(e){const{dragOperation:t}=this.manager;t.sourceIdentifier="string"==typeof e||"number"==typeof e?e:e.id}setDropTarget(e){return xm(()=>{const{dragOperation:t}=this.manager,n=null!=e?e:null;if(t.targetIdentifier===n)return Promise.resolve(!1);t.targetIdentifier=n;const r=Vb({operation:t.snapshot()});return t.status.dragging&&this.manager.monitor.dispatch("dragover",r),this.manager.renderer.rendering.then(()=>r.defaultPrevented)})}start(e){return xm(()=>{const{dragOperation:t}=this.manager;null!=e.source&&this.setDragSource(e.source);if(!t.source)throw new Error("Cannot start a drag operation without a drag source");if(!t.status.idle)throw new Error("Cannot start a drag operation while another is active");const n=new AbortController,{event:r,coordinates:o}=e;bm(()=>{t.status.set("initialization-pending"),t.shape=null,t.canceled=!1,t.activatorEvent=null!=r?r:null,t.position.reset(o)});const i=Vb({operation:t.snapshot()});return this.manager.monitor.dispatch("beforedragstart",i),i.defaultPrevented?(t.reset(),n.abort(),n):(t.status.set("initializing"),t.controller=n,this.manager.renderer.rendering.then(()=>{if(n.signal.aborted)return;const{status:e}=t;"initializing"===e.current&&bm(()=>{t.status.set("dragging"),this.manager.monitor.dispatch("dragstart",{nativeEvent:r,operation:t.snapshot(),cancelable:!1})})}),n)})}move(e){return xm(()=>{var t,n;const{dragOperation:r}=this.manager,{status:o,controller:i}=r;if(!o.dragging||!i||i.signal.aborted)return;const a=Vb({nativeEvent:e.event,operation:r.snapshot(),by:e.by,to:e.to},null==(t=e.cancelable)||t);(null==(n=e.propagate)||n)&&this.manager.monitor.dispatch("dragmove",a),queueMicrotask(()=>{var t,n,o,i,s;if(a.defaultPrevented)return;const l=null!=(s=e.to)?s:{x:r.position.current.x+(null!=(n=null==(t=e.by)?void 0:t.x)?n:0),y:r.position.current.y+(null!=(i=null==(o=e.by)?void 0:o.y)?i:0)};r.position.current=l})})}stop(e={}){return xm(()=>{var t,n;const{dragOperation:r}=this.manager,{controller:o}=r;if(!o||o.signal.aborted)return;let i;o.abort();const a=()=>{this.manager.renderer.rendering.then(()=>{r.status.set("dropped");const e=xm(()=>{var e;return"dropping"===(null==(e=r.source)?void 0:e.status)}),t=()=>{r.controller===o&&(r.controller=void 0),r.reset()};if(e){const{source:e}=r,n=zm(()=>{"idle"===(null==e?void 0:e.status)&&(n(),t())})}else this.manager.renderer.rendering.then(t)})};r.canceled=null!=(t=e.canceled)&&t,this.manager.monitor.dispatch("dragend",{nativeEvent:e.event,operation:r.snapshot(),canceled:null!=(n=e.canceled)&&n,suspend:()=>{const e={resume:()=>{},abort:()=>{}};return i=new Promise((t,n)=>{e.resume=t,e.abort=n}),e}}),i?i.then(a).catch(()=>r.reset()):a()})}},iy=class extends Uv{constructor(e,t){super(e,t),this.manager=e,this.options=t}},ay=class extends AbortController{constructor(e,t){super(),this.constraints=e,this.onActivate=t,this.activated=!1;for(const t of null!=e?e:[])t.controller=this}onEvent(e){var t;if(!this.activated)if(null==(t=this.constraints)?void 0:t.length)for(const t of this.constraints)t.onEvent(e);else this.activate(e)}activate(e){this.activated||(this.activated=!0,this.onActivate(e))}abort(e){this.activated=!1,super.abort(e)}},sy=class{constructor(e){this.options=e,Wv(this,ry)}set controller(e){$v(this,ry,e),e.signal.addEventListener("abort",()=>this.abort())}activate(e){var t;null==(t=zv(this,ry))||t.activate(e)}};ry=new WeakMap;var ly,cy,uy,dy,py,fy,hy,my,gy,vy,by,yy,xy,Sy,wy,Cy,Ey,Iy,Dy,Ly=class extends Uv{constructor(e,t){super(e,t),this.manager=e,this.options=t}apply(e){return e.transform}},Ry=class{constructor(e){this.draggables=new jb,this.droppables=new jb,this.plugins=new Xv(e),this.sensors=new Xv(e),this.modifiers=new Xv(e)}register(e,t){if(e instanceof Fb)return this.draggables.register(e.id,e);if(e instanceof zb)return this.droppables.register(e.id,e);if(e.prototype instanceof Ly)return this.modifiers.register(e,t);if(e.prototype instanceof iy)return this.sensors.register(e,t);if(e.prototype instanceof Uv)return this.plugins.register(e,t);throw new Error("Invalid instance type")}unregister(e){if(e instanceof _b)return e instanceof Fb?this.draggables.unregister(e.id,e):e instanceof zb?this.droppables.unregister(e.id,e):()=>{};if(e.prototype instanceof Ly)return this.modifiers.unregister(e);if(e.prototype instanceof iy)return this.sensors.unregister(e);if(e.prototype instanceof Uv)return this.plugins.unregister(e);throw new Error("Invalid instance type")}destroy(){this.draggables.destroy(),this.droppables.destroy(),this.plugins.destroy(),this.sensors.destroy(),this.modifiers.destroy()}};gy=[Tg],my=[qg],hy=[qg],fy=[qg],py=[qg],dy=[qg],uy=[Tg],cy=[Tg],ly=[Tg];var My=class{constructor(e){Nv(xy,5,this),Wv(this,vy),Wv(this,by),Wv(this,yy,new _g(void 0,(e,t)=>e&&t?e.equals(t):e===t)),this.status=new ny,Wv(this,Sy,Nv(xy,8,this,!1)),Nv(xy,11,this),Wv(this,wy,Nv(xy,12,this,null)),Nv(xy,15,this),Wv(this,Cy,Nv(xy,16,this,null)),Nv(xy,19,this),Wv(this,Ey,Nv(xy,20,this,null)),Nv(xy,23,this),Wv(this,Iy,Nv(xy,24,this,[])),Nv(xy,27,this),this.position=new lv({x:0,y:0}),Wv(this,Dy,{x:0,y:0}),$v(this,vy,e)}get shape(){const{current:e,initial:t,previous:n}=zv(this,yy);return e&&t?{current:e,initial:t,previous:n}:null}set shape(e){e?zv(this,yy).current=e:zv(this,yy).reset()}get source(){var e;const t=this.sourceIdentifier;if(null==t)return null;const n=zv(this,vy).registry.draggables.get(t);return n&&$v(this,by,n),null!=(e=null!=n?n:zv(this,by))?e:null}get target(){var e;const t=this.targetIdentifier;return null!=t&&null!=(e=zv(this,vy).registry.droppables.get(t))?e:null}get transform(){const{x:e,y:t}=this.position.delta;let n={x:e,y:t};for(const e of this.modifiers)n=e.apply(Rv(Lv({},this.snapshot()),{transform:n}));return $v(this,Dy,n),n}snapshot(){return xm(()=>({source:this.source,target:this.target,activatorEvent:this.activatorEvent,transform:zv(this,Dy),shape:this.shape?jg(this.shape):null,position:jg(this.position),status:jg(this.status),canceled:this.canceled}))}reset(){bm(()=>{this.status.set("idle"),this.sourceIdentifier=null,this.targetIdentifier=null,zv(this,yy).reset(),this.position.reset({x:0,y:0}),$v(this,Dy,{x:0,y:0}),this.modifiers=[]})}};xy=Pv(null),vy=new WeakMap,by=new WeakMap,yy=new WeakMap,Sy=new WeakMap,wy=new WeakMap,Cy=new WeakMap,Ey=new WeakMap,Iy=new WeakMap,Dy=new WeakMap,_v(xy,2,"shape",gy,My),_v(xy,4,"canceled",my,My,Sy),_v(xy,4,"activatorEvent",hy,My,wy),_v(xy,4,"sourceIdentifier",fy,My,Cy),_v(xy,4,"targetIdentifier",py,My,Ey),_v(xy,4,"modifiers",dy,My,Iy),_v(xy,2,"source",uy,My),_v(xy,2,"target",cy,My),_v(xy,2,"transform",ly,My),Ov(xy,My);var Ay={get rendering(){return Promise.resolve()}};function Py(e,t){return"function"==typeof e?e(t):null!=e?e:t}var qy=class{constructor(e){var t;this.destroy=()=>{this.dragOperation.status.idle||this.actions.stop({canceled:!0}),this.dragOperation.modifiers.forEach(e=>e.destroy()),this.registry.destroy(),this.collisionObserver.destroy()};const n=null!=e?e:{},r=Py(n.plugins,[]),o=Py(n.sensors,[]),i=Py(n.modifiers,[]),a=null!=(t=n.renderer)?t:Ay,s=new $b(this),l=new Ry(this);this.registry=l,this.monitor=s,this.renderer=a,this.actions=new oy(this),this.dragOperation=new My(this),this.collisionObserver=new db(this),this.plugins=[Qb,...r],this.modifiers=i,this.sensors=o;const{destroy:c}=this,u=Og(()=>{var e,t,n;const r=xm(()=>this.dragOperation.modifiers),o=this.modifiers;for(const e of r)o.includes(e)||e.destroy();this.dragOperation.modifiers=null!=(n=null==(t=null==(e=this.dragOperation.source)?void 0:e.modifiers)?void 0:t.map(e=>{const{plugin:t,options:n}=Gv(e);return new t(this,n)}))?n:o});this.destroy=()=>{u(),c()}}get plugins(){return this.registry.plugins.values}set plugins(e){this.registry.plugins.values=e}get modifiers(){return this.registry.modifiers.values}set modifiers(e){this.registry.modifiers.values=e}get sensors(){return this.registry.sensors.values}set sensors(e){this.registry.sensors.values=e}},Ty=e=>{throw TypeError(e)},ky=(e,t,n)=>t.has(e)||Ty("Cannot "+n),Oy=(e,t,n)=>(ky(e,t,"read from private field"),t.get(e)),Ny=(e,t,n)=>t.has(e)?Ty("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),_y=(e,t,n,r)=>(ky(e,t,"write to private field"),t.set(e,n),n),jy=(e,t,n)=>(ky(e,t,"access private method"),n);function Fy(e){return!!e&&(e instanceof KeyframeEffect||"getKeyframes"in e&&"function"==typeof e.getKeyframes)}function zy(e,t){const n=e.getAnimations();let r=null;for(const e of n){if("running"!==e.playState)continue;const{effect:n}=e,o=(Fy(n)?n.getKeyframes():[]).filter(t);o.length>0&&(r=[o[o.length-1],e])}return r}function Wy(e){const{width:t,height:n,top:r,left:o,bottom:i,right:a}=e.getBoundingClientRect();return{width:t,height:n,top:r,left:o,bottom:i,right:a}}function $y(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function Vy(e){return"nodeType"in e}function Hy(e){var t,n,r;return e?$y(e)?e:Vy(e)?"defaultView"in e?null!=(t=e.defaultView)?t:window:null!=(r=null==(n=e.ownerDocument)?void 0:n.defaultView)?r:window:window:window}function By(e){const{Document:t}=Hy(e);return e instanceof t||"nodeType"in e&&e.nodeType===Node.DOCUMENT_NODE}function Gy(e){return!(!e||$y(e))&&(e instanceof Hy(e).HTMLElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("html"))}function Uy(e){return e instanceof Hy(e).SVGElement||"namespaceURI"in e&&"string"==typeof e.namespaceURI&&e.namespaceURI.endsWith("svg")}function Yy(e){return e?$y(e)?e.document:Vy(e)?By(e)?e:Gy(e)||Uy(e)?e.ownerDocument:document:document:document}function Ky(e,t){if(function(e){return"DETAILS"===e.tagName}(e)&&!1===e.open)return!1;const{overflow:n,overflowX:r,overflowY:o}=getComputedStyle(e);return"visible"===n&&"visible"===r&&"visible"===o}function Xy(e,t=e.getBoundingClientRect(),n=0){var r,o,i,a,s;let l=t;const{ownerDocument:c}=e,u=null!=(r=c.defaultView)?r:window;let d=e.parentElement;for(;d&&d!==c.documentElement;){if(!Ky(d)){const e=d.getBoundingClientRect(),t=n*(e.bottom-e.top),r=n*(e.right-e.left),o=n*(e.bottom-e.top),i=n*(e.right-e.left);l={top:Math.max(l.top,e.top-t),right:Math.min(l.right,e.right+r),bottom:Math.min(l.bottom,e.bottom+o),left:Math.max(l.left,e.left-i),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top}d=d.parentElement}const p=u.visualViewport,f=null!=(o=null==p?void 0:p.offsetTop)?o:0,h=null!=(i=null==p?void 0:p.offsetLeft)?i:0,m=null!=(a=null==p?void 0:p.width)?a:u.innerWidth,g=null!=(s=null==p?void 0:p.height)?s:u.innerHeight,v=n*g,b=n*m;return l={top:Math.max(l.top,f-v),right:Math.min(l.right,h+m+b),bottom:Math.min(l.bottom,f+g+v),left:Math.max(l.left,h-b),width:0,height:0},l.width=l.right-l.left,l.height=l.bottom-l.top,l.width<0&&(l.width=0),l.height<0&&(l.height=0),l}function Jy(e){return{x:e.clientX,y:e.clientY}}var Zy="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Qy(e=document,t=new Set){if(t.has(e))return[];t.add(e);const n=[e];for(const r of Array.from(e.querySelectorAll("iframe, frame")))try{const e=r.contentDocument;e&&!t.has(e)&&n.push(...Qy(e,t))}catch(e){}try{const r=e.defaultView;if(r&&r!==window.top){const o=r.parent;o&&o.document&&o.document!==e&&n.push(...Qy(o.document,t))}}catch(e){}return n}function ex(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function tx(){var e,t;const n=ex()?window.visualViewport:null;return{x:null!=(e=null==n?void 0:n.offsetLeft)?e:0,y:null!=(t=null==n?void 0:n.offsetTop)?t:0}}function nx(e){return!(!e||!Vy(e))&&e instanceof Hy(e).ShadowRoot}function rx(e){if(e&&Vy(e)){let t=e.getRootNode();if(nx(t))return t;if(t instanceof Document)return t}return Yy(e)}function ox(e){return e.matchMedia("(prefers-reduced-motion: reduce)").matches}function ix(e){return"value"in e}function ax(e){return"CANVAS"===e.tagName}function sx(e,{x:t,y:n}){const r=e.elementFromPoint(t,n);if(function(e){return"IFRAME"===(null==e?void 0:e.tagName)}(r)){const{contentDocument:e}=r;if(e){const{left:o,top:i}=r.getBoundingClientRect();return sx(e,{x:t-o,y:n-i})}}return r}var lx=new WeakMap;var cx=class{constructor(){this.entries=new Set,this.clear=()=>{for(const e of this.entries){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o)}this.entries.clear()}}bind(e,t){const n=Array.isArray(e)?e:[e],r=Array.isArray(t)?t:[t],o=[];for(const e of n)for(const t of r){const{type:n,listener:r,options:i}=t,a=[e,t];e.addEventListener(n,r,i),this.entries.add(a),o.push(a)}const i=this.entries;return function(){for(const e of o){const[t,{type:n,listener:r,options:o}]=e;t.removeEventListener(n,r,o),i.delete(e)}}}};function ux(e){const t=null==e?void 0:e.ownerDocument.defaultView;if(t&&t.self!==t.parent)return t.frameElement}function dx(e,t){const n=()=>performance.now();let r,o;return function(...i){const a=this;o?(null==r||r(),r=function(e,t){const n=setTimeout(e,t);return()=>clearTimeout(n)}(()=>{e.apply(a,i),o=n()},t-(n()-o))):(e.apply(a,i),o=n())}}var px,fx=Zy?ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},hx=class extends fx{constructor(e){super(t=>{Oy(this,px)?e(t,this):_y(this,px,!0)}),Ny(this,px,!1)}};px=new WeakMap;var mx,gx,vx,bx,yx,xx,Sx,wx,Cx,Ex,Ix,Dx=Array.from({length:100},(e,t)=>t/100),Lx=class{constructor(e,t,n={debug:!1,skipInitial:!1}){this.element=e,this.callback=t,Ny(this,Cx),this.disconnect=()=>{var e,t,n;_y(this,Sx,!0),null==(e=Oy(this,vx))||e.disconnect(),null==(t=Oy(this,bx))||t.disconnect(),Oy(this,yx).disconnect(),null==(n=Oy(this,xx))||n.remove()},Ny(this,mx,!0),Ny(this,gx),Ny(this,vx),Ny(this,bx),Ny(this,yx),Ny(this,xx),Ny(this,Sx,!1),Ny(this,wx,dx(()=>{var e,t,n;const{element:r}=this;if(null==(e=Oy(this,bx))||e.disconnect(),Oy(this,Sx)||!Oy(this,mx)||!r.isConnected)return;const o=null!=(t=r.ownerDocument)?t:document,{innerHeight:i,innerWidth:a}=null!=(n=o.defaultView)?n:window,s=r.getBoundingClientRect(),l=Xy(r,s),{top:c,left:u,bottom:d,right:p}=l,f=-Math.floor(c),h=-Math.floor(u),m=`${f}px ${-Math.floor(a-p)}px ${-Math.floor(i-d)}px ${h}px`;this.boundingClientRect=s,_y(this,bx,new IntersectionObserver(e=>{const[t]=e,{intersectionRect:n}=t;1!==(1!==t.intersectionRatio?t.intersectionRatio:av.intersectionRatio(n,Xy(r)))&&Oy(this,wx).call(this)},{threshold:Dx,rootMargin:m,root:o})),Oy(this,bx).observe(r),jy(this,Cx,Ex).call(this)},75)),this.boundingClientRect=e.getBoundingClientRect(),_y(this,mx,function(e,t=e.getBoundingClientRect()){const{width:n,height:r}=Xy(e,t);return n>0&&r>0}(e,this.boundingClientRect));let r=!0;this.callback=e=>{r&&(r=!1,n.skipInitial)||t(e)};const o=e.ownerDocument;(null==n?void 0:n.debug)&&(_y(this,xx,document.createElement("div")),Oy(this,xx).style.background="rgba(0,0,0,0.15)",Oy(this,xx).style.position="fixed",Oy(this,xx).style.pointerEvents="none",o.body.appendChild(Oy(this,xx))),_y(this,yx,new IntersectionObserver(t=>{var n,r;const o=t[t.length-1],{boundingClientRect:i,isIntersecting:a}=o,{width:s,height:l}=i,c=Oy(this,mx);_y(this,mx,a),(s||l)&&(c&&!a?(null==(n=Oy(this,bx))||n.disconnect(),this.callback(null),null==(r=Oy(this,vx))||r.disconnect(),_y(this,vx,void 0),Oy(this,xx)&&(Oy(this,xx).style.visibility="hidden")):Oy(this,wx).call(this),a&&!Oy(this,vx)&&(_y(this,vx,new hx(Oy(this,wx))),Oy(this,vx).observe(e)))},{threshold:Dx,root:o})),Oy(this,mx)&&!n.skipInitial&&this.callback(this.boundingClientRect),Oy(this,yx).observe(e)}};mx=new WeakMap,gx=new WeakMap,vx=new WeakMap,bx=new WeakMap,yx=new WeakMap,xx=new WeakMap,Sx=new WeakMap,wx=new WeakMap,Cx=new WeakSet,Ex=function(){Oy(this,Sx)||(jy(this,Cx,Ix).call(this),function(e,t){return e===t||!(!e||!t)&&e.top==t.top&&e.left==t.left&&e.right==t.right&&e.bottom==t.bottom}(this.boundingClientRect,Oy(this,gx))||(this.callback(this.boundingClientRect),_y(this,gx,this.boundingClientRect)))},Ix=function(){if(Oy(this,xx)){const{top:e,left:t,width:n,height:r}=Xy(this.element);Oy(this,xx).style.overflow="hidden",Oy(this,xx).style.visibility="visible",Oy(this,xx).style.top=`${Math.floor(e)}px`,Oy(this,xx).style.left=`${Math.floor(t)}px`,Oy(this,xx).style.width=`${Math.floor(n)}px`,Oy(this,xx).style.height=`${Math.floor(r)}px`}};var Rx,Mx,Ax,Px,qx=new WeakMap,Tx=new WeakMap;function kx(e,t){let n=qx.get(e);if(!n){const t=new Lx(e,t=>{const n=qx.get(e);n&&n.callbacks.forEach(e=>e(t))},{skipInitial:!0});n={disconnect:t.disconnect,callbacks:new Set}}return n.callbacks.add(t),qx.set(e,n),()=>{n.callbacks.delete(t),0===n.callbacks.size&&(qx.delete(e),n.disconnect())}}var Ox=class{constructor(e,t,n){this.callback=t,Ny(this,Rx),Ny(this,Mx,!1),Ny(this,Ax),Ny(this,Px,dx(e=>{if(!Oy(this,Mx)&&e.target&&"contains"in e.target&&"function"==typeof e.target.contains)for(const t of Oy(this,Ax))if(e.target.contains(t)){this.callback(Oy(this,Rx).boundingClientRect);break}},75));const r=function(e){const t=new Set;let n=ux(e);for(;n;)t.add(n),n=ux(n);return t}(e),o=function(e,t){const n=new Set;for(const r of e){const e=kx(r,t);n.add(e)}return()=>n.forEach(e=>e())}(r,t),i=function(e,t){var n;const r=e.ownerDocument;if(!Tx.has(r)){const e=new AbortController,t=new Set;document.addEventListener("scroll",e=>t.forEach(t=>t(e)),{capture:!0,passive:!0,signal:e.signal}),Tx.set(r,{disconnect:()=>e.abort(),listeners:t})}const{listeners:o,disconnect:i}=null!=(n=Tx.get(r))?n:{};return o&&i?(o.add(t),()=>{o.delete(t),0===o.size&&(i(),Tx.delete(r))}):()=>{}}(e,Oy(this,Px));_y(this,Ax,r),_y(this,Rx,new Lx(e,t,n)),this.disconnect=()=>{Oy(this,Mx)||(_y(this,Mx,!0),o(),i(),Oy(this,Rx).disconnect())}}};function Nx(e){return"showPopover"in e&&"hidePopover"in e&&"function"==typeof e.showPopover&&"function"==typeof e.hidePopover}function _x(e){try{Nx(e)&&e.isConnected&&e.hasAttribute("popover")&&!e.matches(":popover-open")&&e.showPopover()}catch(e){}}function jx(e){return!(!Zy||!e)&&e===Yy(e).scrollingElement}function Fx(e){var t,n;const r=Hy(e),o=jx(e)?function(e){var t,n,r,o;const{documentElement:i}=Yy(e),a=Hy(e).visualViewport,s=null!=(t=null==a?void 0:a.width)?t:i.clientWidth,l=null!=(n=null==a?void 0:a.height)?n:i.clientHeight,c=null!=(r=null==a?void 0:a.offsetTop)?r:0,u=null!=(o=null==a?void 0:a.offsetLeft)?o:0;return{top:c,left:u,right:u+s,bottom:c+l,width:s,height:l}}(e):Wy(e),i=r.visualViewport,a=jx(e)?{height:null!=(t=null==i?void 0:i.height)?t:r.innerHeight,width:null!=(n=null==i?void 0:i.width)?n:r.innerWidth}:{height:e.clientHeight,width:e.clientWidth},s={current:{x:e.scrollLeft,y:e.scrollTop},max:{x:e.scrollWidth-a.width,y:e.scrollHeight-a.height}};return{rect:o,position:s,isTop:s.current.y<=0,isLeft:s.current.x<=0,isBottom:s.current.y>=s.max.y,isRight:s.current.x>=s.max.x}}function zx(e,t){const{isTop:n,isBottom:r,isLeft:o,isRight:i,position:a}=Fx(e),{x:s,y:l}=null!=t?t:{x:0,y:0},c=!n&&a.current.y+l>0,u=!r&&a.current.y+l<a.max.y,d=!o&&a.current.x+s>0,p=!i&&a.current.x+s<a.max.x;return{top:c,bottom:u,left:d,right:p,x:d||p,y:c||u}}Rx=new WeakMap,Mx=new WeakMap,Ax=new WeakMap,Px=new WeakMap;var Wx=class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}},$x=new Wx(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),Vx=new Wx(e=>setTimeout(e,50)),Hx=new Map,Bx=Hx.clear.bind(Hx);function Gx(e,t=!1){if(!t)return Ux(e);let n=Hx.get(e);return n||(n=Ux(e),Hx.set(e,n),Vx.schedule(Bx),n)}function Ux(e){return Hy(e).getComputedStyle(e)}var Yx={excludeElement:!0,escapeShadowDOM:!0};function Kx(e,t=Yx){const{limit:n,excludeElement:r,escapeShadowDOM:o}=t,i=new Set;return e?function t(a){if(null!=n&&i.size>=n)return i;if(!a)return i;if(By(a)&&null!=a.scrollingElement&&!i.has(a.scrollingElement))return i.add(a.scrollingElement),i;if(o&&nx(a))return t(a.host);if(!Gy(a))return Uy(a)?t(a.parentElement):i;if(i.has(a))return i;const s=Gx(a,!0);if(r&&a===e||function(e,t=Gx(e,!0)){const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(e=>{const r=t[e];return"string"==typeof r&&n.test(r)})}(a,s)&&i.add(a),function(e,t=Gx(e,!0)){return"fixed"===t.position||"sticky"===t.position}(a,s)){const{scrollingElement:e}=a.ownerDocument;return e&&i.add(e),i}return t(a.parentNode)}(e):i}function Xx(e,t=window.frameElement){const n={x:0,y:0,scaleX:1,scaleY:1};if(!e)return n;let r=ux(e);for(;r;){if(r===t)return n;const e=Wy(r),{x:o,y:i}=Jx(r,e);n.x=n.x+e.left,n.y=n.y+e.top,n.scaleX=n.scaleX*o,n.scaleY=n.scaleY*i,r=ux(r)}return n}function Jx(e,t=Wy(e)){const n=Math.round(t.width),r=Math.round(t.height);if(Gy(e))return{x:n/e.offsetWidth,y:r/e.offsetHeight};const o=Gx(e,!0);return{x:(parseFloat(o.width)||n)/n,y:(parseFloat(o.height)||r)/r}}function Zx(e){if(!e||"none"===e)return null;const[t,n,r="0"]=e.split(" "),o={x:parseFloat(t),y:parseFloat(n),z:parseInt(r,10)};return isNaN(o.x)&&isNaN(o.y)?null:{x:isNaN(o.x)?0:o.x,y:isNaN(o.y)?0:o.y,z:isNaN(o.z)?0:o.z}}function Qx(e){var t,n,r,o,i,a,s,l,c;const{scale:u,transform:d,translate:p}=e,f=function(e){if(!e||"none"===e)return null;const t=e.split(" "),n=parseFloat(t[0]),r=parseFloat(t[1]);return isNaN(n)&&isNaN(r)?null:{x:isNaN(n)?r:n,y:isNaN(r)?n:r}}(u),h=Zx(p),m=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(d);if(!m&&!f&&!h)return null;const g=null!=(t=null==f?void 0:f.x)?t:1,v=null!=(n=null==f?void 0:f.y)?n:1,b=null!=(r=null==h?void 0:h.x)?r:0,y=null!=(o=null==h?void 0:h.y)?o:0,x=null!=(i=null==m?void 0:m.x)?i:0,S=null!=(a=null==m?void 0:m.y)?a:0,w=null!=(s=null==m?void 0:m.scaleX)?s:1,C=null!=(l=null==m?void 0:m.scaleY)?l:1;return{x:b+x,y:y+S,z:null!=(c=null==h?void 0:h.z)?c:0,scaleX:g*w,scaleY:v*C}}var eS=(e=>(e[e.Idle=0]="Idle",e[e.Forward=1]="Forward",e[e.Reverse=-1]="Reverse",e))(eS||{}),tS={x:.2,y:.2},nS={x:10,y:10};function rS(e,t,n,r=25,o=tS,i=nS){const{x:a,y:s}=t,{rect:l,isTop:c,isBottom:u,isLeft:d,isRight:p}=Fx(e),f=Xx(e),h=Qx(Gx(e,!0)),m=null!==h&&(null==h?void 0:h.scaleX)<0,g=null!==h&&(null==h?void 0:h.scaleY)<0,v=new av(l.left*f.scaleX+f.x,l.top*f.scaleY+f.y,l.width*f.scaleX,l.height*f.scaleY),b={x:0,y:0},y={x:0,y:0},x=v.height*o.y,S=v.width*o.x;return x>0&&(!c||g&&!u)&&s<=v.top+x&&1!==(null==n?void 0:n.y)&&a>=v.left-i.x&&a<=v.right+i.x?(b.y=g?1:-1,y.y=r*Math.abs((v.top+x-s)/x)):x>0&&(!u||g&&!c)&&s>=v.bottom-x&&-1!==(null==n?void 0:n.y)&&a>=v.left-i.x&&a<=v.right+i.x&&(b.y=g?-1:1,y.y=r*Math.abs((v.bottom-x-s)/x)),S>0&&(!p||m&&!d)&&a>=v.right-S&&-1!==(null==n?void 0:n.x)&&s>=v.top-i.y&&s<=v.bottom+i.y?(b.x=m?-1:1,y.x=r*Math.abs((v.right-S-a)/S)):S>0&&(!d||m&&!p)&&a<=v.left+S&&1!==(null==n?void 0:n.x)&&s>=v.top-i.y&&s<=v.bottom+i.y&&(b.x=m?1:-1,y.x=r*Math.abs((v.left+S-a)/S)),{direction:b,speed:y}}function oS(e,{block:t="nearest",inline:n="nearest"}={}){if(!Gy(e))return;const r=Kx(e),o=[];for(const i of r){if(!Gy(i))continue;const{top:r,left:a}=aS(e,i);let s=r,l=a;for(const e of o)s-=e.scrollTop,l-=e.scrollLeft;if("none"!==t){const n=s<i.scrollTop;n!==s+e.offsetHeight>i.scrollTop+i.clientHeight&&(i.scrollTop="center"===t?s-i.clientHeight/2+e.offsetHeight/2:n?s:s+e.offsetHeight-i.clientHeight)}if("none"!==n){const t=l<i.scrollLeft;t!==l+e.offsetWidth>i.scrollLeft+i.clientWidth&&(i.scrollLeft="center"===n?l-i.clientWidth/2+e.offsetWidth/2:t?l:l+e.offsetWidth-i.clientWidth)}o.push(i)}}function iS(e){let t=0,n=0,r=e;for(;r;){t+=r.offsetTop,n+=r.offsetLeft;const e=r.offsetParent;if(!Gy(e))break;t+=e.clientTop,n+=e.clientLeft,r=e}return{top:t,left:n}}function aS(e,t){const n=iS(e),r=iS(t);return{top:n.top-r.top-t.clientTop,left:n.left-r.left-t.clientLeft}}function sS({element:e,keyframes:t,options:n}){return e.animate(t,n).finished}function lS(e,t=Gx(e).translate,n=!0){if(n){const t=zy(e,e=>"translate"in e);if(t){const{translate:e=""}=t[0];if("string"==typeof e){const t=Zx(e);if(t)return t}}}if(t){const e=Zx(t);if(e)return e}return{x:0,y:0,z:0}}var cS=new Wx(e=>setTimeout(e,0)),uS=new Map,dS=uS.clear.bind(uS);function pS(e,t){const n=function(e){const t=e.ownerDocument;let n=uS.get(t);if(n)return n;n=t.getAnimations(),uS.set(t,n),cS.schedule(dS);const r=n.filter(t=>Fy(t.effect)&&t.effect.target===e);return uS.set(e,r),n}(e).filter(e=>{var n,r;if(Fy(e.effect)){const{target:o}=e.effect;if(null==(r=o&&(null==(n=t.isValidTarget)?void 0:n.call(t,o)))||r)return e.effect.getKeyframes().some(e=>{for(const n of t.properties)if(e[n])return!0})}}).map(e=>{const{effect:t,currentTime:n}=e,r=null==t?void 0:t.getComputedTiming().duration;if(!e.pending&&"finished"!==e.playState)return"number"==typeof r&&"number"==typeof n&&n<r?(e.currentTime=r,()=>{e.currentTime=n}):void 0});if(n.length>0)return()=>n.forEach(e=>null==e?void 0:e())}var fS=class extends av{constructor(e,t={}){var n,r,o,i;const{frameTransform:a=Xx(e),ignoreTransforms:s,getBoundingClientRect:l=Wy}=t,c=pS(e,{properties:["transform","translate","scale","width","height"],isValidTarget:t=>(t!==e||ex())&&t.contains(e)}),u=l(e);let d,{top:p,left:f,width:h,height:m}=u;const g=Gx(e),v=Qx(g),b={x:null!=(n=null==v?void 0:v.scaleX)?n:1,y:null!=(r=null==v?void 0:v.scaleY)?r:1},y=function(e,t){const n=e.getAnimations();if(!n.length)return null;let r,o,i,a=!1;for(const e of n){if("running"!==e.playState)continue;const t=Fy(e.effect)?e.effect.getKeyframes():[],n=t[t.length-1];if(!n)continue;const{transform:s,translate:l,scale:c}=n;"string"==typeof s&&s&&(r=s,a=!0),"string"==typeof l&&l&&(o=l,a=!0),"string"==typeof c&&c&&(i=c,a=!0)}return a?Qx({transform:null!=r?r:t.transform,translate:null!=o?o:t.translate,scale:null!=i?i:t.scale}):null}(e,g);null==c||c(),v&&(d=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left-i-(1-r)*parseFloat(n),l=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width/r:e.width,u=o?e.height/o:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(u,v,g.transformOrigin),(s||y)&&(p=d.top,f=d.left,h=d.width,m=d.height));const x={width:null!=(o=null==d?void 0:d.width)?o:h,height:null!=(i=null==d?void 0:d.height)?i:m};if(y&&!s&&d){const e=function(e,t,n){const{scaleX:r,scaleY:o,x:i,y:a}=t,s=e.left+i+(1-r)*parseFloat(n),l=e.top+a+(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),c=r?e.width*r:e.width,u=o?e.height*o:e.height;return{width:c,height:u,top:l,right:s+c,bottom:l+u,left:s}}(d,y,g.transformOrigin);p=e.top,f=e.left,h=e.width,m=e.height,b.x=y.scaleX,b.y=y.scaleY}a&&(s||(f*=a.scaleX,h*=a.scaleX,p*=a.scaleY,m*=a.scaleY),f+=a.x,p+=a.y),super(f,p,h,m),this.scale=b,this.intrinsicWidth=x.width,this.intrinsicHeight=x.height}};function hS(e){return"style"in e&&"object"==typeof e.style&&null!==e.style&&"setProperty"in e.style&&"removeProperty"in e.style&&"function"==typeof e.style.setProperty&&"function"==typeof e.style.removeProperty}var mS=class{constructor(e){this.element=e,this.initial=new Map}set(e,t=""){const{element:n}=this;if(hS(n))for(const[r,o]of Object.entries(e)){const e=`${t}${r}`;this.initial.has(e)||this.initial.set(e,n.style.getPropertyValue(e)),n.style.setProperty(e,"string"==typeof o?o:`${o}px`)}}remove(e,t=""){const{element:n}=this;if(hS(n))for(const r of e){const e=`${t}${r}`;n.style.removeProperty(e)}}reset(){const{element:e}=this;if(hS(e)){for(const[t,n]of this.initial)e.style.setProperty(t,n);""===e.getAttribute("style")&&e.removeAttribute("style")}}};function gS(e){return!!e&&(e instanceof Hy(e).Element||Vy(e)&&e.nodeType===Node.ELEMENT_NODE)}function vS(e){if(!e)return!1;const{KeyboardEvent:t}=Hy(e.target);return e instanceof t}var bS={};function yS(e){const t=null==bS[e]?0:bS[e]+1;return bS[e]=t,`${e}-${t}`}var xS=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/iv.distance(t.shape.center,n),type:ty.PointerIntersection,priority:ey.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=iv.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:ty.ShapeIntersection,priority:ey.Normal}}return null})(e)},SS=e=>{const{dragOperation:t,droppable:n}=e,{shape:r,position:o}=t;if(!n.shape)return null;const i=r?av.from(r.current.boundingRectangle).corners:void 0,a=av.from(n.shape.boundingRectangle).corners.reduce((e,t,n)=>{var r;return e+iv.distance(iv.from(t),null!=(r=null==i?void 0:i[n])?r:o.current)},0),s=a/4;return{id:n.id,value:1/s,type:ty.Collision,priority:ey.Normal}},wS=Object.create,CS=Object.defineProperty,ES=Object.defineProperties,IS=Object.getOwnPropertyDescriptor,DS=Object.getOwnPropertyDescriptors,LS=Object.getOwnPropertySymbols,RS=Object.prototype.hasOwnProperty,MS=Object.prototype.propertyIsEnumerable,AS=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),PS=e=>{throw TypeError(e)},qS=(e,t,n)=>t in e?CS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,TS=(e,t)=>{for(var n in t||(t={}))RS.call(t,n)&&qS(e,n,t[n]);if(LS)for(var n of LS(t))MS.call(t,n)&&qS(e,n,t[n]);return e},kS=(e,t)=>ES(e,DS(t)),OS=(e,t)=>CS(e,"name",{value:t,configurable:!0}),NS=(e,t)=>{var n={};for(var r in e)RS.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&LS)for(var r of LS(e))t.indexOf(r)<0&&MS.call(e,r)&&(n[r]=e[r]);return n},_S=e=>{var t;return[,,,wS(null!=(t=null==e?void 0:e[AS("metadata")])?t:null)]},jS=["class","method","getter","setter","accessor","field","value","get","set"],FS=e=>void 0!==e&&"function"!=typeof e?PS("Function expected"):e,zS=(e,t,n,r,o)=>({kind:jS[e],name:t,metadata:r,addInitializer:e=>n._?PS("Already initialized"):o.push(FS(e||null))}),WS=(e,t)=>qS(t,AS("metadata"),e[3]),$S=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},VS=(e,t,n,r,o,i)=>{var a,s,l,c,u,d=7&t,p=!!(8&t),f=!!(16&t),h=d>3?e.length+1:d?p?1:2:0,m=jS[d+5],g=d>3&&(e[h-1]=[]),v=e[h]||(e[h]=[]),b=d&&(!f&&!p&&(o=o.prototype),d<5&&(d>3||!f)&&IS(d<4?o:{get[n](){return GS(this,i)},set[n](e){return YS(this,i,e)}},n));d?f&&d<4&&OS(i,(d>2?"set ":d>1?"get ":"")+n):OS(o,n);for(var y=r.length-1;y>=0;y--)c=zS(d,n,l={},e[3],v),d&&(c.static=p,c.private=f,u=c.access={has:f?e=>BS(o,e):e=>n in e},3^d&&(u.get=f?e=>(1^d?GS:KS)(e,o,4^d?i:b.get):e=>e[n]),d>2&&(u.set=f?(e,t)=>YS(e,o,t,4^d?i:b.set):(e,t)=>e[n]=t)),s=(0,r[y])(d?d<4?f?i:b[m]:d>4?void 0:{get:b.get,set:b.set}:o,c),l._=1,4^d||void 0===s?FS(s)&&(d>4?g.unshift(s):d?f?i=s:b[m]=s:o=s):"object"!=typeof s||null===s?PS("Object expected"):(FS(a=s.get)&&(b.get=a),FS(a=s.set)&&(b.set=a),FS(a=s.init)&&g.unshift(a));return d||WS(e,o),b&&CS(o,n,b),f?4^d?i:b:o},HS=(e,t,n)=>t.has(e)||PS("Cannot "+n),BS=(e,t)=>Object(t)!==t?PS('Cannot use the "in" operator on this value'):e.has(t),GS=(e,t,n)=>(HS(e,t,"read from private field"),n?n.call(e):t.get(e)),US=(e,t,n)=>t.has(e)?PS("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),YS=(e,t,n,r)=>(HS(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),KS=(e,t,n)=>(HS(e,t,"access private method"),n),XS="button",JS="draggable",ZS="dnd-kit-description",QS="dnd-kit-announcement",ew={draggable:"To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item in a given direction. Press space again to drop the item in its new position, or press escape to cancel."},tw={dragstart({operation:{source:e}}){if(e)return`Picked up draggable item ${e.id}.`},dragover({operation:{source:e,target:t}}){if(e&&e.id!==(null==t?void 0:t.id))return t?`Draggable item ${e.id} was moved over droppable target ${t.id}.`:`Draggable item ${e.id} is no longer over a droppable target.`},dragend({operation:{source:e,target:t},canceled:n}){if(e)return n?`Dragging was cancelled. Draggable item ${e.id} was dropped.`:t?`Draggable item ${e.id} was dropped over droppable target ${t.id}`:`Draggable item ${e.id} was dropped.`}};function nw(e){const t=e.tagName.toLowerCase();return["input","select","textarea","a","button"].includes(t)}var rw=["dragover","dragmove"];var ow,iw,aw,sw,lw,cw,uw,dw,pw,fw,hw,mw,gw,vw=new Map,bw=class extends(lw=Kv,sw=[qg],aw=[Tg],iw=[Tg],ow=[Tg],lw){constructor(e,t){super(e,t),$S(uw,5,this),US(this,pw),US(this,cw,new Set),US(this,dw,$S(uw,8,this,new Set)),$S(uw,11,this),this.registerEffect(KS(this,pw,fw))}register(e){return GS(this,cw).add(e),()=>{GS(this,cw).delete(e)}}addRoot(e){return xm(()=>{const t=new Set(this.additionalRoots);t.add(e),this.additionalRoots=t}),()=>{xm(()=>{const t=new Set(this.additionalRoots);t.delete(e),this.additionalRoots=t})}}get sourceRoot(){var e;const{source:t}=this.manager.dragOperation;return rx(null!=(e=null==t?void 0:t.element)?e:null)}get targetRoot(){var e;const{target:t}=this.manager.dragOperation;return rx(null!=(e=null==t?void 0:t.element)?e:null)}get roots(){const{status:e}=this.manager.dragOperation;if(e.initializing||e.initialized){const e=[this.sourceRoot,this.targetRoot].filter(e=>null!=e);return new Set([...e,...this.additionalRoots])}return new Set}};uw=_S(lw),cw=new WeakMap,dw=new WeakMap,pw=new WeakSet,fw=function(){const{roots:e}=this,t=[];for(const n of e)for(const e of GS(this,cw))t.push(KS(this,pw,hw).call(this,n,e));return()=>{for(const e of t)e()}},hw=function(e,t){let n=vw.get(e);n||(n=new Map,vw.set(e,n));let r=n.get(t);if(!r){const o=By(e)?KS(this,pw,mw).call(this,e,n,t):KS(this,pw,gw).call(this,e,n,t);if(!o)return()=>{};r=o,n.set(t,r)}r.refCount++;let o=!1;return()=>{o||(o=!0,r.refCount--,0===r.refCount&&r.cleanup())}},mw=function(e,t,n){var r;const o=e.createElement("style"),{nonce:i}=null!=(r=this.options)?r:{};i&&o.setAttribute("nonce",i),o.textContent=n,e.head.prepend(o);const a=new MutationObserver(t=>{for(const n of t)for(const t of Array.from(n.removedNodes))if(t===o)return void e.head.prepend(o)});return a.observe(e.head,{childList:!0}),{refCount:0,cleanup:()=>{a.disconnect(),o.remove(),t.delete(n),0===t.size&&vw.delete(e)}}},gw=function(e,t,n){!("adoptedStyleSheets"in e)||Array.isArray(e.adoptedStyleSheets);const r=e.ownerDocument.defaultView,{CSSStyleSheet:o}=null!=r?r:{};if(!o)return null;const i=new o;return i.replaceSync(n),e.adoptedStyleSheets.push(i),{refCount:0,cleanup:()=>{var r;if(nx(e)&&(null==(r=e.host)?void 0:r.isConnected)){const t=e.adoptedStyleSheets.indexOf(i);-1!==t&&e.adoptedStyleSheets.splice(t,1)}t.delete(n),0===t.size&&vw.delete(e)}}},VS(uw,4,"additionalRoots",sw,bw,dw),VS(uw,2,"sourceRoot",aw,bw),VS(uw,2,"targetRoot",iw,bw),VS(uw,2,"roots",ow,bw),WS(uw,bw),bw.configure=Bv(bw);var yw=bw,xw="data-dnd-",Sw=`${xw}dropping`,ww="--dnd-",Cw=`${xw}dragging`,Ew=`${xw}placeholder`,Iw=[Cw,Ew,"popover","aria-pressed","aria-grabbing"],Dw=["view-transition-name"],Lw=`\n :is(:root,:host) [${Cw}] {\n position: fixed !important;\n pointer-events: none !important;\n touch-action: none;\n z-index: calc(infinity);\n will-change: translate;\n top: var(${ww}top, 0px) !important;\n left: var(${ww}left, 0px) !important;\n right: unset !important;\n bottom: unset !important;\n width: var(${ww}width, auto);\n max-width: var(${ww}width, auto);\n height: var(${ww}height, auto);\n max-height: var(${ww}height, auto);\n transform: var(${ww}transform, none) !important;\n transition: var(${ww}transition) !important;\n }\n\n :is(:root,:host) [${Ew}] {\n transition: none;\n }\n\n :is(:root,:host) [${Ew}='hidden'] {\n visibility: hidden;\n }\n\n [${Cw}] * {\n pointer-events: none !important;\n }\n\n [${Cw}]:not([${Sw}]) {\n translate: var(${ww}translate) !important;\n }\n\n [${Cw}][style*='${ww}scale'] {\n scale: var(${ww}scale) !important;\n transform-origin: var(${ww}transform-origin) !important;\n }\n\n @layer dnd-kit {\n :where([${Cw}][popover]) {\n overflow: visible;\n background: unset;\n border: unset;\n margin: unset;\n padding: unset;\n color: inherit;\n\n &:is(input, button) {\n border: revert;\n background: revert;\n }\n }\n }\n [${Cw}]::backdrop, [${xw}overlay]:not([${Cw}]) {\n display: none;\n visibility: hidden;\n }\n`.replace(/\n+/g," ").replace(/\s+/g," ").trim();function Rw(e,t="hidden"){return xm(()=>{const{element:n,manager:r}=e;if(!n||!r)return;const o=function(e,t){const n=new Map;for(const r of t)if(r.element&&(e===r.element||e.contains(r.element))){const e=`${xw}${yS("dom-id")}`;r.element.setAttribute(e,""),n.set(r,e)}return n}(n,r.registry.droppables),i=[],a=function(e){const t="input, textarea, select, canvas, [contenteditable]",n=e.cloneNode(!0),r=Array.from(e.querySelectorAll(t));return Array.from(n.querySelectorAll(t)).forEach((e,t)=>{const n=r[t];if(ix(e)&&ix(n)&&("file"!==e.type&&(e.value=n.value),"radio"===e.type&&e.name&&(e.name=`Cloned__${e.name}`)),ax(e)&&ax(n)&&n.width>0&&n.height>0){const t=e.getContext("2d");null==t||t.drawImage(n,0,0)}}),n}(n),{remove:s}=a;return function(e,t,n){for(const[r,o]of e){if(!r.element)continue;const e=`[${o}]`,i=t.matches(e)?t:t.querySelector(e);if(r.element.removeAttribute(o),!i)continue;const a=r.element;r.proxy=i,i.removeAttribute(o),lx.set(a,i),n.push(()=>{lx.delete(a),r.proxy=void 0})}}(o,a,i),function(e,t="hidden"){e.setAttribute("inert","true"),e.setAttribute("tab-index","-1"),e.setAttribute("aria-hidden","true"),e.setAttribute(Ew,t)}(a,t),a.remove=()=>{i.forEach(e=>e()),s.call(a)},a})}function Mw(e,t){return e===t||ux(e)===ux(t)}function Aw(e){const{target:t}=e;"newState"in e&&"closed"===e.newState&&gS(t)&&t.hasAttribute("popover")&&requestAnimationFrame(()=>_x(t))}function Pw(e){return"TR"===e.tagName}var qw,Tw,kw,Ow,Nw,_w,jw,Fw=250,zw="ease";var Ww=class extends(Tw=Uv,qw=[qg],Tw){constructor(e,t){super(e,t),US(this,Nw),US(this,Ow,$S(kw,8,this)),$S(kw,11,this),this.state={initial:{},current:{}};const n=e.registry.plugins.get(yw),r=null==n?void 0:n.register(Lw);if(r){const e=this.destroy.bind(this);this.destroy=()=>{r(),e()}}this.registerEffect(KS(this,Nw,_w).bind(this,n)),this.registerEffect(KS(this,Nw,jw))}};kw=_S(Tw),Ow=new WeakMap,Nw=new WeakSet,_w=function(e){const{overlay:t}=this;if(!t||!e)return;const n=rx(t);return n?e.addRoot(n):void 0},jw=function(){var e,t,n,r,o,i,a;const{state:s,manager:l,options:c}=this,{dragOperation:u}=l,{position:d,source:p,status:f}=u;if(f.idle)return s.current={},void(s.initial={});if(!p)return;const{element:h}=p,m=p.pluginConfig(Ww),g=null!=(t=null!=(e=null==m?void 0:m.feedback)?e:null==c?void 0:c.feedback)?t:"default",v="function"==typeof g?g(p,l):g;if(!h||"none"===v||!f.initialized||f.initializing)return;const{initial:b}=s,y=null!=(n=this.overlay)?n:h,x=Xx(y),S=Xx(h),w=!Mw(h,y),C=new fS(h,{frameTransform:w?S:null,ignoreTransforms:!w}),E=S.scaleX/x.scaleX,I=S.scaleY/x.scaleY;let{width:D,height:L,top:R,left:M}=C;w&&(D/=E,L/=I);const A=new mS(y),P=Gx(h),{transition:q,translate:T,boxSizing:k,paddingBlockStart:O,paddingBlockEnd:N,paddingInlineStart:_,paddingInlineEnd:j,borderInlineStartWidth:F,borderInlineEndWidth:z,borderBlockStartWidth:W,borderBlockEndWidth:$}=P,V=q.split(",").filter(e=>!/^\s*(transform|translate|scale)\b/.test(e)).join(","),H=Qx(P),B=P.transform,G="clone"===v,U="content-box"===k,Y=U?parseInt(_)+parseInt(j)+parseInt(F)+parseInt(z):0,K=U?parseInt(O)+parseInt(N)+parseInt(W)+parseInt($):0,X="move"===v||this.overlay?null:Rw(p,G?"clone":"hidden"),J=xm(()=>vS(l.dragOperation.activatorEvent));if(!b.translate)if(this.overlay&&H)b.translate={x:H.x,y:H.y};else if("none"!==T){const e=Zx(T);e&&(b.translate=e)}if(!b.transformOrigin){const e=xm(()=>d.current),t=M+(null!=(r=null==H?void 0:H.x)?r:0),n=R+(null!=(o=null==H?void 0:H.y)?o:0);b.transformOrigin={x:(e.x-t*x.scaleX-x.x)/(D*x.scaleX),y:(e.y-n*x.scaleY-x.y)/(L*x.scaleY)}}const{transformOrigin:Z}=b,Q=R*x.scaleY+x.y,ee=M*x.scaleX+x.x;if(!b.coordinates&&(b.coordinates={x:ee,y:Q},1!==E||1!==I)){const{scaleX:e,scaleY:t}=S,{x:n,y:r}=Z;b.coordinates.x+=(D*e-D)*n,b.coordinates.y+=(L*t-L)*r}b.dimensions||(b.dimensions={width:D,height:L}),b.frameTransform||(b.frameTransform=x);const te=b.coordinates.x-ee,ne=b.coordinates.y-Q,re=(b.dimensions.width*b.frameTransform.scaleX-D*x.scaleX)*Z.x,oe=(b.dimensions.height*b.frameTransform.scaleY-L*x.scaleY)*Z.y,ie={x:te/x.scaleX+re,y:ne/x.scaleY+oe},ae=M+ie.x,se=R+ie.y;y.setAttribute(Cw,"true");const le=xm(()=>u.transform),ce=null!=(i=b.translate)?i:{x:0,y:0},ue=le.x*x.scaleX+ce.x,de=le.y*x.scaleY+ce.y,pe=tx();if(A.set({width:D-Y,height:L-K,top:se+pe.y,left:ae+pe.x,translate:`${ue}px ${de}px 0`,transform:this.overlay?"none":B,transition:V?`${V}, translate 0ms linear`:"translate 0ms linear",scale:w?`${E} ${I}`:"","transform-origin":`${100*Z.x}% ${100*Z.y}%`},ww),X&&(h.insertAdjacentElement("afterend",X),null==c?void 0:c.rootElement)){("function"==typeof c.rootElement?c.rootElement(p):c.rootElement).appendChild(h)}let fe,he,me;Nx(y)&&(y.hasAttribute("popover")||y.setAttribute("popover","manual"),_x(y),y.addEventListener("beforetoggle",Aw));const ge=(ve={placeholder:X,element:h,feedbackElement:y,frameTransform:x,transformOrigin:Z,width:D,height:L,top:R,left:M,widthOffset:Y,heightOffset:K,delta:ie,styles:A,dragOperation:u,getTranslate:()=>s.current.translate,getElementMutationObserver:()=>fe,getSavedCellWidths:()=>me,setSavedCellWidths:e=>{me=e}},new ResizeObserver(()=>{var e,t,n;const r=new fS(ve.placeholder,{frameTransform:ve.frameTransform,ignoreTransforms:!0}),o=null!=(e=ve.transformOrigin)?e:{x:1,y:1},i=(ve.width-r.width)*o.x+ve.delta.x,a=(ve.height-r.height)*o.y+ve.delta.y,s=tx();if(ve.styles.set({width:r.width-ve.widthOffset,height:r.height-ve.heightOffset,top:ve.top+a+s.y,left:ve.left+i+s.x},ww),null==(t=ve.getElementMutationObserver())||t.takeRecords(),Pw(ve.element)&&Pw(ve.placeholder)){const e=Array.from(ve.element.cells),t=Array.from(ve.placeholder.cells);ve.getSavedCellWidths()||ve.setSavedCellWidths(e.map(e=>e.style.width));for(const[n,r]of e.entries()){const e=t[n];r.style.width=`${e.getBoundingClientRect().width}px`}}const l=null!=(n=ve.getTranslate())?n:{x:0,y:0},c=ve.left+i+s.x+l.x,u=ve.top+a+s.y+l.y,d=r.width-ve.widthOffset,p=r.height-ve.heightOffset,f=ve.frameTransform;ve.dragOperation.shape=new av(c*f.scaleX+f.x,u*f.scaleY+f.y,d*f.scaleX,p*f.scaleY)}));var ve;const be=new fS(y);xm(()=>u.shape=be);const ye=Hy(y),xe=e=>{this.manager.actions.stop({event:e})},Se=ox(ye);J&&ye.addEventListener("resize",xe),"idle"===xm(()=>p.status)&&requestAnimationFrame(()=>p.status="dragging"),X&&(ge.observe(X),fe=function(e,t,n){const r=new MutationObserver(r=>{let o=!1;for(const n of r){if(n.target!==e){o=!0;continue}if("attributes"!==n.type)continue;const r=n.attributeName;if(r.startsWith("aria-")||Iw.includes(r))continue;const i=e.getAttribute(r);if("style"===r){if(hS(e)&&hS(t)){const n=e.style;for(const e of Array.from(t.style))""===n.getPropertyValue(e)&&t.style.removeProperty(e);for(const e of Array.from(n)){if(Dw.includes(e)||e.startsWith(ww))continue;const r=n.getPropertyValue(e);t.style.setProperty(e,r)}}}else null!==i?t.setAttribute(r,i):t.removeAttribute(r)}o&&n&&t.replaceChildren(...e.cloneNode(!0).childNodes)});return r.observe(e,{attributes:!0,subtree:!0,childList:!0}),r}(h,X,G),he=function(e,t,n){const r=new MutationObserver(r=>{for(const o of r)if(0!==o.addedNodes.length)for(const r of Array.from(o.addedNodes)){if(r.contains(e)&&e.nextElementSibling!==t)return e.insertAdjacentElement("afterend",t),void _x(n);if(r.contains(t)&&t.previousElementSibling!==e)return t.insertAdjacentElement("beforebegin",e),void _x(n)}e.isConnected&&t.isConnected&&e.nextElementSibling!==t&&(e.insertAdjacentElement("afterend",t),_x(n))});return r.observe(e.ownerDocument.body,{childList:!0,subtree:!0}),r}(h,X,y));const we=null==(a=l.dragOperation.source)?void 0:a.id,Ce=()=>{var e;if(!J||null==we)return;const t=l.registry.draggables.get(we),n=null!=(e=null==t?void 0:t.handle)?e:null==t?void 0:t.element;Gy(n)&&n.focus()},Ee=()=>{null==fe||fe.disconnect(),null==he||he.disconnect(),ge.disconnect(),ye.removeEventListener("resize",xe),Nx(y)&&(y.removeEventListener("beforetoggle",Aw),y.removeAttribute("popover")),y.removeAttribute(Cw),A.reset();const e=()=>{var e;if(me&&Pw(h)){const t=Array.from(h.cells);for(const[n,r]of t.entries())r.style.width=null!=(e=me[n])?e:""}p.status="idle";const t=null!=s.current.translate,n=u.status.dragging;X&&(!n&&t||X.parentElement!==y.parentElement)&&y.isConnected&&X.replaceWith(y),null==X||X.remove()};y===this.overlay?setTimeout(e,0):e()},Ie=null==c?void 0:c.dropAnimation,De=this,Le=Og(()=>{var e,t,n;const{transform:r,status:o}=u;if((r.x||r.y||s.current.translate)&&o.dragging){const o=null!=(e=b.translate)?e:{x:0,y:0},i={x:r.x/x.scaleX+o.x,y:r.y/x.scaleY+o.y},a=s.current.translate,l=xm(()=>u.modifiers),d=xm(()=>{var e;return null==(e=u.shape)?void 0:e.current}),p=null==c?void 0:c.keyboardTransition,f=J&&!Se&&null!==p?`${null!=(t=null==p?void 0:p.duration)?t:250}ms ${null!=(n=null==p?void 0:p.easing)?n:"cubic-bezier(0.25, 1, 0.5, 1)"}`:"0ms linear";if(A.set({transition:V?`${V}, translate ${f}`:`translate ${f}`,translate:`${i.x}px ${i.y}px 0`},ww),null==fe||fe.takeRecords(),d&&d!==be&&a&&!l.length){const e=iv.delta(i,a);u.shape=av.from(d.boundingRectangle).translate(e.x*x.scaleX,e.y*x.scaleY)}else u.shape=new fS(y);s.current.translate=i}},function(){if(u.status.dropped){this.dispose(),p.status="dropping";const e=void 0!==(null==m?void 0:m.dropAnimation)?m.dropAnimation:void 0!==De.dropAnimation?De.dropAnimation:Ie;let t=s.current.translate;const n=null!=t;if(t||h===y||(t={x:0,y:0}),!t||null===e)return void Ee();l.renderer.rendering.then(()=>{!function(e){var t,n,r,o;const{animation:i}=e;if("function"==typeof i){const t=i({source:e.source,element:e.element,feedbackElement:e.feedbackElement,placeholder:e.placeholder,translate:e.translate,moved:e.moved});return void Promise.resolve(t).then(()=>{e.cleanup(),requestAnimationFrame(e.restoreFocus)})}const{duration:a=Fw,easing:s=zw}=null!=i?i:{};_x(e.feedbackElement);const[,l]=null!=(t=zy(e.feedbackElement,e=>"translate"in e))?t:[];null==l||l.pause();const c=null!=(n=e.placeholder)?n:e.element,u={frameTransform:Mw(e.feedbackElement,c)?null:void 0},d=new fS(e.feedbackElement,u),p=null!=(r=Zx(Gx(e.feedbackElement).translate))?r:e.translate,f=new fS(c,u),h=av.delta(d,f,e.alignment),m=p.x-h.x,g=p.y-h.y,v=Math.round(d.intrinsicHeight)!==Math.round(f.intrinsicHeight)?{minHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`],maxHeight:[`${d.intrinsicHeight}px`,`${f.intrinsicHeight}px`]}:{},b=Math.round(d.intrinsicWidth)!==Math.round(f.intrinsicWidth)?{minWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`],maxWidth:[`${d.intrinsicWidth}px`,`${f.intrinsicWidth}px`]}:{};e.styles.set({transition:e.transition},ww),e.feedbackElement.setAttribute(Sw,""),null==(o=e.getElementMutationObserver())||o.takeRecords(),sS({element:e.feedbackElement,keyframes:kS(TS(TS({},v),b),{translate:[`${p.x}px ${p.y}px 0`,`${m}px ${g}px 0`]}),options:{duration:ox(Hy(e.feedbackElement))?0:e.moved||e.feedbackElement!==e.element?a:0,easing:s}}).then(()=>{e.feedbackElement.removeAttribute(Sw),null==l||l.finish(),e.cleanup(),requestAnimationFrame(e.restoreFocus)})}({source:p,element:h,feedbackElement:y,placeholder:X,translate:t,moved:n,transition:q,alignment:p.alignment,styles:A,animation:null!=e?e:void 0,getElementMutationObserver:()=>fe,cleanup:Ee,restoreFocus:Ce})})}});return()=>{Ee(),Le()}},VS(kw,4,"overlay",qw,Ww,Ow),WS(kw,Ww),Ww.configure=Bv(Ww);var $w,Vw,Hw,Bw,Gw,Uw,Yw,Kw=Ww,Xw=!0;Hw=[qg],Bw=eS.Forward,$w=[qg],Vw=eS.Reverse;var Jw=class{constructor(){US(this,Uw,$S(Gw,8,this,Xw)),$S(Gw,11,this),US(this,Yw,$S(Gw,12,this,Xw)),$S(Gw,15,this)}isLocked(e){return e!==eS.Idle&&(null==e?this[eS.Forward]===Xw&&this[eS.Reverse]===Xw:this[e]===Xw)}unlock(e){e!==eS.Idle&&(this[e]=false)}};Gw=_S(null),Uw=new WeakMap,Yw=new WeakMap,VS(Gw,4,Bw,Hw,Jw,Uw),VS(Gw,4,Vw,$w,Jw,Yw),WS(Gw,Jw);var Zw,Qw,eC,tC,nC,rC,oC=[eS.Forward,eS.Reverse],iC=class{constructor(){this.x=new Jw,this.y=new Jw}isLocked(){return this.x.isLocked()&&this.y.isLocked()}},aC=class extends Uv{constructor(e){super(e);const t=Am(new iC);let n=null;this.signal=t,zm(()=>{const{status:r}=e.dragOperation;if(!r.initialized)return n=null,void(t.value=new iC);const{delta:o}=e.dragOperation.position;if(n){const e={x:sC(o.x,n.x),y:sC(o.y,n.y)},r=t.peek();bm(()=>{for(const t of mv)for(const n of oC)e[t]===n&&r[t].unlock(n);t.value=r})}n=o})}get current(){return this.signal.peek()}};function sC(e,t){return Math.sign(e-t)}var lC=class extends(Qw=Kv,Zw=[qg],Qw){constructor(e){super(e),US(this,tC,$S(eC,8,this,!1)),$S(eC,11,this),US(this,nC),US(this,rC,()=>{if(!GS(this,nC))return;const{element:e,by:t}=GS(this,nC);t.y&&(e.scrollTop+=t.y),t.x&&(e.scrollLeft+=t.x)}),this.scroll=(e,t)=>{var n;if(this.disabled)return!1;const r=this.getScrollableElements();if(!r)return YS(this,nC,void 0),!1;const{position:o}=this.manager.dragOperation,i=null==o?void 0:o.current;if(i){const{by:o}=null!=e?e:{},a=o?{x:cC(o.x),y:cC(o.y)}:void 0,s=a?void 0:this.scrollIntentTracker.current;if(null==s?void 0:s.isLocked())return!1;for(const e of r){const r=zx(e,o);if(r.x||r.y){const{speed:r,direction:l}=rS(e,i,a,null==t?void 0:t.acceleration,null==t?void 0:t.threshold);if(s)for(const e of mv)s[e].isLocked(l[e])&&(r[e]=0,l[e]=0);if(l.x||l.y){const{x:t,y:i}=null!=o?o:l,a=t*r.x,s=i*r.y;if(a||s){const t=null==(n=GS(this,nC))?void 0:n.by;if(this.autoScrolling&&t){if(t.x&&!a||t.y&&!s)continue}return YS(this,nC,{element:e,by:{x:a,y:s}}),$x.schedule(GS(this,rC)),!0}}}}}return YS(this,nC,void 0),!1};let t=null,n=null;const r=Ag(()=>{const{position:n,source:r}=e.dragOperation;if(!n)return null;const o=sx(rx(null==r?void 0:r.element),n.current);return o&&(t=o),null!=o?o:t}),o=Ag(()=>{const t=r.value,{documentElement:o}=Yy(t);if(!t||t===o){const{target:t}=e.dragOperation,r=null==t?void 0:t.element;if(r){const e=Kx(r,{excludeElement:!1});return n=e,e}}if(t){const e=Kx(t,{excludeElement:!1});return this.autoScrolling&&n&&e.size<(null==n?void 0:n.size)?n:(n=e,e)}return n=null,null},Pg);this.getScrollableElements=()=>o.value,this.scrollIntentTracker=new aC(e),this.destroy=e.monitor.addEventListener("dragmove",t=>{!this.disabled&&!t.defaultPrevented&&vS(e.dragOperation.activatorEvent)&&t.by&&this.scroll({by:t.by})&&t.preventDefault()})}};function cC(e){return e>0?eS.Forward:e<0?eS.Reverse:eS.Idle}eC=_S(Qw),tC=new WeakMap,nC=new WeakMap,rC=new WeakMap,VS(eC,4,"autoScrolling",Zw,lC,tC),WS(eC,lC);var uC=new class{constructor(e){this.scheduler=e,this.pending=!1,this.tasks=new Set,this.resolvers=new Set,this.flush=()=>{const{tasks:e,resolvers:t}=this;this.pending=!1,this.tasks=new Set,this.resolvers=new Set;for(const t of e)t();for(const e of t)e()}}schedule(e){return this.tasks.add(e),this.pending||(this.pending=!0,this.scheduler(this.flush)),new Promise(e=>this.resolvers.add(e))}}(e=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()}),dC=class extends Uv{constructor(e,t){super(e,t);const n=e.registry.plugins.get(lC);if(!n)throw new Error("AutoScroller plugin depends on Scroller plugin");this.destroy=zm(()=>{var t,r,o;if(this.disabled)return;const{position:i,status:a}=e.dragOperation;if(a.dragging){const e={acceleration:null==(t=this.options)?void 0:t.acceleration,threshold:"number"==typeof(null==(r=this.options)?void 0:r.threshold)?{x:this.options.threshold,y:this.options.threshold}:null==(o=this.options)?void 0:o.threshold};if(n.scroll(void 0,e)){n.autoScrolling=!0;const t=setInterval(()=>uC.schedule(()=>n.scroll(void 0,e)),10);return()=>{clearInterval(t)}}n.autoScrolling=!1}})}};dC.configure=Bv(dC);var pC,fC=dC,hC={capture:!0,passive:!0},mC=class extends Kv{constructor(e){super(e),US(this,pC),this.handleScroll=()=>{null==GS(this,pC)&&YS(this,pC,setTimeout(()=>{this.manager.collisionObserver.forceUpdate(!1),YS(this,pC,void 0)},50))};const{dragOperation:t}=this.manager;this.destroy=zm(()=>{var e,n,r;if(t.status.dragging){const o=null!=(r=null==(n=null==(e=t.source)?void 0:e.element)?void 0:n.ownerDocument)?r:document;return o.addEventListener("scroll",this.handleScroll,hC),()=>{o.removeEventListener("scroll",this.handleScroll,hC)}}})}};pC=new WeakMap;function gC(){var e;null==(e=document.getSelection())||e.removeAllRanges()}var vC,bC=Object.freeze({offset:10,keyboardCodes:{start:["Space","Enter"],cancel:["Escape"],end:["Space","Enter","Tab"],up:["ArrowUp"],down:["ArrowDown"],left:["ArrowLeft"],right:["ArrowRight"]},preventActivation(e,t){var n;const r=null!=(n=t.handle)?n:t.element;return e.target!==r}}),yC=class extends iy{constructor(e,t){super(e),this.manager=e,this.options=t,US(this,vC,[]),this.listeners=new cx,this.handleSourceKeyDown=(e,t,n)=>{if(this.disabled||e.defaultPrevented)return;if(!gS(e.target))return;if(t.disabled)return;const{keyboardCodes:r=bC.keyboardCodes,preventActivation:o=bC.preventActivation}=null!=n?n:{};r.start.includes(e.code)&&this.manager.dragOperation.status.idle&&((null==o?void 0:o(e,t))||this.handleStart(e,t,n))}}bind(e,t=this.options){const n=zm(()=>{var n;const r=null!=(n=e.handle)?n:e.element,o=n=>{vS(n)&&this.handleSourceKeyDown(n,e,t)};if(r)return r.addEventListener("keydown",o),()=>{r.removeEventListener("keydown",o)}});return n}handleStart(e,t,n){const{element:r}=t;if(!r)throw new Error("Source draggable does not have an associated element");e.preventDefault(),e.stopImmediatePropagation(),oS(r);const{center:o}=new fS(r);if(this.manager.actions.start({event:e,coordinates:{x:o.x,y:o.y},source:t}).signal.aborted)return this.cleanup();this.sideEffects();const i=Yy(r),a=[this.listeners.bind(i,[{type:"keydown",listener:e=>this.handleKeyDown(e,t,n),options:{capture:!0}}])];GS(this,vC).push(...a)}handleKeyDown(e,t,n){const{keyboardCodes:r=bC.keyboardCodes}=null!=n?n:{};if(wC(e,[...r.end,...r.cancel])){e.preventDefault();const t=wC(e,r.cancel);return void this.handleEnd(e,t)}wC(e,r.up)?this.handleMove("up",e):wC(e,r.down)&&this.handleMove("down",e),wC(e,r.left)?this.handleMove("left",e):wC(e,r.right)&&this.handleMove("right",e)}handleEnd(e,t){this.manager.actions.stop({event:e,canceled:t}),this.cleanup()}handleMove(e,t){var n,r;const{shape:o}=this.manager.dragOperation,i=t.shiftKey?5:1;let a={x:0,y:0},s=null!=(r=null==(n=this.options)?void 0:n.offset)?r:bC.offset;if("number"==typeof s&&(s={x:s,y:s}),o){switch(e){case"up":a={x:0,y:-s.y*i};break;case"down":a={x:0,y:s.y*i};break;case"left":a={x:-s.x*i,y:0};break;case"right":a={x:s.x*i,y:0}}(a.x||a.y)&&(t.preventDefault(),this.manager.actions.move({event:t,by:a}))}}sideEffects(){const e=this.manager.registry.plugins.get(fC);!1===(null==e?void 0:e.disabled)&&(e.disable(),GS(this,vC).push(()=>{e.enable()}))}cleanup(){GS(this,vC).forEach(e=>e()),YS(this,vC,[])}destroy(){this.cleanup(),this.listeners.clear()}};vC=new WeakMap,yC.configure=Bv(yC),yC.defaults=bC;var xC,SC=yC;function wC(e,t){return t.includes(e.code)}var CC,EC;xC=new WeakMap;CC=new WeakMap,EC=new WeakMap;var IC=class{};IC.Delay=class extends sy{constructor(){super(...arguments),US(this,CC),US(this,EC)}onEvent(e){switch(e.type){case"pointerdown":YS(this,EC,Jy(e)),YS(this,CC,setTimeout(()=>this.activate(e),this.options.value));break;case"pointermove":if(!GS(this,EC))return;const{x:t,y:n}=Jy(e);cv({x:t-GS(this,EC).x,y:n-GS(this,EC).y},this.options.tolerance)&&this.abort();break;case"pointerup":this.abort()}}abort(){GS(this,CC)&&(clearTimeout(GS(this,CC)),YS(this,EC,void 0),YS(this,CC,void 0))}},IC.Distance=class extends sy{constructor(){super(...arguments),US(this,xC)}onEvent(e){switch(e.type){case"pointerdown":YS(this,xC,Jy(e));break;case"pointermove":if(!GS(this,xC))return;const{x:t,y:n}=Jy(e),r={x:t-GS(this,xC).x,y:n-GS(this,xC).y},{tolerance:o}=this.options;if(o&&cv(r,o))return void this.abort();cv(r,this.options.value)&&this.activate(e);break;case"pointerup":this.abort()}}abort(){YS(this,xC,void 0)}};var DC,LC=Object.freeze({activationConstraints(e,t){var n;const{pointerType:r,target:o}=e;if("mouse"!==r||!gS(o)||t.handle!==o&&!(null==(n=t.handle)?void 0:n.contains(o)))return"touch"===r?[new IC.Delay({value:250,tolerance:5})]:function(e){if(!gS(e))return!1;const{tagName:t}=e;return"INPUT"===t||"TEXTAREA"===t||(n=e).hasAttribute("contenteditable")&&"false"!==n.getAttribute("contenteditable");var n}(o)&&!e.defaultPrevented?[new IC.Delay({value:200,tolerance:0})]:[new IC.Delay({value:200,tolerance:10}),new IC.Distance({value:5})]},preventActivation(e,t){var n;const{target:r}=e;if(r===t.element)return!1;if(r===t.handle)return!1;if(!gS(r))return!1;if(null==(n=t.handle)?void 0:n.contains(r))return!1;const o=r.closest('\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n a[href],\n [contenteditable]:not([contenteditable="false"])\n ');return o!==t.element&&Boolean(o)}}),RC=class extends iy{constructor(e,t){super(e),this.manager=e,this.options=t,US(this,DC,new Set),this.listeners=new cx,this.latest={event:void 0,coordinates:void 0},this.handleMove=()=>{const{event:e,coordinates:t}=this.latest;e&&t&&this.manager.actions.move({event:e,to:t})},this.handleCancel=this.handleCancel.bind(this),this.handlePointerUp=this.handlePointerUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}activationConstraints(e,t,n=this.options){const{activationConstraints:r=LC.activationConstraints}=null!=n?n:{};return"function"==typeof r?r(e,t):r}bind(e,t=this.options){const n=zm(()=>{var n;const r=new AbortController,{signal:o}=r,i=n=>{(function(e){if(!e)return!1;const{PointerEvent:t}=Hy(e.target);return e instanceof t})(n)&&this.handlePointerDown(n,e,t)};let a=[null!=(n=e.handle)?n:e.element];(null==t?void 0:t.activatorElements)&&(a=Array.isArray(t.activatorElements)?t.activatorElements:t.activatorElements(e));for(const e of a)e&&(TC(e.ownerDocument.defaultView),e.addEventListener("pointerdown",i,{signal:o}));return()=>r.abort()});return n}handlePointerDown(e,t,n){if(this.disabled||!e.isPrimary||0!==e.button||!gS(e.target)||t.disabled||function(e){return"sensor"in e}(e)||!this.manager.dragOperation.status.idle)return;const{preventActivation:r=LC.preventActivation}=null!=n?n:{};if(null==r?void 0:r(e,t))return;const{target:o}=e,i=Gy(o)&&o.draggable&&"true"===o.getAttribute("draggable"),a=Xx(t.element),{x:s,y:l}=Jy(e);this.initialCoordinates={x:s*a.scaleX+a.x,y:l*a.scaleY+a.y};const c=this.activationConstraints(e,t,n);e.sensor=this;const u=new ay(c,e=>this.handleStart(t,e));u.signal.onabort=()=>this.handleCancel(e),u.onEvent(e),this.controller=u;const d=Qy(),p=this.listeners.bind(d,[{type:"pointermove",listener:e=>this.handlePointerMove(e,t)},{type:"pointerup",listener:this.handlePointerUp,options:{capture:!0}},{type:"pointercancel",listener:this.handleCancel},{type:"dragstart",listener:i?this.handleCancel:AC,options:{capture:!0}}]);GS(this,DC).add(()=>{p(),this.initialCoordinates=void 0})}handlePointerMove(e,t){var n,r;if(!1!==(null==(n=this.controller)?void 0:n.activated)){if(this.manager.dragOperation.status.dragging){const n=Jy(e),r=Xx(t.element);n.x=n.x*r.scaleX+r.x,n.y=n.y*r.scaleY+r.y,e.preventDefault(),e.stopPropagation(),this.latest.event=e,this.latest.coordinates=n,$x.schedule(this.handleMove)}}else null==(r=this.controller)||r.onEvent(e)}handlePointerUp(e){const{status:t}=this.manager.dragOperation;if(!t.idle){e.preventDefault(),e.stopPropagation();const n=!t.initialized;this.manager.actions.stop({event:e,canceled:n})}this.cleanup()}handleKeyDown(e){"Escape"===e.key&&(e.preventDefault(),this.handleCancel(e))}handleStart(e,t){const{manager:n,initialCoordinates:r}=this;if(!r||!n.dragOperation.status.idle)return;if(t.defaultPrevented)return;if(n.actions.start({coordinates:r,event:t,source:e}).signal.aborted)return this.cleanup();t.preventDefault();const o=Yy(t.target).body;try{o.setPointerCapture(t.pointerId)}catch(e){return void this.handleCancel(t)}const i=gS(t.target)?[t.target,o]:o,a=this.listeners.bind(i,[{type:"touchmove",listener:AC,options:{passive:!1}},{type:"click",listener:AC},{type:"contextmenu",listener:AC},{type:"keydown",listener:this.handleKeyDown}]);GS(this,DC).add(a)}handleCancel(e){const{dragOperation:t}=this.manager;t.status.initialized&&this.manager.actions.stop({event:e,canceled:!0}),this.cleanup()}cleanup(){const{controller:e}=this;this.controller=void 0,e&&!e.signal.aborted&&e.abort(),this.latest={event:void 0,coordinates:void 0},GS(this,DC).forEach(e=>e()),GS(this,DC).clear()}destroy(){this.cleanup(),this.listeners.clear()}};DC=new WeakMap,RC.configure=Bv(RC),RC.defaults=LC;var MC=RC;function AC(e){e.preventDefault()}function PC(){}var qC=new WeakSet;function TC(e){e&&!qC.has(e)&&(e.addEventListener("touchmove",PC,{capture:!1,passive:!1}),qC.add(e))}var kC,OC,NC,_C,jC,FC,zC,WC,$C,VC,HC,BC,GC,UC,YC,KC,XC={modifiers:[],plugins:[class extends Uv{constructor(e,t){super(e);const{id:n,idPrefix:{description:r=ZS,announcement:o=QS}={},announcements:i=tw,screenReaderInstructions:a=ew,debounce:s=500}=null!=t?t:{},l=n?`${r}-${n}`:yS(r),c=n?`${o}-${n}`:yS(o);let u,d,p,f;const h=(e=f)=>{p&&e&&(null==p?void 0:p.nodeValue)!==e&&(p.nodeValue=e)},m=()=>$x.schedule(h),g=function(e,t){let n;const r=()=>{clearTimeout(n),n=setTimeout(e,t)};return r.cancel=()=>clearTimeout(n),r}(m,s),v=Object.entries(i).map(([e,t])=>this.manager.monitor.addEventListener(e,(n,r)=>{const o=p;if(!o)return;const i=null==t?void 0:t(n,r);i&&o.nodeValue!==i&&(f=i,rw.includes(e)?g():(m(),g.cancel()))})),b=()=>{let e=[];(null==u?void 0:u.isConnected)||(u=function(e,t){const n=document.createElement("div");return n.id=e,n.style.setProperty("display","none"),n.textContent=t,n}(l,a.draggable),e.push(u)),(null==d?void 0:d.isConnected)||(d=function(e){const t=document.createElement("div");return t.id=e,t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),t.style.setProperty("position","fixed"),t.style.setProperty("width","1px"),t.style.setProperty("height","1px"),t.style.setProperty("margin","-1px"),t.style.setProperty("border","0"),t.style.setProperty("padding","0"),t.style.setProperty("overflow","hidden"),t.style.setProperty("clip","rect(0 0 0 0)"),t.style.setProperty("clip-path","inset(100%)"),t.style.setProperty("white-space","nowrap"),t}(c),p=document.createTextNode(""),d.appendChild(p),e.push(d)),e.length>0&&document.body.append(...e)},y=new Set;function x(){for(const e of y)e()}this.registerEffect(()=>{var e;y.clear();for(const t of this.manager.registry.draggables.value){const n=null!=(e=t.handle)?e:t.element;if(n){u&&d||y.add(b),nw(n)&&!ex()||n.hasAttribute("tabindex")||y.add(()=>n.setAttribute("tabindex","0")),n.hasAttribute("role")||"button"===n.tagName.toLowerCase()||y.add(()=>n.setAttribute("role",XS)),n.hasAttribute("aria-roledescription")||y.add(()=>n.setAttribute("aria-roledescription",JS)),n.hasAttribute("aria-describedby")||y.add(()=>n.setAttribute("aria-describedby",l));for(const e of["aria-pressed","aria-grabbed"]){const r=String(t.isDragging);n.getAttribute(e)!==r&&y.add(()=>n.setAttribute(e,r))}const e=String(t.disabled);n.getAttribute("aria-disabled")!==e&&y.add(()=>n.setAttribute("aria-disabled",e))}}y.size>0&&$x.schedule(x)}),this.destroy=()=>{super.destroy(),null==u||u.remove(),null==d||d.remove(),v.forEach(e=>e())}}},fC,class extends Uv{constructor(e,t){super(e,t),this.manager=e;const{cursor:n="grabbing"}=null!=t?t:{},r=e.registry.plugins.get(yw),o=null==r?void 0:r.register(`* { cursor: ${n} !important; }`);if(o){const e=this.destroy.bind(this);this.destroy=()=>{o(),e()}}}},Kw,class extends Uv{constructor(e){super(e),this.manager=e;const t=e.registry.plugins.get(yw),n=null==t?void 0:t.register("* { user-select: none !important; -webkit-user-select: none !important; }");if(this.destroy=zm(()=>{const{dragOperation:e}=this.manager;if(e.status.initialized)return gC(),document.addEventListener("selectionchange",gC,{capture:!0}),()=>{document.removeEventListener("selectionchange",gC,{capture:!0})}}),n){const e=this.destroy.bind(this);this.destroy=()=>{n(),e()}}}}],sensors:[MC,SC]},JC=class extends qy{constructor(e={}){const t=Py(e.plugins,XC.plugins),n=Py(e.sensors,XC.sensors),r=Py(e.modifiers,XC.modifiers);super(kS(TS({},e),{plugins:[mC,lC,yw,...t],sensors:n,modifiers:r}))}},ZC=class extends(NC=Fb,OC=[qg],kC=[qg],NC){constructor(e,t){var n=e,{element:r,effects:o=()=>[],handle:i}=n,a=NS(n,["element","effects","handle"]);super(TS({effects:()=>[...o(),()=>{var e,t;const{manager:n}=this;if(!n)return;const r=(null!=(t=null==(e=this.sensors)?void 0:e.map(Gv))?t:[...n.sensors]).map(e=>{const t=e instanceof iy?e:n.registry.register(e.plugin),r=e instanceof iy?void 0:e.options;return t.bind(this,r)});return function(){r.forEach(e=>e())}}]},a),t),US(this,jC,$S(_C,8,this)),$S(_C,11,this),US(this,FC,$S(_C,12,this)),$S(_C,15,this),this.element=r,this.handle=i}};_C=_S(NC),jC=new WeakMap,FC=new WeakMap,VS(_C,4,"handle",OC,ZC,jC),VS(_C,4,"element",kC,ZC,FC),WS(_C,ZC);var QC=class extends($C=zb,WC=[qg],zC=[qg],$C){constructor(e,t){var n=e,{element:r,effects:o=()=>[]}=n,i=NS(n,["element","effects"]);const{collisionDetector:a=xS}=i,s=e=>{const{manager:t,element:n}=this;if(!n||null===e)return void(this.shape=void 0);if(!t)return;const r=new fS(n),o=xm(()=>this.shape);return r&&(null==o?void 0:o.equals(r))?o:(this.shape=r,r)},l=Am(!1);super(kS(TS({},i),{collisionDetector:a,effects:()=>[...o(),()=>{const{element:e,manager:t}=this;if(!t)return;const{dragOperation:n}=t,{source:r}=n;l.value=Boolean(r&&n.status.initialized&&e&&!this.disabled&&this.accepts(r))},()=>{const{element:e}=this;if(l.value&&e){const t=new Ox(e,s);return()=>{t.disconnect(),this.shape=void 0}}},()=>{var e;if(null==(e=this.manager)?void 0:e.dragOperation.status.initialized)return()=>{this.shape=void 0}}]}),t),US(this,YC),US(this,HC,$S(VC,8,this)),$S(VC,11,this),US(this,KC,$S(VC,12,this)),$S(VC,15,this),this.element=r,this.refreshShape=()=>s()}set element(e){YS(this,YC,e,UC)}get element(){var e;return null!=(e=this.proxy)?e:GS(this,YC,GC)}};function eE(e){var t;if(null!=e)return function(e){return null!=e&&"object"==typeof e&&"current"in e}(e)?null!=(t=e.current)?t:void 0:e}VC=_S($C),HC=new WeakMap,YC=new WeakSet,KC=new WeakMap,BC=VS(VC,20,"#element",WC,YC,HC),GC=BC.get,UC=BC.set,VS(VC,4,"proxy",zC,QC,KC),WS(VC,QC);var tE="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?g:p;function nE(){const e=m(0)[1];return u(()=>{e(e=>e+1)},[e])}function rE(e,t=[],n=!1){const r=l(e);return r.current=e,function(e,t=!1){const n=l(e.peek()),r=l(!1),o=nE();return tE(()=>zm(()=>{const i=n.current,a=e.value;if(i!==a){if(n.current=a,!r.current)return;t?D(o):o()}}),[e,t,o]),{get value(){return r.current=!0,e.peek()}}}(v(()=>Ag(()=>r.current()),t),n)}function oE(e,t){const n=l(new Map),r=nE();return tE(()=>{if(e)return zm(()=>{var o;let i=!1,a=!1;for(const r of n.current){const[s]=r,l=xm(()=>r[1]),c=e[s];l!==c&&(i=!0,n.current.set(s,c),a=null!=(o=null==t?void 0:t(s,l,c))&&o)}i&&(a?queueMicrotask(()=>D(r)):r())});n.current.clear()},[e]),v(()=>e?new Proxy(e,{get(e,t){const r=e[t];return n.current.set(t,r),r}}):e,[e])}function iE(e,t){e()}function aE(e){const t=l(e);return tE(()=>{t.current=e},[e]),t}function sE(e,t,n=p,r=Object.is){const o=l(e);n(()=>{const n=o.current;r(e,n)||(o.current=e,t(e,n))},[t,e])}function lE(e,t){const n=l(eE(e));tE(()=>{const r=eE(e);r!==n.current&&(n.current=r,t(r))})}var cE=Object.defineProperty,uE=Object.defineProperties,dE=Object.getOwnPropertyDescriptors,pE=Object.getOwnPropertySymbols,fE=Object.prototype.hasOwnProperty,hE=Object.prototype.propertyIsEnumerable,mE=(e,t,n)=>t in e?cE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,gE=new JC,vE=c(gE),bE=y(x(({children:e},t)=>{const[n,r]=m(0),o=l(null),i=l(null),a=v(()=>({renderer:{get rendering(){var e;return null!=(e=o.current)?e:Promise.resolve()}},trackRendering(e){o.current||(o.current=new Promise(e=>{i.current=e})),S(()=>{e(),r(e=>e+1)})}}),[]);return tE(()=>{var e;null==(e=i.current)||e.call(i),o.current=null},[e,n]),w(t,()=>a),null})),yE=[void 0,Pg];function xE(e){var t=e,{children:n,onCollision:r,onBeforeDragStart:o,onDragStart:i,onDragMove:a,onDragOver:s,onDragEnd:c}=t,u=((e,t)=>{var n={};for(var r in e)fE.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&pE)for(var r of pE(e))t.indexOf(r)<0&&hE.call(e,r)&&(n[r]=e[r]);return n})(t,["children","onCollision","onBeforeDragStart","onDragStart","onDragMove","onDragOver","onDragEnd"]);const d=l(null),{plugins:f,modifiers:h,sensors:m}=u,g=Py(f,XC.plugins),v=Py(m,XC.sensors),y=Py(h,XC.modifiers),x=aE(o),S=aE(i),w=aE(s),C=aE(a),E=aE(c),I=aE(r),D=function(e){const t=l(null);t.current||(t.current=e());return b(()=>()=>{var e;return null==(e=t.current)?void 0:e.destroy()},[]),t.current}(()=>{var e;return null!=(e=u.manager)?e:new JC(u)});return p(()=>{if(!d.current)throw new Error("Renderer not found");const{renderer:e,trackRendering:t}=d.current,{monitor:n}=D;D.renderer=e;const r=[n.addEventListener("beforedragstart",e=>{const n=x.current;n&&t(()=>n(e,D))}),n.addEventListener("dragstart",e=>{var t;return null==(t=S.current)?void 0:t.call(S,e,D)}),n.addEventListener("dragover",e=>{const n=w.current;n&&t(()=>n(e,D))}),n.addEventListener("dragmove",e=>{const n=C.current;n&&t(()=>n(e,D))}),n.addEventListener("dragend",e=>{const n=E.current;n&&t(()=>n(e,D))}),n.addEventListener("collision",e=>{var t;return null==(t=I.current)?void 0:t.call(I,e,D)})];return()=>r.forEach(e=>e())},[D]),sE(g,()=>D&&(D.plugins=g),...yE),sE(v,()=>D&&(D.sensors=v),...yE),sE(y,()=>D&&(D.modifiers=y),...yE),hi.jsxs(vE.Provider,{value:D,children:[hi.jsx(bE,{ref:d,children:n}),n]})}function SE(){return h(vE)}function wE(e){var t;const n=null!=(t=SE())?t:void 0,[r]=m(()=>e(n));return r.manager!==n&&(r.manager=n),tE(r.register,[n,r]),r}function CE({children:e,className:t,dropAnimation:n,style:o,tag:i,disabled:a}){var s;const c=l(null),u=SE(),d=null!=(s=rE(()=>null==u?void 0:u.dragOperation.source,[u]).value)?s:null,f="function"==typeof a?a(d):a;p(()=>{if(!c.current||!u||f)return;const e=u.plugins.find(e=>e instanceof Kw);return e?(e.overlay=c.current,()=>{e.overlay=void 0}):void 0},[u,f]),p(()=>{if(!u)return;const e=u.plugins.find(e=>e instanceof Kw);return e?(e.dropAnimation=n,()=>{e.dropAnimation=void 0}):void 0},[u,n]);const h=v(()=>{if(!u)return null;const e=new Proxy(u.registry,{get:(e,t)=>"register"===t||"unregister"===t?EE:e[t]});return new Proxy(u,{get:(t,n)=>"registry"===n?e:t[n]})},[u]);return hi.jsx(vE.Provider,{value:h,children:r(i||"div",{ref:c,className:t,style:o,"data-dnd-overlay":!0},function(){if(!d||f)return null;if("function"==typeof e)return hi.jsx(IE,{source:d,children:e});return e}())})}function EE(){return()=>{}}function IE({children:e,source:t}){return e(oE(t))}var DE,LE,RE,ME,AE,PE=Object.create,qE=Object.defineProperty,TE=Object.getOwnPropertyDescriptor,kE=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),OE=e=>{throw TypeError(e)},NE=["class","method","getter","setter","accessor","field","value","get","set"],_E=e=>void 0!==e&&"function"!=typeof e?OE("Function expected"):e,jE=(e,t,n,r,o)=>({kind:NE[e],name:t,metadata:r,addInitializer:e=>n._?OE("Already initialized"):o.push(_E(e||null))}),FE=(e,t,n,r,o,i)=>{for(var a,s,l,c,u=7&t,d=NE[u+5],p=e[2]||(e[2]=[]),f=(o=o.prototype,TE(o,n)),h=r.length-1;h>=0;h--)(l=jE(u,n,s={},e[3],p)).static=false,l.private=false,c=l.access={has:e=>n in e},c.get=e=>e[n],a=(0,r[h])(f[d],l),s._=1,_E(a)&&(f[d]=a);return f&&qE(o,n,f),o},zE=(e,t,n)=>t.has(e)||OE("Cannot "+n),WE=class e{constructor(e,t){this.x=e,this.y=t}static delta(t,n){return new e(t.x-n.x,t.y-n.y)}static distance(e,t){return Math.hypot(e.x-t.x,e.y-t.y)}static equals(e,t){return e.x===t.x&&e.y===t.y}static from({x:t,y:n}){return new e(t,n)}},$E=class extends(RE=_g,LE=[Tg],DE=[Tg],RE){constructor(e){var t,n,r;super(WE.from(e),(e,t)=>WE.equals(e,t)),((e,t,n)=>{for(var r=0,o=e[t>>1],i=o&&o.length;r<i;r++)o[r].call(n)})(AE,5,this),t=this,r=0,(n=ME).has(t)?OE("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),this.velocity={x:0,y:0}}get delta(){return WE.delta(this.current,this.initial)}get direction(){const{current:e,previous:t}=this;if(!t)return null;const n={x:e.x-t.x,y:e.y-t.y};return n.x||n.y?Math.abs(n.x)>Math.abs(n.y)?n.x>0?"right":"left":n.y>0?"down":"up":null}get current(){return super.current}set current(e){const{current:t}=this,n=WE.from(e),r={x:n.x-t.x,y:n.y-t.y},o=Date.now(),i=o-(zE(a=this,s=ME,"read from private field"),s.get(a));var a,s;const l=e=>Math.round(e/i*100);bm(()=>{((e,t,n)=>{zE(e,t,"write to private field"),t.set(e,n)})(this,ME,o),this.velocity={x:l(r.x),y:l(r.y)},super.current=n})}reset(e=this.defaultValue){super.reset(WE.from(e)),this.velocity={x:0,y:0}}};AE=(e=>{var t;return[,,,PE(null!=(t=null==e?void 0:e[kE("metadata")])?t:null)]})(RE),ME=new WeakMap,FE(AE,2,"delta",LE,$E),FE(AE,2,"direction",DE,$E),((e,t)=>{return n=t,r=kE("metadata"),o=e[3],r in n?qE(n,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):n[r]=o;var n,r,o})(AE,$E);var VE=(e=>(e.Horizontal="x",e.Vertical="y",e))(VE||{});Object.values(VE);var HE=e=>{var t;return null!=(t=(({dragOperation:e,droppable:t})=>{const n=e.position.current;if(!n)return null;const{id:r}=t;if(!t.shape)return null;if(t.shape.containsPoint(n))return{id:r,value:1/WE.distance(t.shape.center,n),type:ty.PointerIntersection,priority:ey.High};return null})(e))?t:(({dragOperation:e,droppable:t})=>{const{shape:n}=e;if(!t.shape||!(null==n?void 0:n.current))return null;const r=n.current.intersectionArea(t.shape);if(r){const{position:o}=e,i=WE.distance(t.shape.center,o.current),a=r/(n.current.area+t.shape.area-r)/i;return{id:t.id,value:a,type:ty.ShapeIntersection,priority:ey.Normal}}return null})(e)};function BE(e){const{collisionDetector:t,data:n,disabled:r,element:o,id:i,accept:a,type:s}=e,l=wE(t=>new QC(((e,t)=>uE(e,dE(t)))(((e,t)=>{for(var n in t||(t={}))fE.call(t,n)&&mE(e,n,t[n]);if(pE)for(var n of pE(t))hE.call(t,n)&&mE(e,n,t[n]);return e})({},e),{register:!1,element:eE(o)}),t)),c=oE(l);return sE(i,()=>l.id=i),lE(o,e=>l.element=e),sE(a,()=>l.accept=a,void 0,Pg),sE(t,()=>l.collisionDetector=null!=t?t:HE),sE(n,()=>n&&(l.data=n)),sE(r,()=>l.disabled=!0===r),sE(s,()=>l.type=s),{droppable:c,get isDropTarget(){return c.isDropTarget},ref:u(e=>{var t,n;(e||!(null==(t=l.element)?void 0:t.isConnected)||(null==(n=l.manager)?void 0:n.dragOperation.status.idle))&&(l.element=null!=e?e:void 0)},[l])}}const GE=e=>Array.from({length:e},(e,t)=>t),UE=({id:e,sectionIndex:t,itemIndex:n})=>hi.jsx("span",{children:`${e}-${t}-${n}`}),YE=y(()=>{const e=Tf(sm)??UE,{startSectionIndex:t,startIndex:n,id:r}=Tf(dm)??{};return"number"!=typeof t||"number"!=typeof n||void 0===r?null:hi.jsx(CE,{dropAnimation:null,children:hi.jsx("div",{style:{display:"flex",alignItems:"center",padding:"10px",background:"white",boxShadow:"0px 4px 10px 0px rgba(0, 0, 0, 0.15)",borderRadius:"4px",border:"1px solid rgba(0, 0, 0, 0.15)",width:"208px",maxHeight:"32px",fontSize:"12px",lineHeight:"16px"},children:hi.jsx(e,{id:r,sectionIndex:t,itemIndex:n})})})}),KE=({sectionIndex:e,itemIndex:t,isDragging:n})=>{const r=Tf(dm),o=r?.toSectionIndex===e&&r.toIndex===t;return hi.jsx("div",{"data-key":"drop-target-indicator","data-testid":"drop-target-indicator",style:{visibility:o&&!n?"visible":"hidden",padding:0,background:"rgba(64, 64, 64, 1)",borderRadius:2,marginLeft:"4px",width:"calc(100% - 8px)",height:"2px"}})},XE=(e,t)=>e?"2px solid rgba(0, 135, 61, 1)":t?"1px dashed rgba(0, 0, 0, 0.43)":void 0,JE=y(({sectionIndex:e})=>{const t=Tf(em)[e],n=Tf(tm),r=Tf(nm),o=null!==Tf(dm),i=r(e),a=n({sectionIndex:e}),{ref:s,isDropTarget:l}=BE({id:a,type:"section",accept:"item",collisionPriority:ey.Low,data:{id:a,sectionIndex:e,sectionKey:a}});return t>0?null:hi.jsxs(mc,{ref:s,sx:{margin:"4px",outline:XE(l,o),borderRadius:"4px",boxSizing:"border-box"},children:[hi.jsx(mc,{sx:{position:"relative",top:"4px"},children:hi.jsx(KE,{sectionIndex:e,itemIndex:0,isDragging:!1})}),hi.jsxs(mc,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"20px 4px"},children:[hi.jsx(Pl,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontWeight:"600",fontSize:"14px",lineHeight:"16px",color:"rgba(64, 64, 64, 1)"},children:i.title}),hi.jsx(Pl,{sx:{textAlign:"center",width:"fit-content",maxWidth:"100%",overflowWrap:"break-word",textOverflow:"ellipsis",fontSize:"12px",lineHeight:"150%",color:"rgba(64, 64, 64, 1)"},children:i.message})]})]})}),ZE=y(({id:e,sectionIndex:t})=>{const n=Tf(am);return void 0===n?null:r(n,{id:e,sectionIndex:t})});var QE=Object.defineProperty,eI=Object.defineProperties,tI=Object.getOwnPropertyDescriptors,nI=Object.getOwnPropertySymbols,rI=Object.prototype.hasOwnProperty,oI=Object.prototype.propertyIsEnumerable,iI=(e,t,n)=>t in e?QE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,aI=(e,t)=>{for(var n in t||(t={}))rI.call(t,n)&&iI(e,n,t[n]);if(nI)for(var n of nI(t))oI.call(t,n)&&iI(e,n,t[n]);return e},sI=(e,t)=>eI(e,tI(t)),lI=class extends Ly{apply({transform:e}){if(!this.options)return e;const{axis:t,value:n}=this.options;return sI(aI({},e),{[t]:n})}};lI.configure=Bv(lI);var cI=lI,uI=cI.configure({axis:"x",value:0});cI.configure({axis:"y",value:0});var dI=class extends Ly{apply({transform:e}){var t;const{size:n=20}=null!=(t=this.options)?t:{},r="number"==typeof n?n:n.x,o="number"==typeof n?n:n.y;return sI(aI({},e),{x:Math.ceil(e.x/r)*r,y:Math.ceil(e.y/o)*o})}};dI.configure=Bv(dI);var pI=Object.create,fI=Object.defineProperty,hI=Object.defineProperties,mI=Object.getOwnPropertyDescriptor,gI=Object.getOwnPropertyDescriptors,vI=Object.getOwnPropertySymbols,bI=Object.prototype.hasOwnProperty,yI=Object.prototype.propertyIsEnumerable,xI=e=>{throw TypeError(e)},SI=(e,t,n)=>t in e?fI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wI=(e,t)=>{for(var n in t||(t={}))bI.call(t,n)&&SI(e,n,t[n]);if(vI)for(var n of vI(t))yI.call(t,n)&&SI(e,n,t[n]);return e},CI=(e,t)=>hI(e,gI(t)),EI=["class","method","getter","setter","accessor","field","value","get","set"],II=e=>void 0!==e&&"function"!=typeof e?xI("Function expected"):e,DI=(e,t,n,r,o)=>({kind:EI[e],name:t,metadata:r,addInitializer:e=>n._?xI("Already initialized"):o.push(II(e||null))}),LI=(e,t,n,r)=>{for(var o=0,i=e[t>>1],a=i&&i.length;o<a;o++)1&t?i[o].call(n):r=i[o].call(n,r);return r},RI=(e,t,n,r,o,i)=>{for(var a,s,l,c,u,d=7&t,p=e.length+1,f=EI[d+5],h=e[p-1]=[],m=e[p]||(e[p]=[]),g=(o=o.prototype,mI({get[n](){return AI(this,i)},set[n](e){return qI(this,i,e)}},n)),v=r.length-1;v>=0;v--)(c=DI(d,n,l={},e[3],m)).static=false,c.private=false,u=c.access={has:e=>n in e},u.get=e=>e[n],u.set=(e,t)=>e[n]=t,s=(0,r[v])({get:g.get,set:g.set},c),l._=1,void 0===s?II(s)&&(g[f]=s):"object"!=typeof s||null===s?xI("Object expected"):(II(a=s.get)&&(g.get=a),II(a=s.set)&&(g.set=a),II(a=s.init)&&h.unshift(a));return g&&fI(o,n,g),o},MI=(e,t,n)=>t.has(e)||xI("Cannot "+n),AI=(e,t,n)=>(MI(e,t,"read from private field"),t.get(e)),PI=(e,t,n)=>t.has(e)?xI("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),qI=(e,t,n,r)=>(MI(e,t,"write to private field"),t.set(e,n),n);function TI(e){return e instanceof mD||e instanceof hD}var kI=class extends Uv{constructor(e){super(e);const t=zm(()=>{const{dragOperation:t}=e;if(vS(t.activatorEvent)&&TI(t.source)&&t.status.initialized){const t=e.registry.plugins.get(lC);if(t)return t.disable(),()=>t.enable()}}),n=e.monitor.addEventListener("dragmove",(e,t)=>{queueMicrotask(()=>{if(this.disabled||e.defaultPrevented||!e.nativeEvent)return;const{dragOperation:n}=t;if(!vS(e.nativeEvent))return;if(!TI(n.source))return;if(!n.shape)return;const{actions:r,collisionObserver:o,registry:i}=t,{by:a}=e;if(!a)return;const s=function(e){const{x:t,y:n}=e;if(t>0)return"right";if(t<0)return"left";if(n>0)return"down";if(n<0)return"up"}(a),{source:l,target:c}=n,{center:u}=n.shape.current,d=[],p=[];bm(()=>{for(const e of i.droppables){const{id:t}=e;if(!e.accepts(l)||t===(null==c?void 0:c.id)&&TI(e)||!e.element)continue;let n=e.shape;const r=new fS(e.element,{getBoundingClientRect:e=>Xy(e,void 0,.2)});r.height&&r.width&&(("down"==s&&u.y+10<r.center.y||"up"==s&&u.y-10>r.center.y||"left"==s&&u.x-10>r.center.x||"right"==s&&u.x+10<r.center.x)&&(d.push(e),e.shape=r,p.push(()=>e.shape=n)))}}),e.preventDefault(),o.disable();const f=o.computeCollisions(d,SS);bm(()=>p.forEach(e=>e()));const[h]=f;if(!h)return;const{id:m}=h,{index:g,group:v}=l.sortable;r.setDropTarget(m).then(()=>{const{source:e,target:t,shape:i}=n;if(!e||!TI(e)||!i)return;const{index:a,group:s,target:l}=e.sortable,c=g!==a||v!==s,u=c?l:null==t?void 0:t.element;if(!u)return;oS(u);const d=new fS(u);if(!d)return;const p=av.delta(d,av.from(i.current.boundingRectangle),e.alignment);r.move({by:p}),c?r.setDropTarget(e.id).then(()=>o.enable()):o.enable()})})});this.destroy=()=>{n(),t()}}};var OI=Object.defineProperty,NI=Object.defineProperties,_I=Object.getOwnPropertyDescriptors,jI=Object.getOwnPropertySymbols,FI=Object.prototype.hasOwnProperty,zI=Object.prototype.propertyIsEnumerable,WI=(e,t,n)=>t in e?OI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$I=(e,t)=>{for(var n in t||(t={}))FI.call(t,n)&&WI(e,n,t[n]);if(jI)for(var n of jI(t))zI.call(t,n)&&WI(e,n,t[n]);return e},VI=(e,t)=>NI(e,_I(t));function HI(e,t,n){if(t===n)return e;const r=e.slice();return r.splice(n,0,r.splice(t,1)[0]),r}function BI(e,t){const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?n:void 0}function GI(e){return"initialIndex"in e&&"number"==typeof e.initialIndex&&"index"in e&&"number"==typeof e.index}function UI(e,t){return function(e,t,n){var r,o;const{source:i,target:a,canceled:s}=t.operation;if(!i||!a||s)return"preventDefault"in t&&t.preventDefault(),e;const l=(e,t)=>e===t||null!==e&&"object"==typeof e&&"id"in e&&e.id===t;if(Array.isArray(e)){const r=e.findIndex(e=>l(e,i.id)),o=e.findIndex(e=>l(e,a.id));if(-1===r||-1===o){if(GI(i)){const r=i.initialIndex,o=i.index;return r===o||r<0||r>=e.length?("preventDefault"in t&&t.preventDefault(),e):n(e,r,o)}return e}if(!s&&"index"in i&&"number"==typeof i.index){const t=i.index;if(t!==r)return n(e,r,t)}return n(e,r,o)}const c=Object.entries(e);let u,d,p=-1,f=-1;for(const[e,t]of c)if(-1===p&&(p=t.findIndex(e=>l(e,i.id)),-1!==p&&(u=e)),-1===f&&(f=t.findIndex(e=>l(e,a.id)),-1!==f&&(d=e)),-1!==p&&-1!==f)break;if(-1===p&&GI(i)){const r=null==i.initialGroup?void 0:BI(e,i.initialGroup),o=i.initialIndex,a=null==i.group?void 0:BI(e,i.group),s=i.index;if(null==r||null==a)return"preventDefault"in t&&t.preventDefault(),e;if(r===a&&o===s)return"preventDefault"in t&&t.preventDefault(),e;if(r===a)return VI($I({},e),{[r]:n(e[r],o,s)});const l=e[r][o];return VI($I({},e),{[r]:[...e[r].slice(0,o),...e[r].slice(o+1)],[a]:[...e[a].slice(0,s),l,...e[a].slice(s)]})}if(!i.manager)return e;const{dragOperation:h}=i.manager,m=null!=(o=null==(r=h.shape)?void 0:r.current.center)?o:h.position.current;if(null==d){const t=BI(e,a.id);null!=t&&(d=t,f=a.shape&&m.y>a.shape.center.y?e[t].length:0)}if(null==u||null==d||u===d&&p===f){if(null!=u&&u===d&&p===f&&GI(i)){const t=null==i.group?void 0:BI(e,i.group),r=null!=i.group&&t!==u,o=i.index!==p;if(r||o){const r=null==i.group?u:t;if(null!=r){if(u===r)return VI($I({},e),{[u]:n(e[u],p,i.index)});const t=e[u][p];return VI($I({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[r]:[...e[r].slice(0,i.index),t,...e[r].slice(i.index)]})}}}return"preventDefault"in t&&t.preventDefault(),e}if(u===d)return VI($I({},e),{[u]:n(e[u],p,f)});const g=a.shape&&Math.round(m.y)>Math.round(a.shape.center.y)?1:0,v=e[u][p];return VI($I({},e),{[u]:[...e[u].slice(0,p),...e[u].slice(p+1)],[d]:[...e[d].slice(0,f+g),v,...e[d].slice(f+g)]})}(e,t,HI)}function YI(e){const t=new Map;for(const[,n]of e)for(const e of n)t.set(e.id,e.index);return t}function KI(e,t,n){var r;for(const[o,i]of t)for(const t of i){const i=e.get(t.id);if(t.index!==i||t.group!==o||!(null==(r=n.get(o))?void 0:r.has(t)))return!0}return!1}var XI="__default__";function JI(e,t,n,r){const o=r<t?"afterend":"beforebegin";n.insertAdjacentElement(o,e)}function ZI(e,t){return e.index-t.index}function QI(e,t){return e.initialIndex-t.initialIndex}function eD(e,t=ZI){return Array.from(e).sort(t)}var tD=[kI,class extends Uv{constructor(e){super(e);const t=()=>{const t=new Map;for(const n of e.registry.droppables)if(n instanceof mD){const{sortable:e}=n,{group:r}=e;let o=t.get(r);o||(o=new Set,t.set(r,o)),o.add(e)}return t},n=[e.monitor.addEventListener("dragover",(e,n)=>{if(this.disabled)return;const{dragOperation:r}=n,{source:o,target:i}=r;if(!TI(o)||!TI(i))return;if(o.sortable===i.sortable)return;const a=t(),s=YI(a),l=o.sortable.group===i.sortable.group,c=a.get(o.sortable.group),u=l?c:a.get(i.sortable.group);c&&u&&queueMicrotask(()=>{e.defaultPrevented||n.renderer.rendering.then(()=>{var r,d;const p=t();if(KI(s,a,p))return;const f=o.sortable.element,h=i.sortable.element;if(!h||!f)return;if(!l&&i.id===o.sortable.group)return;const m=eD(c),g=l?m:eD(u),v=null!=(r=o.sortable.group)?r:XI,b=null!=(d=i.sortable.group)?d:XI,y={[v]:m,[b]:g},x=UI(y,e);if(y===x)return;const S=x[b].indexOf(o.sortable),w=x[b].indexOf(i.sortable);n.collisionObserver.disable(),JI(f,S,h,w),bm(()=>{for(const[e,t]of x[v].entries())t.index=e;if(!l)for(const[e,t]of x[b].entries())t.group=i.sortable.group,t.index=e}),n.actions.setDropTarget(o.id).then(()=>n.collisionObserver.enable())})})}),e.monitor.addEventListener("dragend",(e,n)=>{if(!e.canceled)return;const{dragOperation:r}=n,{source:o}=r;TI(o)&&(o.sortable.initialIndex===o.sortable.index&&o.sortable.initialGroup===o.sortable.group||queueMicrotask(()=>{const e=t(),r=YI(e),i=e.get(o.sortable.initialGroup);i&&n.renderer.rendering.then(()=>{const n=t();if(KI(r,e,n))return;const a=eD(i),s=eD(i,QI),l=o.sortable.element,c=a[s.indexOf(o.sortable)],u=null==c?void 0:c.element;c&&u&&l&&(JI(l,c.index,u,o.index),bm(()=>{for(const t of e.values()){const e=Array.from(t).values();for(const t of e)t.index=t.initialIndex,t.group=t.initialGroup}}))})}))})];this.destroy=()=>{for(const e of n)e()}}}],nD={duration:250,easing:"cubic-bezier(0.25, 1, 0.5, 1)",idle:!1};function rD(e){var t,n;return"boolean"==typeof e?{draggable:e,droppable:e}:{draggable:null!=(t=null==e?void 0:e.draggable)&&t,droppable:null!=(n=null==e?void 0:e.droppable)&&n}}var oD,iD,aD,sD,lD,cD,uD,dD,pD=new class{constructor(){Lg(this,Ng,new WeakMap)}get(e,t){var n;return e?null==(n=Dg(this,Ng).get(e))?void 0:n.get(t):void 0}set(e,t,n){var r;if(e)return Dg(this,Ng).has(e)||Dg(this,Ng).set(e,new Map),null==(r=Dg(this,Ng).get(e))?void 0:r.set(t,n)}clear(e){var t;return e?null==(t=Dg(this,Ng).get(e))?void 0:t.clear():void 0}};iD=[qg],oD=[qg];var fD=class{constructor(e,t){PI(this,sD,LI(aD,8,this)),LI(aD,11,this),PI(this,lD),PI(this,cD),PI(this,uD,LI(aD,12,this)),LI(aD,15,this),PI(this,dD),this.register=()=>(bm(()=>{var e,t;null==(e=this.manager)||e.registry.register(this.droppable),null==(t=this.manager)||t.registry.register(this.draggable)}),()=>this.unregister()),this.unregister=()=>{bm(()=>{var e,t;null==(e=this.manager)||e.registry.unregister(this.droppable),null==(t=this.manager)||t.registry.unregister(this.draggable)})},this.destroy=()=>{bm(()=>{this.droppable.destroy(),this.draggable.destroy()})};var n=e,{effects:r=()=>[],disabled:o,group:i,index:a,sensors:s,type:l,transition:c=nD,plugins:u}=n,d=((e,t)=>{var n={};for(var r in e)bI.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&vI)for(var r of vI(e))t.indexOf(r)<0&&yI.call(e,r)&&(n[r]=e[r]);return n})(n,["effects","disabled","group","index","sensors","type","transition","plugins"]);const p=Py(u,tD),f=rD(o);this.droppable=new mD(CI(wI({},d),{disabled:f.droppable}),t,this),this.draggable=new hD(CI(wI({},d),{disabled:f.draggable,plugins:p,effects:()=>[()=>{var e,t,n;const r=null==(e=this.manager)?void 0:e.dragOperation.status;(null==r?void 0:r.initializing)&&this.id===(null==(n=null==(t=this.manager)?void 0:t.dragOperation.source)?void 0:n.id)&&pD.clear(this.manager),(null==r?void 0:r.dragging)&&pD.set(this.manager,this.id,xm(()=>({initialIndex:this.index,initialGroup:this.group})))},()=>{const{index:e,group:t,manager:n}=this,r=AI(this,cD),o=AI(this,lD);e===r&&t===o||(qI(this,cD,e),qI(this,lD,t),this.animate())},()=>{var e,t;const{target:n}=this,{isDragSource:r}=this.draggable;"move"===(null!=(t=null==(e=this.draggable.pluginConfig(Kw))?void 0:e.feedback)?t:"default")&&r&&(this.droppable.disabled=!n)},...r()],type:l,sensors:s}),t,this),qI(this,dD,d.element),this.manager=t,this.index=a,qI(this,cD,a),this.group=i,qI(this,lD,i),this.type=l,this.transition=c}get initialIndex(){var e,t;return null!=(t=null==(e=pD.get(this.manager,this.id))?void 0:e.initialIndex)?t:this.index}get initialGroup(){var e,t;return null!=(t=null==(e=pD.get(this.manager,this.id))?void 0:e.initialGroup)?t:this.group}animate(){xm(()=>{const{manager:e,transition:t}=this,{shape:n}=this.droppable;if(!e)return;const{idle:r}=e.dragOperation.status;n&&t&&(!r||t.idle)&&e.renderer.rendering.then(()=>{const{element:r}=this;if(!r)return;for(const e of r.getAnimations())!("transitionProperty"in e)||"transform"!==e.transitionProperty&&"translate"!==e.transitionProperty&&"scale"!==e.transitionProperty||e.cancel();const o=this.refreshShape();if(!o)return;const i=n.boundingRectangle.left-o.boundingRectangle.left,a=n.boundingRectangle.top-o.boundingRectangle.top,{translate:s}=Gx(r),l=lS(r,s,!1),c=lS(r,s);if(i||a){const n=ox(Hy(r))?CI(wI({},t),{duration:0}):t;sS({element:r,keyframes:{translate:[`${l.x+i}px ${l.y+a}px ${l.z}`,`${c.x}px ${c.y}px ${c.z}`]},options:n}).then(()=>{e.dragOperation.status.dragging||(this.droppable.shape=void 0)})}})})}get manager(){return this.draggable.manager}set manager(e){bm(()=>{this.draggable.manager=e,this.droppable.manager=e})}set element(e){bm(()=>{const t=AI(this,dD),n=this.droppable.element,r=this.draggable.element;n&&n!==t||(this.droppable.element=e),r&&r!==t||(this.draggable.element=e),qI(this,dD,e)})}get element(){var e,t;const n=AI(this,dD);if(n)return null!=(t=null!=(e=lx.get(n))?e:n)?t:this.droppable.element}set target(e){this.droppable.element=e}get target(){return this.droppable.element}set source(e){this.draggable.element=e}get source(){return this.draggable.element}get disabled(){const{disabled:e}=this.draggable,{disabled:t}=this.droppable;return e===t?e:{draggable:e,droppable:t}}set plugins(e){this.draggable.plugins=Py(e,tD)}set disabled(e){const t=rD(e);bm(()=>{this.droppable.disabled=t.droppable,this.draggable.disabled=t.draggable})}set data(e){bm(()=>{this.droppable.data=e,this.draggable.data=e})}set handle(e){this.draggable.handle=e}set id(e){this.droppable.id=e,this.draggable.id=e}get id(){return this.droppable.id}set sensors(e){this.draggable.sensors=e}set modifiers(e){this.draggable.modifiers=e}set collisionPriority(e){this.droppable.collisionPriority=e}set collisionDetector(e){this.droppable.collisionDetector=null!=e?e:xS}set alignment(e){this.draggable.alignment=e}get alignment(){return this.draggable.alignment}set type(e){bm(()=>{this.droppable.type=e,this.draggable.type=e})}get type(){return this.draggable.type}set accept(e){this.droppable.accept=e}get accept(){return this.droppable.accept}get isDropTarget(){return this.droppable.isDropTarget}get isDragSource(){return this.draggable.isDragSource}get isDragging(){return this.draggable.isDragging}get isDropping(){return this.draggable.isDropping}get status(){return this.draggable.status}refreshShape(){return this.droppable.refreshShape()}accepts(e){return this.droppable.accepts(e)}};aD=[,,,pI(null)],sD=new WeakMap,lD=new WeakMap,cD=new WeakMap,uD=new WeakMap,dD=new WeakMap,RI(aD,4,"index",iD,fD,sD),RI(aD,4,"group",oD,fD,uD),((e,t)=>{return SI(t,(n="metadata",(r=Symbol[n])?r:Symbol.for("Symbol."+n)),e[3]);var n,r})(aD,fD);var hD=class extends ZC{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get initialIndex(){return this.sortable.initialIndex}get group(){return this.sortable.group}get initialGroup(){return this.sortable.initialGroup}},mD=class extends QC{constructor(e,t,n){super(e,t),this.sortable=n}get index(){return this.sortable.index}get group(){return this.sortable.group}},gD=Object.defineProperty,vD=Object.defineProperties,bD=Object.getOwnPropertyDescriptors,yD=Object.getOwnPropertySymbols,xD=Object.prototype.hasOwnProperty,SD=Object.prototype.propertyIsEnumerable,wD=(e,t,n)=>t in e?gD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,CD=(e,t)=>{for(var n in t||(t={}))xD.call(t,n)&&wD(e,n,t[n]);if(yD)for(var n of yD(t))SD.call(t,n)&&wD(e,n,t[n]);return e};function ED(e){const{accept:t,collisionDetector:n,collisionPriority:r,id:o,data:i,element:a,handle:s,index:l,group:c,disabled:d,modifiers:p,sensors:f,target:h,type:m,plugins:g}=e,v=CD(CD({},nD),e.transition),b=wE(t=>new fD(((e,t)=>vD(e,bD(t)))(CD({},e),{transition:v,register:!1,handle:eE(s),element:eE(a),target:eE(h)}),t)),y=oE(b,ID);return sE(o,()=>b.id=o),tE(()=>{bm(()=>{b.group=c,b.index=l})},[b,c,l]),sE(m,()=>b.type=m),sE(t,()=>b.accept=t,void 0,Pg),sE(i,()=>i&&(b.data=i)),sE(l,()=>{var e;(null==(e=b.manager)?void 0:e.dragOperation.status.idle)&&(null==v?void 0:v.idle)&&b.refreshShape()},iE),lE(s,e=>b.handle=e),lE(a,e=>b.element=e),lE(h,e=>b.target=e),sE(d,()=>b.disabled=null!=d&&d,void 0,Pg),sE(f,()=>b.sensors=f,void 0,Pg),sE(n,()=>b.collisionDetector=n),sE(r,()=>b.collisionPriority=r),sE(g,()=>b.plugins=g,void 0,Pg),sE(v,()=>b.transition=v,void 0,Pg),sE(p,()=>b.modifiers=p,void 0,Pg),sE(e.alignment,()=>b.alignment=e.alignment),{sortable:y,get isDragging(){return y.isDragging},get isDropping(){return y.isDropping},get isDragSource(){return y.isDragSource},get isDropTarget(){return y.isDropTarget},handleRef:u(e=>{b.handle=null!=e?e:void 0},[b]),ref:u(e=>{var t,n;(e||!(null==(t=b.element)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.element=null!=e?e:void 0)},[b]),sourceRef:u(e=>{var t,n;(e||!(null==(t=b.source)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.source=null!=e?e:void 0)},[b]),targetRef:u(e=>{var t,n;(e||!(null==(t=b.target)?void 0:t.isConnected)||(null==(n=b.manager)?void 0:n.dragOperation.status.idle))&&(b.target=null!=e?e:void 0)},[b])}}function ID(e,t,n){return!("isDragSource"!==e||n||!t)}const DD=({id:e,itemIndex:t,sectionIndex:n})=>hi.jsx("div",{children:`${n}:${t} - ${e}`}),LD=y(({id:e,itemIndex:t,sectionIndex:n})=>{const r=Tf(lm),o=Tf(im),i=Tf(em).at(n)??0,a=Tf(tm)({sectionIndex:n}),{ref:s,isDragging:l,handleRef:c}=ED({id:e,index:t,type:"item",accept:"item",group:a,modifiers:[uI],plugins:[kI],data:{id:e,sectionIndex:n,sectionKey:a,itemIndex:t}}),u=void 0!==r?()=>{r({id:e,itemIndex:t,sectionIndex:n})}:void 0,d=o??DD;return hi.jsx(Zu,{className:"section-item-container","data-testid":"section-item",onClick:u,ref:s,"data-dragging":l,sx:{padding:0,backgroundColor:l?"rgba(242, 242, 242, 1)":void 0,borderRadius:l?"4px":void 0},children:hi.jsxs("div",{style:{width:"100%",opacity:l?.4:1},children:[hi.jsx(KE,{isDragging:l,itemIndex:t,sectionIndex:n}),hi.jsx(d,{id:e,itemIndex:t,sectionIndex:n,dragHandleRef:c}),t===i-1&&hi.jsx(KE,{isDragging:!1,itemIndex:t+1,sectionIndex:n})]})})}),RD=y(({sectionIndex:e})=>{const t=Tf(tm),n=Tf(em).at(e)??0,r=t({sectionIndex:e});return hi.jsxs(mc,{className:"exploration-list",style:{overflow:"auto"},children:[hi.jsx(cu,{}),hi.jsx(ZE,{id:r,sectionIndex:e}),hi.jsx(cu,{}),hi.jsx(JE,{sectionIndex:e}),hi.jsx(zu,{sx:{padding:"2px 8px"},children:GE(n).map(n=>{const r=t({sectionIndex:e,itemIndex:n});return hi.jsx(LD,{id:r,itemIndex:n,sectionIndex:e},r)})})]},r)}),MD=[MC.configure({activationConstraints:[new IC.Distance({value:5})]}),SC],AD=y(()=>{const e=Tf(Qh),t=Tf(tm),n=kf(pm("start")),r=kf(pm("over")),o=kf(pm("end"));return hi.jsxs(xE,{sensors:MD,onDragEnd:e=>{o(e)},onDragOver:e=>{r(e)},onDragStart:e=>{n(e)},children:[hi.jsx(mc,{style:{display:"flex",flexDirection:"column"},children:GE(e).map(e=>hi.jsx(RD,{sectionIndex:e},t({sectionIndex:e})))}),hi.jsx(YE,{})]})}),PD=y(e=>hi.jsx(Nh,{atoms:fm,atomFamilies:hm,children:hi.jsx(mm,{props:e,children:hi.jsx(AD,{})})})),qD="12px",TD="nebula-table-utils-head-menu-button",kD="sn-copy-cell";let OD=function(e){return e.Enter="Enter",e.Space=" ",e.Esc="Escape",e.Tab="Tab",e.Shift="Shift",e.Left="ArrowLeft",e.Right="ArrowRight",e.Up="ArrowUp",e.Down="ArrowDown",e.C="c",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.F2="F2",e}({});const ND="nebula-table-utils-column-adjuster";let _D=function(e){return e[e.PixelsMin=30]="PixelsMin",e[e.PixelsMax=7680]="PixelsMax",e[e.PixelsDefault=200]="PixelsDefault",e[e.PercentageMin=1]="PercentageMin",e[e.PercentageMax=100]="PercentageMax",e[e.PercentageDefault=20]="PercentageDefault",e[e.PercentageMaxInIndentMode=75]="PercentageMaxInIndentMode",e[e.AutoMinPivot=80]="AutoMinPivot",e[e.AutoMinTable=120]="AutoMinTable",e}({}),jD=function(e){return e.Auto="auto",e.FitToContent="fitToContent",e.Pixels="pixels",e.Percentage="percentage",e}({});const FD={darker:.15,brighter:.3,opacity:.03},zD={darker:.3,brighter:.5,opacity:.05};let WD=function(e){return e.Cyclic="C",e}({});const $D=(e,t)=>{const n=new Map;for(const t of e)n.set(t.id,t);return t.reduce((e,t)=>{const r=n.get(t);return r&&e.push(r),e},[])},VD=Xh(e=>Sf(t=>{const n=t(uh),r=t(ih)?.[e];if(r)return r;const o=n?.qHyperCubeDef.rankedList?.[e];if(void 0===o){const n=t(Kf);return n?.createRankedList(e)}return o})),HD=Xh(e=>Sf(t=>{const n=t(eh),r=t(Kf),o=t(lh),i=t(ih)?.[e],a=n("SUPPORT-9810-MISSING-MEASURES",!1)?r?.properties.qHyperCubeDef.rankedList?.[e]:o?.qHyperCube.rankedList?.[e];return i||(r?.isRankedListCorrupt(e)||void 0===a?r?.createRankedList(e):a)})),BD=e=>"string"==typeof e.id,GD=e=>Sf(t=>{const n=t(e),r=t(wh);if(!n||0===n.length)return"disabled";const o=n.filter(BD);if(0===o.length)return"disabled";const i=o.filter(e=>r.has(e.id)).length;return 0===i?"none":i===o.length?"all":"some"}),UD=e=>Sf(null,(t,n,r)=>{const o=t(e),i=o?.filter(BD);i&&0!==i.length&&(e=>{const{items:t,shouldCheckAll:n,get:r,set:o}=e,i=r(wh),a=new Set,s=new Set;if(t.forEach(e=>{const t=i.has(e.id);t&&!n&&s.add(e.id),!t&&n&&a.add(e.id)}),0===a.size&&0===s.size)return;const l=new Set(r(bh)),c=new Set(r(yh));a.forEach(e=>l.add(e)),a.forEach(e=>c.delete(e)),s.forEach(e=>c.add(e)),s.forEach(e=>l.delete(e)),o(bh,l),o(yh,c),Uf({type:"apply",localChecked:a,localUnchecked:s,handler:r(Kf),model:r(Yf),fieldTypeById:r(fh),handlerQueue:r(mh)})})({items:i,shouldCheckAll:r,get:t,set:n})}),YD=Sf(e=>{const t=e(ch);return t?.qHyperCube.qDimensionInfo.filter(th).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??"",alternative:!0}))}),KD=Sf(e=>{const t=e(lh),n=e(Jf),r=t?.qHyperCube.qEffectiveInterColumnSortOrder.map(e=>{if(-1===e)return{id:-1,title:n("Common.Values")};const{cId:r,qFallbackTitle:o}=t.qHyperCube.qDimensionInfo[e];return{id:r,title:o??""}});return r}),XD=Sf(e=>{const t=e(Jf),n=e(YD),r=e(Qf),o=e(eh)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),i=e(o?VD("columns"):HD("columns")),a=e(o?VD("rows"):HD("rows")),s=e(KD);if(void 0===n||void 0===i||void 0===a||void 0===s)return[];const l=[...s,...n].filter(r);return[{id:"rows",title:t("Common.Rows"),items:$D(l,a)},{id:"columns",title:t("Common.Columns"),items:$D(l,i)}]}),JD=Xh(e=>Sf(t=>t(XD).at(e))),ZD=Xh(({sectionIndex:e,itemIndex:t})=>Sf(n=>n(JD(e))?.items.at(t)?.title),(e,t)=>e.sectionIndex===t.sectionIndex&&e.itemIndex===t.itemIndex),QD=Xh(e=>Sf(t=>t(JD(e))?.title)),eL=Sf(e=>({sectionIndex:t,itemIndex:n})=>{const r=e(JD(t));return void 0===r?0===t?"rows":"columns":void 0===n?r.id:r.items.at(n)?.id??`missing-item-${t}-${n}`}),tL=Sf(e=>e(XD).map(e=>e.items.length)),nL=Xh(e=>GD(Sf(t=>t(JD(e))?.items))),rL=Xh(e=>UD(Sf(t=>t(JD(e))?.items))),oL=Sf(null,(e,t,{event:n,id:r,toIndex:o,toSection:i,startSection:a})=>{const s=e(Kf),l=e(Yf),c=e(mh),u=e(VD("rows")),d=e(VD("columns")),p=i;if(void 0===s||void 0===l||void 0===u||void 0===d||null===c)return;if(n.operation.canceled)return void t(ih,null);if("section"===n.operation.target?.type&&a===i)return void t(ih,null);const f=Kh({rows:u,columns:d},n);t(ih,f),c.add(async()=>{"number"==typeof r?await s.movePseudoDimension({toIndex:o,toSection:p}):await s.moveDimension({cId:r,toIndex:o,toSection:p})})}),iL={noItems:{row:"ChartExploration.PivotTable.RowSectionEmpty.Title",column:"ChartExploration.PivotTable.ColumnSectionEmpty.Title",measure:"ChartExploration.PivotTable.MeasureSectionEmpty.Title"},noSearchFound:{row:"ChartExploration.PivotTable.NoRowsFound.Title",column:"ChartExploration.PivotTable.NoColumnsFound.Title",measure:"ChartExploration.PivotTable.NoMeasuresFound.Title"}},aL="ChartExploration.PivotTable.DimensionSectionEmpty.Message",sL="ChartExploration.PivotTable.MeasureSectionEmpty.Message",lL="#177fe6",cL=(e,t,n,r)=>{if("measure"===t)return e(r?iL.noSearchFound.measure:iL.noItems.measure);const o=r?iL.noSearchFound:iL.noItems;return e(n?o.row:o.column)},uL=(e,t,n)=>n?"":e("measure"===t?sL:aL),dL=Xh(e=>Sf(t=>{const n=t(Jf),r=t(Zf).length>0;return t=>({title:cL(n,e,0===t,r),message:uL(n,e,r)})})),pL=dL("measure"),fL=dL("dimensions"),hL=({children:e})=>hi.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e}),mL=e=>{const t=Tf(ZD(e));return hi.jsx(hL,{children:t})},gL=Sf(e=>{const t=e(ch);return t?.qHyperCube.qMeasureInfo.filter(th).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}))}),vL=Sf(e=>{const t=e(eh)("SUPPORT-9810-MIGRATE-RANKED-LISTS",!1),n=e(lh),r=e(gL),o=e(Qf),i=e(t?VD("measures"):HD("measures"));if(void 0===n||void 0===r||void 0===i)return[];const a=n.qHyperCube.qMeasureInfo.filter(th).map(({cId:e,qFallbackTitle:t})=>({id:e,title:t??""}));a.push(...r);const s=a.filter(o);return $D(s,i)}),bL=Xh(e=>Sf(t=>t(vL).at(e)?.title??"")),yL=Sf(e=>({itemIndex:t})=>{const n=e(vL);return void 0===t?"measures":n.at(t)?.id??`missing-item-${t}`}),xL=Sf(e=>[e(vL).length]),SL=GD(vL),wL=UD(vL),CL=Sf(null,(e,t,{id:n,toIndex:r,event:o})=>{const i=e(Kf),a=e(Yf),s=e(mh),l=e(VD("measures"));if(void 0===i||void 0===a||void 0===l||"string"!=typeof n||null===s)return;const c=Kh({measures:l},o);t(ih,c),s.add(async()=>{await i.moveMeasure({cId:n,toIndex:r})})}),EL={...gp},IL=Fp().palette,DL={TEXT:IL.text.primary,DISABLED:IL.text.disabled,HOVER:IL.action.hover,WHITE:EL.GREYSCALE_100,BORDER_MEDIUM:EL.GREYSCALE_85,DARK_MODE_TEXT:EL.GREYSCALE_95,DARK_MODE_BORDER:EL.GREYSCALE_95,DARK_MODE_DISABLED:EL.GREYSCALE_70,TRANSPARENT:"transparent",SELECTED:IL.primary.main,LINK:IL.info.main,ERROR:IL.error.main};function LL(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function RL(e){if("object"==typeof e&&LL(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let o;(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)):(o=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(o[1]+o[1],16),n=parseInt(o[2]+o[2],16),r=parseInt(o[3]+o[3],16))}return(t<<16)+(n<<8)+r}const ML={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},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:0,g:0,b:0,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}},AL="qcm-color";function PL(...e){const t={type:AL,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===AL)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if(LL(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:i}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),i=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))i=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),i=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),i=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);i=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-.5*l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const p=a-l;n=d[0]+p,r=d[1]+p,o=d[2]+p,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else{const e=a.toLowerCase();if(function(e){return e in ML}(e)){const t=ML[e];({r:n,g:r,b:o}=t),i="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(i=(4278190080&e[0])>>>24,i/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],o=e[2],i=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+o+i)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(o),t.a=i,t}function qL(e){let t,n,r;if(LL(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const o="string"==typeof e?RL(e):e;return t=((16711680&o)>>16).toString(16),n=((65280&o)>>8).toString(16),r=(255&o).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function TL(e){let t,n,r=0;const o="string"==typeof e?PL(e):e,i=o.r/255,a=o.g/255,s=o.b/255,{a:l}=o,c=Math.max(i,a,s),u=Math.min(i,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function kL(e){let t,n,r=0;const o="string"==typeof e?PL(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function OL(e){if(LL(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?RL(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function NL(e,t){return LL(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:NL(PL(e))}function _L(e){return LL(e)?1===e.a?OL(e):NL(e):_L(PL(e))}const jL=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function FL(e){return.2126*jL(e.r)+.7152*jL(e.g)+.0722*jL(e.b)}function zL(...e){const t=PL(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=TL(n)),n.spaces.hslaObject),o=e=>{const t=r(),{h:n,s:o,l:i,a:a}=t;return`hsla(${n}, ${o}, ${Math.max(0,Math.min(i+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=PL(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=PL(...e);return t.invalid||FL(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=OL(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=NL(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=_L(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=qL(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?PL(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:o}=TL(e);return`hsla(${t}, ${n}, ${r}, ${o})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:o,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=kL(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=kL(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>zL(o(18*e)),getDarkenedColor:(e=1)=>zL(o(18*-e))}}function WL(e,t){if(!e||!t)return;const n=FL(e),r=FL(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const $L="#FFFFFF";function VL(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var HL,BL="top",GL="top-right",UL="right",YL="bottom-right",KL="bottom",XL="bottom-left",JL="left",ZL="top-left";VL(VL(VL(VL(VL(VL(VL(VL(VL(VL(HL={},"equal-equal",[BL,KL]),"equal-higher",[KL,YL]),"equal-lower",[BL,GL]),"equal-void",[BL,KL]),"higher-equal",[JL,XL,BL,GL]),"higher-higher-acute",[KL,XL,JL,GL]),"higher-higher-obtuse",[KL,BL]),"higher-lower-negative",[BL,GL,UL]),"higher-lower-positive",[KL,XL,JL]),"higher-void",[BL]),VL(VL(VL(VL(VL(VL(VL(VL(VL(VL(HL,"lower-equal",[BL]),"lower-higher-negative",[BL,ZL]),"lower-higher-positive",[YL]),"lower-lower-acute",[BL,ZL,JL,GL,UL]),"lower-lower-obtuse",[BL,KL]),"lower-void",[BL]),"void-equal",[BL]),"void-higher",[BL,KL]),"void-lower",[BL,KL,JL]),"void-void",[BL]),VL(HL,"unclassified",[BL,KL,UL,JL,GL,YL,XL,ZL]);var QL,eR,tR=["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"],nR=["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"];function rR(e){return null!=e&&e.isEnabled("PS_20852_WYSIWYG_FONT_SUPPORT")?nR:tR}var oR=function(){if(eR)return QL;eR=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return QL=function e(){var t,n,r,l,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},QL}();function iR(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function aR(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function sR(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(oR);var lR=.7,cR=1/lR,uR="\\s*([+-]?\\d+)\\s*",dR="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",pR="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fR=/^#([0-9a-f]{3,8})$/,hR=new RegExp(`^rgb\\(${uR},${uR},${uR}\\)$`),mR=new RegExp(`^rgb\\(${pR},${pR},${pR}\\)$`),gR=new RegExp(`^rgba\\(${uR},${uR},${uR},${dR}\\)$`),vR=new RegExp(`^rgba\\(${pR},${pR},${pR},${dR}\\)$`),bR=new RegExp(`^hsl\\(${dR},${pR},${pR}\\)$`),yR=new RegExp(`^hsla\\(${dR},${pR},${pR},${dR}\\)$`),xR={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 SR(){return this.rgb().formatHex()}function wR(){return this.rgb().formatRgb()}function CR(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=fR.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ER(t):3===n?new RR(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?IR(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?IR(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=hR.exec(e))?new RR(t[1],t[2],t[3],1):(t=mR.exec(e))?new RR(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=gR.exec(e))?IR(t[1],t[2],t[3],t[4]):(t=vR.exec(e))?IR(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=bR.exec(e))?kR(t[1],t[2]/100,t[3]/100,1):(t=yR.exec(e))?kR(t[1],t[2]/100,t[3]/100,t[4]):xR.hasOwnProperty(e)?ER(xR[e]):"transparent"===e?new RR(NaN,NaN,NaN,0):null}function ER(e){return new RR(e>>16&255,e>>8&255,255&e,1)}function IR(e,t,n,r){return r<=0&&(e=t=n=NaN),new RR(e,t,n,r)}function DR(e){return e instanceof sR||(e=CR(e)),e?new RR((e=e.rgb()).r,e.g,e.b,e.opacity):new RR}function LR(e,t,n,r){return 1===arguments.length?DR(e):new RR(e,t,n,null==r?1:r)}function RR(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function MR(){return`#${TR(this.r)}${TR(this.g)}${TR(this.b)}`}function AR(){const e=PR(this.opacity);return`${1===e?"rgb(":"rgba("}${qR(this.r)}, ${qR(this.g)}, ${qR(this.b)}${1===e?")":`, ${e})`}`}function PR(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qR(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function TR(e){return((e=qR(e))<16?"0":"")+e.toString(16)}function kR(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new NR(e,t,n,r)}function OR(e){if(e instanceof NR)return new NR(e.h,e.s,e.l,e.opacity);if(e instanceof sR||(e=CR(e)),!e)return new NR;if(e instanceof NR)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new NR(a,s,l,e.opacity)}function NR(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function _R(e){return(e=(e||0)%360)<0?e+360:e}function jR(e){return Math.max(0,Math.min(1,e||0))}function FR(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}iR(sR,CR,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:SR,formatHex:SR,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return OR(this).formatHsl()},formatRgb:wR,toString:wR}),iR(RR,LR,aR(sR,{brighter(e){return e=null==e?cR:Math.pow(cR,e),new RR(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?lR:Math.pow(lR,e),new RR(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new RR(qR(this.r),qR(this.g),qR(this.b),PR(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:MR,formatHex:MR,formatHex8:function(){return`#${TR(this.r)}${TR(this.g)}${TR(this.b)}${TR(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:AR,toString:AR})),iR(NR,function(e,t,n,r){return 1===arguments.length?OR(e):new NR(e,t,n,null==r?1:r)},aR(sR,{brighter(e){return e=null==e?cR:Math.pow(cR,e),new NR(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?lR:Math.pow(lR,e),new NR(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new RR(FR(e>=240?e-240:e+120,o,r),FR(e,o,r),FR(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new NR(_R(this.h),jR(this.s),jR(this.l),PR(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=PR(this.opacity);return`${1===e?"hsl(":"hsla("}${_R(this.h)}, ${100*jR(this.s)}%, ${100*jR(this.l)}%${1===e?")":`, ${e})`}`}}));const zR=Math.PI/180,WR=180/Math.PI,$R=.96422,VR=.82521,HR=4/29,BR=6/29,GR=3*BR*BR,UR=BR*BR*BR;function YR(e){if(e instanceof KR)return new KR(e.l,e.a,e.b,e.opacity);if(e instanceof eM)return tM(e);e instanceof RR||(e=DR(e));var t,n,r=QR(e.r),o=QR(e.g),i=QR(e.b),a=XR((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=XR((.4360747*r+.3850649*o+.1430804*i)/$R),n=XR((.0139322*r+.0971045*o+.7141733*i)/VR)),new KR(116*a-16,500*(t-a),200*(a-n),e.opacity)}function KR(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function XR(e){return e>UR?Math.pow(e,1/3):e/GR+HR}function JR(e){return e>BR?e*e*e:GR*(e-HR)}function ZR(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function QR(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function eM(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function tM(e){if(isNaN(e.h))return new KR(e.l,0,0,e.opacity);var t=e.h*zR;return new KR(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}iR(KR,function(e,t,n,r){return 1===arguments.length?YR(e):new KR(e,t,n,null==r?1:r)},aR(sR,{brighter(e){return new KR(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new KR(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,n=isNaN(this.b)?e:e-this.b/200;return new RR(ZR(3.1338561*(t=$R*JR(t))-1.6168667*(e=1*JR(e))-.4906146*(n=VR*JR(n))),ZR(-.9787684*t+1.9161415*e+.033454*n),ZR(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),iR(eM,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof eM)return new eM(e.h,e.c,e.l,e.opacity);if(e instanceof KR||(e=YR(e)),0===e.a&&0===e.b)return new eM(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*WR;return new eM(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new eM(e,t,n,null==r?1:r)},aR(sR,{brighter(e){return new eM(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new eM(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return tM(this).rgb()}}));var nM=e=>()=>e;function rM(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):nM(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?rM:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):nM(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=LR(e)).r,(t=LR(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=rM(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var oM="center",iM="bottom";[{key:"NoDataExist",alignment:oM,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:oM,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:oM,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:oM},{key:"DataRangeIncludingZero",alignment:iM},{key:"LimitedData",alignment:iM},{key:"NegativeOrZeroValues",alignment:iM}].reduce(function(e,t){return e[t.key]=t,e},{});var aM,sM=["__proto__","constructor"];function lM(e,t,n){if(void 0!==e&&void 0!==t){var r=t.split("."),o=r[r.length-1];if(!sM.some(function(e){return r.includes(e)})){for(var i=e,a=0;a<r.length-1;++a){var s=r[a];void 0===i[s]&&(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}}}function cM(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=function(){var e={};return{get:function(t){return e[t]},set:function(t,n){return e[t]=n,n},has:function(t){return t in e},remove:function(t){delete e[t]},empty:function(){e={}}}}();return function(r){var o=t(r);return n.has(o)?n.get(o):n.set(o,e(r))}}function uM(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50;return function(){for(var r=this,o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];clearTimeout(t),t=setTimeout(function(){return e.apply(r,i)},n)}}function dM(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function pM(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=hM)):void 0===t&&(t=fM);for(var n,r,o,i,a,s=new vM(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new vM(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(gM)}function fM(e){return e.children}function hM(e){return Array.isArray(e)?e[1]:null}function mM(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function gM(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function vM(e){this.data=e,this.depth=this.height=0,this.parent=null}vM.prototype=pM.prototype={constructor:vM,count:function(){return this.eachAfter(dM)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},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(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return pM(this).eachBefore(mM)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}},aM=function(e){
|
|
89
89
|
/*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
|
|
90
|
-
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=p-g,b=e.substring(v,v+1),y=v+("."===b||","===b?1:0),x=g>0?e.substring(y,p):"";if(n=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.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],l=u[1]&&u[u.length-1].length){for(m="",v=(d=t[0]).length%l,p=d.length,y=0;y<p;y++)m+=d.charAt(y),!((y-v+1)%l)&&y<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},aM({exports:{}});const bM=(e,t=DL.TEXT,n=DL.WHITE)=>{const r=zL(e??""),o=zL(t),i=zL(n);return r.isInvalid()?t:function(e,t,n){const r=WL(e,t),o=WL(e,n);if(void 0!==r&&void 0!==o)return r>o?t:n}(r,i,o).getRGB()},yM=e=>{const t=e.getStyle("","","dataColors.selected")||DL.SELECTED,n=function(e,t){const n=zL($L),r=zL(e),o=zL(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=WL(n,r),a=WL(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?$L:"#000000"}(t,DL.TEXT);return{background:t,color:n}},xM=(e,t)=>{const n=zL(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},SM=e=>{const t=zL(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},wM=e=>{e.stopPropagation(),e.preventDefault()},CM=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},EM=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,IM=e=>{const{currentTarget:t}=e,n=EM(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),o=e?.querySelector(".exploration-section-header");if(o)return o;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const o=r.getElementsByClassName(t);return o.length>0?o[o.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},DM=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===OD.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},LM=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const n=t.closest(".exploration-panel");if(!n)return!1;const r=n.getElementsByClassName("section-item-container");return Array.from(r).some(e=>"true"===e.getAttribute("data-dragging"))},RM=(e,t)=>{const{key:n,currentTarget:r}=e;if(r===t.current&&n===OD.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:n}=e;if(n!==t.current)return;const r=n.closest('[role="region"]')?.getElementsByTagName("button")[0];r&&CM(r)})(e,t);else{const e=r.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&CM(e)}},MM=(e,t)=>{const{key:n}=e;switch(n){case OD.Tab:e.shiftKey?((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=t.sectionIndex??2;if(0===r)return;const o=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[r-1],i=o?.getElementsByClassName("exploration-item-focus").length??0;if(i>0){const t=o?.getElementsByClassName("exploration-draggable-icon")[i-1];t&&(wM(e),CM(t))}})(e,t):(wM(e),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),o=r?.getElementsByClassName("exploration-item-focus")[0];if(!o){const e=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&CM(e))}CM(o)})(e,t));break;case OD.Down:if(LM(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a+1<o?r?.getElementsByClassName("exploration-section-header")[a+1]:r?.getElementsByClassName("exploration-section-header")[0],i&&CM(i)})(e,t);break;case OD.Up:if(LM(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a-1>=0?r?.getElementsByClassName("exploration-section-header")[a-1]:r?.getElementsByClassName("exploration-section-header")[o-1],i&&CM(i)})(e,t);break;case OD.Enter:case OD.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},AM=({children:e})=>hi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),PM=({children:e,sectionIndex:t})=>{const r=Tf(void 0!==t?nL(t):SL),o=kf(void 0!==t?rL(t):wL),i=n.useRef(null),a={ref:i,toggleAllCheckboxes:o,checkState:r,sectionIndex:t};return hi.jsxs(mc,{ref:i,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{MM(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${lL} inset`}},children:[hi.jsx(Wc,{disabled:"disabled"===r,checked:"all"===r,indeterminate:"some"===r,onChange:e=>{o(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),hi.jsx(AM,{children:e})]})},qM=({sectionIndex:e})=>{const t=Tf(QD(e));return hi.jsx(PM,{sectionIndex:e,children:t})},TM=x((e,t)=>hi.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:hi.jsx("path",{d:"M5.5 1a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm0 4a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM5 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zM9.5 5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z"})})),kM=Ms("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),OM=Ms(TM)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${lL} inset`}})),NM=e=>{const t=e.key===OD.Down?(e=>{const{currentTarget:t,key:n}=e,r=EM(t),o=t.closest("li");let i=o?.nextElementSibling?.getElementsByClassName(r)[0];return i||(i=DM(t,n),i)?i:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):IM(e);t&&CM(t)},_M=(e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&CM(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void CM(e)}n===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},jM=(e,t)=>{const{key:n}=e;switch(n){case OD.Tab:if(e.shiftKey)wM(e),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&CM(e))}const n=IM(e);n&&CM(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void CM(t);const r=IM(e);r&&CM(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return CM(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&CM(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&CM(n),!0}const o=DM(n,r);if(!o)return!1;CM(o)}return!0})(e,t);n?wM(e):e.stopPropagation()}break;case OD.Down:case OD.Up:if(LM(e))break;wM(e),NM(e);break;case OD.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}wM(e),_M(e,t);break;case OD.Space:wM(e),_M(e,t)}},FM=({children:e})=>hi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),zM=({title:e,dragHandleRef:t,...r})=>{const[o,i]=Of(wh),a=Tf(Jf),s=n.useRef(null),l=n.useRef(null),c=n.useRef(null),u={id:r.id,itemIndex:r.itemIndex,toggleCheckedById:i,items:{explorationItemRef:s,explorationItemFocusRef:l,draggableIconRef:c},dragHandleRef:t};return n.useEffect(()=>{t&&s.current&&t(s.current)},[t]),hi.jsxs(mc,{ref:s,className:"exploration-item",onClick:e=>{e.stopPropagation(),i(r.id)},onKeyDown:e=>{jM(e,u)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:e,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${lL} inset`}},children:[hi.jsxs(mc,{ref:l,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{jM(e,u)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${lL} inset`}},children:[hi.jsx(Wc,{checked:-1!==r.id&&o.has(r.id),"aria-label":a("ChartExploration.ListItem.Label",e),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===r.id?"hidden":"visible"}}),hi.jsx(FM,{children:e})]}),hi.jsx(OM,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{jM(e,u)}})]})},WM=e=>{const t=Tf(ZD(e))??"";return hi.jsx(zM,{title:t,...e})},$M=()=>{const e=Tf(eL),t=Tf(tL),n=Tf(fL),r=kf(oL);return hi.jsx(PD,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:mL,headerRenderer:qM,itemRenderer:WM})},VM=({itemIndex:e})=>{const t=Tf(bL(e));return hi.jsx(hL,{children:t})},HM=()=>{const e=Tf(Jf);return hi.jsx(PM,{children:e("Common.Values")})},BM=e=>{const{itemIndex:t}=e,n=Tf(bL(t));return hi.jsx(zM,{title:n,...e})},GM=()=>{const e=Tf(yL),t=Tf(xL),n=Tf(pL),r=kf(CL);return hi.jsx(mc,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:hi.jsx(PD,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:VM,headerRenderer:HM,itemRenderer:BM})})},UM=x((e,t)=>hi.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:hi.jsx("path",{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014zM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0m-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6 6 0 0 1-1.413 1.415"})})),YM=()=>{const[e,t]=Of(Zf),r=Tf(Jf),o=n.useRef(null),[i]=Tf(xL),[a=0,s=0]=Tf(tL),l=u(e=>{t(e.target.value)},[t]),c=0===e.length||0===a&&0===s&&0===i?r("Common.Search.NoResultsAvailable"):r("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),i.toString());return hi.jsxs(mc,{ref:o,onKeyDown:e=>{RM(e,o)},style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[hi.jsx(kM,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:c}),hi.jsx(Zd,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":r("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:r("Common.Search"),onChange:l,startAdornment:hi.jsx(Ru,{position:"start",children:hi.jsx(UM,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},KM=e=>{const t=Fp();return hi.jsx(Ps,{theme:t,children:hi.jsx(Lf,{children:hi.jsx(Ch,{props:e,children:hi.jsxs(mc,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[hi.jsx(YM,{}),hi.jsx($M,{}),hi.jsx(GM,{})]})})})})},XM=e=>{if(e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{component:KM,classification:{tags:["exploration"],exclusive:!0}}};var JM=function(e){return e.CONTAINS="contains",e.MATCHES_EXACTLY="matches_exactly",e.STARTS_WITH="starts_with",e.ENDS_WITH="ends_with",e.BEGINNING_OF_WORD="beginning_of_word",e}(JM||{}),ZM=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(ZM||{}),QM=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(QM||{}),eA=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(eA||{});const tA=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||(e=>{if(!e)return!1;if("["===e[0]&&"]"===e[e.length-1]){let t=e.substring(1,e.length-1);if(/^[A-Za-z][A-Za-z0-9_]*$/.test(t))return!0;if(t=t.replace(/\]\]/g,"]"),e===`[${t.replace(/\]/g,"]]")}]`)return!0}return!1})(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,nA=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,o="}";switch(e.type){case QM.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case JM.BEGINNING_OF_WORD:t="*^",n="*";break;case JM.ENDS_WITH:t="*";break;case JM.STARTS_WITH:n="*";break;case JM.MATCHES_EXACTLY:break;case JM.CONTAINS:default:t="*",n="*"}const o=e.options.values?.[0]??"";return""!==o?`"${t}${o}${n}"`:""})(e);break;case QM.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===ZM.GENERAL,r=t?.modifier?.type===eA.FIXED_VALUE,o=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===o.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let i,a,s="=";n&&r?(i=`${t.conditionField?.aggregator}(${tA(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(i="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(i=`${t.conditionField?.aggregator}(${tA(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${tA(t.firstValue?.field)})`):(i=`${tA(e.field)}`,a=`${t.firstValue?.aggregator}(total ${tA(t.firstValue?.field)})`);const l=`${s}${i}${o[0]}${a}`;let c="";if(o.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${i}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${tA(t.secondValue?.field)})`,a=` and ${i}`):(e=`${t.secondValue?.aggregator}(total ${tA(t.secondValue?.field)})`,a=` and ${i}`),c=`${a}${o[1]}${e}`}return`"${l}${c}"`})(e);break;case QM.CLEAR_SELECTION:t=`[${e.field}]=`,r="",o="";break;case QM.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${o}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},rA=[];for(let e=0;e<256;++e)rA.push((e+256).toString(16).slice(1));const oA=new Uint8Array(16);function iA(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(oA);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(rA[e[t+0]]+rA[e[t+1]]+rA[e[t+2]]+rA[e[t+3]]+"-"+rA[e[t+4]]+rA[e[t+5]]+"-"+rA[e[t+6]]+rA[e[t+7]]+"-"+rA[e[t+8]]+rA[e[t+9]]+"-"+rA[e[t+10]]+rA[e[t+11]]+rA[e[t+12]]+rA[e[t+13]]+rA[e[t+14]]+rA[e[t+15]]).toLowerCase()}(t)}(e)}const aA=()=>crypto?.randomUUID?.()??iA(),sA=1e3,lA=1e3,cA=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,n=((e,t)=>{const n=new Set;for(const t of e){if(n.has(t))return!0;n.add(t)}const r=e.includes(-1),o=e.filter(e=>-1!==e);if(t){const n=r?t.length+1:t.length;if(e.length!==n)return!0}const i=[...o].sort((e,t)=>e-t);for(let e=0;e<i.length;e++)if(i[e]!==e)return!0;return!1})(e.qInterColumnSortOrder,t);n&&(e.qInterColumnSortOrder=((e,t)=>{const n=[];if(t)for(let e=0;e<t.length;e++)n.push(e);return e.qMeasures.length>=2&&n.push(-1),n})(e,t))},uA=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},dA=e=>{if(!e)return;cA(e);const t=e.qDimensions,{qInterColumnSortOrder:n}=e;((e,t=[])=>{const n=t.filter(e=>-1!==e);for(let r=0;r<n.length;r++)if(-1!==n[r]&&n[r]!==r){const o=n[r],i=n.indexOf(r),a=n[i];uA(n,r,i),uA(e,r,i),uA(t,t.indexOf(o),t.indexOf(a))}})(t,n)},pA=L;class fA extends pA{#c;#u;#d;constructor(e,t){super(e),this.path=e.path,this.#c=t.translator,this.#u=t.flags.isEnabled,this.#d=(e,n,r)=>{const o=`[sn-pivot-table][PivotHyperCubeHandler] ${n}`;t.anything.logInfo?.(o,r),"error"===e?console.error(o,r):console.warn(o,r)}}async#p(e,t,n,r,o=!1){if(!e||this.#f(e))return;const i=t??!1;if(e.qDef.cId||(e.qDef.cId=aA()),r)return this.addAlternativeDimension(e,i,n);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,n,r,o=!1)=>{const i=e.getDimensions(),a=e.hcProperties.qNoOfLeftDims;return o||await e.autoSortDimension(t),dA(e.hcProperties),(-1===a||Number.isNaN(+a))&&(e.hcProperties.qNoOfLeftDims=i.length),n?((e,t,n,r)=>{if(!e)return;const{qInterColumnSortOrder:o,qNoOfLeftDims:i}=e,a=t.length,s=o.indexOf(-1),l=-1!==s,c=void 0!==r?r+(i||0):void 0;if(l&&void 0!==c&&s>=c?((e,t,n)=>{t.splice(n,1),t.push(e),t.splice(n+1,0,-1)})(a,o,s):o.push(a),void 0===r)t.push(n);else if(void 0!==c){const e=l&&c>s?c-1:c;t.splice(e,0,n)}})(e.hcProperties,i,t,r):((e,t,n,r)=>{if(!e||"number"!=typeof e.qNoOfLeftDims)return;const o=e.qNoOfLeftDims,{qInterColumnSortOrder:i}=e,a=t.length,s=i.indexOf(-1),l=-1!==s&&o>0&&s<o;if(i.push(a),l)void 0===r?t.splice(o-1,0,n):s<r?t.splice(r-1,0,n):(t.splice(r,0,n),i.splice(s,1),i.splice(s+1,0,-1));else{const e=r??o;t.splice(e,0,n),-1!==s&&(i.splice(s,1),i.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,i,t,r),t})(this,e,i,n,o);return this.#h({section:i?"columns":"rows",cId:e.qDef.cId,addLast:void 0===n}),t}}async addDimension(e,t,n,r){return this.#p(e,t,n,r)}async addDimensions(e,t,n){const r=[];for(const o of e){const e=await this.addDimension(o,n,void 0,t);e&&r.push(e)}return r}addAlternativeDimension(e,t,n){if(!e||this.#f(e))return;const r=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=r.length);let o=n;return o=void 0===o?t?r.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+o:Math.min(o,this.hcProperties.excludedNoOfLeftDims),r.splice(o,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#h({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),e}async addFieldDimension(e,t,n,r={}){const o=this.createFieldDimension(e,t,n);return this.addDimension(o,r.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const n=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const n=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}reinsertDimension(e,t,n){e.qDef.cId||(e.qDef.cId=aA());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,n);return this.reinsertAlternativeDimension(e,n,t)}reinsertAlternativeDimension(e,t,n){const r=this.getDimensions(),o=this.getAlternativeDimensions();if(r.length>=sA)return Promise.resolve();const i="number"==typeof t?t:o.length;return o.splice(i,0,e),this.#h({section:n?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,n){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,n)))}async removeDimension(e,t,n){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!n&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#m({cId:t.qDef.cId,section:n?"columns":"rows"}),t}const r=this.getDimensions(),o=this.properties.qHyperCubeDef.qNoOfLeftDims,i=this.hcProperties.qInterColumnSortOrder.indexOf(e);"number"==typeof this.properties.qHyperCubeDef.qNoOfLeftDims&&"number"==typeof i&&"number"==typeof o&&i+1<=o&&this.properties.qHyperCubeDef.qNoOfLeftDims--;const a=this.properties.qHyperCubeDef.columnWidths?this.properties.qHyperCubeDef.columnWidths[1]:void 0;Array.isArray(a)&&a.length>e&&a.splice(e,1);const s=r.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;e.splice(n,1)})(this.hcProperties.qInterColumnSortOrder,e),dA(this.hcProperties),this.#m({cId:s.qDef.cId,section:n?"columns":"rows"}),s}#f(e){return!(!e||void 0===e.qDef.cId)&&[...this.getDimensions(),...this.getAlternativeDimensions()].some(t=>t.qDef.cId===e.qDef.cId)}async addMeasures(e,t=!1){const n=[];for(const r of e){const e=await this.addMeasure(r,t,void 0,!0);e&&n.push(e)}return n}addAlternativeMeasures(e,t){if(this.#g(e))return;const n=this.getAlternativeMeasures(),r=void 0===t?n.length:t,o=n.splice(r,0,e);return this.#v({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),o}async addMeasure(e,t,n,r){if(this.#g(e))return;if(e.qDef.cId||(e.qDef.cId=aA()),t)return this.addAlternativeMeasures(e,n);r||delete e.qDef.qNumFormat;const o=this.getMeasures();if(o.length<this.maxMeasures()){const t=1===o.length;return void 0!==n&&n>=0?o.splice(n,0,e):o.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#v({cId:e.qDef.cId,addLast:void 0===n}),e))}return o.length<lA?(this.getAlternativeMeasures().push(e),this.#v({cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures(),o=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=aA()),t=void 0!==t?t:n.length,n.length<this.maxMeasures()){if(n.splice(t,0,e),2===n.length){-1===o.indexOf(-1)&&o.push(-1)}this.#v({cId:e.qDef.cId})}else n.length<lA&&(t=r.length,r.splice(t,0,e),this.#v({cId:e.qDef.cId}));return Promise.resolve(e)}async removeMeasure(e,t){if(t&&"number"==typeof e){const t=this.getAlternativeMeasures().splice(e,1)[0];return this.#m({cId:t.qDef.cId,section:"measures"}),t}const n=this.getMeasures();let r,o,i;if("number"==typeof e&&e<n.length){r=2===n.length,o=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;r&&(i=t.indexOf(-1),t.splice(i,1),this.hcProperties.qNoOfLeftDims&&i+1<=this.hcProperties.qNoOfLeftDims&&this.hcProperties.qNoOfLeftDims--)}else"number"==typeof e&&(o=this.getAlternativeMeasures().splice(e-n.length,1)[0]);if(o)return this.#m({cId:o.qDef.cId,section:"measures"}),o}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#g(e){return!(!e||void 0===e.qDef.cId)&&[...this.getMeasures(),...this.getAlternativeMeasures()].some(t=>t.qDef.cId===e.qDef.cId)}getSorting(){throw new Error("don't call this")}changeSorting(){throw new Error("don't call this")}setSorting(){throw new Error("don't call this")}getRowDimensions(){const e=this.#b("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#b("columns"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getAlternativeRowDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?e:e.slice(0,t)}getAlternativeColumnDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?[]:e.slice(t)}#y(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#x(e){return[...this.#y(e)]}#S(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#w(e){const t=({qDef:t})=>t.cId===e;if(-1===e){return this.hcProperties.qInterColumnSortOrder.indexOf(-1)+1<=this.hcProperties.qNoOfLeftDims?"rows":"columns"}return this.getRowDimensions().some(t)||this.getAlternativeRowDimensions().some(t)?"rows":this.getColumnDimensions().some(t)||this.getAlternativeColumnDimensions().some(t)?"columns":null}#C(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#b(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:n}=this.hcProperties;if(this.#E())return"columns"===e?t:[];switch(e){case"rows":return-1===n?t:t.slice(0,n);case"columns":return-1===n?[]:t.slice(n);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#E(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#I(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#E())return"columns"===e;if(void 0===this.hcProperties.qNoOfLeftDims)return"rows"===e;switch(e){case"rows":return t+1<=this.hcProperties.qNoOfLeftDims;case"columns":return t+1>this.hcProperties.qNoOfLeftDims;default:return!1}}#D(e,t=!0){const n=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(n);const r=this.#b(e),o=this.getDimensions(),i=r.map(e=>-1===e?-1:o[e]);switch(e){case"rows":return i.concat(t?this.getAlternativeRowDimensions():[]).map(n);case"columns":return i.concat(t?this.getAlternativeColumnDimensions():[]).map(n);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],n=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const r=t.filter((e,n)=>t.indexOf(e)!==n);return this.#d("warn","Corrupt ranked list detected: duplicate ids",{duplicates:r,section:e,chartId:n}),!0}const r=this.#D(e);if(t.length!==r.length)return this.#d("warn","Corrupt ranked list detected: length mismatch",{section:e,chartId:n,fieldIds:r,rankedList:t,diff:new Set(r).symmetricDifference(new Set(t))}),!0;const o=r.filter(e=>!t.includes(e));if(o.length>0)return this.#d("warn","Corrupt ranked list detected: missing ids",{missingIds:o,section:e,chartId:n}),!0;const i=this.#D(e,!1),a=t.filter(e=>i.includes(e)),s=i.filter((e,t)=>e!==a[t]);return s.length>0&&(this.#d("warn","Corrupt ranked list detected: main field order mismatch",{section:e,chartId:n,orderMismatchIds:s}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#L({section:e});case"measures":return this.#R();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#L({section:e}){const t=this.getDimensions(),n=this.#b(e),r="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),o=n.map(e=>-1===e?-1:t[e].qDef.cId);return o.push(...r.map(e=>e.qDef.cId)),this.#S(e,o)}#R(){if(void 0!==this.hcProperties.rankedList?.measures&&!this.#u("SUPPORT-9810-MISSING-MEASURES")&&!this.#u("SUPPORT-9810-MIGRATE-RANKED-LISTS"))return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#S("measures",e)}#M({section:e,cId:t,fields:n,addLast:r}){const o=this.#y(e),i=n.findIndex(e=>e.qDef.cId===t),a=n[i+1]?.qDef.cId,s=n[i-1]?.qDef.cId;if(r)o.push(t);else if(i>=0)if(a){const e=o.indexOf(a);o.splice(e,0,t)}else if(s){const e=o.indexOf(s);o.splice(e+1,0,t)}else o.push(t);return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]}#h({section:e,cId:t,alternative:n=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#L({section:e});let o;return o="columns"===e?n?this.getAlternativeColumnDimensions():this.getColumnDimensions():n?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#M({section:e,cId:t,fields:o,addLast:r})}#v({cId:e,alternative:t=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#R();const r=t?this.getAlternativeMeasures():this.getMeasures();return this.#A(),this.#M({section:"measures",cId:e,fields:r,addLast:n})}#A(){const e=this.#y("rows"),t=this.#y("columns");this.#I("rows")&&!e.includes(-1)?e.push(-1):this.#I("columns")&&!t.includes(-1)&&t.push(-1)}#P(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#y("rows"),t=this.#y("columns"),n=e.indexOf(-1),r=t.indexOf(-1);-1!==n&&e.splice(n,1),-1!==r&&t.splice(r,1)}#m({cId:e,section:t}){const n=this.#y(t),r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.#P())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t);if(void 0===o)return;const i=n.slice(r+1).find(e=>this.getAlternativeMeasures().some(t=>t.qDef.cId===e)),a=this.getAlternativeMeasures().findIndex(e=>e.qDef.cId===i);this.addAlternativeMeasures(o,-1===a?void 0:a),this.#S("measures",n)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t,!0);if(void 0===o)return;const i=this.getMeasures().map(e=>e.qDef.cId),a=n.slice(r+1).find(e=>i.includes(e)),s=i.findIndex(e=>e===a);await this.addMeasure(o,!1,-1===s?void 0:s,!0),this.#S("measures",n)}async moveDimensionToAlternative(e){const t=this.#w(e),n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!1,i);if(void 0===a)return;const s=r.slice(o+1).find(e=>this.getAlternativeDimensions().some(({qDef:t})=>t.cId===e));let l=this.getAlternativeDimensions().findIndex(({qDef:e})=>e.cId===s);l=-1===l?void 0:l;void 0!==this.addAlternativeDimension(a,i,l)&&this.#S(t,r)}async moveDimensionFromAlternative(e){const t=this.#w(e),n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!0,i);if(void 0===a)return;const s=this.#D(t,!1),l=r.slice(o+1).find(e=>s.includes(e));let c=s.findIndex(e=>e===l);c=-1===c?void 0:c;void 0!==await this.#p(a,i,c,!1,!0)&&this.#S(t,r)}movePseudoDimension({toIndex:e,toSection:t}){const n=this.#w(-1);if(null===n)return void this.#d("error","Cannot move pseudo dimension, unable to find it in any section",{toIndex:e,toSection:t});const r="columns"===t,o=n===t,i=this.#x(t);if(o){const e=i.indexOf(-1);i.splice(e,1)}else{const o=this.#y(n),i=o.indexOf(-1);if(-1===i)return void this.#d("error","Couldn't delete pseudo dimension from current section",{toIndex:e,toSection:t,fromSection:n});o.splice(i,1),this.hcProperties.qNoOfLeftDims=r?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-i.slice(0,e).filter(e=>this.#C(e)).length,s=r?this.hcProperties.qNoOfLeftDims+a:a,l=this.hcProperties.qInterColumnSortOrder.indexOf(-1);this.hcProperties.qInterColumnSortOrder.splice(l,1),this.hcProperties.qInterColumnSortOrder.splice(s,0,-1),i.splice(e,0,-1),this.#S(t,i)}async moveDimension({cId:e,toIndex:t,toSection:n}){const r=this.#w(e),o=this.#C(e);if(null===r)return void this.#d("error","Cannot move dimension, unable to find it in any section",{cId:e});const i=(o?this.getAlternativeDimensions():this.getDimensions()).findIndex(({qDef:t})=>t.cId===e);if(-1===i)return void this.#d("error","Couldn't find dimension to move",{cId:e,toIndex:t,toSection:n});const a=this.#x(n),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=Math.max(0,Math.min(t,a.length));l!==t&&this.#d("warn","[moveDimension] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:l});const c=l-a.slice(0,l).filter(e=>this.#C(e)!==o).length,u="columns"===n,d="columns"===r,p=await this.removeDimension(i,o,d);if(void 0===p)return;void 0!==await this.#p(p,u,c,o,!0)&&(a.splice(l,0,e),this.#S(n,a))}async moveMeasure({cId:e,toIndex:t}){const n=this.#C(e),r=(n?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===r)return void this.#d("error","Cannot move measure, unable to find it in any section",{cId:e});const o=this.#x("measures"),i=o.indexOf(e);-1!==i&&o.splice(i,1);const a=Math.max(0,Math.min(t,o.length));a!==t&&this.#d("warn","[moveMeasure] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:a});const s=await this.removeMeasure(r,n);if(void 0===s)return;const l=a-o.slice(0,a).filter(e=>this.#C(e)!==n).length;void 0!==await this.addMeasure(s,n,l,!0)&&(o.splice(a,0,e),this.#S("measures",o))}getLabels(){return this.getMeasures().filter(e=>!e.qLibraryId&&!!e.qDef.qLabel).map(e=>e.qDef.qLabel)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,o=Array.isArray(this.properties.filters)?this.properties.filters:[],i={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:aA(),qTags:Array.isArray(t)?t:[],isNumeric:n};return o.push(i),this.properties.filters=o,this.properties.qHyperCubeDef.qContextSetExpression=nA(o),i}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#q(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=nA(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),n=this.getFilters().filter((t,n)=>e.includes(n));for(const e of t)this.#q(e);return n}getAddDimensionLabel(){return this.#c.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var hA,mA={exports:{}};var gA=(hA||(hA=1,function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},s=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(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},s=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(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{r.r(o),r.d(o,{default:()=>Pe});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,o=t.split("."),i=o[o.length-1],a=e;for(r=0;r<o.length-1;++r)void 0===a[o[r]]&&(a[o[r]]=Number.isNaN(+o[r+1])?{}:[]),a=a[o[r]];if(void 0!==n){var s=a[i];return a[i]=n,{updated:n,previous:s}}return delete a[i],!1},i=function(e,t,n){var r,o=t.split("."),i=e;if(void 0===i)return n;for(r=0;r<o.length;++r){if(void 0===i[o[r]])return n;i=i[o[r]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===o)return r;if(r.qDerivedFieldData)for(var i=0;i<r.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=r.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function b(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(v("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(v("MaxString(".concat(t,")")),")'\"}")}function y(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=b(u(r[0],o),h(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],o),p=u(r[1],o),f=h(0),m=h(1),g=b(d,f),v=b(p,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,n=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=c(f(t));if(!n.showExcludedValues)return a;var s=y({modifier:n,dimensions:r,dimensionAndFieldList:o}),l=i?"":", 0";if(r&&1===r.length){var u=h(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),p=h(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=h(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var o=["Descending","Ascending"],i=n.qSortByNumeric?"(Numeric, ".concat(o[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(o[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(i,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(i,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,o=void 0===r?1:r,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!n)return!0;var s=S({properties:t,layout:n});return s>=o&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});o&&t!==o.qDef.qLabel&&(r=o.qLibraryId||o.qDef.base.qLibraryId?"[".concat(o.qDef.qLabel,"]"):o.qDef.base.qDef);var i=function(e){var t=a.OPTIONS.find(function(t){return t.value===e.decomposition});return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(i,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}var I=t().bind(null,!0),D={},L=Array.isArray;function R(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function M(e){return void 0===e}function A(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function P(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,o){if(o!==r.length){n=+t;var i=Number.isNaN(n)?{}:[];e[n||t]=M(e[n||t])?i:e[t],e=e[n||t]}}),e}function q(e,t){var n=!0;if(R(e)&&R(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){q(e[r],t[r])||(n=!1)}),n);if(L(e)&&L(t)){if(e.length!==t.length)return!1;for(var r=0,o=e.length;r<o;r+=1)if(!q(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(o){var i=function(e){return e?I({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);q(i,a)||A(t,o)||(M(a)?r.push({op:"add",path:s,value:i}):R(i)&&R(a)?r=r.concat(D.generate(a,i,s)):L(i)&&L(a)?r=r.concat(function(e,t,n){var r=[],o=e.slice(),i=-1;function a(e,t,n){if(e[n]&&M(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,o=e.length;r<o;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(q(t,o))return r;if(!M(t[0])&&M(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),o.splice(s,1)):r=r.concat(D.generate(o[s],t[i],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))}),Object.keys(e).forEach(function(o){M(t[o])&&!A(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,o=P(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(L(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(L(a)&&L(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(r)||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.")}())}else if(R(a)&&R(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!A(n,e)&&delete n[e]}),I(a,t.value);else{if(!o)throw new Error("Patchee is not an object we can patch");o[i]=t.value}else if("move"===t.op){var u=P(e,t.from);L(o)?o.splice(+i,0,u.splice(+s,1)[0]):(o[i]=u[s],delete u[s])}else"remove"===t.op&&(L(o)?o.splice(+i,1):delete o[i])})},D.clone=function(e){return I({},e)},D.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):I(e,t)};const T=D,k=function(e,n,r){if(!e)return Promise.resolve();var o=T.generate(n,r);return t()(!0,n,r),o&&o.length?(o=o.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(o,!0)):Promise.resolve()};var O="accumulation";function N(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===O)return n[r]}function _(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===O)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),p=w.getAboveComp(n,l,u,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:n,properties:r,layout:o})){var h=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(f,h,m);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(_(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(_(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(_(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=N(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=N(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=N(t,e);return i&&!i.disabled}};return n}};var z="movingAverage";function W(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function $(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var V={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const H={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=w.getNumDimensions({properties:o,layout:a}));var u=i(o,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(r,c),h=w.getAboveComp(r,c,p,f);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,o="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(o,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var v=t;if(w.needDimension({modifier:r,properties:o,layout:a})){var b=w.getDimComp(u,1),y=w.getDimComp(u,0),x=w.getAggrComp(v,b,y);v=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,V)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat($(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat($(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat($(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=W(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=W(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat($(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;var i=W(t,e);return i&&!i.disabled}};return n}};var B="timeSeriesDecomposition";function G(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function U(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=w.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=G(t,e);if(r){var o=r.steps;r.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=o:e.steps=e.steps,e}),e})}},show:function(t){var n=G(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(B))return!1;var i=G(t,e);return i&&!i.disabled}};return n}};var X="difference";function J(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),p="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:o})){var f=w.getDimComp(c,1),h=w.getDimComp(c,0),m=w.getAggrComp(p,f,h);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return p},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(X))return!1;var i=J(t,e);return i&&!i.disabled}};return n}};var te="normalization";function ne(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function oe(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,o,i,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(o,i),d=ce(o,i,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(p,"))")}(u,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach(function(t){void 0===e[t]&&(e[t]=ie[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,i),i}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=ne(t,e);return i&&!i.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,me)?me:he},getLibraryId:function(e){return i(e,me)||i(e,he)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ve="qDef.qDef",be="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Ce="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",De="qDef.base.qAggrFunc",Le={initBase:function(e,t){(t||Le.isValid(e))&&(n(e,be,i(e,ve)),n(e,xe,i(e,ye)),n(e,Ce,i(e,Se)),n(e,Ee,i(e,we)))},restoreBase:function(e){Le.isValid(e)&&(n(e,ve,i(e,be)),n(e,ye,i(e,xe)),n(e,Se,i(e,Ce)),n(e,we,i(e,Ee)),i(e,Ie)&&i(e,De)&&n(e,Ie,i(e,De)),delete e.qDef.base)},isValid:function(e){var t=i(e,be),n=i(e,xe);return void 0!==t||void 0!==n}};const Re=Le;function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}var Ae={accumulation:F,movingAverage:H,difference:ee,normalization:ue,timeSeriesDecomposition:K};const Pe={modifiers:Ae,apply:Te,applyModifiers:ke,cleanUpMeasure:Oe,destroy:function(e){e&&qe[e.id]&&qe[e.id].masterItemSubscriber&&(qe[e.id].masterItemSubscriber&&qe[e.id].masterItemSubscriber.unsubscribe(),delete qe[e.id])},hasActiveModifiers:Ne,getActiveModifier:_e,initBase:Re.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Ae[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Ae[e]&&Ae[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,o=!1,i=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:n,layout:r})&&(o=!0,i=i||Ze({modifiers:t,properties:n,layout:r}))}),o&&!i},ifEnableTotalsFunction:je};var qe={};function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;qe[n.id]=qe[n.id]||{isFirstTime:!0};var c=qe[n.id].isFirstTime;if(qe[n.id].isFirstTime=!1,r&&"object"===Me(r))return ke({model:n,properties:r});var u=n?n.layout:void 0,d=i(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(u,"qHyperCube.qMeasureInfo"),f=qe[n.id].lastReloadTime;if(qe[n.id].lastReloadTime=i(n,"app.layout.qLastReloadTime"),Ne({measures:p,layout:u})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return i(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:p,layout:u,model:n,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ue({modifiers:ze(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:p,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);$e(r);var o=Qe(r);return Ye({model:n}).then(function(t){return Ke({libraryIds:o,model:n}).then(function(o){return h&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(n++,"object"!==Me(Ae[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Ae[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&He(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),ke({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Me(e.base)})}(p)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,o=Qe(r);return et({model:n,libraryIds:o}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Oe(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function ke(e){var n=e.model,r=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},o):o),$e(o);var p=Qe(o);return et({model:n,libraryIds:p,masterItem:c}).then(function(){return function(e){var n=e.measures,r=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Ne({measures:n,properties:r}))return n.forEach(function(e){return Oe(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ye({model:o,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:o,libraryItemsProps:a}).then(function(o){n.forEach(function(n){Ue({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Re.isValid(n)||Re.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(s++,"object"!==Me(Ae[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ae[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ae[r.type].generateExpression({expression:s,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Ae[r.type].updateModifier&&Ae[r.type].updateModifier(r,o.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Ae[r.type].generateExpression({expression:a,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||je(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&je(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}})}({measure:n,properties:r,libraryItemsProps:o,dimensionAndFieldList:e}),Ve(n)):Oe(n)})})})}({measures:a,properties:o,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:o,model:n}):Promise.resolve(!1)})})}function Oe(e){!function(e){var t=ze(e);return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&!Ae[e.type]})}(e)?Re.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ve(e)}function Ne(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:n,layout:r})})}function _e(e){var t=ze(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Ae[r.type]&&!r.disabled)return r}}function je(e){var t=_e(e);return!t||Ae[t.type].enableTotalsFunction(e)}function Fe(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ze(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function We(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function $e(e){Fe(e).forEach(function(e){return function(e){var n=_e(e);n&&(void 0!==n.outputExpression&&We(n)!==e.qDef.qDef?delete e.qDef.base:!Re.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function Ve(e){var t=ze(e);Array.isArray(t)&&t.forEach(function(t){"object"===Me(t)&&(t.disabled||!Ae[t.type]&&We(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function He(e){return e.base||e.qDef&&e.qDef.base}function Be(e){var t=He(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,n=e.properties,r=e.layout;return!Be(t)&&Ue({modifiers:ze(t),properties:n,layout:r})}function Ue(e){var t=e.modifiers,n=e.properties,r=e.layout,o={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Me(e)||e.disabled||!Ae[e.type])&&(void 0===o[e.type]&&(o[e.type]=Ae[e.type].isApplicable({properties:n,layout:r})),o[e.type])})}function Ye(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],o={},i=t.app.getDimensionList().then(function(e){o.dimensionList=e});r.push(i);var a=t.app.getFieldList().then(function(e){o.fieldList=e});return r.push(a),Promise.all(r).then(function(){return o})}function Ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),i.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return o?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):k(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return o}):Promise.resolve(o)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&Ae[e.type]&&Ae[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],o=!1;return t.forEach(function(t){var r=ze(t);if(Ue({modifiers:r,properties:e})){var i=Be(t);i&&n.push(i),o=o||Ze({modifiers:r,properties:e})}}),i(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(qe[t.id].masterItemSubscriber=qe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=i(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=i(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var o=l(e);r[t].properties!==o&&(r[t].properties=o,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach(function(e){o[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:i}),Object.keys(r).forEach(function(e){o[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(u(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return Te({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),qe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=o.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),o=Math.floor(n/62);return o>0?t(o)+r:r}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(r,{default:()=>$e});const i={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(""!==a){if(void 0===o[a]||null===o[a])return n;o=o[a]}}return o},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u};var p=n(8),f=n.n(p);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.dimensions).push.apply(t,a(r.qDimensions));var s,l=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.measures).push.apply(t,l(r.qMeasures));var a,s=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var o=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,r.interColumnSortOrder)&&(r.interColumnSortOrder=o.concat())},v=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},b=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!i.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},y=function(e){e.forEach(function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,o,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=i.getValue(e,t);if(!i.isAtomicValue(s))try{if((o=(o=(r=JSON.stringify(s)).match(/:\{/g))?o.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var l=i.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function C(e,t){var n=w()(!0,{},t,e);return i.getValue(n,"qOtherTotalSpec.qOtherCounted")||i.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(n,"qOtherTotalSpec.qOtherLimit")||i.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function E(e,t){return w()(!0,{},t,e)}function I(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var D=Math.pow(2,53)-1;function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const M=function(e,t,n){var r="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(n,"qInfo.qType");i.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},A=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},P=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},q=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},T=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},k=function(e){var t,n=e.exportFormat,r=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);i.qDimensions.length<r?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=C(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(c):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},O=function(e){var t,n=e.exportFormat,r=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);i.qMeasures.length<r?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=E(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(c):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},N=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,o=t.data[0],i=r.dimensions||{max:0},a=r.measures||{max:0},s=I(a.max,o.dimensions.length,D),l=I(a.min,o.dimensions.length,0);return{maxDimensions:I(i.max,s,D),minDimensions:I(i.min,l,0),maxMeasures:s,minMeasures:l}},_=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(n.qInterColumnSortOrder,i))},j=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=w()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?i.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some(function(e){return"general"===e.key})}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]}),null===(o=w()(!0,{},n,o)).components&&(o.components=[]),o},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return L(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}(t)||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.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return R(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(t)||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.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},V=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function H(e,t){var n=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){i.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const B={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:o,qHyperCubeDef:l}),m({exportFormat:o,qHyperCubeDef:l}),g({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,v({exportFormat:o,properties:a}),n&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),b({exportFormat:o,properties:a}),r||y(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(x(o.properties,"filters","storedFilters",!0),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(x(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(x(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,h=void 0===f||f,m={qChildren:[]},g=j({exportFormat:t,initialProperties:r,hypercubePath:c}),v=i.getValue(r,c||"").qHyperCubeDef,b=i.getValue(g,c||"").qHyperCubeDef,y=N({exportFormat:t,dataDefinition:a}),x=y.maxDimensions,S=y.minDimensions,w=y.maxMeasures,C=y.minMeasures,E=l.defaultDimension,I=void 0===E?q():E,D=l.defaultMeasure,L=void 0===D?T():D;b.qDimensions.length=0,b.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C})&&z({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C,newHyperCubeDef:b}),k({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:b,defaultDimension:I}),O({exportFormat:t,maxMeasures:w,minMeasures:C,newHyperCubeDef:b,defaultMeasure:L}),W({newProperties:g,dataDefinition:a,hypercubePath:c}),$({newProperties:g,dataDefinition:a,hypercubePath:c}),_({exportFormat:t,newHyperCubeDef:b}),A("qMaxStackedCells",v,b),A("qNoOfLeftDims",v,b),P("qInitialDataFetch",v,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),P("qMode",v,b,"S"),P("qReductionMode",v,b,"N"),P("qSortbyYValue",v,b),P("qIndentMode",v,b),P("qShowTotalsAbove",v,b),M(g,t,r),m.qProperty=g;var R=i.getValue(u||{},"support.modifiers");return V({measures:b.qMeasures,modifierTypes:R}),p&&H(m.qProperty,"storedFilters"),"S"===b.qMode&&h&&H(m.qProperty,"dynamicScript"),m}};var G={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,n,r){t=t||[];var o=u(e,r,n),i=u(t,r,n);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!G[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,o){n=n||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][n],s=t.length;if(U(a,t,r,o),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;te(r,o);var l=r[r.length-1];if(l){var c=n?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),u=i.getValue(t,"color.formatting.qNumFormat"),p=i.getValue(t,"color.formatting.isCustomFormatted");if(c){var f=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,o?t.qDef=r.key:(t.qExpression=r.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,o=e.qNumFormat,i=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=i)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function oe(e,t,n,r){var o,i,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":o=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(n,t),o?(s.type="measure",s.name=o,s.id=o,i=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),i&&(s.expression=i)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const ie={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var o=t.type,i=e.color,a=i.mode,s=X.getItemLabel(t);switch(ne(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&ie.useMasterNumberFormat(i.formatting)}i.auto=!1,i.mode=a}function se(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var o=oe("dimension",!1,n[r.activeDimensionIndex]);o.activeDimensionIndex=r.activeDimensionIndex,ae(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=i.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],o=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",o);return ae(e,oe("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){i.setValue(e,t,n),i.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:i.getValue(e,t),to:n})}(e,t,n)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ue=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,o=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!o.length))},de=function(e,t){var n,r=i.getValue(e,"color.mode"),o=i.getValue(e,"color.auto"),a=i.getValue(e,"".concat(t,"qDimensions"),[]),s=i.getValue(e,"".concat(t,"qMeasures"),[]),l=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);o?te(a,l):!(n={auto:o,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!o.length)}({auto:o,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qMeasures"),[]),r=i.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var o=oe("measure",!1,n[r.activeMeasureIndex],!0);o.activeMeasureIndex=r.activeMeasureIndex,ae(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=n[n.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return ae(e,oe("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&o.length<2&&i.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},pe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},fe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=i.getValue(n,"qHyperCubeDef.qMeasures",[]),o=i.getValue(n,"color.mode","");return!t&&"byExpression"===o&&r.length>0},he=function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},ge=function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),n=i.getValue(e,"color.persistent",!1);return t.length>1&&!n},ve={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=B.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=K.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",c),K.moveByIdFromGroup(a,[],"qAttributeExpressions",c),K.moveByIdFromGroup(s,[],"qAttributeExpressions",u),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=B.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),h=i.getValue(d,"color.mode",""),m=i.getValue(d,"color.auto",""),g=ce(d,p),v=ue({canColorBy:g,autoColor:m,colorMode:h,dimensions:f});return g[h]?fe({shouldUpdateColorBy:v,properties:d})&&he(d):me(d),v&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),u}};var be=["bar","marker","line"];const ye=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?H(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):H(n,"supportedAutoMinMax")||w()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),be.includes(r)&&t[o].type[r]++,t[o].type.total++}}),t}(a);l.length?(i&&(t=l.filter(function(e){return e.type[i]>0}).sort(function(e,t){return t.type[i]-e.type[i]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},we={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=ve.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return i?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=ve.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return ye({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Ce(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var c=Ce(n,r,l);i.setValue(t,c,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}function Ie(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=Ce(n,r,s),c=i.getValue(t,l);void 0!==c&&(i.setValue(o,a,c),i.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Le="conditionalColoring",Re="measures",Me="qDef.conditionalColoring";const Ae={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Le,arrayName:Re,itemPath:Me})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Me,arrayName:Re,quarantineName:Le})}};var Pe="qHyperCubeDef.qMeasures",qe="measures",Te="qHyperCubeDef.qDimensions",ke="dimensions",Oe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ne="alternativeMeasures",_e="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",je="alternativeDimensions",Fe="qCalcCondition",ze="conditionalShowHide";const We={quarantine:function(e){Ee({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:qe,itemPath:Fe}),Ee({properties:e,arrayPath:Te,quarantineName:ze,arrayName:ke,itemPath:Fe})},unquarantine:function(e){Ie({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:qe,itemPath:Fe}),Ie({properties:e,arrayPath:Te,quarantineName:ze,arrayName:ke,itemPath:Fe})},quarantineAlternative:function(e){Ee({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ee({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ie({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})}},$e={hypercube:B,colorChart:ve,axisChart:we,quarantineProperty:x,unquarantineProperty:H,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:Ae,conditionalShow:We}})(),r.default})()}(mA)),mA.exports),vA=qr(gA);const bA="qHyperCubeDef.qMeasures",yA="measures",xA="qHyperCubeDef.qDimensions",SA="dimensions",wA="qDef.representation",CA="tableRepresentation",EA="qDef.conditionalColoring",IA="conditionalColoring",DA="qMiniChartDef",LA="miniChartDef",RA=e=>{vA.unquarantineArrayProp({properties:e,arrayPath:xA,itemPath:wA,arrayName:SA,quarantineName:CA}),vA.unquarantineArrayProp({properties:e,arrayPath:bA,itemPath:wA,arrayName:yA,quarantineName:CA}),vA.unquarantineArrayProp({properties:e,arrayPath:bA,itemPath:EA,arrayName:yA,quarantineName:IA}),vA.unquarantineArrayProp({properties:e,arrayPath:bA,itemPath:DA,arrayName:yA,quarantineName:LA})},MA=e=>{vA.quarantineArrayProp({properties:e,arrayPath:xA,itemPath:wA,arrayName:SA,quarantineName:CA}),vA.quarantineArrayProp({properties:e,arrayPath:bA,itemPath:wA,arrayName:yA,quarantineName:CA}),vA.quarantineArrayProp({properties:e,arrayPath:bA,itemPath:EA,arrayName:yA,quarantineName:IA}),vA.quarantineArrayProp({properties:e,arrayPath:bA,itemPath:DA,arrayName:yA,quarantineName:LA})};function AA(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return t.get(o)}},measures:{min:1,max:1e3,description:()=>t.get("Visualizations.Descriptions.Values")},filters:{description:()=>t.get("SimpleProperties.Filters.Filter")}}]}}const PA="qHyperCubeDef.qDimensions",qA="dimensions",TA="qOtherTotalSpec.qTotalMode",kA="totalMode",OA={quarantine(e){vA.quarantineArrayProp({properties:e,arrayPath:PA,quarantineName:kA,arrayName:qA,itemPath:TA})},unquarantine(e){vA.unquarantineArrayProp({properties:e,arrayPath:PA,quarantineName:kA,arrayName:qA,itemPath:TA})}};function NA(e){const t=AA(e);return(e,n,r,o)=>{const i=vA.hypercube.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t.targets[0],hypercubePath:o}),a=i.qProperty.qHyperCubeDef.qDimensions.length,s=i.qProperty.qHyperCubeDef.qMeasures.length;let l,c=i.qProperty.qHyperCubeDef.qInterColumnSortOrder,u=!0;a+s===c.length&&lM(i,"qProperty.qLayoutExclude.quarantine.interColSortOrder",c.concat());const d=i.qProperty.qLayoutExclude.quarantine?.pivotInterColSortOrder;d?(c=d,l=[...d],lM(i,"qProperty.qHyperCubeDef.qInterColumnSortOrder",c),i.qProperty.qLayoutExclude.quarantine&&delete i.qProperty.qLayoutExclude.quarantine.pivotInterColSortOrder):c.length=0;const p=+(c.indexOf(-1)>-1),f=a+p;if(f>c.length)for(let e=c.length;e<f;e++)c.indexOf(e)<0&&c.push(e-p);for(let e=c.length-1;e>=0;e--)c[e]>=a&&c.splice(e,1);s>1&&c.indexOf(-1)<0?c.push(-1):s<2&&c.indexOf(-1)>-1&&c.splice(c.indexOf(-1),1);const h=i.qProperty.qHyperCubeDef.qNoOfLeftDims??-1;if(a>0&&-1===h&&lM(i,"qProperty.qHyperCubeDef.qNoOfLeftDims",a),l?.length===c.length){for(let e=0;e<l.length;e++)if(l[e]!==c[e]){u=!1;break}u&&(vA.unquarantineProperty(i.qProperty,"noOfLeftDims"),vA.unquarantineProperty(i.qProperty,"excludedNoOfLeftDims "))}return vA.unquarantineProperty(i.qProperty,"rankedList"),vA.conditionalShow.unquarantine(i.qProperty),OA.unquarantine(i.qProperty),RA(i.qProperty),vA.unquarantineProperty(i.qProperty,"pivotTableIndentMode"),i}}function _A(e,t){const n=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,r=n.slice(),o=n.indexOf(-1);o>-1&&n.splice(o,1);const i=vA.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=i.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let c=a.qInterColumnSortOrder;lM(i,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",r),vA.quarantineProperty(i.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete i.properties.qHyperCubeDef.qNoOfLeftDims,vA.quarantineProperty(i.properties,"qHyperCubeDef.rankedList","rankedList"),delete i.properties.qHyperCubeDef.rankedList;const u=i.properties.qLayoutExclude.quarantine?.interColSortOrder;u&&(c=u,lM(i,"properties.qHyperCubeDef.qInterColumnSortOrder",c),lM(i,"data.0.interColumnSortOrder",c),i.properties.qLayoutExclude.quarantine&&delete i.properties.qLayoutExclude.quarantine.interColSortOrder);for(let e=c.length;e<s+l;e++)c.length<=e&&c.push(e);return vA.quarantineProperty(i.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),vA.quarantineProperty(i.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),vA.conditionalShow.quarantine(i.properties),OA.quarantine(i.properties),MA(i.properties),i}const jA=e=>({dimensions:{min:1,max:1e3,description(t,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(o)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),FA=["rows","columns","measures"],zA=e=>{const t=e.flags.isEnabled("SUPPORT-9810-MIGRATE-RANKED-LISTS"),n=e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING");if(!t&&!n)return;const r=new fA({},e);return{properties(e){if(t&&"sn-pivot-table"===e.visualization&&(r.setProperties(e),FA.forEach(e=>{r.isRankedListCorrupt(e)&&r.createRankedList(e)})),n){const t=e.components?.find(e=>"theme"===e.key);t?.nullValues&&!t.dimensionNullValues&&(t.dimensionNullValues={...t.nullValues})}return e}}},WA={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let $A=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),VA=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const HA=e=>{switch(e?.type){case"url":return $A.Link;case"image":return $A.Image;case"indicator":return $A.Indicator;case"miniChart":return $A.MiniChart;default:return $A.Text}},BA=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:o}=r.properties.qHyperCubeDef,i=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!o&&e||o)&&i.push({value:"image",translation:"Object.Table.Representation.Image"}),i}}),GA=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>HA(e.qDef.representation)===$A.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:o,qDimensions:i,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=i?.indexOf(e)??1/0;return(r?.slice(0,o)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},UA=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:BA({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>HA(e.qDef.representation)===$A.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>HA(e.qDef.representation)===$A.Link&&e.qDef.representation?.urlPosition===VA.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>HA(e.qDef.representation)===$A.Link&&e.qDef.representation?.urlPosition===VA.Attribute},...GA(n)}},YA=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,o=!r?.("tableImages")&&t[$A.Image],i=!r?.("qMiniChartDef")&&t[$A.MiniChart],a=!r?.("tableIndicators")&&t[$A.Indicator],s=o&&t[$A.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&o||t&&s)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),i&&n.push({value:"miniChart",translation:"Common.MiniChart"}),n})(n)},representationImage:o?{uses:"measureRepresentationItems.representationImage",show:e=>HA(e.qDef.representation)===$A.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]}}}:void 0,representationIndicator:a?{uses:"measureRepresentationItems.representationIndicator"}:void 0,representationMiniChart:i?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}};let KA=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),XA=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),JA=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),ZA=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const QA="image",eP=(e,t,n)=>{if(!n.properties.qHyperCubeDef.qIndentMode)return!0;const r=n.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let o=n.properties.qHyperCubeDef.qNoOfLeftDims??-1;r>-1&&r<o&&(o-=1);const i=n.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===i||i>=o},tP=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:jD.Auto,translation:"Common.Auto"},{value:jD.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:jD.Pixels,translation:"Object.Table.Column.Pixels"},{value:jD.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:jD.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:_D.PixelsDefault,show:e=>e.qDef.columnWidth?.type===jD.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:_D.PercentageDefault,show:e=>e.qDef.columnWidth?.type===jD.Percentage}}),nP=({key:e,translation:t,env:n})=>{const r=!n.anything.sense?.isUnsupportedFeature?.("tableImages");return{[`${e}Auto`]:{ref:`qDef.${e}.auto`,type:"boolean",component:"switch",translation:t,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0,show:t=>!r||"labelTextAlign"===e||t.qDef.representation?.type!==QA},[e]:{ref:`qDef.${e}.align`,type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:t=>void 0!==t.qDef[e]&&!t.qDef[e].auto&&(!r||"labelTextAlign"===e||t.qDef.representation?.type!==QA)}}},rP="TOTAL_OFF",oP={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:XA.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:XA.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},iP="TOTAL_OFF",aP={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:XA.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:XA.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},sP=e=>{const{translator:t,anything:n,flags:r}=e,o=(e=>{const{translator:t,anything:n,flags:r}=e;return{type:"items",component:"data-assets-panel-pivot",translation:"Common.Data",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:rP,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:rP,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&eP},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==rP&&eP(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode}}},presentation:{type:"items",translation:"properties.presentation",grouped:e.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT"),items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...r.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:oP}},alignmentAndRepresentationAndResize:{type:"items",items:{...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...UA(e),...tP()}}}:{cellColoring:oP,...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...UA(e),...tP()}}}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"}}},presentation:{type:"items",translation:"properties.presentation",grouped:e.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT"),items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...r.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:oP}},alignmentAndRepresentationAndResize:{type:"items",items:{...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...YA(e,{[$A.Image]:!0,[$A.Indicator]:!0}),...tP()}}}:{cellColoring:oP,...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...YA(e,{[$A.Image]:!0,[$A.Indicator]:!0}),...tP()}}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}})(e);return r.isEnabled("CLIENT_IM5974_PIVOT_DATA_PROPERTIES")?o:{type:"items",component:"pivot-data",translation:"properties.data",addTranslation:"Property.AddData",items:{dimensions:{type:"array",component:"dimensions",translation:"Common.Dimensions",alternativeTranslation:"properties.alternative.dimensions",ref:"qHyperCubeDef.qDimensions",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.dimensions.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:iP,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:iP,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&eP},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==iP&&eP(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:aP,...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...UA(e),...tP()}},measures:{type:"array",component:"measures",translation:"Common.Measures",ref:"qHyperCubeDef.qMeasures",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.measures.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:aP,...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...YA(e,{[$A.Image]:!0,[$A.ImagesInIndentMode]:!0,[$A.Indicator]:!0}),...tP()}},filters:{type:"items",translation:"SimpleProperties.Filters.Filters",ref:"filters",allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:"properties.filters.add",grouped:!0,items:{filter:{type:"object",component:"filter-item",ref:"filter"}}}}}},lP="12px",cP="Source Sans Pro, sans-serif",uP="600",dP=15e3,pP=4/3,fP="-",hP=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,o){const i=r?.(e,t,o)??!1,a=o.theme.current(),s=n(a,i);return{color:"transparent"===s?"none":s}}}),mP=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},gP=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,o,i)=>{const a=i.theme.current();return((e,t,n,r)=>{const o=t.fontFamily??"Source Sans Pro, sans-serif",i=t.fontFamilies??[],a=Array.from(new Set([e,o,...i])),s=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort().map(e=>mP(e,!0))],l=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...rR(r).filter(e=>!a.includes(e)).map(e=>mP(e,!0))];return[...s,...l.length>1?l:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),vP=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],bP=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>mP(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...vP.filter(e=>!i.includes(e)).map(e=>mP(e,!1))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),yP=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:gP({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:bP({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:hP(`${e}.fontColor`,void 0,t=>o(t,e,"color")??t.color)}},background:hP(`${e}.background`,"properties.background",(t,n)=>{const r=n?DL.WHITE:DL.TRANSPARENT;return o(t,e,"backgroundColor")??r},a)}}}}),xP=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),SP=e=>xP("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),wP=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r,isNullValueText:o,translation:i})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{nullValueText:o?SP(e):void 0,content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:hP(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:hP(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),CP=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1});let EP=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),IP=function(e){return e.Solid="solid",e.None="none",e}({});const DP={display:"flex",justifyContent:"center",alignItems:"center"},LP={borderStyle:"solid"},RP={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},MP={lineHeight:pP,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},AP=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),PP=(e,t)=>e>0?`${e}px ${IP.Solid} ${t}`:IP.None,qP=(e,t,n,r,o)=>{const i=Number(!t||o?.right),a=Number(!e||o?.bottom);return{borderRight:"rtl"!==r?PP(i,n):IP.None,borderBottom:PP(a,n),borderLeft:"rtl"===r?PP(i,n):IP.None,borderTop:IP.None}},TP=(e,t,n,r,o,i,a)=>{const s=qP(t,r,o,i,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=PP(2,o)),n||(s.borderLeft="rtl"!==i?PP(1,o):"none",s.borderRight="rtl"===i?PP(1,o):"none")),s},kP=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=PP(1,n)),t&&(r.borderRight=PP(1,n)),r},OP=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":case"dimensionNullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},NP=e=>e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),_P=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:yP({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:OP}),dimensionValueSection:yP({section:"dimensionValues",translator:e,flags:t,getThemeValue:OP}),measureValueSection:yP({section:"measureValues",translator:e,flags:t,getThemeValue:OP}),measureLabelSection:wP({section:"measureLabels",getThemeValue:OP}),totalValuesSection:wP({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:OP}),...NP(t)?{dimensionNullSection:wP({section:"dimensionNullValues",fallbackBackground:EP.NullValueBackground,getThemeValue:OP,isNullValueText:!0}),nullValues:wP({section:"nullValues",translation:"properties.pivot.measureNullValues",fallbackBackground:EP.NullValueBackground,getThemeValue:OP,isNullValueText:!0})}:{nullValues:wP({section:"nullValues",fallbackBackground:EP.NullValueBackground,getThemeValue:OP,isNullValueText:!1})},gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:CP("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:CP("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:hP("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??EP.DividerLight),divider:hP("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??EP.DividerDark),background:hP("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??EP.Transparent)}}}}}}]}),jP=e=>({type:"items",items:{nullValueText:e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")?void 0:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:fP},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:jD.Auto,translation:"Common.Auto"},{value:jD.Pixels,translation:"Object.Table.Column.Pixels"},{value:jD.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:jD.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:_D.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===jD.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:_D.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===jD.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some(e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode)}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}),FP=e=>{if(e.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}}},zP=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[_P(e,t),jP(t)]},...FP(t)}}),WP="auto",$P={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:WP,translation:"Object.Table.SortingInSearch",options:[{value:WP,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function VP(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:sP(e),sorting:$P,addons:WA,settings:zP(t,n)}}}function HP(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,exploration:e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"),sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:VP(e),importProperties:NA(e),exportProperties:_A,exploration:XM(e),data:jA(e),migrate:zA(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new fA(t,e):void 0}}const BP=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function GP(e,t){return R(()=>e,t)}const UP={},YP=e=>{const t=R(()=>({current:UP}),[]);return t.current=t.current===UP?e:t.current,t},KP=e=>!!e&&0===zL(e).a,XP="#grid",JP=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},ZP=(e,t,n,r,o)=>{const i=JP(".qv-object .qv-inner-object",n),a=JP(".qv-panel-sheet",n),s=JP(XP,n)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,o=t?.bgColor?.useColorExpression;if(o&&n)return SM(n);if("none"===r)return"transparent";if(void 0===r)return;const i=zL(r);return i.setAlpha(t?.bgColor?.color?.alpha??i.a),i.getRGBA()})(e),c=r?.(t),u=o?.(t),d=l||c||i||u,p=KP(d),f=!KP(h=p?s:d)&&bM(h,DL.TEXT,DL.DARK_MODE_TEXT)===OL(DL.DARK_MODE_TEXT);var h;const m=((e,t,n,r=DL.WHITE)=>e&&!KP(e)?e:KP(t)?n&&!KP(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},QP=(e,t,n,r)=>{const o=T(),i=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=P([]);return q(()=>{let n;return e&&(n=new MutationObserver(e=>{r(e)}),n.observe(e,t)),()=>{n?.disconnect()}},[e,t]),n})(t.closest(XP),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return R(()=>({...o,background:ZP(e,o,t,n,r)}),[o.name(),t,n,r,e,i])};function eq(e,t){const n=R(()=>({isLoading:!0}),t),[r,o]=A(async()=>{try{return await e()}finally{n.isLoading=!1}},t);return[r,n.isLoading,o]}const tq=3,nq=/\n/g;function rq(e,t,n){let r=0,o=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=o;){const i=Math.floor((r+o)/2),a=e.slice(0,i),s=e.slice(0,i-1),l=n(a),c=n(s);if(l>t&&c<=t)return e.slice(i-1)||null;if(l===t)return e.slice(i)||null;l<t?r=i+1:o=i}return null}function oq({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o){const{maxNbrLinesOfText:i=tq,allowLineBreaks:a=!0}=o??{},{estimateWidth:s,measureText:l,estimateLineCount:c}=v(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o)=>{const{maxNbrLinesOfText:i=tq,allowLineBreaks:a=!0}=o??{};return()=>{const o=document.createElement("canvas").getContext("2d");o.font=`${n} ${r} ${e} ${t}`;const s=o.measureText.bind(o),l=cM(e=>{if(void 0===e)return 0;if(a){const t=e.split(nq).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(nq," ");return s(t).width}),c=e=>+l(e).toFixed(2),u=cM(({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;const r=a?e.split(nq):[e];let o=0;for(const e of r){let n=e;do{o+=1,n=rq(n,t,c)}while(null!==n&&o<i);if(o>=i)break}return o},({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:u}}})({fontStyle:n,fontWeight:r,fontSize:e,fontFamily:t},{maxNbrLinesOfText:i,allowLineBreaks:a})(),[n,r,e,t,i,a]);return{estimateWidth:s,measureText:l,estimateLineCount:c}}var iq,aq={};var sq=function(){if(iq)return aq;iq=1;var e=E;return aq.createRoot=e.createRoot,aq.hydrateRoot=e.hydrateRoot,aq}();const lq="Source Sans Pro, sans-serif";function cq(e,t){const[n,r]=m(t);n.some((e,n)=>e!==t[n])&&(r(t),e())}var uq={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Geselecteerde waarden wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대체 가능 값 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택 내용","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{0}/{1}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}}};const dq=({translator:e})=>(v(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(uq).forEach(t=>{e.add(uq[t])})}}(e)},[e]),e),pq={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},fq={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},hq=Ms("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...pq},"&::-moz-range-track":{...pq},"&::-ms-track":{...pq},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...fq},"&::-moz-range-thumb":{...fq},"&::-ms-thumb":{...fq},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}})),mq=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:c,isLeftColumn:u,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=dq({translator:d.translator}),h=l({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!u,v=()=>g?h.current.columnWidth-m:"100%",b={left:"rtl"!==p?v():void 0,right:"rtl"===p?v():void 0},y=t=>{h.current={initWidth:e,columnWidth:e,initX:t??h.current.initX}};cq(()=>{g&&y()},[e]);const x=e=>{const t=Math.max(e,_D.PixelsMin);h.current.columnWidth=t,i(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:jD.Pixels,pixels:h.current.columnWidth};a(e)}c?.(!1)},w=e=>{const t="rtl"===p?h.current.initWidth+h.current.initX-e.clientX:h.current.initWidth+e.clientX-h.current.initX;x(t)},C=e=>{wM(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C),S()},E=e=>{const t="rtl"===p?h.current.initWidth+-h.current.initX-e.touches[0].clientX:h.current.initWidth+e.touches[0].clientX-h.current.initX;x(t)},I=e=>{wM(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!r&&s?e=>{if(e.key===OD.Left||e.key===OD.Right){wM(e);const t=5,n=e.key===OD.Left?t:-t,r="rtl"===p?n:-n;c?.(!0),x(h.current.columnWidth+r)}else e.key===OD.Space||e.key===OD.Enter?(wM(e),s(e),c?.(!1),S()):e.key===OD.Esc&&(wM(e),s(e),c?.(!1),x(h.current.initWidth))}:void 0,L=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return hi.jsx(hq,{style:b,hoverColor:o,isLastColumn:n,className:ND,"data-testid":ND,onMouseDown:e=>{wM(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),c?.(!0),y(e.clientX)},onDoubleClick:()=>{a({type:jD.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(wM(e),document.addEventListener("touchmove",E),document.addEventListener("touchend",I),c?.(!0),y(e.touches[0].clientX))},onKeyDown:D,onBlur:s,onFocus:()=>{y()},type:"range",tabIndex:-1,"aria-label":L,"aria-valuemin":_D.PixelsMin,"aria-valuemax":_D.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},gq=x((e,t)=>hi.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:hi.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),vq=Ms(mc,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),bq=Ms(gq,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),yq=Ms(Ad)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),xq=Ms(cu)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),Sq=Ms(Od)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),wq=Ms(Od,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),Cq=Ms("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),Eq=Ms("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),Iq=Ms(Pl)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),Dq=Ms(rd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),Lq=x((e,t)=>hi.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:hi.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),Rq=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?Rq(t):t:e.parentElement?.children?.[0]},Mq=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?Mq(t):t},Aq=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===OD.Down||t===OD.Up){const n=e=>t===OD.Down?Rq(e):Mq(e);e.preventDefault(),e.stopPropagation();let o=n(r);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=n(o)}}},Pq=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let qq={};const Tq=({autoFocus:e,id:t,onClick:r,itemTitle:o,icon:i,enabled:a,subMenus:s,isSubMenu:l,isActive:c,direction:d,isPagination:p})=>{const[f,h]=m(!1),g=n.useRef(null),v=u(e=>{e.stopPropagation(),h(!1)},[h]);return hi.jsxs(hi.Fragment,{children:[hi.jsxs(wq,{ref:s?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),qq={}),s?.length&&(h(!0),qq[o]=h,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!c,onKeyDown:Aq,children:[c?hi.jsx(Cq,{direction:d,isPagination:p}):null,hi.jsxs(Eq,{children:[hi.jsx(Dq,{direction:d,isPagination:p,children:hi.jsx(i,{})}),hi.jsx(Iq,{variant:"body2",children:o})]}),s?.length?hi.jsx(Lq,{}):null]},t),s?.length?hi.jsx(_q,{isSubMenu:!0,open:f,anchorEl:g.current,onClose:v,menuGroups:Pq(s,qq),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:d,isPagination:p}):null]})},kq=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&hi.jsx(Sq,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>hi.jsx(Tq,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),Oq=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((o,i)=>[kq({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?hi.jsx(xq,{"data-testid":"group-divider",variant:"middle"}):void 0]),Nq={appear:0,enter:0,exit:0},_q=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?hi.jsx(yq,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:Nq,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:Oq({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,jq=(e,t)=>e.some(e=>t[e]>0),Fq={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},zq=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=m(null),[a,s]=m(Fq);return cq(()=>{e||(s(Fq),i(null))},[e]),p(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};o=u.qInfo?.qId,a?l():(i(c),d&&s((e=>({canSelectAll:jq(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:jq(["qSelected"],e),canSelectPossible:jq(["qOption"],e),canSelectAlternative:jq(["qAlternative"],e),canSelectExcluded:jq(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},Wq=x((e,t)=>hi.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:hi.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})})),$q=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})})),Vq=x((e,t)=>hi.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:hi.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})})),Hq=x((e,t)=>hi.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:hi.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})})),Bq=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})})),Gq=x((e,t)=>hi.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:hi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})})),Uq=x((e,t)=>hi.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:hi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})})),Yq=x((e,t)=>hi.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:hi.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})})),Kq=x((e,t)=>hi.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:hi.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"})})),Xq=x((e,t)=>hi.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:hi.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})})),Jq=x((e,t)=>hi.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:hi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),Zq=x((e,t)=>hi.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:hi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),Qq=x((e,t)=>hi.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:hi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),eT=x((e,t)=>hi.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:hi.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}));let tT=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const nT="/qListObjectDef",rT=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[tT.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),r(!1)},icon:Wq,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),r(!1)},icon:Hq,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:Yq,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:Bq,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&i?.select){const o=[];n[tT.Searching]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:Kq,enabled:!0}]}]),!e.isLocked&&n[tT.Selections]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:eT,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(nT))},icon:Xq,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(nT))},icon:Qq,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(nT))},icon:Jq,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(nT))},icon:Zq,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(nT))},icon:$q,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:Uq,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:Gq,enabled:!0}]}]),o.length>0&&f.push(...o)}return n[tT.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:Vq,enabled:!0}]}]),f},oT=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:c,searchRelatedArgs:d,selectionRelatedArgs:p,adjustHeaderSizeRelatedArgs:f,expandOrCollapseArgs:h,model:m,direction:g="ltr",isPagination:v,isAccessibleHeader:b,iconSize:y=qD})=>{const x=l(null),S=dq({translator:o}),{qLibraryId:w,fieldId:C,headTextAlign:E}=r,I=p?.app,{fieldInstance:D,selectionActionsEnabledStatus:L}=zq({open:e,headerData:r,app:I,qStateName:p?.qStateName}),R=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null})({model:m,headerData:r}),M=(({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:o,onPopoverClose:i})=>u(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===o?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:o,onPopoverClose:i})}},[e,t,n,r?.qStateName,o,i]))({qLibraryId:w,fieldId:C,searchRelatedArgs:d,selectionRelatedArgs:p,direction:g}),A=u(e=>{e.stopPropagation(),t(!1)},[t]),P=u(e=>{e.stopPropagation(),t(e=>!e)},[t]);return i.active?hi.jsxs(vq,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===b?P:void 0,ref:x,isAccessibleHeader:b,children:[s?hi.jsx(bq,{height:y,className:TD,"data-testid":TD,isInteractionsActive:i.active??!1,children:hi.jsx(gq,{})}):null,hi.jsx(_q,{open:e,anchorEl:!1===b?x.current:n.current,onClose:A,menuGroups:rT({headerData:r,translator:S,menuAvailabilityFlags:a,setOpen:t,...c,embedListbox:M,interactions:i,fieldInstance:D,selectionActionsEnabledStatus:L,anchorRef:n,focusColumnAdjuster:f?.focusColumnAdjuster,setActiveFieldCallback:R,expandOrCollapseArgs:h}),direction:g,isPagination:v})]}):null},iT=e=>e.isDark?{background:e.color,borderColor:DL.DARK_MODE_BORDER,color:DL.DARK_MODE_TEXT,disabledColor:DL.DARK_MODE_DISABLED,iconColor:DL.DARK_MODE_TEXT}:{background:e.color,borderColor:DL.BORDER_MEDIUM,color:DL.TEXT,disabledColor:DL.DISABLED},aT=Ms(mc,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`})),sT=Ms(mp,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),lT=Ms(Ic,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),cT=Ms(Pl)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),uT=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=v(()=>iT(r.background),[r]);if(!n.active)return null;const a=o?hi.jsx(aT,{footerStyle:i,children:e}):null;return t?E.createPortal(e,t):a},dT=x((e,t)=>hi.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:hi.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),pT=x((e,t)=>hi.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:hi.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),fT=c({}),hT=()=>h(fT),mT=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const b=(e=>!e.enabled||e.active)(u)?0:-1,y=v(()=>iT(p.background),[p]),x=o?o.getBoundingClientRect().width:h.width,S=dq({translator:d}),w=v(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:S,theme:p,interactions:f,rect:h,layout:m,footerStyle:y,tabIndex:b,width:x,visibilityThreshold:g}),[t,n,r,o,i,a,s,l,c,u,S,p,f,h,m,y,b,x,g]);return hi.jsx(fT.Provider,{value:w,children:e})},gT=({disabledCondition:e,pageNumber:t,type:n,footerStyle:r,handleChangePage:o,translator:i,interactions:a,tabIndex:s})=>({footerStyle:r,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":i.get(`NebulaTableUtils.Pagination.${n}`),title:a.passive?i.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?void 0:()=>{o(t)}});let vT=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),bT=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const yT=()=>{const{direction:e,pageInfo:t,width:n,interactions:r,visibilityThreshold:o,footerStyle:i,handleChangePage:a,translator:s,tabIndex:l}=hT(),c=0===t.page,u=gT({type:vT.FirstPage,disabledCondition:c,pageNumber:0,footerStyle:i,handleChangePage:a,translator:s,interactions:r,tabIndex:l});return n<=(o?.firstPage||bT.FirstPage)?null:hi.jsx(lT,{...u,disabled:!r.active,children:"rtl"===e?hi.jsx(pT,{height:qD}):hi.jsx(dT,{height:qD})})},xT=(e,t,n=!1)=>{n&&e.key===OD.Tab&&!e.shiftKey&&(wM(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},ST=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:c,translator:u,tabIndex:d}=hT(),p=t.page>=r-1,f=gT({type:vT.LastPage,disabledCondition:p,pageNumber:r-1,footerStyle:l,handleChangePage:c,translator:u,interactions:a,tabIndex:d}),h=n.enabled?e=>{xT(e,n,o)}:void 0;return i<=(s?.lastPage||bT.LastPage)?null:hi.jsx(lT,{...f,onKeyDown:h,disabled:!a.active,children:"rtl"===e?hi.jsx(dT,{height:qD}):hi.jsx(pT,{height:qD})})},wT=x((e,t)=>hi.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:hi.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),CT=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,footerStyle:s,handleChangePage:l,translator:c,tabIndex:u}=hT(),d=t.page>=r-1,p=gT({type:vT.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:c,interactions:a,tabIndex:u}),f=!(i>bT.FirstPage&&i>bT.LastPage)&&n.enabled?e=>{xT(e,n,o)}:void 0;return hi.jsx(lT,{...p,onKeyDown:f,disabled:!a.active,children:"rtl"===e?hi.jsx(wT,{height:qD}):hi.jsx(Lq,{height:qD})})},ET=()=>{const{direction:e,pageInfo:t,interactions:n,footerStyle:r,handleChangePage:o,translator:i,tabIndex:a}=hT(),s=0===t.page,l=gT({type:vT.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:r,handleChangePage:o,translator:i,interactions:n,tabIndex:a});return hi.jsx(lT,{...l,disabled:!n.active,children:"rtl"===e?hi.jsx(Lq,{height:qD}):hi.jsx(wT,{height:qD})})},IT=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:o}=hT(),{page:i,rowsPerPage:a}=n;if(t<=(o?.displayedRowsLabel||bT.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${i*a+1} - ${Math.min((i+1)*a,r)}`,r.toString()]);return hi.jsx(cT,{variant:"caption",dir:"ltr",children:s})},DT=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=hT(),c=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,f={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return hi.jsxs(hi.Fragment,{children:[hi.jsxs(cT,{variant:"caption",id:p,children:[u,":"]}),hi.jsx(sT,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},LT=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:o,visibilityThreshold:i}=hT();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(i?.rowsPerPage||bT.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=hi.jsx(hi.Fragment,{children:e.rowsPerPageOptions.map(e=>hi.jsx("option",{value:e,children:e},e))});return hi.jsx(DT,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{o?.(+e.target.value)}})},RT=1e3,MT="…",AT=({totalPages:e,page:t})=>{const n=Math.min(e,RT),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-RT):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+i;return hi.jsx("option",{value:t,children:t+1},t)});return i>0&&a.unshift(hi.jsx("option",{value:MT,disabled:!0,children:MT},"startMoreOptions")),o<e-1&&a.push(hi.jsx("option",{value:MT,disabled:!0,children:MT},"endMoreOptions")),hi.jsx(hi.Fragment,{children:a})},PT=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:o}=hT(),{page:i}=e;if(t<=(o?.selectPage||bT.SelectPage))return null;const a=hi.jsx(AT,{totalPages:n,page:i});return hi.jsx(DT,{name:"SelectPage",value:i,options:a,handleChange:e=>{r(+e.target.value)}})};var qT=y(e=>hi.jsxs(mT,{...e,children:[hi.jsx(LT,{}),hi.jsx(PT,{}),hi.jsx(IT,{}),hi.jsx(yT,{}),hi.jsx(ET,{}),hi.jsx(CT,{}),hi.jsx(ST,{})]}));const TT=e=>hi.jsx(uT,{...e,children:hi.jsx(qT,{...e})}),kT=Sf(null),OT=Sf({current:!1}),NT=Sf({minRow:0,maxRow:0,minCol:0,maxCol:0}),_T=Sf({HEADER:null,TOP:null,LEFT:null,DATA:null,WRAPPER:null}),jT=Sf(null);Sf(e=>({focusCoord:e(kT),shouldRefocus:e(OT),pivotSectionBounds:e(NT),pivotSection:e(_T),pivotCoord:e(jT)})),Sf(null,(e,t,n)=>{t(kT,n)}),Sf(null,(e,t,n)=>{t(NT,e=>({...e,...n}))});const FT=Sf(null,(e,t,n)=>{t(_T,e=>({...e,...n}))}),zT=c({}),WT=()=>h(zT),$T=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o,children:i})=>{const a=v(()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o}),[e,t,n,r,o]);return hi.jsx(zT.Provider,{value:a,children:i})},VT=c({}),HT=()=>h(VT),BT=({app:e,model:t,theme:n,embed:r,keyboard:o,translator:i,interactions:a,env:s,children:l})=>{const c=v(()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:o,env:s,translator:i}),[e,a,t,r,n,o,s,i]);return hi.jsx(VT.Provider,{value:c,children:l})},GT=c({}),UT=()=>h(GT),YT=({children:e,...t})=>hi.jsx(GT.Provider,{value:t,children:e}),KT=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:o,height:i}=(()=>{const{theme:e,translator:t}=HT(),{layoutService:n}=UT(),r=e.getStyle("","","fontFamily")??cP;return n.hasData?n.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:r,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:r,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:hi.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:o,width:"100%",height:i},children:hi.jsx("span",{style:{...MP,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},XT="/qHyperCubeDef",JT=-1,ZT="PSEUDO-DIM",QT=e=>e===JT?ZT:(({cId:e})=>e??aA())(e),ek=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===JT?n.columnWidthLocation=KA.Measures:n.isLeftDimension?n.columnWidthLocation=KA.Dimension:t.at(-1)===JT?n.columnWidthLocation=KA.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=KA.Pivot))},tk=e=>{if(!e)return;const{background:t,foreground:n}=e,r=zL(t??""),o=zL(n??""),i=r.isInvalid()?void 0:r.getRGBA(),a=i?xM(i,FD):void 0,s=i?xM(i,zD):void 0;return o.isInvalid()&&void 0!==i?{background:i,color:bM(i),headerMenuHoverBackground:a,headerMenuActiveBackground:s}:{background:i,color:o.isInvalid()?void 0:o.getRGBA(),headerMenuHoverBackground:a,headerMenuActiveBackground:s}},nk=(e,t,n,r,o)=>{const i=QT(n),a=e.getDimensionInfoIndex(n),s=e.isLeftDimension(a);return n===JT?{id:i,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:KA.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:n.qFallbackTitle??"",qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===WD.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:KA.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName,headerColor:o?.("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?tk(n.headerColor):void 0}},rk=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})=>{let i=r;var a;n.length>0&&(i=(a=r).at(-1)===JT?a.slice(0,-1):a);const s=i.length+(n.length?1:0),l=Math.max(1,n.length),c=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(s,l);return n.forEach((n,r,i)=>{const a=r===i.length-1;c[s-1][r]=nk(e,t,n,a,o)}),i.forEach((n,r,i)=>{const a=r===i.length-1;c[r][l-1]=nk(e,t,n,a,o)}),c},ok=(e,t,n,r,o)=>{const i=((e,t,n,r,o)=>{let i;return i=0===n.length||n.includes(JT)?rk({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n,isEnabled:o}):(e=>e[0].map((t,n)=>e.map(e=>e[n])))(rk({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})),e.isIndentModeEnabled&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&i.at(-1)?.forEach((t,n)=>{Array.isArray(t)?t.forEach((t,n)=>{ek({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}):ek({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}),i})(e,t,n,r,o);return{data:i,size:{x:i[0]?.length??0,y:i.length}}},ik=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,ak=5e6,sk=5e5;const lk={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,o="",i=!1;-1===n?r=e:(r=e.slice(0,n),o=e.slice(n+1),i=!0),t.push(function(e,t,n){return{key:ck(e),value:ck(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,o,i))}),t}};function ck(e){try{return decodeURIComponent(e)}catch{return e}}function uk(e){if(!(this instanceof uk))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>lk.fromSearchString(t.search)}})}function dk(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}uk.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},uk.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=dk(t.key),t.value?n+=`=${dk(t.value)}`:n+=t.useEqualSign?"=":"";return n};var pk=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},fk=class{decode(e){let t="";const n=new pk(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}};const hk=e=>e>=0&&e<=1114111,mk=e=>e.match(/[\s]/);var gk=class extends fk{decodeCharacter(e){e.mark();const t=e.next();let n,r,o;if(null==t||"\\"!==t)return e.reset(),null;const i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(n=i,r=0;r<5&&(o=e.next(),null!=o&&!mk(o));r++){if("NaN"===parseInt(o,16)){e.pushback(o);break}n+=o}const a=parseInt(n,16);return hk(a)?String.fromCharCode(a):"�"}},vk=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},bk=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let o,i;if(t.length===n)return i=this._value,this.setValue(r),i;const a=t.charAt(n);return this._nextMap?(o=this._nextMap[a],o||(o=new e,this._nextMap[a]=o)):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return vk.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return vk.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||vk.newInstanceIfNeeded(e,t,this._value)}},yk=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new bk);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const xk=(()=>{const e=[],t=[],n=new yk;let r,o,i;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["¬in"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(o in t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(i=t[o].toLowerCase().substr(1),n.put(i,String.fromCharCode(o)));return n})();var Sk=class extends fk{decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,o="";for(t=Math.min(e.remainder().length,xk.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();const i=xk.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&hk(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&hk(r)?String.fromCharCode(r):null}},wk=class extends fk{decodeCharacter(e){e.mark();const t=e.next();let n,r,o,i;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)o=e.nextHex(),null!=o&&(n+=o);return 2===n.length&&(i=parseInt(n,16),hk(i))?String.fromCharCode(i):(e.reset(),null)}};let Ck;"undefined"!=typeof document&&(Ck=document.createElement("div"));const Ek=Array.prototype.indexOf,Ik=[",",".","_"," "],Dk=[",",".","-","_"," "],Lk={width:["%"],height:["%"]},Rk={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},Mk={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":Rk.image,"background-color":Rk.color,"border-color":Rk.color,"border-image":Rk.image,color:Rk.color,icon:Rk.image,"list-style-image":Rk.image,"outline-color":Rk.color},Ak={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function Pk(e,t,n){let r;if(t){if(Ek)return Ek.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function qk(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return Ck.appendChild(n),t=Ck.innerHTML,Ck.removeChild(n),t}function Tk(e,t,n){let r,o,i,a,s,l,c,u,d;for(e=Ok(e).toLowerCase(),t=Ok(t),i=0;i<Ak.attr_name.length;i++)if(e.match(Ak.attr_name[i]))throw new Error(`Unsafe attribute name used: ${e}`);for(i=0;i<Ak.attr_val.length;i++)if(t.toLowerCase().match(Ak.attr_val[i]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=Lk[e],r||(r=Dk),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&Pk(c,r)<0?(d=u.toString(16),o+=`&#x${d};`):o+=c;return n||(o+='"'),o}function kk(e,t,n){let r,o,i,a,s,l,c,u,d,p;if(e=Ok(e).toLowerCase(),t=Ok(t),Pk(e,Ak.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<Ak.css_val.length;r++)if(t.toLowerCase().indexOf(Ak.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(o=Mk[e],o||(o=Rk.default),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&Pk(c,o)<0?(d=u.toString(16),p="000000".substr(d.length),i+=`\\${p}${d}`):i+=c;return i}function Ok(e,t){let n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;const s=[new Sk,new wk,new gk];for(;!a;){r=n;for(let e=0;e<s.length;e++)i=s[e].decode(n),i!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const Nk=[];for(let e=0;e<255;e++)Nk[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const _k={html:e=>qk(e.unsafe),css(e){let t,n=[];const r=[],o={};let i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=kk(t,n[t],!0),i+=kk(t,n[t],!0),o[t]=r[t]);return e.map?o:i},attr(e){let t=[];const n=[],r={};let o="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=Tk(e,t[e],!0),o+=Tk(e,t[e],!0),r[e]=n[e]);return e.map?r:o}};function jk(e,t){throw new Error(t)}var Fk={canonicalize:Ok,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let o=1;const i=arguments.length;for(;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?_k.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&jk(this,"Invalid parameter type"),_k.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&jk(this,"Invalid parameter type"),_k.attr(e)):void jk(this,"Invalid parameter type")},encodeForAttr:Tk,encodeForAttr2:function(e){return Tk("nonsens",e,!0)},encodeForCSS:kk,encodeForHref:function(e){Ok(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new uk(e),n=uk.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+uk.encodeSearchParams(r)+t.hash;const o=decodeURI(e).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,o,i,a,s;for(t||(t=Ik),s="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),Pk(o,t)>=0||null==Nk[i]?s+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:qk,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=Ok(t).toLowerCase():jk(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:(e,t)=>{const{maxByteSizeSvg:n=sk,maxByteSizeImage:r=ak}=t??{},{mimeType:o,encoding:i,data:a}=(e=>{const[,t,n,r]=ik.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(o,i,a);return"image/svg+xml"===o?s<=n:s<=r},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const zk=(e,t)=>t.qAttrExps?.qValues?.[e],Wk=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},$k=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:o,imageBox:i,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!Fk.isSafeDataURL(t))?{type:$A.Text,url:void 0,text:e,labelStructure:o}:{type:$A.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:Wk(r,a),labelStructure:o,imageBox:i},Vk=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:$A.Text,text:r};const{minY:o,maxY:i}=((e,t,n)=>{const r="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:$A.MiniChart,text:r,miniChart:a}},Hk=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=r?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return n?.urlPosition===VA.Attribute?void 0:n?.urlLabel},Bk=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:$A.Link,url:Fk.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:$A.Text,url:void 0,text:t,labelStructure:e}}},Gk=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:c})=>{const u=HA(t),d=s(e);return u===$A.Image&&c[$A.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:c,imageBox:u}=t??{};if("url"===l){const t=zk(n.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),$k({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}if("label"===l){const t=i?i.originalValue:r;if(-1===n.imageLabel)return $k({text:c||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o});const l=zk(n.imageLabel??-1,e)?.qText??r;return $k({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}return{type:$A.Text,url:void 0,labelStructure:i,text:r}})(e,t,n,d,l,a):u===$A.Link?((e,t,n,r,o)=>{const{urlPosition:i}=t??{};if(i===VA.Attribute){const i=Hk(n.url??-1,e,t);return Bk({labelStructure:r,text:o||i||"",url:i})}if(i===VA.Dimension){const i=Hk(n.urlLabel??-1,e,t)||o;return r&&(r.maskedValue=i),Bk({text:i,labelStructure:r,url:r?.originalValue??o})}return{type:$A.Text,url:void 0,text:o,labelStructure:r}})(e,t,n,a,d):u===$A.Indicator&&c[$A.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:$A.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,o,d):u===$A.MiniChart&&c[$A.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?Vk(e,t,i,d):{type:$A.Text,url:void 0,text:d,labelStructure:a}},Uk=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,o=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,i=o?SM(o):null,a=r?SM(r):null,s=((e,t)=>e||!t?null:bM(t))(a,i);return{color:s??a,background:i}},Yk=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:Yk(e,t),e),Kk=(e,t,n,r,o,i)=>{const a=o?i.rowsPerPage-n:dP-r;let s=e.qUp+e.qDown;if(o&&0===n){const n=(t+e.qUp)%i.rowsPerPage;s=e.qDown+n}return Math.min(a,Yk(s,e))},Xk=({node:e,parent:t,root:n,x:r,y:o,pageY:i,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:c=!0,isIndentModeEnabled:u=!1,pseudoDimMeasureIndex:d,indentLevel:p,labelStructure:f,env:h,pageInfo:m,direction:g="ltr"})=>{const v=(!u||!c)&&"P"===e.qType,b=((e,t)=>{if(e!==JT){if(t){const t=HA(e.representation);return t===$A.Link||t===$A.Image?e.representation:{type:$A.Text}}return e.representation}})(s,u),y=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:o,parentOrRootOriginalValue:i})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=o===$A.Link?"P"===e.qType?i:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:c,isIndentModeEnabled:u,labelStructure:f,representationType:HA(b),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),x=Gk({cell:{...e,qText:y},representationProperties:b,attrExprInfoIndex:l,env:h,labelStructure:f,direction:g,enabledFeatures:{[$A.Image]:!0,[$A.Indicator]:!0}}),S={id:aA(),ref:e,x:r,y:o,pageX:r,pageY:i,mainAxisPageCoord:c?i:r,isLeftColumn:c,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:Kk(e,o,i,r,c,m),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:v,expressionColor:Uk(l,e),selectionCellType:c?"L":"T",dimensionInfoIndex:a.getDimensionInfoIndex(s),canBeResized:0===e.qSubNodes.length&&!c,visibleMeasureInfoIndex:d??(v?e.qElemNo:t?.visibleMeasureInfoIndex),representation:x,...void 0!==p&&{indentLevel:p},headerColor:v&&h.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")&&void 0!==e.qElemNo?tk(a.visibleMeasureInfo[e.qElemNo]?.headerColor):void 0};return t&&(t.children[S.mainAxisPageCoord-t.mainAxisPageCoord]=S),S},Jk=(e,t,n,r,o,i,a,s,l)=>{const{isIndentModeEnabled:c}=o,u=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING");if(!t.length)return e;let d=0;return function t(p,f,h,m=0,g=-1){e[m]||(e[m]={}),c&&g++;const v=o.leftDimensionInfoIndexes.indexOf(JT);h.forEach((h,b)=>{const y={originalValue:h.qText??"",maskedValue:"",delimeter:"-",suffix:""};d+=0===b?0:1;const x=n.qTop-r.page*r.rowsPerPage,S=Math.max(0,x+d-h.qUp),w=n.qTop+d-h.qUp;let C;if(c){if(o.hasPseudoDimOnLeft&&g<=v)if(y.originalValue=h.qText??"",y.maskedValue=h.qText??"","N"===h.qType||"U"===h.qType||"T"===h.qType)"U"===h.qType&&(y.originalValue=u?o.getDimensionNullValueText():o.getNullValueText()),g<v&&(y.suffix=o.visibleMeasureInfo[0].qFallbackTitle??"");else if("P"===h.qType){y.originalValue=(f||p)?.representation.labelStructure?.originalValue??"",y.maskedValue=(f||p)?.representation.labelStructure?.originalValue??"",y.suffix=h.qText??"";const e=h.qSubNodes;C=h.qElemNo,h={...(f||p)?.ref,...h.qText?{qText:h.qText}:{},qSubNodes:e},g=(f||p)?.indentLevel??0}"U"===h.qType&&(y.originalValue=u?o.getDimensionNullValueText():o.getNullValueText())}let E=m;c&&(E=v>=1&&g>=v?g+1:g,0===g&&0===v&&0===h.qSubNodes.length&&(E=0));const I=e.at(m)?.[S],D=c&&void 0===I?.ref.qText||!I?Xk({node:h,parent:f,root:p,x:E,y:w,pageY:S,layoutService:o,dimensionInfo:i[E],attrExprInfoIndex:a[E],isLeftColumn:!0,...c&&{isIndentModeEnabled:c,indentLevel:g},env:s,pageInfo:r,labelStructure:y,direction:l,pseudoDimMeasureIndex:C}):e[m][S];if(e[m][S]=D,h.qSubNodes.length){const e=c?0:m+1;t(p||D,D,h.qSubNodes,e,g)}})}(null,null,t,0,-1),e},Zk=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,n,r)=>{const o=r.at(n+1);e.distanceToNextCell=o?o.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},Qk=(e,t)=>{const n=e[0],r=n?Object.values(n):[],o=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,i=n?.[o],a=r.at(-1);return i?.isTotal?i.isLeafNode?i.mainAxisPageCoord:i.mainAxisPageCoord+i.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},eO=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:o,attrExprInfoIndexes:i,env:a,direction:s})=>{const{qLeft:l,qArea:c}=t;if(!l.length)return e;const u=Jk(e.grid,l,c,n,r,o,i,a,s);Zk(u,n.rowsOnCurrentPage);const d=Qk(u,r);return{...e,grid:u,columnCount:u.length,totalDividerIndex:d}},tO=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const o=[...t];return n.forEach((t,n)=>{t.forEach((t,i)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+i;Array.isArray(o[a])||(o[a]=[]);const l="U"===t.qType;o[a][s]=o[a][s]??{id:aA(),ref:t,isNull:l}})}),o},nO=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:o}=t;return r?.length?tO({qArea:o,prevData:e,pivotValuePoints:r,pageInfo:n}):e},rO=(e,t,n,r,o,i,a,s,l,c)=>{const{isIndentModeEnabled:u}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach((f,m)=>{d+=0===m?0:1;const g=n.qLeft+d-f.qUp,v=e[h][g]??Xk({node:f,parent:p,root:a,x:g,y:h,pageY:h,layoutService:r,dimensionInfo:o[h],attrExprInfoIndex:i[h],isLeftColumn:!1,...u&&{isIndentModeEnabled:u},env:s,pageInfo:l,direction:c});e[h][g]=v,f.qSubNodes.length&&t(a||v,v,f.qSubNodes,h+1)})}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},oO=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:o,headerRows:i,env:a,pageInfo:s,direction:l})=>{const{qTop:c,qArea:u}=t;if(!c.length)return e;const d=rO(e.grid,c,u,n,r,o,i,a,s,l);Zk(d,n.size.x);const p=Qk(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},iO=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),aO=(e,t)=>{const{env:n}=HT(),{direction:r}=WT(),{layoutService:o,effectivePropertiesService:i}=UT(),{qPivotDataPages:a,pageInfo:s}=WT(),[l,c]=m(null),d=((e,t,n)=>v(()=>({left:e.map(iO),top:t.map(iO),measures:n.map(iO)}),[n,e,t]))(e,t,o.visibleMeasureInfo),p=n.flags.isEnabled,f=v(()=>ok(o,i,t,e,p),[o,i,t,e,p]),h=u(()=>a.slice(1).reduce((e,t)=>nO({prevData:e,dataPage:t,pageInfo:s}),((e,t)=>{const{qData:n,qArea:r}=e;return tO({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(a[0],s)),[a,s]),g=u(()=>a.slice(1).reduce((e,i)=>oO({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:d.top,headerRows:f.size.y,env:n,pageInfo:s,direction:r}),((e,t,n,r,o,i,a,s)=>{const{qArea:l,qTop:c}=e,u=rO([],c,l,t,n,r,o,i,a,s);Zk(u,t.size.x);const d=Qk(u);return{grid:u,rowCount:u.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],o,t,d.top,f.size.y,n,s,r)),[a,o,t,d.top,f.size.y,n,s,r]),b=u(()=>a.slice(1).reduce((t,i)=>eO({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:d.left,env:n,direction:r}),((e,t,n,r,o,i,a)=>{const{qArea:s,qLeft:l}=e,c=Jk([],l,s,n,t,r,o,i,a);Zk(c,n.rowsOnCurrentPage);const u=Qk(c,t);return{grid:c,columnCount:c.length,layoutSize:t.size,totalDividerIndex:u}})(a[0],o,s,e,d.left,n,r)),[a,o,s,e,d,n,r]),[y,x]=m(()=>h()),[S,w]=m(()=>g()),[C,E]=m(()=>b());cq(()=>{x(h())},[h]),cq(()=>{w(g())},[g]),cq(()=>{E(b())},[b]),cq(()=>{l&&l.forEach(i=>{x(e=>nO({prevData:e,dataPage:i,pageInfo:s})),w(e=>oO({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:d.top,headerRows:f.size.y,env:n,pageInfo:s,direction:r})),E(t=>eO({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:d.left,env:n,direction:r}))})},[l]);const I=u(e=>{c(e)},[]);return{headersData:f,measureData:y,topDimensionData:S,leftDimensionData:C,attrExprInfoIndexes:d,nextPageHandler:I}},sO=Math.sqrt(1e4),lO=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/_D.PixelsMin)}),cO=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/sO),r=Math.ceil(e.qHeight/sO);for(let o=0;o<n;o++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+o*sO,qTop:e.qTop+n*sO,qWidth:Math.min(sO,e.qWidth-o*sO),qHeight:Math.min(sO,e.qHeight-n*sO)});return t};function uO({nextPageHandler:e}){const{model:t}=HT(),{pageInfo:n}=WT(),{layoutService:r}=UT(),o=(e=>{const t=l(e);return t.current=e,t})(n.page),i=t,a=u(async(e,t)=>{await(i?.collapseLeft(XT,e,t,!1))},[i]),s=u(async(e,t)=>{await(i?.collapseTop(XT,e,t,!1))},[i]),c=u(async(e,t)=>{await(i?.expandLeft(XT,e,t,!1))},[i]),d=u(async(e,t)=>{await(i?.expandTop(XT,e,t,!1))},[i]),p=u(async t=>{if(i?.getHyperCubePivotData&&0!==t.length)try{const r=await i.getHyperCubePivotData(XT,t.reduce((e,t)=>[...e,...cO(t)],[]));o.current===n.page&&e(r)}catch(e){console.error(e)}},[i,e,n,o]),f=u((e,{dimensionInfoIndex:n,isLeftColumn:o,x:i=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:c}=r.layout.qHyperCube;let u=[];switch(a){case KA.Dimension:u=[{qPath:`${XT}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case KA.Measures:if(o)u=s.map((e,t)=>({qPath:`${XT}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=r.getMeasureInfoIndexFromCellIndex(i);u=[{qPath:`${XT}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case KA.Pivot:u=[{qPath:`${XT}/topHeadersColumnWidth`,oldValue:c}]}const d=u.map(t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}});t?.applyPatches(d,!0)},[t,r]),h=u(async e=>{await(i?.applyPatches([{qPath:`${XT}/indentModeColumnWidth`,qOp:r.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))},[i,r]);return v(()=>({collapseLeft:a,collapseTop:s,expandLeft:c,expandTop:d,applyColumnWidth:f,applyIndentModeColumnWidth:h,fetchPages:p}),[a,s,c,d,f,h,p])}const dO=(e,t,n)=>(r,o)=>{if("P"===r)return JT;const i=t[n+o];return e[i]},pO=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach(e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)})};return n(e),t},fO=c({}),hO=()=>h(fO),mO=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=UT(),{qPivotDataPages:r}=WT();return v(()=>{const o=pO(r[0]?.qLeft??[]),i=pO(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:o.map(dO(n,t,0)),visibleTopDimensionInfo:i.map(dO(n,t,e))}},[n,t,e,r])})(),{headersData:r,measureData:o,topDimensionData:i,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=aO(t,n),c=uO({nextPageHandler:l}),u=v(()=>({gridSectionsData:{headersData:r,topDimensionData:i,leftDimensionData:a,measureData:o},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:s,dataModel:c}),[t,n,r,o,i,a,s,c]);return hi.jsx(fO.Provider,{value:u,children:e})},gO=20,vO=18,bO=.75,yO=e=>-1!==e&&e?.representation?.type===$A.Image,xO=({isLeftColumn:e,layoutService:t,representation:n})=>Boolean(e)&&t.isIndentModeEnabled&&n.type===$A.Image,SO=e=>void 0===e?uP:e,wO=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const n=+e;return n>=0?n:t}return t},CO=e=>wO(e,_D.PixelsDefault),EO=(e,t)=>wO(e,_D.PercentageDefault)*t/100,IO=(e,t,n)=>{switch(t?.type){case jD.Pixels:return CO(t.pixels);case jD.Percentage:return EO(t.percentage,e);case jD.FitToContent:case jD.Auto:default:return n}},DO=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:o,measureTextForHeader:i,longestMeasureValuePossible:a})=>e.reduce((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:c,qDimensionInfo:u}}}=t,{id:d,colIdx:p,qApprMaxGlyphCount:f,isLeftDimension:h}=s,m=u.find(e=>e.cId===d),g={width:24,...m?.representation?.imageBox};if(!h)return e+0;if(d===ZT)return e+0;const v=xO({isLeftColumn:h,layoutService:t,representation:m?.representation||{type:$A.Text}})?g.width+8+4:r(f),b=!n.qAlwaysFullyExpanded&&p<c-1?21:0;let y=0;if(o&&i&&a){y=i("- ")+a}return Math.max(e,24*l+vO+b+v+y)},0),LO=(e,t,n)=>e.reduce((e,r)=>{const o=(n?0:1)*vO;return Math.max(e,o+t(r.qFallbackTitle??""))},0),RO=(e,t,n,r)=>{const o=100*e/t,i=r*bO*(o/100),a=o/100*+n;return Math.min(a,i)},MO=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),AO=(e,t)=>e.some(e=>e>=t*bO),PO=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:o,widthOverride:i,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:c})=>{let u;const d=o*bO,p=n.data[n.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const f=Math.min(d,r.at(-1)),h=Math.min(d,DO({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,LO(e.visibleMeasureInfo,a));let g;const v=p.findIndex(e=>e.id===ZT),b=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:o}=e.indentModeColumnWidth;return o===jD.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+vO+16:24})({layoutService:e,measureTextForHeader:a,translator:c,headersData:n});if(e.hasPseudoDimOnLeft)if(0===v){const e=Math.max(f,h,m);u=[Math.max(b,e-f),f]}else{const n=Math.min(d,LO(e.visibleMeasureInfo,l,!0));g=Math.min(d,DO({headers:p.slice(0,v),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(f,h,g);u=[Math.max(b,r-f),f]}else u=[Math.max(b,h-f),f];const y=Math.min(d,u.reduce((e,t)=>e+t,0)),{indentModeColumnWidth:x}=e;i&&i<=d&&(x.type=jD.Pixels,x.pixels=i);return[jD.Pixels,jD.Percentage].includes(x.type)||AO(u,o)?((e,t,n,r)=>{let o=e[0],i=e[1];const a=e.reduce((e,t)=>e+t,0),{type:s,pixels:l,percentage:c}=t,u=wO(l,_D.PixelsDefault),d=wO(c,_D.PercentageDefault),p=AO(e,n);let f;s===jD.Auto&&p&&(o>i?o-=i:i-=o),s===jD.Pixels&&u&&(o=RO(e[0],a,u,n),i=RO(e[1],a,u,n)),s===jD.Percentage&&d&&(o=MO(e[0],a,d,n),i=MO(e[1],a,d,n)),i<=r&&(f=o-5,f>0&&(o-=f,i+=f)),f=i-r,f>0&&(o+=f,i-=f);const h=[o,i],m=h.reduce((e,t)=>e+t,0);return{leftGridColumnWidths:h,leftGridWidth:m,leftGridFullWidth:m}})(u,x,o,f):{leftGridWidth:y,leftGridColumnWidths:u,leftGridFullWidth:y}};function qO({tableWidth:e}){const t=e*bO,{styleService:n,layoutService:r,effectivePropertiesService:o}=UT(),{translator:i}=HT(),{gridSectionsData:{headersData:a}}=hO(),{measureText:s}=oq(n.header,{allowLineBreaks:!1}),{estimateWidth:l,measureText:c}=oq({...n.dimensionValues,fontWeight:SO(n.dimensionValues.fontWeight)}),{measureText:d}=oq({...n.dimensionValues,...n.measureLabels}),p=u((n,u)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:f}},visibleMeasureInfo:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,v=(t=0)=>h.reduce((n,{qFallbackTitle:r,columnWidth:o})=>{const i=d(r)+vO,a=Math.max(i,t);return Math.max(n,m?a:IO(e,o,a))},0),b=e=>a.data.reduce((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===ZT)return t;const o=(e=>{const{label:t,isLocked:n}=e,r=n?gO:0;return vO+s(t)+gO+r})(r);return Math.max(o,t)},0);let y=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const S=x.map((i,s)=>{let c;if(m&&1!==a.size.x||!n||void 0===u||u!==i.colIdx){let t,n;if(i.columnWidthLocation===KA.Pivot?t=m?void 0:f:i.columnWidthLocation===KA.Dimension&&({columnWidth:t}=i),i.isLeftDimension)if(i.id===ZT)n=v();else{const e=b(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:i,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(yO(s))return _D.PixelsDefault;const c=!o.qAlwaysFullyExpanded&&i&&t<p-1?21:0;return vO+l(n)+c})(i,s);n=Math.max(e,t),m&&!g&&s+1===p&&i.columnWidthLocation===KA.Dimension&&a.size.x>1&&(n=e)}else n=b(s),i.columnWidthLocation===KA.Measures&&(n=v(n));m&&1===a.size.x&&(t=r.indentModeColumnWidth),c=m&&!g&&a.size.x>1?n:IO(e,t,n)}else c=m?Math.min(t,n):n;return y+=c,c});return m&&a.size.x>1?PO({layoutService:r,effectivePropertiesService:o,headersData:a,columnWidths:S,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:c,translator:i}):{leftGridWidth:Math.min(t,y),leftGridColumnWidths:S,leftGridFullWidth:y}},[e,a,r,t,s,d,l,c,i,o]),[f,h]=m(p);cq(()=>{h(p())},[p]);const g=u((e,t)=>{h(p(e,t))},[p]);return{...f,overrideLeftGridWidth:g}}function TO({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:o}=UT(),{visibleDimensionsInfo:{visibleTopDimensionInfo:i}}=hO(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:c}=o,{estimateWidth:d,measureText:p}=oq(r.measureValues,{allowLineBreaks:!1}),{estimateWidth:f}=oq({...r.dimensionValues,fontWeight:SO(r.dimensionValues.fontWeight)},{allowLineBreaks:!1}),h=e-n-1,m=i.at(-1),g=m===JT,b=s.length-a>i.length?21:0,y=v(()=>{const e=g?c:[m],t=l.x/e.length,n=[],r=[];let o=h;const i=(e,r)=>{n[e]=Math.min(_D.PixelsMax,Math.max(_D.PixelsMin,r)),o-=n[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:o,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case jD.Pixels:i(t,CO(o));break;case jD.Percentage:i(t,EO(a,h));break;case jD.FitToContent:i(t,((e,t,n)=>n?_D.PixelsDefault:vO+(g?Math.max(d(e),p(t)):Math.max(Math.max(...c.map(e=>d(e.qApprMaxGlyphCount))),f(e)+b)))(s,l??"",yO(e)));break;case jD.Auto:default:r.push(t)}}else r.push(t)}),r.length){const e=r.length*t,i=o/e;r.forEach(e=>{n[e]=Math.max(_D.AutoMinPivot,i)})}return n},[g,c,m,l.x,h,d,p,f,b]),x=v(()=>{if(g){return c.reduce((e,t,n)=>e+y[n],0)/c.length}return y[0]},[g,y,c]),S=parseFloat((t/o.size.x).toFixed(12)),w=u(e=>(g&&void 0!==e?y[o.getMeasureInfoIndexFromCellIndex(e,!0)]:x)-S,[g,y,o,x,S]),C=l.x*x;return{rightGridFullWidth:C,rightGridWidth:Math.min(C,h),getRightGridColumnWidth:w}}const kO=`scrollable-container--${JA.TopGrid}`,OO=`scrollable-container--${JA.LeftGrid}`,NO=`scrollable-container--${JA.DataGrid}`,_O=e=>{if(!(e&&e instanceof HTMLDivElement))return{width:0,height:0};const t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight;return{width:t>=2?t:0,height:n>=2?n:0}},jO=(e,t)=>e>t?ZA.Forward:e<t?ZA.Backward:ZA.None,FO=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{const{direction:s}=WT();p(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:c,leftGridWrapperElement:u,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,i(e),o?.(e)},f=e=>{const t=e.target;l.scrollTop=t.scrollTop,i(e),o?.(e)},h=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),c.scrollLeft=l,e.current?.forEach(e=>{e?.scrollTo(l)}),u.scrollTop=d.scrollTop,t.current?.forEach(e=>{e?.scrollTo(a.scrollTop)}),i(r),o?.(r)};return u.addEventListener("scroll",p),c.addEventListener("scroll",f),d.addEventListener("scroll",h),a.scroll||setTimeout(()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)},0),()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)}},[i,o,a,e,t,n,r,s])},zO=Sf(!1),WO=(e,t)=>Math.abs(e.width-t.width)>2||Math.abs(e.height-t.height)>2,$O=({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const{top:r,left:o,data:i,resetHorizontalScrollbarHeight:a}=((e,t,n)=>{const[r,o]=m({width:0,height:0}),[i,a]=m({width:0,height:0}),[s,c]=m({width:0,height:0}),[d,f]=m(!1),h=Tf(zO),g=l(h),v=l(h);g.current=h;const b=u(()=>{f(e=>!e&&e);const r=_O(e.current),i=_O(t.current),s=_O(n.current);o(e=>WO(e,r)?r:e),a(e=>WO(e,i)?i:e),c(e=>WO(e,s)?s:e)},[e,t,n]);p(()=>{const r=new ResizeObserver(()=>{g.current||b()});return[e.current,t.current,n.current].filter(e=>Boolean(e)).forEach(e=>{r.observe(e)}),()=>{r.disconnect()}},[b,e,t,n]),p(()=>{const e=v.current;if(v.current=h,e&&!h){const e=setTimeout(b,0);return()=>{clearTimeout(e)}}},[h,b]);const y=u(()=>{f(!0)},[]);return{top:r,left:d?{...i,height:0}:i,data:d?{...s,height:0}:s,resetHorizontalScrollbarHeight:y}})(e,t,n);return{scrollbarsDimensions:{verticalScrollbarWidth:Math.max(r.width,i.width),horizontalScrollbarHeight:Math.max(o.height,i.height)},resetHorizontalScrollbarHeight:a}},VO=()=>{const{interactions:e}=HT(),t=l(null),n=l(null),r=l(null),o=l(null),i=l([]),a=l([]),s=l(null),{scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:d},resetHorizontalScrollbarHeight:f}=$O({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:o,leftGridRef:i,dataGridRef:a}})=>{const{pageInfo:s}=WT(),{downloadService:l,viewService:c,layoutService:d}=UT(),p=u(()=>{const o={left:0,top:0};e.current?.scrollTo(o),t.current?.scrollTo(o),n.current?.scrollTo(o),r.current?.scrollTo(o)},[e,t,n,r]);g(()=>{p()},[s.page,p]),g(()=>{d.triggerdByExpandOrCollapse||p()},[d,p]),g(()=>{if(d.triggerdByExpandOrCollapse){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;i.current?.forEach(e=>{e?.scrollTo(t)}),o.current?.forEach(t=>{t?.scrollTo(e)}),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}},[d,r,a,i,o]),g(()=>{(l.isDownloadedAsPDForImage||d.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=c.scrollTop,r.current.scrollLeft=c.scrollLeft,n.current.scrollLeft=c.leftGridScrollLeft,t.current.scrollTop=c.topGridScrollTop)},[c,l,d,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:h,scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v}}=(()=>{const e=l(ZA.None),t=l(ZA.None),n=l({prevScrollTop:0,prevScrollLeft:0}),r=u(r=>{if(r instanceof WheelEvent&&(e.current=jO(r.deltaY,0),t.current=jO(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const o=r.target;e.current=jO(o.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=o.scrollTop,t.current=jO(o.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=o.scrollLeft}},[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),b=(()=>{const{viewService:e}=UT();return u(t=>{const n=t.target,r=t.currentTarget,o=n.dataset.key;o===OO&&(e.leftGridScrollLeft=r.scrollLeft),o===NO&&(e.scrollLeft=r.scrollLeft),o===kO&&(e.topGridScrollTop=r.scrollTop),o!==OO&&o!==NO||(e.scrollTop=r.scrollTop)},[e])})(),y={gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},getWrapperElements:u(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:o.current}),[t,n,r,o]),updateViewService:b,trackScrollDirection:h,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{p(()=>{const{headerGridWrapperElement:o,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:c}=r(),u=e=>{e.ctrlKey||(e.preventDefault(),o.scrollLeft+=e.deltaX,o.scrollTop+=e.deltaY,l.scrollLeft=o.scrollLeft,s.scrollTop=o.scrollTop,i(e))},d=e=>{e.ctrlKey||(e.preventDefault(),l.scrollTop+=e.deltaY,t.current?.forEach(e=>{e?.scrollTo(l.scrollTop)}),o.scrollLeft+=e.deltaX,l.scrollLeft=o.scrollLeft,c.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),i(e))},p=t=>{t.ctrlKey||(t.preventDefault(),s.scrollLeft+=t.deltaX,e.current?.forEach(e=>{e?.scrollTo(s.scrollLeft)}),o.scrollTop+=t.deltaY,s.scrollTop=o.scrollTop,c.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),i(t))},f=r=>{r.ctrlKey||(r.preventDefault(),c.scrollLeft+=r.deltaX,c.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}),s.scrollLeft=c.scrollLeft,e.current?.forEach(e=>{e?.scrollTo(c.scrollLeft)}),l.scrollTop=c.scrollTop,t.current?.forEach(e=>{e?.scrollTo(c.scrollTop)}),i(r))};return o.addEventListener("wheel",u),l.addEventListener("wheel",d),s.addEventListener("wheel",p),c.addEventListener("wheel",f),a.scroll||setTimeout(()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)},0),()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)}},[i,o,a,e,t,n,r])})(y),FO(y),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v},scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:d,resetHorizontalScrollbarHeight:f}}},HO=()=>{const{layoutService:e}=UT(),{rect:t,pageInfo:n}=WT();return v(()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}},[t,e,n.shouldShowPagination])},BO=({children:e,style:t})=>hi.jsx("div",{"data-testid":"fullSize",style:t,children:e}),GO=({children:e,style:t})=>{const{direction:n}=WT();return hi.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},UO=e=>e&&`scrollable-container--${e}`,YO=({children:e,style:t,origin:n},r)=>{const{interactions:o}=HT(),i=o.scroll?t:{overflow:"hidden"};return hi.jsx("div",{"data-testid":"scrollable","data-key":UO(n),style:i,ref:r,children:e})};var KO=n.forwardRef(YO);const XO=({children:e,style:t})=>{const{direction:n}=WT();return hi.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var JO=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ZO(e,t){return e===t||!(!JO(e)||!JO(t))}function QO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ZO(e[n],t[n]))return!1;return!0}function eN(e,t){var n;void 0===t&&(t=QO);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var tN="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function nN(e){cancelAnimationFrame(e.id)}function rN(e,t){var n=tN();var r={id:requestAnimationFrame(function o(){tN()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var oN=-1;function iN(e){if(void 0===e&&(e=!1),-1===oN||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),oN=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return oN}var aN=null;function sN(e){if(void 0===e&&(e=!1),null===aN||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?aN="positive-descending":(t.scrollLeft=1,aN=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),aN}return aN}var lN=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function cN(e){var t,n=e.getColumnOffset,o=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,f=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,v=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,Xs(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Xs(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=eN(function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=eN(function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,i=r.props,s=i.columnWidth,l=i.direction,c=i.rowHeight,u=r._getItemStyleCache(g&&s,g&&l,g&&c),f=e+":"+t;if(u.hasOwnProperty(f))o=u[f];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;u[f]=o={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=eN(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(sN()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&nN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=rN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}zs(t,e),t.getDerivedStateFromProps=function(e,t){return uN(e,t),v(e),null};var b=t.prototype;return b.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},b.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,a=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,v=iN();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=s(this.props,this._instanceProps),y=l(this.props,this._instanceProps)>f?v:0,x=b>d?v:0;this.scrollTo({scrollLeft:void 0!==r?c(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,y):g})},b.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},b.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(sN()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},b.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&nN(this._resetIsScrollingTimeoutId)},b.render=function(){var e=this.props,t=e.children,n=e.className,o=e.columnCount,i=e.direction,a=e.height,c=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,f=e.itemKey,h=void 0===f?lN:f,m=e.outerElementType,g=e.outerTagName,v=e.rowCount,b=e.style,y=e.useIsScrolling,x=e.width,S=this.state.isScrolling,w=this._getHorizontalRangeToRender(),C=w[0],E=w[1],I=this._getVerticalRangeToRender(),D=I[0],L=I[1],R=[];if(o>0&&v)for(var M=D;M<=L;M++)for(var A=C;A<=E;A++)R.push(r(t,{columnIndex:A,data:p,isScrolling:y?S:void 0,key:h({columnIndex:A,data:p,rowIndex:M}),rowIndex:M,style:this._getItemStyle(M,A)}));var P=s(this.props,this._instanceProps),q=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:qe({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},b)},r(u||d||"div",{children:R,ref:c,style:{height:P,pointerEvents:S?"none":void 0,width:q}}))},b._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,s,d,p,l,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,v=m.scrollLeft,b=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(v,b,g,x,y)}},b._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var f=o(this.props,d,this._instanceProps),h=i(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},b._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),p=h(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,p+g)),d,p]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var uN=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},dN=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},pN=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},fN=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=i(c);o[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},hN=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?mN(e,t,n,i,0,r):gN(e,t,n,Math.max(0,i),r)},mN=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=fN(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},gN=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&fN(e,t,r,n).offset<o;)r+=a,a*=2;return mN(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},vN=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=fN(e,t,n,i),c="column"===e?pN(t,i):dN(t,i),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return o>=d&&o<=u?o:d>u||o<d?d:u}},bN=cN({getColumnOffset:function(e,t,n){return fN("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return hN("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=fN("column",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=fN("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:dN,getEstimatedTotalWidth:pN,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return vN("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return vN("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return fN("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return hN("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=fN("row",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=fN("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),yN=function(e,t){return e};function xN(e){var t,n=e.getItemOffset,o=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=c(r.props,Xs(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Xs(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=eN(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=eN(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=eN(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(sN()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState(function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&nN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=rN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}zs(t,e),t.getDerivedStateFromProps=function(e,t){return SN(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,i=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?iN():0:l.scrollHeight>l.clientHeight?iN():0}this.scrollTo(a(this.props,e,t,i,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(sN()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&nN(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,f=void 0===p?yN:p,h=e.layout,m=e.outerElementType,g=e.outerTagName,v=e.style,b=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S="horizontal"===i||"horizontal"===h,w=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],I=C[1],D=[];if(u>0)for(var L=E;L<=I;L++)D.push(r(t,{data:d,key:f(L,d),index:L,isScrolling:b?x:void 0,style:this._getItemStyle(L)}));var R=o(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:qe({position:"relative",height:a,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},v)},r(l||c||"div",{children:D,ref:s,style:{height:S?"100%":R,pointerEvents:x?"none":void 0,width:S?R:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var c=s(this.props,a,this._instanceProps),u=l(this.props,c,a,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var SN=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},wN=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var c=r(l);o[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return o[t]},CN=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=wN(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},EN=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&wN(e,n,t).offset<r;)n+=i,i*=2;return CN(e,t,Math.min(n,o-1),Math.floor(n/2),r)},IN=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},DN=xN({getItemOffset:function(e,t,n){return wN(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:IN,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=wN(e,t,o),p=IN(e,o),f=Math.max(0,Math.min(p-u,d.offset)),h=Math.max(0,d.offset-u+d.size+i);switch("smart"===n&&(n=r>=h-u&&r<=f+u?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?CN(e,t,o,0,n):EN(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===o||"horizontal"===s?l:i,u=wN(e,t,r),d=n+c,p=u.offset+u.size,f=t;f<a-1&&p<d;)f++,p+=wN(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function LN(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var RN=["style"],MN=["style"];function AN(e,t){var n=e.style,r=Te(e,RN),o=t.style,i=Te(t,MN);return!LN(n,o)&&!LN(r,i)}const PN=10,qN=(e,t)=>e.current===ZA.Backward?t:0,TN=(e,t,n,r)=>{for(let o=n;o<n+r;o++){const n=e.at(o);if(void 0===n||void 0===n.at(t))return!0}return!1},kN=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,ON=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:o,endLeft:i})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=o;e<i;e++)if(TN(t,e,n,r)){const t=a[a.length-1],o={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&kN(t,o)?t.qWidth+=o.qWidth:a.push(o)}return a},NN=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:o,minBufferEndLeft:i,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,c=n.current===ZA.Backward?Math.max(0,o-25):i,u=Math.min(c+25,a);return ON({pageInfo:e,measureData:t,startLeft:c,endLeft:u,pageTop:s,qHeight:l})},_N=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:o})=>{const{startLeft:i,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=e.size.x,l=qN(n,PN),c=Math.max(r-l,0);return{startLeft:c,endLeft:c+Math.min(i+PN,s-c),pageTop:o,qHeight:a}})(r,o,n),c=ON({pageInfo:e,measureData:t,startLeft:i,endLeft:a,pageTop:s,qHeight:l});return c.length>0?[...c,...NN({pageInfo:e,measureData:t,scrollDirection:n,viewService:o,minBufferStartLeft:i,minBufferEndLeft:a,columnEndIndex:r.size.x})]:c},jN=(e,t,n,r)=>{const o=e[n];if(void 0===o)return!0;for(let e=t;e<t+r;e++){if(void 0===o[e])return!0}return!1},FN=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,zN=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:o,pageInfo:i})=>{const a=[],s=i.page*i.rowsPerPage;for(let i=e;i<t;i++)if(jN(o,n,i,r)){const e=a.at(-1),t={qLeft:n,qTop:i+s,qWidth:r,qHeight:1};void 0!==e&&FN(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},WN=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:o,endTop:i,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=qN(n,PN),l=Math.max(o-s,0);return{startTop:l,endTop:l+Math.min(a+PN,e.rowsOnCurrentPage-l),qLeft:r,qWidth:i}})(e,r,n),l=zN({startTop:o,endTop:i,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===ZA.Backward?Math.max(0,o-25):i,c=Math.min(r+25,e.rowsOnCurrentPage),u=zN({startTop:r,endTop:c,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...u]}return l},$N=(e,t,n,r,o,i,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:c,gridWidth:u,gridHeight:d}=o;let p=[],f=[];i.current!==ZA.None&&(p=WN({pageInfo:r,measureData:n,scrollDirection:i,viewService:o})),a.current!==ZA.None&&(f=_N({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:o})),i.current===ZA.None&&a.current===ZA.None&&(p=zN({measureData:n,pageInfo:r,qLeft:l,qWidth:u,startTop:c,endTop:c+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},VN=function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var c=Date.now()-i,u=function(){i=Date.now(),r=0,e.apply(t,n)};r||(c>=o?u():r=setTimeout(u,o-c))}}($N,100),HN=uM($N,75),BN=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),GN=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:o,isLeftColumn:i,showTotalCellDivider:a})=>{const{direction:s}=WT(),{styleService:{grid:{border:l,divider:c}}}=UT();return hi.jsx("div",{style:{...e,...RP,...qP(n,r,l,s,o),...kP({bottomDivider:a&&i,rightDivider:a&&!i,borderColor:c})},"data-testid":"empty-cell","data-index":t})},UN=({children:e,verticalAlign:t,width:n,right:r,isLeftColumn:o})=>{const{layoutService:{isIndentModeEnabled:i}}=UT(),a=o&&i;return hi.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},YN=e=>{const{type:t,imageSize:n}=e;return t!==$A.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},KN=e=>"number"==typeof e&&!Number.isNaN(+e),XN=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,JN=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),ZN=x((e,t)=>hi.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:hi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),QN=x((e,t)=>hi.jsxs("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:[hi.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),hi.jsx("use",{fillRule:"evenodd"})]})),e_=x((e,t)=>hi.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:hi.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})})),t_=x((e,t)=>hi.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:hi.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})})),n_=x((e,t)=>hi.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:hi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})})),r_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M2 7.5h12v1H2z"})})),o_=x((e,t)=>hi.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:hi.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})})),i_=x((e,t)=>hi.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:hi.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),a_=x((e,t)=>hi.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:hi.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})})),s_=x((e,t)=>hi.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:hi.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})})),l_=x((e,t)=>hi.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:hi.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),c_=x((e,t)=>hi.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:hi.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})})),u_=x((e,t)=>hi.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:hi.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})})),d_=x((e,t)=>hi.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:hi.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})})),p_={m:l_,"ï":a_,R:x((e,t)=>hi.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:hi.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})})),S:c_,T:u_,U:d_,P:i_,Q:n_,"è":x((e,t)=>hi.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:hi.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})})),"¢":e_,"©":QN,"23F4":t_,2013:s_,"&":o_,add:JN,"minus-2":r_,dot:ZN},f_=({size:e,iconKey:t,color:n,pvStyle:r})=>{const o=t&&p_[t];return o&&hi.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:hi.jsx(o,{style:{height:e}})})},h_=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),m_=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},g_=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:i.gradient?{color:l.color,t:c/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return zL(e.localPaletteColors[t].color??"").blend(zL(s.color??""),s.t)},v_=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:h_(t,e.value)}))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map((e,t)=>({color:m_(r,t,n)}))),r},b_=(e,t,n,r)=>{const o=v_(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=g_(e,a,t);break}r=i}return n})(o,t);return a},y_=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!KN(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!KN(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},x_=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=y_(e,t),o=Math.abs(t);return{min:n??t-o,max:r??t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!KN(t))return 0;let a=n&&KN(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},S_=e=>"flex-start"===e?"flex-end":"flex-start",w_=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=x_(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,n.limitPaletteColorIndex))return m_(o,n.limitPaletteColorIndex,r);const a=h_(n.limitRange,t);return b_(o,a,n.limitRange,r)})(o,t,i,r),s=o.segments.paletteColors[i?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let c=l?.position||"right";return"rtl"===n&&(c="right"===c?"left":"right"),{color:a,iconKey:s,position:c}},C_=({representation:e,cellValue:t,textStyle:n})=>{const{styleService:r}=UT(),{theme:o}=HT(),{direction:i}=WT(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=w_(e,t,i,o),{fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m}=r.measureValues,g={fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m},v=parseInt(d||lP,10),{iconKey:b,color:y,position:x}=u||{},S={display:"flex",paddingTop:2};return l?hi.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:c?y:n?.color},children:["left"===x&&f_({size:v,iconKey:b,color:y,pvStyle:S}),hi.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&f_({size:v,iconKey:b,color:y,pvStyle:S})]}):(S.paddingTop=5,f_({size:v,iconKey:b,color:y,pvStyle:S}))},E_=e=>!!e.target?.getAttribute("class")?.includes(ND),I_=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),o=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&o===e.activeSelection.endIndex)return e;const i={...e.activeSelection,startIndex:r,endIndex:o};return i.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:o}=e,i=new Map(o);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&i.set(n.ref.qElemNo,n)}return i})(i),{...e,activeSelection:i}}default:return e}},D_=e=>null!==e.target?.closest("[data-prevent-selection]"),L_=e=>"A"===e.target?.tagName,R_=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const M_=c({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),A_=()=>h(M_),P_=({children:e,selections:t})=>{const n=function(e){const{updatePageInfo:t}=WT(),n=e.isActive(),[r,o]=d(I_,{engineSelectedCells:null,selectedField:null,activeSelection:null});p(()=>{const n=()=>{o({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}},[e,t]);const i=u(async()=>{if(!r.activeSelection)return;var t,n;1===r.activeSelection.clientSelectedCells.size&&(t=r.engineSelectedCells,(n=r.activeSelection).clientSelectedCells.forEach((e,r)=>{t?.has(r)&&(n.clientSelectedCells.delete(r),t.delete(r))}));const i=new Map([...r.engineSelectedCells??new Map,...r.activeSelection.clientSelectedCells]);try{o({type:"mouseup",payload:{engineSelectedCells:i}}),await e.select({method:"selectPivotCells",params:[XT,Array.from(i,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){console.error(e),o({type:"mouseup",payload:{engineSelectedCells:r.engineSelectedCells}})}},[r,e]);p(()=>{if(r.activeSelection)return document.addEventListener("mouseup",i),()=>{document.removeEventListener("mouseup",i)}},[i,r.activeSelection]);const a=u((e,t)=>n=>{const r=t(e);E_(n)||D_(n)||L_(n)||!(e=>1===e.buttons)(n)||!r||o(R_({startIndex:e,getCellFromIndex:t,cell:r}))},[]),s=u(t=>async()=>{r.activeSelection&&(e.isActive()||await e.begin([XT]),o({type:"mouseover",payload:{index:t}}))},[r.activeSelection,e]),l=u((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);E_(n)||D_(n)||L_(n)||!r||(o(R_({startIndex:e,getCellFromIndex:t,cell:r})),i())},[i]),c=u(e=>!(!r.engineSelectedCells?.size&&!r.activeSelection?.clientSelectedCells.size||!r.selectedField||e.selectionCellType===r.selectedField.selectionCellType&&("L"===e.selectionCellType?r.selectedField.index===e.x:r.selectedField.index===e.y)),[r.activeSelection?.clientSelectedCells.size,r.engineSelectedCells?.size,r.selectedField]),f=u(e=>!c(e)&&(r.engineSelectedCells?.has(e.ref.qElemNo)||!!r.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[c,r.activeSelection?.clientSelectedCells,r.engineSelectedCells]);return v(()=>({isSelected:f,isActive:n,isLocked:c,createMouseDownHandler:a,createMouseOverHandler:s,createPointerUpHandler:l}),[f,n,c,a,s,l])}(t);return hi.jsx(M_.Provider,{value:n,children:e})},q_=e=>"fill"===e.representation.imageSize,T_=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&q_(e)&&t&&(n="center"),e.representation.type!==$A.Image||q_(e)?n:e.representation.resolvedImagePosition?.vertical};var k_=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(k_||{});const O_={brighter:.5,darker:.3,opacity:.03},N_=(e,{cell:t,styleService:n})=>{if(e===k_.Background||e===k_.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.dimensionNull[e]:t.isPseudoDimension?e===k_.Background&&t.headerColor?.background?t.headerColor.background:e===k_.Color&&t.headerColor?.color?t.headerColor.color:n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},__=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const o=N_(k_.Background,{cell:n,styleService:e});return!r||!o||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?N_(k_.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${xM(i=o,O_)} 0px 2px,\n ${i} 0px 4px\n ) border-box`;var i},j_=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:N_(k_.Color,{cell:e,styleService:t}),F_=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,o=N_(k_.FontWeight,{cell:e,styleService:t});return void 0===o&&(r||n)?uP:o},z_=({cell:e,styleService:t})=>N_(k_.FontStyle,{cell:e,styleService:t}),W_=({cell:e,styleService:t})=>N_(k_.TextDecoration,{cell:e,styleService:t}),$_=e=>e?"pointer":"default",V_=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},H_=(e,t)=>{if(!e.isLeftColumn||e.representation.type===$A.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},B_=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r,layoutService:o}=UT(),{interactions:i}=HT(),{isActive:a}=A_(),{dataModel:s}=hO();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!i.active||a||!s,c=j_({cell:e,styleService:r,isCellSelected:n}),u=a?.4:1,d=e.ref.qCanExpand?Uq:Gq;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const f=xO({isLeftColumn:t,layoutService:o,representation:e.representation});return hi.jsx(d,{opacity:u,color:c,"data-prevent-selection":!l||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:l?"default":"pointer",position:"sticky",top:0,...H_(e,r),...f&&{alignSelf:T_(e)}},onClick:l?void 0:V_({cell:e,expandOrCollapse:p})})},G_=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},U_=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},Y_=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},K_=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:o,layoutService:i,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=i,l=xO({isLeftColumn:r,layoutService:i,representation:e}),c=t?21:0,u=e.imageBox?.width??24;let d=`calc(100% - ${c}px)`,p=o.headerCellHeight;r&&l&&(d=u),(a||r)&&(p=o.contentCellHeight);let f=p;switch(r&&void 0!==n&&!s&&(f=p*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:d,maxHeight:f,...l?{width:d}:{}};case"fitWidth":return{width:d,maxHeight:f};case"fitHeight":return{height:f,maxWidth:d,...l?{width:d}:{}};case"fill":return{height:f,width:d};default:return{width:d,height:p}}},X_=e=>{if("alwaysFit"===e)return"contain"},J_=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),Z_=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:U_(e,n,r),height:G_(e),objectFit:X_(e),objectPosition:Y_(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),Q_=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:o}=(()=>{const{downloadService:e}=UT(),t=l(null),{promise:n,resolve:r}=v(()=>BP(),[]);return p(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()}),[t,e,n,r]),{onLoad:u(()=>{r()},[r]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:i}}=UT(),{url:a,text:s,imageSize:c,resolvedImagePosition:d}=e,{overflow:f,...h}=t;return hi.jsx("img",{src:a,alt:s,style:{...Z_({imageSize:c,resolvedImagePosition:d,isImagesInIndentModeEnabled:i,isMeasureCell:n}),...h},onLoad:o,ref:r})},ej=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:o=!1,imageContainerHorizontalAlignment:i,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=UT(),{resolvedImagePosition:c}=e;return hi.jsx("div",{"data-key":"image-container--image",style:{display:"flex",flexDirection:"column",justifyContent:c?.vertical,alignItems:i,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...K_({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,layoutService:l,isLeftColumn:o,isMeasureCell:a})},children:hi.jsx(Q_,{representation:e,textStyle:t,isMeasureCell:!0})})},tj=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},nj=(e,t)=>{let{textAlign:n}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:n}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),n?.auto||void 0===n?"left":n.align},rj={display:"flex",flexDirection:"row",alignItems:"center"},oj={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},ij=(e,t,n,r,o)=>t?{...oj,...o?e.measureValues:e.nullValues}:n?{...rj,color:e.totalValues.color,background:r??e.totalValues.background}:{...rj,color:e.measureValues.color,background:r??e.measureValues.background},aj=(e,t,n,r,o)=>{const{fontFamily:i,fontSize:a}=e.measureValues,s={...MP,...!n&&AP(e.grid.lineClamp),...t&&{color:t},fontFamily:i,fontSize:a};if(o){const t=n?e.measureValues:e.nullValues,{fontWeight:r,fontStyle:o,textDecoration:i}=t;return{...s,fontWeight:r,fontStyle:o,textDecoration:i}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:c,textDecoration:u}=e.measureValues;return{...s,fontWeight:void 0===l?uP:l,fontStyle:c,textDecoration:u}},sj=({cell:e,representation:t,color:n,isTotalValueCell:r,cellHorizontalAlignment:o})=>{const{layoutService:i,styleService:a}=UT(),{isIndentModeEnabled:s}=i,l=e.isNull?i.getNullValueText():t.text,c=t.type===$A.Image,u=t.type===$A.Indicator,d=""!==l&&KN(XN(l)),p=aj(a,n,d,r,e.isNull);if(!s&&c&&!e.isNull||s&&c&&!e.isNull)return hi.jsx(ej,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:o});const f=XN(e.isNull?t.text:e.ref.qNum);return u&&KN(f)?hi.jsx(C_,{representation:t,cellValue:f,textStyle:p}):hi.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},lj=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,cj="flex-start",uj=(e,t)=>e.isNull?cj:t.type===$A.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:cj,dj=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{env:o}=HT(),{pageInfo:i,direction:a}=WT(),{styleService:s,layoutService:l}=UT(),{attrExprInfoIndexes:c,gridSectionsData:{measureData:d,leftDimensionData:p,topDimensionData:f},visibleDimensionsInfo:{visibleTopDimensionInfo:h}}=hO(),m=(()=>{const{layoutService:{isIndentModeEnabled:e}}=UT(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:o}}=hO(),i=r.length,a=o.length;return u((r,o)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:i-1)?.[o]?.isTotal),[n,t,i,a,e])})(),g=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=hO(),n=t.length;return u(t=>{const r=e.grid.at(n-1)?.[t];return BN(r,e.totalDividerIndex)},[e,n])})(),v=(()=>{const{layoutService:{isIndentModeEnabled:e}}=UT(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=hO(),r=n.length;return u(n=>{const o=e?0:r-1,i=t.grid.at(o)?.[n];return BN(i,t.totalDividerIndex,e)},[t,e,r])})(),{showLastBorder:b}=r,y=f.grid.at(h.length-1),x=p.grid.at(-1),{background:S}=s.measureValues,w=d[t]?.[e],C=t===i.rowsOnCurrentPage-1,E=e===l.size.x-1;if(!w)return hi.jsx(GN,{style:{...n,background:S},isLastRow:C,isLastColumn:E,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const I=l.hasPseudoDimOnLeft?lj(x,t):lj(y,e),D=l.visibleMeasureInfo[I],L=Gk({cell:w.ref,representationProperties:D.representation,attrExprInfoIndex:c.measures[I],env:o,direction:a,conditionalColoring:D.conditionalColoring,enabledFeatures:{[$A.Image]:!0,[$A.Indicator]:!0}}),R=!w.isNull&&m(e,t),M=w.isNull?l.getNullValueText():L.text,A=!w.isNull||""!==M&&!Number.isNaN(+M),P=Uk(c.measures[I],w.ref),q=((e,t,n,r,o)=>{const{textAlign:i}=t,a=r?"flex-end":"center";return e.isNull||n.type!==$A.Image?tj(i,a,o):n.resolvedImagePosition?.horizontal??"center"})(w,D,L,A,a),T={...ij(s,w.isNull,R,P.background,A),...qP(C,E,s.grid.border,a,b),...kP({bottomDivider:v(t),rightDivider:g(e),borderColor:s.grid.divider}),...RP,padding:"0px 4px",display:"flex",justifyContent:q};return hi.jsx("div",{className:kD,title:M,style:{...T,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:hi.jsx(UN,{width:YN(L),verticalAlign:uj(w,L),children:hi.jsx(sj,{cell:w,representation:L,isTotalValueCell:R,color:P.color,cellHorizontalAlignment:q})})})};var pj=n.memo(dj,AN);const fj=(e,t)=>t.list[e]?.id??e.toString(),hj=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,mj=e=>({...LP,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),gj=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:o,getRightGridColumnWidth:i,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:c}=WT(),{layoutService:d,styleService:{grid:{divider:p},contentCellHeight:f}}=UT(),{dataModel:h,gridSectionsData:{measureData:m}}=hO(),v={...mj(c),borderColor:p,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},b=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=WT(),{downloadService:r,viewService:o,layoutService:i}=UT(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:c}}=hO(),d=s.columnCount,p=l.rowCount;return u(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:u,overscanRowStopIndex:f})=>{o.gridColumnStartIndex=s,o.gridRowStartIndex=u,o.gridWidth=l-s+1,o.gridHeight=f-u+1;const h=o.gridWidth+d+(t.current===ZA.None?0:PN),m=o.gridHeight+p+(e.current===ZA.None?0:PN);let g=VN;m*h>1500&&(g=HN),g(a,i,c,n,o,e,t,r)},[o,i,a,c,e,t,n,d,p,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return cq(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,h,m]),g(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[r,t,e,f,c]),0===d.size.x?null:hi.jsx(bN,{"data-section-id":"DATA_GRID",ref:e,style:v,columnCount:d.size.x,columnWidth:i,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:o,grid:m},onItemsRendered:b,estimatedRowHeight:n(),estimatedColumnWidth:i(),itemKey:hj,direction:c,children:pj})};var vj=y(gj);const bj=x((e,t)=>hi.jsxs("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:[hi.jsx("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),hi.jsx("use",{fillRule:"evenodd"})]})),yj=e=>{const[t,n]=Of(zO);return cq(()=>{n(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},xj=()=>{const[e,t]=m(!1),{dataModel:n}=hO(),{interactions:r}=HT(),{isAdjustingWidth:o,setIsAdjustingWidth:i}=yj([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||E_(e)||o||t(!0)},isAdjustingWidth:o,setIsAdjustingWidth:i}};function Sj(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,o=r===EP.Transparent?DL.WHITE:r,i=zL(e.grid.border),a=zL(o);return a.isInvalid()||i.isInvalid()||1===i.a?e.grid.border:function(e,t,n){return zL(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,i,i.a).getRGB()}const wj=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:o,shouldApplyIndentModeColumnWidth:i,tableWidth:a})=>{const{direction:s}=WT(),{interactions:l,translator:c}=HT(),{isActive:u}=A_(),{dataModel:d}=hO(),{styleService:p}=UT(),[,f]=m({});if(!(e.canBeResized&&!!l.active&&!u))return null;const h=Sj(p,e);return hi.jsx(mq,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{i?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*bO,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:o,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:c,columnLabel:e.label??""},direction:s})},Cj=Ms(mc,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:o})=>({pointerEvents:o?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&o?n:t}})),Ej=Ms("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),Ij=Ms("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({...DP,justifyContent:e??DP.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),Dj=Ms("div")(()=>({...DP})),Lj=Ms("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:o,justifyContent:i})=>({display:"flex",justifyContent:i,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:o})),Rj=Ms(Ad)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),Mj=Ms(Od,{shouldForwardProp:e=>!["isActive"].includes(e)})(({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:e.spacing(.5),margin:e.spacing(.25,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}})),Aj=Ms("span")({textOverflow:"ellipsis",overflow:"hidden"}),Pj=Ms("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:gO,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),qj=Ms("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})(({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0}));let Tj=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const kj=(e,t)=>({qExcludeList:t===Tj.Expand,qPos:{qDimName:e,qElemNo:[]}}),Oj=`${XT}/qExpansionState`,Nj=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r})=>async()=>{const o=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:kj(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n})=>{const{index:r,expansionData:o}=t;try{let t,n=Oj,i="Add";void 0===r?t=JSON.stringify([o]):-1===r?(n=`${Oj}/-`,t=JSON.stringify(o)):(n=`${Oj}/${r}`,i="Replace",t=JSON.stringify(o)),await e.applyPatches([{qPath:n,qOp:i,qValue:t}],!0)}catch(e){console.error(n,e)}})({model:e,newExpansionState:o,errorMsg:`Failed to ${r} dimension`})},_j=({model:e,effectivePropertiesService:t,cell:n})=>{if(void 0===n.qEffectiveDimensionName)return;const r={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName};return{expandCallback:Nj({...r,action:Tj.Expand}),collapseCallback:Nj({...r,action:Tj.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},jj={[tT.Sorting]:!0,[tT.Selections]:!0,[tT.Searching]:!0},Fj=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:o,changeSortOrder:i,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:c,shouldApplyIndentModeColumnWidth:u,tableWidth:d})=>{const p=l(null),{styleService:f,layoutService:h,effectivePropertiesService:m}=UT(),{app:g,interactions:v,embed:b,translator:y,model:x,env:S}=HT(),{fontSize:w,fontFamily:C,fontStyle:E,fontWeight:I,textDecoration:D,color:L,background:R,hoverBackground:M,activeBackground:A}=f.header,P=l(null),{shouldShowLockIcon:q,shouldShowMenuIcon:T}=a,{open:k,setOpen:O,handleOpenMenu:N,setIsAdjustingWidth:_}=xj(),{direction:j}=WT(),F={sortFromMenu:async(t,n)=>{t.stopPropagation(),await i(e,n)}},z={embed:b,listboxRef:p,sortCriteria:h.searchSortFromDimension&&e.isDim?m.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},W={app:g,qStateName:h.layout.qStateName},{labelTextAlign:$}=h.getDimensionInfo(e.dimensionInfoIndex)??{},V=tj($,"flex-start",j);return hi.jsxs(Cj,{className:kD,title:e.label,interactions:v,background:k?e.headerColor?.headerMenuActiveBackground??A:e.headerColor?.background??R,hoverBackground:e.headerColor?.headerMenuHoverBackground??M,shouldShowMenuIcon:T,isDimension:e.isDim,style:{...t,...RP,...TP(e,o,n,r,f.grid.border,j),color:e.headerColor?.color??L},"data-testid":"title-cell",onClick:N,children:[hi.jsxs(Ij,{children:[q?hi.jsx(Dj,{children:hi.jsx(bj,{height:12})}):null,hi.jsx(Lj,{fontFamily:C,fontSize:w,fontStyle:E,fontWeight:I,textDecoration:D,justifyContent:V,children:hi.jsx("span",{style:S.flags.isEnabled("VNA-135-WRAP_HEADER_TEXT")?{...MP,...AP(f.grid.columnLineClamp)}:MP,children:e.label})})]}),e.isDim?hi.jsxs(hi.Fragment,{children:[hi.jsx(oT,{headerData:e,translator:y,anchorRef:P,open:k,setOpen:O,interactions:v,menuAvailabilityFlags:jj,sortRelatedArgs:F,searchRelatedArgs:z,selectionRelatedArgs:W,expandOrCollapseArgs:_j({model:x,effectivePropertiesService:m,cell:e}),shouldShowMenuIcon:T,model:x&&"setActiveField"in x?x:void 0,direction:j,isAccessibleHeader:!0}),hi.jsx(Ej,{ref:p,direction:j}),hi.jsx(Ej,{ref:P,direction:j})]}):null,hi.jsx(wj,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:c,setIsAdjustingWidth:_,shouldApplyIndentModeColumnWidth:u,tableWidth:d})]})},zj=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=UT(),{direction:r}=WT();return e>0&&t>0?hi.jsx("div",{style:{...LP,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},Wj=x((e,t)=>hi.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:hi.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),$j=x((e,t)=>hi.jsxs("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:[hi.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),hi.jsx("use",{fillRule:"evenodd"})]})),Vj=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{direction:r}=WT(),{styleService:o}=UT(),{interactions:i,translator:a}=HT(),{isActive:s}=A_(),{dataModel:l}=hO(),{setIsAdjustingWidth:c}=yj([l]);if(!(!!i.active&&!s))return null;const u=Sj(o,{isLeftColumn:!0});return hi.jsx(mq,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:u,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*bO))},confirmWidthCallback:r=>{if(r.type===jD.FitToContent)return void l.applyIndentModeColumnWidth({type:jD.Auto});const o=Math.min(r.pixels??t,e*bO);n(o),l.applyIndentModeColumnWidth({type:jD.Pixels,pixels:o})},setIsAdjustingWidth:c,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},Hj=x((e,t)=>hi.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:hi.jsx("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})})),Bj=({cell:e,changeSortOrder:t})=>{const n=l(null),r=l(null),{app:o,interactions:i,embed:a,translator:s,model:c}=HT(),{layoutService:u,effectivePropertiesService:d}=UT(),{open:p,setOpen:f,handleOpenMenu:h}=xj();return hi.jsxs(Mj,{onClick:h,isActive:p,children:[hi.jsx(Aj,{children:e.label}),hi.jsxs(Pj,{className:"indent-mode-dropdown-more",visible:p,children:[hi.jsx(Hj,{}),e.isDim?hi.jsxs(hi.Fragment,{children:[hi.jsx(oT,{headerData:e,translator:s,anchorRef:n,open:p,setOpen:f,interactions:i,menuAvailabilityFlags:jj,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:o,qStateName:u.layout.qStateName},expandOrCollapseArgs:_j({model:c,effectivePropertiesService:d,cell:e}),shouldShowMenuIcon:!1,model:c&&"setActiveField"in c?c:void 0}),hi.jsx(Ej,{ref:r}),hi.jsx(Ej,{ref:n})]}):null]})]})},Gj=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const o=n.at(-1)?.id===ZT,i=e+1<n.length&&n[e+1]?.id===ZT;return!(r&&o&&i)&&(t?.id!==ZT&&e<n.length-1)},Uj=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:o})=>{const{styleService:i}=UT(),{interactions:a,translator:s}=HT(),{dataModel:c,gridSectionsData:{headersData:u}}=hO(),[d,p]=m(!1),f=l(null),{headerCellHeight:h}=i,{color:g,background:v,hoverBackground:b,activeBackground:y,fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E}=i.header,{isAdjustingWidth:I}=yj([c]),D=e=>{e.stopPropagation()},L={height:h,gridColumn:`1 / span ${u.size.x}`,gridRow:u.size.y,zIndex:u.size.x-0};return hi.jsxs(Cj,{isDimension:!0,background:d?y:v,interactions:a,hoverBackground:b,style:{...L,...RP,color:g},onClick:e=>{!a.active||E_(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[hi.jsxs(Ij,{justifyContent:"flex-start",children:[hi.jsx(Lj,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:hi.jsx("span",{style:MP,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?hi.jsx($j,{}):hi.jsx(Wj,{}),hi.jsx(Ej,{ref:f})]}),hi.jsx(Rj,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((n,r)=>[n&&n.id!==ZT&&hi.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:hi.jsx(Bj,{cell:n,changeSortOrder:t})}),Gj({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===u.size.y})&&hi.jsx(xq,{"data-testid":"group-divider",variant:"middle"})])}),hi.jsx(Vj,{tableWidth:o,leftGridWidth:r,overrideLeftGridWidth:n})]})},Yj=({layoutService:e,headersData:t,topRowIndex:n})=>e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y,Kj={display:"grid",width:"fit-content"},Xj=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:o,getHeaderCellsIconsVisibilityStatus:i,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=UT(),{gridSectionsData:{headersData:c}}=hO();return hi.jsxs("div",{"data-testid":"HEADER_GRID",style:{...Kj,gridTemplateColumns:n.map(e=>`${e}px`).join(" "),gridTemplateRows:c.data.map(()=>`${r}px`).join(" "),height:a},children:[c.size.y>1&&hi.jsx(zj,{columnSpan:c.size.x-1,rowSpan:c.size.y-1}),c.data.map((a,u)=>{let d=[];if(Yj({layoutService:l,headersData:c,topRowIndex:u})){const n=a.at(0);return Array.isArray(n)&&d.push(hi.jsx(Uj,{menuItems:n,changeSortOrder:o,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce((t,a,d)=>{if(a&&!Array.isArray(a)){const p=i(d,a.isLocked,a.label),f=l.isIndentModeEnabled&&1===c.size.x;t.push(hi.jsx(Fj,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&c.size.x>1?2:d+1,gridRow:u+1,zIndex:c.size.x-d},isLastRow:u===c.size.y-1,isFirstColumn:0===d,isLastColumn:d===c.size.x-1,changeSortOrder:o,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var Jj=y(Xj);const Zj=(e,t,n,r)=>{const{layoutService:o}=UT();g(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,n,r,o])},Qj=(e,t)=>{cq(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},eF=(e,t)=>{const{isLast:n,list:r,listValues:o}=t;return n?r[e]:o[e]},tF=(e,t,n,r,o)=>{if(o)return;const i=e.representation,a=xO({isLeftColumn:n,layoutService:t,representation:i}),s=n?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===$A.Image)return a&&l&&"center"!==l&&"rtl"===r?S_(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:n}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return tj(n,s,r)}const{textAlign:c}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return tj(c,s,r)},nF=()=>{},rF=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:o,isLastRow:i,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:c,index:u})=>{const{styleService:d,layoutService:p}=UT(),{interactions:f}=HT(),{direction:h}=WT(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:v,createPointerUpHandler:b}=A_(),{showLastBorder:y}=r,x=m(n)||n.isLockedByDimension,S=!(x||!f.active||!f.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||c),w=S?g(u,e=>eF(e,r)):void 0,C=S?v(u):void 0,E=S?b(u,e=>eF(e,r)):void 0,I=xO({isLeftColumn:s,layoutService:p,representation:n.representation});return hi.jsx("div",{className:kD,title:f.passive?n.representation.text:void 0,style:{...t,...qP(i,a,d.grid.border,h,y),...kP({bottomDivider:o&&s,rightDivider:o&&!s,borderColor:d.grid.divider}),...RP,padding:"rtl"===h?"0px 0px 0px 4px":"0px 4px",cursor:$_(S),background:__({styleService:d,isCellSelected:l,cell:n,isCellLocked:x}),zIndex:s?void 0:p.size.x-n.x,justifyContent:tF(n,p,s,h,I),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===h?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:nj(n,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:C,onPointerUp:E,onKeyUp:nF,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,children:e})},oF=e=>{e.stopPropagation()},iF=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:oF,color:DL.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),aF=({href:e,text:t,interactions:n,color:r})=>hi.jsx(Ou,{...iF({href:e,text:t,interactions:n,color:r}),children:t}),sF=Y();sF.use(U),sF.renderer.prio(["canvas"]);const lF=(e,t)=>e&&"center"!==e&&"rtl"===t?S_(e):e,cF=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r})=>{const{imageBox:o}=t,{styleService:{grid:{lineClamp:i}}}=UT(),{direction:a}=WT();return hi.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${o?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[hi.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:T_(e),alignItems:lF(r,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:o?.width??24,height:"100%"},children:hi.jsx(Q_,{representation:t,textStyle:n})}),hi.jsx(qj,{padding:4/(i<=2?2:1),alignSelf:T_(e,!0),children:!!t.labelStructure&&J_(t.labelStructure)})]})},uF=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,dF=({href:e,text:t,labelStructure:n,interactions:r,color:o})=>hi.jsxs("span",{children:[hi.jsx(Ou,{...iF({href:e,text:t,interactions:r,color:o}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&uF(n)]}),pF=({children:e,textStyle:t,shouldEnableStickyText:n})=>hi.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),fF=({isLeftColumn:e,styleService:t,cell:n,isIndentModeEnabled:r})=>e?r?t.grid.lineClamp:Math.max(t.grid.lineClamp,n.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,hF=({cell:e,isCellSelected:t,isLeftColumn:n})=>{const{direction:r}=WT(),{isActive:o}=A_(),{layoutService:i,styleService:a}=UT(),{env:s,interactions:l}=HT(),c=n&&i.isIndentModeEnabled;let u;if(u=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")&&e.isNull?i.getDimensionNullValueText():e.isNull?fP:n?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(e.isNull)return fP;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:o,suffix:i,delimeter:a}=n;return`${0!==o.length?o:r} ${i?a:""} ${i}`.trim()})(e):e.representation.text,e.isEmpty)return null;const d=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r,isIndentModeEnabled:o})=>({...MP,...AP(fF({cell:e,isLeftColumn:r,styleService:t,isIndentModeEnabled:o})),color:j_({cell:e,styleService:t,isCellSelected:n}),fontWeight:F_({cell:e,styleService:t}),fontStyle:z_({cell:e,styleService:t}),textDecoration:W_({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:n,isIndentModeEnabled:i.isIndentModeEnabled});if(e.representation.type===$A.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,o=n&&t&&t.suffix?cF:ej;return hi.jsx(o,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:d,isLeftColumn:n,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:tF(e,i,n,r)})}if(e.representation.type===$A.Link&&!o&&!e.isTotal&&!e.isNull){const t=n&&e.representation.labelStructure?dF:aF;u=hi.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:l,color:e.expressionColor.color})}return hi.jsx(pF,{shouldEnableStickyText:c,textStyle:{...d,...e.representation.type===$A.Image&&e.isNull?{alignSelf:T_(e)}:{}},children:u})},mF=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:o}=UT(),{isSelected:i}=A_(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:c,totalDividerIndex:u}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=yj([n]),f=eF(e,n),h=a?e===l-1:c,m=a?c:e===l-1,g=BN(f,u,o.isIndentModeEnabled);if(void 0===f){const{background:n}=r.dimensionValues;return hi.jsx(GN,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const v=i(f);return hi.jsxs(rF,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:v,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[hi.jsxs(UN,{verticalAlign:T_(f),width:YN(f.representation),right:f.isLeftColumn?void 0:4,isLeftColumn:a,children:[hi.jsx(B_,{isLeftColumn:a,isCellSelected:v,cell:f}),hi.jsx(hF,{isLeftColumn:a,isCellSelected:v,cell:f})]}),hi.jsx(wj,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?KA.Measures:KA.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var gF=n.memo(mF,AN);const vF=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>o=>{const i=n?e[o]:t.at(o);return i&&0===o&&i.x>0?(i.leafCount+i.x+i.distanceToNextCell)*r():!n&&i?(i.leafCount+i.distanceToNextCell)*r():r(i?.x??o)},bF=(e,t,n,r)=>{const o=Object.values(e);let i,a=o.length;return r&&(a=n,i=t/a),{itemCount:a,estimatedItemSize:i,listValues:o}},yF=(e,t)=>n=>{e.current&&(e.current[t]=n)},xF={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...LP},SF={overflow:"hidden",willChange:"auto",flexShrink:0},wF=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:o})=>{const{pageInfo:i,direction:a}=WT(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:c}}}=UT(),{qSize:u}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=hO();Qj(e,d),Zj(e,t,n,l);const f=i.rowsOnCurrentPage*l,h={...xF,borderColor:c,width:r.reduce((e,t)=>e+t,0)};return hi.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,c)=>{const h=c===d.columnCount-1,m=QT(p[c]),{itemCount:g,estimatedItemSize:v,listValues:b}=bF(t,f,i.rowsOnCurrentPage,h),y=s.isIndentModeEnabled?()=>l:((e,t,n,r,o)=>i=>{const a=r?e[i]:t.at(i);if(a&&0===i&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===o-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,b,l,h,u.qcy);return hi.jsx(DN,{ref:yF(e,c),style:{...SF,flexGrow:h?1:0,direction:a},height:n,width:r[c],itemCount:g,itemSize:y,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:o,listValues:b,totalDividerIndex:d.totalDividerIndex},itemKey:fj,estimatedItemSize:v,children:gF},m)})})};var CF=y(wF);const EF={overflow:"hidden",willChange:"auto"},IF=e=>({...LP,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),DF=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:o,getRightGridColumnWidth:i})=>{const{direction:a}=WT(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:c}}=UT(),{gridSectionsData:{headersData:u,topDimensionData:d}}=hO(),p={...IF(a),borderColor:l,height:r};Qj(e,d),Zj(e,n,r,c);const f=s.size.x*i();return 0===d.rowCount?hi.jsx("div",{style:{width:n,height:r,...IF(a)}}):hi.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map((r,l)=>{const c=l===d.rowCount-1,{itemCount:p,estimatedItemSize:h,listValues:m}=bF(r,f,s.size.x,c),g=(({layoutService:e,headersData:t,topRowIndex:n})=>{const r=t.data.at(n);if(void 0===r)return;const o=t.size.x-1,i=Yj({layoutService:e,headersData:t,topRowIndex:n})?0:o,a=r.at(i),s=Array.isArray(a)?a.at(o):a;return s?e.getDimensionInfo(s.dimensionInfoIndex):void 0})({layoutService:s,headersData:u,topRowIndex:l}),v=g?QT(g):`empty ${l}`;return hi.jsx(DN,{ref:yF(e,l),style:EF,height:t(),width:n,itemCount:p,itemSize:vF({list:r,listValues:m,isLastRow:c,getRightGridColumnWidth:i}),layout:"horizontal",itemData:{list:r,isLast:c,itemCount:p,showLastBorder:o,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:fj,estimatedItemSize:h,direction:a,children:gF},v)})})};var LF=y(DF);const RF=()=>hi.jsx(MF,{}),MF=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=UT(),n=HO(),r=(()=>{const{model:e}=HT(),t=u(async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:o,sortDirection:i}=t,a=[];if(n===i)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${o}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}},[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:o,topGridWrapperRef:i,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:c,dataGridRef:d},scrollDirectionRefs:{verticalScrollDirection:f,horizontalScrollDirection:h},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:v}}=VO(),{leftGridWidth:b,leftGridFullWidth:y,leftGridColumnWidths:x,rightGridFullWidth:S,showLastRightBorder:w,getRightGridColumnWidth:C,getHeaderCellsIconsVisibilityStatus:E,overrideLeftGridWidth:I}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:o}=UT(),{gridSectionsData:{headersData:i}}=hO(),{measureText:a}=oq(o.header,{allowLineBreaks:!1}),s=qO({tableWidth:e}),l=TO({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),c=s.leftGridWidth+l.rightGridFullWidth+1<e,d=u((e,t,n="")=>{let o=e;r.isIndentModeEnabled&&(o=1,1===i.size.x&&(o=0));const l=s.leftGridColumnWidths[o];let c=!1,u=!1,d=a(n)+vO;return t&&d+gO<=l&&(u=!0,d+=gO),d+gO<=l&&(c=!0),{shouldShowMenuIcon:c,shouldShowLockIcon:u}},[s.leftGridColumnWidths,a,r.isIndentModeEnabled,i.size.x]);return p(()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()},[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:c,getHeaderCellsIconsVisibilityStatus:d}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:v}),{gridScaffoldDimensions:D,headerGridDims:L,topGridDims:R,leftGridDims:M,dataGridDims:A,metadata:{everyThingFitsInTableRectHeight:P,scrollbarsVisibilityStatus:q}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:o},scrollBarsDimensions:{verticalScrollbarWidth:i,horizontalScrollbarHeight:a}})=>{const s=HO(),{pageInfo:l}=WT(),{gridSectionsData:{headersData:c,topDimensionData:u}}=hO(),d=Math.min(s.height*bO,Math.max(s.height*bO-25,s.height-t-a)),p=s.width*bO,f=l.rowsOnCurrentPage*t,h=Math.max(c.size.y,u.rowCount,1),m=e*h,g=e*h,v=Math.min(p,n),b=s.width-p,y=Math.max(b,s.width-v),x=Math.min(d,m,g),{availableHeight:S,everyThingFitsInTableRectHeight:w,everyThingFitsInTableRectWidth:C}=((e,t,n)=>{const r=t+1+n+i<=s.width,o=e+1+f+a,l=o-s.height<a||o<=s.height;return{availableHeight:l?o:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,v,y),E=S-d,I=Math.max(E,S-x),D=Math.min(I,f),L=Math.min(I,f),R=m+1+f,{visibilityStatus:M,metadata:{hasLeftGridOverflowX:A,hasDataGridOverflowX:P}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:o}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:i,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,c=s>r,u=i>t,d=a>n,p=l>o;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:c?"scroll":"hidden"},leftGrid:{overflowX:u?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:c,hasLeftGridOverflowX:u,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:v,rightSectionWidth:y},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:I}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:o},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:R-g}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${v}px ${y}px`,gridTemplateRows:`${x}px ${I}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:g},stickyWrapper:{width:y-1-i,height:-1},self:{width:Math.min(o,y)-(C?1:0)-i,height:g}},leftGridDims:{fullSizeWrapper:{width:v,height:R-g+(!A&&P?a:0)},stickyWrapper:{width:v,height:I-1-a},self:{width:v,height:Math.max(t,D-(w?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:R-g+(!P&&A?a:0)},stickyWrapper:{width:y-1-i,height:I-1-a},self:{width:Math.min(o,y)-(C?1:0)-i,height:Math.max(t,L-(w?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:w,scrollbarsVisibilityStatus:M}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:b,leftGridOriginalWidth:y,rightGridOriginalWidth:S},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),T=u(()=>e,[e]),k=u(()=>t,[t]),{env:O}=HT(),N=kf(FT),_=O.flags.isEnabled("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return p(()=>{if(_)return N({HEADER:o.current,TOP:i.current,LEFT:a.current,DATA:s.current}),()=>{N({HEADER:null,TOP:null,LEFT:null,DATA:null})}},[_,N,o,i,a,s]),(()=>{const{downloadService:e}=UT();p(()=>{e.notifyIsDoneRendering()})})(),hi.jsxs(GO,{style:D,children:[hi.jsx("div",{style:{overflow:"hidden"},ref:o,children:hi.jsx(Jj,{tableWidth:n.width,leftGridWidth:b,columnWidths:x,getHeaderCellsIconsVisibilityStatus:E,rowHight:e,height:L.height,changeSortOrder:r,overrideLeftGridWidth:I})}),hi.jsx(KO,{style:q.topGrid,origin:JA.TopGrid,ref:i,children:hi.jsx(BO,{style:R.fullSizeWrapper,children:hi.jsx(XO,{style:R.stickyWrapper,children:hi.jsx(LF,{topGridRef:l,rowHightCallback:T,...R.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:C})})})}),hi.jsx(KO,{style:q.leftGrid,origin:JA.LeftGrid,ref:a,children:hi.jsx(BO,{style:M.fullSizeWrapper,children:hi.jsx(XO,{style:M.stickyWrapper,children:hi.jsx(CF,{leftGridRef:c,...M.self,columnWidths:x,showLastBorder:{right:!1,bottom:P}})})})}),hi.jsx(KO,{style:q.dataGrid,origin:JA.DataGrid,ref:s,children:hi.jsx(BO,{style:A.fullSizeWrapper,children:hi.jsx(XO,{style:A.stickyWrapper,children:hi.jsx(vj,{dataGridRef:d,rowHightCallback:k,...A.self,showLastBorder:{right:w,bottom:P},getRightGridColumnWidth:C,verticalScrollDirection:f,horizontalScrollDirection:h})})})})]})},AF=()=>{const{keyboard:e,theme:t,interactions:n,translator:r,env:o}=HT(),{pageInfo:i,updatePageInfo:a,rect:s}=WT(),{layoutService:c}=UT(),{layout:u,hasData:d}=c,f=l(null),h=kf(FT),m=o.flags.isEnabled("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return p(()=>{if(m)return h({WRAPPER:f.current}),()=>{h({WRAPPER:null})}},[m,h]),hi.jsxs("div",{ref:f,children:[d?hi.jsx(RF,{}):null,hi.jsx(KT,{}),hi.jsx(TT,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{a({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:s,layout:u})]})};const PF=(e,{selections:t,baseObjects:r,coreServices:o,nebulaObjects:i},a)=>{const s=function(e){const t=Fp();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),ds({...t,direction:e})}(r.direction);e.render(hi.jsx(n.StrictMode,{children:hi.jsx(Lf,{store:a,children:hi.jsx(Ps,{theme:s,children:hi.jsx(BT,{...i,children:hi.jsx($T,{...r,children:hi.jsx(P_,{selections:t,children:hi.jsx(YT,{...o,children:hi.jsx(mO,{children:hi.jsx(AF,{})})})})})})})})}))};var qF=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider",e}(qF||{}),TF=function(e){return e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2",e}(TF||{}),kF=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(kF||{}),OF=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor",e}(OF||{});const NF=e=>e?`${parseInt(e,10)}px`:void 0,_F=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?EP.Transparent:n}},jF=(e,t)=>+(parseInt(e,10)*pP*t+8).toFixed(2),FF=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?uP:"normal",zF=e=>e?.some(e=>"italic"===e)?"italic":"normal",WF=e=>e?.some(e=>"underline"===e)?"underline":"none",$F=document.createElement("textarea");function VF(e){$F.value=e,document.body.appendChild($F),$F.select(),$F.setSelectionRange(0,$F.value.length),document.execCommand("copy"),document.body.removeChild($F)}$F.style.position="absolute",$F.style.left="-9999px",$F.setAttribute("readonly","");function HF(e){O?.((t,n)=>{const r=n.target,o=r?.closest(`.${kD}`);o?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch(()=>{VF(t)}):VF(t))})(o)}}),e?.forEach(e=>{e(t,n,o)})})}const BF=({model:e,layoutService:t,effectivePropertiesService:n,translator:r})=>GP((o,i,a)=>{if(!e||n.qAlwaysFullyExpanded)return;const s=e,l=o.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:c,label:u}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(a,t);l.addItem((e=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(XT,0,0,!0),await e.expandLeft(XT,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(s)),"string"==typeof c&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o})=>({icon:"lui-icon lui-icon--plus",translation:o.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:Nj({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:Tj.Expand})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:c,label:u,translator:r})),l.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(XT,0,0,!0),await e.collapseLeft(XT,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(s)),"string"==typeof c&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o})=>({icon:"lui-icon lui-icon--minus",translation:o.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:Nj({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:Tj.Collapse})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:c,label:u,translator:r}))},[e,t,n]),GF=(e,t)=>R(()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:n,snapshotData:r}=e,{qNoOfLeftDims:o,qEffectiveInterColumnSortOrder:i,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!r,c=r?.content?.rowsPerPage??15e3,u={x:Math.min(e.qHyperCube.qSize.qcx,dP),y:Math.min(e.qHyperCube.qSize.qcy,c)},d=i.slice(0,o),p=e=>d.some(t=>t===e),f=p(JT),h=new Map(i.map(e=>[s[e]??JT,e])),m=a.filter(e=>7005!==e.qError?.qErrorCode);return{layout:e,getNullValueText:()=>n?.text??fP,getDimensionNullValueText:()=>n?.dimensionText??fP,getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(f)return 0;const n=e%m.length;return t?n:a.findIndex(e=>e===m[n])},getDimensionInfo:e=>e===JT?void 0:s.at(e),getDimensionInfoIndex:e=>h.get(e)??-1,size:u,isSnapshot:l,hasLimitedData:!l&&u.x<e.qHyperCube.qSize.qcx,hasData:u.x>0&&u.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,hasPseudoDimOnLeft:f,leftDimensionInfoIndexes:d,isLeftDimension:p,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:m,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode),indentModeColumnWidth:e.qHyperCube.indentModeColumnWidth??{type:jD.Auto,pixels:_D.PixelsDefault,percentage:_D.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e}),[e,t]),UF=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:o})=>{const{layout:i,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=YP(e);return t.current=e,t})(lO(o));return eq(async()=>{const{qHyperCube:t}=i,{maxNumberOfVisibleRows:o,maxNumberOfVisibleColumns:c}=l.current;if(a)return i.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,o,c)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:o,qSize:i}}=e,{qTop:a,qWidth:s,qHeight:l}=o[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,i.qcx)||l<Math.min(n,i.qcy)})(i,r,o,c))){const t=((e,t,n,r,o,i)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(dP,n.qcx);if(n.qcy<a)return null;let c=0,u=a;if(e){c=t.gridColumnStartIndex,u=a+t.gridRowStartIndex;const e=u+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(u=Math.max(0,s-o)),n>l&&(c=Math.max(0,l-i))}return{qLeft:c,qTop:u,qWidth:Math.min(l-c,i),qHeight:Math.min(s-u,o)}})(s,n,i.qHyperCube.qSize,r,o,c);return t?e.getHyperCubePivotData(XT,cO(t)):[]}return t.qPivotDataPages},[i,a,e,n,r.page,r.rowsPerPage,l,s])},YF=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),KF=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:YF({rowsPerPage:n,totalRowCount:e,page:t})}),XF=15,JF=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:o})=>{const{freeResize:i}=M();return N(async e=>{const i=e;if(!i.snapshotData||!r||i.snapshotData.content)return i;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,c=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-XF,0),c=Math.max(s+o-XF,s,0),u=dP-l,d=s+t.rowsOnCurrentPage-c;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=lO(n);return{qLeft:l,qTop:c,qWidth:Math.min(u,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:c,qWidth:Math.min(u,i+30),qHeight:Math.min(d,a+30)}})(t,o,n),u=cO(c),d={qLeft:0,qTop:o.page*o.rowsPerPage,qWidth:1,qHeight:1};i.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(XT,[d,...u]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:o.page,rowsPerPage:o.rowsPerPage},i.snapshotData.object.size.w=n.width,i.snapshotData.object.size.h=n.height}return i}),_(()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,o)}),[t]),e.layout.snapshotData?.content&&!i?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n};var ZF={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const QF=()=>{const e=j(),t=e.language();return R(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(ZF).forEach(t=>{e.add(ZF[t])})}(e)},[e]),{translator:e,language:t}},ez=e=>{const t=R(()=>Ef(),[]),{flags:n}=e,r=F(),o=(e=>{const t=R(()=>sq.createRoot(e),[e]);return q(()=>()=>{t.unmount()},[t]),t})(r),i=z(),a=W(),s=$(),l=V(),c=H(),u=(()=>{const{viewState:e}=M(),t=YP(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:o}=R(()=>BP(),[]),i=GP(e=>{t.current.add(e)},[t]),a=GP(uM(async()=>{await Promise.all(t.current),t.current.clear(),o()},1e3),[o,t]);return A(async()=>{await r},[r]),R(()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:i}),[a,n,e,i])})(),d=((e,t)=>{const[n]=eq(async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}},[e,t]);return R(()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[n])})(a,i),p=GF(i,n),f=(e=>{const t=k();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(p.isSnapshot),h=B(),m=QP(i,r),{translator:g,language:v}=QF(),{pageInfo:b,updatePageInfo:y}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,o=t.isDownloadedAsPDForImage||e.isSnapshot,i=(e=>e.layout.snapshotData?.content?.rowsPerPage)(e),[a,s]=P(()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:e.isSnapshot?e.layout.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!o,...KF(r.qcy,a,i)}}),l=e.layout.qHyperCube.qSize.qcy;return q(()=>{s(t=>({...t,...KF(l,t.page,i),shouldShowPagination:l>e.size.y&&!o}))},[l,e.size.y,s,o,i]),q(()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=YF({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}},[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:YF({...a,...e})})}}})(p,u),x=((e,t,n)=>R(()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData),[n,e.page,t.snapshotData]))(b,i,u),S=JF({rect:G(),layoutService:p,viewService:x,model:a,pageInfo:b}),[w,C]=UF({model:a,layoutService:p,viewService:x,pageInfo:b,rect:S}),E=R(()=>((e,t,n)=>{const r=n.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),o=t.layout.components?.find(e=>"theme"===e.key),i=o?.header,a=o?.dimensionValues,s=o?.measureValues,l=o?.measureLabels,c=o?.totalValues,u=o?.nullValues,d=(r?o?.dimensionNullValues:void 0)??u,p=o?.grid,f=(t,n,r)=>e.getStyle(t,n,r),h=+(p?.[qF.LineClamp]??f(TF.Grid,kF.Grid,OF.LineClamp)??1),m=+(p?.[qF.ColumnLineClamp]??f(TF.Grid,kF.Grid,OF.ColumnLineClamp)??1),g=_F(e,i?.[qF.Background])??f(TF.Dimension,kF.LabelName,OF.BackgroundColor)??EP.Transparent,v={header:{fontSize:NF(i?.[qF.FontSize])??f(TF.Dimension,kF.LabelName,OF.FontSize)??lP,fontFamily:i?.[qF.FontFamily]??f(TF.Dimension,kF.LabelName,OF.FontFamily)??cP,fontWeight:FF(i?.[qF.FontStyle],uP),fontStyle:zF(i?.[qF.FontStyle]),textDecoration:WF(i?.[qF.FontStyle]),color:_F(e,i?.[qF.FontColor])??f(TF.Dimension,kF.LabelName,OF.FontColor)??DL.TEXT,background:g,hoverBackground:xM(g,FD),activeBackground:xM(g,zD)},dimensionValues:{fontSize:NF(a?.[qF.FontSize])??f(TF.Dimension,kF.LabelValue,OF.FontSize)??lP,fontFamily:a?.[qF.FontFamily]??f(TF.Dimension,kF.LabelValue,OF.FontFamily)??cP,fontWeight:FF(a?.[qF.FontStyle],void 0),fontStyle:zF(a?.[qF.FontStyle]),textDecoration:WF(a?.[qF.FontStyle]),color:_F(e,a?.[qF.FontColor])??f(TF.Dimension,kF.LabelValue,OF.FontColor)??DL.TEXT,background:_F(e,a?.[qF.Background])??f(TF.Dimension,kF.LabelValue,OF.BackgroundColor)??EP.Transparent},measureValues:{fontSize:NF(s?.[qF.FontSize])??f(TF.Measure,kF.LabelValue,OF.FontSize)??lP,fontFamily:s?.[qF.FontFamily]??f(TF.Measure,kF.LabelValue,OF.FontFamily)??cP,fontWeight:FF(s?.[qF.FontStyle],"normal"),fontStyle:zF(s?.[qF.FontStyle]),textDecoration:WF(s?.[qF.FontStyle]),color:_F(e,s?.[qF.FontColor])??f(TF.Measure,kF.LabelValue,OF.FontColor)??EP.FontSecondary,background:_F(e,s?.[qF.Background])??f(TF.Measure,kF.LabelValue,OF.BackgroundColor)??EP.Transparent},measureLabels:{fontWeight:FF(l?.[qF.FontStyle],"normal"),fontStyle:zF(l?.[qF.FontStyle]),textDecoration:WF(l?.[qF.FontStyle]),color:_F(e,l?.[qF.FontColor])??f(TF.Measure,kF.LabelName,OF.FontColor)??EP.FontSecondary,background:_F(e,l?.[qF.Background])??f(TF.Measure,kF.LabelName,OF.BackgroundColor)??EP.Transparent},totalValues:{fontWeight:FF(c?.[qF.FontStyle],uP),fontStyle:zF(c?.[qF.FontStyle]),textDecoration:WF(c?.[qF.FontStyle]),color:_F(e,c?.[qF.FontColor])??f(TF.Total,kF.LabelValue,OF.FontColor)??DL.TEXT,background:_F(e,c?.[qF.Background])??f(TF.Total,kF.LabelValue,OF.BackgroundColor)??EP.Transparent},dimensionNull:{fontWeight:FF(d?.[qF.FontStyle],"normal"),fontStyle:zF(d?.[qF.FontStyle]),textDecoration:WF(d?.[qF.FontStyle]),color:_F(e,d?.[qF.FontColor])??f(TF.Null,kF.LabelValue,OF.FontColor)??DL.TEXT,background:_F(e,d?.[qF.Background])??f(TF.Null,kF.LabelValue,OF.BackgroundColor)??EP.NullValueBackground},nullValues:{fontWeight:FF(u?.[qF.FontStyle],"normal"),fontStyle:zF(u?.[qF.FontStyle]),textDecoration:WF(u?.[qF.FontStyle]),color:_F(e,u?.[qF.FontColor])??f(TF.Null,kF.LabelValue,OF.FontColor)??DL.TEXT,background:_F(e,u?.[qF.Background])??f(TF.Null,kF.LabelValue,OF.BackgroundColor)??EP.NullValueBackground},grid:{columnLineClamp:m,lineClamp:h,border:_F(e,p?.[qF.Border])??f(TF.Grid,kF.Grid,OF.BorderColor)??EP.DividerLight,divider:_F(e,p?.[qF.Divider])??f(TF.Grid,kF.Divider,OF.BorderColor)??EP.DividerDark,background:_F(e,p?.[qF.Background])??f(TF.Grid,kF.Grid,OF.BackgroundColor)??EP.Transparent},selectedColors:yM(e)};return v.headerCellHeight=Math.max(jF(v.header.fontSize,m),jF(v.dimensionValues.fontSize,m),32),v.contentCellHeight=Math.max(jF(v.measureValues.fontSize,h),jF(v.dimensionValues.fontSize,h),24),v.dimensionValueTextHeight=jF(v.dimensionValues.fontSize,1),v})(m,p,n),[m,p,n]),I=((e,t,n)=>{const[,r,o]=eq(async()=>{const t=rR(n.flags),r=e.getStyle("","","fontFamily"),o=e.getStyle("object","label.name","fontFamily"),i=e.getStyle("object","label.value","fontFamily"),a=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...a,r,o,i,lq].filter(e=>void 0!==e).map(async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)}))},[t,e,n]);return o?(console.warn("Failed to load fonts:",o),!0):!r})(m,i,e),{direction:D}=M();HF([BF({model:a,layoutService:p,effectivePropertiesService:d,translator:g})]),q(()=>{!C&&a&&!!w&&I&&PF(o,{selections:h,baseObjects:{rect:S,pageInfo:b,qPivotDataPages:w,updatePageInfo:y,direction:D},nebulaObjects:{env:e,app:s,model:a,embed:l,theme:m,keyboard:c,translator:g,interactions:f},coreServices:{styleService:E,viewService:x,layoutService:p,downloadService:u,effectivePropertiesService:d}},t)},[a,s,S,f,h,x,p,u,C,w,E,o,I,g,v,b,y,d,l,c,m,e,D,t])},tz={version:"7.41.0",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]},nz=()=>({...tz,qHyperCubeDef:{...tz.qHyperCubeDef,qIndentMode:!1}})}}});
|
|
90
|
+
e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,p=e.length,f=e.search(/[0-9\-\+#]/),h=f>0?e.substring(0,f):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),v=p-g,b=e.substring(v,v+1),y=v+("."===b||","===b?1:0),x=g>0?e.substring(y,p):"";if(n=(t="-"===(e=e.substring(f,y)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.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],l=u[1]&&u[u.length-1].length){for(m="",v=(d=t[0]).length%l,p=d.length,y=0;y<p;y++)m+=d.charAt(y),!((y-v+1)%l)&&y<p-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+x}},aM({exports:{}});const bM=(e,t=DL.TEXT,n=DL.WHITE)=>{const r=zL(e??""),o=zL(t),i=zL(n);return r.isInvalid()?t:function(e,t,n){const r=WL(e,t),o=WL(e,n);if(void 0!==r&&void 0!==o)return r>o?t:n}(r,i,o).getRGB()},yM=e=>{const t=e.getStyle("","","dataColors.selected")||DL.SELECTED,n=function(e,t){const n=zL($L),r=zL(e),o=zL(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=WL(n,r),a=WL(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?$L:"#000000"}(t,DL.TEXT);return{background:t,color:n}},xM=(e,t)=>{const n=zL(e);return 0===n.a?(n.setAlpha(t.opacity),n.getString()):n.isDark()?n.getBrightenedColor(t.brighter).getString():n.getDarkenedColor(t.darker).getString()},SM=e=>{const t=zL(e);return t.isInvalid()?null:1===t.a?t.getRGB():t.getRGBA()},wM=e=>{e.stopPropagation(),e.preventDefault()},CM=e=>{(e instanceof HTMLElement||e instanceof SVGElement)&&e.focus()},EM=e=>"svg"===e.tagName?"exploration-draggable-icon":e.className,IM=e=>{const{currentTarget:t}=e,n=EM(t);let r=t.closest("li")?.previousElementSibling?.getElementsByClassName(n)[0];if(!r){const e=t.closest(".exploration-list"),o=e?.querySelector(".exploration-section-header");if(o)return o;if(r=((e,t)=>{const n=e.closest(".exploration-list"),r=n?.previousElementSibling;if(null===r||!r)return e.closest(".exploration-panel")?.getElementsByClassName(t)[1];const o=r.getElementsByClassName(t);return o.length>0?o[o.length-1]:void 0})(t,n),!r){const e=t.closest(".exploration-panel")?.getElementsByClassName(n)[1];return e??null}}return r},DM=(e,t)=>{const n=e.closest(".exploration-list"),r=n?.nextElementSibling||n?.parentElement?.nextElementSibling;if(null===r||!r){if(t===OD.Tab)return;return n?.closest(".exploration-panel")?.getElementsByClassName("exploration-section-header")[0]}return r.getElementsByClassName("exploration-section-header")[0]},LM=e=>{const{currentTarget:t}=e;if("true"===t.getAttribute("data-dragging"))return!0;const n=t.closest(".exploration-panel");if(!n)return!1;const r=n.getElementsByClassName("section-item-container");return Array.from(r).some(e=>"true"===e.getAttribute("data-dragging"))},RM=(e,t)=>{const{key:n,currentTarget:r}=e;if(r===t.current&&n===OD.Tab)if(e.preventDefault(),e.shiftKey)((e,t)=>{const{currentTarget:n}=e;if(n!==t.current)return;const r=n.closest('[role="region"]')?.getElementsByTagName("button")[0];r&&CM(r)})(e,t);else{const e=r.parentElement?.getElementsByClassName("exploration-section-header")[0];e&&CM(e)}},MM=(e,t)=>{const{key:n}=e;switch(n){case OD.Tab:e.shiftKey?((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=t.sectionIndex??2;if(0===r)return;const o=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[r-1],i=o?.getElementsByClassName("exploration-item-focus").length??0;if(i>0){const t=o?.getElementsByClassName("exploration-draggable-icon")[i-1];t&&(wM(e),CM(t))}})(e,t):(wM(e),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-list"),o=r?.getElementsByClassName("exploration-item-focus")[0];if(!o){const e=n.closest(".exploration-panel")?.getElementsByClassName("exploration-list")[2].getElementsByClassName("exploration-section-header")[0];return void(e&&CM(e))}CM(o)})(e,t));break;case OD.Down:if(LM(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a+1<o?r?.getElementsByClassName("exploration-section-header")[a+1]:r?.getElementsByClassName("exploration-section-header")[0],i&&CM(i)})(e,t);break;case OD.Up:if(LM(e))break;e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(n!==t.ref.current)return;const r=n.closest(".exploration-panel"),o=r?.getElementsByClassName("exploration-section-header").length??0;let i;if(0===o)return;const a=t.sectionIndex??2;i=a-1>=0?r?.getElementsByClassName("exploration-section-header")[a-1]:r?.getElementsByClassName("exploration-section-header")[o-1],i&&CM(i)})(e,t);break;case OD.Enter:case OD.Space:e.preventDefault(),((e,t)=>{const{currentTarget:n}=e;if(e.preventDefault(),n!==t.ref.current)return;const r="all"!==t.checkState;t.toggleAllCheckboxes(r)})(e,t)}},AM=({children:e})=>hi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",fontWeight:"bold"},children:e}),PM=({children:e,sectionIndex:t})=>{const r=Tf(void 0!==t?nL(t):SL),o=kf(void 0!==t?rL(t):wL),i=n.useRef(null),a={ref:i,toggleAllCheckboxes:o,checkState:r,sectionIndex:t};return hi.jsxs(mc,{ref:i,className:"exploration-section-header",tabIndex:0,onKeyDown:e=>{MM(e,a)},sx:{display:"flex",alignItems:"center",width:"100%",padding:"2px 8px 2px 8px",boxSizing:"border-box",fontSize:"14px","&:focus-visible":{boxShadow:`0 0 0 2px ${lL} inset`}},children:[hi.jsx(Wc,{disabled:"disabled"===r,checked:"all"===r,indeterminate:"some"===r,onChange:e=>{o(e.target.checked)},size:"small",style:{flexShrink:0,padding:9}}),hi.jsx(AM,{children:e})]})},qM=({sectionIndex:e})=>{const t=Tf(QD(e));return hi.jsx(PM,{sectionIndex:e,children:t})},TM=x((e,t)=>hi.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:hi.jsx("path",{d:"M5.5 1a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zm0 4a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM5 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 1.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zM9.5 5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5zM9 9.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-1a.5.5 0 0 1-.5-.5zm.5 3.5a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z"})})),kM=Ms("div")({position:"absolute",width:"1px",height:"1px",padding:0,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}),OM=Ms(TM)(()=>({padding:"6px 6px",flexShrink:0,cursor:"grab","&:focus-visible":{boxShadow:`0 0 0 2px ${lL} inset`}})),NM=e=>{const t=e.key===OD.Down?(e=>{const{currentTarget:t,key:n}=e,r=EM(t),o=t.closest("li");let i=o?.nextElementSibling?.getElementsByClassName(r)[0];return i||(i=DM(t,n),i)?i:t.closest(".exploration-panel")?.getElementsByClassName(r)[0]})(e):IM(e);t&&CM(t)},_M=(e,t)=>{const{currentTarget:n}=e;if(n===t.items.draggableIconRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-item")[0];return void(e&&CM(e))}if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return void CM(e)}n===t.items.explorationItemFocusRef.current&&t.toggleCheckedById(t.id)},jM=(e,t)=>{const{key:n}=e;switch(n){case OD.Tab:if(e.shiftKey)wM(e),((e,t)=>{const{currentTarget:n}=e,r=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if(n===t.items.draggableIconRef.current){if(t.itemIndex>=0){const e=r&&r[t.itemIndex];return void(e&&CM(e))}const n=IM(e);n&&CM(n)}if(n===t.items.explorationItemFocusRef.current){const t=n.closest("li")?.previousElementSibling?.getElementsByClassName("exploration-draggable-icon")[0];if(t)return void CM(t);const r=IM(e);r&&CM(r)}})(e,t);else{const n=((e,t)=>{const{currentTarget:n,key:r}=e;if(e.shiftKey)return!0;if(n===t.items.explorationItemRef.current){const e=n.getElementsByClassName("exploration-draggable-icon")[0];return CM(e),!0}if(n===t.items.explorationItemFocusRef.current){const e=n.closest("li")?.getElementsByClassName("exploration-draggable-icon")[0];return e&&CM(e),!0}if(n===t.items.draggableIconRef.current){const e=n.closest("ul")?.getElementsByClassName("exploration-item-focus");if((e?.length||0)-1>t.itemIndex){const n=e&&e[t.itemIndex+1];return n&&CM(n),!0}const o=DM(n,r);if(!o)return!1;CM(o)}return!0})(e,t);n?wM(e):e.stopPropagation()}break;case OD.Down:case OD.Up:if(LM(e))break;wM(e),NM(e);break;case OD.Enter:if(e.currentTarget===t.items.explorationItemRef.current&&t.dragHandleRef){t.dragHandleRef(e.currentTarget);break}wM(e),_M(e,t);break;case OD.Space:wM(e),_M(e,t)}},FM=({children:e})=>hi.jsx("span",{style:{width:"fit-content",maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flexGrow:1},children:e}),zM=({title:e,dragHandleRef:t,...r})=>{const[o,i]=Of(wh),a=Tf(Jf),s=n.useRef(null),l=n.useRef(null),c=n.useRef(null),u={id:r.id,itemIndex:r.itemIndex,toggleCheckedById:i,items:{explorationItemRef:s,explorationItemFocusRef:l,draggableIconRef:c},dragHandleRef:t};return n.useEffect(()=>{t&&s.current&&t(s.current)},[t]),hi.jsxs(mc,{ref:s,className:"exploration-item",onClick:e=>{e.stopPropagation(),i(r.id)},onKeyDown:e=>{jM(e,u)},tabIndex:0,style:{display:"flex",alignItems:"center",width:"100%",cursor:"pointer",padding:0,boxSizing:"border-box",fontSize:"14px"},title:e,sx:{"&:hover":{backgroundColor:"action.hover"},"&:focus-visible":{boxShadow:`0 0 0 2px ${lL} inset`}},children:[hi.jsxs(mc,{ref:l,className:"exploration-item-focus",component:"div",tabIndex:0,onKeyDownCapture:e=>{jM(e,u)},sx:{display:"flex",minWidth:0,alignItems:"center",justifyContent:"space-between",flexGrow:1,marginRight:"4px","&:focus-visible":{boxShadow:`0 0 0 2px ${lL} inset`}},children:[hi.jsx(Wc,{checked:-1!==r.id&&o.has(r.id),"aria-label":a("ChartExploration.ListItem.Label",e),size:"small",tabIndex:-1,style:{padding:9,flexShrink:0,visibility:-1===r.id?"hidden":"visible"}}),hi.jsx(FM,{children:e})]}),hi.jsx(OM,{ref:c,className:"exploration-draggable-icon",tabIndex:0,height:"16px",onClick:e=>{e.stopPropagation()},onKeyDownCapture:e=>{jM(e,u)}})]})},WM=e=>{const t=Tf(ZD(e))??"";return hi.jsx(zM,{title:t,...e})},$M=()=>{const e=Tf(eL),t=Tf(tL),n=Tf(fL),r=kf(oL);return hi.jsx(PD,{numberOfSections:2,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:mL,headerRenderer:qM,itemRenderer:WM})},VM=({itemIndex:e})=>{const t=Tf(bL(e));return hi.jsx(hL,{children:t})},HM=()=>{const e=Tf(Jf);return hi.jsx(PM,{children:e("Common.Values")})},BM=e=>{const{itemIndex:t}=e,n=Tf(bL(t));return hi.jsx(zM,{title:n,...e})},GM=()=>{const e=Tf(yL),t=Tf(xL),n=Tf(pL),r=kf(CL);return hi.jsx(mc,{className:"exploration-header-section",style:{height:"100%",display:"flex",flexDirection:"column-reverse"},children:hi.jsx(PD,{numberOfSections:1,numberOfItemsInSection:t,keyExtractor:e,emptyTexts:n,onDragEnd:r,dragOverlayRenderer:VM,headerRenderer:HM,itemRenderer:BM})})},UM=x((e,t)=>hi.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:hi.jsx("path",{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014zM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0m-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6 6 0 0 1-1.413 1.415"})})),YM=()=>{const[e,t]=Of(Zf),r=Tf(Jf),o=n.useRef(null),[i]=Tf(xL),[a=0,s=0]=Tf(tL),l=u(e=>{t(e.target.value)},[t]),c=0===e.length||0===a&&0===s&&0===i?r("Common.Search.NoResultsAvailable"):r("ChartExploration.Pivot.Search.ResultsFound",a.toString(),s.toString(),i.toString());return hi.jsxs(mc,{ref:o,onKeyDown:e=>{RM(e,o)},style:{position:"sticky",top:0,zIndex:1,width:"calc(100% - 24px)",backgroundColor:"var(--sprout-common-background-color-weak)",paddingTop:2,paddingRight:12,paddingLeft:12,paddingBottom:12},children:[hi.jsx(kM,{"data-testid":"screenOnly-search-results","aria-live":"polite","aria-atomic":"true",children:c}),hi.jsx(Zd,{size:"small",fullWidth:!0,"data-testid":"chart-exploration-search-input","aria-label":r("Common.Search.AccessibilityLabel"),type:"search",defaultValue:e,placeholder:r("Common.Search"),onChange:l,startAdornment:hi.jsx(Ru,{position:"start",children:hi.jsx(UM,{})}),inputProps:{style:{fontSize:"14px",paddingTop:6,paddingBottom:6}}})]})},KM=e=>{const t=Fp();return hi.jsx(Ps,{theme:t,children:hi.jsx(Lf,{children:hi.jsx(Ch,{props:e,children:hi.jsxs(mc,{className:"exploration-panel",style:{display:"flex",flexDirection:"column"},children:[hi.jsx(YM,{}),hi.jsx($M,{}),hi.jsx(GM,{})]})})})})},XM=e=>{if(e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{component:KM,classification:{tags:["exploration"],exclusive:!0}}};var JM=function(e){return e.CONTAINS="contains",e.MATCHES_EXACTLY="matches_exactly",e.STARTS_WITH="starts_with",e.ENDS_WITH="ends_with",e.BEGINNING_OF_WORD="beginning_of_word",e}(JM||{}),ZM=function(e){return e.COMPARE="compare",e.GENERAL="general",e}(ZM||{}),QM=function(e){return e.VALUES="values",e.CONDITION="condition",e.SEARCH="search",e.CLEAR_SELECTION="clear_selection",e.TOP_BOTTOM="top_bottom",e}(QM||{}),eA=function(e){return e.FIXED_VALUE="fixed_value",e.CALCULATED_VALUE="calculated_value",e}(eA||{});const tA=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||(e=>{if(!e)return!1;if("["===e[0]&&"]"===e[e.length-1]){let t=e.substring(1,e.length-1);if(/^[A-Za-z][A-Za-z0-9_]*$/.test(t))return!0;if(t=t.replace(/\]\]/g,"]"),e===`[${t.replace(/\]/g,"]]")}]`)return!0}return!1})(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,nA=e=>{if(!Array.isArray(e))return"";let t="{<";const n=[];if(e.forEach(e=>{let t,r=`[${e.field}]${e.exclude?"-":""}={`,o="}";switch(e.type){case QM.SEARCH:t=(e=>{let t="",n="";const r=e.options?.mode;if(!r)return"";switch(r){case JM.BEGINNING_OF_WORD:t="*^",n="*";break;case JM.ENDS_WITH:t="*";break;case JM.STARTS_WITH:n="*";break;case JM.MATCHES_EXACTLY:break;case JM.CONTAINS:default:t="*",n="*"}const o=e.options.values?.[0]??"";return""!==o?`"${t}${o}${n}"`:""})(e);break;case QM.CONDITION:t=(e=>{const{options:t}=e,n=t?.mode===ZM.GENERAL,r=t?.modifier?.type===eA.FIXED_VALUE,o=t?.modifier?.operator?t.modifier.operator.split(" "):[];if(0===o.length||!r&&(!t.firstValue?.aggregator||!t.firstValue?.field)||r&&!t.firstValue?.fixedValue||n&&(!t.conditionField?.aggregator||!t.conditionField?.field))return"";let i,a,s="=";n&&r?(i=`${t.conditionField?.aggregator}(${tA(t.conditionField?.field)})`,a=`${t.firstValue?.fixedValue}`):!n&&r?(i="",a=`${t.firstValue?.fixedValue}`,s=""):n||r?(i=`${t.conditionField?.aggregator}(${tA(t.conditionField?.field)})`,a=`${t.firstValue?.aggregator}(${tA(t.firstValue?.field)})`):(i=`${tA(e.field)}`,a=`${t.firstValue?.aggregator}(total ${tA(t.firstValue?.field)})`);const l=`${s}${i}${o[0]}${a}`;let c="";if(o.length>1){if(!r&&(!t.secondValue?.aggregator||!t.secondValue?.field)||r&&!t.secondValue?.fixedValue)return"";let e,a;n&&r?(e=`${t.secondValue?.fixedValue}`,a=` and ${i}`):!n&&r?(e=`${t.secondValue?.fixedValue}`,a=""):n||r?(e=`${t.secondValue?.aggregator}(${tA(t.secondValue?.field)})`,a=` and ${i}`):(e=`${t.secondValue?.aggregator}(total ${tA(t.secondValue?.field)})`,a=` and ${i}`),c=`${a}${o[1]}${e}`}return`"${l}${c}"`})(e);break;case QM.CLEAR_SELECTION:t=`[${e.field}]=`,r="",o="";break;case QM.VALUES:default:t=e.options?.values?e.options.values.map(e=>`'${e.replace(/'/g,"''")}'`).join(","):""}""!==t&&n.push(`${r}${t}${o}`)}),0===n.length)return;return t+=`${n.join(",")}>}`,t},rA=[];for(let e=0;e<256;++e)rA.push((e+256).toString(16).slice(1));const oA=new Uint8Array(16);function iA(e,t,n){return crypto.randomUUID?crypto.randomUUID():function(e){e=e||{};const t=e.random??e.rng?.()??crypto.getRandomValues(oA);if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(e,t=0){return(rA[e[t+0]]+rA[e[t+1]]+rA[e[t+2]]+rA[e[t+3]]+"-"+rA[e[t+4]]+rA[e[t+5]]+"-"+rA[e[t+6]]+rA[e[t+7]]+"-"+rA[e[t+8]]+rA[e[t+9]]+"-"+rA[e[t+10]]+rA[e[t+11]]+rA[e[t+12]]+rA[e[t+13]]+rA[e[t+14]]+rA[e[t+15]]).toLowerCase()}(t)}(e)}const aA=()=>crypto?.randomUUID?.()??iA(),sA=1e3,lA=1e3,cA=e=>{if(0===e.qInterColumnSortOrder.length)return;const t=e.qDimensions,n=((e,t)=>{const n=new Set;for(const t of e){if(n.has(t))return!0;n.add(t)}const r=e.includes(-1),o=e.filter(e=>-1!==e);if(t){const n=r?t.length+1:t.length;if(e.length!==n)return!0}const i=[...o].sort((e,t)=>e-t);for(let e=0;e<i.length;e++)if(i[e]!==e)return!0;return!1})(e.qInterColumnSortOrder,t);n&&(e.qInterColumnSortOrder=((e,t)=>{const n=[];if(t)for(let e=0;e<t.length;e++)n.push(e);return e.qMeasures.length>=2&&n.push(-1),n})(e,t))},uA=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]},dA=e=>{if(!e)return;cA(e);const t=e.qDimensions,{qInterColumnSortOrder:n}=e;((e,t=[])=>{const n=t.filter(e=>-1!==e);for(let r=0;r<n.length;r++)if(-1!==n[r]&&n[r]!==r){const o=n[r],i=n.indexOf(r),a=n[i];uA(n,r,i),uA(e,r,i),uA(t,t.indexOf(o),t.indexOf(a))}})(t,n)},pA=L;class fA extends pA{#c;#u;#d;constructor(e,t){super(e),this.path=e.path,this.#c=t.translator,this.#u=t.flags.isEnabled,this.#d=(e,n,r)=>{const o=`[sn-pivot-table][PivotHyperCubeHandler] ${n}`;t.anything.logInfo?.(o,r),"error"===e?console.error(o,r):console.warn(o,r)}}async#p(e,t,n,r,o=!1){if(!e||this.#f(e))return;const i=t??!1;if(e.qDef.cId||(e.qDef.cId=aA()),r)return this.addAlternativeDimension(e,i,n);if(this.getDimensions().length<this.maxDimensions()){const t=await(async(e,t,n,r,o=!1)=>{const i=e.getDimensions(),a=e.hcProperties.qNoOfLeftDims;return o||await e.autoSortDimension(t),dA(e.hcProperties),(-1===a||Number.isNaN(+a))&&(e.hcProperties.qNoOfLeftDims=i.length),n?((e,t,n,r)=>{if(!e)return;const{qInterColumnSortOrder:o,qNoOfLeftDims:i}=e,a=t.length,s=o.indexOf(-1),l=-1!==s,c=void 0!==r?r+(i||0):void 0;if(l&&void 0!==c&&s>=c?((e,t,n)=>{t.splice(n,1),t.push(e),t.splice(n+1,0,-1)})(a,o,s):o.push(a),void 0===r)t.push(n);else if(void 0!==c){const e=l&&c>s?c-1:c;t.splice(e,0,n)}})(e.hcProperties,i,t,r):((e,t,n,r)=>{if(!e||"number"!=typeof e.qNoOfLeftDims)return;const o=e.qNoOfLeftDims,{qInterColumnSortOrder:i}=e,a=t.length,s=i.indexOf(-1),l=-1!==s&&o>0&&s<o;if(i.push(a),l)void 0===r?t.splice(o-1,0,n):s<r?t.splice(r-1,0,n):(t.splice(r,0,n),i.splice(s,1),i.splice(s+1,0,-1));else{const e=r??o;t.splice(e,0,n),-1!==s&&(i.splice(s,1),i.splice(s+1,0,-1))}e.qNoOfLeftDims++})(e.hcProperties,i,t,r),t})(this,e,i,n,o);return this.#h({section:i?"columns":"rows",cId:e.qDef.cId,addLast:void 0===n}),t}}async addDimension(e,t,n,r){return this.#p(e,t,n,r)}async addDimensions(e,t,n){const r=[];for(const o of e){const e=await this.addDimension(o,n,void 0,t);e&&r.push(e)}return r}addAlternativeDimension(e,t,n){if(!e||this.#f(e))return;const r=this.getAlternativeDimensions();void 0===this.hcProperties.excludedNoOfLeftDims&&(this.hcProperties.excludedNoOfLeftDims=r.length);let o=n;return o=void 0===o?t?r.length:this.hcProperties.excludedNoOfLeftDims:t?this.hcProperties.excludedNoOfLeftDims+o:Math.min(o,this.hcProperties.excludedNoOfLeftDims),r.splice(o,0,e),t||this.hcProperties.excludedNoOfLeftDims++,this.#h({section:t?"columns":"rows",cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),e}async addFieldDimension(e,t,n,r={}){const o=this.createFieldDimension(e,t,n);return this.addDimension(o,r.asColumn,void 0,!1)}async addFieldDimensions(e,t={}){const n=e.map(e=>this.createFieldDimension(e.field,e.label,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}async addLibraryDimensions(e,t={}){const n=e.map(e=>this.createLibraryDimension(e.id,e.defaults));return this.addDimensions(n,void 0,t.asColumn)}reinsertDimension(e,t,n){e.qDef.cId||(e.qDef.cId=aA());if(this.getDimensions().length<this.maxDimensions())return this.addDimension(e,t,n);return this.reinsertAlternativeDimension(e,n,t)}reinsertAlternativeDimension(e,t,n){const r=this.getDimensions(),o=this.getAlternativeDimensions();if(r.length>=sA)return Promise.resolve();const i="number"==typeof t?t:o.length;return o.splice(i,0,e),this.#h({section:n?"columns":"rows",cId:e.qDef.cId,alternative:!0}),Promise.resolve(e)}async removeDimensions(e,t,n){return Promise.all([...e].reverse().map(e=>this.removeDimension(e,t,n)))}async removeDimension(e,t,n){if(t){const t=this.getAlternativeDimensions().splice(e,1)[0];return!n&&this.hcProperties.excludedNoOfLeftDims&&this.hcProperties.excludedNoOfLeftDims--,this.#m({cId:t.qDef.cId,section:n?"columns":"rows"}),t}const r=this.getDimensions(),o=this.properties.qHyperCubeDef.qNoOfLeftDims,i=this.hcProperties.qInterColumnSortOrder.indexOf(e);"number"==typeof this.properties.qHyperCubeDef.qNoOfLeftDims&&"number"==typeof i&&"number"==typeof o&&i+1<=o&&this.properties.qHyperCubeDef.qNoOfLeftDims--;const a=this.properties.qHyperCubeDef.columnWidths?this.properties.qHyperCubeDef.columnWidths[1]:void 0;Array.isArray(a)&&a.length>e&&a.splice(e,1);const s=r.splice(e,1).at(0);if(s)return((e,t)=>{if(!e)return-1;const n=e.indexOf(t);if(-1===n)return-1;for(let n=0;n<e.length;++n)e[n]>t&&e[n]--;e.splice(n,1)})(this.hcProperties.qInterColumnSortOrder,e),dA(this.hcProperties),this.#m({cId:s.qDef.cId,section:n?"columns":"rows"}),s}#f(e){return!(!e||void 0===e.qDef.cId)&&[...this.getDimensions(),...this.getAlternativeDimensions()].some(t=>t.qDef.cId===e.qDef.cId)}async addMeasures(e,t=!1){const n=[];for(const r of e){const e=await this.addMeasure(r,t,void 0,!0);e&&n.push(e)}return n}addAlternativeMeasures(e,t){if(this.#g(e))return;const n=this.getAlternativeMeasures(),r=void 0===t?n.length:t,o=n.splice(r,0,e);return this.#v({cId:e.qDef.cId,alternative:!0,addLast:void 0===t}),o}async addMeasure(e,t,n,r){if(this.#g(e))return;if(e.qDef.cId||(e.qDef.cId=aA()),t)return this.addAlternativeMeasures(e,n);r||delete e.qDef.qNumFormat;const o=this.getMeasures();if(o.length<this.maxMeasures()){const t=1===o.length;return void 0!==n&&n>=0?o.splice(n,0,e):o.push(e),this.autoSortMeasure(e).then(()=>(t&&(this.hcProperties.qInterColumnSortOrder.push(-1),0===this.getDimensions().length&&(this.hcProperties.qNoOfLeftDims=0)),this.#v({cId:e.qDef.cId,addLast:void 0===n}),e))}return o.length<lA?(this.getAlternativeMeasures().push(e),this.#v({cId:e.qDef.cId,alternative:!0,addLast:void 0===n}),Promise.resolve(e)):Promise.resolve()}reinsertMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures(),o=this.hcProperties.qInterColumnSortOrder;if(e.qDef.cId||(e.qDef.cId=aA()),t=void 0!==t?t:n.length,n.length<this.maxMeasures()){if(n.splice(t,0,e),2===n.length){-1===o.indexOf(-1)&&o.push(-1)}this.#v({cId:e.qDef.cId})}else n.length<lA&&(t=r.length,r.splice(t,0,e),this.#v({cId:e.qDef.cId}));return Promise.resolve(e)}async removeMeasure(e,t){if(t&&"number"==typeof e){const t=this.getAlternativeMeasures().splice(e,1)[0];return this.#m({cId:t.qDef.cId,section:"measures"}),t}const n=this.getMeasures();let r,o,i;if("number"==typeof e&&e<n.length){r=2===n.length,o=this.getMeasures().splice(e,1)[0];const t=this.hcProperties.qInterColumnSortOrder;r&&(i=t.indexOf(-1),t.splice(i,1),this.hcProperties.qNoOfLeftDims&&i+1<=this.hcProperties.qNoOfLeftDims&&this.hcProperties.qNoOfLeftDims--)}else"number"==typeof e&&(o=this.getAlternativeMeasures().splice(e-n.length,1)[0]);if(o)return this.#m({cId:o.qDef.cId,section:"measures"}),o}async removeMeasures(e,t){return await Promise.all([...e].reverse().map(e=>this.removeMeasure(e,t))),e}#g(e){return!(!e||void 0===e.qDef.cId)&&[...this.getMeasures(),...this.getAlternativeMeasures()].some(t=>t.qDef.cId===e.qDef.cId)}getSorting(){throw new Error("don't call this")}changeSorting(){throw new Error("don't call this")}setSorting(){throw new Error("don't call this")}getRowDimensions(){const e=this.#b("rows"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getColumnDimensions(){const e=this.#b("columns"),t=this.getDimensions();return e.filter(e=>e>=0).map(e=>t[e])}getAlternativeRowDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?e:e.slice(0,t)}getAlternativeColumnDimensions(){const e=this.getAlternativeDimensions(),{excludedNoOfLeftDims:t}=this.hcProperties;return-1===t?[]:e.slice(t)}#y(e){const t=this.hcProperties.rankedList?.[e];return t||this.createRankedList(e)}#x(e){return[...this.#y(e)]}#S(e,t){return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]=t,t}#w(e){const t=({qDef:t})=>t.cId===e;if(-1===e){return this.hcProperties.qInterColumnSortOrder.indexOf(-1)+1<=this.hcProperties.qNoOfLeftDims?"rows":"columns"}return this.getRowDimensions().some(t)||this.getAlternativeRowDimensions().some(t)?"rows":this.getColumnDimensions().some(t)||this.getAlternativeColumnDimensions().some(t)?"columns":null}#C(e){const t=({qDef:t})=>t.cId===e;return!(!this.getAlternativeDimensions().some(t)&&!this.getAlternativeMeasures().some(t))}#b(e){const{qInterColumnSortOrder:t,qNoOfLeftDims:n}=this.hcProperties;if(this.#E())return"columns"===e?t:[];switch(e){case"rows":return-1===n?t:t.slice(0,n);case"columns":return-1===n?[]:t.slice(n);default:throw new Error(`Unknown section in #getInterColumnSortOrderBySection: ${e}`)}}#E(){const{qNoOfLeftDims:e}=this.hcProperties,t=-1===e||Number.isNaN(+e);return 0===this.getDimensions().length&&this.getMeasures().length>0&&t}#I(e){const t=this.hcProperties.qInterColumnSortOrder.indexOf(-1);if(-1===t)return!1;if(this.#E())return"columns"===e;if(void 0===this.hcProperties.qNoOfLeftDims)return"rows"===e;switch(e){case"rows":return t+1<=this.hcProperties.qNoOfLeftDims;case"columns":return t+1>this.hcProperties.qNoOfLeftDims;default:return!1}}#D(e,t=!0){const n=e=>-1===e?-1:e.qDef.cId;if("measures"===e)return this.getMeasures().concat(t?this.getAlternativeMeasures():[]).map(n);const r=this.#b(e),o=this.getDimensions(),i=r.map(e=>-1===e?-1:o[e]);switch(e){case"rows":return i.concat(t?this.getAlternativeRowDimensions():[]).map(n);case"columns":return i.concat(t?this.getAlternativeColumnDimensions():[]).map(n);default:throw new Error(`Unknown section in #isCorruptRankedList: ${e}`)}}isRankedListCorrupt(e){const t=this.hcProperties.rankedList?.[e],n=this.properties.qInfo?.qId;if(!t)return!0;if(new Set(t).size!==t.length){const r=t.filter((e,n)=>t.indexOf(e)!==n);return this.#d("warn","Corrupt ranked list detected: duplicate ids",{duplicates:r,section:e,chartId:n}),!0}const r=this.#D(e);if(t.length!==r.length)return this.#d("warn","Corrupt ranked list detected: length mismatch",{section:e,chartId:n,fieldIds:r,rankedList:t,diff:new Set(r).symmetricDifference(new Set(t))}),!0;const o=r.filter(e=>!t.includes(e));if(o.length>0)return this.#d("warn","Corrupt ranked list detected: missing ids",{missingIds:o,section:e,chartId:n}),!0;const i=this.#D(e,!1),a=t.filter(e=>i.includes(e)),s=i.filter((e,t)=>e!==a[t]);return s.length>0&&(this.#d("warn","Corrupt ranked list detected: main field order mismatch",{section:e,chartId:n,orderMismatchIds:s}),!0)}createRankedList(e){switch(e){case"rows":case"columns":return this.#L({section:e});case"measures":return this.#R();default:throw new Error(`Unknown section in getRankedList: ${e}`)}}#L({section:e}){const t=this.getDimensions(),n=this.#b(e),r="columns"===e?this.getAlternativeColumnDimensions():this.getAlternativeRowDimensions(),o=n.map(e=>-1===e?-1:t[e].qDef.cId);return o.push(...r.map(e=>e.qDef.cId)),this.#S(e,o)}#R(){if(void 0!==this.hcProperties.rankedList?.measures&&!this.#u("SUPPORT-9810-MISSING-MEASURES")&&!this.#u("SUPPORT-9810-MIGRATE-RANKED-LISTS"))return this.hcProperties.rankedList.measures;const e=[...this.getMeasures(),...this.getAlternativeMeasures()].map(e=>e.qDef.cId);return this.#S("measures",e)}#M({section:e,cId:t,fields:n,addLast:r}){const o=this.#y(e),i=n.findIndex(e=>e.qDef.cId===t),a=n[i+1]?.qDef.cId,s=n[i-1]?.qDef.cId;if(r)o.push(t);else if(i>=0)if(a){const e=o.indexOf(a);o.splice(e,0,t)}else if(s){const e=o.indexOf(s);o.splice(e+1,0,t)}else o.push(t);return void 0===this.hcProperties.rankedList&&(this.hcProperties.rankedList={}),this.hcProperties.rankedList[e]}#h({section:e,cId:t,alternative:n=!1,addLast:r=!1}){if(void 0===this.hcProperties.rankedList?.[e])return this.#L({section:e});let o;return o="columns"===e?n?this.getAlternativeColumnDimensions():this.getColumnDimensions():n?this.getAlternativeRowDimensions():this.getRowDimensions(),this.#M({section:e,cId:t,fields:o,addLast:r})}#v({cId:e,alternative:t=!1,addLast:n=!1}){if(void 0===this.hcProperties.rankedList?.measures)return this.#R();const r=t?this.getAlternativeMeasures():this.getMeasures();return this.#A(),this.#M({section:"measures",cId:e,fields:r,addLast:n})}#A(){const e=this.#y("rows"),t=this.#y("columns");this.#I("rows")&&!e.includes(-1)?e.push(-1):this.#I("columns")&&!t.includes(-1)&&t.push(-1)}#P(){if(this.hcProperties.qInterColumnSortOrder.includes(-1))return;const e=this.#y("rows"),t=this.#y("columns"),n=e.indexOf(-1),r=t.indexOf(-1);-1!==n&&e.splice(n,1),-1!==r&&t.splice(r,1)}#m({cId:e,section:t}){const n=this.#y(t),r=n.indexOf(e);-1!==r&&(n.splice(r,1),this.#P())}async moveMeasureToAlternative(e){const t=this.getMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t);if(void 0===o)return;const i=n.slice(r+1).find(e=>this.getAlternativeMeasures().some(t=>t.qDef.cId===e)),a=this.getAlternativeMeasures().findIndex(e=>e.qDef.cId===i);this.addAlternativeMeasures(o,-1===a?void 0:a),this.#S("measures",n)}async moveMeasureFromAlternative(e){const t=this.getAlternativeMeasures().findIndex(t=>t.qDef.cId===e),n=this.#x("measures"),r=n.indexOf(e);if(-1===t)return;const o=await this.removeMeasure(t,!0);if(void 0===o)return;const i=this.getMeasures().map(e=>e.qDef.cId),a=n.slice(r+1).find(e=>i.includes(e)),s=i.findIndex(e=>e===a);await this.addMeasure(o,!1,-1===s?void 0:s,!0),this.#S("measures",n)}async moveDimensionToAlternative(e){const t=this.#w(e),n=this.getDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!1,i);if(void 0===a)return;const s=r.slice(o+1).find(e=>this.getAlternativeDimensions().some(({qDef:t})=>t.cId===e));let l=this.getAlternativeDimensions().findIndex(({qDef:e})=>e.cId===s);l=-1===l?void 0:l;void 0!==this.addAlternativeDimension(a,i,l)&&this.#S(t,r)}async moveDimensionFromAlternative(e){const t=this.#w(e),n=this.getAlternativeDimensions().findIndex(t=>t.qDef.cId===e);if(-1===n||null===t)return;const r=this.#x(t),o=r.indexOf(e),i="columns"===t,a=await this.removeDimension(n,!0,i);if(void 0===a)return;const s=this.#D(t,!1),l=r.slice(o+1).find(e=>s.includes(e));let c=s.findIndex(e=>e===l);c=-1===c?void 0:c;void 0!==await this.#p(a,i,c,!1,!0)&&this.#S(t,r)}movePseudoDimension({toIndex:e,toSection:t}){const n=this.#w(-1);if(null===n)return void this.#d("error","Cannot move pseudo dimension, unable to find it in any section",{toIndex:e,toSection:t});const r="columns"===t,o=n===t,i=this.#x(t);if(o){const e=i.indexOf(-1);i.splice(e,1)}else{const o=this.#y(n),i=o.indexOf(-1);if(-1===i)return void this.#d("error","Couldn't delete pseudo dimension from current section",{toIndex:e,toSection:t,fromSection:n});o.splice(i,1),this.hcProperties.qNoOfLeftDims=r?Math.max(0,this.hcProperties.qNoOfLeftDims-1):this.hcProperties.qNoOfLeftDims+1}const a=e-i.slice(0,e).filter(e=>this.#C(e)).length,s=r?this.hcProperties.qNoOfLeftDims+a:a,l=this.hcProperties.qInterColumnSortOrder.indexOf(-1);this.hcProperties.qInterColumnSortOrder.splice(l,1),this.hcProperties.qInterColumnSortOrder.splice(s,0,-1),i.splice(e,0,-1),this.#S(t,i)}async moveDimension({cId:e,toIndex:t,toSection:n}){const r=this.#w(e),o=this.#C(e);if(null===r)return void this.#d("error","Cannot move dimension, unable to find it in any section",{cId:e});const i=(o?this.getAlternativeDimensions():this.getDimensions()).findIndex(({qDef:t})=>t.cId===e);if(-1===i)return void this.#d("error","Couldn't find dimension to move",{cId:e,toIndex:t,toSection:n});const a=this.#x(n),s=a.indexOf(e);-1!==s&&a.splice(s,1);const l=Math.max(0,Math.min(t,a.length));l!==t&&this.#d("warn","[moveDimension] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:l});const c=l-a.slice(0,l).filter(e=>this.#C(e)!==o).length,u="columns"===n,d="columns"===r,p=await this.removeDimension(i,o,d);if(void 0===p)return;void 0!==await this.#p(p,u,c,o,!0)&&(a.splice(l,0,e),this.#S(n,a))}async moveMeasure({cId:e,toIndex:t}){const n=this.#C(e),r=(n?this.getAlternativeMeasures():this.getMeasures()).findIndex(t=>t.qDef.cId===e);if(-1===r)return void this.#d("error","Cannot move measure, unable to find it in any section",{cId:e});const o=this.#x("measures"),i=o.indexOf(e);-1!==i&&o.splice(i,1);const a=Math.max(0,Math.min(t,o.length));a!==t&&this.#d("warn","[moveMeasure] toIndex is out of bounds, clamping it",{toIndex:t,clampedToIndex:a});const s=await this.removeMeasure(r,n);if(void 0===s)return;const l=a-o.slice(0,a).filter(e=>this.#C(e)!==n).length;void 0!==await this.addMeasure(s,n,l,!0)&&(o.splice(a,0,e),this.#S("measures",o))}getLabels(){return this.getMeasures().filter(e=>!e.qLibraryId&&!!e.qDef.qLabel).map(e=>e.qDef.qLabel)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}getFilters(){return this.properties.filters??[]}getFilter(e){return this.getFilters().find(t=>t.id===e)}addFilterField(e){const t=e.qTags??e.tags,n=Array.isArray(t)&&t.includes("$numeric"),r=e.isDerived,o=Array.isArray(this.properties.filters)?this.properties.filters:[],i={type:"values",field:r?e.value??e.fullname:e.name??e.label??e.field,options:{values:[]},exclude:!1,id:aA(),qTags:Array.isArray(t)?t:[],isNumeric:n};return o.push(i),this.properties.filters=o,this.properties.qHyperCubeDef.qContextSetExpression=nA(o),i}addFilters(e){const t=[];for(const n of e)t.push(this.addFilterField(n));return t}#q(e){const t=this.getFilters();return t.splice(e,1),this.properties.qHyperCubeDef.qContextSetExpression=nA(t),t}removeFilters(e){if(0===e.length)return[];const t=[...e].sort((e,t)=>t-e),n=this.getFilters().filter((t,n)=>e.includes(n));for(const e of t)this.#q(e);return n}getAddDimensionLabel(){return this.#c.get("Visualization.Requirements.AddDimension")}canColorBy(){return!1}}var hA,mA={exports:{}};var gA=(hA||(hA=1,function(e){self,e.exports=(()=>{var e={909:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},s=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(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}},8:(e,t)=>{(()=>{var e={229:e=>{var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===n.call(e)},a=function(e){if(!e||"[object Object]"!==n.call(e))return!1;var r,o=t.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!o&&!i)return!1;for(r in e);return void 0===r||t.call(e,r)},s=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(e,n){if("__proto__"===n){if(!t.call(e,n))return;if(o)return o(e,n).value}return e[n]};e.exports=function e(){var t,n,r,o,c,u,d=arguments[0],p=1,f=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},p=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});p<f;++p)if(null!=(t=arguments[p]))for(n in t)r=l(d,n),d!==(o=l(t,n))&&(h&&o&&(a(o)||(c=i(o)))?(c?(c=!1,u=r&&i(r)?r:[]):u=r&&a(r)?r:{},s(d,{name:n,newValue:e(h,u,o)})):void 0!==o&&s(d,{name:n,newValue:o}));return d}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var i=n[t]={exports:{}};return e[t](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{r.r(o),r.d(o,{default:()=>Pe});var e=r(229),t=r.n(e);const n=function(e,t,n){if(!t)return!1;var r,o=t.split("."),i=o[o.length-1],a=e;for(r=0;r<o.length-1;++r)void 0===a[o[r]]&&(a[o[r]]=Number.isNaN(+o[r+1])?{}:[]),a=a[o[r]];if(void 0!==n){var s=a[i];return a[i]=n,{updated:n,previous:s}}return delete a[i],!1},i=function(e,t,n){var r,o=t.split("."),i=e;if(void 0===i)return n;for(r=0;r<o.length;++r){if(void 0===i[o[r]])return n;i=i[o[r]]}return i},a={EXPRESSIONS:{observed:"",trend:"STL_Trend",seasonal:"STL_Seasonal",residual:"STL_Residual"},OPTIONS:[{value:"observed",translation:"cao.trendDecomposition.parameters.decomposition.observed"},{value:"trend",translation:"cao.trendDecomposition.parameters.decomposition.trend"},{value:"seasonal",translation:"cao.trendDecomposition.parameters.decomposition.seasonal"},{value:"residual",translation:"cao.trendDecomposition.parameters.decomposition.residual"}]};var s="".concat(" ","(").concat(" "),l="".concat(" ",")").concat(" ");function c(e){return s+e+l}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e.qLibraryId){var n=function(e,t){if(!t)return null;var n,r;for(n=0;n<t.length;n++)if((r=t[n]).qInfo.qId===e)return r;return null}(e.qLibraryId,t.dimensionList);return n&&n.qData.info[0].qTags.indexOf("$numeric")>-1}var r=function(e,t){if(!t)return null;var n,r,o=function(e){var t=e.trim();"="===t.charAt(0)&&(t=(t=t.substring(1)).trim());var n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=(t=t.substring(1,n)).trim()),t}(e);for(n=0;n<t.length;n++){if((r=t[n]).qName===o)return r;if(r.qDerivedFieldData)for(var i=0;i<r.qDerivedFieldData.qDerivedFieldLists.length;++i)for(var a=r.qDerivedFieldData.qDerivedFieldLists[i],s=0;s<a.qFieldDefs.length;++s){var l=a.qFieldDefs[s];if(l.qName===o)return l}}return null}(e.qDef.qFieldDefs[0],t.fieldList);return r&&r.qTags.indexOf("$numeric")>-1}function d(e){return!(!e.fullAccumulation&&!e.fullRange)}function p(e,t){var n=e.crossAllDimensions;return 2===t&&n?"RowNo(Total)":"RowNo()"}function f(e){var t=function(e){return e?(e=function(e){return e.replace(/\/\*[^]*?\*\//g,"")}(e=function(e){return e.replace(/\/\/(.*)$/gm,"")}(e))).trim():""}(e),n=t.trim();return"="===n.substring(0,1)?n.substring(1).trim():n}function h(){return"[$(=Replace(GetObjectField(".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,"),']',']]'))]")}function m(e,t){var n=e.crossAllDimensions;return 2===t&&n?"Above(Total ":"Above("}function g(e){return void 0===e?")":", 0, ".concat(e,")")}function v(e){return"Replace(Replace(".concat(e,",'''',''''''),'$','$''&''')")}function b(e,t){return e?"".concat(t,'={">=$(=Min(').concat(t,"))<=$(=Max(").concat(t,'))"}'):"".concat(t,'={"=Only({1}').concat(t,")>='$(=").concat(v("MinString(".concat(t,")")),")' and Only({1}").concat(t,")<='$(=").concat(v("MaxString(".concat(t,")")),")'\"}")}function y(e){var t=e.modifier,n=void 0===t?{}:t,r=e.dimensions,o=e.dimensionAndFieldList,i=e.funcComp,a=void 0===i?"Sum":i,s=e.valueComp,l=void 0===s?"0":s;if(!n.showExcludedValues)return"";if(r&&1===r.length){var c=b(u(r[0],o),h(0));return"".concat(a,"({1<").concat(c,">}").concat(l,")")}if(r&&2===r.length){var d=u(r[0],o),p=u(r[1],o),f=h(0),m=h(1),g=b(d,f),v=b(p,m);return"".concat(a,"({1<").concat(g,",").concat(v,">}").concat(l,")")}return"".concat(a,"({1}").concat(l,")")}function x(e){return"".concat(e,"(")}function S(e){var t=e.properties,n=e.layout;return i(t,"qHyperCubeDef.qDimensions",i(n,"qHyperCube.qDimensionInfo",[])).length}const w={isFullRange:d,getNumDimensions:S,getExpressionWithExcludedComp:function(e){var t=e.expression,n=e.modifier,r=e.dimensions,o=e.dimensionAndFieldList,i=e.treatMissingAsNull,a=c(f(t));if(!n.showExcludedValues)return a;var s=y({modifier:n,dimensions:r,dimensionAndFieldList:o}),l=i?"":", 0";if(r&&1===r.length){var u=h(0);return"If(Count(".concat(u,") > 0, ").concat(a," + ").concat(s).concat(l,")")}if(r&&2===r.length){var d=h(0),p=h(1);return"If(Count(".concat(d,") * Count(").concat(p,") > 0, ").concat(a," + ").concat(s).concat(l,")")}return a},getRowNoComp:p,getNumStepComp:function(e,t){if(!d(e)){var n=e.steps;return"number"!=typeof n||Number.isNaN(n)?6:n}return p(e,t)},getAboveCompPrefix:m,getAboveCompSuffix:g,getAboveComp:function(e,t,n,r){return m(e,t)+n+g(r)},getFunctionPrefix:x,getFunctionSuffix:function(){return")"},getRangeComp:function(e,t){return x(e)+t+")"},getAggrComp:function(e,t,n){return"Aggr(".concat(e,", ").concat(t,", ").concat(n,")")},getExcludedComp:y,needDimension:function(e){var t=e.modifier,n=e.properties,r=e.layout,o=function(e){return void 0===e.primaryDimension?e.accumulationDimension:e.primaryDimension}(t);return 0===o&&2===S({properties:n,layout:r})},getDimComp:function(e,t){var n=function(e){return e[arguments.length>1&&void 0!==arguments[1]?arguments[1]:0].qDef.qSortCriterias[0]}(e,t),r=h(t);if(!n.qSortByExpression&&!n.qSortByNumeric&&!n.qSortByAscii)return r;var o=["Descending","Ascending"],i=n.qSortByNumeric?"(Numeric, ".concat(o[(n.qSortByNumeric+1)/2],")"):"",a=n.qSortByAscii?"(Text, ".concat(o[(n.qSortByAscii+1)/2],")"):"";return n.qSortByNumeric&&n.qSortByAscii?"(".concat(r,", ").concat(i,", ").concat(a,")"):n.qSortByNumeric?"(".concat(r,", ").concat(i,")"):n.qSortByAscii?"(".concat(r,", ").concat(a,")"):r},simplifyExpression:f,extractInputExpression:function(e){var t=e.outputExpression;if(e.modifier){var n=t.indexOf(s);if(-1!==n){var r=t.indexOf(l);if(-1!==r)return t.substring(n+s.length,r)}}},initModifier:function(e,t){Object.keys(t).forEach(function(n){void 0===e[n]&&(e[n]=t[n])})},isNumeric:u,isApplicable:function(e){var t=e.properties,n=e.layout,r=e.minDimensions,o=void 0===r?1:r,i=e.maxDimensions,a=void 0===i?2:i;if(!t&&!n)return!0;var s=S({properties:t,layout:n});return s>=o&&s<=a},getExpressionWithMarkers:c,canExtract:function(e){var t=e.indexOf(s),n=e.indexOf(l);return t>-1&&n>-1&&t<n},getDimDefWithWrapper:h,getFieldWithWrapper:function(e){var t=e?e.replace(/]/g,"]]"):e;return"[".concat(t,"]")},generateTSDExpression:function(e,t,n){var r=t||e.outputExpression;if(e.base&&e.base.qDef&&(r=t!==e.base.qDef?t:e.base.qDef),"observed"!==e.decomposition){var o=n.qHyperCubeDef.qMeasures.find(function(t){return t.qDef.base&&t.qDef.base.qLibraryId&&e.base&&e.base.qLibraryId?t.qDef.base.qLibraryId===e.base.qLibraryId:null});o&&t!==o.qDef.qLabel&&(r=o.qLibraryId||o.qDef.base.qLibraryId?"[".concat(o.qDef.qLabel,"]"):o.qDef.base.qDef);var i=function(e){var t=a.OPTIONS.find(function(t){return t.value===e.decomposition});return t?a.EXPRESSIONS[t.value]:""}(e);r=r.startsWith("=")?r.substr(1):r,r="".concat(i,"(").concat(r,", ").concat(e.steps,")")}return r},getDecomposition:function(e){var t="observed";return Object.values(a.EXPRESSIONS).find(function(n){var r=e.qDef.base.qDef.toLowerCase()||e.qDef.qDef.toLowerCase();return a.EXPRESSIONS[n]&&r.includes(a.EXPRESSIONS[n].toLowerCase())&&(t=n),n}),t}};function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}var I=t().bind(null,!0),D={},L=Array.isArray;function R(e){return null!=e&&!Array.isArray(e)&&"object"===E(e)}function M(e){return void 0===e}function A(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function P(e,t){var n,r=t.substring(1).split("/").slice(0,-1);return r.forEach(function(t,o){if(o!==r.length){n=+t;var i=Number.isNaN(n)?{}:[];e[n||t]=M(e[n||t])?i:e[t],e=e[n||t]}}),e}function q(e,t){var n=!0;if(R(e)&&R(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(function(r){q(e[r],t[r])||(n=!1)}),n);if(L(e)&&L(t)){if(e.length!==t.length)return!1;for(var r=0,o=e.length;r<o;r+=1)if(!q(e[r],t[r]))return!1;return!0}return e===t}D.generate=function(e,t,n){n=n||"";var r=[];return Object.keys(t).forEach(function(o){var i=function(e){return e?I({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);q(i,a)||A(t,o)||(M(a)?r.push({op:"add",path:s,value:i}):R(i)&&R(a)?r=r.concat(D.generate(a,i,s)):L(i)&&L(a)?r=r.concat(function(e,t,n){var r=[],o=e.slice(),i=-1;function a(e,t,n){if(e[n]&&M(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(var r=0,o=e.length;r<o;r+=1)if(e[r]&&e[r].qInfo.qId===t)return r;return-1}if(q(t,o))return r;if(!M(t[0])&&M(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(var s=o.length-1;s>=0;s-=1)-1===(i=a(t,o[s].qInfo&&o[s].qInfo.qId,s))?(r.push({op:"remove",path:"".concat(n,"/").concat(s)}),o.splice(s,1)):r=r.concat(D.generate(o[s],t[i],"".concat(n,"/").concat(s)));for(var l=0,c=t.length;l<c;l+=1)-1===(i=a(o,t[l].qInfo&&t[l].qInfo.qId))?(r.push({op:"add",path:"".concat(n,"/").concat(l),value:t[l]}),o.splice(l,0,t[l])):i!==l&&(r.push({op:"move",path:"".concat(n,"/").concat(l),from:"".concat(n,"/").concat(i)}),o.splice(l,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:"".concat(n,"/").concat(o),value:i}))}),Object.keys(e).forEach(function(o){M(t[o])&&!A(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})}),r},D.apply=function(e,t){t.forEach(function(t){var n,r,o=P(e,t.path),i=t.path.split("/").splice(-1)[0],a=i&&Number.isNaN(+i)?o[i]:o[+i]||o,s=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(o=null,a=e),"add"===t.op||"replace"===t.op)if(L(o))"-"===i&&(i=o.length),o.splice(+i,"add"===t.op?0:1,t.value);else if(L(a)&&L(t.value)){var l,c=t.value.slice();a.length=0,(l=a).push.apply(l,function(e){if(Array.isArray(e))return C(e)}(r=c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(r)||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.")}())}else if(R(a)&&R(t.value))n=a,Object.keys(n).forEach(function(e){Object.getOwnPropertyDescriptor(n,e).configurable&&!A(n,e)&&delete n[e]}),I(a,t.value);else{if(!o)throw new Error("Patchee is not an object we can patch");o[i]=t.value}else if("move"===t.op){var u=P(e,t.from);L(o)?o.splice(+i,0,u.splice(+s,1)[0]):(o[i]=u[s],delete u[s])}else"remove"===t.op&&(L(o)?o.splice(+i,1):delete o[i])})},D.clone=function(e){return I({},e)},D.createPatch=function(e,t,n){var r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},D.updateObject=function(e,t){Object.keys(e).length?D.apply(e,D.generate(e,t)):I(e,t)};const T=D,k=function(e,n,r){if(!e)return Promise.resolve();var o=T.generate(n,r);return t()(!0,n,r),o&&o.length?(o=o.map(function(e){return{qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path}}),e.applyPatches(o,!0)):Promise.resolve()};var O="accumulation";function N(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===O)return n[r]}function _(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===O)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var j={type:"accumulation",disabled:!1,accumulationDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullAccumulation:!1,steps:6,outputExpression:""};const F={translationKey:"properties.modifier.accumulation",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getNumStepComp(n,l),p=w.getAboveComp(n,l,u,d),f=w.getRangeComp("RangeSum",p);if(w.needDimension({modifier:n,properties:r,layout:o})){var h=w.getDimComp(c,1),m=w.getDimComp(c,0),g=w.getAggrComp(f,h,m);f=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,valueComp:g}):g}return f},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,j)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.accumulation.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(_(t,e),".accumulationDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.accumulation.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(_(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.accumulation.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat(_(t,e),".fullAccumulation")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat(_(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=N(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=N(t,e);return n&&!n.fullAccumulation}},showExcludedValues:{refFn:function(t){return"".concat(_(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(O))return!1;var i=N(t,e);return i&&!i.disabled}};return n}};var z="movingAverage";function W(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===z)return n[r]}function $(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===z)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var V={type:"movingAverage",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,fullRange:!1,steps:6,outputExpression:"",nullSuppression:!1};const H={translationKey:"properties.modifier.movingAverage",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t,n=e.expression,r=e.modifier,o=e.properties,a=e.layout,s=e.numDimensions,l=e.dimensionAndFieldList;if(!r)return n;var c=s;void 0===c&&(c=w.getNumDimensions({properties:o,layout:a}));var u=i(o,"qHyperCubeDef.qDimensions",[]),d=r.showExcludedValues&&r.nullSuppression,p=w.getExpressionWithExcludedComp({expression:n,modifier:r,dimensions:u,dimensionAndFieldList:l,treatMissingAsNull:d}),f=w.getNumStepComp(r,c),h=w.getAboveComp(r,c,p,f);if(r.nullSuppression)t=w.getRangeComp("RangeAvg",h);else{var m=w.getRangeComp("RangeSum",h),g=function(e,t){var n=w.getRowNoComp(e,t);if(!w.isFullRange(e)){var r=e.steps,o="number"!=typeof r||Number.isNaN(r)?6:r;return"RangeMin(".concat(o,", ").concat(n,")")}return n}(r,c);t="".concat(m," / ").concat(g)}var v=t;if(w.needDimension({modifier:r,properties:o,layout:a})){var b=w.getDimComp(u,1),y=w.getDimComp(u,0),x=w.getAggrComp(v,b,y);v=r.showExcludedValues?w.getExcludedComp({modifier:r,dimensions:u,dimensionAndFieldList:l,funcComp:"Only",valueComp:x}):x}return v},extractInputExpression:w.extractInputExpression,initModifier:function(e){w.initModifier(e,V)},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.movingAverage.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat($(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.movingAverage.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat($(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.movingAverage.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},fullRange:{refFn:function(t){return"".concat($(t,e),".fullRange")},type:"boolean",translation:t.range||"properties.modifier.range",component:"dropdown",schemaIgnore:!0,defaultValue:!1,options:[{value:!0,translation:t.rangeFull||"properties.modifier.range.full"},{value:!1,translation:t.rangeCustom||"properties.modifier.range.custom"}]},steps:{refFn:function(t){return"".concat($(t,e),".steps")},type:"integer",translation:t.rangeSteps||"properties.modifier.range.steps",schemaIgnore:!0,defaultValue:6,change:function(t){var n=W(t,e);if(n){var r=n.steps;n.steps="number"!=typeof r||Number.isNaN(r)?6:Math.abs(r)}},show:function(t){var n=W(t,e);return n&&!n.fullRange}},showExcludedValues:{refFn:function(t){return"".concat($(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0},nullSuppression:{refFn:function(t){return"".concat($(t,e),".nullSuppression")},type:"boolean",translation:t.showNull||"properties.dimensions.showNull",schemaIgnore:!0,defaultValue:!1,inverted:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(z))return!1;var i=W(t,e);return i&&!i.disabled}};return n}};var B="timeSeriesDecomposition";function G(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===B)return n[r]}function U(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===B)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Y={type:"timeSeriesDecomposition",disabled:!1,decomposition:"",steps:2,outputExpression:""};const K={translationKey:"properties.modifier.timeSeriesDecomposition",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties;return n?w.generateTSDExpression(n,t,r):t},extractInputExpression:w.extractInputExpression,initModifier:function(e,t){w.initModifier(e,Y),""===e.decomposition&&t&&(e.decomposition=w.getDecomposition(t))},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.timeSeriesDecomposition||"properties.modifier.timeSeriesDecomposition",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{decomposition:{refFn:function(t){return"".concat(U(t,e),".decomposition")},type:"string",translation:t.modifierTrendDecompositionDecomposition||"properties.modifier.trendDecomposition.decomposition",component:"dropdown",schemaIgnore:!0,defaultValue:t.trendDecompositionParametersDecompositionObserved||"cao.trendDecomposition.parameters.decomposition.observed",options:a.OPTIONS},steps:{refFn:function(t){return"".concat(U(t,e),".steps")},type:"integer",translation:t.modifierTimeSeriesDecompositionPeriods||"properties.modifier.timeSeriesDecomposition.periods",schemaIgnore:!0,defaultValue:2,change:function(t,n){var r=G(t,e);if(r){var o=r.steps;r.steps="number"!=typeof o||Number.isNaN(o)?2:Math.abs(o),n.properties.qHyperCubeDef.qMeasures=n.properties.qHyperCubeDef.qMeasures.map(function(e){return e.qDef.modifiers.map(function(e){return"timeSeriesDecomposition"===e.type?e.steps=o:e.steps=e.steps,e}),e})}},show:function(t){var n=G(t,e);return n&&!n.fullRange}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(B))return!1;var i=G(t,e);return i&&!i.disabled}};return n}};var X="difference";function J(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===X)return n[r]}function Z(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===X)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}var Q={type:"difference",disabled:!1,primaryDimension:0,crossAllDimensions:!1,showExcludedValues:!0,outputExpression:""};const ee={translationKey:"properties.modifier.difference",needDimension:w.needDimension,isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=w.getAboveComp(n,l,u),p="".concat(u," - ").concat(d);if(w.needDimension({modifier:n,properties:r,layout:o})){var f=w.getDimComp(c,1),h=w.getDimComp(c,0),m=w.getAggrComp(p,f,h);p=n.showExcludedValues?w.getExcludedComp({modifier:n,dimensions:c,dimensionAndFieldList:s,funcComp:"Only",valueComp:m}):m}return p},initModifier:function(e){Object.keys(Q).forEach(function(t){void 0===e[t]&&(e[t]=Q[t])})},enableTotalsFunction:function(){return!1},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.difference.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{primaryDimension:{refFn:function(t){return"".concat(Z(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.difference.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},crossAllDimensions:{refFn:function(t){return"".concat(Z(t,e),".crossAllDimensions")},type:"boolean",translation:t.crossAllDimensions||"properties.modifier.crossAllDimensions",title:{translation:t.crossAllDimensionsTooltip||"properties.modifier.difference.crossAllDimensions.tooltip"},schemaIgnore:!0,defaultValue:!1,show:function(e,t){return t.layout.qHyperCube.qDimensionInfo.length>1}},showExcludedValues:{refFn:function(t){return"".concat(Z(t,e),".showExcludedValues")},type:"boolean",translation:t.showExcludedValues||"properties.modifier.showExcludedValues",schemaIgnore:!0,defaultValue:!0}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(X))return!1;var i=J(t,e);return i&&!i.disabled}};return n}};var te="normalization";function ne(e,t){var n=i(e,t);if(n)for(var r=0;r<n.length;r++)if(n[r].type===te)return n[r]}function re(e,t){var n=function(e,t){var n=i(e,t);if(!n)return-1;for(var r=0;r<n.length;r++)if(n[r].type===te)return r;return-1}(e,t);return n>-1?"".concat(t,".").concat(n):t}function oe(e,t){for(var n=0;n<e.length;n++)if(e[n].value===t)return n;return-1}var ie={type:"normalization",disabled:!1,primaryDimension:0,outputExpression:"",dimensionalScope:2,selectionScope:2};function ae(e){return 2===e?"{1}":""}function se(e,t,n){return 1===e?"{$<".concat(w.getFieldWithWrapper(t),"={'").concat(n,"'}>}"):""}function le(e,t){return 0===e&&t>1||2===e?"Total":""}function ce(e,t,n){return 0===e&&t>1?"<".concat(w.getDimDefWithWrapper(n),">"):""}const ue={translationKey:"properties.modifier.normalization",needDimension:function(){return!0},isApplicable:function(e){var t=e.properties,n=e.layout;return w.isApplicable({properties:t,layout:n,minDimensions:1,maxDimensions:2})},extractInputExpression:w.extractInputExpression,generateExpression:function(e){var t=e.expression,n=e.modifier,r=e.properties,o=e.layout,a=e.numDimensions,s=e.dimensionAndFieldList;if(!n)return t;var l=a;void 0===l&&(l=w.getNumDimensions({properties:r,layout:o}));var c=i(r,"qHyperCubeDef.qDimensions",[]),u=w.getExpressionWithExcludedComp({expression:t,modifier:n,dimensions:c,dimensionAndFieldList:s}),d=n.selectionScope,p=n.dimensionalScope;return function(e,t,n,r,o,i,a){var s=ae(t),l=se(t,n,r),c=""===s&&""===l?"":s||l,u=le(o,i),d=ce(o,i,a),p=function(e){for(var t=[],n=0;n<e;n++)t[n]=w.getDimDefWithWrapper(n);return t.join(", ")}(i);return"".concat(e,"/ Sum(").concat(c," ").concat(u).concat(d," Aggr(").concat(c," ").concat(e,", ").concat(p,"))")}(u,d,n.field,n.value,p,l,n.primaryDimension)},initModifier:function(e){Object.keys(ie).forEach(function(t){void 0===e[t]&&(e[t]=ie[t])})},updateModifier:function(e,t){1===(t.qDimensions?t.qDimensions.length:0)&&0===e.dimensionalScope&&(e.dimensionalScope=2)},enableTotalsFunction:function(){return!0},propertyPanelDef:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={type:"items",items:{disclaimer:{component:"text",translation:t.disclaimer||"properties.modifier.normalization.disclaimer",show:function(e,t){return!w.isApplicable({properties:t.properties})}},settings:{type:"items",items:{selectionScope:{refFn:function(t){return"".concat(re(t,e),".selectionScope")},type:"string",translation:t.modifierSelectionScope||"properties.modifier.selectionScope",title:{translation:t.modifierSelectionScopeTooltip||"properties.modifier.selectionScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,options:function(n){return function(e,t,n){var r=[{value:0,translation:t.selectionScopeCurrentSelection||"properties.modifier.selectionScope.currentSelection"},{value:1,translation:t.selectionScopeSpecificValue||"properties.modifier.selectionScope.selectAField"},{value:2,translation:t.selectionScopeTotal||"properties.modifier.selectionScope.total"}];return r=function(e,t){if(1===e){var n=oe(t,0);t.splice(n,1)}return t}(ne(e,n).dimensionalScope,r),r}(n,t,e)}},field:{refFn:function(t){return"".concat(re(t,e),".field")},type:"string",component:"expression-with-dropdown",translation:"Common.Field",defaultValue:"",dropdownOnly:!0,options:function(e,t,n){return n.app.getFieldList().then(function(e){return e.map(function(e){return{label:e.qName,value:e.qName}})})},show:function(t){return 1===ne(t,e).selectionScope}},value:{refFn:function(t){return"".concat(re(t,e),".value")},type:"string",ref:"value",component:"string",translation:"properties.value",expression:"optional",show:function(t){return 1===ne(t,e).selectionScope}},dimensionalScope:{refFn:function(t){return"".concat(re(t,e),".dimensionalScope")},type:"string",translation:t.modifierDimensionalScope||"properties.modifier.dimensionalScope",title:{translation:t.modifierDimensionalScopeTooltip||"properties.modifier.dimensionalScope.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:2,supportTooltip:!0,options:function(n,r){return function(e,t,n,r){var o=t.layout.qHyperCube.qDimensionInfo.length,i=[{value:0,translation:n.dimensionalScopeOneDimension||"properties.modifier.dimensionalScope.respectOneDimension",tooltipTranslation:n.dimensionalScopeOneDimensionTooltip||"properties.modifier.dimensionalScope.respectOneDimension.tooltip"},{value:1,translation:n.dimensionalScopeAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension"),tooltipTranslation:n.dimensionalScopeAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"respectAllDimensions":"respectDimension",".tooltip")},{value:2,translation:n.dimensionalScopeDisregardAllDimensions||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension"),tooltipTranslation:n.dimensionalScopeDisregardAllDimensionsTooltip||"properties.modifier.dimensionalScope.".concat(2===o?"disregardAllDimensions":"disregardDimension",".tooltip")}];return i=function(e,t){if(e<2){var n=oe(t,0);t.splice(n,1)}return t}(o,i),i=function(e,t){if(0===e){var n=oe(t,1);t.splice(n,1)}return t}(ne(e,r).selectionScope,i),i}(n,r,t,e)}},primaryDimension:{refFn:function(t){return"".concat(re(t,e),".primaryDimension")},type:"integer",translation:t.primaryDimension||"properties.modifier.primaryDimension",title:{translation:t.primaryDimensionTooltip||"properties.modifier.normalization.primaryDimension.tooltip"},component:"dropdown",schemaIgnore:!0,defaultValue:1,options:function(e,t){return t.layout.qHyperCube.qDimensionInfo.map(function(e,t){return{value:t,label:e.qGroupFallbackTitles[0]}})},show:function(t,n){return 0===(ne(t,e).dimensionalScope||0)&&n.layout.qHyperCube.qDimensionInfo.length>1}}},show:function(e,t){return w.isApplicable({properties:t.properties})}}},show:function(t,n,r){var o=r.ext.support.modifiers;if(!Array.isArray(o)||-1===o.indexOf(te))return!1;var i=ne(t,e);return i&&!i.disabled}};return n},getDisregardSelectionComp:ae,getFieldSelectionComp:se,getTotalComp:le,getSelectedDimComp:ce};var de="qDef.base",pe="qDef.qDef",fe="qDef.base.qDef",he="qLibraryId",me="qDef.base.qLibraryId";const ge={getExpression:function(e){var t=i(e,fe);return void 0!==t?t:i(e,pe)},getExpressionRef:function(e){return void 0!==i(e,fe)?fe:pe},getLibraryIdRef:function(e){return i(e,me)?me:he},getLibraryId:function(e){return i(e,me)||i(e,he)},getLabelRef:function(e){return i(e,de)?"qDef.base.qLabel":"qDef.qLabel"},getLabelExpressionRef:function(e){return i(e,de)?"qDef.base.qLabelExpression":"qDef.qLabelExpression"}};var ve="qDef.qDef",be="qDef.base.qDef",ye="qLibraryId",xe="qDef.base.qLibraryId",Se="qDef.qLabel",we="qDef.qLabelExpression",Ce="qDef.base.qLabel",Ee="qDef.base.qLabelExpression",Ie="qDef.qAggrFunc",De="qDef.base.qAggrFunc",Le={initBase:function(e,t){(t||Le.isValid(e))&&(n(e,be,i(e,ve)),n(e,xe,i(e,ye)),n(e,Ce,i(e,Se)),n(e,Ee,i(e,we)))},restoreBase:function(e){Le.isValid(e)&&(n(e,ve,i(e,be)),n(e,ye,i(e,xe)),n(e,Se,i(e,Ce)),n(e,we,i(e,Ee)),i(e,Ie)&&i(e,De)&&n(e,Ie,i(e,De)),delete e.qDef.base)},isValid:function(e){var t=i(e,be),n=i(e,xe);return void 0!==t||void 0!==n}};const Re=Le;function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}var Ae={accumulation:F,movingAverage:H,difference:ee,normalization:ue,timeSeriesDecomposition:K};const Pe={modifiers:Ae,apply:Te,applyModifiers:ke,cleanUpMeasure:Oe,destroy:function(e){e&&qe[e.id]&&qe[e.id].masterItemSubscriber&&(qe[e.id].masterItemSubscriber&&qe[e.id].masterItemSubscriber.unsubscribe(),delete qe[e.id])},hasActiveModifiers:Ne,getActiveModifier:_e,initBase:Re.initBase,isSupportedModifiers:function(e){return Array.isArray(e)&&e.some(function(e){return Ae[e]})},isApplicableSupportedModifiers:function(e){var t=e.modifierTypes,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return Ae[e]&&Ae[e].isApplicable({properties:n,layout:r})})},measureBase:ge,limitedSorting:function(e){var t=e.measures,n=e.properties,r=e.layout,o=!1,i=!1;return t.forEach(function(e){var t=ze(e);Ue({modifiers:t,properties:n,layout:r})&&(o=!0,i=i||Ze({modifiers:t,properties:n,layout:r}))}),o&&!i},ifEnableTotalsFunction:je};var qe={};function Te(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.model,r=e.properties,o=e.isSnapshot,a=void 0!==o&&o,s=e.masterItem,l=!1;qe[n.id]=qe[n.id]||{isFirstTime:!0};var c=qe[n.id].isFirstTime;if(qe[n.id].isFirstTime=!1,r&&"object"===Me(r))return ke({model:n,properties:r});var u=n?n.layout:void 0,d=i(u,"qSelectionInfo.qInSelections");if(a||d)return Promise.resolve(l);var p=i(u,"qHyperCube.qMeasureInfo"),f=qe[n.id].lastReloadTime;if(qe[n.id].lastReloadTime=i(n,"app.layout.qLastReloadTime"),Ne({measures:p,layout:u})){var h=function(e){var t=e.measures,n=e.layout,r=e.lastReloadTime;return i(e.model,"app.layout.qLastReloadTime")!==r&&function(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ge({measure:e,properties:n,layout:r})})}({measures:t,layout:n})}({measures:p,layout:u,model:n,lastReloadTime:f});return h||function(e){var t=e.measures,n=e.layout,r=e.masterItem,o=e.isFirstTime;return!!Array.isArray(t)&&(o||r||t.some(function(e){return function(e){var t=e.measure,n=e.layout;return Ue({modifiers:ze(t),layout:n})?!t.base:!!t.base}({measure:e,layout:n})}))}({measures:p,layout:u,masterItem:s,isFirstTime:c})?n.getEffectiveProperties().then(function(e){var r=t()(!0,{},e);$e(r);var o=Qe(r);return Ye({model:n}).then(function(t){return Ke({libraryIds:o,model:n}).then(function(o){return h&&function(e){var t=e.properties;Fe(t).forEach(function(e){return function(e){var t=e.measure;if(Ge({measure:t,properties:e.properties})){var n=0,r=t.qDef.modifiers;Array.isArray(r)&&r.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(n++,"object"!==Me(Ae[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(n>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");var r=Ae[e.type].extractInputExpression({outputExpression:t.qDef.qDef,modifier:e});void 0!==r&&He(t)&&w.simplifyExpression(t.qDef.base.qDef)!==w.simplifyExpression(r)&&(t.qDef.base.qDef=r)}})}}({measure:e,properties:t})})}({properties:r}),ke({model:n,oldProperties:e,properties:r,runUpdateIfChange:!0,masterItem:s,libraryItemsProps:o,dimensionAndFieldList:t})})})}):Promise.resolve(l)}return function(e){return!!Array.isArray(e)&&e.some(function(e){return"object"===Me(e.base)})}(p)?n.getEffectiveProperties().then(function(e){return function(e){var n=e.model,r=e.properties,o=Qe(r);return et({model:n,libraryIds:o}).then(function(){var e=t()(!0,{},r);return Fe(r).forEach(function(e){return Oe(e)}),Je({oldProperties:e,newProperties:r,model:n})})}({model:n,properties:e})}):Promise.resolve(l)}function ke(e){var n=e.model,r=e.oldProperties,o=e.properties,a=e.measures,s=e.runUpdateIfChange,l=void 0!==s&&s,c=e.masterItem,u=e.libraryItemsProps,d=e.dimensionAndFieldList;void 0===r&&(r=l?t()(!0,{},o):o),$e(o);var p=Qe(o);return et({model:n,libraryIds:p,masterItem:c}).then(function(){return function(e){var n=e.measures,r=e.properties,o=e.model,a=e.libraryItemsProps,s=e.dimensionAndFieldList;if(n||(n=Fe(r)),!n.length)return Promise.resolve();if(!Ne({measures:n,properties:r}))return n.forEach(function(e){return Oe(e)}),Promise.resolve();var l=a?void 0:Qe(r);return Ye({model:o,dimensionAndFieldList:s}).then(function(e){return Ke({libraryIds:l,model:o,libraryItemsProps:a}).then(function(o){n.forEach(function(n){Ue({modifiers:n.qDef.modifiers,properties:r})?(function(e){var n=e.measure,r=e.properties,o=e.libraryItemsProps,a=e.dimensionAndFieldList,s=0;Re.isValid(n)||Re.initBase(n,!0);var l=n.qDef,c=l.modifiers,u=l.base;Array.isArray(c)&&c.forEach(function(e){if("object"===Me(e)&&!e.disabled){if(s++,"object"!==Me(Ae[e.type]))throw new Error('Modifier "'.concat(e.type,'" is not available'));if(s>1)throw new Error("More than 1 modifier on a measure! (not yet supported)");Ae[e.type].initModifier(e,n);var l=n.qLibraryId||u&&u.qLibraryId;l?function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList,a=e.libraryItemsProps[e.libraryId],s=a.qMeasure.qDef,l=""===s?s:Ae[r.type].generateExpression({expression:s,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=l,n.qDef.qDef=r.outputExpression,(n.qDef.qLabel||a.qMeasure.qLabel)&&(n.qDef.qLabel=a.qMeasure.qLabel),(n.qDef.qLabelExpression||a.qMeasure.qLabelExpression)&&(n.qDef.qLabelExpression=a.qMeasure.qLabelExpression),n.qDef.quarantine&&n.qDef.quarantine.qNumFormat&&a.qMeasure.qNumFormat&&(n.qDef.qNumFormat=a.qMeasure.qNumFormat,n.qDef.isCustomFormatted=a.qMeasure.isCustomFormatted),delete n.qLibraryId,n.qDef.coloring=a.qMeasure.coloring,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,libraryId:l,properties:r,libraryItemsProps:o,dimensionAndFieldList:a}):function(e){var n=e.measure,r=e.modifier,o=e.properties,i=e.dimensionAndFieldList;"function"==typeof Ae[r.type].updateModifier&&Ae[r.type].updateModifier(r,o.qHyperCubeDef);var a=ge.getExpression(n),s=""===a?a:Ae[r.type].generateExpression({expression:a,modifier:r,properties:o,dimensionAndFieldList:i});r.outputExpression=s,n.qDef.qDef=r.outputExpression,n.qDef.base.qLabelExpression?n.qDef.qLabelExpression=n.qDef.base.qLabelExpression:n.qDef.qLabel=n.qDef.base.qLabel||a,r.base=t()(!0,{},n.qDef.base)}({measure:n,modifier:e,properties:r,dimensionAndFieldList:a}),function(e){var t=i(e,"qDef.qAggrFunc");"Expr"!==t||je(e)?"None"!==t?delete e.qDef.base.qAggrFunc:"None"===t&&je(e)&&"Expr"===e.qDef.base.qAggrFunc&&(e.qDef.qAggrFunc="Expr",delete e.qDef.base.qAggrFunc):(e.qDef.qAggrFunc="None",e.qDef.base.qAggrFunc="Expr")}(n)}})}({measure:n,properties:r,libraryItemsProps:o,dimensionAndFieldList:e}),Ve(n)):Oe(n)})})})}({measures:a,properties:o,model:n,libraryItemsProps:u,dimensionAndFieldList:d}).then(function(){return l?Je({oldProperties:r,newProperties:o,model:n}):Promise.resolve(!1)})})}function Oe(e){!function(e){var t=ze(e);return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&!Ae[e.type]})}(e)?Re.restoreBase(e):delete e.qDef.base,e.qDef.coloring&&delete e.qDef.coloring,Ve(e)}function Ne(e){var t=e.measures,n=e.properties,r=e.layout;return!!Array.isArray(t)&&t.some(function(e){return Ue({modifiers:ze(e),properties:n,layout:r})})}function _e(e){var t=ze(e);if(Array.isArray(t))for(var n=0;n<t.length;n++){var r=t[n];if(Ae[r.type]&&!r.disabled)return r}}function je(e){var t=_e(e);return!t||Ae[t.type].enableTotalsFunction(e)}function Fe(e){return i(e,"qHyperCubeDef.qMeasures",[]).concat(i(e,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",[]))}function ze(e){return e.modifiers||e.qDef&&e.qDef.modifiers}function We(e){return i(e,"outputExpression.qValueExpression.qExpr")||i(e,"outputExpression")}function $e(e){Fe(e).forEach(function(e){return function(e){var n=_e(e);n&&(void 0!==n.outputExpression&&We(n)!==e.qDef.qDef?delete e.qDef.base:!Re.isValid(e)&&n.base&&(e.qDef.base=t()(!0,{},n.base)))}(e)})}function Ve(e){var t=ze(e);Array.isArray(t)&&t.forEach(function(t){"object"===Me(t)&&(t.disabled||!Ae[t.type]&&We(t)!==e.qDef.qDef)&&(t.disabled=!0,delete t.base)})}function He(e){return e.base||e.qDef&&e.qDef.base}function Be(e){var t=He(e);return e.qLibraryId||t&&t.qLibraryId}function Ge(e){var t=e.measure,n=e.properties,r=e.layout;return!Be(t)&&Ue({modifiers:ze(t),properties:n,layout:r})}function Ue(e){var t=e.modifiers,n=e.properties,r=e.layout,o={};return Array.isArray(t)&&t.some(function(e){return!("object"!==Me(e)||e.disabled||!Ae[e.type])&&(void 0===o[e.type]&&(o[e.type]=Ae[e.type].isApplicable({properties:n,layout:r})),o[e.type])})}function Ye(e){var t=e.model,n=e.dimensionAndFieldList;if(n)return Promise.resolve(n);var r=[],o={},i=t.app.getDimensionList().then(function(e){o.dimensionList=e});r.push(i);var a=t.app.getFieldList().then(function(e){o.fieldList=e});return r.push(a),Promise.all(r).then(function(){return o})}function Ke(e){var t=e.libraryIds,n=e.model,r=e.libraryItemsProps;if(r)return Promise.resolve(r);var o=t.measureLibraryIds,i=t.dimensionLibraryIds,a={},s=[];return o.forEach(function(e){var t=n.app.getMeasure(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),i.forEach(function(e){var t=n.app.getDimension(e).then(function(t){return t.getProperties().then(function(t){a[e]=t})});s.push(t)}),Promise.all(s).then(function(){return a})}function Xe(e,t){if(""!==t||-1===["qFmt","qDec","qThou"].indexOf(e))return t}function Je(e){var t=e.oldProperties,n=e.newProperties,r=e.model,o=JSON.stringify(i(t,"qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qMeasures"),Xe)||JSON.stringify(i(t,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe)!==JSON.stringify(i(n,"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures"),Xe);return o?function(e){var t=e.model,n=e.oldProperties,r=e.newProperties,o=t.layout;return o&&!o.qHasSoftPatches&&!o.qExtendsId&&i(o,"qMeta.privileges",[]).indexOf("update")>-1?t.setProperties(r):k(t,n,r)}({model:r,oldProperties:t,newProperties:n}).then(function(){return o}):Promise.resolve(o)}function Ze(e){var t=e.modifiers,n=e.properties,r=e.layout;return Array.isArray(t)&&t.some(function(e){return"object"===Me(e)&&!e.disabled&&Ae[e.type]&&Ae[e.type].needDimension({modifier:e,properties:n,layout:r})})}function Qe(e){var t=Fe(e),n=[],r=[],o=!1;return t.forEach(function(t){var r=ze(t);if(Ue({modifiers:r,properties:e})){var i=Be(t);i&&n.push(i),o=o||Ze({modifiers:r,properties:e})}}),i(e,"qHyperCubeDef.qDimensions",[]).forEach(function(e){var t=e.qLibraryId;t&&r.push(t)}),{measureLibraryIds:n,dimensionLibraryIds:r}}function et(e){var t=e.model,n=e.libraryIds;return!e.masterItem&&n&&(n.measureLibraryIds.length||n.dimensionLibraryIds.length)?(qe[t.id].masterItemSubscriber=qe[t.id].masterItemSubscriber||function(e){var t=e.model,n=e.callback,r={},o={},a={},s={dimension:["qDim.qFieldDefs"],measure:["qMeasure.qDef","qMeasure.qLabel","qMeasure.qLabelExpression","qMeasure.coloring","qMeasure.qNumFormat","qMeasure.isCustomFormatted"]};function l(e){var t={},n=i(e,"qInfo.qType");return n&&s[n]&&s[n].forEach(function(n){t[n]=i(e,n)}),JSON.stringify(t)}function c(e){var t=e.qInfo.qId;if(r[t]){var o=l(e);r[t].properties!==o&&(r[t].properties=o,"function"==typeof n&&r[t].enabled&&n(e)),r[t].enabled=!0}}function u(e,n){return t.app[n](e).then(function(t){r[e]={listener:t.layoutSubscribe(c),enabled:!1,properties:l(t.layout)}})}return{subscribe:function(e){var n=e.measureLibraryIds,i=e.dimensionLibraryIds,s=[];return function(e){var t=e.dimensionLibraryIds;o={},e.measureLibraryIds.forEach(function(e){o[e]=!0}),a={},t.forEach(function(e){a[e]=!0})}({measureLibraryIds:n,dimensionLibraryIds:i}),Object.keys(r).forEach(function(e){o[e]||a[e]||(r[e].listener.dispose(),delete r[e])}),t.app&&(Object.keys(o).forEach(function(e){o[e]&&!r[e]&&s.push(u(e,"getMeasure"))}),Object.keys(a).forEach(function(e){a[e]&&!r[e]&&s.push(u(e,"getDimension"))})),Promise.all(s)},unsubscribe:function(){Object.keys(r).forEach(function(e){r[e].listener.dispose()}),r={}}}}({model:t,callback:function(e){return Te({model:t,masterItem:e}).then(function(){return t.app.clearUndoBuffer()})}}),qe[t.id].masterItemSubscriber.subscribe(n)):Promise.resolve()}})(),t.default=o.default,Object.defineProperty(t,"__esModule",{value:!0})})()}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r={};return(()=>{function e(t){var n,r=t;return r>9?(n=65+r-10)>90&&(n+=6):r="".concat(r).charCodeAt(0),[48,111,79,105,73,108].indexOf(n)>-1?e(r+1):String.fromCharCode(n)}function t(n){var r=e(n%62),o=Math.floor(n/62);return o>0?t(o)+r:r}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}n.d(r,{default:()=>$e});const i={getValue:function(e,t,n){if(null==e||null==t)return n;for(var r=t.split("."),o=e,i=0;i<r.length;++i){var a=r[i];if(""!==a){if(void 0===o[a]||null===o[a])return n;o=o[a]}}return o},setValue:function(e,t,n){if(null!=e&&null!=t){for(var r=t.split("."),o=r[r.length-1],i=e,a=0;a<r.length-1;++a){var s=r[a];void 0!==i[s]&&null!==i[s]||(i[s]=Number.isNaN(+r[a+1])?{}:[]),i=i[s]}void 0!==n?i[o]=n:delete i[o]}},isEmpty:function(e){return 0===Object.keys(e).length&&e.constructor===Object},isAtomicValue:function(e){return/boolean|number|string/.test(o(e))},generateId:function(){return t(Math.round(99e11*Math.random()+1e11)).replace(/\W/g,"")}};function a(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}}(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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function l(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return r;return-1}return-1}const d={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;var n=e.indexOf(t[0]);if(-1!==n){for(var r=0;r<t.length;r++){var o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){var n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){var n,r=0;for(n=0;n<e.length;++n)e[n]>t?--e[n]:e[n]===t&&(r=n);return e.splice(r,1),r},findItemByPropertyValue:function(e,t,n){if(e){for(var r=0;r<e.length;r++)if(e[r][t]===n)return e[r];return null}return null},findIndexByPropertyValue:u};var p=n(8),f=n.n(p);const h=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.dimensions).push.apply(t,a(r.qDimensions));var s,l=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qDimensions");l&&(s=o.excludedDimensions).push.apply(s,a(l))},m=function(e){var t,n=e.exportFormat,r=e.qHyperCubeDef,o=n.data[0];(t=o.measures).push.apply(t,l(r.qMeasures));var a,s=i.getValue(r,"qLayoutExclude.qHyperCubeDef.qMeasures");s&&(a=o.excludedMeasures).push.apply(a,l(s))},g=function(e){var t=e.exportFormat,n=e.qHyperCubeDef,r=t.data[0];n.qInterColumnSortOrder||(n.qInterColumnSortOrder=[]),r.interColumnSortOrder=n.qInterColumnSortOrder.concat();var o=i.getValue(n,"qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder");o&&d.isOrderedSubset(o,r.interColumnSortOrder)&&(r.interColumnSortOrder=o.concat())},v=function(e){var t=e.exportFormat,n=e.properties;Object.keys(n).forEach(function(e){t.properties[e]=n[e]})},b=function(e){var t=e.exportFormat,n=e.properties;n.qLayoutExclude||(n.qLayoutExclude={}),n.qLayoutExclude.disabled&&(Object.keys(n.qLayoutExclude.disabled).forEach(function(e){t.properties.hasOwnProperty(e)||(t.properties[e]=n.qLayoutExclude.disabled[e])}),delete n.qLayoutExclude.disabled),n.qLayoutExclude.changed&&(function(e){Object.keys(e.qLayoutExclude.changed).forEach(function(t){e.qLayoutExclude.changed[t].to===i.getValue(e,t)&&i.setValue(e,t,e.qLayoutExclude.changed[t].from)})}(n),delete n.qLayoutExclude.changed),n.qLayoutExclude.quarantine&&!i.isEmpty(n.qLayoutExclude.quarantine)||delete n.qLayoutExclude},y=function(e){e.forEach(function(e){f().cleanUpMeasure(e),e.qDef.modifiers&&(e.store={modifiers:e.qDef.modifiers},delete e.qDef.modifiers)})};function x(e,t,n){var r,o,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=i.getValue(e,t);if(!i.isAtomicValue(s))try{if((o=(o=(r=JSON.stringify(s)).match(/:\{/g))?o.length:0)>2&&!a)return;s=JSON.parse(r)}catch(e){return}i.getValue(e,"qLayoutExclude.quarantine")||i.setValue(e,"qLayoutExclude.quarantine",{});var l=i.getValue(e,"qLayoutExclude.quarantine");l[n]||(l[n]={}),l[n][t]=s}var S=n(909),w=n.n(S);function C(e,t){var n=w()(!0,{},t,e);return i.getValue(n,"qOtherTotalSpec.qOtherCounted")||i.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),i.getValue(n,"qOtherTotalSpec.qOtherLimit")||i.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function E(e,t){return w()(!0,{},t,e)}function I(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var D=Math.pow(2,53)-1;function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const M=function(e,t,n){var r="masterobject"===i.getValue(t,"properties.qInfo.qType")?"masterobject":i.getValue(n,"qInfo.qType");i.setValue(e,"qInfo.qType",r),e.visualization=n.visualization},A=function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},P=function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},q=function(){return{qDef:{autoSort:!0,cId:"",othersLabel:"Others"},qLibraryId:"",qNullSuppression:!1,qOtherLabel:"Others",qOtherTotalSpec:{qOtherLimitMode:"OTHER_GE_LIMIT",qOtherMode:"OTHER_OFF",qOtherSortMode:"OTHER_SORT_DESCENDING",qSuppressOther:!1}}},T=function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},k=function(e){var t,n=e.exportFormat,r=e.maxDimensions,o=e.minDimensions,i=e.newHyperCubeDef,a=e.defaultDimension,s=n.data[0];for(t=0;t<s.dimensions.length;++t){var l=C(s.dimensions[t],a);i.qDimensions.length<r?i.qDimensions.push(l):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(l)}for(t=0;t<s.excludedDimensions.length;++t){var c=C(s.excludedDimensions[t],a);i.qDimensions.length<o?i.qDimensions.push(c):i.qLayoutExclude.qHyperCubeDef.qDimensions.push(c)}},O=function(e){var t,n=e.exportFormat,r=e.maxMeasures,o=e.minMeasures,i=e.newHyperCubeDef,a=e.defaultMeasure,s=n.data[0];for(t=0;t<s.measures.length;++t){var l=E(s.measures[t],a);i.qMeasures.length<r?i.qMeasures.push(l):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(l)}for(t=0;t<s.excludedMeasures.length;++t){var c=E(s.excludedMeasures[t],a);i.qMeasures.length<o?i.qMeasures.push(c):i.qLayoutExclude.qHyperCubeDef.qMeasures.push(c)}},N=function(e){var t=e.exportFormat,n=e.dataDefinition,r=void 0===n?{}:n,o=t.data[0],i=r.dimensions||{max:0},a=r.measures||{max:0},s=I(a.max,o.dimensions.length,D),l=I(a.min,o.dimensions.length,0);return{maxDimensions:I(i.max,s,D),minDimensions:I(i.min,l,0),maxMeasures:s,minMeasures:l}},_=function(e){var t=e.exportFormat,n=e.newHyperCubeDef,r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();var i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(d.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,d.indexRemoved(n.qInterColumnSortOrder,i))},j=function(e){var t=e.exportFormat,n=e.initialProperties,r=e.hypercubePath,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach(function(e){"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=w()(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?i.setValue(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)||function(e,t){return"components"===t&&Array.isArray(e[t])&&e[t].some(function(e){return"general"===e.key})}(t.properties,e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]}),null===(o=w()(!0,{},n,o)).components&&(o.components=[]),o},F=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=t.data[0];return a.dimensions.length>n&&n>0||a.measures.length>o&&o>0||a.excludedDimensions.length>0&&a.dimensions.length+a.excludedDimensions.length>r||a.excludedMeasures.length>0&&a.measures.length+a.excludedMeasures.length>i||!o&&a.measures.length>0||!n&&a.dimensions.length>0},z=function(e){var t=e.exportFormat,n=e.maxDimensions,r=e.minDimensions,o=e.maxMeasures,i=e.minMeasures,a=e.newHyperCubeDef,s=t.data[0];a.qLayoutExclude||(a.qLayoutExclude={}),a.qLayoutExclude.qHyperCubeDef||(a.qLayoutExclude.qHyperCubeDef={}),(s.dimensions.length>n&&n>0||s.excludedDimensions&&s.excludedDimensions.length&&s.dimensions.length+s.excludedDimensions.length>r)&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(s.measures.length>o&&o>0||s.excludedMeasures&&s.excludedMeasures.length&&s.measures.length+s.excludedMeasures.length>i)&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!o&&s.measures.length&&(a.qLayoutExclude.qHyperCubeDef.qMeasures||(a.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!n&&s.dimensions.length&&(a.qLayoutExclude.qHyperCubeDef.qDimensions||(a.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},W=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.dimensions&&"function"==typeof r.dimensions.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return L(e)}(t=a.qDimensions)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}(t)||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.")}();a.qDimensions=[],s.forEach(function(e){a.qDimensions.push(e),r.dimensions.added(e,n)})}},$=function(e){var t,n=e.newProperties,r=e.dataDefinition,o=e.hypercubePath;if(r.measures&&"function"==typeof r.measures.added){var a=i.getValue(n,o||"").qHyperCubeDef,s=function(e){if(Array.isArray(e))return R(e)}(t=a.qMeasures)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(t)||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.")}();a.qMeasures=[],s.forEach(function(e){a.qMeasures.push(e),r.measures.added(e,n)})}},V=function(e){var t=e.measures,n=e.modifierTypes;t&&n&&f().isSupportedModifiers(n)&&t.forEach(function(e){e.store&&e.store.modifiers&&(e.qDef.modifiers=e.store.modifiers),delete e.store})};function H(e,t){var n=i.getValue(e,"qLayoutExclude.quarantine",{})[t];return!!n&&(Object.keys(n).forEach(function(t){i.setValue(e,t,n[t])}),delete e.qLayoutExclude.quarantine[t],!0)}const B={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t={data:[],properties:{}},n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),a=t.qProperty,s=i.getValue(a,n||""),l=s.qHyperCubeDef;return l.qInterColumnSortOrder||(l.qInterColumnSortOrder=[]),h({exportFormat:o,qHyperCubeDef:l}),m({exportFormat:o,qHyperCubeDef:l}),g({exportFormat:o,qHyperCubeDef:l}),delete l.qLayoutExclude,v({exportFormat:o,properties:a}),n&&(o.properties.qHyperCubeDef=l,delete s.qHyperCubeDef),b({exportFormat:o,properties:a}),r||y(o.properties.qHyperCubeDef.qMeasures),Array.isArray(o.properties.filters)&&(x(o.properties,"filters","storedFilters",!0),delete o.properties.filters),o.properties.qHyperCubeDef.qContextSetExpression&&(x(o.properties,"qHyperCubeDef.qContextSetExpression","storedFilters"),o.properties.qHyperCubeDef.qContextSetExpression=""),o.properties.qHyperCubeDef.qDynamicScript&&o.properties.qHyperCubeDef.qDynamicScript.length&&(x(o.properties,"qHyperCubeDef.qDynamicScript","dynamicScript"),o.properties.qHyperCubeDef.qDynamicScript=[]),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=void 0===n?{}:n,o=e.dataDefinition,a=void 0===o?{}:o,s=e.defaultPropertyValues,l=void 0===s?{}:s,c=e.hypercubePath,u=e.extension,d=e.supportedFilters,p=void 0===d||d,f=e.isHCModifierSupported,h=void 0===f||f,m={qChildren:[]},g=j({exportFormat:t,initialProperties:r,hypercubePath:c}),v=i.getValue(r,c||"").qHyperCubeDef,b=i.getValue(g,c||"").qHyperCubeDef,y=N({exportFormat:t,dataDefinition:a}),x=y.maxDimensions,S=y.minDimensions,w=y.maxMeasures,C=y.minMeasures,E=l.defaultDimension,I=void 0===E?q():E,D=l.defaultMeasure,L=void 0===D?T():D;b.qDimensions.length=0,b.qMeasures.length=0,F({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C})&&z({exportFormat:t,maxDimensions:x,minDimensions:S,maxMeasures:w,minMeasures:C,newHyperCubeDef:b}),k({exportFormat:t,maxDimensions:x,minDimensions:S,newHyperCubeDef:b,defaultDimension:I}),O({exportFormat:t,maxMeasures:w,minMeasures:C,newHyperCubeDef:b,defaultMeasure:L}),W({newProperties:g,dataDefinition:a,hypercubePath:c}),$({newProperties:g,dataDefinition:a,hypercubePath:c}),_({exportFormat:t,newHyperCubeDef:b}),A("qMaxStackedCells",v,b),A("qNoOfLeftDims",v,b),P("qInitialDataFetch",v,b,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),P("qMode",v,b,"S"),P("qReductionMode",v,b,"N"),P("qSortbyYValue",v,b),P("qIndentMode",v,b),P("qShowTotalsAbove",v,b),M(g,t,r),m.qProperty=g;var R=i.getValue(u||{},"support.modifiers");return V({measures:b.qMeasures,modifierTypes:R}),p&&H(m.qProperty,"storedFilters"),"S"===b.qMode&&h&&H(m.qProperty,"dynamicScript"),m}};var G={cellBackgroundColor:!0,cellForegroundColor:!0,colorByAlternative:!0,colorByExpression:!0,tooltip:!0,urlLabel:!0,url:!0};function U(e,t,n,r){t=t||[];var o=u(e,r,n),i=u(t,r,n);if(-1!==o&&-1===i){var a=e.splice(o,1);t.push(a[0])}return t}function Y(e,t){return e.length!==t}const K={create:function(e,t){if(!e||!G[e])throw new Error("Attribute Expressions Util: ID required");var n={};return t&&Object.keys(t).forEach(function(e){n[e]=t[e]}),n.id=e,n.qAttribute=!0,n},moveByIdFromGroup:function(e,t,n,r,o){n=n||"qAttributeExpressions",o=o||"id";for(var i=0;i<e.length;i++){var a=e[i][n],s=t.length;if(U(a,t,r,o),Y(t,s))return t}return t},IDMAP:{CELL_BACKGROUND_COLOR:"cellBackgroundColor",CELL_FOREGROUND_COLOR:"cellForegroundColor",COLOR_BY_ALTERNATIVE:"colorByAlternative",COLOR_BY_EXPRESSION:"colorByExpression",TOOLTIP:"tooltip",CELL_LINK_LABEL:"urlLabel",CELL_LINK_URL:"url"}},X={getNumDimensions:function(e){return i.getValue(e,"qHyperCubeDef.qDimensions.length",0)},getNumMeasures:function(e){return i.getValue(e,"qHyperCubeDef.qMeasures.length",0)},wrapFieldName:function(e){return e.split(" ").length>1&&"="!==e[0]&&"["!==e[0]?"[".concat(e,"]"):e},getItemLabel:function(e){return e.label||e.name}},J={colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>0&&X.getNumMeasures(e)<=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>0},expression:function(e){return X.getNumMeasures(e)>=1}}},Z={colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}};var Q={scatterplot:Z,"sn-scatter-plot":Z,piechart:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumMeasures(e)>=1}}},linechart:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)<=1},expression:function(e){return X.getNumMeasures(e)>=1}}},map:{colorModeOptions:{primary:function(){return!0},dimension:function(e){return X.getNumDimensions(e)>=1},multiColor:function(e){return X.getNumMeasures(e)>1},measure:function(e){return X.getNumDimensions(e)>=1},expression:function(e){return X.getNumDimensions(e)>=1}}},distributionplot:{colorModeOptions:{primary:function(){return!0},dimension:function(){return!0},multiColor:function(){return!1},measure:function(){return!0},expression:function(e){return X.getNumDimensions(e)>=1}}}};function ee(e,t,n){if(Array.isArray(e[t])){var r=d.findIndexByPropertyValue(e[t],"id",n);r>=0&&e[t].splice(r,1)}else e[t]=[]}function te(e,t){var n=K.IDMAP.COLOR_BY_ALTERNATIVE;e.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)}),t.forEach(function(e){ee(e,"qAttributeDimensions",n),ee(e,"qAttributeExpressions",n)})}function ne(e,t){if(t){var n="="===t.charAt(0);e.color.altLabel=n?{qStringExpression:{qExpr:t.substr(1)}}:t}}function re(e){var t=e.properties,n=e.isDimension,r=e.dimensions,o=e.excludedDimensions,a=e.measures,s=e.label;te(r,o);var l=r[r.length-1];if(l){var c=n?i.getValue(t,"color.byDimDef"):i.getValue(t,"color.byMeasureDef"),u=i.getValue(t,"color.formatting.qNumFormat"),p=i.getValue(t,"color.formatting.isCustomFormatted");if(c){var f=K.create(K.IDMAP.COLOR_BY_ALTERNATIVE);switch(c.type){case"expression":!function(e){var t=e.attributeExpression,n=e.label,r=e.item,o=e.isDimension,i=e.qNumFormat,a=e.isCustomFormatted;t.label=n||r.label,o?t.qDef=r.key:(t.qExpression=r.key,i&&(t.qNumFormat=i,t.isCustomFormatted=a)),t.matchMeasure=r.activeMeasureIndex,t.label&&"="===t.label.charAt(0)&&(t.labelExpRef="color.altLabel")}({attributeExpression:f,label:s,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p});break;case"libraryItem":!function(e){var t=e.attributeExpression,n=e.measures,r=e.item,o=e.qNumFormat,i=e.isCustomFormatted;e.isDimension||(t.matchMeasure=d.findIndexByPropertyValue(n,"qLibraryId",r.key),o&&(t.qNumFormat=o,t.isCustomFormatted=i)),void 0!==r.expression?t.qExpression=r.expression:t.qLibraryId=r.key,t.colorMapRef=r.key}({attributeExpression:f,measures:a,item:c,isDimension:n,qNumFormat:u,isCustomFormatted:p})}n?(f.qSortBy={qSortByAscii:1},l.qAttributeDimensions.push(f)):l.qAttributeExpressions.push(f)}}}function oe(e,t,n,r){var o,i,a,s={};switch(e){case"dimension":n.qLibraryId?(s.type="dimension",s.name=n.qLibraryId,s.id=n.qLibraryId):(s.type="field",t?(s.name=n.label||n.qDef,s.id=n.qDef):(s.name=n.qDef.qFieldDefs[0],s.label=(a=n.qDef).qLabelExpression?a.qLabelExpression:a.qFieldLabels&&a.qFieldLabels[0]?a.qFieldLabels[0]:a.qFieldDefs[0]));break;case"measure":o=function(e,t){return t?e.qLibraryId:f().measureBase.getLibraryId(e)}(n,t),o?(s.type="measure",s.name=o,s.id=o,i=function(e,t){return f().hasActiveModifiers({measures:[e]})&&t?e.qDef.qDef:void 0}(n,r),i&&(s.expression=i)):(s.type="expression",t?(s.name=n.label||n.qExpression,s.id=n.qExpression):(s.name=n.qDef.qDef,s.label=function(e){var t=e.qDef;return t.qLabelExpression?t.qLabelExpression:t.qLabel?t.qLabel:t.qDef}(n)));break;default:throw new Error('columnType should be "dimension" or "measure"')}return s}const ie={useMasterNumberFormat:function(e){e.quarantine={qNumFormat:e.qNumFormat||{},isCustomFormatted:e.isCustomFormatted||!1},e.qNumFormat=null,e.isCustomFormatted=void 0}};function ae(e,t,n,r){var o=t.type,i=e.color,a=i.mode,s=X.getItemLabel(t);switch(ne(e,s||""),o){case"field":a="byDimension",i.byDimDef={label:t.label||X.wrapFieldName(t.name),key:X.wrapFieldName(t.name),type:"expression",activeDimensionIndex:t.activeDimensionIndex};break;case"expression":a="byMeasure",i.byMeasureDef={label:s,key:t.name,type:"expression",activeMeasureIndex:t.activeMeasureIndex};break;case"dimension":a="byDimension",i.byDimDef={label:t.name,key:t.id,type:"libraryItem",activeDimensionIndex:t.activeDimensionIndex};break;case"measure":a="byMeasure",i.byMeasureDef={label:t.name,key:t.id,expression:t.expression,type:"libraryItem",activeMeasureIndex:t.activeMeasureIndex},i.formatting&&ie.useMasterNumberFormat(i.formatting)}i.auto=!1,i.mode=a}function se(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byDimDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeDimensionIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"color.byDimDef");r.activeDimensionIndex=Math.min(r.activeDimensionIndex,n.length-1);var o=oe("dimension",!1,n[r.activeDimensionIndex]);o.activeDimensionIndex=r.activeDimensionIndex,ae(e,o)}(e,t);else if(function(e){return!e||!e.key}(a)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=n[function(e,t,n){var r=i.getValue(t,"visualization"),o=n.split("."),a=Number(o[1]),s=i.getValue(t,"layers.".concat(a,".type"));return 2===e.length&&"map"===r&&"point"===s}(n,e,t)?0:n.length-1],o=K.IDMAP.COLOR_BY_ALTERNATIVE,a=d.findItemByPropertyValue(r.qAttributeDimensions,"id",o);return ae(e,oe("dimension",!!a,a||r)),!!a}(e,t))return;re({properties:e,isDimension:!0,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byDimDef.label")})}const le=function(e,t,n){i.setValue(e,t,n),i.isAtomicValue(n)&&function(e,t,n){var r=e.qLayoutExclude;r&&(r.changed||(r.changed={}),r.changed[t]={from:i.getValue(e,t),to:n})}(e,t,n)},ce=function(e,t){var n={primary:!0};if(e){var r=(Q[t]||J).colorModeOptions||J.colorModeOptions;n.byDimension=r.dimension(e),n.byMeasure=r.measure(e),n.byMultiple=r.multiColor(e),n.byExpression=r.expression(e)}return n},ue=function(e){var t=e.canColorBy,n=e.autoColor,r=e.colorMode,o=e.dimensions;return!(t[r]&&!n&&("byDimension"!==r&&"byMeasure"!==r||!o.length))},de=function(e,t){var n,r=i.getValue(e,"color.mode"),o=i.getValue(e,"color.auto"),a=i.getValue(e,"".concat(t,"qDimensions"),[]),s=i.getValue(e,"".concat(t,"qMeasures"),[]),l=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);o?te(a,l):!(n={auto:o,colorMode:r,dimensions:a}).auto&&"byDimension"===n.colorMode&&n.dimensions.length>0?se(e,t):function(e){var t=e.auto,n=e.colorMode,r=e.dimensions,o=e.measures,a=e.properties,s=i.getValue(a,"visualization");return!(t||"byMeasure"!==n||!r.length||"map"!==s&&!o.length)}({auto:o,colorMode:r,dimensions:a,measures:s,properties:e})?function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]),a=i.getValue(e,"color.byMeasureDef");if(a&&ne(e,a.label),function(e){return!!(e&&e.activeMeasureIndex>-1)}(a))!function(e,t){var n=i.getValue(e,"".concat(t,"qMeasures"),[]),r=i.getValue(e,"color.byMeasureDef");if(r.activeMeasureIndex=Math.min(r.activeMeasureIndex,n.length-1),r.activeMeasureIndex>-1){var o=oe("measure",!1,n[r.activeMeasureIndex],!0);o.activeMeasureIndex=r.activeMeasureIndex,ae(e,o)}}(e,t);else if(function(e,t){return(!e||!e.key)&&t.length>0}(a,r)&&function(e,t){var n=i.getValue(e,"".concat(t,"qDimensions"),[]),r=i.getValue(e,"".concat(t,"qMeasures"),[]),o=n[n.length-1],a=K.IDMAP.COLOR_BY_ALTERNATIVE,s=d.findItemByPropertyValue(o.qAttributeExpressions,"id",a);return ae(e,oe("measure",!!s,s||r[0])),!!s}(e,t))return;re({properties:e,isDimension:!1,dimensions:n,excludedDimensions:o,measures:r,label:i.getValue(e,"color.byMeasureDef.label")})}(e,t):function(e,t){var n=i.getValue(e,"color.mode"),r=i.getValue(e,"".concat(t,"qDimensions"),[]),o=i.getValue(e,"".concat(t,"qMeasures"),[]),a=i.getValue(e,"".concat(t,"qLayoutExclude.qHyperCubeDef.qDimensions"),[]);"byMultiple"===n&&o.length<2&&i.setValue(e,"color.mode","primary"),te(r,a)}(e,t)},pe=function(e){e.forEach(function(e){e.qOtherTotalSpec&&"qTotalMode"in e.qOtherTotalSpec&&delete e.qOtherTotalSpec.qTotalMode})},fe=function(e){var t=e.shouldUpdateColorBy,n=e.properties,r=i.getValue(n,"qHyperCubeDef.qMeasures",[]),o=i.getValue(n,"color.mode","");return!t&&"byExpression"===o&&r.length>0},he=function(e){var t=i.getValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",[]),n=i.getValue(e,"color.colorExpression","");t.splice(0,0,{qExpression:n,id:"colorByExpression"}),i.setValue(e,"qHyperCubeDef.qMeasures.0.qAttributeExpressions",t)},me=function(e){i.setValue(e,"color.mode","primary"),i.setValue(e,"color.auto",!0)},ge=function(e){var t=i.getValue(e,"qHyperCubeDef.qDimensions",[]),n=i.getValue(e,"color.persistent",!1);return t.length>1&&!n},ve={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=B.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),i=o.data[0],a=i.dimensions.concat(i.excludedDimensions),s=i.measures.concat(i.excludedMeasures),l=K.IDMAP,c=l.COLOR_BY_ALTERNATIVE,u=l.COLOR_BY_EXPRESSION;return K.moveByIdFromGroup(a,[],"qAttributeDimensions",c),K.moveByIdFromGroup(a,[],"qAttributeExpressions",c),K.moveByIdFromGroup(s,[],"qAttributeExpressions",u),o},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,a=e.hypercubePath,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=B.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:a,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty,p=i.getValue(d,"visualization"),f=i.getValue(d,"qHyperCubeDef.qDimensions",[]),h=i.getValue(d,"color.mode",""),m=i.getValue(d,"color.auto",""),g=ce(d,p),v=ue({canColorBy:g,autoColor:m,colorMode:h,dimensions:f});return g[h]?fe({shouldUpdateColorBy:v,properties:d})&&he(d):me(d),v&&de(d,"qHyperCubeDef."),ge(d)&&le(d,"color.persistent",!0),pe(f),u}};var be=["bar","marker","line"];const ye=function(e){var t=e.initialProperties,n=e.properties;t.measureAxis&&void 0===t.measureAxis.autoMinMax?H(n,"unsupportedAutoMinMax")||w()(n.measureAxis,t.measureAxis):H(n,"supportedAutoMinMax")||w()(n.measureAxis,t.measureAxis)},xe=function(e){var t,n=e.exportFormat,r=e.initialProperties,o=e.properties,i=e.measureType,a=o.qHyperCubeDef,s=o.measureAxis;if(function(e){var t=e.initialProperties;return!(!e.exportFormat.properties.measureAxes||t.measureAxes||!t.measureAxis||void 0===t.measureAxis.autoMinMax)}({exportFormat:n,initialProperties:r})){var l=function(e){var t=[];return e.qMeasures.length>0&&e.qMeasures.forEach(function(e){if(e.qDef.series){var n=e.qDef.series,r=n.type,o=n.axis;t[o]||(t[o]={axis:o,type:{line:0,marker:0,bar:0,total:0}}),be.includes(r)&&t[o].type[r]++,t[o].type.total++}}),t}(a);l.length?(i&&(t=l.filter(function(e){return e.type[i]>0}).sort(function(e,t){return t.type[i]-e.type[i]})),t&&t.length||(t=l.sort(function(e,t){return t.type.total-e.type.total})),t&&t[0]&&w()(s,n.properties.measureAxes[t[0].axis])):w()(s,n.properties.measureAxes[0])}},Se=function(e){if(e.qDimensions.length>1){var t=e.qInterColumnSortOrder.indexOf(0);if(0!==t){var n=e.qInterColumnSortOrder[0];e.qInterColumnSortOrder[0]=0,e.qInterColumnSortOrder[t]=n}}},we={exportProperties:function(e){var t=e.propertyTree,n=e.hypercubePath,r=e.viewDataMode,o=e.supportedAutoMinMax,i=void 0===o||o,a=ve.exportProperties({propertyTree:t,hypercubePath:n,viewDataMode:r}),s=a.properties;return i?(x(s,"measureAxis.min","supportedAutoMinMax"),x(s,"measureAxis.max","supportedAutoMinMax")):(x(s,"measureAxis.min","unsupportedAutoMinMax"),x(s,"measureAxis.max","unsupportedAutoMinMax")),a},importProperties:function(e){var t=e.exportFormat,n=e.initialProperties,r=e.dataDefinition,o=e.defaultPropertyValues,i=e.hypercubePath,a=e.measureType,s=e.extension,l=e.supportedFilters,c=e.isHCModifierSupported,u=ve.importProperties({exportFormat:t,initialProperties:n,dataDefinition:r,defaultPropertyValues:o,hypercubePath:i,extension:s,supportedFilters:l,isHCModifierSupported:c}),d=u.qProperty;return ye({initialProperties:n,properties:d}),xe({exportFormat:t,initialProperties:n,properties:d,measureType:a}),Se(d.qHyperCubeDef),d.qHyperCubeDef.qColumnOrder=[],d.qHyperCubeDef.columnOrder=[],u}};function Ce(e,t,n){return"qLayoutExclude.quarantine.".concat(e,".").concat(t,".").concat(n)}function Ee(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,a);if(void 0!==s){var l=i.getValue(o,"qDef.cId");l||(l=i.generateId(),i.setValue(o,"qDef.cId",l));var c=Ce(n,r,l);i.setValue(t,c,s),i.setValue(o,a,void 0)}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}function Ie(e){var t=e.properties,n=e.arrayPath,r=e.quarantineName,o=e.arrayName,a=e.itemPath;i.getValue(t,n,[]).forEach(function(e){return function(e){var t=e.properties,n=e.quarantineName,r=e.arrayName,o=e.item,a=e.itemPath,s=i.getValue(o,"qDef.cId");if(s){var l=Ce(n,r,s),c=i.getValue(t,l);void 0!==c&&(i.setValue(o,a,c),i.setValue(t,l,void 0))}}({properties:t,quarantineName:r,arrayName:o,item:e,itemPath:a})})}var De="qHyperCubeDef.qMeasures",Le="conditionalColoring",Re="measures",Me="qDef.conditionalColoring";const Ae={quarantine:function(e){Ee({properties:e,arrayPath:De,quarantineName:Le,arrayName:Re,itemPath:Me})},unquarantine:function(e){Ie({properties:e,arrayPath:De,itemPath:Me,arrayName:Re,quarantineName:Le})}};var Pe="qHyperCubeDef.qMeasures",qe="measures",Te="qHyperCubeDef.qDimensions",ke="dimensions",Oe="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",Ne="alternativeMeasures",_e="qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",je="alternativeDimensions",Fe="qCalcCondition",ze="conditionalShowHide";const We={quarantine:function(e){Ee({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:qe,itemPath:Fe}),Ee({properties:e,arrayPath:Te,quarantineName:ze,arrayName:ke,itemPath:Fe})},unquarantine:function(e){Ie({properties:e,arrayPath:Pe,quarantineName:ze,arrayName:qe,itemPath:Fe}),Ie({properties:e,arrayPath:Te,quarantineName:ze,arrayName:ke,itemPath:Fe})},quarantineAlternative:function(e){Ee({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ee({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})},unquarantineAlternative:function(e){Ie({properties:e,arrayPath:Oe,quarantineName:ze,arrayName:Ne,itemPath:Fe}),Ie({properties:e,arrayPath:_e,quarantineName:ze,arrayName:je,itemPath:Fe})}},$e={hypercube:B,colorChart:ve,axisChart:we,quarantineProperty:x,unquarantineProperty:H,quarantineArrayProp:Ee,unquarantineArrayProp:Ie,conditionalColoring:Ae,conditionalShow:We}})(),r.default})()}(mA)),mA.exports),vA=qr(gA);const bA="qHyperCubeDef.qMeasures",yA="measures",xA="qHyperCubeDef.qDimensions",SA="dimensions",wA="qDef.representation",CA="tableRepresentation",EA="qDef.conditionalColoring",IA="conditionalColoring",DA="qMiniChartDef",LA="miniChartDef",RA=e=>{vA.unquarantineArrayProp({properties:e,arrayPath:xA,itemPath:wA,arrayName:SA,quarantineName:CA}),vA.unquarantineArrayProp({properties:e,arrayPath:bA,itemPath:wA,arrayName:yA,quarantineName:CA}),vA.unquarantineArrayProp({properties:e,arrayPath:bA,itemPath:EA,arrayName:yA,quarantineName:IA}),vA.unquarantineArrayProp({properties:e,arrayPath:bA,itemPath:DA,arrayName:yA,quarantineName:LA})},MA=e=>{vA.quarantineArrayProp({properties:e,arrayPath:xA,itemPath:wA,arrayName:SA,quarantineName:CA}),vA.quarantineArrayProp({properties:e,arrayPath:bA,itemPath:wA,arrayName:yA,quarantineName:CA}),vA.quarantineArrayProp({properties:e,arrayPath:bA,itemPath:EA,arrayName:yA,quarantineName:IA}),vA.quarantineArrayProp({properties:e,arrayPath:bA,itemPath:DA,arrayName:yA,quarantineName:LA})};function AA(e){const{translator:t}=e;return{targets:[{path:"/qHyperCubeDef",dimensions:{min:1,max:1e3,description(e,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return t.get(o)}},measures:{min:1,max:1e3,description:()=>t.get("Visualizations.Descriptions.Values")},filters:{description:()=>t.get("SimpleProperties.Filters.Filter")}}]}}const PA="qHyperCubeDef.qDimensions",qA="dimensions",TA="qOtherTotalSpec.qTotalMode",kA="totalMode",OA={quarantine(e){vA.quarantineArrayProp({properties:e,arrayPath:PA,quarantineName:kA,arrayName:qA,itemPath:TA})},unquarantine(e){vA.unquarantineArrayProp({properties:e,arrayPath:PA,quarantineName:kA,arrayName:qA,itemPath:TA})}};function NA(e){const t=AA(e);return(e,n,r,o)=>{const i=vA.hypercube.importProperties({exportFormat:e,initialProperties:n,dataDefinition:t.targets[0],hypercubePath:o}),a=i.qProperty.qHyperCubeDef.qDimensions.length,s=i.qProperty.qHyperCubeDef.qMeasures.length;let l,c=i.qProperty.qHyperCubeDef.qInterColumnSortOrder,u=!0;a+s===c.length&&lM(i,"qProperty.qLayoutExclude.quarantine.interColSortOrder",c.concat());const d=i.qProperty.qLayoutExclude.quarantine?.pivotInterColSortOrder;d?(c=d,l=[...d],lM(i,"qProperty.qHyperCubeDef.qInterColumnSortOrder",c),i.qProperty.qLayoutExclude.quarantine&&delete i.qProperty.qLayoutExclude.quarantine.pivotInterColSortOrder):c.length=0;const p=+(c.indexOf(-1)>-1),f=a+p;if(f>c.length)for(let e=c.length;e<f;e++)c.indexOf(e)<0&&c.push(e-p);for(let e=c.length-1;e>=0;e--)c[e]>=a&&c.splice(e,1);s>1&&c.indexOf(-1)<0?c.push(-1):s<2&&c.indexOf(-1)>-1&&c.splice(c.indexOf(-1),1);const h=i.qProperty.qHyperCubeDef.qNoOfLeftDims??-1;if(a>0&&-1===h&&lM(i,"qProperty.qHyperCubeDef.qNoOfLeftDims",a),l?.length===c.length){for(let e=0;e<l.length;e++)if(l[e]!==c[e]){u=!1;break}u&&(vA.unquarantineProperty(i.qProperty,"noOfLeftDims"),vA.unquarantineProperty(i.qProperty,"excludedNoOfLeftDims "))}return vA.unquarantineProperty(i.qProperty,"rankedList"),vA.conditionalShow.unquarantine(i.qProperty),OA.unquarantine(i.qProperty),RA(i.qProperty),vA.unquarantineProperty(i.qProperty,"pivotTableIndentMode"),i}}function _A(e,t){const n=e.qProperty.qHyperCubeDef.qInterColumnSortOrder,r=n.slice(),o=n.indexOf(-1);o>-1&&n.splice(o,1);const i=vA.hypercube.exportProperties({propertyTree:e,hyperCubePath:t}),a=i.properties.qHyperCubeDef,s=a.qDimensions.length,l=a.qMeasures.length;let c=a.qInterColumnSortOrder;lM(i,"properties.qLayoutExclude.quarantine.pivotInterColSortOrder",r),vA.quarantineProperty(i.properties,"qHyperCubeDef.qNoOfLeftDims","noOfLeftDims"),delete i.properties.qHyperCubeDef.qNoOfLeftDims,vA.quarantineProperty(i.properties,"qHyperCubeDef.rankedList","rankedList"),delete i.properties.qHyperCubeDef.rankedList;const u=i.properties.qLayoutExclude.quarantine?.interColSortOrder;u&&(c=u,lM(i,"properties.qHyperCubeDef.qInterColumnSortOrder",c),lM(i,"data.0.interColumnSortOrder",c),i.properties.qLayoutExclude.quarantine&&delete i.properties.qLayoutExclude.quarantine.interColSortOrder);for(let e=c.length;e<s+l;e++)c.length<=e&&c.push(e);return vA.quarantineProperty(i.properties,"qHyperCubeDef.qIndentMode","pivotTableIndentMode"),vA.quarantineProperty(i.properties,"qHyperCubeDef.excludedNoOfLeftDims ","excludedNoOfLeftDims "),vA.conditionalShow.quarantine(i.properties),OA.quarantine(i.properties),MA(i.properties),i}const jA=e=>({dimensions:{min:1,max:1e3,description(t,n,r){const o="rows"===r?.type?"Visualizations.Descriptions.Row":"Visualizations.Descriptions.Column";return e.translator.get(o)}},measures:{min:1,max:1e3,description:()=>e.translator.get("Visualizations.Descriptions.Values")}}),FA=["rows","columns","measures"],zA=e=>{const t=e.flags.isEnabled("SUPPORT-9810-MIGRATE-RANKED-LISTS"),n=e.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING");if(!t&&!n)return;const r=new fA({},e);return{properties(e){if(t&&"sn-pivot-table"===e.visualization&&(r.setProperties(e),FA.forEach(e=>{r.isRankedListCorrupt(e)&&r.createRankedList(e)})),n){const t=e.components?.find(e=>"theme"===e.key);t?.nullValues&&!t.dimensionNullValues&&(t.dimensionNullValues={...t.nullValues})}return e}}},WA={type:"items",component:"expandable-items",translation:"properties.addons",items:{dataHandling:{uses:"dataHandling",items:{calcCond:{uses:"calcCond"}}}}};let $A=function(e){return e.Text="text",e.Link="link",e.Image="image",e.ImagesInIndentMode="imagesInIndentMode",e.Indicator="indicator",e.MiniChart="miniChart",e.EditableText="editableText",e.EditableSelector="editableSelector",e.EditableDate="editableDate",e}({}),VA=function(e){return e.Attribute="attribute",e.Dimension="dimension",e}({});const HA=e=>{switch(e?.type){case"url":return $A.Link;case"image":return $A.Image;case"indicator":return $A.Indicator;case"miniChart":return $A.MiniChart;default:return $A.Text}},BA=({isImagesEnabled:e})=>({uses:"dimensionRepresentationItems.representationType",options(t,n,r){const{qIndentMode:o}=r.properties.qHyperCubeDef,i=[{value:"text",translation:"Object.Table.Representation.Text"},{value:"url",translation:"Object.Table.Representation.Link"}];return(!o&&e||o)&&i.push({value:"image",translation:"Object.Table.Representation.Image"}),i}}),GA=e=>{if(e)return{representationImage:{uses:"dimensionRepresentationItems.representationImage",show:e=>HA(e.qDef.representation)===$A.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]},imageBoxWidth:{ref:"qDef.representation.imageBox.width",translation:"properties.pivot.representation.image.imageBox.width",type:"number",expression:"optional",defaultValue:24,show:(e,t,n)=>{if(!n.properties.qHyperCubeDef)return!1;const{qInterColumnSortOrder:r,qNoOfLeftDims:o,qDimensions:i,qIndentMode:a}=n.properties.qHyperCubeDef;let s=!1;const l=i?.indexOf(e)??1/0;return(r?.slice(0,o)??[]).indexOf(l)>-1&&(s=!0),s&&a}}}}}},UA=e=>{const{anything:t}=e,n=!t.sense?.isUnsupportedFeature?.("tableImages");return{representationType:BA({isImagesEnabled:n}),representationUrlPosition:{uses:"dimensionRepresentationItems.representationUrlPosition",show:e=>HA(e.qDef.representation)===$A.Link},representationUrlLabel:{uses:"dimensionRepresentationItems.representationUrlLabel",show:e=>HA(e.qDef.representation)===$A.Link&&e.qDef.representation?.urlPosition===VA.Dimension},representationLinkUrl:{uses:"dimensionRepresentationItems.representationLinkUrl",show:e=>HA(e.qDef.representation)===$A.Link&&e.qDef.representation?.urlPosition===VA.Attribute},...GA(n)}},YA=(e,t)=>{const{anything:n}=e,r=n.sense?.isUnsupportedFeature,o=!r?.("tableImages")&&t[$A.Image],i=!r?.("qMiniChartDef")&&t[$A.MiniChart],a=!r?.("tableIndicators")&&t[$A.Indicator],s=o&&t[$A.ImagesInIndentMode];return{representationType:{uses:"measureRepresentationItems.representationType",options:(e,t,n)=>(e=>{const{qIndentMode:t}=e.properties.qHyperCubeDef??{},n=[{value:"text",translation:"Object.Table.Representation.Text"}];return(!t&&o||t&&s)&&n.push({value:"image",translation:"Object.Table.Representation.Image"}),a&&n.push({value:"indicator",translation:"Object.Table.Representation.Indicator"}),i&&n.push({value:"miniChart",translation:"Common.MiniChart"}),n})(n)},representationImage:o?{uses:"measureRepresentationItems.representationImage",show:e=>HA(e.qDef.representation)===$A.Image,items:{imageSize:{options:[{value:"alwaysFit",translation:"properties.backgroundImage.sizeAlwaysFit"},{value:"fitWidth",translation:"properties.backgroundImage.sizeFitWidth"},{value:"fitHeight",translation:"properties.backgroundImage.sizeFitHeight"},{value:"fill",translation:"properties.backgroundImage.sizeStretch"},{value:"originalSize",translation:"properties.backgroundImage.originalSize"}]}}}:void 0,representationIndicator:a?{uses:"measureRepresentationItems.representationIndicator"}:void 0,representationMiniChart:i?{uses:"measureRepresentationItems.representationMiniChart"}:void 0}};let KA=function(e){return e.Dimension="dimensions",e.Measures="measures",e.Pivot="pivot",e}({}),XA=function(e){return e.CellForegroundColor="cellForegroundColor",e.CellBackgroundColor="cellBackgroundColor",e.ImageUrl="imageUrl",e.ImageLabel="imageLabel",e.Link="url",e.LinkLabel="urlLabel",e}({}),JA=function(e){return e.TopGrid="topGrid",e.LeftGrid="leftGrid",e.DataGrid="dataGrid",e}({}),ZA=function(e){return e.Forward="forward",e.Backward="backward",e.None="none",e}({});const QA="image",eP=(e,t,n)=>{if(!n.properties.qHyperCubeDef.qIndentMode)return!0;const r=n.properties.qHyperCubeDef.qInterColumnSortOrder?.indexOf(-1)??-1;let o=n.properties.qHyperCubeDef.qNoOfLeftDims??-1;r>-1&&r<o&&(o-=1);const i=n.properties.qHyperCubeDef.qDimensions.indexOf(e);return 0===i||i>=o},tP=()=>({type:{type:"string",component:"dropdown",ref:"qDef.columnWidth.type",translation:"Object.Table.Column.Width",options:[{value:jD.Auto,translation:"Common.Auto"},{value:jD.FitToContent,translation:"Object.Table.Column.FitToContent"},{value:jD.Pixels,translation:"Object.Table.Column.Pixels"},{value:jD.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:jD.Auto},sizePixels:{ref:"qDef.columnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:_D.PixelsDefault,show:e=>e.qDef.columnWidth?.type===jD.Pixels},sizePercentage:{ref:"qDef.columnWidth.percentage",translation:"Object.Table.Column.Percentage",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:_D.PercentageDefault,show:e=>e.qDef.columnWidth?.type===jD.Percentage}}),nP=({key:e,translation:t,env:n})=>{const r=!n.anything.sense?.isUnsupportedFeature?.("tableImages");return{[`${e}Auto`]:{ref:`qDef.${e}.auto`,type:"boolean",component:"switch",translation:t,options:[{value:!0,translation:"Common.Auto"},{value:!1,translation:"Common.Custom"}],defaultValue:!0,show:t=>!r||"labelTextAlign"===e||t.qDef.representation?.type!==QA},[e]:{ref:`qDef.${e}.align`,type:"string",component:"item-selection-list",horizontal:!0,items:[{component:"icon-item",icon:"align_left",labelPlacement:"bottom",value:"left",translation:"properties.dock.left"},{component:"icon-item",icon:"align_center",labelPlacement:"bottom",value:"center",translation:"Common.Center"},{component:"icon-item",icon:"align_right",labelPlacement:"bottom",value:"right",translation:"properties.dock.right"}],defaultValue:"left",show:t=>void 0!==t.qDef[e]&&!t.qDef[e].auto&&(!r||"labelTextAlign"===e||t.qDef.representation?.type!==QA)}}},rP="TOTAL_OFF",oP={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:XA.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:XA.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},iP="TOTAL_OFF",aP={component:"attribute-expression-reference",defaultValue:[],ref:"qAttributeExpressions",items:[{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.BackgroundExpression",defaultValue:"",id:XA.CellBackgroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",translation:"Object.Table.Measure.ForegroundExpression",defaultValue:"",id:XA.CellForegroundColor},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.LinkLabel,tid:"URLLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.Link,tid:"URLByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.ImageLabel,tid:"ImageLabelByExpression",show:!1},{component:"expression",ref:"qExpression",expressionType:"measure",defaultValue:"",id:XA.ImageUrl,tid:"ImageUrlByExpression",show:!1}]},sP=e=>{const{translator:t,anything:n,flags:r}=e,o=(e=>{const{translator:t,anything:n,flags:r}=e;return{type:"items",component:"data-assets-panel-pivot",translation:"Common.Data",items:{dimensions:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qDimensions",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:rP,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:rP,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&eP},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==rP&&eP(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode}}},presentation:{type:"items",translation:"properties.presentation",grouped:e.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT"),items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...r.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:oP}},alignmentAndRepresentationAndResize:{type:"items",items:{...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...UA(e),...tP()}}}:{cellColoring:oP,...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...UA(e),...tP()}}}}},measures:{type:"array",component:"expandable-items",ref:"qHyperCubeDef.qMeasures",items:{field:{type:"items",translation:"Common.Field",items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"}}},presentation:{type:"items",translation:"properties.presentation",grouped:e.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT"),items:{visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},...r.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?{headerColoring:{type:"items",items:{headerText:{component:"text",translation:"properties.Header",style:"sHeader"},headerBackground:{ref:"qDef.headerColor.background",translation:"Object.Table.Measure.BackgroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""},headerForeground:{ref:"qDef.headerColor.foreground",translation:"Object.Table.Measure.ForegroundExpression",component:"expression",expressionType:"StringExpression",defaultValue:""}}},contentColoring:{type:"items",items:{contentText:{component:"text",translation:"properties.Content",style:"sHeader"},cellColoring:oP}},alignmentAndRepresentationAndResize:{type:"items",items:{...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...YA(e,{[$A.Image]:!0,[$A.Indicator]:!0}),...tP()}}}:{cellColoring:oP,...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...YA(e,{[$A.Image]:!0,[$A.Indicator]:!0}),...tP()}}}}},filter:{type:"object",component:"filter-item-react",ref:"filter",tabName:"SimpleProperties.Filters.Filters"}}}})(e);return r.isEnabled("CLIENT_IM5974_PIVOT_DATA_PROPERTIES")?o:{type:"items",component:"pivot-data",translation:"properties.data",addTranslation:"Property.AddData",items:{dimensions:{type:"array",component:"dimensions",translation:"Common.Dimensions",alternativeTranslation:"properties.alternative.dimensions",ref:"qHyperCubeDef.qDimensions",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qDimensions",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.dimensions.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"dimension",ref:"qLibraryId",translation:"Common.Dimension",show:e=>!!e.qLibraryId},inlineDimension:{component:"inline-dimension",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},nullSuppression:{type:"boolean",ref:"qNullSuppression",defaultValue:!1,translation:"properties.dimensions.showNull",inverted:!0},totalMode:{type:"string",component:"switch",translation:"properties.showTotals",ref:"qOtherTotalSpec.qTotalMode",defaultValue:iP,trueOption:{value:"TOTAL_EXPR",translation:"properties.on"},falseOption:{value:iP,translation:"properties.off"},show:!n.sense?.isUnsupportedFeature?.("totals")&&eP},totalsLabel:{type:"string",component:"expression",expressionType:"StringExpr",ref:"qTotalLabel",translation:"properties.totals.label",defaultValue:()=>t.get("Object.Table.Totals"),show:(e,t,r)=>!n.sense?.isUnsupportedFeature?.("totals")&&e.qOtherTotalSpec?.qTotalMode!==iP&&eP(e,0,r)},dimensionLimits:{uses:"dimensions.items.dimensionLimits"},showOthers:{uses:"dimensions.items.others"},globalGrouping:{type:"boolean",translation:"properties.dimensionLimits.globalGrouping",ref:"qOtherTotalSpec.qGlobalOtherGrouping",defaultValue:!1,show:e=>"OTHER_OFF"!==e.qOtherTotalSpec?.qOtherMode},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:aP,...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...UA(e),...tP()}},measures:{type:"array",component:"measures",translation:"Common.Measures",ref:"qHyperCubeDef.qMeasures",disabledRef:"qHyperCubeDef.qLayoutExclude.qHyperCubeDef.qMeasures",min:1,allowAdd:!0,allowRemove:!0,allowMove:!0,addTranslation:"properties.measures.add",grouped:!0,items:{libraryId:{type:"string",component:"library-item",libraryItemType:"measure",ref:"qLibraryId",translation:"Common.Measure",show:e=>!!e.qLibraryId},inlineMeasure:{component:"inline-measure",show:e=>!e.qLibraryId},autoSort:{ref:"qDef.autoSort",type:"boolean",defaultValue:!0,show:!1},cId:{ref:"qDef.cId",type:"string",show:!1},numberFormatting:{uses:"measures.items.numberFormatting"},visibilityCondition:{type:"string",component:"expression",ref:"qCalcCondition.qCond",expression:"optional",expressionType:"ValueExpr",translation:"Object.Table.Columns.VisibilityCondition",defaultValue:{qv:""},isExpression:e=>"string"==typeof e&&e.trim().length>0},cellColoring:aP,...nP({env:e,key:"labelTextAlign",translation:"Common.Text.LabelTextAlignment"}),...nP({env:e,key:"textAlign",translation:"Common.Text.TextAlignment"}),...YA(e,{[$A.Image]:!0,[$A.ImagesInIndentMode]:!0,[$A.Indicator]:!0}),...tP()}},filters:{type:"items",translation:"SimpleProperties.Filters.Filters",ref:"filters",allowAdd:!0,allowRemove:!0,allowMove:!1,addTranslation:"properties.filters.add",grouped:!0,items:{filter:{type:"object",component:"filter-item",ref:"filter"}}}}}},lP="12px",cP="Source Sans Pro, sans-serif",uP="600",dP=15e3,pP=4/3,fP="-",hP=(e,t,n,r)=>({ref:e,translation:t,dualOutput:!0,type:"object",component:"color-picker",width:"auto",disableNone:r??!1,defaultValue(e,t,o){const i=r?.(e,t,o)??!1,a=o.theme.current(),s=n(a,i);return{color:"transparent"===s?"none":s}}}),mP=(e,t=!1)=>{return{value:e,label:t?(n=e,n.charAt(0).toUpperCase()+n.slice(1)):e,groupHeader:!1,disabled:!1,styles:t?{fontFamily:e}:void 0};var n},gP=({ref:e,themeAccessor:t,translator:n,flags:r})=>({component:"dropdown",ref:e,options:(e,o,i)=>{const a=i.theme.current();return((e,t,n,r)=>{const o=t.fontFamily??"Source Sans Pro, sans-serif",i=t.fontFamilies??[],a=Array.from(new Set([e,o,...i])),s=[{value:"ThemeHeader",label:n.get("properties.themeFonts"),metaText:n.get("properties.theme"),groupHeader:!0},...a.sort().map(e=>mP(e,!0))],l=[{value:"DefaultHeader",label:n.get("properties.allFonts"),metaText:n.get("properties.default"),groupHeader:!0},...rR(r).filter(e=>!a.includes(e)).map(e=>mP(e,!0))];return[...s,...l.length>1?l:[]]})(t(a),a,n,r)},defaultValue:(e,n,r)=>t(r.theme.current())}),vP=["10px","11px","12px","13px","14px","15px","16px","17px","18px","19px","20px","21px","22px","23px","24px"],bP=({ref:e,themeAccessor:t,translator:n})=>({component:"dropdown",ref:e,options:(e,r,o)=>{const i=o.theme.current();return((e,t,n)=>{const r=t.fontSize,o=t.fontSizes??[],i=Array.from(new Set([e,r,...o])),a=[{value:"ThemeHeader",label:n.get("properties.themeFontSizes"),metaText:n.get("properties.theme"),groupHeader:!0},...i.sort((e,t)=>parseInt(e,10)-parseInt(t,10)).map(e=>mP(e,!1))],s=[{value:"DefaultHeader",label:n.get("properties.allFontSizes"),metaText:n.get("properties.default"),groupHeader:!0},...vP.filter(e=>!i.includes(e)).map(e=>mP(e,!1))];return[...a,...s.length>1?s:[]]})(t(i),i,n)},defaultValue:(e,n,r)=>t(r.theme.current())}),yP=({section:e,defaultFontStyle:t,translator:n,flags:r,getThemeValue:o,translation:i,disableNoneCallback:a})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{content:{component:"items",ref:"components",key:"theme",items:{fontFamily:gP({ref:`${e}.fontFamily`,themeAccessor:t=>o(t,e,"fontFamily")??t.fontFamily,translator:n,flags:r}),fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",width:!1,ref:`${e}.fontStyle`,defaultValue:t??[]},fontSize:bP({ref:`${e}.fontSize`,themeAccessor:t=>o(t,e,"fontSize")??t.fontSize,translator:n}),fontColor:hP(`${e}.fontColor`,void 0,t=>o(t,e,"color")??t.color)}},background:hP(`${e}.background`,"properties.background",(t,n)=>{const r=n?DL.WHITE:DL.TRANSPARENT;return o(t,e,"backgroundColor")??r},a)}}}}),xP=e=>({type:"items",items:[{ref:e,type:"string",translation:"properties.pivot.nullValueText",defaultValue:"-"}]}),SP=e=>xP("dimensionNullValues"===e?"nullValueRepresentation.dimensionText":"nullValueRepresentation.text"),wP=({section:e,defaultFontStyle:t,fallbackBackground:n,getThemeValue:r,isNullValueText:o,translation:i})=>({component:"panel-section",translation:i??`properties.pivot.${e}`,items:{nullValueText:o?SP(e):void 0,content:{component:"items",ref:"components",key:"theme",items:{fontWrapperItem:{component:"inline-wrapper",items:{fontStyle:{component:"font-style-buttons",fullWidth:!0,ref:`${e}.fontStyle`,defaultValue:t??[]},fontColor:hP(`${e}.fontColor`,void 0,t=>r(t,e,"color")??t.color)}},background:hP(`${e}.background`,"properties.background",t=>r(t,e,"backgroundColor")??n??"transparent")}}}}),CP=(e,t)=>({component:"dropdown",ref:e,translation:t,options:[...Array(10).keys()].map(e=>({value:e+1,translation:e+1})),defaultValue:1});let EP=function(e){return e.Transparent="transparent",e.FontSecondary="#737373",e.DividerDark="#595959",e.DividerLight="#D9D9D9",e.NullValueBackground="#F2F2F2",e}({}),IP=function(e){return e.Solid="solid",e.None="none",e}({});const DP={display:"flex",justifyContent:"center",alignItems:"center"},LP={borderStyle:"solid"},RP={boxSizing:"border-box",padding:"4px 8px",userSelect:"none",WebkitUserSelect:"none"},MP={lineHeight:pP,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},AP=e=>({whiteSpace:"unset",display:"-webkit-box",WebkitLineClamp:e,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:e>1?"break-word":"break-all"}),PP=(e,t)=>e>0?`${e}px ${IP.Solid} ${t}`:IP.None,qP=(e,t,n,r,o)=>{const i=Number(!t||o?.right),a=Number(!e||o?.bottom);return{borderRight:"rtl"!==r?PP(i,n):IP.None,borderBottom:PP(a,n),borderLeft:"rtl"===r?PP(i,n):IP.None,borderTop:IP.None}},TP=(e,t,n,r,o,i,a)=>{const s=qP(t,r,o,i,a);return e.isLeftDimension||(e.isLastDimension&&!t&&(s.borderBottom=PP(2,o)),n||(s.borderLeft="rtl"!==i?PP(1,o):"none",s.borderRight="rtl"===i?PP(1,o):"none")),s},kP=({bottomDivider:e,rightDivider:t,borderColor:n})=>{const r={};return e&&(r.borderBottom=PP(1,n)),t&&(r.borderRight=PP(1,n)),r},OP=(e,t,n)=>{switch(t){case"header":return e.object?.pivotTableV2?.dimension?.label?.name?.[n];case"dimensionValues":return e.object?.pivotTableV2?.dimension?.label?.value?.[n];case"measureLabels":return e.object?.pivotTableV2?.measure?.label?.name?.[n];case"measureValues":return e.object?.pivotTableV2?.measure?.label?.value?.[n];case"totalValues":return e.object?.pivotTableV2?.total?.label?.value?.[n];case"nullValues":case"dimensionNullValues":return e.object?.pivotTableV2?.null?.label?.value?.[n];default:return}},NP=e=>e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),_P=(e,t)=>({type:"items",items:[{component:"styling-panel",chartTitle:"Object.PivotTable",subtitle:"LayerStyleEditor.component.styling",translation:"LayerStyleEditor.component.styling",ref:"components",useGeneral:!0,useBackground:!0,items:{headerSection:yP({section:"header",defaultFontStyle:["bold"],translator:e,flags:t,getThemeValue:OP}),dimensionValueSection:yP({section:"dimensionValues",translator:e,flags:t,getThemeValue:OP}),measureValueSection:yP({section:"measureValues",translator:e,flags:t,getThemeValue:OP}),measureLabelSection:wP({section:"measureLabels",getThemeValue:OP}),totalValuesSection:wP({section:"totalValues",defaultFontStyle:["bold"],getThemeValue:OP}),...NP(t)?{dimensionNullSection:wP({section:"dimensionNullValues",fallbackBackground:EP.NullValueBackground,getThemeValue:OP,isNullValueText:!0}),nullValues:wP({section:"nullValues",translation:"properties.pivot.measureNullValues",fallbackBackground:EP.NullValueBackground,getThemeValue:OP,isNullValueText:!0})}:{nullValues:wP({section:"nullValues",fallbackBackground:EP.NullValueBackground,getThemeValue:OP,isNullValueText:!1})},gridSection:{translation:"properties.pivot.grid",component:"panel-section",items:{gridItems:{component:"items",ref:"components",key:"theme",items:{lineClamp:CP("grid.lineClamp","ThemeStyleEditor.style.rowHeight"),columnLineClamp:CP("grid.columnLineClamp","ThemeStyleEditor.style.columnHeight"),border:hP("grid.border","properties.border",e=>e.object?.pivotTableV2?.grid?.borderColor??EP.DividerLight),divider:hP("grid.divider","properties.pivot.divider",e=>e.object?.pivotTableV2?.grid?.divider?.borderColor??EP.DividerDark),background:hP("grid.background","properties.background",e=>e.object?.pivotTableV2?.grid?.backgroundColor??EP.Transparent)}}}}}}]}),jP=e=>({type:"items",items:{nullValueText:e.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")?void 0:{ref:"nullValueRepresentation.text",type:"string",translation:"properties.pivot.nullValueText",defaultValue:fP},alwaysFullyExpanded:{ref:"qHyperCubeDef.qAlwaysFullyExpanded",type:"boolean",translation:"properties.pivot.fullyExpanded",defaultValue:!1},indentMode:{ref:"qHyperCubeDef.qIndentMode",type:"boolean",translation:"properties.pivot.indentMode",defaultValue:!1,change(e){e.qHyperCubeDef.qShowTotalsAbove=!0}},type:{type:"string",component:"dropdown",ref:"qHyperCubeDef.indentModeColumnWidth.type",translation:"Object.Table.Column.Width",options:[{value:jD.Auto,translation:"Common.Auto"},{value:jD.Pixels,translation:"Object.Table.Column.Pixels"},{value:jD.Percentage,translation:"Object.Table.Column.Percentage"}],defaultValue:jD.Auto,show:e=>!!e.qHyperCubeDef.qIndentMode},sizePixels:{ref:"qHyperCubeDef.indentModeColumnWidth.pixels",translation:"Object.Table.Column.Pixels",type:"number",expressionType:"ValueExpression",expression:"optional",defaultValue:_D.PixelsDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===jD.Pixels}},sizePercentage:{ref:"qHyperCubeDef.indentModeColumnWidth.percentage",translation:"Object.Table.Column.Percentage",component:"expression",expressionType:"ValueExpression",expression:"optional",defaultValue:_D.PercentageDefault,show:e=>{const t=e.qHyperCubeDef;return t.qIndentMode&&t.indentModeColumnWidth?.type===jD.Percentage}},showTotalsAbove:{ref:"qHyperCubeDef.qShowTotalsAbove",type:"boolean",translation:"properties.pivot.showTotalsAbove",defaultValue:!0,show(e){const{qIndentMode:t}=e.qHyperCubeDef;return!t&&!!e.qHyperCubeDef.qDimensions.some(e=>"TOTAL_EXPR"===e.qOtherTotalSpec?.qTotalMode)}},resetProperties:{type:"object",component:"button",translation:"properties.pivot.resetExpansionButton",disabled:e=>!!e.qHyperCubeDef.qAlwaysFullyExpanded,action(e,t,n,r){e.qHyperCubeDef.qExpansionState=[],r.$emit("saveProperties",e)}}}}),FP=e=>{if(e.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"))return{chartExploration:{type:"items",translation:"properties.chartExploration",items:{chartExplorationToggler:{type:"items",component:"chart-exploration-toggler",translation:"properties.enableChartExploration",ref:"enableChartExploration"},visibilityToggler:{show:e=>e.enableChartExploration,component:"buttongroup",translation:"properties.ChartExploration.VisibilityOption",ref:"chartExploration.menuVisibility",options:[{value:"auto",translation:"Common.Auto"},{value:"minimized",translation:"properties.ChartExploration.Minimized"}]}},show:e=>!e.insideContainer}}},zP=(e,t)=>({uses:"settings",items:{presentation:{type:"items",translation:"properties.presentation",grouped:!0,items:[_P(e,t),jP(t)]},...FP(t)}}),WP="auto",$P={type:"items",translation:"properties.sorting",items:{sortbyY:{type:"items",items:{sortbyYToggle:{ref:"qHyperCubeDef.qSortbyYValue",type:"boolean",component:"switch",translation:"properties.sorting.sortByY.label",convertFunctions:{get:e=>!!e("integer"),set:(e,t)=>{t("integer",e?-1:0)}},options:[{value:!0,translation:"properties.on"},{value:!1,translation:"properties.off"}]},sortbyYOrder:{ref:"qHyperCubeDef.qSortbyYValue",type:"string",component:"dropdown",defaultValue:0,options:[{value:1,translation:"properties.sorting.ascending"},{value:-1,translation:"properties.sorting.descending"}],show:e=>!!e.qHyperCubeDef.qSortbyYValue}}},defaultSorting:{uses:"sorting",items:{dimensions:{showPriority:!1,allowMove:!1},measures:{included:!1}}},searchSorting:{ref:"search.sorting",type:"string",component:"dropdown",defaultValue:WP,translation:"Object.Table.SortingInSearch",options:[{value:WP,translation:"Common.Auto"},{value:"inherit",translation:"Object.Table.SortingInSearch.InheritFromDimension"}]}}};function VP(e){const{translator:t,flags:n}=e;return{type:"items",component:"accordion",items:{data:sP(e),sorting:$P,addons:WA,settings:zP(t,n)}}}function HP(e){return{support:{cssScaling:!0,snapshot:!0,export:!0,exploration:e.flags.isEnabled("CLIENT_IM_5973_PIVOT_TABLE_EXPLORATION"),sharing:!1,exportData:!0,viewData:!0},usePropertyHandler:"pivot-data",definition:VP(e),importProperties:NA(e),exportProperties:_A,exploration:XM(e),data:jA(e),migrate:zA(e),propertyHandler:e.flags.isEnabled("VNA-147_NEBULA_PIVOT_DATA_HANDLERS")?t=>new fA(t,e):void 0}}const BP=()=>{let e;return{promise:new Promise(t=>{e=t}),resolve:e}};function GP(e,t){return R(()=>e,t)}const UP={},YP=e=>{const t=R(()=>({current:UP}),[]);return t.current=t.current===UP?e:t.current,t},KP=e=>!!e&&0===zL(e).a,XP="#grid",JP=(e,t)=>{const n=t?.closest(e);return n&&window.getComputedStyle(n).backgroundColor},ZP=(e,t,n,r,o)=>{const i=JP(".qv-object .qv-inner-object",n),a=JP(".qv-panel-sheet",n),s=JP(XP,n)??a,l=(e=>{const t=e.components?.find(e=>"general"===e.key),n=t?.bgColor?.colorExpression,r=t?.bgColor?.color?.color,o=t?.bgColor?.useColorExpression;if(o&&n)return SM(n);if("none"===r)return"transparent";if(void 0===r)return;const i=zL(r);return i.setAlpha(t?.bgColor?.color?.alpha??i.a),i.getRGBA()})(e),c=r?.(t),u=o?.(t),d=l||c||i||u,p=KP(d),f=!KP(h=p?s:d)&&bM(h,DL.TEXT,DL.DARK_MODE_TEXT)===OL(DL.DARK_MODE_TEXT);var h;const m=((e,t,n,r=DL.WHITE)=>e&&!KP(e)?e:KP(t)?n&&!KP(n)?n:r:t)(l,d,s);return{color:d,headerColor:m,isDark:f}},QP=(e,t,n,r)=>{const o=T(),i=((e,t={attributeFilter:["style"],childList:!1,subtree:!1})=>{const[n,r]=P([]);return q(()=>{let n;return e&&(n=new MutationObserver(e=>{r(e)}),n.observe(e,t)),()=>{n?.disconnect()}},[e,t]),n})(t.closest(XP),{attributeFilter:["style"],childList:!1,subtree:!1,attributeOldValue:!0}).filter(({oldValue:e})=>e?.includes("background")).map(({oldValue:e})=>e).join(",");return R(()=>({...o,background:ZP(e,o,t,n,r)}),[o.name(),t,n,r,e,i])};function eq(e,t){const n=R(()=>({isLoading:!0}),t),[r,o]=A(async()=>{try{return await e()}finally{n.isLoading=!1}},t);return[r,n.isLoading,o]}const tq=3,nq=/\n/g;function rq(e,t,n){let r=0,o=e.length;if(Number.isNaN(t))return null;if(e.length<=1)return null;if(n(e)<=t)return null;for(;r<=o;){const i=Math.floor((r+o)/2),a=e.slice(0,i),s=e.slice(0,i-1),l=n(a),c=n(s);if(l>t&&c<=t)return e.slice(i-1)||null;if(l===t)return e.slice(i)||null;l<t?r=i+1:o=i}return null}function oq({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o){const{maxNbrLinesOfText:i=tq,allowLineBreaks:a=!0}=o??{},{estimateWidth:s,measureText:l,estimateLineCount:c}=v(()=>(({fontSize:e="12px",fontFamily:t="Source Sans Pro, Arial, sans-serif",fontStyle:n="normal",fontWeight:r="normal"},o)=>{const{maxNbrLinesOfText:i=tq,allowLineBreaks:a=!0}=o??{};return()=>{const o=document.createElement("canvas").getContext("2d");o.font=`${n} ${r} ${e} ${t}`;const s=o.measureText.bind(o),l=cM(e=>{if(void 0===e)return 0;if(a){const t=e.split(nq).map(e=>s(e).width);return t.reduce((e,t)=>t>e?t:e,0)}const t=e.replace(nq," ");return s(t).width}),c=e=>+l(e).toFixed(2),u=cM(({text:e,maxWidth:t,isNumeric:n=!1})=>{if(n)return 1;const r=a?e.split(nq):[e];let o=0;for(const e of r){let n=e;do{o+=1,n=rq(n,t,c)}while(null!==n&&o<i);if(o>=i)break}return o},({text:e,maxWidth:t,isNumeric:n})=>`${e}-${t}-${n?"true":"false"}`);return{measureText:e=>l(e),estimateWidth:e=>l("N")*e,estimateLineCount:u}}})({fontStyle:n,fontWeight:r,fontSize:e,fontFamily:t},{maxNbrLinesOfText:i,allowLineBreaks:a})(),[n,r,e,t,i,a]);return{estimateWidth:s,measureText:l,estimateLineCount:c}}var iq,aq={};var sq=function(){if(iq)return aq;iq=1;var e=E;return aq.createRoot=e.createRoot,aq.hydrateRoot=e.hydrateRoot,aq}();const lq="Source Sans Pro, sans-serif";function cq(e,t){const[n,r]=m(t);n.some((e,n)=>e!==t[n])&&(r(t),e())}var uq={NebulaTableUtils_ColumnAdjuster_ColumnNameLabel:{id:"NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",locale:{"de-DE":"Breite von {0}","en-US":"Width of {0}","es-ES":"Ancho de {0}","fr-FR":"Largeur de {0}","it-IT":"Larghezza di {0}","ja-JP":"{0} の幅","ko-KR":"{0}의 너비","nl-NL":"Breedte van {0}","pl-PL":"Szerokość kolumny {0}","pt-BR":"Comprimento de {0}","ru-RU":'Ширина столбца "{0}"',"sv-SE":"Bredd på {0}","tr-TR":"{0} genişliği","zh-CN":"{0} 的宽度","zh-TW":"{0} 的寬度"}},NebulaTableUtils_MenuGroupLabel_Sorting:{id:"NebulaTableUtils.MenuGroupLabel.Sorting",locale:{"de-DE":"Sortierung","en-US":"Sorting","es-ES":"Ordenación","fr-FR":"Tri","it-IT":"Ordinamento","ja-JP":"ソート","ko-KR":"정렬","nl-NL":"Sorteren","pl-PL":"Sortowanie","pt-BR":"Classificação","ru-RU":"Сортировка","sv-SE":"Sortering","tr-TR":"Sıralama","zh-CN":"排序","zh-TW":"排序"}},NebulaTableUtils_MenuItemLabel_AdjustColumnSize:{id:"NebulaTableUtils.MenuItemLabel.AdjustColumnSize",locale:{"de-DE":"Spaltengröße anpassen","en-US":"Adjust column size","es-ES":"Ajustar el tamaño de columna","fr-FR":"Ajuster la taille de colonne","it-IT":"Regola dimensioni colonna","ja-JP":"列サイズを調整","ko-KR":"열 크기 조정","nl-NL":"Kolomgrootte aanpassen","pl-PL":"Dostosuj rozmiar kolumny","pt-BR":"Ajustar tamanho da coluna","ru-RU":"Настроить размер столбца","sv-SE":"Justera kolumnens storlek","tr-TR":"Sütun boyutunu ayarla","zh-CN":"调节列大小","zh-TW":"調整欄大小"}},NebulaTableUtils_MenuItemLabel_ClearSelections:{id:"NebulaTableUtils.MenuItemLabel.ClearSelections",locale:{"de-DE":"Auswahlen löschen","en-US":"Clear selections","es-ES":"Borrar selecciones","fr-FR":"Effacer les sélections","it-IT":"Cancella selezioni","ja-JP":"選択をクリア","ko-KR":"선택 지우기","nl-NL":"Geselecteerde waarden wissen","pl-PL":"Wyczyść wybory","pt-BR":"Limpar seleções","ru-RU":"Очистить выбранные","sv-SE":"Radera urval","tr-TR":"Seçimleri temizle","zh-CN":"清除选择项","zh-TW":"清除選項"}},NebulaTableUtils_MenuItemLabel_Collapse:{id:"NebulaTableUtils.MenuItemLabel.Collapse",locale:{"de-DE":"Reduzieren","en-US":"Collapse","es-ES":"Contraer","fr-FR":"Réduire","it-IT":"Comprimi","ja-JP":"折りたたむ","ko-KR":"축소","nl-NL":"Samenvouwen","pl-PL":"Zwiń","pt-BR":"Recolher","ru-RU":"Свернуть","sv-SE":"Dölj","tr-TR":"Daralt","zh-CN":"折叠","zh-TW":"收合"}},NebulaTableUtils_MenuItemLabel_ColumnOptions:{id:"NebulaTableUtils.MenuItemLabel.ColumnOptions",locale:{"de-DE":"Spaltenoptionen","en-US":"Column options","es-ES":"Opciones de columna","fr-FR":"Options de colonne","it-IT":"Opzioni colonna","ja-JP":"列オプション","ko-KR":"열 옵션","nl-NL":"Kolomopties","pl-PL":"Opcje kolumny","pt-BR":"Opções da coluna","ru-RU":"Параметры столбца","sv-SE":"Alternativ för kolumn","tr-TR":"Sütun seçenekleri","zh-CN":"列选项","zh-TW":"欄選項"}},NebulaTableUtils_MenuItemLabel_Expand:{id:"NebulaTableUtils.MenuItemLabel.Expand",locale:{"de-DE":"Erweitern","en-US":"Expand","es-ES":"Expandir","fr-FR":"Développer","it-IT":"Espandi","ja-JP":"展開","ko-KR":"확장","nl-NL":"Uitvouwen","pl-PL":"Rozwiń","pt-BR":"Expandir","ru-RU":"Развернуть","sv-SE":"Utöka","tr-TR":"Genişlet","zh-CN":"展开","zh-TW":"展開"}},NebulaTableUtils_MenuItemLabel_Search:{id:"NebulaTableUtils.MenuItemLabel.Search",locale:{"de-DE":"Suchen","en-US":"Search","es-ES":"Buscar","fr-FR":"Rechercher","it-IT":"Cerca","ja-JP":"検索","ko-KR":"검색","nl-NL":"Zoeken","pl-PL":"Wyszukaj","pt-BR":"Pesquisar","ru-RU":"Поиск","sv-SE":"Sök","tr-TR":"Ara","zh-CN":"搜索","zh-TW":"搜尋"}},NebulaTableUtils_MenuItemLabel_SelectAll:{id:"NebulaTableUtils.MenuItemLabel.SelectAll",locale:{"de-DE":"Alle auswählen","en-US":"Select all","es-ES":"Seleccionar todo","fr-FR":"Sélectionner tout","it-IT":"Seleziona tutti","ja-JP":"すべて選択","ko-KR":"모두 선택","nl-NL":"Alles selecteren","pl-PL":"Wybierz wszystko","pt-BR":"Selecionar tudo","ru-RU":"Выбрать все","sv-SE":"Välj alla","tr-TR":"Tümünü seç","zh-CN":"全选","zh-TW":"全選"}},NebulaTableUtils_MenuItemLabel_SelectAlternative:{id:"NebulaTableUtils.MenuItemLabel.SelectAlternative",locale:{"de-DE":"Alternative Werte auswählen","en-US":"Select alternative","es-ES":"Seleccionar alternativos","fr-FR":"Sélectionner des valeurs alternatives","it-IT":"Seleziona alternativi","ja-JP":"代替項目を選択","ko-KR":"대체 가능 값 선택","nl-NL":"Alternatief selecteren","pl-PL":"Wybierz alternatywę","pt-BR":"Selecionar alternativa","ru-RU":"Выбрать альтернативные","sv-SE":"Välj alternativ","tr-TR":"Alternatifi seç","zh-CN":"选择替代项","zh-TW":"選取替代選項"}},NebulaTableUtils_MenuItemLabel_SelectExcluded:{id:"NebulaTableUtils.MenuItemLabel.SelectExcluded",locale:{"de-DE":"Ausgeschlossene Werte auswählen","en-US":"Select excluded","es-ES":"Seleccionar excluidos","fr-FR":"Sélectionner les valeurs exclues","it-IT":"Seleziona esclusi","ja-JP":"除外項目を選択","ko-KR":"제외 항목 선택","nl-NL":"Uitgesloten waarden selecteren","pl-PL":"Wybierz wykluczone","pt-BR":"Selecionar excluídos","ru-RU":"Выбрать исключенные","sv-SE":"Välj uteslutna","tr-TR":"Hariç tutulanı seç","zh-CN":"选择排除项","zh-TW":"選取排除值"}},NebulaTableUtils_MenuItemLabel_SelectPossible:{id:"NebulaTableUtils.MenuItemLabel.SelectPossible",locale:{"de-DE":"Wählbare Werte auswählen","en-US":"Select possible","es-ES":"Seleccionar posibles","fr-FR":"Sélectionner les valeurs possibles","it-IT":"Seleziona possibili","ja-JP":"絞込項目を選択","ko-KR":"사용 가능 항목 선택","nl-NL":"Mogelijke waarden selecteren","pl-PL":"Wybierz możliwe","pt-BR":"Selecionar possíveis","ru-RU":"Выбрать возможные","sv-SE":"Välj möjliga","tr-TR":"Olası olanı seç","zh-CN":"选择可能值","zh-TW":"選取可能值"}},NebulaTableUtils_MenuItemLabel_Selections:{id:"NebulaTableUtils.MenuItemLabel.Selections",locale:{"de-DE":"Auswahlen","en-US":"Selections","es-ES":"Selecciones","fr-FR":"Sélections","it-IT":"Selezioni","ja-JP":"選択","ko-KR":"선택 내용","nl-NL":"Selecties","pl-PL":"Wybory","pt-BR":"Seleções","ru-RU":"Выборки","sv-SE":"Urval","tr-TR":"Seçimler","zh-CN":"选择项","zh-TW":"選項"}},NebulaTableUtils_MenuItemLabel_SortAscending:{id:"NebulaTableUtils.MenuItemLabel.SortAscending",locale:{"de-DE":"In aufsteigender Reihenfolge sortieren","en-US":"Sort ascending","es-ES":"Orden ascendente","fr-FR":"Trier par ordre croissant","it-IT":"Ordinamento crescente","ja-JP":"昇順でソート","ko-KR":"오름차순으로 정렬","nl-NL":"Oplopend sorteren","pl-PL":"Sortuj rosnąco","pt-BR":"Classificar em ordem crescente","ru-RU":"Сортировка по возрастанию","sv-SE":"Sortera stigande","tr-TR":"Artan sıralama","zh-CN":"升序排序","zh-TW":"以遞增方式排序"}},NebulaTableUtils_MenuItemLabel_SortDescending:{id:"NebulaTableUtils.MenuItemLabel.SortDescending",locale:{"de-DE":"In absteigender Reihenfolge sortieren","en-US":"Sort descending","es-ES":"Orden descendente","fr-FR":"Trier par ordre décroissant","it-IT":"Ordinamento decrescente","ja-JP":"降順でソート","ko-KR":"내림차순으로 정렬","nl-NL":"Aflopend sorteren","pl-PL":"Sortuj malejąco","pt-BR":"Classificar em ordem decrescente","ru-RU":"Сортировка по убыванию","sv-SE":"Sortera fallande","tr-TR":"Azalan sıralama","zh-CN":"降序排序","zh-TW":"以遞減方式排序"}},NebulaTableUtils_Pagination_DisplayedRowsLabel:{id:"NebulaTableUtils.Pagination.DisplayedRowsLabel",locale:{"de-DE":"{0} von {1}","en-US":"{0} of {1}","es-ES":"{0} de {1}","fr-FR":"{0} sur {1}","it-IT":"{0} di {1}","ja-JP":"{0} / {1}","ko-KR":"{0}/{1}","nl-NL":"{0} van {1}","pl-PL":"{0} z {1}","pt-BR":"{0} de {1}","ru-RU":"{0} из {1}","sv-SE":"{0} av {1}","tr-TR":"{0} / {1}","zh-CN":"{0} / {1}","zh-TW":"{0} / {1}"}},NebulaTableUtils_Pagination_FirstPage:{id:"NebulaTableUtils.Pagination.FirstPage",locale:{"de-DE":"Zur ersten Seite","en-US":"Go to the first page","es-ES":"Ir a la primera página","fr-FR":"Accéder à la première page","it-IT":"Vai alla prima pagina","ja-JP":"最初のページに移動","ko-KR":"첫 페이지로 이동","nl-NL":"Ga naar de eerste pagina","pl-PL":"Przejdź do pierwszej strony","pt-BR":"Ir para a primeira página","ru-RU":"Перейти к первой странице","sv-SE":"Gå till första sidan","tr-TR":"İlk sayfaya git","zh-CN":"转到第一页","zh-TW":"移至第一頁"}},NebulaTableUtils_Pagination_LastPage:{id:"NebulaTableUtils.Pagination.LastPage",locale:{"de-DE":"Zur letzten Seite","en-US":"Go to the last page","es-ES":"Ir a la última página","fr-FR":"Accéder à la dernière page","it-IT":"Vai all'ultima pagina","ja-JP":"最後のページに移動","ko-KR":"마지막 페이지로 이동","nl-NL":"Ga naar de laatste pagina","pl-PL":"Przejdź do ostatniej strony","pt-BR":"Ir para a última página","ru-RU":"Перейти к последней странице","sv-SE":"Gå till sista sidan","tr-TR":"Son sayfaya git","zh-CN":"转到最后一页","zh-TW":"移至最後一頁"}},NebulaTableUtils_Pagination_NextPage:{id:"NebulaTableUtils.Pagination.NextPage",locale:{"de-DE":"Zur nächsten Seite","en-US":"Go to the next page","es-ES":"Ir a la página siguiente","fr-FR":"Accéder à la page suivante","it-IT":"Vai alla pagina successiva","ja-JP":"次のページに移動","ko-KR":"다음 페이지로 이동","nl-NL":"Ga naar de volgende pagina","pl-PL":"Przejdź do następnej strony","pt-BR":"Ir para a próxima página","ru-RU":"Перейти к следующей странице","sv-SE":"Gå till nästa sida","tr-TR":"Sonraki sayfaya git","zh-CN":"转到下一页","zh-TW":"移至下一頁"}},NebulaTableUtils_Pagination_PreviousPage:{id:"NebulaTableUtils.Pagination.PreviousPage",locale:{"de-DE":"Zur vorherigen Seite","en-US":"Go to the previous page","es-ES":"Ir a la página anterior","fr-FR":"Accéder à la page précédente","it-IT":"Vai alla pagina precedente","ja-JP":"前のページに移動","ko-KR":"이전 페이지로 이동","nl-NL":"Ga naar de vorige pagina","pl-PL":"Przejdź do poprzedniej strony","pt-BR":"Ir para a página anterior","ru-RU":"Перейти к предыдущей странице","sv-SE":"Gå till föregående sida","tr-TR":"Önceki sayfaya git","zh-CN":"转到前一页","zh-TW":"移至上一頁"}},NebulaTableUtils_Pagination_RowsPerPage:{id:"NebulaTableUtils.Pagination.RowsPerPage",locale:{"de-DE":"Zeilen pro Seite","en-US":"Rows per page","es-ES":"Filas por página","fr-FR":"Lignes par page","it-IT":"Righe per pagina","ja-JP":"ページあたりの行数","ko-KR":"페이지별 행 수","nl-NL":"Rijen per pagina","pl-PL":"Wierszy na stronę","pt-BR":"Linhas por página","ru-RU":"Строк на странице","sv-SE":"Rader per sida","tr-TR":"Sayfa başına satır sayısı","zh-CN":"每页行数","zh-TW":"每頁列數"}},NebulaTableUtils_Pagination_SelectPage:{id:"NebulaTableUtils.Pagination.SelectPage",locale:{"de-DE":"Seite auswählen","en-US":"Select page","es-ES":"Seleccionar página","fr-FR":"Sélectionner une page","it-IT":"Seleziona pagina","ja-JP":"ページを選択","ko-KR":"페이지 선택","nl-NL":"Pagina selecteren","pl-PL":"Wybierz stronę","pt-BR":"Selecionar página","ru-RU":"Выберите страницу","sv-SE":"Välj sida","tr-TR":"Sayfa seç","zh-CN":"选择页面","zh-TW":"選取頁面"}}};const dq=({translator:e})=>(v(()=>{!function(e){if(e&&e.get&&e.add){const t="NebulaTableUtils.MenuGroupLabel.Sorting";if(e.get(t)!==t)return;Object.keys(uq).forEach(t=>{e.add(uq[t])})}}(e)},[e]),e),pq={width:"100%",height:"100%",color:"transparent",background:"transparent",borderColor:"transparent"},fq={border:0,boxShadow:"none",borderRadius:0,outline:0,width:0,height:0,background:"transparent",cursor:"pointer",visibility:"hidden"},hq=Ms("input",{shouldForwardProp:e=>"isLastColumn"!==e&&"hoverColor"!==e})(({isLastColumn:e,hoverColor:t,dir:n})=>({position:"absolute",display:"flex",height:"100%",top:0,marginLeft:"-4px",marginRight:"rtl"===n?"-4px":void 0,touchAction:"none",cursor:"col-resize",pointerEvents:"auto",width:(e?4:9)+"px",justifyContent:e?"flex-end":"center",outline:"none",appearance:"none",WebkitAppearance:"none",backgroundColor:"transparent","&::-webkit-slider-runnable-track":{...pq},"&::-moz-range-track":{...pq},"&::-ms-track":{...pq},"&::-webkit-slider-thumb":{appearance:"none",WebkitAppearance:"none",...fq},"&::-moz-range-thumb":{...fq},"&::-ms-thumb":{...fq},"&:hover:not(:focus, :active)":{"&::after":{backgroundColor:t||"#D9D9D9","@media (hover: none)":{backgroundColor:"none"}}},"&:focus-visible, &:active":{"&::after":{backgroundColor:"#177fe6",borderLeft:"1px solid #fff",borderRight:e?void 0:"1px solid #fff"}},"&::after":{content:'""',height:"100%",width:"3px",position:"absolute"}})),mq=({columnWidth:e,keyValue:t,isLastColumn:n,isPivot:r,hoverColor:o,updateWidthCallback:i,confirmWidthCallback:a,handleBlur:s,setIsAdjustingWidth:c,isLeftColumn:u,accessibilityRelatedArgs:d,direction:p="ltr"})=>{const f=dq({translator:d.translator}),h=l({initWidth:e,columnWidth:e,initX:0}),m=n?0:1,g=r&&!u,v=()=>g?h.current.columnWidth-m:"100%",b={left:"rtl"!==p?v():void 0,right:"rtl"===p?v():void 0},y=t=>{h.current={initWidth:e,columnWidth:e,initX:t??h.current.initX}};cq(()=>{g&&y()},[e]);const x=e=>{const t=Math.max(e,_D.PixelsMin);h.current.columnWidth=t,i(t)},S=()=>{if(h.current.columnWidth!==h.current.initWidth){const e={type:jD.Pixels,pixels:h.current.columnWidth};a(e)}c?.(!1)},w=e=>{const t="rtl"===p?h.current.initWidth+h.current.initX-e.clientX:h.current.initWidth+e.clientX-h.current.initX;x(t)},C=e=>{wM(e),document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",C),S()},E=e=>{const t="rtl"===p?h.current.initWidth+-h.current.initX-e.touches[0].clientX:h.current.initWidth+e.touches[0].clientX-h.current.initX;x(t)},I=e=>{wM(e),document.removeEventListener("touchmove",E),document.removeEventListener("touchend",I),S()},D=!r&&s?e=>{if(e.key===OD.Left||e.key===OD.Right){wM(e);const t=5,n=e.key===OD.Left?t:-t,r="rtl"===p?n:-n;c?.(!0),x(h.current.columnWidth+r)}else e.key===OD.Space||e.key===OD.Enter?(wM(e),s(e),c?.(!1),S()):e.key===OD.Esc&&(wM(e),s(e),c?.(!1),x(h.current.initWidth))}:void 0,L=f.get("NebulaTableUtils.ColumnAdjuster.ColumnNameLabel",[String(d.columnLabel)]);return hi.jsx(hq,{style:b,hoverColor:o,isLastColumn:n,className:ND,"data-testid":ND,onMouseDown:e=>{wM(e),document.addEventListener("mousemove",w),document.addEventListener("mouseup",C),c?.(!0),y(e.clientX)},onDoubleClick:()=>{a({type:jD.FitToContent})},onTouchStart:e=>{1===e.touches.length&&(wM(e),document.addEventListener("touchmove",E),document.addEventListener("touchend",I),c?.(!0),y(e.touches[0].clientX))},onKeyDown:D,onBlur:s,onFocus:()=>{y()},type:"range",tabIndex:-1,"aria-label":L,"aria-valuemin":_D.PixelsMin,"aria-valuemax":_D.PixelsMax,"aria-valuenow":Number(e.toFixed(1)),dir:p},t)},gq=x((e,t)=>hi.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:hi.jsx("path",{d:"M15 4H1V2h14zm0 10H1v-2h14zm0-5H1V7h14z"})})),vq=Ms(mc,{shouldForwardProp:e=>"rightAligned"!==e&&"shouldShowMenuIcon"!==e&&"isAccessibleHeader"!==e})(({rightAligned:e,shouldShowMenuIcon:t,isAccessibleHeader:n})=>({...e?{marginRight:"auto"}:{marginLeft:"auto"},height:n?24:void 0,display:t?"flex":"none",fontWeight:"bold",width:n?"100%":void 0,alignItems:"center",justifyContent:"center"})),bq=Ms(gq,{shouldForwardProp:e=>"isInteractionsActive"!==e})(({isInteractionsActive:e})=>({minWidth:"unset",position:"relative",cursor:e?"pointer":"default"})),yq=Ms(Ad)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),xq=Ms(cu)(({theme:e})=>({"&.MuiDivider-root":{margin:e.spacing(.5)}})),Sq=Ms(Od)(({theme:e})=>({fontSize:"12px",height:24,fontWeight:"bold",padding:`${e.spacing(.25,2)} !important`,marginBottom:e.spacing(.5)})),wq=Ms(Od,{shouldForwardProp:e=>"isSubMenu"!==e&&"isActive"!==e})(({theme:e,isSubMenu:t,isActive:n})=>({width:`calc(220px - ${e.spacing(1)} - ${t?10:0}px)`,maxHeight:32,borderRadius:`${e.spacing(.5)} !important`,margin:`${e.spacing(.25,.5)} !important`,padding:`${e.spacing(1,1.5)} !important`,display:"flex !important",justifyContent:"space-between !important","&&:focus":{boxShadow:"rgb(23, 127, 230) 0px 0px 0px 2px"},position:"relative !important",overflow:"hidden",boxSizing:"border-box !important",background:n?"rgba(0, 0, 0, 0.05)":"transparent"})),Cq=Ms("div",{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({position:"absolute",width:e.spacing(.5),height:16,left:0,right:n||"rtl"!==t?void 0:0,top:"50%",transform:"TranslateY(-50%)",borderRadius:"0 2px 2px 0",background:"#01873d"})),Eq=Ms("div")(()=>({display:"flex",justifyContent:"space-between",alignItems:"center",maxWidth:"100%"})),Iq=Ms(Pl)(()=>({fontFamily:'"Source Sans Pro", HelveticaNeue, "Helvetica Neue", Helvetica, Arial, sans-serif',fontSize:"14px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"})),Dq=Ms(rd,{shouldForwardProp:e=>!["direction","isPagination"].includes(e)})(({theme:e,direction:t,isPagination:n})=>({width:16,minWidth:"unset !important",marginRight:n||"rtl"!==t?e.spacing(1.5):0,marginLeft:n||"rtl"!==t?void 0:e.spacing(1.5),lineHeight:0})),Lq=x((e,t)=>hi.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:hi.jsx("path",{d:"M8.5 8 4 3.5 5.5 2l6 6-6 6L4 12.5z"})})),Rq=e=>{const t=e.nextElementSibling;return t?"HR"===t.tagName?Rq(t):t:e.parentElement?.children?.[0]},Mq=e=>{const t=e.previousElementSibling;if(!t){const t=e.parentElement?.children?.length;return e.parentElement?.children?.[t-1]}return"HR"===t.tagName?Mq(t):t},Aq=e=>{const{key:t,currentTarget:n}=e,r=document.activeElement??n;if(t===OD.Down||t===OD.Up){const n=e=>t===OD.Down?Rq(e):Mq(e);e.preventDefault(),e.stopPropagation();let o=n(r);for(;o;){if("true"!==o.ariaDisabled){o.focus();break}o=n(o)}}},Pq=(e,t)=>e.map(e=>e.map(e=>({...e.groupHeading?{groupHeading:e.groupHeading}:{},items:e.items.map(({onClick:e,...n})=>({...n,...e?{onClick:async n=>{Object.entries(t).forEach(([,e])=>{e(!1)}),await e(n)}}:{}}))})));let qq={};const Tq=({autoFocus:e,id:t,onClick:r,itemTitle:o,icon:i,enabled:a,subMenus:s,isSubMenu:l,isActive:c,direction:d,isPagination:p})=>{const[f,h]=m(!1),g=n.useRef(null),v=u(e=>{e.stopPropagation(),h(!1)},[h]);return hi.jsxs(hi.Fragment,{children:[hi.jsxs(wq,{ref:s?g:null,"data-testid":`menu-item-${t}`,className:"nebula-table-utils-head-menu-item",onClick:async e=>{"keyup"!==e.type&&(r&&(await r(e),qq={}),s?.length&&(h(!0),qq[o]=h,e.stopPropagation()))},disabled:!a,autoFocus:e,isSubMenu:!!l,isActive:!!c,onKeyDown:Aq,children:[c?hi.jsx(Cq,{direction:d,isPagination:p}):null,hi.jsxs(Eq,{children:[hi.jsx(Dq,{direction:d,isPagination:p,children:hi.jsx(i,{})}),hi.jsx(Iq,{variant:"body2",children:o})]}),s?.length?hi.jsx(Lq,{}):null]},t),s?.length?hi.jsx(_q,{isSubMenu:!0,open:f,anchorEl:g.current,onClose:v,menuGroups:Pq(s,qq),transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},direction:d,isPagination:p}):null]})},kq=({menuGroup:e,isSubMenu:t,direction:n,isPagination:r})=>e.map(e=>[[e.groupHeading&&hi.jsx(Sq,{disabled:!0,style:{opacity:1},children:e.groupHeading},e.groupHeading),e.items.map(e=>hi.jsx(Tq,{...e,isSubMenu:t,direction:n,isPagination:r},e.id))].filter(Boolean)]),Oq=({itemGroups:e,isSubMenu:t,direction:n,isPagination:r})=>e.map((o,i)=>[kq({menuGroup:o,isSubMenu:t,direction:n,isPagination:r}),i<e.length-1?hi.jsx(xq,{"data-testid":"group-divider",variant:"middle"}):void 0]),Nq={appear:0,enter:0,exit:0},_q=({anchorEl:e,open:t,onClose:n,menuGroups:r,transformOrigin:o,anchorOrigin:i,isSubMenu:a,direction:s,isPagination:l})=>r.length?hi.jsx(yq,{className:"nebula-table-utils-head-menu",open:t,anchorEl:e,onClose:n,transitionDuration:Nq,MenuListProps:{id:"nebula-table-utils-head-menu-list-id"},...i?{anchorOrigin:i}:{},...o?{transformOrigin:o}:{},dir:s,children:Oq({itemGroups:r,isSubMenu:a,direction:s,isPagination:l})}):null,jq=(e,t)=>e.some(e=>t[e]>0),Fq={canSelectAll:!1,canClearSelections:!1,canSelectPossible:!1,canSelectAlternative:!1,canSelectExcluded:!1},zq=({open:e,qStateName:t="$",headerData:n,app:r})=>{const[o,i]=m(null),[a,s]=m(Fq);return cq(()=>{e||(s(Fq),i(null))},[e]),p(()=>{if(!r?.createSessionObject||!n.isDim||!e)return()=>{};let o,a=!1;const l=()=>{o&&r.destroySessionObject(o)};return(async()=>{try{const e=((e,t)=>({qInfo:{qType:"tableListbox"},qListObjectDef:Boolean(t.qLibraryId)?{qLibraryId:t.qLibraryId,qStateName:e}:{qDef:{qFieldDefs:[t.fieldId]},qStateName:e}}))(t,n),c=await r.createSessionObject(e),u=await c.getLayout(),{qStateCounts:d}=u.qListObject?.qDimensionInfo??{};o=u.qInfo?.qId,a?l():(i(c),d&&s((e=>({canSelectAll:jq(["qOption","qAlternative","qExcluded","qDeselected"],e),canClearSelections:jq(["qSelected"],e),canSelectPossible:jq(["qOption"],e),canSelectAlternative:jq(["qAlternative"],e),canSelectExcluded:jq(["qAlternative","qExcluded"],e)}))(d)))}catch(e){console.error(e)}})(),()=>{a=!0,l()}},[e,r,n,t]),{fieldInstance:o,selectionActionsEnabledStatus:a}},Wq=x((e,t)=>hi.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:hi.jsx("path",{d:"M3.5 1.793 6.207 4.5l-.707.707-1.5-1.5V14H3V3.707l-1.5 1.5L.793 4.5zM8 4h5v1H8zm0 3h6v1H8zm0 3h7v1H8z"})})),$q=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm9 1.5H6v-1h4zm5.354-8.646L12.707 10l2.646 2.646-.707.707L12 10.708l-2.646 2.646-.708-.707L11.293 10 8.646 7.354l.708-.708L12 9.293l2.646-2.647zM1 10H0V6h1zm2-9H1.5a.5.5 0 0 0-.5.5V3H0V1.5A1.5 1.5 0 0 1 1.5 0H3zm11.5-1A1.5 1.5 0 0 1 16 1.5V3h-1V1.5a.5.5 0 0 0-.5-.5H13V0zM10 1H6V0h4z"})})),Vq=x((e,t)=>hi.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:hi.jsx("path",{d:"M3.914 8h8.207L10.5 6.379l.707-.708L14.036 8.5l-2.829 2.828-.707-.707L12.12 9H3.914l1.621 1.621-.707.707L2 8.5l2.828-2.828.707.707zM15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zm0 13V2h-2v3h-1V2H4v3H3V2H1v12h2v-2h1v2h8v-2h1v2z"})})),Hq=x((e,t)=>hi.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:hi.jsx("path",{d:"M3 2h1v10.293l1.5-1.5.707.707L3.5 14.207.793 11.5l.707-.707 1.5 1.5zm12 2H8v1h7zM8 7h6v1H8zm5 3H8v1h5z"})})),Bq=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M.5 4.774v6.452a2 2 0 0 0 1.154 1.813l5.5 2.566a2 2 0 0 0 1.692 0l5.5-2.566a2 2 0 0 0 1.154-1.813V4.774a2 2 0 0 0-1.154-1.813L8.846.395a2 2 0 0 0-1.692 0l-5.5 2.566A2 2 0 0 0 .5 4.774m1 0v-.032l6 2.428v7.493l-5.423-2.53a1 1 0 0 1-.577-.907zm.545-.89.032-.016 5.5-2.567a1 1 0 0 1 .846 0l5.5 2.567.032.015L8 6.293zm12.455.858v6.484a1 1 0 0 1-.577.906L8.5 14.663V7.17z"})})),Gq=x((e,t)=>hi.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:hi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8z"})})),Uq=x((e,t)=>hi.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:hi.jsx("path",{d:"M8 15c-3.848 0-7-3.152-7-7s3.152-7 7-7 7 3.152 7 7-3.152 7-7 7m0 1c4.4 0 8-3.6 8-8s-3.6-8-8-8-8 3.6-8 8 3.6 8 8 8m4-7.5H4v-1h8zM8.5 4v8h-1V4z"})})),Yq=x((e,t)=>hi.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:hi.jsx("path",{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7"})})),Kq=x((e,t)=>hi.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:hi.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"})})),Xq=x((e,t)=>hi.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:hi.jsx("path",{d:"M3 4v1H1v10h10v-2h1v2a1 1 0 0 1-.883.993L11 16H1a1 1 0 0 1-.993-.883L0 15V5a1 1 0 0 1 .883-.993L1 4zm12-4a1 1 0 0 1 .993.883L16 1v10a1 1 0 0 1-.883.993L15 12H5a1 1 0 0 1-.993-.883L4 11V1a1 1 0 0 1 .883-.993L5 0zm0 1H5v10h10zm-2.36 2.653.72.694L9.143 8.72 6.64 6.125l.72-.694L9.143 7.28z"})})),Jq=x((e,t)=>hi.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:hi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8l8-8zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),Zq=x((e,t)=>hi.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:hi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 3h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),Qq=x((e,t)=>hi.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:hi.jsx("path",{d:"M6 15.5a.5.5 0 0 1 .5-.5h3a.5.5 0 1 1 0 1h-3a.5.5 0 0 1-.5-.5m-5-2v1a.5.5 0 0 0 .5.5h1a.5.5 0 1 1 0 1H1a1 1 0 0 1-1-1v-1.5a.5.5 0 1 1 1 0m14 0a.5.5 0 1 1 1 0V15a1 1 0 0 1-1 1h-1.5a.5.5 0 1 1 0-1h1a.5.5 0 0 0 .5-.5zm-14-7v3a.5.5 0 0 1-1 0v-3a.5.5 0 0 1 1 0m15 0v3a.5.5 0 1 1-1 0v-3a.5.5 0 1 1 1 0m-16-4V1a1 1 0 0 1 1-1h1.5a.5.5 0 0 1 0 1h-1a.5.5 0 0 0-.5.5v1a.5.5 0 0 1-1 0m6-2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3A.5.5 0 0 1 6 .5m9 2v-1a.5.5 0 0 0-.5-.5h-1a.5.5 0 1 1 0-1H15a1 1 0 0 1 1 1v1.5a.5.5 0 1 1-1 0M4 4v8h8V4zm0-1h8a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1"})})),eT=x((e,t)=>hi.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:hi.jsx("path",{d:"M1 1.5a.5.5 0 0 1 .5-.5H3V0H1.5A1.5 1.5 0 0 0 0 1.5V3h1zM14.5 1a.5.5 0 0 1 .5.5V3h1V1.5A1.5 1.5 0 0 0 14.5 0H13v1zM1 14.5a.5.5 0 0 0 .5.5H3v1H1.5A1.5 1.5 0 0 1 0 14.5V13h1zm14 0a.5.5 0 0 1-.5.5H13v1h1.5a1.5 1.5 0 0 0 1.5-1.5V13h-1zM6 0h4v1H6zM0 6h1v4H0zm15 0h1v4h-1zm-9 9h4v1H6z"})}));let tT=function(e){return e.Sorting="sorting",e.Searching="searching",e.Selections="selections",e.AdjusterHeaderSize="adjustHeaderSize",e}({});const nT="/qListObjectDef",rT=({headerData:e,translator:t,menuAvailabilityFlags:n,setOpen:r,sortFromMenu:o,interactions:i,embedListbox:a,fieldInstance:s,selectionActionsEnabledStatus:l,anchorRef:c,focusColumnAdjuster:u,setActiveFieldCallback:d,expandOrCollapseArgs:p})=>{const f=[];if(n[tT.Sorting]){const{isActivelySorted:n,sortDirection:i}=e,{ascendingEnabled:a,descendingEnabled:s}=(({isActivelySorted:e,sortDirection:t,isPivot:n,isSortedByFirstMeasure:r})=>{let o=!n&&!e||"D"===t,i=!n&&!e||"A"===t;return r&&(o=!1,i=!1),{ascendingEnabled:o,descendingEnabled:i}})(e);f.push([{groupHeading:t.get("NebulaTableUtils.MenuGroupLabel.Sorting"),items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortAscending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"A")),r(!1)},icon:Wq,enabled:a,isActive:!!n&&"A"===i,autoFocus:a},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SortDescending"),onClick:async e=>{e.stopPropagation(),await(o?.(e,"D")),r(!1)},icon:Hq,enabled:s,isActive:!!n&&"D"===i,autoFocus:!a&&s}]}])}if(e.isCyclic&&d){const t=[];t.push([{items:[{id:1,itemTitle:e.groupDimensionLabels[e.groupDimensionPos],enabled:!0,icon:Yq,subMenus:[[{items:e.groupDimensionLabels.map((t,n)=>({id:n+1,itemTitle:t,onClick:e=>{e.stopPropagation(),r(!1),d(n)},enabled:!0,icon:Bq,isActive:e.groupDimensionPos===n}))}]]}]}]),t.length>0&&f.push(...t)}if(e.isDim&&i?.select){const o=[];n[tT.Searching]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Search"),onClick:e=>{e.stopPropagation(),r(!1),a()},icon:Kq,enabled:!0}]}]),!e.isLocked&&n[tT.Selections]&&o.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Selections"),icon:eT,enabled:!!s,subMenus:[[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAll"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAll(nT))},icon:Xq,enabled:l.canSelectAll},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectPossible"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectPossible(nT))},icon:Qq,enabled:l.canSelectPossible},{id:3,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectAlternative"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectAlternative(nT))},icon:Jq,enabled:l.canSelectAlternative},{id:4,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.SelectExcluded"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.selectListObjectExcluded(nT))},icon:Zq,enabled:l.canSelectExcluded}]}],[{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.ClearSelections"),onClick:async e=>{e.stopPropagation(),r(!1),await(s?.clearSelections(nT))},icon:$q,enabled:l.canClearSelections}]}]]}]}]),p&&!p.alwaysFullyExpanded&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Expand"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.expandCallback()},icon:Uq,enabled:!0},{id:2,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.Collapse"),onClick:async e=>{e.stopPropagation(),e.preventDefault(),r(!1),await p.collapseCallback()},icon:Gq,enabled:!0}]}]),o.length>0&&f.push(...o)}return n[tT.AdjusterHeaderSize]&&f.push([{items:[{id:1,itemTitle:t.get("NebulaTableUtils.MenuItemLabel.AdjustColumnSize"),onClick:e=>{e.stopPropagation(),e.preventDefault(),r(!1),u?.(c)},icon:Vq,enabled:!0}]}]),f},oT=({open:e,setOpen:t,anchorRef:n,headerData:r,translator:o,interactions:i,menuAvailabilityFlags:a,shouldShowMenuIcon:s=!0,sortRelatedArgs:c,searchRelatedArgs:d,selectionRelatedArgs:p,adjustHeaderSizeRelatedArgs:f,expandOrCollapseArgs:h,model:m,direction:g="ltr",isPagination:v,isAccessibleHeader:b,iconSize:y=qD})=>{const x=l(null),S=dq({translator:o}),{qLibraryId:w,fieldId:C,headTextAlign:E}=r,I=p?.app,{fieldInstance:D,selectionActionsEnabledStatus:L}=zq({open:e,headerData:r,app:I,qStateName:p?.qStateName}),R=(({model:e,headerData:t})=>{if(e&&"setActiveField"in e&&void 0!==t.dimensionInfoIndex){const n=t.dimensionInfoIndex;return async t=>{try{await e.setActiveField("/qHyperCubeDef",n,t)}catch(e){console.error(e)}}}return null})({model:m,headerData:r}),M=(({qLibraryId:e,fieldId:t,searchRelatedArgs:n,selectionRelatedArgs:r,direction:o,onPopoverClose:i})=>u(()=>{const a=e?{qLibraryId:e,type:"dimension"}:t;if(n?.embed){const{embed:e,listboxRef:t}=n;e.__DO_NOT_USE__.popover(t.current,a,{anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"rtl"===o?"right":"left"},sortCriteria:n.sortCriteria,stateName:r?.qStateName,direction:o,onPopoverClose:i})}},[e,t,n,r?.qStateName,o,i]))({qLibraryId:w,fieldId:C,searchRelatedArgs:d,selectionRelatedArgs:p,direction:g}),A=u(e=>{e.stopPropagation(),t(!1)},[t]),P=u(e=>{e.stopPropagation(),t(e=>!e)},[t]);return i.active?hi.jsxs(vq,{rightAligned:"right"===E,shouldShowMenuIcon:s,className:"nebula-table-utils-head-menu-wrapper",onClick:!1===b?P:void 0,ref:x,isAccessibleHeader:b,children:[s?hi.jsx(bq,{height:y,className:TD,"data-testid":TD,isInteractionsActive:i.active??!1,children:hi.jsx(gq,{})}):null,hi.jsx(_q,{open:e,anchorEl:!1===b?x.current:n.current,onClose:A,menuGroups:rT({headerData:r,translator:S,menuAvailabilityFlags:a,setOpen:t,...c,embedListbox:M,interactions:i,fieldInstance:D,selectionActionsEnabledStatus:L,anchorRef:n,focusColumnAdjuster:f?.focusColumnAdjuster,setActiveFieldCallback:R,expandOrCollapseArgs:h}),direction:g,isPagination:v})]}):null},iT=e=>e.isDark?{background:e.color,borderColor:DL.DARK_MODE_BORDER,color:DL.DARK_MODE_TEXT,disabledColor:DL.DARK_MODE_DISABLED,iconColor:DL.DARK_MODE_TEXT}:{background:e.color,borderColor:DL.BORDER_MEDIUM,color:DL.TEXT,disabledColor:DL.DISABLED},aT=Ms(mc,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({height:40,display:"flex",justifyContent:"flex-end",alignItems:"center",padding:t.spacing(0,1,0,1),color:e.color,background:e.background,borderTop:`1px solid ${e.borderColor}`})),sT=Ms(mp,{shouldForwardProp:e=>"footerStyle"!==e})(({footerStyle:e,theme:t})=>({background:"inherit",marginRight:t.spacing(1),color:e.color,"& .MuiNativeSelect-icon, .MuiNativeSelect-select":{color:e.iconColor}})),lT=Ms(Ic,{shouldForwardProp:e=>"disabledCondition"!==e&&"footerStyle"!==e})(({disabledCondition:e,footerStyle:t,theme:n})=>({color:e?t.disabledColor:t.color,cursor:e?"default":"pointer",marginLeft:n.spacing(1)})),cT=Ms(Pl)(({theme:e})=>({color:"inherit",margin:e.spacing(0,1,0,1)})),uT=({children:e,footerContainer:t,interactions:n,theme:r,paginationNeeded:o=!0})=>{const i=v(()=>iT(r.background),[r]);if(!n.active)return null;const a=o?hi.jsx(aT,{footerStyle:i,children:e}):null;return t?E.createPortal(e,t):a},dT=x((e,t)=>hi.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:hi.jsx("path",{d:"m12 2 1.5 1.5L9 8l4.5 4.5L12 14 6 8zM4 2v12H2V2z"})})),pT=x((e,t)=>hi.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:hi.jsx("path",{d:"m3.5 2 6 6-6 6L2 12.5 6.5 8 2 3.5zM14 2v12h-2V2z"})})),fT=c({}),hT=()=>h(fT),mT=({children:e,direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:d,theme:p,interactions:f,rect:h,layout:m,visibilityThreshold:g})=>{const b=(e=>!e.enabled||e.active)(u)?0:-1,y=v(()=>iT(p.background),[p]),x=o?o.getBoundingClientRect().width:h.width,S=dq({translator:d}),w=v(()=>({direction:t,pageInfo:n,handleChangeRowsPerPage:r,footerContainer:o,isSelectionMode:i,handleChangePage:a,totalRowCount:s,totalColumnCount:l,totalPages:c,keyboard:u,translator:S,theme:p,interactions:f,rect:h,layout:m,footerStyle:y,tabIndex:b,width:x,visibilityThreshold:g}),[t,n,r,o,i,a,s,l,c,u,S,p,f,h,m,y,b,x,g]);return hi.jsx(fT.Provider,{value:w,children:e})},gT=({disabledCondition:e,pageNumber:t,type:n,footerStyle:r,handleChangePage:o,translator:i,interactions:a,tabIndex:s})=>({footerStyle:r,disabledCondition:e,size:"small","data-testid":"pagination-action-icon-button","aria-disabled":e,"aria-label":i.get(`NebulaTableUtils.Pagination.${n}`),title:a.passive?i.get(`NebulaTableUtils.Pagination.${n}`):void 0,tabIndex:s,onClick:e?void 0:()=>{o(t)}});let vT=function(e){return e.FirstPage="FirstPage",e.LastPage="LastPage",e.NextPage="NextPage",e.PreviousPage="PreviousPage",e}({}),bT=function(e){return e[e.DisplayedRowsLabel=250]="DisplayedRowsLabel",e[e.FirstPage=350]="FirstPage",e[e.LastPage=350]="LastPage",e[e.RowsPerPage=550]="RowsPerPage",e[e.SelectPage=700]="SelectPage",e}({});const yT=()=>{const{direction:e,pageInfo:t,width:n,interactions:r,visibilityThreshold:o,footerStyle:i,handleChangePage:a,translator:s,tabIndex:l}=hT(),c=0===t.page,u=gT({type:vT.FirstPage,disabledCondition:c,pageNumber:0,footerStyle:i,handleChangePage:a,translator:s,interactions:r,tabIndex:l});return n<=(o?.firstPage||bT.FirstPage)?null:hi.jsx(lT,{...u,disabled:!r.active,children:"rtl"===e?hi.jsx(pT,{height:qD}):hi.jsx(dT,{height:qD})})},xT=(e,t,n=!1)=>{n&&e.key===OD.Tab&&!e.shiftKey&&(wM(e),((e,t,n)=>{const r=e.closest(".qv-object-wrapper")?.querySelector(".sel-toolbar-confirm")?.parentElement??document.querySelector("#qv-selection-toolbar-popover .sel-toolbar-confirm")?.parentElement;r?r.focus():t.focusSelection?.(n)})(e.target,t,!1))},ST=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,visibilityThreshold:s,footerStyle:l,handleChangePage:c,translator:u,tabIndex:d}=hT(),p=t.page>=r-1,f=gT({type:vT.LastPage,disabledCondition:p,pageNumber:r-1,footerStyle:l,handleChangePage:c,translator:u,interactions:a,tabIndex:d}),h=n.enabled?e=>{xT(e,n,o)}:void 0;return i<=(s?.lastPage||bT.LastPage)?null:hi.jsx(lT,{...f,onKeyDown:h,disabled:!a.active,children:"rtl"===e?hi.jsx(dT,{height:qD}):hi.jsx(pT,{height:qD})})},wT=x((e,t)=>hi.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:hi.jsx("path",{d:"m7 8 4.5 4.5L10 14 4 8l6-6 1.5 1.5z"})})),CT=()=>{const{direction:e,pageInfo:t,keyboard:n,totalPages:r,isSelectionMode:o,width:i,interactions:a,footerStyle:s,handleChangePage:l,translator:c,tabIndex:u}=hT(),d=t.page>=r-1,p=gT({type:vT.NextPage,disabledCondition:d,pageNumber:t.page+1,footerStyle:s,handleChangePage:l,translator:c,interactions:a,tabIndex:u}),f=!(i>bT.FirstPage&&i>bT.LastPage)&&n.enabled?e=>{xT(e,n,o)}:void 0;return hi.jsx(lT,{...p,onKeyDown:f,disabled:!a.active,children:"rtl"===e?hi.jsx(wT,{height:qD}):hi.jsx(Lq,{height:qD})})},ET=()=>{const{direction:e,pageInfo:t,interactions:n,footerStyle:r,handleChangePage:o,translator:i,tabIndex:a}=hT(),s=0===t.page,l=gT({type:vT.PreviousPage,disabledCondition:s,pageNumber:t.page-1,footerStyle:r,handleChangePage:o,translator:i,interactions:n,tabIndex:a});return hi.jsx(lT,{...l,disabled:!n.active,children:"rtl"===e?hi.jsx(Lq,{height:qD}):hi.jsx(wT,{height:qD})})},IT=()=>{const{translator:e,width:t,pageInfo:n,totalRowCount:r,visibilityThreshold:o}=hT(),{page:i,rowsPerPage:a}=n;if(t<=(o?.displayedRowsLabel||bT.DisplayedRowsLabel))return null;const s=e.get("NebulaTableUtils.Pagination.DisplayedRowsLabel",[`${i*a+1} - ${Math.min((i+1)*a,r)}`,r.toString()]);return hi.jsx(cT,{variant:"caption",dir:"ltr",children:s})},DT=({name:e,value:t,options:n,handleChange:r})=>{const{layout:o,footerStyle:i,translator:a,tabIndex:s,interactions:l}=hT(),c=o.qInfo.qId,u=a.get(`NebulaTableUtils.Pagination.${e}`),d=`${e}-dropdown`,p=`${d}-label-${c}`,f={tabIndex:s,id:`${d}-${c}`,"data-testid":d,"aria-labelledby":p};return hi.jsxs(hi.Fragment,{children:[hi.jsxs(cT,{variant:"caption",id:p,children:[u,":"]}),hi.jsx(sT,{footerStyle:i,size:"small",native:!0,value:t,onChange:r,inputProps:f,disabled:!l.active,children:n})]})},LT=()=>{const{pageInfo:e,isSelectionMode:t,totalColumnCount:n,width:r,handleChangeRowsPerPage:o,visibilityThreshold:i}=hT();if(!(!!e.rowsPerPageOptions?.length&&!t&&r>(i?.rowsPerPage||bT.RowsPerPage)&&n<=100)||void 0===e.rowsPerPageOptions)return null;const a=hi.jsx(hi.Fragment,{children:e.rowsPerPageOptions.map(e=>hi.jsx("option",{value:e,children:e},e))});return hi.jsx(DT,{name:"RowsPerPage",value:e.rowsPerPage,options:a,handleChange:e=>{o?.(+e.target.value)}})},RT=1e3,MT="…",AT=({totalPages:e,page:t})=>{const n=Math.min(e,RT),r=n<e&&t>500,o=r?Math.min(500+t,e):n,i=r?Math.max(0,o-RT):0,a=Array.from(Array(n).keys()).map(e=>{const t=e+i;return hi.jsx("option",{value:t,children:t+1},t)});return i>0&&a.unshift(hi.jsx("option",{value:MT,disabled:!0,children:MT},"startMoreOptions")),o<e-1&&a.push(hi.jsx("option",{value:MT,disabled:!0,children:MT},"endMoreOptions")),hi.jsx(hi.Fragment,{children:a})},PT=()=>{const{pageInfo:e,width:t,totalPages:n,handleChangePage:r,visibilityThreshold:o}=hT(),{page:i}=e;if(t<=(o?.selectPage||bT.SelectPage))return null;const a=hi.jsx(AT,{totalPages:n,page:i});return hi.jsx(DT,{name:"SelectPage",value:i,options:a,handleChange:e=>{r(+e.target.value)}})};var qT=y(e=>hi.jsxs(mT,{...e,children:[hi.jsx(LT,{}),hi.jsx(PT,{}),hi.jsx(IT,{}),hi.jsx(yT,{}),hi.jsx(ET,{}),hi.jsx(CT,{}),hi.jsx(ST,{})]}));const TT=e=>hi.jsx(uT,{...e,children:hi.jsx(qT,{...e})}),kT=Sf(null),OT=Sf({current:!1}),NT=Sf({minRow:0,maxRow:0,minCol:0,maxCol:0}),_T=Sf({HEADER:null,TOP:null,LEFT:null,DATA:null,WRAPPER:null}),jT=Sf(null);Sf(e=>({focusCoord:e(kT),shouldRefocus:e(OT),pivotSectionBounds:e(NT),pivotSection:e(_T),pivotCoord:e(jT)})),Sf(null,(e,t,n)=>{t(kT,n)}),Sf(null,(e,t,n)=>{t(NT,e=>({...e,...n}))});const FT=Sf(null,(e,t,n)=>{t(_T,e=>({...e,...n}))}),zT=c({}),WT=()=>h(zT),$T=({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o,children:i})=>{const a=v(()=>({rect:e,pageInfo:t,qPivotDataPages:n,updatePageInfo:r,direction:o}),[e,t,n,r,o]);return hi.jsx(zT.Provider,{value:a,children:i})},VT=c({}),HT=()=>h(VT),BT=({app:e,model:t,theme:n,embed:r,keyboard:o,translator:i,interactions:a,env:s,children:l})=>{const c=v(()=>({model:t,app:e,interactions:a,embed:r,theme:n,keyboard:o,env:s,translator:i}),[e,a,t,r,n,o,s,i]);return hi.jsx(VT.Provider,{value:c,children:l})},GT=c({}),UT=()=>h(GT),YT=({children:e,...t})=>hi.jsx(GT.Provider,{value:t,children:e}),KT=()=>{const{text:e,fontFamily:t,fontSize:n,justifyContent:r,alignItems:o,height:i}=(()=>{const{theme:e,translator:t}=HT(),{layoutService:n}=UT(),r=e.getStyle("","","fontFamily")??cP;return n.hasData?n.hasLimitedData?{text:t.get("SNPivotTable.LimitedData"),fontSize:"13px",fontFamily:r,alignItems:"center",height:"22px"}:{}:{text:t.get("SNPivotTable.NoData"),fontSize:"16px",fontFamily:r,justifyContent:"center",alignItems:"center",height:"100%"}})();return void 0===e?null:hi.jsx("div",{style:{display:"flex",justifyContent:r,alignItems:o,width:"100%",height:i},children:hi.jsx("span",{style:{...MP,fontFamily:t,fontSize:n,fontStyle:"italic",color:"#7b7a78"},children:e})})},XT="/qHyperCubeDef",JT=-1,ZT="PSEUDO-DIM",QT=e=>e===JT?ZT:(({cId:e})=>e??aA())(e),ek=({layoutService:e,visibleLeftDimensionInfos:t,cell:n,colIdx:r})=>{n&&(n.canBeResized=!0,n.colIdx=n.colIdx||r,n.dimensionInfoIndex===JT?n.columnWidthLocation=KA.Measures:n.isLeftDimension?n.columnWidthLocation=KA.Dimension:t.at(-1)===JT?n.columnWidthLocation=KA.Measures:e.hasPseudoDimOnLeft&&(n.columnWidthLocation=KA.Pivot))},tk=e=>{if(!e)return;const{background:t,foreground:n}=e,r=zL(t??""),o=zL(n??""),i=r.isInvalid()?void 0:r.getRGBA(),a=i?xM(i,FD):void 0,s=i?xM(i,zD):void 0;return o.isInvalid()&&void 0!==i?{background:i,color:bM(i),headerMenuHoverBackground:a,headerMenuActiveBackground:s}:{background:i,color:o.isInvalid()?void 0:o.getRGBA(),headerMenuHoverBackground:a,headerMenuActiveBackground:s}},nk=(e,t,n,r,o)=>{const i=QT(n),a=e.getDimensionInfoIndex(n),s=e.isLeftDimension(a);return n===JT?{id:i,colIdx:-1,label:"",sortDirection:"A",fieldId:"",isLocked:!1,isDim:!1,isCyclic:!1,groupDimensionPos:0,groupDimensionLabels:[],headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:KA.Measures,isPivot:!0,qEffectiveDimensionName:void 0}:{id:i,colIdx:0,label:n.qFallbackTitle??"",qReverseSort:n.qReverseSort,sortDirection:n.qSortIndicator&&"N"!==n.qSortIndicator?n.qSortIndicator:"A",qLibraryId:n.qLibraryId,fieldId:n.qGroupFieldDefs[n.qGroupPos],isLocked:n.qLocked??!1,columnWidth:n.columnWidth,qApprMaxGlyphCount:n.qApprMaxGlyphCount,isDim:!0,isCyclic:n.qGrouping===WD.Cyclic,groupDimensionPos:n.qGroupPos,groupDimensionLabels:n.qGroupFallbackTitles,headTextAlign:"left",dimensionInfoIndex:a,canBeResized:!1,isLeftDimension:s,isLastDimension:r,columnWidthLocation:KA.Dimension,isPivot:!0,isSortedByFirstMeasure:t.isSortedByFirstMeasure,qEffectiveDimensionName:n.qEffectiveDimensionName,headerColor:o?.("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")?tk(n.headerColor):void 0}},rk=({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})=>{let i=r;var a;n.length>0&&(i=(a=r).at(-1)===JT?a.slice(0,-1):a);const s=i.length+(n.length?1:0),l=Math.max(1,n.length),c=((e,t)=>Array(e).fill(null).map(()=>Array.from({length:t},()=>null)))(s,l);return n.forEach((n,r,i)=>{const a=r===i.length-1;c[s-1][r]=nk(e,t,n,a,o)}),i.forEach((n,r,i)=>{const a=r===i.length-1;c[r][l-1]=nk(e,t,n,a,o)}),c},ok=(e,t,n,r,o)=>{const i=((e,t,n,r,o)=>{let i;return i=0===n.length||n.includes(JT)?rk({layoutService:e,effectivePropertiesService:t,lastRow:r,lastCol:n,isEnabled:o}):(e=>e[0].map((t,n)=>e.map(e=>e[n])))(rk({layoutService:e,effectivePropertiesService:t,lastRow:n,lastCol:r,isEnabled:o})),e.isIndentModeEnabled&&i[i.length-1].length>1&&(i[i.length-1]=[i.at(-1),...new Array(i[0]?i[0].length-1:0).fill(null)]),i.length&&i.at(-1)?.forEach((t,n)=>{Array.isArray(t)?t.forEach((t,n)=>{ek({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}):ek({layoutService:e,visibleLeftDimensionInfos:r,cell:t,colIdx:n})}),i})(e,t,n,r,o);return{data:i,size:{x:i[0]?.length??0,y:i.length}}},ik=/^data:(?<!\s)\s*(image\/[\w+-.]+)(?<!\s)\s*(;.*?){0,1}(?<!\s)\s*,(.*)/i,ak=5e6,sk=5e5;const lk={fromSearchString:function(e){if(!e)return[];"?"===e[0]&&(e=e.substr(1));const t=[];return e.split("&").forEach(e=>{if(!e)return;const n=e.indexOf("=");let r,o="",i=!1;-1===n?r=e:(r=e.slice(0,n),o=e.slice(n+1),i=!0),t.push(function(e,t,n){return{key:ck(e),value:ck(t.replace(/%2B/g,"shouldNotDecodePlus")),useEqualSign:n}}(r,o,i))}),t}};function ck(e){try{return decodeURIComponent(e)}catch{return e}}function uk(e){if(!(this instanceof uk))throw new Error("Url needs to be called with the new keyword");if(!e)throw new Error("Url needs a string to operate on");const t=function(e){const t={authorityAndPath:"",search:"",hash:""};let n=e.indexOf("#");-1!==n&&(t.hash=e.substr(n),e=e.substr(0,n));n=e.indexOf("?"),-1!==n&&(t.search=e.substr(n),e=e.substr(0,n));return t.authorityAndPath=e,t}(e);Object.defineProperties(this,{authorityAndPath:{value:t.authorityAndPath},search:{value:t.search},hash:{value:t.hash},searchParams:{get:()=>lk.fromSearchString(t.search)}})}function dk(e){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/shouldNotDecodePlus/gi,"%2B")}uk.encodeAuthorityAndPath=function(e){return encodeURI(e).replace(/%5B/gi,"[").replace(/%5D/gi,"]").replace(/%25/gi,"%")},uk.encodeSearchParams=function(e){let t,n="";for(let r=0;r<e.length;r++)t=e[r],n+=0===r?"?":"&",n+=dk(t.key),t.value?n+=`=${dk(t.value)}`:n+=t.useEqualSign?"=":"";return n};var pk=class{_hasNext(){return null!=this._input&&(0!==this._input.length&&this._index<this._input.length)}constructor(e){this._input=e,this._pushback=null,this._temp=null,this._index=0,this._mark=0}pushback(e){this._pushback=e}index(){return this._index}hasNext(){return null!=this._pushback||this._hasNext()}next(){if(null!=this._pushback){const e=this._pushback;return this._pushback=null,e}return this._hasNext()?this._input.charAt(this._index++):null}nextHex(){const e=this.next();return null==e?null:e.match(/[0-9A-Fa-f]/)?e:null}peek(e){return e?!(!this._pushback||this._pushback!==e)||!!this._hasNext()&&this._input.charAt(this._index)===e:this._pushback?this._pushback:this._hasNext()?this._input.charAt(this._index):null}mark(){this._temp=this._pushback,this._mark=this._index}reset(){this._pushback=this._temp,this._index=this._mark}remainder(){let e=this._input.substr(this._index);return null!=this._pushback&&(e=this._pushback+e),e}},fk=class{decode(e){let t="";const n=new pk(e);let r;for(;n.hasNext();)r=this.decodeCharacter(n),t+=null!=r?r:n.next();return t}decodeCharacter(e){return e.next()}};const hk=e=>e>=0&&e<=1114111,mk=e=>e.match(/[\s]/);var gk=class extends fk{decodeCharacter(e){e.mark();const t=e.next();let n,r,o;if(null==t||"\\"!==t)return e.reset(),null;const i=e.next();if(null==i)return e.reset(),null;switch(i){case"\r":e.peek("\n")&&e.next();case"\n":case"\f":case"\0":return this.decodeCharacter(e)}if("NaN"===parseInt(i,16))return i;for(n=i,r=0;r<5&&(o=e.next(),null!=o&&!mk(o));r++){if("NaN"===parseInt(o,16)){e.pushback(o);break}n+=o}const a=parseInt(n,16);return hk(a)?String.fromCharCode(a):"�"}},vk=class e{constructor(e,t){this._key=e,this._value=t}getKey(){return this._key}getValue(){return this._value}equals(t){return t instanceof e&&(this._key===t._key&&this._value===t._value)}static newInstanceIfNeeded(){let t,n,r=arguments[0];return"string"==typeof arguments[1]?(t=arguments[1],n=r.length):(n=arguments[1],t=arguments[2]),t&&r?(r.length>n&&(r=r.substr(0,n)),new e(r,t)):null}},bk=class e{setValue(e){this._nextMap=null,this._value=e}getNextNode(e){return this._nextMap?this._nextMap[e]:null}put(t,n,r){let o,i;if(t.length===n)return i=this._value,this.setValue(r),i;const a=t.charAt(n);return this._nextMap?(o=this._nextMap[a],o||(o=new e,this._nextMap[a]=o)):(this._nextMap={},o=new e,this._nextMap[a]=o),o.put(t,n+1,r)}get(e,t){if(e.length<=t)return this._value;const n=this.getNextNode(e.charAt(t));return n?n.get(e,t+1):null}getLongestMatch(e,t){if(e.length<=t)return vk.newInstanceIfNeeded(e,this._value);const n=this.getNextNode(e.charAt(t));if(!n)return vk.newInstanceIfNeeded(e,t,this._value);const r=n.getLongestMatch(e,t+1);return r||vk.newInstanceIfNeeded(e,t,this._value)}},yk=class{constructor(){this.clear()}getLongestMatch(e){return this.root&&e?this.root.getLongestMatch(e,0):null}getMaxKeyLength(){return this.maxKeyLen}clear(){this.root=null,this.maxKeyLen=0,this.size=0}put(e,t){this.root||(this.root=new bk);const n=this.root.put(e,0,t);return n||(e.length>this.maxKeyLen&&(this.maxKeyLen=e.length),this.size++,null)}};const xk=(()=>{const e=[],t=[],n=new yk;let r,o,i;for(r in e["""]="34",e["&"]="38",e["<"]="60",e[">"]="62",e[" "]="160",e["¡"]="161",e["¢"]="162",e["£"]="163",e["¤"]="164",e["¥"]="165",e["¦"]="166",e["§"]="167",e["¨"]="168",e["©"]="169",e["ª"]="170",e["«"]="171",e["¬"]="172",e["­"]="173",e["®"]="174",e["¯"]="175",e["°"]="176",e["±"]="177",e["²"]="178",e["³"]="179",e["´"]="180",e["µ"]="181",e["¶"]="182",e["·"]="183",e["¸"]="184",e["¹"]="185",e["º"]="186",e["»"]="187",e["¼"]="188",e["½"]="189",e["¾"]="190",e["¿"]="191",e["À"]="192",e["Á"]="193",e["Â"]="194",e["Ã"]="195",e["Ä"]="196",e["Å"]="197",e["Æ"]="198",e["Ç"]="199",e["È"]="200",e["É"]="201",e["Ê"]="202",e["Ë"]="203",e["Ì"]="204",e["Í"]="205",e["Î"]="206",e["Ï"]="207",e["Ð"]="208",e["Ñ"]="209",e["Ò"]="210",e["Ó"]="211",e["Ô"]="212",e["Õ"]="213",e["Ö"]="214",e["×"]="215",e["Ø"]="216",e["Ù"]="217",e["Ú"]="218",e["Û"]="219",e["Ü"]="220",e["Ý"]="221",e["Þ"]="222",e["ß"]="223",e["à"]="224",e["á"]="225",e["â"]="226",e["ã"]="227",e["ä"]="228",e["å"]="229",e["æ"]="230",e["ç"]="231",e["è"]="232",e["é"]="233",e["ê"]="234",e["ë"]="235",e["ì"]="236",e["í"]="237",e["î"]="238",e["ï"]="239",e["ð"]="240",e["ñ"]="241",e["ò"]="242",e["ó"]="243",e["ô"]="244",e["õ"]="245",e["ö"]="246",e["÷"]="247",e["ø"]="248",e["ù"]="249",e["ú"]="250",e["û"]="251",e["ü"]="252",e["ý"]="253",e["þ"]="254",e["ÿ"]="255",e["&OElig"]="338",e["&oelig"]="339",e["&Scaron"]="352",e["&scaron"]="353",e["&Yuml"]="376",e["&fnof"]="402",e["&circ"]="710",e["&tilde"]="732",e["&Alpha"]="913",e["&Beta"]="914",e["&Gamma"]="915",e["&Delta"]="916",e["&Epsilon"]="917",e["&Zeta"]="918",e["&Eta"]="919",e["&Theta"]="920",e["&Iota"]="921",e["&Kappa"]="922",e["&Lambda"]="923",e["&Mu"]="924",e["&Nu"]="925",e["&Xi"]="926",e["&Omicron"]="927",e["&Pi"]="928",e["&Rho"]="929",e["&Sigma"]="931",e["&Tau"]="932",e["&Upsilon"]="933",e["&Phi"]="934",e["&Chi"]="935",e["&Psi"]="936",e["&Omega"]="937",e["&alpha"]="945",e["&beta"]="946",e["&gamma"]="947",e["&delta"]="948",e["&epsilon"]="949",e["&zeta"]="950",e["&eta"]="951",e["&theta"]="952",e["&iota"]="953",e["&kappa"]="954",e["&lambda"]="955",e["&mu"]="956",e["&nu"]="957",e["&xi"]="958",e["&omicron"]="959",e["&pi"]="960",e["&rho"]="961",e["&sigmaf"]="962",e["&sigma"]="963",e["&tau"]="964",e["&upsilon"]="965",e["&phi"]="966",e["&chi"]="967",e["&psi"]="968",e["&omega"]="969",e["&thetasym"]="977",e["&upsih"]="978",e["&piv"]="982",e["&ensp"]="8194",e["&emsp"]="8195",e["&thinsp"]="8201",e["&zwnj"]="8204",e["&zwj"]="8205",e["&lrm"]="8206",e["&rlm"]="8207",e["&ndash"]="8211",e["&mdash"]="8212",e["&lsquo"]="8216",e["&rsquo"]="8217",e["&sbquo"]="8218",e["&ldquo"]="8220",e["&rdquo"]="8221",e["&bdquo"]="8222",e["&dagger"]="8224",e["&Dagger"]="8225",e["&bull"]="8226",e["&hellip"]="8230",e["&permil"]="8240",e["&prime"]="8242",e["&Prime"]="8243",e["&lsaquo"]="8249",e["&rsaquo"]="8250",e["&oline"]="8254",e["&frasl"]="8260",e["&euro"]="8364",e["&image"]="8365",e["&weierp"]="8472",e["&real"]="8476",e["&trade"]="8482",e["&alefsym"]="8501",e["&larr"]="8592",e["&uarr"]="8593",e["&rarr"]="8594",e["&darr"]="8595",e["&harr"]="8596",e["&crarr"]="8629",e["&lArr"]="8656",e["&uArr"]="8657",e["&rArr"]="8658",e["&dArr"]="8659",e["&hArr"]="8660",e["&forall"]="8704",e["&part"]="8706",e["&exist"]="8707",e["&empty"]="8709",e["&nabla"]="8711",e["&isin"]="8712",e["¬in"]="8713",e["&ni"]="8715",e["&prod"]="8719",e["&sum"]="8721",e["&minus"]="8722",e["&lowast"]="8727",e["&radic"]="8730",e["&prop"]="8733",e["&infin"]="8734",e["&ang"]="8736",e["&and"]="8743",e["&or"]="8744",e["&cap"]="8745",e["&cup"]="8746",e["&int"]="8747",e["&there4"]="8756",e["&sim"]="8764",e["&cong"]="8773",e["&asymp"]="8776",e["&ne"]="8800",e["&equiv"]="8801",e["&le"]="8804",e["&ge"]="8805",e["&sub"]="8834",e["&sup"]="8835",e["&nsub"]="8836",e["&sube"]="8838",e["&supe"]="8839",e["&oplus"]="8853",e["&otimes"]="8855",e["&perp"]="8869",e["&sdot"]="8901",e["&lceil"]="8968",e["&rceil"]="8969",e["&lfloor"]="8970",e["&rfloor"]="8971",e["&lang"]="9001",e["&rang"]="9002",e["&loz"]="9674",e["&spades"]="9824",e["&clubs"]="9827",e["&hearts"]="9829",e["&diams"]="9830",e)"function"!=typeof e[r]&&e.hasOwnProperty(r)&&(t[e[r]]=r);for(o in t)"function"!=typeof t[o]&&t.hasOwnProperty(o)&&(i=t[o].toLowerCase().substr(1),n.put(i,String.fromCharCode(o)));return n})();var Sk=class extends fk{decodeCharacter(e){let t;e.mark();const n=e.next();if(null==n||"&"!==n)return e.reset(),null;const r=e.next();if(null==r)return e.reset(),null;if("#"===r){if(t=this._getNumericEntity(e),null!=t)return t}else if(r.match(/[A-Za-z]/)&&(e.pushback(r),t=this._getNamedEntity(e),null!=t))return t;return e.reset(),null}_getNamedEntity(e){let t,n,r,o="";for(t=Math.min(e.remainder().length,xk.getMaxKeyLength()),r=0;r<t;r++)o+=e.next().toLowerCase();const i=xk.getLongestMatch(o);if(null==i)return null;for(e.reset(),e.next(),t=i.getKey().length,n=0;n<t;n++)e.next();return e.peek(";")&&e.next(),i.getValue()}_getNumericEntity(e){const t=e.peek();return null==t?null:"x"===t||"X"===t?(e.next(),this._parseHex(e)):this._parseNumber(e)}_parseHex(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,16))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,16);return!Number.isNaN(+r)&&hk(r)?String.fromCharCode(r):null}_parseNumber(e){let t,n="";for(;e.hasNext();){if(t=e.peek(),Number.isNaN(+parseInt(t,10))){if(";"===t){e.next();break}break}n+=t,e.next()}const r=parseInt(n,10);return!Number.isNaN(+r)&&hk(r)?String.fromCharCode(r):null}},wk=class extends fk{decodeCharacter(e){e.mark();const t=e.next();let n,r,o,i;if(null==t)return e.reset(),null;if("%"!==t)return e.reset(),null;for(n="",r=0;r<2;r++)o=e.nextHex(),null!=o&&(n+=o);return 2===n.length&&(i=parseInt(n,16),hk(i))?String.fromCharCode(i):(e.reset(),null)}};let Ck;"undefined"!=typeof document&&(Ck=document.createElement("div"));const Ek=Array.prototype.indexOf,Ik=[",",".","_"," "],Dk=[",",".","-","_"," "],Lk={width:["%"],height:["%"]},Rk={default:["-"," ","%"],color:["#"," ","(",")"],image:["(",")",":","/","?","&","-",".",'"',"="," "]},Mk={background:["(",")",":","%","/","?","&","-"," ",".",'"',"=","#"],"background-image":Rk.image,"background-color":Rk.color,"border-color":Rk.color,"border-image":Rk.image,color:Rk.color,icon:Rk.image,"list-style-image":Rk.image,"outline-color":Rk.color},Ak={attr_name:["^on[a-z]{1,}","style","href","src"],attr_val:["javascript:","data:"],css_key:["behavior","-moz-behavior","-ms-behavior"],css_val:["expression"]};function Pk(e,t,n){let r;if(t){if(Ek)return Ek.call(t,e,n);for(r=t.length,n=n?n<0?Math.max(0,r+n):n:0;n<r;n++)if(n in t&&t[n]===e)return n}return-1}function qk(e){if(null==e)return"";let t="";const n=document.createTextNode(e);return Ck.appendChild(n),t=Ck.innerHTML,Ck.removeChild(n),t}function Tk(e,t,n){let r,o,i,a,s,l,c,u,d;for(e=Ok(e).toLowerCase(),t=Ok(t),i=0;i<Ak.attr_name.length;i++)if(e.match(Ak.attr_name[i]))throw new Error(`Unsafe attribute name used: ${e}`);for(i=0;i<Ak.attr_val.length;i++)if(t.toLowerCase().match(Ak.attr_val[i]))throw new Error(`Unsafe attribute value used: ${t}`);if(r=Lk[e],r||(r=Dk),o="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z\-0-9]/))throw new Error("Invalid attribute name specified");o+=s}o+='="'}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&Pk(c,r)<0?(d=u.toString(16),o+=`&#x${d};`):o+=c;return n||(o+='"'),o}function kk(e,t,n){let r,o,i,a,s,l,c,u,d,p;if(e=Ok(e).toLowerCase(),t=Ok(t),Pk(e,Ak.css_key)>=0)throw new Error(`Unsafe property name used: ${e}`);for(r=0;r<Ak.css_val.length;r++)if(t.toLowerCase().indexOf(Ak.css_val[r])>=0)throw new Error(`Unsafe property value used: ${t}`);if(o=Mk[e],o||(o=Rk.default),i="",!n){for(a=0;a<e.length;a++){if(s=e.charAt(a),!s.match(/[a-zA-Z-]/))throw new Error("Invalid Property Name specified");i+=s}i+=": "}for(l=0;l<t.length;l++)c=t.charAt(l),u=t.charCodeAt(l),!c.match(/[a-zA-Z0-9]/)&&Pk(c,o)<0?(d=u.toString(16),p="000000".substr(d.length),i+=`\\${p}${d}`):i+=c;return i}function Ok(e,t){let n,r,o,i,a=!1;if(null===e)return null;n=e,r=e,o=0;const s=[new Sk,new wk,new gk];for(;!a;){r=n;for(let e=0;e<s.length;e++)i=s[e].decode(n),i!==n&&(o++,n=i);r!==n||(a=!0)}if(t&&o>1)throw new Error("Attack Detected - Multiple/Double Encodings used in input");return n}const Nk=[];for(let e=0;e<255;e++)Nk[e]=e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?null:e.toString(16);const _k={html:e=>qk(e.unsafe),css(e){let t,n=[];const r=[],o={};let i="";for(t in e.map?n=e.map:n[e.name]=e.unsafe,n)"function"!=typeof n[t]&&n.hasOwnProperty(t)&&(r[t]=kk(t,n[t],!0),i+=kk(t,n[t],!0),o[t]=r[t]);return e.map?o:i},attr(e){let t=[];const n=[],r={};let o="";e.map?t=e.map:t[e.name]=e.unsafe;for(const e in t)"function"!=typeof t[e]&&t.hasOwnProperty(e)&&(n[e]=Tk(e,t[e],!0),o+=Tk(e,t[e],!0),r[e]=n[e]);return e.map?r:o}};function jk(e,t){throw new Error(t)}var Fk={canonicalize:Ok,encode:function(){const e={context:"html",unsafe:null,name:null,map:null,setter:null,strict:!0};return 1===arguments.length&&"object"==typeof arguments[0]?function(){let e,t,n;const r=arguments[0]||{};let o=1;const i=arguments.length;for(;o<i;o++)if(null!=(e=arguments[o]))for(t in e)if(e.hasOwnProperty(t)){if(n=e[t],r===n)continue;void 0!==n&&(r[t]=n)}}(e,arguments[0]):(e.context=arguments[0],2===arguments.length?"html"===e.context?e.unsafe=arguments[1]:"attr"!==e.context&&"css"!==e.context||(e.map=arguments[1]):(e.name=arguments[2],e.unsafe=arguments[1])),"html"===e.context?_k.html(e):"css"===e.context?(null!=e.map&&"object"!=typeof e.map&&jk(this,"Invalid parameter type"),_k.css(e)):"attr"===e.context?(null!=e.map&&"object"!=typeof e.map&&jk(this,"Invalid parameter type"),_k.attr(e)):void jk(this,"Invalid parameter type")},encodeForAttr:Tk,encodeForAttr2:function(e){return Tk("nonsens",e,!0)},encodeForCSS:kk,encodeForHref:function(e){Ok(e),0!==e.search("[a-zA-Z0-9]+:")&&(e=`http://${e}`);const t=new uk(e),n=uk.encodeAuthorityAndPath(t.authorityAndPath),r=t.searchParams;e=n+uk.encodeSearchParams(r)+t.hash;const o=decodeURI(e).toLowerCase();if(-1!==o.indexOf("javascript:"))throw new Error("Attack Detected - Javascript in input");if(-1!==o.indexOf("data:"))throw new Error("Attack Detected - data in input");return e},encodeForJS:function(e,t){let n,r,o,i,a,s;for(t||(t=Ik),s="",n=0;n<e.length;n++)o=e.charAt(n),i=e.charCodeAt(n),Pk(o,t)>=0||null==Nk[i]?s+=o:(r=i.toString(16),i<256?(a="00".substr(r.length),s+=`\\x${a}${r.toUpperCase()}`):(a="0000".substr(r.length),s+=`\\u${a}${r.toUpperCase()}`));return s},encodeForHTML:qk,encodeForURL:function(e,t){let n="";return t&&(t.match(/^[A-Za-z\-0-9]{1,}$/)?n+=Ok(t).toLowerCase():jk(this,"Illegal Attribute Name Specified"),n+='="'),n+=encodeURIComponent(e).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A"),n+=t?'"':"",n},isSafeDataURL:(e,t)=>{const{maxByteSizeSvg:n=sk,maxByteSizeImage:r=ak}=t??{},{mimeType:o,encoding:i,data:a}=(e=>{const[,t,n,r]=ik.exec(e.trim())??[];return{encoding:n,data:r,mimeType:t?.toLocaleLowerCase()}})(e);if(!a)return!0;const s=((e,t,n)=>{const r={type:e};if(t?.includes(";base64"))try{return new Blob([atob(n)],r).size}catch{return new Blob([n],r).size}return"image/svg+xml"===e?new Blob([n],r).size:0})(o,i,a);return"image/svg+xml"===o?s<=n:s<=r},validateURI:function(e){if(""===e||function(e){if("canParse"in URL)return URL.canParse(e);try{return new URL(e),!0}catch{return!1}}(e))return!1;const t=e.replace(/%2E/gi,".");if(t.match(/[#&=: ]/))return!1;const n=function(e){let t=e,n="";for(;t.length>0;)if(t.startsWith("../")||t.startsWith("./"))t=t.replace(/^\.\.?\//,"");else if(t.startsWith("/./"))t=t.replace(/^\/\.\//,"/");else if("/."===t)t="/";else if(t.startsWith("/../")){t=t.replace(/^\/\.\.\//,"/");const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("/.."===t){t="/";const e=n.lastIndexOf("/");-1!==e&&(n=n.slice(0,e))}else if("."===t||".."===t)t="";else{const e=t.match(/^\/?[^/]*/),r=e?e[0]:"";t=t.slice(r.length),n+=r}return n}(t);return""!==n&&"/"!==n&&n}};const zk=(e,t)=>t.qAttrExps?.qValues?.[e],Wk=(e,t)=>{switch(e){case"topLeft":default:return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-start"};case"centerLeft":return{horizontal:"center",vertical:"flex-start"};case"bottomLeft":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-start"};case"topCenter":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"center"};case"centerCenter":return{horizontal:"center",vertical:"center"};case"bottomCenter":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"center"};case"topRight":return{horizontal:"rtl"===t?"flex-end":"flex-start",vertical:"flex-end"};case"centerRight":return{horizontal:"center",vertical:"flex-end"};case"bottomRight":return{horizontal:"rtl"===t?"flex-start":"flex-end",vertical:"flex-end"}}},$k=({text:e,url:t,imageSize:n,imagePosition:r,labelStructure:o,imageBox:i,direction:a})=>!r||t&&(t.toLowerCase().includes("javascript:")||!Fk.isSafeDataURL(t))?{type:$A.Text,url:void 0,text:e,labelStructure:o}:{type:$A.Image,url:t||"",text:e,imageSize:n,resolvedImagePosition:Wk(r,a),labelStructure:o,imageBox:i},Vk=(e,t,n,r)=>{if(!e.qMiniChart||!t?.miniChart||!n)return{type:$A.Text,text:r};const{minY:o,maxY:i}=((e,t,n)=>{const r="global"===t.yAxis?.scale,o="zeroCenter"===t.yAxis?.position,i=r?n.qYMin:e.qMiniChart.qMin,a=r?n.qYMax:e.qMiniChart.qMax;if(o){const e=Math.max(Math.abs(i),Math.abs(a));return{minY:-e,maxY:e}}return(e=>"zeroBaseline"===e.yAxis?.position||"bars"===e.type&&"auto"===e.yAxis?.position)(t)?{minY:Math.min(0,i),maxY:Math.max(0,a)}:{minY:i,maxY:a}})(e,t.miniChart,n),a={type:t.miniChart.type,qMatrix:e.qMiniChart.qMatrix,minY:o,maxY:i,showDots:!!t.miniChart.showDots,colors:t.miniChart.colors,colorMin:e.qMiniChart.qMin,colorMax:e.qMiniChart.qMax};return{type:$A.MiniChart,text:r,miniChart:a}},Hk=(e,t,n)=>{const r=Array.isArray(t.qAttrExps)?t.qAttrExps[0]:t.qAttrExps,o=r?.qValues?.[e];if(o){const e=Number.isNaN(+o.qNum)?void 0:`${o.qNum}`;return o.qText||e}return n?.urlPosition===VA.Attribute?void 0:n?.urlLabel},Bk=({labelStructure:e,text:t,url:n})=>{try{if(!n)throw Error("Invalid url");return{type:$A.Link,url:Fk.encodeForHref(n),text:t,labelStructure:e}}catch{return{type:$A.Text,url:void 0,text:t,labelStructure:e}}},Gk=({cell:e,representationProperties:t,attrExprInfoIndex:n,env:r,conditionalColoring:o,miniChartOnMeasure:i,labelStructure:a,getText:s=e=>e.qText,direction:l,enabledFeatures:c})=>{const u=HA(t),d=s(e);return u===$A.Image&&c[$A.Image]&&!r.anything.sense?.isUnsupportedFeature?.("tableImages")?((e,t,n,r,o,i)=>{const{imageSize:a,imagePosition:s,imageSetting:l,imageLabel:c,imageBox:u}=t??{};if("url"===l){const t=zk(n.imageUrl??-1,e)?.qText;return i&&(i.maskedValue=t??""),$k({text:r,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}if("label"===l){const t=i?i.originalValue:r;if(-1===n.imageLabel)return $k({text:c||t||"",url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o});const l=zk(n.imageLabel??-1,e)?.qText??r;return $k({text:l,url:t,imageSize:a,imagePosition:s,labelStructure:i,imageBox:u,direction:o})}return{type:$A.Text,url:void 0,labelStructure:i,text:r}})(e,t,n,d,l,a):u===$A.Link?((e,t,n,r,o)=>{const{urlPosition:i}=t??{};if(i===VA.Attribute){const i=Hk(n.url??-1,e,t);return Bk({labelStructure:r,text:o||i||"",url:i})}if(i===VA.Dimension){const i=Hk(n.urlLabel??-1,e,t)||o;return r&&(r.maskedValue=i),Bk({text:i,labelStructure:r,url:r?.originalValue??o})}return{type:$A.Text,url:void 0,text:o,labelStructure:r}})(e,t,n,a,d):u===$A.Indicator&&c[$A.Indicator]&&!r.anything.sense?.isUnsupportedFeature?.("tableIndicators")?((e,t,n)=>{const{indicator:r}=e??{};return{type:$A.Indicator,url:void 0,text:n,indicator:{applySegmentColors:r?.applySegmentColors,position:r?.position,showTextValues:r?.showTextValues},indicatorConditionalColoring:t}})(t,o,d):u===$A.MiniChart&&c[$A.MiniChart]&&!r.anything.sense?.isUnsupportedFeature?.("qMiniChartDef")?Vk(e,t,i,d):{type:$A.Text,url:void 0,text:d,labelStructure:a}},Uk=(e,t)=>{const n=t.qAttrExps,r=n?.qValues?.[e?.cellForegroundColor??-1]?.qText,o=n?.qValues?.[e?.cellBackgroundColor??-1]?.qText,i=o?SM(o):null,a=r?SM(r):null,s=((e,t)=>e||!t?null:bM(t))(a,i);return{color:s??a,background:i}},Yk=(e,t)=>t.qSubNodes.reduce((e,t)=>0===t.qSubNodes.length?e+1:Yk(e,t),e),Kk=(e,t,n,r,o,i)=>{const a=o?i.rowsPerPage-n:dP-r;let s=e.qUp+e.qDown;if(o&&0===n){const n=(t+e.qUp)%i.rowsPerPage;s=e.qDown+n}return Math.min(a,Yk(s,e))},Xk=({node:e,parent:t,root:n,x:r,y:o,pageY:i,layoutService:a,dimensionInfo:s,attrExprInfoIndex:l,isLeftColumn:c=!0,isIndentModeEnabled:u=!1,pseudoDimMeasureIndex:d,indentLevel:p,labelStructure:f,env:h,pageInfo:m,direction:g="ltr"})=>{const v=(!u||!c)&&"P"===e.qType,b=((e,t)=>{if(e!==JT){if(t){const t=HA(e.representation);return t===$A.Link||t===$A.Image?e.representation:{type:$A.Text}}return e.representation}})(s,u),y=(({node:e,isLeftColumn:t,isIndentModeEnabled:n,labelStructure:r,representationType:o,parentOrRootOriginalValue:i})=>{let a=e.qText;if(t&&n&&r){const{originalValue:t,delimeter:n,suffix:s}=r;a=o===$A.Link?"P"===e.qType?i:t:`${t} ${!s||!t&&s?"":n} ${s}`.trim()}return a})({node:e,isLeftColumn:c,isIndentModeEnabled:u,labelStructure:f,representationType:HA(b),parentOrRootOriginalValue:(t||n)?.representation?.labelStructure?.originalValue??""}),x=Gk({cell:{...e,qText:y},representationProperties:b,attrExprInfoIndex:l,env:h,labelStructure:f,direction:g,enabledFeatures:{[$A.Image]:!0,[$A.Indicator]:!0}}),S={id:aA(),ref:e,x:r,y:o,pageX:r,pageY:i,mainAxisPageCoord:c?i:r,isLeftColumn:c,parent:t,root:n,children:[],isLeafNode:0===e.qSubNodes.length,leafCount:Kk(e,o,i,r,c,m),distanceToNextCell:0,isLockedByDimension:!("object"!=typeof s||!s.qLocked),isTotal:"T"===e.qType||!!t?.isTotal,isEmpty:"E"===e.qType||-4===e.qElemNo,isNull:"U"===e.qType,isPseudoDimension:v,expressionColor:Uk(l,e),selectionCellType:c?"L":"T",dimensionInfoIndex:a.getDimensionInfoIndex(s),canBeResized:0===e.qSubNodes.length&&!c,visibleMeasureInfoIndex:d??(v?e.qElemNo:t?.visibleMeasureInfoIndex),representation:x,...void 0!==p&&{indentLevel:p},headerColor:v&&h.flags.isEnabled("VNA-727-HEADER-COLOR-EXPRESSION-PIVOT")&&void 0!==e.qElemNo?tk(a.visibleMeasureInfo[e.qElemNo]?.headerColor):void 0};return t&&(t.children[S.mainAxisPageCoord-t.mainAxisPageCoord]=S),S},Jk=(e,t,n,r,o,i,a,s,l)=>{const{isIndentModeEnabled:c}=o,u=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING");if(!t.length)return e;let d=0;return function t(p,f,h,m=0,g=-1){e[m]||(e[m]={}),c&&g++;const v=o.leftDimensionInfoIndexes.indexOf(JT);h.forEach((h,b)=>{const y={originalValue:h.qText??"",maskedValue:"",delimeter:"-",suffix:""};d+=0===b?0:1;const x=n.qTop-r.page*r.rowsPerPage,S=Math.max(0,x+d-h.qUp),w=n.qTop+d-h.qUp;let C;if(c){if(o.hasPseudoDimOnLeft&&g<=v)if(y.originalValue=h.qText??"",y.maskedValue=h.qText??"","N"===h.qType||"U"===h.qType||"T"===h.qType)"U"===h.qType&&(y.originalValue=u?o.getDimensionNullValueText():o.getNullValueText()),g<v&&(y.suffix=o.visibleMeasureInfo[0].qFallbackTitle??"");else if("P"===h.qType){y.originalValue=(f||p)?.representation.labelStructure?.originalValue??"",y.maskedValue=(f||p)?.representation.labelStructure?.originalValue??"",y.suffix=h.qText??"";const e=h.qSubNodes;C=h.qElemNo,h={...(f||p)?.ref,...h.qText?{qText:h.qText}:{},qSubNodes:e},g=(f||p)?.indentLevel??0}"U"===h.qType&&(y.originalValue=u?o.getDimensionNullValueText():o.getNullValueText())}let E=m;c&&(E=v>=1&&g>=v?g+1:g,0===g&&0===v&&0===h.qSubNodes.length&&(E=0));const I=e.at(m)?.[S],D=c&&void 0===I?.ref.qText||!I?Xk({node:h,parent:f,root:p,x:E,y:w,pageY:S,layoutService:o,dimensionInfo:i[E],attrExprInfoIndex:a[E],isLeftColumn:!0,...c&&{isIndentModeEnabled:c,indentLevel:g},env:s,pageInfo:r,labelStructure:y,direction:l,pseudoDimMeasureIndex:C}):e[m][S];if(e[m][S]=D,h.qSubNodes.length){const e=c?0:m+1;t(p||D,D,h.qSubNodes,e,g)}})}(null,null,t,0,-1),e},Zk=(e,t)=>{e.slice(0,-1).forEach(e=>{Object.values(e).forEach((e,n,r)=>{const o=r.at(n+1);e.distanceToNextCell=o?o.mainAxisPageCoord-(e.mainAxisPageCoord+e.leafCount):t-(e.mainAxisPageCoord+e.leafCount)})})},Qk=(e,t)=>{const n=e[0],r=n?Object.values(n):[],o=t?.isIndentModeEnabled&&t.hasPseudoDimOnLeft?t.visibleMeasureInfo.length-1:0,i=n?.[o],a=r.at(-1);return i?.isTotal?i.isLeafNode?i.mainAxisPageCoord:i.mainAxisPageCoord+i.leafCount-1:a?.isTotal?a.mainAxisPageCoord-1:-1},eO=({prevData:e,nextDataPage:t,pageInfo:n,layoutService:r,visibleLeftDimensionInfo:o,attrExprInfoIndexes:i,env:a,direction:s})=>{const{qLeft:l,qArea:c}=t;if(!l.length)return e;const u=Jk(e.grid,l,c,n,r,o,i,a,s);Zk(u,n.rowsOnCurrentPage);const d=Qk(u,r);return{...e,grid:u,columnCount:u.length,totalDividerIndex:d}},tO=({qArea:e,prevData:t,pivotValuePoints:n,pageInfo:r})=>{const o=[...t];return n.forEach((t,n)=>{t.forEach((t,i)=>{const a=e.qTop-r.page*r.rowsPerPage+n,s=e.qLeft+i;Array.isArray(o[a])||(o[a]=[]);const l="U"===t.qType;o[a][s]=o[a][s]??{id:aA(),ref:t,isNull:l}})}),o},nO=({prevData:e,dataPage:t,pageInfo:n})=>{const{qData:r,qArea:o}=t;return r?.length?tO({qArea:o,prevData:e,pivotValuePoints:r,pageInfo:n}):e},rO=(e,t,n,r,o,i,a,s,l,c)=>{const{isIndentModeEnabled:u}=r;if(!t.length)return e;let d=0;!function t(a,p,f,h=0){e[h]||(e[h]={}),f.forEach((f,m)=>{d+=0===m?0:1;const g=n.qLeft+d-f.qUp,v=e[h][g]??Xk({node:f,parent:p,root:a,x:g,y:h,pageY:h,layoutService:r,dimensionInfo:o[h],attrExprInfoIndex:i[h],isLeftColumn:!1,...u&&{isIndentModeEnabled:u},env:s,pageInfo:l,direction:c});e[h][g]=v,f.qSubNodes.length&&t(a||v,v,f.qSubNodes,h+1)})}(null,null,t);for(let t=0;t<a-e.length;t++)e.push({});return e},oO=({prevData:e,nextDataPage:t,layoutService:n,visibleTopDimensionInfo:r,attrExprInfoIndexes:o,headerRows:i,env:a,pageInfo:s,direction:l})=>{const{qTop:c,qArea:u}=t;if(!c.length)return e;const d=rO(e.grid,c,u,n,r,o,i,a,s,l);Zk(d,n.size.x);const p=Qk(d);return{...e,grid:d,rowCount:d.length,totalDividerIndex:p}},iO=e=>-1===e?{}:e.qAttrExprInfo.reduce((e,{id:t},n)=>(e[t]=n,e),{}),aO=(e,t)=>{const{env:n}=HT(),{direction:r}=WT(),{layoutService:o,effectivePropertiesService:i}=UT(),{qPivotDataPages:a,pageInfo:s}=WT(),[l,c]=m(null),d=((e,t,n)=>v(()=>({left:e.map(iO),top:t.map(iO),measures:n.map(iO)}),[n,e,t]))(e,t,o.visibleMeasureInfo),p=n.flags.isEnabled,f=v(()=>ok(o,i,t,e,p),[o,i,t,e,p]),h=u(()=>a.slice(1).reduce((e,t)=>nO({prevData:e,dataPage:t,pageInfo:s}),((e,t)=>{const{qData:n,qArea:r}=e;return tO({qArea:r,prevData:[],pivotValuePoints:n,pageInfo:t})})(a[0],s)),[a,s]),g=u(()=>a.slice(1).reduce((e,i)=>oO({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:d.top,headerRows:f.size.y,env:n,pageInfo:s,direction:r}),((e,t,n,r,o,i,a,s)=>{const{qArea:l,qTop:c}=e,u=rO([],c,l,t,n,r,o,i,a,s);Zk(u,t.size.x);const d=Qk(u);return{grid:u,rowCount:u.length,layoutSize:t.size,totalDividerIndex:d}})(a[0],o,t,d.top,f.size.y,n,s,r)),[a,o,t,d.top,f.size.y,n,s,r]),b=u(()=>a.slice(1).reduce((t,i)=>eO({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:d.left,env:n,direction:r}),((e,t,n,r,o,i,a)=>{const{qArea:s,qLeft:l}=e,c=Jk([],l,s,n,t,r,o,i,a);Zk(c,n.rowsOnCurrentPage);const u=Qk(c,t);return{grid:c,columnCount:c.length,layoutSize:t.size,totalDividerIndex:u}})(a[0],o,s,e,d.left,n,r)),[a,o,s,e,d,n,r]),[y,x]=m(()=>h()),[S,w]=m(()=>g()),[C,E]=m(()=>b());cq(()=>{x(h())},[h]),cq(()=>{w(g())},[g]),cq(()=>{E(b())},[b]),cq(()=>{l&&l.forEach(i=>{x(e=>nO({prevData:e,dataPage:i,pageInfo:s})),w(e=>oO({prevData:e,nextDataPage:i,layoutService:o,visibleTopDimensionInfo:t,attrExprInfoIndexes:d.top,headerRows:f.size.y,env:n,pageInfo:s,direction:r})),E(t=>eO({prevData:t,nextDataPage:i,pageInfo:s,layoutService:o,visibleLeftDimensionInfo:e,attrExprInfoIndexes:d.left,env:n,direction:r}))})},[l]);const I=u(e=>{c(e)},[]);return{headersData:f,measureData:y,topDimensionData:S,leftDimensionData:C,attrExprInfoIndexes:d,nextPageHandler:I}},sO=Math.sqrt(1e4),lO=e=>({maxNumberOfVisibleRows:Math.ceil(e.height/24),maxNumberOfVisibleColumns:Math.ceil(e.width/_D.PixelsMin)}),cO=e=>{if(null===e)return[];if(e.qWidth*e.qHeight<1e4)return[e];const t=[],n=Math.ceil(e.qWidth/sO),r=Math.ceil(e.qHeight/sO);for(let o=0;o<n;o++)for(let n=0;n<r;n++)t.push({qLeft:e.qLeft+o*sO,qTop:e.qTop+n*sO,qWidth:Math.min(sO,e.qWidth-o*sO),qHeight:Math.min(sO,e.qHeight-n*sO)});return t};function uO({nextPageHandler:e}){const{model:t}=HT(),{pageInfo:n}=WT(),{layoutService:r}=UT(),o=(e=>{const t=l(e);return t.current=e,t})(n.page),i=t,a=u(async(e,t)=>{await(i?.collapseLeft(XT,e,t,!1))},[i]),s=u(async(e,t)=>{await(i?.collapseTop(XT,e,t,!1))},[i]),c=u(async(e,t)=>{await(i?.expandLeft(XT,e,t,!1))},[i]),d=u(async(e,t)=>{await(i?.expandTop(XT,e,t,!1))},[i]),p=u(async t=>{if(i?.getHyperCubePivotData&&0!==t.length)try{const r=await i.getHyperCubePivotData(XT,t.reduce((e,t)=>[...e,...cO(t)],[]));o.current===n.page&&e(r)}catch(e){console.error(e)}},[i,e,n,o]),f=u((e,{dimensionInfoIndex:n,isLeftColumn:o,x:i=0,columnWidthLocation:a})=>{const{qMeasureInfo:s,qDimensionInfo:l,topHeadersColumnWidth:c}=r.layout.qHyperCube;let u=[];switch(a){case KA.Dimension:u=[{qPath:`${XT}/qDimensions/${n}/qDef/columnWidth`,oldValue:l[n].columnWidth}];break;case KA.Measures:if(o)u=s.map((e,t)=>({qPath:`${XT}/qMeasures/${t}/qDef/columnWidth`,oldValue:e.columnWidth}));else{const e=r.getMeasureInfoIndexFromCellIndex(i);u=[{qPath:`${XT}/qMeasures/${e}/qDef/columnWidth`,oldValue:s[e].columnWidth}]}break;case KA.Pivot:u=[{qPath:`${XT}/topHeadersColumnWidth`,oldValue:c}]}const d=u.map(t=>{const{qPath:n,oldValue:r}=t;return{qPath:n,qOp:r?"Replace":"Add",qValue:JSON.stringify({...r,...e})}});t?.applyPatches(d,!0)},[t,r]),h=u(async e=>{await(i?.applyPatches([{qPath:`${XT}/indentModeColumnWidth`,qOp:r.layout.qHyperCube.indentModeColumnWidth?"Replace":"Add",qValue:JSON.stringify({...r.indentModeColumnWidth,...e})}],!0))},[i,r]);return v(()=>({collapseLeft:a,collapseTop:s,expandLeft:c,expandTop:d,applyColumnWidth:f,applyIndentModeColumnWidth:h,fetchPages:p}),[a,s,c,d,f,h,p])}const dO=(e,t,n)=>(r,o)=>{if("P"===r)return JT;const i=t[n+o];return e[i]},pO=e=>{const t=[],n=(e,r=0)=>{e.slice(0,1).forEach(e=>{t[r]=e.qType,e.qSubNodes.length&&n(e.qSubNodes,r+1)})};return n(e),t},fO=c({}),hO=()=>h(fO),mO=({children:e})=>{const{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n}=(()=>{const{layoutService:{layout:{qHyperCube:{qNoOfLeftDims:e,qEffectiveInterColumnSortOrder:t,qDimensionInfo:n}}}}=UT(),{qPivotDataPages:r}=WT();return v(()=>{const o=pO(r[0]?.qLeft??[]),i=pO(r[0]?.qTop??[]);return{visibleLeftDimensionInfo:o.map(dO(n,t,0)),visibleTopDimensionInfo:i.map(dO(n,t,e))}},[n,t,e,r])})(),{headersData:r,measureData:o,topDimensionData:i,leftDimensionData:a,attrExprInfoIndexes:s,nextPageHandler:l}=aO(t,n),c=uO({nextPageHandler:l}),u=v(()=>({gridSectionsData:{headersData:r,topDimensionData:i,leftDimensionData:a,measureData:o},visibleDimensionsInfo:{visibleLeftDimensionInfo:t,visibleTopDimensionInfo:n},attrExprInfoIndexes:s,dataModel:c}),[t,n,r,o,i,a,s,c]);return hi.jsx(fO.Provider,{value:u,children:e})},gO=20,vO=18,bO=.75,yO=e=>-1!==e&&e?.representation?.type===$A.Image,xO=({isLeftColumn:e,layoutService:t,representation:n})=>Boolean(e)&&t.isIndentModeEnabled&&n.type===$A.Image,SO=e=>void 0===e?uP:e,wO=(e,t)=>{if(void 0!==e&&!Number.isNaN(+e)){const n=+e;return n>=0?n:t}return t},CO=e=>wO(e,_D.PixelsDefault),EO=(e,t)=>wO(e,_D.PercentageDefault)*t/100,IO=(e,t,n)=>{switch(t?.type){case jD.Pixels:return CO(t.pixels);case jD.Percentage:return EO(t.percentage,e);case jD.FitToContent:case jD.Auto:default:return n}},DO=({headers:e,layoutService:t,effectivePropertiesService:n,estimateWidthForDimensionValue:r,shouldConsiderCombinatedLength:o,measureTextForHeader:i,longestMeasureValuePossible:a})=>e.reduce((e,s,l)=>{const{layout:{qHyperCube:{qNoOfLeftDims:c,qDimensionInfo:u}}}=t,{id:d,colIdx:p,qApprMaxGlyphCount:f,isLeftDimension:h}=s,m=u.find(e=>e.cId===d),g={width:24,...m?.representation?.imageBox};if(!h)return e+0;if(d===ZT)return e+0;const v=xO({isLeftColumn:h,layoutService:t,representation:m?.representation||{type:$A.Text}})?g.width+8+4:r(f),b=!n.qAlwaysFullyExpanded&&p<c-1?21:0;let y=0;if(o&&i&&a){y=i("- ")+a}return Math.max(e,24*l+vO+b+v+y)},0),LO=(e,t,n)=>e.reduce((e,r)=>{const o=(n?0:1)*vO;return Math.max(e,o+t(r.qFallbackTitle??""))},0),RO=(e,t,n,r)=>{const o=100*e/t,i=r*bO*(o/100),a=o/100*+n;return Math.min(a,i)},MO=(e,t,n,r)=>r*(+n/100)*(100*e/t/100),AO=(e,t)=>e.some(e=>e>=t*bO),PO=({layoutService:e,effectivePropertiesService:t,headersData:n,columnWidths:r,tableWidth:o,widthOverride:i,measureTextForHeader:a,estimateWidthForDimensionValue:s,measureTextWidthForMeasuresCombinedWithDimensions:l,translator:c})=>{let u;const d=o*bO,p=n.data[n.data.length-1][0];if(!Array.isArray(p))return{leftGridWidth:0,leftGridColumnWidths:[],leftGridFullWidth:0};const f=Math.min(d,r.at(-1)),h=Math.min(d,DO({headers:p,layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s})),m=Math.min(d,LO(e.visibleMeasureInfo,a));let g;const v=p.findIndex(e=>e.id===ZT),b=(({layoutService:e,measureTextForHeader:t,translator:n,headersData:r})=>{const{type:o}=e.indentModeColumnWidth;return o===jD.Auto&&r.size.y<=1?t(n.get("SNPivotTable.IndentMode.Rows"))+8+vO+16:24})({layoutService:e,measureTextForHeader:a,translator:c,headersData:n});if(e.hasPseudoDimOnLeft)if(0===v){const e=Math.max(f,h,m);u=[Math.max(b,e-f),f]}else{const n=Math.min(d,LO(e.visibleMeasureInfo,l,!0));g=Math.min(d,DO({headers:p.slice(0,v),layoutService:e,effectivePropertiesService:t,estimateWidthForDimensionValue:s,shouldConsiderCombinatedLength:!0,measureTextForHeader:a,longestMeasureValuePossible:n}));const r=Math.max(f,h,g);u=[Math.max(b,r-f),f]}else u=[Math.max(b,h-f),f];const y=Math.min(d,u.reduce((e,t)=>e+t,0)),{indentModeColumnWidth:x}=e;i&&i<=d&&(x.type=jD.Pixels,x.pixels=i);return[jD.Pixels,jD.Percentage].includes(x.type)||AO(u,o)?((e,t,n,r)=>{let o=e[0],i=e[1];const a=e.reduce((e,t)=>e+t,0),{type:s,pixels:l,percentage:c}=t,u=wO(l,_D.PixelsDefault),d=wO(c,_D.PercentageDefault),p=AO(e,n);let f;s===jD.Auto&&p&&(o>i?o-=i:i-=o),s===jD.Pixels&&u&&(o=RO(e[0],a,u,n),i=RO(e[1],a,u,n)),s===jD.Percentage&&d&&(o=MO(e[0],a,d,n),i=MO(e[1],a,d,n)),i<=r&&(f=o-5,f>0&&(o-=f,i+=f)),f=i-r,f>0&&(o+=f,i-=f);const h=[o,i],m=h.reduce((e,t)=>e+t,0);return{leftGridColumnWidths:h,leftGridWidth:m,leftGridFullWidth:m}})(u,x,o,f):{leftGridWidth:y,leftGridColumnWidths:u,leftGridFullWidth:y}};function qO({tableWidth:e}){const t=e*bO,{styleService:n,layoutService:r,effectivePropertiesService:o}=UT(),{translator:i}=HT(),{gridSectionsData:{headersData:a}}=hO(),{measureText:s}=oq(n.header,{allowLineBreaks:!1}),{estimateWidth:l,measureText:c}=oq({...n.dimensionValues,fontWeight:SO(n.dimensionValues.fontWeight)}),{measureText:d}=oq({...n.dimensionValues,...n.measureLabels}),p=u((n,u)=>{const{layout:{qHyperCube:{qNoOfLeftDims:p,topHeadersColumnWidth:f}},visibleMeasureInfo:h,isIndentModeEnabled:m,hasPseudoDimOnLeft:g}=r,v=(t=0)=>h.reduce((n,{qFallbackTitle:r,columnWidth:o})=>{const i=d(r)+vO,a=Math.max(i,t);return Math.max(n,m?a:IO(e,o,a))},0),b=e=>a.data.reduce((t,n)=>{const r=n.at(e);if(!r||Array.isArray(r))return t;if(r.id===ZT)return t;const o=(e=>{const{label:t,isLocked:n}=e,r=n?gO:0;return vO+s(t)+gO+r})(r);return Math.max(o,t)},0);let y=0,x=a.data.at(-1);m&&a.size.x>1&&x&&x[0]&&(x=x[0]);const S=x.map((i,s)=>{let c;if(m&&1!==a.size.x||!n||void 0===u||u!==i.colIdx){let t,n;if(i.columnWidthLocation===KA.Pivot?t=m?void 0:f:i.columnWidthLocation===KA.Dimension&&({columnWidth:t}=i),i.isLeftDimension)if(i.id===ZT)n=v();else{const e=b(s),t=((e,t)=>{const{qApprMaxGlyphCount:n,isLeftDimension:i,dimensionInfoIndex:a}=e,s=r.getDimensionInfo(a);if(yO(s))return _D.PixelsDefault;const c=!o.qAlwaysFullyExpanded&&i&&t<p-1?21:0;return vO+l(n)+c})(i,s);n=Math.max(e,t),m&&!g&&s+1===p&&i.columnWidthLocation===KA.Dimension&&a.size.x>1&&(n=e)}else n=b(s),i.columnWidthLocation===KA.Measures&&(n=v(n));m&&1===a.size.x&&(t=r.indentModeColumnWidth),c=m&&!g&&a.size.x>1?n:IO(e,t,n)}else c=m?Math.min(t,n):n;return y+=c,c});return m&&a.size.x>1?PO({layoutService:r,effectivePropertiesService:o,headersData:a,columnWidths:S,tableWidth:e,widthOverride:n,measureTextForHeader:s,estimateWidthForDimensionValue:l,measureTextWidthForMeasuresCombinedWithDimensions:c,translator:i}):{leftGridWidth:Math.min(t,y),leftGridColumnWidths:S,leftGridFullWidth:y}},[e,a,r,t,s,d,l,c,i,o]),[f,h]=m(p);cq(()=>{h(p())},[p]);const g=u((e,t)=>{h(p(e,t))},[p]);return{...f,overrideLeftGridWidth:g}}function TO({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:n}){const{styleService:r,layoutService:o}=UT(),{visibleDimensionsInfo:{visibleTopDimensionInfo:i}}=hO(),{layout:{qHyperCube:{qNoOfLeftDims:a,qEffectiveInterColumnSortOrder:s}},size:l,visibleMeasureInfo:c}=o,{estimateWidth:d,measureText:p}=oq(r.measureValues,{allowLineBreaks:!1}),{estimateWidth:f}=oq({...r.dimensionValues,fontWeight:SO(r.dimensionValues.fontWeight)},{allowLineBreaks:!1}),h=e-n-1,m=i.at(-1),g=m===JT,b=s.length-a>i.length?21:0,y=v(()=>{const e=g?c:[m],t=l.x/e.length,n=[],r=[];let o=h;const i=(e,r)=>{n[e]=Math.min(_D.PixelsMax,Math.max(_D.PixelsMin,r)),o-=n[e]*t};if(e.forEach((e,t)=>{if(e?.columnWidth){const{columnWidth:{type:n,pixels:o,percentage:a},qApprMaxGlyphCount:s,qFallbackTitle:l}=e;switch(n){case jD.Pixels:i(t,CO(o));break;case jD.Percentage:i(t,EO(a,h));break;case jD.FitToContent:i(t,((e,t,n)=>n?_D.PixelsDefault:vO+(g?Math.max(d(e),p(t)):Math.max(Math.max(...c.map(e=>d(e.qApprMaxGlyphCount))),f(e)+b)))(s,l??"",yO(e)));break;case jD.Auto:default:r.push(t)}}else r.push(t)}),r.length){const e=r.length*t,i=o/e;r.forEach(e=>{n[e]=Math.max(_D.AutoMinPivot,i)})}return n},[g,c,m,l.x,h,d,p,f,b]),x=v(()=>{if(g){return c.reduce((e,t,n)=>e+y[n],0)/c.length}return y[0]},[g,y,c]),S=parseFloat((t/o.size.x).toFixed(12)),w=u(e=>(g&&void 0!==e?y[o.getMeasureInfoIndexFromCellIndex(e,!0)]:x)-S,[g,y,o,x,S]),C=l.x*x;return{rightGridFullWidth:C,rightGridWidth:Math.min(C,h),getRightGridColumnWidth:w}}const kO=`scrollable-container--${JA.TopGrid}`,OO=`scrollable-container--${JA.LeftGrid}`,NO=`scrollable-container--${JA.DataGrid}`,_O=e=>{if(!(e&&e instanceof HTMLDivElement))return{width:0,height:0};const t=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight;return{width:t>=2?t:0,height:n>=2?n:0}},jO=(e,t)=>e>t?ZA.Forward:e<t?ZA.Backward:ZA.None,FO=({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{const{direction:s}=WT();p(()=>{const{headerGridWrapperElement:l,topGridWrapperElement:c,leftGridWrapperElement:u,dataGridWrapperElement:d}=r(),p=e=>{const t=e.target;l.scrollLeft=t.scrollLeft,i(e),o?.(e)},f=e=>{const t=e.target;l.scrollTop=t.scrollTop,i(e),o?.(e)},h=r=>{const a=r.target,l=((e,t)=>{const{scrollWidth:n,clientWidth:r,scrollLeft:o}=e,i=n-r;if("rtl"===t){if(o>i)return i;if(o<0)return Math.abs(o)}return o})(a,s);n.current?.scrollTo({scrollLeft:l,scrollTop:a.scrollTop}),c.scrollLeft=l,e.current?.forEach(e=>{e?.scrollTo(l)}),u.scrollTop=d.scrollTop,t.current?.forEach(e=>{e?.scrollTo(a.scrollTop)}),i(r),o?.(r)};return u.addEventListener("scroll",p),c.addEventListener("scroll",f),d.addEventListener("scroll",h),a.scroll||setTimeout(()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)},0),()=>{u.removeEventListener("scroll",p),c.removeEventListener("scroll",f),d.removeEventListener("scroll",h)}},[i,o,a,e,t,n,r,s])},zO=Sf(!1),WO=(e,t)=>Math.abs(e.width-t.width)>2||Math.abs(e.height-t.height)>2,$O=({topGridWrapperRef:e,leftGridWrapperRef:t,dataGridWrapperRef:n})=>{const{top:r,left:o,data:i,resetHorizontalScrollbarHeight:a}=((e,t,n)=>{const[r,o]=m({width:0,height:0}),[i,a]=m({width:0,height:0}),[s,c]=m({width:0,height:0}),[d,f]=m(!1),h=Tf(zO),g=l(h),v=l(h);g.current=h;const b=u(()=>{f(e=>!e&&e);const r=_O(e.current),i=_O(t.current),s=_O(n.current);o(e=>WO(e,r)?r:e),a(e=>WO(e,i)?i:e),c(e=>WO(e,s)?s:e)},[e,t,n]);p(()=>{const r=new ResizeObserver(()=>{g.current||b()});return[e.current,t.current,n.current].filter(e=>Boolean(e)).forEach(e=>{r.observe(e)}),()=>{r.disconnect()}},[b,e,t,n]),p(()=>{const e=v.current;if(v.current=h,e&&!h){const e=setTimeout(b,0);return()=>{clearTimeout(e)}}},[h,b]);const y=u(()=>{f(!0)},[]);return{top:r,left:d?{...i,height:0}:i,data:d?{...s,height:0}:s,resetHorizontalScrollbarHeight:y}})(e,t,n);return{scrollbarsDimensions:{verticalScrollbarWidth:Math.max(r.width,i.width),horizontalScrollbarHeight:Math.max(o.height,i.height)},resetHorizontalScrollbarHeight:a}},VO=()=>{const{interactions:e}=HT(),t=l(null),n=l(null),r=l(null),o=l(null),i=l([]),a=l([]),s=l(null),{scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:d},resetHorizontalScrollbarHeight:f}=$O({topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o});(({gridSectionsWrapperRefs:{headerGridWrapperRef:e,topGridWrapperRef:t,leftGridWrapperRef:n,dataGridWrapperRef:r},gridRefs:{topGridRef:o,leftGridRef:i,dataGridRef:a}})=>{const{pageInfo:s}=WT(),{downloadService:l,viewService:c,layoutService:d}=UT(),p=u(()=>{const o={left:0,top:0};e.current?.scrollTo(o),t.current?.scrollTo(o),n.current?.scrollTo(o),r.current?.scrollTo(o)},[e,t,n,r]);g(()=>{p()},[s.page,p]),g(()=>{d.triggerdByExpandOrCollapse||p()},[d,p]),g(()=>{if(d.triggerdByExpandOrCollapse){const e=r.current?.scrollLeft??0,t=r.current?.scrollTop??0;i.current?.forEach(e=>{e?.scrollTo(t)}),o.current?.forEach(t=>{t?.scrollTo(e)}),a.current?.scrollTo({scrollTop:t,scrollLeft:e})}},[d,r,a,i,o]),g(()=>{(l.isDownloadedAsPDForImage||d.isSnapshot)&&r.current&&n.current&&t.current&&(r.current.scrollTop=c.scrollTop,r.current.scrollLeft=c.scrollLeft,n.current.scrollLeft=c.leftGridScrollLeft,t.current.scrollTop=c.topGridScrollTop)},[c,l,d,r,n,t])})({gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s}});const{trackScrollDirection:h,scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v}}=(()=>{const e=l(ZA.None),t=l(ZA.None),n=l({prevScrollTop:0,prevScrollLeft:0}),r=u(r=>{if(r instanceof WheelEvent&&(e.current=jO(r.deltaY,0),t.current=jO(r.deltaX,0)),r instanceof Event&&!(r instanceof WheelEvent)){const o=r.target;e.current=jO(o.scrollTop,n.current.prevScrollTop),n.current.prevScrollTop=o.scrollTop,t.current=jO(o.scrollLeft,n.current.prevScrollLeft),n.current.prevScrollLeft=o.scrollLeft}},[e,t,n]);return{trackScrollDirection:r,scrollDirectionRefs:{verticalScrollDirection:e,horizontalScrollDirection:t}}})(),b=(()=>{const{viewService:e}=UT();return u(t=>{const n=t.target,r=t.currentTarget,o=n.dataset.key;o===OO&&(e.leftGridScrollLeft=r.scrollLeft),o===NO&&(e.scrollLeft=r.scrollLeft),o===kO&&(e.topGridScrollTop=r.scrollTop),o!==OO&&o!==NO||(e.scrollTop=r.scrollTop)},[e])})(),y={gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},getWrapperElements:u(()=>({headerGridWrapperElement:t.current,topGridWrapperElement:n.current,leftGridWrapperElement:r.current,dataGridWrapperElement:o.current}),[t,n,r,o]),updateViewService:b,trackScrollDirection:h,interactions:e};return(({gridRefs:{topGridRef:e,leftGridRef:t,dataGridRef:n},getWrapperElements:r,updateViewService:o,trackScrollDirection:i,interactions:a})=>{p(()=>{const{headerGridWrapperElement:o,topGridWrapperElement:s,leftGridWrapperElement:l,dataGridWrapperElement:c}=r(),u=e=>{e.ctrlKey||(e.preventDefault(),o.scrollLeft+=e.deltaX,o.scrollTop+=e.deltaY,l.scrollLeft=o.scrollLeft,s.scrollTop=o.scrollTop,i(e))},d=e=>{e.ctrlKey||(e.preventDefault(),l.scrollTop+=e.deltaY,t.current?.forEach(e=>{e?.scrollTo(l.scrollTop)}),o.scrollLeft+=e.deltaX,l.scrollLeft=o.scrollLeft,c.scrollTop=l.scrollTop,n.current?.scrollTo({scrollTop:l.scrollTop}),i(e))},p=t=>{t.ctrlKey||(t.preventDefault(),s.scrollLeft+=t.deltaX,e.current?.forEach(e=>{e?.scrollTo(s.scrollLeft)}),o.scrollTop+=t.deltaY,s.scrollTop=o.scrollTop,c.scrollLeft=s.scrollLeft,n.current?.scrollTo({scrollLeft:s.scrollLeft}),i(t))},f=r=>{r.ctrlKey||(r.preventDefault(),c.scrollLeft+=r.deltaX,c.scrollTop+=r.deltaY,n.current?.scrollTo({scrollLeft:c.scrollLeft,scrollTop:c.scrollTop}),s.scrollLeft=c.scrollLeft,e.current?.forEach(e=>{e?.scrollTo(c.scrollLeft)}),l.scrollTop=c.scrollTop,t.current?.forEach(e=>{e?.scrollTo(c.scrollTop)}),i(r))};return o.addEventListener("wheel",u),l.addEventListener("wheel",d),s.addEventListener("wheel",p),c.addEventListener("wheel",f),a.scroll||setTimeout(()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)},0),()=>{o.removeEventListener("wheel",u),l.removeEventListener("wheel",d),s.removeEventListener("wheel",p),c.removeEventListener("wheel",f)}},[i,o,a,e,t,n,r])})(y),FO(y),{gridSectionsWrapperRefs:{headerGridWrapperRef:t,topGridWrapperRef:n,leftGridWrapperRef:r,dataGridWrapperRef:o},gridRefs:{topGridRef:i,leftGridRef:a,dataGridRef:s},scrollDirectionRefs:{verticalScrollDirection:m,horizontalScrollDirection:v},scrollbarsDimensions:{verticalScrollbarWidth:c,horizontalScrollbarHeight:d,resetHorizontalScrollbarHeight:f}}},HO=()=>{const{layoutService:e}=UT(),{rect:t,pageInfo:n}=WT();return v(()=>{let{height:r}=t;return e.hasLimitedData&&(r-=22),n.shouldShowPagination&&(r-=41),{...t,height:r}},[t,e,n.shouldShowPagination])},BO=({children:e,style:t})=>hi.jsx("div",{"data-testid":"fullSize",style:t,children:e}),GO=({children:e,style:t})=>{const{direction:n}=WT();return hi.jsx("div",{"data-section-id":"GRID",style:{direction:n,display:"grid",...t},children:e})},UO=e=>e&&`scrollable-container--${e}`,YO=({children:e,style:t,origin:n},r)=>{const{interactions:o}=HT(),i=o.scroll?t:{overflow:"hidden"};return hi.jsx("div",{"data-testid":"scrollable","data-key":UO(n),style:i,ref:r,children:e})};var KO=n.forwardRef(YO);const XO=({children:e,style:t})=>{const{direction:n}=WT();return hi.jsx("div",{"data-testid":"sticky",style:{position:"sticky",top:0,["rtl"===n?"right":"left"]:0,...t},children:e})};var JO=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ZO(e,t){return e===t||!(!JO(e)||!JO(t))}function QO(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ZO(e[n],t[n]))return!1;return!0}function eN(e,t){var n;void 0===t&&(t=QO);var r,o=[],i=!1;return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];return i&&n===this&&t(a,o)||(r=e.apply(this,a),i=!0,n=this,o=a),r}}var tN="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function nN(e){cancelAnimationFrame(e.id)}function rN(e,t){var n=tN();var r={id:requestAnimationFrame(function o(){tN()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var oN=-1;function iN(e){if(void 0===e&&(e=!1),-1===oN||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),oN=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return oN}var aN=null;function sN(e){if(void 0===e&&(e=!1),null===aN||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?aN="positive-descending":(t.scrollLeft=1,aN=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),aN}return aN}var lN=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function cN(e){var t,n=e.getColumnOffset,o=e.getColumnStartIndexForOffset,i=e.getColumnStopIndexForStartIndex,a=e.getColumnWidth,s=e.getEstimatedTotalHeight,l=e.getEstimatedTotalWidth,c=e.getOffsetForColumnAndAlignment,u=e.getOffsetForRowAndAlignment,d=e.getRowHeight,p=e.getRowOffset,f=e.getRowStartIndexForOffset,h=e.getRowStopIndexForStartIndex,m=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,v=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=m(r.props,Xs(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Xs(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=eN(function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})}),r._callOnScroll=void 0,r._callOnScroll=eN(function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})}),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,i=r.props,s=i.columnWidth,l=i.direction,c=i.rowHeight,u=r._getItemStyleCache(g&&s,g&&l,g&&c),f=e+":"+t;if(u.hasOwnProperty(f))o=u[f];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;u[f]=o={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:p(r.props,e,r._instanceProps),height:d(r.props,e,r._instanceProps),width:a(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=eN(function(e,t,n){return{}}),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState(function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(sN()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&nN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=rN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}zs(t,e),t.getDerivedStateFromProps=function(e,t){return uN(e,t),v(e),null};var b=t.prototype;return b.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState(function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}},this._resetIsScrollingDebounced)},b.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,a=i.columnCount,d=i.height,p=i.rowCount,f=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,v=iN();void 0!==r&&(r=Math.max(0,Math.min(r,a-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=s(this.props,this._instanceProps),y=l(this.props,this._instanceProps)>f?v:0,x=b>d?v:0;this.scrollTo({scrollLeft:void 0!==r?c(this.props,r,n,m,this._instanceProps,x):m,scrollTop:void 0!==o?u(this.props,o,n,g,this._instanceProps,y):g})},b.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},b.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(sN()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},b.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&nN(this._resetIsScrollingTimeoutId)},b.render=function(){var e=this.props,t=e.children,n=e.className,o=e.columnCount,i=e.direction,a=e.height,c=e.innerRef,u=e.innerElementType,d=e.innerTagName,p=e.itemData,f=e.itemKey,h=void 0===f?lN:f,m=e.outerElementType,g=e.outerTagName,v=e.rowCount,b=e.style,y=e.useIsScrolling,x=e.width,S=this.state.isScrolling,w=this._getHorizontalRangeToRender(),C=w[0],E=w[1],I=this._getVerticalRangeToRender(),D=I[0],L=I[1],R=[];if(o>0&&v)for(var M=D;M<=L;M++)for(var A=C;A<=E;A++)R.push(r(t,{columnIndex:A,data:p,isScrolling:y?S:void 0,key:h({columnIndex:A,data:p,rowIndex:M}),rowIndex:M,style:this._getItemStyle(M,A)}));var P=s(this.props,this._instanceProps),q=l(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:qe({position:"relative",height:a,width:x,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},b)},r(u||d||"div",{children:R,ref:c,style:{height:P,pointerEvents:S?"none":void 0,width:q}}))},b._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],f=u[2],h=u[3];this._callOnItemsRendered(a,s,d,p,l,c,f,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,v=m.scrollLeft,b=m.scrollTop,y=m.scrollUpdateWasRequested,x=m.verticalScrollDirection;this._callOnScroll(v,b,g,x,y)}},b._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,r=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||r||a||1;if(0===t||0===s)return[0,0,0,0];var f=o(this.props,d,this._instanceProps),h=i(this.props,f,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,f-m),Math.max(0,Math.min(t-1,h+g)),f,h]},b._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),p=h(this.props,d,c,this._instanceProps),m=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-m),Math.max(0,Math.min(i-1,p+g)),d,p]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var uN=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},dN=function(e,t){var n=e.rowCount,r=t.rowMetadataMap,o=t.estimatedRowHeight,i=t.lastMeasuredRowIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},pN=function(e,t){var n=e.columnCount,r=t.columnMetadataMap,o=t.estimatedColumnWidth,i=t.lastMeasuredColumnIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},fN=function(e,t,n,r){var o,i,a;if("column"===e?(o=r.columnMetadataMap,i=t.columnWidth,a=r.lastMeasuredColumnIndex):(o=r.rowMetadataMap,i=t.rowHeight,a=r.lastMeasuredRowIndex),n>a){var s=0;if(a>=0){var l=o[a];s=l.offset+l.size}for(var c=a+1;c<=n;c++){var u=i(c);o[c]={offset:s,size:u},s+=u}"column"===e?r.lastMeasuredColumnIndex=n:r.lastMeasuredRowIndex=n}return o[n]},hN=function(e,t,n,r){var o,i;return"column"===e?(o=n.columnMetadataMap,i=n.lastMeasuredColumnIndex):(o=n.rowMetadataMap,i=n.lastMeasuredRowIndex),(i>0?o[i].offset:0)>=r?mN(e,t,n,i,0,r):gN(e,t,n,Math.max(0,i),r)},mN=function(e,t,n,r,o,i){for(;o<=r;){var a=o+Math.floor((r-o)/2),s=fN(e,t,a,n).offset;if(s===i)return a;s<i?o=a+1:s>i&&(r=a-1)}return o>0?o-1:0},gN=function(e,t,n,r,o){for(var i="column"===e?t.columnCount:t.rowCount,a=1;r<i&&fN(e,t,r,n).offset<o;)r+=a,a*=2;return mN(e,t,n,Math.min(r,i-1),Math.floor(r/2),o)},vN=function(e,t,n,r,o,i,a){var s="column"===e?t.width:t.height,l=fN(e,t,n,i),c="column"===e?pN(t,i):dN(t,i),u=Math.max(0,Math.min(c-s,l.offset)),d=Math.max(0,l.offset-s+a+l.size);switch("smart"===r&&(r=o>=d-s&&o<=u+s?"auto":"center"),r){case"start":return u;case"end":return d;case"center":return Math.round(d+(u-d)/2);default:return o>=d&&o<=u?o:d>u||o<d?d:u}},bN=cN({getColumnOffset:function(e,t,n){return fN("column",e,t,n).offset},getColumnStartIndexForOffset:function(e,t,n){return hN("column",e,n,t)},getColumnStopIndexForStartIndex:function(e,t,n,r){for(var o=e.columnCount,i=e.width,a=fN("column",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=fN("column",e,c,r).size;return c},getColumnWidth:function(e,t,n){return n.columnMetadataMap[t].size},getEstimatedTotalHeight:dN,getEstimatedTotalWidth:pN,getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){return vN("column",e,t,n,r,o,i)},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){return vN("row",e,t,n,r,o,i)},getRowOffset:function(e,t,n){return fN("row",e,t,n).offset},getRowHeight:function(e,t,n){return n.rowMetadataMap[t].size},getRowStartIndexForOffset:function(e,t,n){return hN("row",e,n,t)},getRowStopIndexForStartIndex:function(e,t,n,r){for(var o=e.rowCount,i=e.height,a=fN("row",e,t,r),s=n+i,l=a.offset+a.size,c=t;c<o-1&&l<s;)c++,l+=fN("row",e,c,r).size;return c},initInstanceProps:function(e,t){var n=e,r={columnMetadataMap:{},estimatedColumnWidth:n.estimatedColumnWidth||50,estimatedRowHeight:n.estimatedRowHeight||50,lastMeasuredColumnIndex:-1,lastMeasuredRowIndex:-1,rowMetadataMap:{}};return t.resetAfterColumnIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({columnIndex:e,shouldForceUpdate:n})},t.resetAfterRowIndex=function(e,n){void 0===n&&(n=!0),t.resetAfterIndices({rowIndex:e,shouldForceUpdate:n})},t.resetAfterIndices=function(e){var n=e.columnIndex,o=e.rowIndex,i=e.shouldForceUpdate,a=void 0===i||i;"number"==typeof n&&(r.lastMeasuredColumnIndex=Math.min(r.lastMeasuredColumnIndex,n-1)),"number"==typeof o&&(r.lastMeasuredRowIndex=Math.min(r.lastMeasuredRowIndex,o-1)),t._getItemStyleCache(-1),a&&t.forceUpdate()},r},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.columnWidth,e.rowHeight}}),yN=function(e,t){return e};function xN(e){var t,n=e.getItemOffset,o=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,s=e.getStartIndexForOffset,l=e.getStopIndexForStartIndex,c=e.initInstanceProps,u=e.shouldResetStyleCacheOnItemSizeChange,d=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=c(r.props,Xs(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Xs(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=eN(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=eN(function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})}),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,a=o.direction,s=o.itemSize,l=o.layout,c=r._getItemStyleCache(u&&s,u&&l,u&&a);if(c.hasOwnProperty(e))t=c[e];else{var d=n(r.props,e,r._instanceProps),p=i(r.props,e,r._instanceProps),f="horizontal"===a||"horizontal"===l,h="rtl"===a,m=f?d:0;c[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:f?0:d,height:f?"100%":p,width:f?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=eN(function(e,t,n){return{}}),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState(function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,a=o;if("rtl"===t)switch(sN()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState(function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&nN(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=rN(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}zs(t,e),t.getDerivedStateFromProps=function(e,t){return SN(e,t),d(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState(function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffset<e?"forward":"backward",scrollOffset:e,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},p.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,i=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?iN():0:l.scrollHeight>l.clientHeight?iN():0}this.scrollTo(a(this.props,e,t,i,this._instanceProps,s))},p.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"==typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(sN()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&nN(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,i=e.direction,a=e.height,s=e.innerRef,l=e.innerElementType,c=e.innerTagName,u=e.itemCount,d=e.itemData,p=e.itemKey,f=void 0===p?yN:p,h=e.layout,m=e.outerElementType,g=e.outerTagName,v=e.style,b=e.useIsScrolling,y=e.width,x=this.state.isScrolling,S="horizontal"===i||"horizontal"===h,w=S?this._onScrollHorizontal:this._onScrollVertical,C=this._getRangeToRender(),E=C[0],I=C[1],D=[];if(u>0)for(var L=E;L<=I;L++)D.push(r(t,{data:d,key:f(L,d),index:L,isScrolling:b?x:void 0,style:this._getItemStyle(L)}));var R=o(this.props,this._instanceProps);return r(m||g||"div",{className:n,onScroll:w,ref:this._outerRefSetter,style:qe({position:"relative",height:a,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},v)},r(l||c||"div",{children:D,ref:s,style:{height:S?"100%":R,pointerEvents:x?"none":void 0,width:S?R:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,s=i.scrollOffset,l=i.scrollUpdateWasRequested;this._callOnScroll(a,s,l)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,a=r.scrollOffset;if(0===t)return[0,0,0,0];var c=s(this.props,a,this._instanceProps),u=l(this.props,c,a,this._instanceProps),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(C),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var SN=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},wN=function(e,t,n){var r=e.itemSize,o=n.itemMetadataMap,i=n.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var s=o[i];a=s.offset+s.size}for(var l=i+1;l<=t;l++){var c=r(l);o[l]={offset:a,size:c},a+=c}n.lastMeasuredIndex=t}return o[t]},CN=function(e,t,n,r,o){for(;r<=n;){var i=r+Math.floor((n-r)/2),a=wN(e,i,t).offset;if(a===o)return i;a<o?r=i+1:a>o&&(n=i-1)}return r>0?r-1:0},EN=function(e,t,n,r){for(var o=e.itemCount,i=1;n<o&&wN(e,n,t).offset<r;)n+=i,i*=2;return CN(e,t,Math.min(n,o-1),Math.floor(n/2),r)},IN=function(e,t){var n=e.itemCount,r=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=n&&(i=n-1),i>=0){var s=r[i];a=s.offset+s.size}return a+(n-i-1)*o},DN=xN({getItemOffset:function(e,t,n){return wN(e,t,n).offset},getItemSize:function(e,t,n){return n.itemMetadataMap[t].size},getEstimatedTotalSize:IN,getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var a=e.direction,s=e.height,l=e.layout,c=e.width,u="horizontal"===a||"horizontal"===l?c:s,d=wN(e,t,o),p=IN(e,o),f=Math.max(0,Math.min(p-u,d.offset)),h=Math.max(0,d.offset-u+d.size+i);switch("smart"===n&&(n=r>=h-u&&r<=f+u?"auto":"center"),n){case"start":return f;case"end":return h;case"center":return Math.round(h+(f-h)/2);default:return r>=h&&r<=f?r:r<h?h:f}},getStartIndexForOffset:function(e,t,n){return function(e,t,n){var r=t.itemMetadataMap,o=t.lastMeasuredIndex;return(o>0?r[o].offset:0)>=n?CN(e,t,o,0,n):EN(e,t,Math.max(0,o),n)}(e,n,t)},getStopIndexForStartIndex:function(e,t,n,r){for(var o=e.direction,i=e.height,a=e.itemCount,s=e.layout,l=e.width,c="horizontal"===o||"horizontal"===s?l:i,u=wN(e,t,r),d=n+c,p=u.offset+u.size,f=t;f<a-1&&p<d;)f++,p+=wN(e,f,r).size;return f},initInstanceProps:function(e,t){var n={itemMetadataMap:{},estimatedItemSize:e.estimatedItemSize||50,lastMeasuredIndex:-1};return t.resetAfterIndex=function(e,r){void 0===r&&(r=!0),n.lastMeasuredIndex=Math.min(n.lastMeasuredIndex,e-1),t._getItemStyleCache(-1),r&&t.forceUpdate()},n},shouldResetStyleCacheOnItemSizeChange:!1,validateProps:function(e){e.itemSize}});function LN(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}var RN=["style"],MN=["style"];function AN(e,t){var n=e.style,r=Te(e,RN),o=t.style,i=Te(t,MN);return!LN(n,o)&&!LN(r,i)}const PN=10,qN=(e,t)=>e.current===ZA.Backward?t:0,TN=(e,t,n,r)=>{for(let o=n;o<n+r;o++){const n=e.at(o);if(void 0===n||void 0===n.at(t))return!0}return!1},kN=(e,t)=>e.qLeft+e.qWidth===t.qLeft&&e.qTop===t.qTop&&e.qHeight===t.qHeight,ON=({pageInfo:e,measureData:t,pageTop:n,qHeight:r,startLeft:o,endLeft:i})=>{const a=[],s=e.page*e.rowsPerPage;for(let e=o;e<i;e++)if(TN(t,e,n,r)){const t=a[a.length-1],o={qLeft:e,qTop:n+s,qWidth:1,qHeight:r};void 0!==t&&kN(t,o)?t.qWidth+=o.qWidth:a.push(o)}return a},NN=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r,minBufferStartLeft:o,minBufferEndLeft:i,columnEndIndex:a})=>{const{gridRowStartIndex:s,gridHeight:l}=r,c=n.current===ZA.Backward?Math.max(0,o-25):i,u=Math.min(c+25,a);return ON({pageInfo:e,measureData:t,startLeft:c,endLeft:u,pageTop:s,qHeight:l})},_N=({pageInfo:e,measureData:t,scrollDirection:n,layoutService:r,viewService:o})=>{const{startLeft:i,endLeft:a,pageTop:s,qHeight:l}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=e.size.x,l=qN(n,PN),c=Math.max(r-l,0);return{startLeft:c,endLeft:c+Math.min(i+PN,s-c),pageTop:o,qHeight:a}})(r,o,n),c=ON({pageInfo:e,measureData:t,startLeft:i,endLeft:a,pageTop:s,qHeight:l});return c.length>0?[...c,...NN({pageInfo:e,measureData:t,scrollDirection:n,viewService:o,minBufferStartLeft:i,minBufferEndLeft:a,columnEndIndex:r.size.x})]:c},jN=(e,t,n,r)=>{const o=e[n];if(void 0===o)return!0;for(let e=t;e<t+r;e++){if(void 0===o[e])return!0}return!1},FN=(e,t)=>e.qTop+e.qHeight===t.qTop&&e.qLeft===t.qLeft&&e.qWidth===t.qWidth,zN=({startTop:e,endTop:t,qLeft:n,qWidth:r,measureData:o,pageInfo:i})=>{const a=[],s=i.page*i.rowsPerPage;for(let i=e;i<t;i++)if(jN(o,n,i,r)){const e=a.at(-1),t={qLeft:n,qTop:i+s,qWidth:r,qHeight:1};void 0!==e&&FN(e,t)?e.qHeight+=t.qHeight:a.push(t)}return a},WN=({pageInfo:e,measureData:t,scrollDirection:n,viewService:r})=>{const{startTop:o,endTop:i,qLeft:a,qWidth:s}=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=t,s=qN(n,PN),l=Math.max(o-s,0);return{startTop:l,endTop:l+Math.min(a+PN,e.rowsOnCurrentPage-l),qLeft:r,qWidth:i}})(e,r,n),l=zN({startTop:o,endTop:i,qLeft:a,qWidth:s,measureData:t,pageInfo:e});if(l.length>0){const r=n.current===ZA.Backward?Math.max(0,o-25):i,c=Math.min(r+25,e.rowsOnCurrentPage),u=zN({startTop:r,endTop:c,qLeft:a,qWidth:s,measureData:t,pageInfo:e});return[...l,...u]}return l},$N=(e,t,n,r,o,i,a,s)=>{const{gridColumnStartIndex:l,gridRowStartIndex:c,gridWidth:u,gridHeight:d}=o;let p=[],f=[];i.current!==ZA.None&&(p=WN({pageInfo:r,measureData:n,scrollDirection:i,viewService:o})),a.current!==ZA.None&&(f=_N({pageInfo:r,measureData:n,scrollDirection:a,layoutService:t,viewService:o})),i.current===ZA.None&&a.current===ZA.None&&(p=zN({measureData:n,pageInfo:r,qLeft:l,qWidth:u,startTop:c,endTop:c+d}));const h=e.fetchPages([...p,...f]);s.isDownloadedAsPDForImage&&s.waitForPromise(h)},VN=function(e){var t,n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=0;return function(){t=this;for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];n=s;var c=Date.now()-i,u=function(){i=Date.now(),r=0,e.apply(t,n)};r||(c>=o?u():r=setTimeout(u,o-c))}}($N,100),HN=uM($N,75),BN=(e,t,n=!1)=>void 0!==e&&(e.isLeafNode||n&&e.isLeftColumn?e.mainAxisPageCoord===t:e.mainAxisPageCoord+e.leafCount-1===t),GN=({style:e,index:t,isLastRow:n,isLastColumn:r,showLastBorder:o,isLeftColumn:i,showTotalCellDivider:a})=>{const{direction:s}=WT(),{styleService:{grid:{border:l,divider:c}}}=UT();return hi.jsx("div",{style:{...e,...RP,...qP(n,r,l,s,o),...kP({bottomDivider:a&&i,rightDivider:a&&!i,borderColor:c})},"data-testid":"empty-cell","data-index":t})},UN=({children:e,verticalAlign:t,width:n,right:r,isLeftColumn:o})=>{const{layoutService:{isIndentModeEnabled:i}}=UT(),a=o&&i;return hi.jsx("div",{"data-key":"sticky-cell-container",style:{display:"flex",flexDirection:"row",width:n,maxWidth:"100%",maxHeight:"100%",position:"sticky",left:4,top:0,bottom:0,right:r,...!a&&{alignItems:t,alignSelf:t,overflow:"hidden"}},children:e})},YN=e=>{const{type:t,imageSize:n}=e;return t!==$A.Image||"fill"!==n&&"fitWidth"!==n?"fit-content":"100%"},KN=e=>"number"==typeof e&&!Number.isNaN(+e),XN=e=>"string"==typeof e&&e.length>0||"number"==typeof e?+e:NaN,JN=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M7.5 8.5H2v-1h5.5V2h1v5.5H14v1H8.5V14h-1z"})})),ZN=x((e,t)=>hi.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:hi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),QN=x((e,t)=>hi.jsxs("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:[hi.jsx("path",{d:"M3 9v6.5a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 1 0V1q2.441.639 3.667.639c1.225 0 1.774-.995 3.87-1.196q1.972-.19 3.297.47A.3.3 0 0 1 14 1.18v7.344a.3.3 0 0 1-.417.277q-1.338-.565-3.045-.416c-1.98.172-2.083 1.107-3.871 1.253Q4.879 9.785 3 9"}),hi.jsx("use",{fillRule:"evenodd"})]})),e_=x((e,t)=>hi.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:hi.jsx("path",{d:"M13.9 7.4c-1 1.3-.6 1.5-1.5 4.1-.5 1.8-1.2 2.9-1.7 3.6q-.45.6-.9.9H4.2c-1 0-1.6-.5-1.9-1-.2-.3-.3-.6-.3-1V4.2c0-.4.3-.7.7-.7s.7.3.7.7v3.6l.9-.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v5.1l1.1-.2V.7C6.7.3 7 0 7.4 0s.7.3.7.7v5.9l1.1.1V1.6c0-.4.3-.7.7-.7s.7.3.7.7v7.7s.1 0 .1-.2l.6-1.4c1.1-2.1 3.1-1.1 2.6-.3"})})),t_=x((e,t)=>hi.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:hi.jsx("path",{d:"M5 13h6v1.5c0 .3-.2.5-.5.5H10v.5c0 .3-.2.5-.5.5h-3c-.3 0-.5-.2-.5-.5V15h-.5c-.3 0-.5-.2-.5-.5zm0-1c0-2-3-3-3-7 0-3 3-5 6-5s6 2 6 5c0 4-3 4-3 7H5m-.5-7c.3 0 .5-.2.5-.5s.2-.7.5-1 .6-.5 1-.5c.3 0 .5-.2.5-.5S6.8 2 6.5 2c-.6 0-1.2.3-1.7.8S4 3.9 4 4.5c0 .3.2.5.5.5"})})),n_=x((e,t)=>hi.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:hi.jsx("path",{d:"M8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8m4.5 9c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6h-9c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7z"})})),r_=x((e,t)=>hi.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 16 16",height:"16px",role:"img",ref:t,...e,children:hi.jsx("path",{d:"M2 7.5h12v1H2z"})})),o_=x((e,t)=>hi.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:hi.jsx("path",{d:"M9 7h7a7.004 7.004 0 0 0-7-7zm1-5.917A6.005 6.005 0 0 1 14.917 6H10zM14 9H7V2a7.002 7.002 0 0 0 0 14 7 7 0 0 0 7-7m-8 1h6.917A6.002 6.002 0 0 1 1 9a6 6 0 0 1 5-5.917z"})})),i_=x((e,t)=>hi.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:hi.jsx("path",{d:"M9 9h3.5c.25 0 .5-.3.5-.6v-.8c0-.3-.25-.6-.5-.6H9V3.5c0-.25-.3-.5-.6-.5h-.7c-.4 0-.7.25-.7.5V7H3.5c-.25 0-.5.3-.5.6v.7c0 .4.25.7.5.7H7v3.5c0 .25.3.5.6.5h.8c.3 0 .6-.25.6-.5zM8 0c4.4 0 8 3.6 8 8s-3.6 8-8 8-8-3.6-8-8 3.6-8 8-8"})})),a_=x((e,t)=>hi.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:hi.jsx("path",{d:"m8.418 1.007.042.08 1.788 4.217 4.571.388a.5.5 0 0 1 .348.811l-.063.065-3.472 3.008 1.043 4.47a.5.5 0 0 1-.664.581l-.081-.04L8 12.217l-3.93 2.372a.5.5 0 0 1-.757-.453l.012-.089 1.043-4.47L.896 6.568a.5.5 0 0 1 .196-.86l.089-.016 4.571-.388L7.54 1.086a.5.5 0 0 1 .878-.08Z"})})),s_=x((e,t)=>hi.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:hi.jsx("path",{d:"M13 14H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1"})})),l_=x((e,t)=>hi.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:hi.jsx("path",{d:"m6 10 7-7 2 2-7 7-2 2-5-5 2-2z"})})),c_=x((e,t)=>hi.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:hi.jsx("path",{d:"M2.4 4h11.2a.2.2 0 0 1 .16.32l-5.6 7.467a.2.2 0 0 1-.32 0L2.24 4.32A.2.2 0 0 1 2.4 4"})})),u_=x((e,t)=>hi.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:hi.jsx("path",{d:"M11 2.4v11.2a.2.2 0 0 1-.32.16l-7.467-5.6a.2.2 0 0 1 0-.32l7.467-5.6a.2.2 0 0 1 .32.16"})})),d_=x((e,t)=>hi.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:hi.jsx("path",{d:"M4 13.6V2.4a.2.2 0 0 1 .32-.16l7.467 5.6a.2.2 0 0 1 0 .32l-7.467 5.6A.2.2 0 0 1 4 13.6"})})),p_={m:l_,"ï":a_,R:x((e,t)=>hi.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:hi.jsx("path",{d:"M13.6 11H2.4a.2.2 0 0 1-.16-.32l5.6-7.467a.2.2 0 0 1 .32 0l5.6 7.467a.2.2 0 0 1-.16.32"})})),S:c_,T:u_,U:d_,P:i_,Q:n_,"è":x((e,t)=>hi.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:hi.jsx("path",{d:"M14.98 15H1.04c-1.002 0-1.303-.7-.802-1.5l6.82-11.9c.5-.8 1.303-.8 1.804 0l6.92 11.9c.501.8.1 1.5-.803 1.5M8.5 5h-1c-.3 0-.5.2-.5.5V9c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5V5.5c0-.3-.2-.5-.5-.5m-1 6c-.3 0-.5.2-.5.5v1c0 .3.2.5.5.5h1c.3 0 .5-.2.5-.5v-1c0-.3-.2-.5-.5-.5z"})})),"¢":e_,"©":QN,"23F4":t_,2013:s_,"&":o_,add:JN,"minus-2":r_,dot:ZN},f_=({size:e,iconKey:t,color:n,pvStyle:r})=>{const o=t&&p_[t];return o&&hi.jsx("div",{"data-testid":"representation-indicator-icon",style:{color:n,height:e,...r},children:hi.jsx(o,{style:{height:e}})})},h_=(e,t)=>e.max===e.min?.5:(t-e.min)/(e.max-e.min),m_=(e,t,n)=>{const r=e.paletteColors?e.paletteColors[t]:e.localPaletteColors[t];return n.getColorPickerColor(r)},g_=(e,t,n)=>{const r={previousColor:(o=e.localPaletteColors)[(i=t)-(i>0?1:0)],nextColor:o[i+(i<o.length-1?1:0)]};var o,i;const a=((e,t)=>{const n=e.limits&&e.limits.concat().sort((e,t)=>e.value-t.value);return{lowerLimit:n&&t>0?n[t-1]:{value:0,gradient:!1},upperLimit:n&&n[t]?n[t]:{value:1,gradient:!1}}})(e,t),s=((e,t,n,r,o)=>{const{upperLimit:i,lowerLimit:a}=e,{previousColor:s,nextColor:l}=t,c=r===i.value?1:(r-a.value)/(i.value-a.value);return a.gradient&&i.gradient?r-a.value<i.value-r?{color:s.color,t:.5-c}:{color:l.color,t:c-.5}:a.gradient?{color:s.color,t:1-(.5+c/2)}:i.gradient?{color:l.color,t:c/2}:{color:o.localPaletteColors[n].color,t:r}})(a,r,t,n,e);return zL(e.localPaletteColors[t].color??"").blend(zL(s.color??""),s.t)},v_=(e,t,n)=>{const r=((e,t)=>{const{limits:n}=e;return n&&(e.limits=n.sort((e,t)=>e.value-t.value),e.limits=n.map(e=>({...e,value:h_(t,e.value)}))),e})({...e},t),o=r.paletteColors||r.localPaletteColors;return o&&(r.localPaletteColors=o.concat().map((e,t)=>({color:m_(r,t,n)}))),r},b_=(e,t,n,r)=>{const o=v_(e,n,r),{localPaletteColors:i}=o;if(t<=0)return i[0].color;if(t>=1)return i[i.length-1].color;const a=((e,t)=>{let n="",r=0;const{limits:o,localPaletteColors:i}=e;for(let a=0;a<i.length;a++){const i=o&&o[a]?o[a].value:1;if(t>=r&&t<i){n=g_(e,a,t);break}r=i}return n})(o,t);return a},y_=(e,t)=>{const n=(e=>e.map(e=>e.value??e).sort((e,t)=>e-t))(e),r=n.some(e=>!KN(e));return 0===n.length||r?(e=>{const t=0===e?0:.5*e;return{min:e-t,max:e+t}})(t):1===n.length?((e,t)=>{const n=e[0]-t;if(0===n||!KN(n)){const e=0===t?.5:Math.abs(.5*t);return{min:t-e,max:t+e}}return n>0?{min:t-.5*Math.abs(t),max:e[0]+2*n}:{min:e[0]+2*n,max:t+.5*Math.abs(t)}})(n,t):((e,t)=>{let n=e[e.length-1]-e[0];return n=n>0?n:1,{min:Math.min(t,e[0])-n/2,max:Math.max(t,e[e.length-1])+n/2}})(n,t)},x_=(e,t)=>{const{limits:n}=e.segments;if(!n)return;const r=((e,t)=>{const{min:n,max:r}=y_(e,t),o=Math.abs(t);return{min:n??t-o,max:r??t+o}})(n,t),o=((e,t,n)=>{const{limits:r,paletteColors:o,localPaletteColors:i}=e.segments;if(!r||!KN(t))return 0;let a=n&&KN(n)?Math.min(n,t):0;const s=r.sort((e,t)=>e.value-t.value),l=o||i;for(let e=0;e<l.length;e++){if(e===l.length-1||t<s[e].value&&t>=a)return e;a=s[e].value}return 0})(e,t,r.min);return{limitRange:r,limitPaletteColorIndex:o}},S_=e=>"flex-start"===e?"flex-end":"flex-start",w_=(e,t,n,r)=>{const o=e.indicatorConditionalColoring;if(!o)return;const i=x_(o,t),a=((e,t,n,r)=>{const{segments:o}=e;if(!o||!n)return;const{limits:i}=o;if(!i?.length||!((e,t)=>!(!e||0===e.length||!(e[t]?.gradient??e[t-1]?.gradient)))(i,n.limitPaletteColorIndex))return m_(o,n.limitPaletteColorIndex,r);const a=h_(n.limitRange,t);return b_(o,a,n.limitRange,r)})(o,t,i,r),s=o.segments.paletteColors[i?.limitPaletteColorIndex||0].icon,{indicator:l}=e;let c=l?.position||"right";return"rtl"===n&&(c="right"===c?"left":"right"),{color:a,iconKey:s,position:c}},C_=({representation:e,cellValue:t,textStyle:n})=>{const{styleService:r}=UT(),{theme:o}=HT(),{direction:i}=WT(),{text:a,indicator:s}=e,{showTextValues:l,applySegmentColors:c}=s??{},u=w_(e,t,i,o),{fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m}=r.measureValues,g={fontSize:d,fontFamily:p,fontStyle:f,fontWeight:h,textDecoration:m},v=parseInt(d||lP,10),{iconKey:b,color:y,position:x}=u||{},S={display:"flex",paddingTop:2};return l?hi.jsxs("div",{"data-key":"representation-indicator",style:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"4px",overflow:n?.overflow,color:c?y:n?.color},children:["left"===x&&f_({size:v,iconKey:b,color:y,pvStyle:S}),hi.jsx("span",{style:{paddingTop:4,overflow:n?.overflow,textOverflow:n?.textOverflow,whiteSpace:"nowrap",direction:t<0?"ltr":void 0,...g},children:a}),"right"===x&&f_({size:v,iconKey:b,color:y,pvStyle:S})]}):(S.paddingTop=5,f_({size:v,iconKey:b,color:y,pvStyle:S}))},E_=e=>!!e.target?.getAttribute("class")?.includes(ND),I_=(e,t)=>{switch(t.type){case"clearSelections":return{engineSelectedCells:null,activeSelection:null,selectedField:null};case"mouseup":return{...e,activeSelection:null,engineSelectedCells:t.payload.engineSelectedCells};case"mousedown":return{...e,activeSelection:t.payload.activeSelection,selectedField:t.payload.selectedField};case"mouseover":{if(!e.activeSelection)return e;const{index:n}=t.payload,r=Math.min(n,e.activeSelection.startIndex),o=Math.max(n,e.activeSelection.endIndex);if(r===e.activeSelection.startIndex&&o===e.activeSelection.endIndex)return e;const i={...e.activeSelection,startIndex:r,endIndex:o};return i.clientSelectedCells=(e=>{const{getCellFromIndex:t,startIndex:n,endIndex:r,clientSelectedCells:o}=e,i=new Map(o);for(let e=n;e<=r;e++){const n=t(e);"N"===n?.ref.qType&&i.set(n.ref.qElemNo,n)}return i})(i),{...e,activeSelection:i}}default:return e}},D_=e=>null!==e.target?.closest("[data-prevent-selection]"),L_=e=>"A"===e.target?.tagName,R_=({startIndex:e,getCellFromIndex:t,cell:n})=>({type:"mousedown",payload:{activeSelection:{startIndex:e,endIndex:e,getCellFromIndex:t,clientSelectedCells:(new Map).set(n.ref.qElemNo,n)},selectedField:{selectionCellType:n.selectionCellType,index:"L"===n.selectionCellType?n.x:n.y}}});const M_=c({createMouseDownHandler:()=>()=>{},createMouseOverHandler:()=>()=>{},createPointerUpHandler:()=>()=>{},isSelected:()=>!1,isActive:!1,isLocked:()=>!1}),A_=()=>h(M_),P_=({children:e,selections:t})=>{const n=function(e){const{updatePageInfo:t}=WT(),n=e.isActive(),[r,o]=d(I_,{engineSelectedCells:null,selectedField:null,activeSelection:null});p(()=>{const n=()=>{o({type:"clearSelections"})},r=()=>{n(),t({page:0})};return e.on("deactivated",n),e.on("canceled",n),e.on("confirmed",r),e.on("cleared",n),()=>{e.removeListener("deactivated",n),e.removeListener("canceled",n),e.removeListener("confirmed",r),e.removeListener("cleared",n)}},[e,t]);const i=u(async()=>{if(!r.activeSelection)return;var t,n;1===r.activeSelection.clientSelectedCells.size&&(t=r.engineSelectedCells,(n=r.activeSelection).clientSelectedCells.forEach((e,r)=>{t?.has(r)&&(n.clientSelectedCells.delete(r),t.delete(r))}));const i=new Map([...r.engineSelectedCells??new Map,...r.activeSelection.clientSelectedCells]);try{o({type:"mouseup",payload:{engineSelectedCells:i}}),await e.select({method:"selectPivotCells",params:[XT,Array.from(i,([,e])=>({qType:e.selectionCellType,qRow:e.y,qCol:e.x}))]})}catch(e){console.error(e),o({type:"mouseup",payload:{engineSelectedCells:r.engineSelectedCells}})}},[r,e]);p(()=>{if(r.activeSelection)return document.addEventListener("mouseup",i),()=>{document.removeEventListener("mouseup",i)}},[i,r.activeSelection]);const a=u((e,t)=>n=>{const r=t(e);E_(n)||D_(n)||L_(n)||!(e=>1===e.buttons)(n)||!r||o(R_({startIndex:e,getCellFromIndex:t,cell:r}))},[]),s=u(t=>async()=>{r.activeSelection&&(e.isActive()||await e.begin([XT]),o({type:"mouseover",payload:{index:t}}))},[r.activeSelection,e]),l=u((e,t)=>n=>{if("touch"!==n.pointerType)return;const r=t(e);E_(n)||D_(n)||L_(n)||!r||(o(R_({startIndex:e,getCellFromIndex:t,cell:r})),i())},[i]),c=u(e=>!(!r.engineSelectedCells?.size&&!r.activeSelection?.clientSelectedCells.size||!r.selectedField||e.selectionCellType===r.selectedField.selectionCellType&&("L"===e.selectionCellType?r.selectedField.index===e.x:r.selectedField.index===e.y)),[r.activeSelection?.clientSelectedCells.size,r.engineSelectedCells?.size,r.selectedField]),f=u(e=>!c(e)&&(r.engineSelectedCells?.has(e.ref.qElemNo)||!!r.activeSelection?.clientSelectedCells.has(e.ref.qElemNo)),[c,r.activeSelection?.clientSelectedCells,r.engineSelectedCells]);return v(()=>({isSelected:f,isActive:n,isLocked:c,createMouseDownHandler:a,createMouseOverHandler:s,createPointerUpHandler:l}),[f,n,c,a,s,l])}(t);return hi.jsx(M_.Provider,{value:n,children:e})},q_=e=>"fill"===e.representation.imageSize,T_=(e,t)=>{let n=e.isLeftColumn?"flex-start":"center";return e.isLeftColumn&&q_(e)&&t&&(n="center"),e.representation.type!==$A.Image||q_(e)?n:e.representation.resolvedImagePosition?.vertical};var k_=function(e){return e.Background="background",e.Color="color",e.FontWeight="fontWeight",e.FontStyle="fontStyle",e.TextDecoration="textDecoration",e}(k_||{});const O_={brighter:.5,darker:.3,opacity:.03},N_=(e,{cell:t,styleService:n})=>{if(e===k_.Background||e===k_.Color){const n=t.expressionColor[e];if(n)return n}return t.isNull?n.dimensionNull[e]:t.isPseudoDimension?e===k_.Background&&t.headerColor?.background?t.headerColor.background:e===k_.Color&&t.headerColor?.color?t.headerColor.color:n.measureLabels[e]:t.isTotal?n.totalValues[e]:n.dimensionValues[e]},__=({styleService:e,isCellSelected:t,cell:n,isCellLocked:r})=>{if(t)return e.selectedColors.background;const o=N_(k_.Background,{cell:n,styleService:e});return!r||!o||n.isPseudoDimension||n.isEmpty||n.isNull||n.isTotal?N_(k_.Background,{cell:n,styleService:e}):`repeating-linear-gradient(\n -45deg,\n ${xM(i=o,O_)} 0px 2px,\n ${i} 0px 4px\n ) border-box`;var i},j_=({cell:e,styleService:t,isCellSelected:n})=>n?t.selectedColors.color:N_(k_.Color,{cell:e,styleService:t}),F_=({cell:e,styleService:t})=>{const{qCanCollapse:n,qCanExpand:r}=e.ref,o=N_(k_.FontWeight,{cell:e,styleService:t});return void 0===o&&(r||n)?uP:o},z_=({cell:e,styleService:t})=>N_(k_.FontStyle,{cell:e,styleService:t}),W_=({cell:e,styleService:t})=>N_(k_.TextDecoration,{cell:e,styleService:t}),$_=e=>e?"pointer":"default",V_=({expandOrCollapse:e,cell:t})=>n=>{e?.(t.y,t.x),n.stopPropagation()},H_=(e,t)=>{if(!e.isLeftColumn||e.representation.type===$A.Image)return{padding:4};return{padding:4,marginTop:t.dimensionValueTextHeight/2-6.5-4}},B_=({cell:e,isLeftColumn:t,isCellSelected:n})=>{const{styleService:r,layoutService:o}=UT(),{interactions:i}=HT(),{isActive:a}=A_(),{dataModel:s}=hO();if(!e.ref.qCanExpand&&!e.ref.qCanCollapse)return null;const l=!i.active||a||!s,c=j_({cell:e,styleService:r,isCellSelected:n}),u=a?.4:1,d=e.ref.qCanExpand?Uq:Gq;let p;p=e.ref.qCanExpand?t?s.expandLeft:s.expandTop:t?s.collapseLeft:s.collapseTop;const f=xO({isLeftColumn:t,layoutService:o,representation:e.representation});return hi.jsx(d,{opacity:u,color:c,"data-prevent-selection":!l||void 0,"data-testid":e.ref.qCanExpand?"expand-icon":"collapse-icon",height:13,style:{flexShrink:0,cursor:l?"default":"pointer",position:"sticky",top:0,...H_(e,r),...f&&{alignSelf:T_(e)}},onClick:l?void 0:V_({cell:e,expandOrCollapse:p})})},G_=e=>{switch(e){case"fitHeight":case"fill":case"alwaysFit":return"100%";case"originalSize":return"fit-content";default:return"auto"}},U_=(e,t,n)=>{if("alwaysFit"===e&&t&&!n)return"fit-content";switch(e){case"fitHeight":return"auto";case"originalSize":return"fit-content";case"alwaysFit":return n?"unset":"100%";default:return"100%"}},Y_=(e,t)=>{if("alwaysFit"===e)switch(t?.vertical){case"flex-start":return"center top";case"flex-end":return"center bottom";default:return"center center"}},K_=({representation:e,canExpandOrCollapse:t,leafCount:n,isLeftColumn:r,styleService:o,layoutService:i,isMeasureCell:a})=>{const{isIndentModeEnabled:s}=i,l=xO({isLeftColumn:r,layoutService:i,representation:e}),c=t?21:0,u=e.imageBox?.width??24;let d=`calc(100% - ${c}px)`,p=o.headerCellHeight;r&&l&&(d=u),(a||r)&&(p=o.contentCellHeight);let f=p;switch(r&&void 0!==n&&!s&&(f=p*Math.max(n,1)),e.imageSize){case"originalSize":return{maxWidth:d,maxHeight:f,...l?{width:d}:{}};case"fitWidth":return{width:d,maxHeight:f};case"fitHeight":return{height:f,maxWidth:d,...l?{width:d}:{}};case"fill":return{height:f,width:d};default:return{width:d,height:p}}},X_=e=>{if("alwaysFit"===e)return"contain"},J_=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`.trim(),Z_=({imageSize:e,resolvedImagePosition:t,isImagesInIndentModeEnabled:n,isMeasureCell:r})=>({width:U_(e,n,r),height:G_(e),objectFit:X_(e),objectPosition:Y_(e,t),...n&&"alwaysFit"===e?{"max-width":"100%"}:{}}),Q_=({representation:e,textStyle:t,isMeasureCell:n})=>{const{imageRef:r,onLoad:o}=(()=>{const{downloadService:e}=UT(),t=l(null),{promise:n,resolve:r}=v(()=>BP(),[]);return p(()=>(e.isDownloadedAsPDForImage&&(e.waitForPromise(n),t.current?.complete&&r()),()=>{r()}),[t,e,n,r]),{onLoad:u(()=>{r()},[r]),imageRef:t}})(),{layoutService:{isIndentModeEnabled:i}}=UT(),{url:a,text:s,imageSize:c,resolvedImagePosition:d}=e,{overflow:f,...h}=t;return hi.jsx("img",{src:a,alt:s,style:{...Z_({imageSize:c,resolvedImagePosition:d,isImagesInIndentModeEnabled:i,isMeasureCell:n}),...h},onLoad:o,ref:r})},ej=({representation:e,textStyle:t,canExpandOrCollapse:n,leafCount:r,isLeftColumn:o=!1,imageContainerHorizontalAlignment:i,isMeasureCell:a})=>{const{styleService:s,layoutService:l}=UT(),{resolvedImagePosition:c}=e;return hi.jsx("div",{"data-key":"image-container--image",style:{display:"flex",flexDirection:"column",justifyContent:c?.vertical,alignItems:i,overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",...K_({representation:e,canExpandOrCollapse:n,leafCount:r,styleService:s,layoutService:l,isLeftColumn:o,isMeasureCell:a})},children:hi.jsx(Q_,{representation:e,textStyle:t,isMeasureCell:!0})})},tj=(e,t,n)=>{if(e?.auto)return t;switch(e?.align){case"center":return"center";case"left":return"rtl"===n?"flex-end":"flex-start";case"right":return"rtl"===n?"flex-start":"flex-end";default:return t}},nj=(e,t)=>{let{textAlign:n}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex&&({labelTextAlign:n}=t.visibleMeasureInfo.at(e.visibleMeasureInfoIndex)??{}),n?.auto||void 0===n?"left":n.align},rj={display:"flex",flexDirection:"row",alignItems:"center"},oj={alignItems:"center",display:"flex",flexDirection:"row",backgroundClip:"padding-box"},ij=(e,t,n,r,o)=>t?{...oj,...o?e.measureValues:e.nullValues}:n?{...rj,color:e.totalValues.color,background:r??e.totalValues.background}:{...rj,color:e.measureValues.color,background:r??e.measureValues.background},aj=(e,t,n,r,o)=>{const{fontFamily:i,fontSize:a}=e.measureValues,s={...MP,...!n&&AP(e.grid.lineClamp),...t&&{color:t},fontFamily:i,fontSize:a};if(o){const t=n?e.measureValues:e.nullValues,{fontWeight:r,fontStyle:o,textDecoration:i}=t;return{...s,fontWeight:r,fontStyle:o,textDecoration:i}}if(r){const{fontWeight:t,fontStyle:n,textDecoration:r}=e.totalValues;return{...s,fontWeight:t,fontStyle:n,textDecoration:r}}const{fontWeight:l,fontStyle:c,textDecoration:u}=e.measureValues;return{...s,fontWeight:void 0===l?uP:l,fontStyle:c,textDecoration:u}},sj=({cell:e,representation:t,color:n,isTotalValueCell:r,cellHorizontalAlignment:o})=>{const{layoutService:i,styleService:a}=UT(),{isIndentModeEnabled:s}=i,l=e.isNull?i.getNullValueText():t.text,c=t.type===$A.Image,u=t.type===$A.Indicator,d=""!==l&&KN(XN(l)),p=aj(a,n,d,r,e.isNull);if(!s&&c&&!e.isNull||s&&c&&!e.isNull)return hi.jsx(ej,{isMeasureCell:!0,textStyle:p,representation:t,imageContainerHorizontalAlignment:o});const f=XN(e.isNull?t.text:e.ref.qNum);return u&&KN(f)?hi.jsx(C_,{representation:t,cellValue:f,textStyle:p}):hi.jsx("span",{style:{padding:4,direction:d?"ltr":void 0,...p},children:l})},lj=(e,t)=>e?.[t]?.visibleMeasureInfoIndex??0,cj="flex-start",uj=(e,t)=>e.isNull?cj:t.type===$A.Image&&"fill"!==t.imageSize?t.resolvedImagePosition?.vertical:cj,dj=({columnIndex:e,rowIndex:t,style:n,data:r})=>{const{env:o}=HT(),{pageInfo:i,direction:a}=WT(),{styleService:s,layoutService:l}=UT(),{attrExprInfoIndexes:c,gridSectionsData:{measureData:d,leftDimensionData:p,topDimensionData:f},visibleDimensionsInfo:{visibleTopDimensionInfo:h}}=hO(),m=(()=>{const{layoutService:{isIndentModeEnabled:e}}=UT(),{gridSectionsData:{leftDimensionData:t,topDimensionData:n},visibleDimensionsInfo:{visibleLeftDimensionInfo:r,visibleTopDimensionInfo:o}}=hO(),i=r.length,a=o.length;return u((r,o)=>!(!n.grid.at(a-1)?.[r]?.isTotal&&!t.grid.at(e?0:i-1)?.[o]?.isTotal),[n,t,i,a,e])})(),g=(()=>{const{gridSectionsData:{topDimensionData:e},visibleDimensionsInfo:{visibleTopDimensionInfo:t}}=hO(),n=t.length;return u(t=>{const r=e.grid.at(n-1)?.[t];return BN(r,e.totalDividerIndex)},[e,n])})(),v=(()=>{const{layoutService:{isIndentModeEnabled:e}}=UT(),{gridSectionsData:{leftDimensionData:t},visibleDimensionsInfo:{visibleLeftDimensionInfo:n}}=hO(),r=n.length;return u(n=>{const o=e?0:r-1,i=t.grid.at(o)?.[n];return BN(i,t.totalDividerIndex,e)},[t,e,r])})(),{showLastBorder:b}=r,y=f.grid.at(h.length-1),x=p.grid.at(-1),{background:S}=s.measureValues,w=d[t]?.[e],C=t===i.rowsOnCurrentPage-1,E=e===l.size.x-1;if(!w)return hi.jsx(GN,{style:{...n,background:S},isLastRow:C,isLastColumn:E,showLastBorder:b,index:t,isLeftColumn:!1,showTotalCellDivider:!1});const I=l.hasPseudoDimOnLeft?lj(x,t):lj(y,e),D=l.visibleMeasureInfo[I],L=Gk({cell:w.ref,representationProperties:D.representation,attrExprInfoIndex:c.measures[I],env:o,direction:a,conditionalColoring:D.conditionalColoring,enabledFeatures:{[$A.Image]:!0,[$A.Indicator]:!0}}),R=!w.isNull&&m(e,t),M=w.isNull?l.getNullValueText():L.text,A=!w.isNull||""!==M&&!Number.isNaN(+M),P=Uk(c.measures[I],w.ref),q=((e,t,n,r,o)=>{const{textAlign:i}=t,a=r?"flex-end":"center";return e.isNull||n.type!==$A.Image?tj(i,a,o):n.resolvedImagePosition?.horizontal??"center"})(w,D,L,A,a),T={...ij(s,w.isNull,R,P.background,A),...qP(C,E,s.grid.border,a,b),...kP({bottomDivider:v(t),rightDivider:g(e),borderColor:s.grid.divider}),...RP,padding:"0px 4px",display:"flex",justifyContent:q};return hi.jsx("div",{className:kD,title:M,style:{...T,...n},"data-testid":"measure-value","data-row-index":t,"data-col-index":e,children:hi.jsx(UN,{width:YN(L),verticalAlign:uj(w,L),children:hi.jsx(sj,{cell:w,representation:L,isTotalValueCell:R,color:P.color,cellHorizontalAlignment:q})})})};var pj=n.memo(dj,AN);const fj=(e,t)=>t.list[e]?.id??e.toString(),hj=({columnIndex:e,rowIndex:t,data:n})=>n.grid[t]?.[e]?.id??`${t}-${e}`,mj=e=>({...LP,overflow:"hidden",boxSizing:"content-box",borderWidth:"rtl"===e?"1px 1px 0px 0px":"1px 0px 0px 1px"}),gj=({dataGridRef:e,height:t,rowHightCallback:n,width:r,showLastBorder:o,getRightGridColumnWidth:i,verticalScrollDirection:a,horizontalScrollDirection:s})=>{const{pageInfo:l,direction:c}=WT(),{layoutService:d,styleService:{grid:{divider:p},contentCellHeight:f}}=UT(),{dataModel:h,gridSectionsData:{measureData:m}}=hO(),v={...mj(c),borderColor:p,willChange:"auto",userSelect:"none",WebkitUserSelect:"none"},b=(({verticalScrollDirection:e,horizontalScrollDirection:t})=>{const{pageInfo:n}=WT(),{downloadService:r,viewService:o,layoutService:i}=UT(),{dataModel:a,gridSectionsData:{leftDimensionData:s,topDimensionData:l,measureData:c}}=hO(),d=s.columnCount,p=l.rowCount;return u(({overscanColumnStartIndex:s,overscanColumnStopIndex:l,overscanRowStartIndex:u,overscanRowStopIndex:f})=>{o.gridColumnStartIndex=s,o.gridRowStartIndex=u,o.gridWidth=l-s+1,o.gridHeight=f-u+1;const h=o.gridWidth+d+(t.current===ZA.None?0:PN),m=o.gridHeight+p+(e.current===ZA.None?0:PN);let g=VN;m*h>1500&&(g=HN),g(a,i,c,n,o,e,t,r)},[o,i,a,c,e,t,n,d,p,r])})({verticalScrollDirection:a,horizontalScrollDirection:s});return cq(()=>{e.current&&e.current.resetAfterColumnIndex(0,!1)},[e,h,m]),g(()=>{e.current&&e.current.resetAfterIndices({columnIndex:0,rowIndex:0,shouldForceUpdate:!0})},[r,t,e,f,c]),0===d.size.x?null:hi.jsx(bN,{"data-section-id":"DATA_GRID",ref:e,style:v,columnCount:d.size.x,columnWidth:i,height:t,rowCount:l.rowsOnCurrentPage,rowHeight:n,width:r,itemData:{showLastBorder:o,grid:m},onItemsRendered:b,estimatedRowHeight:n(),estimatedColumnWidth:i(),itemKey:hj,direction:c,children:pj})};var vj=y(gj);const bj=x((e,t)=>hi.jsxs("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:[hi.jsx("path",{d:"M13 7H8zV4.982C13 2.23 10.761 0 8 0S3 2.23 3 4.982V7h.75H3h1.5V5.332C4.5 3.216 5.549 1.5 8 1.5s3.5 1.716 3.5 3.832V7h.75H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3z"}),hi.jsx("use",{fillRule:"evenodd"})]})),yj=e=>{const[t,n]=Of(zO);return cq(()=>{n(!1)},e),{isAdjustingWidth:t,setIsAdjustingWidth:n}},xj=()=>{const[e,t]=m(!1),{dataModel:n}=hO(),{interactions:r}=HT(),{isAdjustingWidth:o,setIsAdjustingWidth:i}=yj([n]);return{open:e,setOpen:t,handleOpenMenu:e=>{!r.active||E_(e)||o||t(!0)},isAdjustingWidth:o,setIsAdjustingWidth:i}};function Sj(e,t){const n=t.expressionColor?.background??e.dimensionValues.background,r=t.isLeftColumn?e.header.background:n,o=r===EP.Transparent?DL.WHITE:r,i=zL(e.grid.border),a=zL(o);return a.isInvalid()||i.isInvalid()||1===i.a?e.grid.border:function(e,t,n){return zL(e.r+(t.r-e.r)*n,e.g+(t.g-e.g)*n,e.b+(t.b-e.b)*n,e.a+(t.a-e.a)*n)}(a,i,i.a).getRGB()}const wj=({cellInfo:e,columnWidth:t,isLastColumn:n,overrideLeftGridWidth:r,setIsAdjustingWidth:o,shouldApplyIndentModeColumnWidth:i,tableWidth:a})=>{const{direction:s}=WT(),{interactions:l,translator:c}=HT(),{isActive:u}=A_(),{dataModel:d}=hO(),{styleService:p}=UT(),[,f]=m({});if(!(e.canBeResized&&!!l.active&&!u))return null;const h=Sj(p,e);return hi.jsx(mq,{isPivot:!0,columnWidth:t,isLastColumn:n,keyValue:`adjuster-${e.dimensionInfoIndex}`,hoverColor:h,updateWidthCallback:t=>{f({}),r&&void 0!==e.colIdx&&r(t,e.colIdx)},confirmWidthCallback:t=>{i?d.applyIndentModeColumnWidth({...t,pixels:Math.min((a??0)*bO,t.pixels??0)}):d.applyColumnWidth(t,e)},setIsAdjustingWidth:o,isLeftColumn:e.isLeftColumn,accessibilityRelatedArgs:{translator:c,columnLabel:e.label??""},direction:s})},Cj=Ms(mc,{shouldForwardProp:e=>!["interactions","hoverBackground","background","shouldShowMenuIcon","isDimension"].includes(e)})(({interactions:e,background:t,hoverBackground:n,shouldShowMenuIcon:r,isDimension:o})=>({pointerEvents:o?"all":"none",position:"relative",display:"grid",gridTemplateColumns:r?"1fr 12px":"1fr",gap:8,alignItems:"center",cursor:e.active?"pointer":"default",background:t,"&&:hover":{background:e.active&&o?n:t}})),Ej=Ms("div",{shouldForwardProp:e=>!["direction"].includes(e)})(({direction:e})=>({position:"absolute",left:"rtl"!==e?0:void 0,bottom:0})),Ij=Ms("div",{shouldForwardProp:e=>"justifyContent"!==e})(({justifyContent:e})=>({...DP,justifyContent:e??DP.justifyContent,flexDirection:"row",overflow:"hidden",position:"relative",gap:8})),Dj=Ms("div")(()=>({...DP})),Lj=Ms("div",{shouldForwardProp:e=>!["fontSize","fontFamily","fontWeight","fontStyle","textDecoration","justifyContent"].includes(e)})(({fontSize:e,fontFamily:t,fontWeight:n,fontStyle:r,textDecoration:o,justifyContent:i})=>({display:"flex",justifyContent:i,alignSelf:"center",flexGrow:1,maxWidth:"100%",fontWeight:n,fontSize:e,fontFamily:t,fontStyle:r,textDecoration:o})),Rj=Ms(Ad)(({theme:e})=>({".MuiList-root":{padding:e.spacing(.5,0)}})),Mj=Ms(Od,{shouldForwardProp:e=>!["isActive"].includes(e)})(({theme:e,isActive:t})=>({width:220,maxHeight:32,borderRadius:e.spacing(.5),margin:e.spacing(.25,.5),padding:e.spacing(1,1.5),display:"flex",justifyContent:"space-between",position:"relative",overflow:"hidden ",boxSizing:"border-box",background:t?"rgba(0, 0, 0, 0.05)":"transparent","&:hover":{".indent-mode-dropdown-more":{opacity:1}}})),Aj=Ms("span")({textOverflow:"ellipsis",overflow:"hidden"}),Pj=Ms("div",{shouldForwardProp:e=>"visible"!==e})(({visible:e})=>({opacity:e?1:0,width:gO,display:"flex",justifyContent:"center",alignItems:"center",position:"relative"})),qj=Ms("span",{shouldForwardProp:e=>!["padding","alignSelf"].includes(e)})(({padding:e,alignSelf:t})=>({padding:e,alignSelf:t,position:"sticky",top:0}));let Tj=function(e){return e.Expand="Expand",e.Collapse="Collapse",e}({});const kj=(e,t)=>({qExcludeList:t===Tj.Expand,qPos:{qDimName:e,qElemNo:[]}}),Oj=`${XT}/qExpansionState`,Nj=({model:e,qExpansionState:t,qEffectiveDimensionName:n,action:r})=>async()=>{const o=(({qEffectiveDimensionName:e,oldExpansionState:t,action:n})=>{const r=t?.findIndex(t=>t.qPos?.qDimName===e);return{expansionData:kj(e,n),index:r}})({qEffectiveDimensionName:n,oldExpansionState:t,action:r});await(async({model:e,newExpansionState:t,errorMsg:n})=>{const{index:r,expansionData:o}=t;try{let t,n=Oj,i="Add";void 0===r?t=JSON.stringify([o]):-1===r?(n=`${Oj}/-`,t=JSON.stringify(o)):(n=`${Oj}/${r}`,i="Replace",t=JSON.stringify(o)),await e.applyPatches([{qPath:n,qOp:i,qValue:t}],!0)}catch(e){console.error(n,e)}})({model:e,newExpansionState:o,errorMsg:`Failed to ${r} dimension`})},_j=({model:e,effectivePropertiesService:t,cell:n})=>{if(void 0===n.qEffectiveDimensionName)return;const r={model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n.qEffectiveDimensionName};return{expandCallback:Nj({...r,action:Tj.Expand}),collapseCallback:Nj({...r,action:Tj.Collapse}),alwaysFullyExpanded:t.qAlwaysFullyExpanded}},jj={[tT.Sorting]:!0,[tT.Selections]:!0,[tT.Searching]:!0},Fj=({cell:e,style:t,isFirstColumn:n,isLastColumn:r,isLastRow:o,changeSortOrder:i,iconsVisibilityStatus:a,columnWidth:s,overrideLeftGridWidth:c,shouldApplyIndentModeColumnWidth:u,tableWidth:d})=>{const p=l(null),{styleService:f,layoutService:h,effectivePropertiesService:m}=UT(),{app:g,interactions:v,embed:b,translator:y,model:x,env:S}=HT(),{fontSize:w,fontFamily:C,fontStyle:E,fontWeight:I,textDecoration:D,color:L,background:R,hoverBackground:M,activeBackground:A}=f.header,P=l(null),{shouldShowLockIcon:q,shouldShowMenuIcon:T}=a,{open:k,setOpen:O,handleOpenMenu:N,setIsAdjustingWidth:_}=xj(),{direction:j}=WT(),F={sortFromMenu:async(t,n)=>{t.stopPropagation(),await i(e,n)}},z={embed:b,listboxRef:p,sortCriteria:h.searchSortFromDimension&&e.isDim?m.getSortCriteriaForDimension(e.dimensionInfoIndex):void 0},W={app:g,qStateName:h.layout.qStateName},{labelTextAlign:$}=h.getDimensionInfo(e.dimensionInfoIndex)??{},V=tj($,"flex-start",j);return hi.jsxs(Cj,{className:kD,title:e.label,interactions:v,background:k?e.headerColor?.headerMenuActiveBackground??A:e.headerColor?.background??R,hoverBackground:e.headerColor?.headerMenuHoverBackground??M,shouldShowMenuIcon:T,isDimension:e.isDim,style:{...t,...RP,...TP(e,o,n,r,f.grid.border,j),color:e.headerColor?.color??L},"data-testid":"title-cell",onClick:N,children:[hi.jsxs(Ij,{children:[q?hi.jsx(Dj,{children:hi.jsx(bj,{height:12})}):null,hi.jsx(Lj,{fontFamily:C,fontSize:w,fontStyle:E,fontWeight:I,textDecoration:D,justifyContent:V,children:hi.jsx("span",{style:S.flags.isEnabled("VNA-135-WRAP_HEADER_TEXT")?{...MP,...AP(f.grid.columnLineClamp)}:MP,children:e.label})})]}),e.isDim?hi.jsxs(hi.Fragment,{children:[hi.jsx(oT,{headerData:e,translator:y,anchorRef:P,open:k,setOpen:O,interactions:v,menuAvailabilityFlags:jj,sortRelatedArgs:F,searchRelatedArgs:z,selectionRelatedArgs:W,expandOrCollapseArgs:_j({model:x,effectivePropertiesService:m,cell:e}),shouldShowMenuIcon:T,model:x&&"setActiveField"in x?x:void 0,direction:j,isAccessibleHeader:!0}),hi.jsx(Ej,{ref:p,direction:j}),hi.jsx(Ej,{ref:P,direction:j})]}):null,hi.jsx(wj,{cellInfo:{...e,isLeftColumn:!0},columnWidth:s,isLastColumn:r,overrideLeftGridWidth:c,setIsAdjustingWidth:_,shouldApplyIndentModeColumnWidth:u,tableWidth:d})]})},zj=({rowSpan:e,columnSpan:t})=>{const{styleService:n}=UT(),{direction:r}=WT();return e>0&&t>0?hi.jsx("div",{style:{...LP,gridRowStart:1,gridRowEnd:`span ${e}`,gridColumnStart:1,gridColumnEnd:`span ${t}`,borderWidth:"rtl"===r?"0px 0px 0px 1px":"0px 1px 0px 0px",borderColor:n.grid.border,background:n.grid.background},"data-testid":"empty-header-cell"}):null},Wj=x((e,t)=>hi.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:hi.jsx("path",{d:"m8 9 4.5-4.5L14 6l-4.5 4.5L8 12 2 6l1.5-1.5z"})})),$j=x((e,t)=>hi.jsxs("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:[hi.jsx("path",{d:"m8 7-4.5 4.5L2 10l6-6 6 6-1.5 1.5z"}),hi.jsx("use",{fillRule:"evenodd"})]})),Vj=({tableWidth:e,leftGridWidth:t,overrideLeftGridWidth:n})=>{const{direction:r}=WT(),{styleService:o}=UT(),{interactions:i,translator:a}=HT(),{isActive:s}=A_(),{dataModel:l}=hO(),{setIsAdjustingWidth:c}=yj([l]);if(!(!!i.active&&!s))return null;const u=Sj(o,{isLeftColumn:!0});return hi.jsx(mq,{isPivot:!0,isLastColumn:!0,isLeftColumn:!0,keyValue:"adjuster-indent-row",hoverColor:u,columnWidth:t,updateWidthCallback:t=>{n(Math.min(t,e*bO))},confirmWidthCallback:r=>{if(r.type===jD.FitToContent)return void l.applyIndentModeColumnWidth({type:jD.Auto});const o=Math.min(r.pixels??t,e*bO);n(o),l.applyIndentModeColumnWidth({type:jD.Pixels,pixels:o})},setIsAdjustingWidth:c,accessibilityRelatedArgs:{translator:a,columnLabel:a.get("SNPivotTable.IndentMode.Rows")},direction:r})},Hj=x((e,t)=>hi.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:hi.jsx("path",{d:"M3 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0m6 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m5 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2"})})),Bj=({cell:e,changeSortOrder:t})=>{const n=l(null),r=l(null),{app:o,interactions:i,embed:a,translator:s,model:c}=HT(),{layoutService:u,effectivePropertiesService:d}=UT(),{open:p,setOpen:f,handleOpenMenu:h}=xj();return hi.jsxs(Mj,{onClick:h,isActive:p,children:[hi.jsx(Aj,{children:e.label}),hi.jsxs(Pj,{className:"indent-mode-dropdown-more",visible:p,children:[hi.jsx(Hj,{}),e.isDim?hi.jsxs(hi.Fragment,{children:[hi.jsx(oT,{headerData:e,translator:s,anchorRef:n,open:p,setOpen:f,interactions:i,menuAvailabilityFlags:jj,sortRelatedArgs:{sortFromMenu:async(n,r)=>{n.stopPropagation(),await t(e,r)}},searchRelatedArgs:{embed:a,listboxRef:r},selectionRelatedArgs:{app:o,qStateName:u.layout.qStateName},expandOrCollapseArgs:_j({model:c,effectivePropertiesService:d,cell:e}),shouldShowMenuIcon:!1,model:c&&"setActiveField"in c?c:void 0}),hi.jsx(Ej,{ref:r}),hi.jsx(Ej,{ref:n})]}):null]})]})},Gj=({idx:e,menu:t,menuItems:n,isOnlyOneRow:r})=>{const o=n.at(-1)?.id===ZT,i=e+1<n.length&&n[e+1]?.id===ZT;return!(r&&o&&i)&&(t?.id!==ZT&&e<n.length-1)},Uj=({menuItems:e,changeSortOrder:t,overrideLeftGridWidth:n,leftGridWidth:r,tableWidth:o})=>{const{styleService:i}=UT(),{interactions:a,translator:s}=HT(),{dataModel:c,gridSectionsData:{headersData:u}}=hO(),[d,p]=m(!1),f=l(null),{headerCellHeight:h}=i,{color:g,background:v,hoverBackground:b,activeBackground:y,fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E}=i.header,{isAdjustingWidth:I}=yj([c]),D=e=>{e.stopPropagation()},L={height:h,gridColumn:`1 / span ${u.size.x}`,gridRow:u.size.y,zIndex:u.size.x-0};return hi.jsxs(Cj,{isDimension:!0,background:d?y:v,interactions:a,hoverBackground:b,style:{...L,...RP,color:g},onClick:e=>{!a.active||E_(e)||I||p(!d)},"data-testid":"indentModeHeaderCellWrapper",children:[hi.jsxs(Ij,{justifyContent:"flex-start",children:[hi.jsx(Lj,{fontFamily:x,fontSize:S,fontStyle:w,fontWeight:C,textDecoration:E,justifyContent:"flex-start",children:hi.jsx("span",{style:MP,children:s.get("SNPivotTable.IndentMode.Rows")})}),d?hi.jsx($j,{}):hi.jsx(Wj,{}),hi.jsx(Ej,{ref:f})]}),hi.jsx(Rj,{open:d,anchorEl:f.current,disableEnforceFocus:!0,children:e.map((n,r)=>[n&&n.id!==ZT&&hi.jsx("li",{role:"presentation",onClick:D,onKeyDown:D,children:hi.jsx(Bj,{cell:n,changeSortOrder:t})}),Gj({idx:r,menu:n,menuItems:e,isOnlyOneRow:1===u.size.y})&&hi.jsx(xq,{"data-testid":"group-divider",variant:"middle"})])}),hi.jsx(Vj,{tableWidth:o,leftGridWidth:r,overrideLeftGridWidth:n})]})},Yj=({layoutService:e,headersData:t,topRowIndex:n})=>e.isIndentModeEnabled&&t.size.x>1&&n+1===t.size.y,Kj={display:"grid",width:"fit-content"},Xj=({tableWidth:e,leftGridWidth:t,columnWidths:n,rowHight:r,changeSortOrder:o,getHeaderCellsIconsVisibilityStatus:i,height:a,overrideLeftGridWidth:s})=>{const{layoutService:l}=UT(),{gridSectionsData:{headersData:c}}=hO();return hi.jsxs("div",{"data-testid":"HEADER_GRID",style:{...Kj,gridTemplateColumns:n.map(e=>`${e}px`).join(" "),gridTemplateRows:c.data.map(()=>`${r}px`).join(" "),height:a},children:[c.size.y>1&&hi.jsx(zj,{columnSpan:c.size.x-1,rowSpan:c.size.y-1}),c.data.map((a,u)=>{let d=[];if(Yj({layoutService:l,headersData:c,topRowIndex:u})){const n=a.at(0);return Array.isArray(n)&&d.push(hi.jsx(Uj,{menuItems:n,changeSortOrder:o,overrideLeftGridWidth:s,leftGridWidth:t,tableWidth:e},n.at(0)?.id)),d}return d=a.reduce((t,a,d)=>{if(a&&!Array.isArray(a)){const p=i(d,a.isLocked,a.label),f=l.isIndentModeEnabled&&1===c.size.x;t.push(hi.jsx(Fj,{style:{width:n[d],height:r,gridColumn:l.isIndentModeEnabled&&c.size.x>1?2:d+1,gridRow:u+1,zIndex:c.size.x-d},isLastRow:u===c.size.y-1,isFirstColumn:0===d,isLastColumn:d===c.size.x-1,changeSortOrder:o,cell:a,iconsVisibilityStatus:p,columnWidth:n[d],overrideLeftGridWidth:s,shouldApplyIndentModeColumnWidth:f,tableWidth:e},a.id))}return t},[]),d})]})};var Jj=y(Xj);const Zj=(e,t,n,r)=>{const{layoutService:o}=UT();g(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!0))},[e,t,n,r,o])},Qj=(e,t)=>{cq(()=>{e.current?.forEach(e=>e?.resetAfterIndex(0,!1))},[e,t])},eF=(e,t)=>{const{isLast:n,list:r,listValues:o}=t;return n?r[e]:o[e]},tF=(e,t,n,r,o)=>{if(o)return;const i=e.representation,a=xO({isLeftColumn:n,layoutService:t,representation:i}),s=n?"flex-start":"center",l=e.representation.resolvedImagePosition?.horizontal;if(e.representation.type===$A.Image)return a&&l&&"center"!==l&&"rtl"===r?S_(l):l??s;if(e.isPseudoDimension&&void 0!==e.visibleMeasureInfoIndex){const{labelTextAlign:n}=t.visibleMeasureInfo[e.visibleMeasureInfoIndex]??{};return tj(n,s,r)}const{textAlign:c}=t.getDimensionInfo(e.dimensionInfoIndex)??{};return tj(c,s,r)},nF=()=>{},rF=({children:e,reactWindowStyle:t,cell:n,data:r,showTotalCellDivider:o,isLastRow:i,isLastColumn:a,isLeftColumn:s,isCellSelected:l,isAdjustingWidth:c,index:u})=>{const{styleService:d,layoutService:p}=UT(),{interactions:f}=HT(),{direction:h}=WT(),{isLocked:m,createMouseDownHandler:g,createMouseOverHandler:v,createPointerUpHandler:b}=A_(),{showLastBorder:y}=r,x=m(n)||n.isLockedByDimension,S=!(x||!f.active||!f.select||n.isEmpty||n.isNull||n.isPseudoDimension||n.isTotal||c),w=S?g(u,e=>eF(e,r)):void 0,C=S?v(u):void 0,E=S?b(u,e=>eF(e,r)):void 0,I=xO({isLeftColumn:s,layoutService:p,representation:n.representation});return hi.jsx("div",{className:kD,title:f.passive?n.representation.text:void 0,style:{...t,...qP(i,a,d.grid.border,h,y),...kP({bottomDivider:o&&s,rightDivider:o&&!s,borderColor:d.grid.divider}),...RP,padding:"rtl"===h?"0px 0px 0px 4px":"0px 4px",cursor:$_(S),background:__({styleService:d,isCellSelected:l,cell:n,isCellLocked:x}),zIndex:s?void 0:p.size.x-n.x,justifyContent:tF(n,p,s,h,I),display:"flex",...p.isIndentModeEnabled&&s&&{["rtl"===h?"paddingRight":"paddingLeft"]:Math.max(4,24*(n.indentLevel??0))},textAlign:nj(n,p)},"aria-hidden":"true",onMouseDown:w,onMouseOver:C,onPointerUp:E,onKeyUp:nF,role:"button",tabIndex:-1,"data-testid":"dimension-cell","data-x":n.x,"data-page-x":n.pageX,"data-y":n.y,"data-page-y":n.pageY,"data-cell-type":n.ref.qType,"data-dimension-info-index":n.dimensionInfoIndex,children:e})},oF=e=>{e.stopPropagation()},iF=({href:e,text:t,interactions:n,color:r})=>({href:e,title:t,rel:"noreferrer",target:"_blank",underline:"hover",onClick:oF,color:DL.LINK,style:{pointerEvents:n.active?"auto":"none",color:r??void 0,opacity:n.active&&n.passive||r?void 0:.4}}),aF=({href:e,text:t,interactions:n,color:r})=>hi.jsx(Ou,{...iF({href:e,text:t,interactions:n,color:r}),children:t}),sF=Y();sF.use(U),sF.renderer.prio(["canvas"]);const lF=(e,t)=>e&&"center"!==e&&"rtl"===t?S_(e):e,cF=({cell:e,representation:t,textStyle:n,imageContainerHorizontalAlignment:r})=>{const{imageBox:o}=t,{styleService:{grid:{lineClamp:i}}}=UT(),{direction:a}=WT();return hi.jsxs("div",{style:{display:"grid",gridTemplateColumns:`${o?.width??24}px 1fr`,maxHeight:"fit-content",alignItems:"center",justifyContent:"flex-start",boxSizing:"border-box"},children:[hi.jsx("div",{"data-key":"image-container--partial-image",style:{display:"flex",flexDirection:"column",justifyContent:T_(e),alignItems:lF(r,a),overflow:"hidden",boxSizing:"border-box",border:"4px solid transparent",width:o?.width??24,height:"100%"},children:hi.jsx(Q_,{representation:t,textStyle:n})}),hi.jsx(qj,{padding:4/(i<=2?2:1),alignSelf:T_(e,!0),children:!!t.labelStructure&&J_(t.labelStructure)})]})},uF=({suffix:e,delimeter:t})=>` ${e?t:""} ${e}`,dF=({href:e,text:t,labelStructure:n,interactions:r,color:o})=>hi.jsxs("span",{children:[hi.jsx(Ou,{...iF({href:e,text:t,interactions:r,color:o}),children:n?.maskedValue?n.maskedValue:n?.originalValue}),!!n&&uF(n)]}),pF=({children:e,textStyle:t,shouldEnableStickyText:n})=>hi.jsx("span",{style:{...t,border:"4px solid transparent",boxSizing:"border-box",...n&&{alignSelf:"flex-start",position:"sticky",top:0}},children:e}),fF=({isLeftColumn:e,styleService:t,cell:n,isIndentModeEnabled:r})=>e?r?t.grid.lineClamp:Math.max(t.grid.lineClamp,n.leafCount*t.grid.lineClamp):t.grid.columnLineClamp,hF=({cell:e,isCellSelected:t,isLeftColumn:n})=>{const{direction:r}=WT(),{isActive:o}=A_(),{layoutService:i,styleService:a}=UT(),{env:s,interactions:l}=HT(),c=n&&i.isIndentModeEnabled;let u;if(u=s.flags.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING")&&e.isNull?i.getDimensionNullValueText():e.isNull?fP:n?(e=>{const{representation:{text:t,labelStructure:n}}=e;if(e.isNull)return fP;if(!n||!n.originalValue)return t;const{originalValue:r,maskedValue:o,suffix:i,delimeter:a}=n;return`${0!==o.length?o:r} ${i?a:""} ${i}`.trim()})(e):e.representation.text,e.isEmpty)return null;const d=(({cell:e,styleService:t,isCellSelected:n,isLeftColumn:r,isIndentModeEnabled:o})=>({...MP,...AP(fF({cell:e,isLeftColumn:r,styleService:t,isIndentModeEnabled:o})),color:j_({cell:e,styleService:t,isCellSelected:n}),fontWeight:F_({cell:e,styleService:t}),fontStyle:z_({cell:e,styleService:t}),textDecoration:W_({cell:e,styleService:t}),fontFamily:t.dimensionValues.fontFamily,fontSize:t.dimensionValues.fontSize}))({cell:e,styleService:a,isCellSelected:t,isLeftColumn:n,isIndentModeEnabled:i.isIndentModeEnabled});if(e.representation.type===$A.Image&&!e.isTotal&&!e.isNull){const{labelStructure:t}=e.representation,o=n&&t&&t.suffix?cF:ej;return hi.jsx(o,{cell:e,representation:e.representation,leafCount:e.leafCount,textStyle:d,isLeftColumn:n,canExpandOrCollapse:e.ref.qCanCollapse||e.ref.qCanExpand,imageContainerHorizontalAlignment:tF(e,i,n,r)})}if(e.representation.type===$A.Link&&!o&&!e.isTotal&&!e.isNull){const t=n&&e.representation.labelStructure?dF:aF;u=hi.jsx(t,{text:e.representation.text,labelStructure:e.representation.labelStructure,href:e.representation.url,interactions:l,color:e.expressionColor.color})}return hi.jsx(pF,{shouldEnableStickyText:c,textStyle:{...d,...e.representation.type===$A.Image&&e.isNull?{alignSelf:T_(e)}:{}},children:u})},mF=({index:e,style:t,data:n})=>{const{styleService:r,layoutService:o}=UT(),{isSelected:i}=A_(),{isLeftColumn:a=!1,showLastBorder:s,itemCount:l,isLast:c,totalDividerIndex:u}=n,{isAdjustingWidth:d,setIsAdjustingWidth:p}=yj([n]),f=eF(e,n),h=a?e===l-1:c,m=a?c:e===l-1,g=BN(f,u,o.isIndentModeEnabled);if(void 0===f){const{background:n}=r.dimensionValues;return hi.jsx(GN,{style:{...t,background:n},index:e,isLastRow:h,isLastColumn:m,showLastBorder:s,isLeftColumn:a,showTotalCellDivider:g})}const v=i(f);return hi.jsxs(rF,{reactWindowStyle:t,isLeftColumn:a,isLastRow:h,isLastColumn:m,isCellSelected:v,showTotalCellDivider:g,cell:f,data:n,isAdjustingWidth:d,index:e,children:[hi.jsxs(UN,{verticalAlign:T_(f),width:YN(f.representation),right:f.isLeftColumn?void 0:4,isLeftColumn:a,children:[hi.jsx(B_,{isLeftColumn:a,isCellSelected:v,cell:f}),hi.jsx(hF,{isLeftColumn:a,isCellSelected:v,cell:f})]}),hi.jsx(wj,{cellInfo:{...f,columnWidthLocation:f.isPseudoDimension?KA.Measures:KA.Dimension},columnWidth:t.width,isLastColumn:m,setIsAdjustingWidth:p})]})};var gF=n.memo(mF,AN);const vF=({list:e,listValues:t,isLastRow:n,getRightGridColumnWidth:r})=>o=>{const i=n?e[o]:t.at(o);return i&&0===o&&i.x>0?(i.leafCount+i.x+i.distanceToNextCell)*r():!n&&i?(i.leafCount+i.distanceToNextCell)*r():r(i?.x??o)},bF=(e,t,n,r)=>{const o=Object.values(e);let i,a=o.length;return r&&(a=n,i=t/a),{itemCount:a,estimatedItemSize:i,listValues:o}},yF=(e,t)=>n=>{e.current&&(e.current[t]=n)},xF={display:"flex",height:"fit-content",borderWidth:"1px 0px 0px 0px",...LP},SF={overflow:"hidden",willChange:"auto",flexShrink:0},wF=({leftGridRef:e,width:t,height:n,columnWidths:r,showLastBorder:o})=>{const{pageInfo:i,direction:a}=WT(),{layoutService:s,styleService:{contentCellHeight:l,grid:{divider:c}}}=UT(),{qSize:u}=s.layout.qHyperCube,{gridSectionsData:{leftDimensionData:d},visibleDimensionsInfo:{visibleLeftDimensionInfo:p}}=hO();Qj(e,d),Zj(e,t,n,l);const f=i.rowsOnCurrentPage*l,h={...xF,borderColor:c,width:r.reduce((e,t)=>e+t,0)};return hi.jsx("div",{style:h,"data-section-id":"LEFT_GRID",children:d.grid.map((t,c)=>{const h=c===d.columnCount-1,m=QT(p[c]),{itemCount:g,estimatedItemSize:v,listValues:b}=bF(t,f,i.rowsOnCurrentPage,h),y=s.isIndentModeEnabled?()=>l:((e,t,n,r,o)=>i=>{const a=r?e[i]:t.at(i);if(a&&0===i&&a.pageY>0)return(a.leafCount+a.pageY+a.distanceToNextCell)*n;if(a&&a.leafCount>0){const e=a.y===o-a.leafCount;return(a.leafCount-(e?a.ref.qUp:0)+a.distanceToNextCell)*n}return n})(t,b,l,h,u.qcy);return hi.jsx(DN,{ref:yF(e,c),style:{...SF,flexGrow:h?1:0,direction:a},height:n,width:r[c],itemCount:g,itemSize:y,layout:"vertical",itemData:{list:t,isLeftColumn:!0,isLast:h,itemCount:g,showLastBorder:o,listValues:b,totalDividerIndex:d.totalDividerIndex},itemKey:fj,estimatedItemSize:v,children:gF},m)})})};var CF=y(wF);const EF={overflow:"hidden",willChange:"auto"},IF=e=>({...LP,borderWidth:"rtl"===e?"0px 1px 0px 0px":"0px 0px 0px 1px"}),DF=({topGridRef:e,rowHightCallback:t,width:n,height:r,showLastBorder:o,getRightGridColumnWidth:i})=>{const{direction:a}=WT(),{layoutService:s,styleService:{grid:{divider:l},headerCellHeight:c}}=UT(),{gridSectionsData:{headersData:u,topDimensionData:d}}=hO(),p={...IF(a),borderColor:l,height:r};Qj(e,d),Zj(e,n,r,c);const f=s.size.x*i();return 0===d.rowCount?hi.jsx("div",{style:{width:n,height:r,...IF(a)}}):hi.jsx("div",{style:p,"data-section-id":"TOP_GRID",children:d.grid.map((r,l)=>{const c=l===d.rowCount-1,{itemCount:p,estimatedItemSize:h,listValues:m}=bF(r,f,s.size.x,c),g=(({layoutService:e,headersData:t,topRowIndex:n})=>{const r=t.data.at(n);if(void 0===r)return;const o=t.size.x-1,i=Yj({layoutService:e,headersData:t,topRowIndex:n})?0:o,a=r.at(i),s=Array.isArray(a)?a.at(o):a;return s?e.getDimensionInfo(s.dimensionInfoIndex):void 0})({layoutService:s,headersData:u,topRowIndex:l}),v=g?QT(g):`empty ${l}`;return hi.jsx(DN,{ref:yF(e,l),style:EF,height:t(),width:n,itemCount:p,itemSize:vF({list:r,listValues:m,isLastRow:c,getRightGridColumnWidth:i}),layout:"horizontal",itemData:{list:r,isLast:c,itemCount:p,showLastBorder:o,listValues:m,totalDividerIndex:d.totalDividerIndex},itemKey:fj,estimatedItemSize:h,direction:a,children:gF},v)})})};var LF=y(DF);const RF=()=>hi.jsx(MF,{}),MF=()=>{const{styleService:{headerCellHeight:e,contentCellHeight:t}}=UT(),n=HO(),r=(()=>{const{model:e}=HT(),t=u(async(t,n)=>{if(!e)throw new Error("No Model provided!");const{qReverseSort:r,dimensionInfoIndex:o,sortDirection:i}=t,a=[];if(n===i)return!1;a.push({qPath:`/qHyperCubeDef/qDimensions/${o}/qDef/qReverseSort`,qOp:"Replace",qValue:(!r).toString()});try{return await e.applyPatches(a,!0),!0}catch(e){return console.error("Error while applying patch: ",e),!1}},[e]);return t})(),{gridSectionsWrapperRefs:{headerGridWrapperRef:o,topGridWrapperRef:i,leftGridWrapperRef:a,dataGridWrapperRef:s},gridRefs:{topGridRef:l,leftGridRef:c,dataGridRef:d},scrollDirectionRefs:{verticalScrollDirection:f,horizontalScrollDirection:h},scrollbarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g,resetHorizontalScrollbarHeight:v}}=VO(),{leftGridWidth:b,leftGridFullWidth:y,leftGridColumnWidths:x,rightGridFullWidth:S,showLastRightBorder:w,getRightGridColumnWidth:C,getHeaderCellsIconsVisibilityStatus:E,overrideLeftGridWidth:I}=function({tableWidth:e,verticalScrollbarWidth:t,resetHorizontalScrollbarHeight:n}){const{layoutService:r,styleService:o}=UT(),{gridSectionsData:{headersData:i}}=hO(),{measureText:a}=oq(o.header,{allowLineBreaks:!1}),s=qO({tableWidth:e}),l=TO({tableWidth:e,verticalScrollbarWidth:t,leftGridWidth:s.leftGridWidth}),c=s.leftGridWidth+l.rightGridFullWidth+1<e,d=u((e,t,n="")=>{let o=e;r.isIndentModeEnabled&&(o=1,1===i.size.x&&(o=0));const l=s.leftGridColumnWidths[o];let c=!1,u=!1,d=a(n)+vO;return t&&d+gO<=l&&(u=!0,d+=gO),d+gO<=l&&(c=!0),{shouldShowMenuIcon:c,shouldShowLockIcon:u}},[s.leftGridColumnWidths,a,r.isIndentModeEnabled,i.size.x]);return p(()=>{const e=s.leftGridWidth===s.leftGridFullWidth,t=l.rightGridWidth===l.rightGridFullWidth;e&&t&&n()},[n,s.leftGridWidth,s.leftGridFullWidth,l.rightGridWidth,l.rightGridFullWidth]),{...s,...l,showLastRightBorder:c,getHeaderCellsIconsVisibilityStatus:d}}({tableWidth:n.width,verticalScrollbarWidth:m,resetHorizontalScrollbarHeight:v}),{gridScaffoldDimensions:D,headerGridDims:L,topGridDims:R,leftGridDims:M,dataGridDims:A,metadata:{everyThingFitsInTableRectHeight:P,scrollbarsVisibilityStatus:q}}=(({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:n,leftGridOriginalWidth:r,rightGridOriginalWidth:o},scrollBarsDimensions:{verticalScrollbarWidth:i,horizontalScrollbarHeight:a}})=>{const s=HO(),{pageInfo:l}=WT(),{gridSectionsData:{headersData:c,topDimensionData:u}}=hO(),d=Math.min(s.height*bO,Math.max(s.height*bO-25,s.height-t-a)),p=s.width*bO,f=l.rowsOnCurrentPage*t,h=Math.max(c.size.y,u.rowCount,1),m=e*h,g=e*h,v=Math.min(p,n),b=s.width-p,y=Math.max(b,s.width-v),x=Math.min(d,m,g),{availableHeight:S,everyThingFitsInTableRectHeight:w,everyThingFitsInTableRectWidth:C}=((e,t,n)=>{const r=t+1+n+i<=s.width,o=e+1+f+a,l=o-s.height<a||o<=s.height;return{availableHeight:l?o:s.height,everyThingFitsInTableRectHeight:l,everyThingFitsInTableRectWidth:r}})(x,v,y),E=S-d,I=Math.max(E,S-x),D=Math.min(I,f),L=Math.min(I,f),R=m+1+f,{visibilityStatus:M,metadata:{hasLeftGridOverflowX:A,hasDataGridOverflowX:P}}=(e=>{const{gridScaffold:{X_AXIS:{leftSectionWidth:t,rightSectionWidth:n},Y_AXIS:{topSectionHeight:r,bottomSectionHeight:o}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:i,rightSectionFullWidth:a},Y_AXIS:{topSectionFullHeight:s,bottomSectionFullHeight:l}}}=e,c=s>r,u=i>t,d=a>n,p=l>o;return{visibilityStatus:{topGrid:{overflowX:"hidden",overflowY:c?"scroll":"hidden"},leftGrid:{overflowX:u?"scroll":"hidden",overflowY:"hidden"},dataGrid:{overflowX:d?"scroll":"hidden",overflowY:p?"scroll":"hidden"}},metadata:{hasTopGridOverflowY:c,hasLeftGridOverflowX:u,hasDataGridOverflowX:d,hasDataGridOverflowY:p}}})({gridScaffold:{X_AXIS:{leftSectionWidth:v,rightSectionWidth:y},Y_AXIS:{topSectionHeight:x,bottomSectionHeight:I}},gridOriginalWidth:{X_AXIS:{leftSectionFullWidth:r,rightSectionFullWidth:o},Y_AXIS:{topSectionFullHeight:g,bottomSectionFullHeight:R-g}}});return{gridScaffoldDimensions:{width:s.width,height:s.height,gridTemplateColumns:`${v}px ${y}px`,gridTemplateRows:`${x}px ${I}px`},headerGridDims:{width:-1,height:x},topGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:g},stickyWrapper:{width:y-1-i,height:-1},self:{width:Math.min(o,y)-(C?1:0)-i,height:g}},leftGridDims:{fullSizeWrapper:{width:v,height:R-g+(!A&&P?a:0)},stickyWrapper:{width:v,height:I-1-a},self:{width:v,height:Math.max(t,D-(w?0:a-1))}},dataGridDims:{fullSizeWrapper:{width:o-i+(P?i:0),height:R-g+(!P&&A?a:0)},stickyWrapper:{width:y-1-i,height:I-1-a},self:{width:Math.min(o,y)-(C?1:0)-i,height:Math.max(t,L-(w?0:a-1))}},metadata:{everyThingFitsInTableRectHeight:w,scrollbarsVisibilityStatus:M}}})({cellHeights:{headerCellHeight:e,contentCellHeight:t},horizontalWidths:{leftGridWidth:b,leftGridOriginalWidth:y,rightGridOriginalWidth:S},scrollBarsDimensions:{verticalScrollbarWidth:m,horizontalScrollbarHeight:g}}),T=u(()=>e,[e]),k=u(()=>t,[t]),{env:O}=HT(),N=kf(FT),_=O.flags.isEnabled("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return p(()=>{if(_)return N({HEADER:o.current,TOP:i.current,LEFT:a.current,DATA:s.current}),()=>{N({HEADER:null,TOP:null,LEFT:null,DATA:null})}},[_,N,o,i,a,s]),(()=>{const{downloadService:e}=UT();p(()=>{e.notifyIsDoneRendering()})})(),hi.jsxs(GO,{style:D,children:[hi.jsx("div",{style:{overflow:"hidden"},ref:o,children:hi.jsx(Jj,{tableWidth:n.width,leftGridWidth:b,columnWidths:x,getHeaderCellsIconsVisibilityStatus:E,rowHight:e,height:L.height,changeSortOrder:r,overrideLeftGridWidth:I})}),hi.jsx(KO,{style:q.topGrid,origin:JA.TopGrid,ref:i,children:hi.jsx(BO,{style:R.fullSizeWrapper,children:hi.jsx(XO,{style:R.stickyWrapper,children:hi.jsx(LF,{topGridRef:l,rowHightCallback:T,...R.self,showLastBorder:{right:w,bottom:!1},getRightGridColumnWidth:C})})})}),hi.jsx(KO,{style:q.leftGrid,origin:JA.LeftGrid,ref:a,children:hi.jsx(BO,{style:M.fullSizeWrapper,children:hi.jsx(XO,{style:M.stickyWrapper,children:hi.jsx(CF,{leftGridRef:c,...M.self,columnWidths:x,showLastBorder:{right:!1,bottom:P}})})})}),hi.jsx(KO,{style:q.dataGrid,origin:JA.DataGrid,ref:s,children:hi.jsx(BO,{style:A.fullSizeWrapper,children:hi.jsx(XO,{style:A.stickyWrapper,children:hi.jsx(vj,{dataGridRef:d,rowHightCallback:k,...A.self,showLastBorder:{right:w,bottom:P},getRightGridColumnWidth:C,verticalScrollDirection:f,horizontalScrollDirection:h})})})})]})},AF=()=>{const{keyboard:e,theme:t,interactions:n,translator:r,env:o}=HT(),{pageInfo:i,updatePageInfo:a,rect:s}=WT(),{layoutService:c}=UT(),{layout:u,hasData:d}=c,f=l(null),h=kf(FT),m=o.flags.isEnabled("VNA-639-KEYBOARD_NAV_VIRTUALIZED_PIVOT_TABLE");return p(()=>{if(m)return h({WRAPPER:f.current}),()=>{h({WRAPPER:null})}},[m,h]),hi.jsxs("div",{ref:f,children:[d?hi.jsx(RF,{}):null,hi.jsx(KT,{}),hi.jsx(TT,{paginationNeeded:i.shouldShowPagination,handleChangePage:e=>{a({page:e})},pageInfo:i,totalRowCount:i.totalRowCount,totalColumnCount:0,totalPages:i.totalPages,keyboard:e,translator:r,theme:t,interactions:n,rect:s,layout:u})]})};const PF=(e,{selections:t,baseObjects:r,coreServices:o,nebulaObjects:i},a)=>{const s=function(e){const t=Fp();return t?.components?.MuiTable?.styleOverrides&&(t.components.MuiTable.styleOverrides.root={}),ds({...t,direction:e})}(r.direction);e.render(hi.jsx(n.StrictMode,{children:hi.jsx(Lf,{store:a,children:hi.jsx(Ps,{theme:s,children:hi.jsx(BT,{...i,children:hi.jsx($T,{...r,children:hi.jsx(P_,{selections:t,children:hi.jsx(YT,{...o,children:hi.jsx(mO,{children:hi.jsx(AF,{})})})})})})})})}))};var qF=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="fontColor",e.FontStyle="fontStyle",e.Background="background",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.Border="border",e.Divider="divider",e}(qF||{}),TF=function(e){return e.Dimension="object.pivotTableV2.dimension",e.Measure="object.pivotTableV2.measure",e.Total="object.pivotTableV2.total",e.Null="object.pivotTableV2.null",e.Grid="object.pivotTableV2",e}(TF||{}),kF=function(e){return e.Grid="grid",e.Divider="grid.divider",e.LabelName="label.name",e.LabelValue="label.value",e}(kF||{}),OF=function(e){return e.FontSize="fontSize",e.FontFamily="fontFamily",e.FontColor="color",e.BackgroundColor="backgroundColor",e.LineClamp="lineClamp",e.ColumnLineClamp="columnLineClamp",e.BorderColor="borderColor",e}(OF||{});const NF=e=>e?`${parseInt(e,10)}px`:void 0,_F=(e,t)=>{if(t){const n=e.getColorPickerColor(t);return"none"===n?EP.Transparent:n}},jF=(e,t)=>+(parseInt(e,10)*pP*t+8).toFixed(2),FF=(e,t)=>void 0===e?t:e.some(e=>"bold"===e)?uP:"normal",zF=e=>e?.some(e=>"italic"===e)?"italic":"normal",WF=e=>e?.some(e=>"underline"===e)?"underline":"none",$F=document.createElement("textarea");function VF(e){$F.value=e,document.body.appendChild($F),$F.select(),$F.setSelectionRange(0,$F.value.length),document.execCommand("copy"),document.body.removeChild($F)}$F.style.position="absolute",$F.style.left="-9999px",$F.setAttribute("readonly","");function HF(e){O?.((t,n)=>{const r=n.target,o=r?.closest(`.${kD}`);o?.title&&t.addItem({translation:"contextMenu.copyCellValue",icon:"lui-icon lui-icon--copy",tid:"copy-cell-context-item",id:"copy-cell-context-item",select:()=>{(e=>{const t=e.title;t&&(navigator.clipboard?.writeText?navigator.clipboard.writeText(t).catch(()=>{VF(t)}):VF(t))})(o)}}),e?.forEach(e=>{e(t,n,o)})})}const BF=({model:e,layoutService:t,effectivePropertiesService:n,translator:r})=>GP((o,i,a)=>{if(!e||n.qAlwaysFullyExpanded)return;const s=e,l=o.addItem({translation:"Object.PivotTable.ContextMenu.ExpandCollapse",tid:"expand-collapse-group",id:"expand-collapse-group"}),{qEffectiveDimensionName:c,label:u}=((e,t)=>{const n=((e,t)=>{const n=e?.getAttribute("data-dimension-info-index");if("string"==typeof n)return t.getDimensionInfo(+n)})(e,t);return"object"==typeof n?{qEffectiveDimensionName:n.qEffectiveDimensionName,label:n.qFallbackTitle}:{qEffectiveDimensionName:void 0,label:void 0}})(a,t);l.addItem((e=>({icon:"lui-icon lui-icon--plus",translation:"Object.PivotTable.ContextMenu.ExpandAll",tid:"expand-all",select:async()=>{try{await e.expandTop(XT,0,0,!0),await e.expandLeft(XT,0,0,!0)}catch(e){console.error("Failed to expand all",e)}}}))(s)),"string"==typeof c&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o})=>({icon:"lui-icon lui-icon--plus",translation:o.get("SNPivotTable.ContextMenu.ExpandDimension",[r??""]),tid:"expand-dimension",id:"expand-dimension",select:Nj({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:Tj.Expand})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:c,label:u,translator:r})),l.addItem((e=>({icon:"lui-icon lui-icon--minus",translation:"Object.PivotTable.ContextMenu.CollapseAll",tid:"collapse-all",select:async()=>{try{await e.collapseTop(XT,0,0,!0),await e.collapseLeft(XT,0,0,!0)}catch(e){console.error("Failed to collapse all",e)}}}))(s)),"string"==typeof c&&l.addItem((({model:e,effectivePropertiesService:t,qEffectiveDimensionName:n,label:r,translator:o})=>({icon:"lui-icon lui-icon--minus",translation:o.get("SNPivotTable.ContextMenu.CollapseDimension",[r??""]),tid:"collapse-dimension",id:"collapse-dimension",select:Nj({model:e,qExpansionState:t.qExpansionState,qEffectiveDimensionName:n,action:Tj.Collapse})}))({model:s,effectivePropertiesService:n,qEffectiveDimensionName:c,label:u,translator:r}))},[e,t,n]),GF=(e,t)=>R(()=>(({layout:e})=>{const{qHyperCube:t,nullValueRepresentation:n,snapshotData:r}=e,{qNoOfLeftDims:o,qEffectiveInterColumnSortOrder:i,qMeasureInfo:a,qDimensionInfo:s}=t,l=!!r,c=r?.content?.rowsPerPage??15e3,u={x:Math.min(e.qHyperCube.qSize.qcx,dP),y:Math.min(e.qHyperCube.qSize.qcy,c)},d=i.slice(0,o),p=e=>d.some(t=>t===e),f=p(JT),h=new Map(i.map(e=>[s[e]??JT,e])),m=a.filter(e=>7005!==e.qError?.qErrorCode);return{layout:e,getNullValueText:()=>n?.text??fP,getDimensionNullValueText:()=>n?.dimensionText??fP,getMeasureInfoIndexFromCellIndex:(e,t=!1)=>{if(f)return 0;const n=e%m.length;return t?n:a.findIndex(e=>e===m[n])},getDimensionInfo:e=>e===JT?void 0:s.at(e),getDimensionInfoIndex:e=>h.get(e)??-1,size:u,isSnapshot:l,hasLimitedData:!l&&u.x<e.qHyperCube.qSize.qcx,hasData:u.x>0&&u.y>0,hasLeftDimensions:0!==e.qHyperCube.qNoOfLeftDims,hasPseudoDimOnLeft:f,leftDimensionInfoIndexes:d,isLeftDimension:p,triggerdByExpandOrCollapse:!!e.qHyperCube.qLastExpandedPos,visibleMeasureInfo:m,isIndentModeEnabled:Boolean(e.qHyperCube.qIndentMode),indentModeColumnWidth:e.qHyperCube.indentModeColumnWidth??{type:jD.Auto,pixels:_D.PixelsDefault,percentage:_D.PercentageDefault},searchSortFromDimension:"inherit"===e.search?.sorting}})({layout:e}),[e,t]),UF=({model:e,layoutService:t,viewService:n,pageInfo:r,rect:o})=>{const{layout:i,isSnapshot:a,triggerdByExpandOrCollapse:s}=t,l=(e=>{const t=YP(e);return t.current=e,t})(lO(o));return eq(async()=>{const{qHyperCube:t}=i,{maxNumberOfVisibleRows:o,maxNumberOfVisibleColumns:c}=l.current;if(a)return i.snapshotData?.content?.qPivotDataPages??[];if(void 0!==e&&"getHyperCubePivotData"in e&&(((e,t,n,r)=>!!e&&(t.gridColumnStartIndex+t.gridWidth>=r||t.gridRowStartIndex+t.gridHeight>=n))(s,n,o,c)||((e,t,n,r)=>{const{qHyperCube:{qPivotDataPages:o,qSize:i}}=e,{qTop:a,qWidth:s,qHeight:l}=o[0]?.qArea??{qTop:0,qWidth:0,qHeight:0};return a<t.page*t.rowsPerPage||s<Math.min(r,i.qcx)||l<Math.min(n,i.qcy)})(i,r,o,c))){const t=((e,t,n,r,o,i)=>{const a=r.page*r.rowsPerPage,s=Math.min(a+r.rowsPerPage,n.qcy),l=Math.min(dP,n.qcx);if(n.qcy<a)return null;let c=0,u=a;if(e){c=t.gridColumnStartIndex,u=a+t.gridRowStartIndex;const e=u+t.gridHeight,n=t.gridColumnStartIndex+t.gridWidth;e>s&&(u=Math.max(0,s-o)),n>l&&(c=Math.max(0,l-i))}return{qLeft:c,qTop:u,qWidth:Math.min(l-c,i),qHeight:Math.min(s-u,o)}})(s,n,i.qHyperCube.qSize,r,o,c);return t?e.getHyperCubePivotData(XT,cO(t)):[]}return t.qPivotDataPages},[i,a,e,n,r.page,r.rowsPerPage,l,s])},YF=({rowsPerPage:e,totalRowCount:t,page:n})=>Math.min(e,t-n*e),KF=(e,t,n=15e3)=>({rowsPerPage:n,totalPages:Math.max(1,Math.ceil(e/n)),totalRowCount:e,rowsOnCurrentPage:YF({rowsPerPage:n,totalRowCount:e,page:t})}),XF=15,JF=({layoutService:e,viewService:t,rect:n,model:r,pageInfo:o})=>{const{freeResize:i}=M();return N(async e=>{const i=e;if(!i.snapshotData||!r||i.snapshotData.content)return i;if("getHyperCubePivotData"in r){const{scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l}=t,c=((e,t,n)=>{const{gridColumnStartIndex:r,gridRowStartIndex:o,gridWidth:i,gridHeight:a}=e,s=t.page*t.rowsPerPage,l=Math.max(r-XF,0),c=Math.max(s+o-XF,s,0),u=dP-l,d=s+t.rowsOnCurrentPage-c;if((e=>0===e.gridWidth&&0===e.gridHeight)(e)){const{maxNumberOfVisibleColumns:e,maxNumberOfVisibleRows:t}=lO(n);return{qLeft:l,qTop:c,qWidth:Math.min(u,e+30),qHeight:Math.min(d,t+30)}}return{qLeft:l,qTop:c,qWidth:Math.min(u,i+30),qHeight:Math.min(d,a+30)}})(t,o,n),u=cO(c),d={qLeft:0,qTop:o.page*o.rowsPerPage,qWidth:1,qHeight:1};i.snapshotData.content={qPivotDataPages:await r.getHyperCubePivotData(XT,[d,...u]),scrollTop:e,scrollLeft:a,leftGridScrollLeft:s,topGridScrollTop:l,page:o.page,rowsPerPage:o.rowsPerPage},i.snapshotData.object.size.w=n.width,i.snapshotData.object.size.h=n.height}return i}),_(()=>({getViewState:()=>((e,t)=>({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,leftGridScrollLeft:e.leftGridScrollLeft,topGridScrollTop:e.topGridScrollTop,renderPage:t.page}))(t,o)}),[t]),e.layout.snapshotData?.content&&!i?{left:n.left,top:n.top,width:e.layout.snapshotData.object.size.w,height:e.layout.snapshotData.object.size.h}:n};var ZF={SNPivotTable_ContextMenu_CollapseDimension:{id:"SNPivotTable.ContextMenu.CollapseDimension",locale:{"de-DE":"{0} reduzieren","en-US":"Collapse {0}","es-ES":"Contraer {0}","fr-FR":"Réduire {0}","it-IT":"Comprimi {0}","ja-JP":"{0} を折りたたむ","ko-KR":"{0} 축소","nl-NL":"{0} samenvouwen","pl-PL":"Zwiń {0}","pt-BR":"Recolher {0}","ru-RU":"Свернуть {0}","sv-SE":"Dölj {0}","tr-TR":"{0} öğelerini daralt","zh-CN":"折叠 {0}","zh-TW":"收合 {0}"}},SNPivotTable_ContextMenu_ExpandDimension:{id:"SNPivotTable.ContextMenu.ExpandDimension",locale:{"de-DE":"{0} erweitern","en-US":"Expand {0}","es-ES":"Expandir {0}","fr-FR":"Développer {0}","it-IT":"Espandi {0}","ja-JP":"{0} を展開","ko-KR":"{0} 확장","nl-NL":"{0} uitvouwen","pl-PL":"Rozwiń {0}","pt-BR":"Expandir {0}","ru-RU":"Развернуть {0}","sv-SE":"Visa {0}","tr-TR":"{0} öğelerini genişlet","zh-CN":"展开 {0}","zh-TW":"展開 {0}"}},SNPivotTable_IndentMode_Rows:{id:"SNPivotTable.IndentMode.Rows",locale:{"de-DE":"Zeilen","en-US":"Rows","es-ES":"Filas","fr-FR":"Lignes","it-IT":"Righe","ja-JP":"行","ko-KR":"행","nl-NL":"Rijen","pl-PL":"Wiersze","pt-BR":"Linhas","ru-RU":"Строки","sv-SE":"Rader","tr-TR":"Satırlar","zh-CN":"行","zh-TW":"列"}},SNPivotTable_LimitedData:{id:"SNPivotTable.LimitedData",locale:{"de-DE":"* Derzeit wird eine begrenzte Anzahl Spalten angezeigt","en-US":"* Currently showing a limited number of columns","es-ES":"* Actualmente mostrando un número limitado de columnas","fr-FR":"*Affichage actuel d'un nombre limité de colonnes","it-IT":"* Attualmente visualizzato un numero limitato di colonne","ja-JP":"* 現在、限られた列の数を表示","ko-KR":"* 현재 제한된 수의 열만 표시","nl-NL":"* Op dit moment wordt slechts een beperkt aantal kolommen getoond","pl-PL":"* Obecnie wyświetlana jest ograniczona liczba kolumn","pt-BR":"* Atualmente mostrando um número limitado de colunas","ru-RU":"* В настоящее время отображается ограниченное количество столбцов","sv-SE":"* Visar för närvarande ett begränsat antal kolumner","tr-TR":"*Şu anda sınırlı sayıda sütun gösteriliyor","zh-CN":"* 当前显示的列数有限","zh-TW":"* 目前顯示有限欄數"}},SNPivotTable_NoData:{id:"SNPivotTable.NoData",locale:{"de-DE":"Das Diagramm wird nicht angezeigt, weil es keine Werte enthält.","en-US":"The chart is not displayed because it contains no values.","es-ES":"El gráfico no se muestra porque no contiene valores.","fr-FR":"Le graphique n'est pas affiché, car il ne contient aucune valeur.","it-IT":"Il grafico non è visualizzato poiché non contiene alcun valore.","ja-JP":"チャートには値が含まれていないため、チャートは表示されません。","ko-KR":"차트에 값이 없으므로 차트가 표시되지 않습니다.","nl-NL":"Het diagram wordt niet weergegeven omdat deze geen waarden bevat.","pl-PL":"Wykres nie jest wyświetlany, ponieważ nie zawiera wartości.","pt-BR":"O gráfico não foi exibido porque não contém valores.","ru-RU":"Диаграмма не отображается, так как не содержит значений.","sv-SE":"Diagrammet visas inte eftersom det inte innehåller några värden.","tr-TR":"Değer içermemesi nedeniyle grafik görüntülenmiyor.","zh-CN":"图表未显示,因为它不包含任何值。","zh-TW":"系統不會顯示圖表,因為這沒有包含任何值。"}}};const QF=()=>{const e=j(),t=e.language();return R(()=>{!function(e){const t="SNPivotTable_LimitedData";e.get(t)===t&&Object.keys(ZF).forEach(t=>{e.add(ZF[t])})}(e)},[e]),{translator:e,language:t}},ez=e=>{const t=R(()=>Ef(),[]),{flags:n}=e,r=F(),o=(e=>{const t=R(()=>sq.createRoot(e),[e]);return q(()=>()=>{t.unmount()},[t]),t})(r),i=z(),a=W(),s=$(),l=V(),c=H(),u=(()=>{const{viewState:e}=M(),t=YP(new Set),n=void 0!==window.qlikprinting,{promise:r,resolve:o}=R(()=>BP(),[]),i=GP(e=>{t.current.add(e)},[t]),a=GP(uM(async()=>{await Promise.all(t.current),t.current.clear(),o()},1e3),[o,t]);return A(async()=>{await r},[r]),R(()=>({viewState:e,isDownloadedAsPDForImage:n,notifyIsDoneRendering:a,waitForPromise:i}),[a,n,e,i])})(),d=((e,t)=>{const[n]=eq(async()=>{if(void 0!==e&&!t.snapshotData&&"getEffectiveProperties"in e)return{...await e.getEffectiveProperties()}},[e,t]);return R(()=>{const e=void 0!==n?.qHyperCubeDef.qSortbyYValue&&1===Math.abs(n.qHyperCubeDef.qSortbyYValue),t=n?.qHyperCubeDef.qDimensions.map(e=>e.qDef?.qSortCriterias)??[];return{qAlwaysFullyExpanded:n?.qHyperCubeDef.qAlwaysFullyExpanded??!1,qExpansionState:n?.qHyperCubeDef.qExpansionState,isSortedByFirstMeasure:e,getSortCriteriaForDimension:e=>t[e]}},[n])})(a,i),p=GF(i,n),f=(e=>{const t=k();return{...t,select:!!t.active&&!!t.select&&!e,active:!!t.active&&!e,scroll:!!t.active}})(p.isSnapshot),h=B(),m=QP(i,r),{translator:g,language:v}=QF(),{pageInfo:b,updatePageInfo:y}=((e,t)=>{const{size:n,layout:{qHyperCube:{qSize:r}}}=e,o=t.isDownloadedAsPDForImage||e.isSnapshot,i=(e=>e.layout.snapshotData?.content?.rowsPerPage)(e),[a,s]=P(()=>{const a=((e,t)=>t.isDownloadedAsPDForImage?t.viewState?.renderPage??0:e.isSnapshot?e.layout.snapshotData?.content?.page??0:0)(e,t);return{page:a,shouldShowPagination:r.qcy>n.y&&!o,...KF(r.qcy,a,i)}}),l=e.layout.qHyperCube.qSize.qcy;return q(()=>{s(t=>({...t,...KF(l,t.page,i),shouldShowPagination:l>e.size.y&&!o}))},[l,e.size.y,s,o,i]),q(()=>{const{page:e,totalPages:t}=a;if(e+1>t){const e=t-1,n=YF({...a,page:e});s({...a,page:e,rowsOnCurrentPage:n})}},[a]),{pageInfo:a,updatePageInfo:e=>{s({...a,...e,rowsOnCurrentPage:YF({...a,...e})})}}})(p,u),x=((e,t,n)=>R(()=>((e,t)=>{if(e.isDownloadedAsPDForImage){const{viewState:t}=e;return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.scrollTop??0,scrollLeft:t?.scrollLeft??0,leftGridScrollLeft:t?.leftGridScrollLeft??0,topGridScrollTop:t?.topGridScrollTop??0}}return{gridColumnStartIndex:0,gridRowStartIndex:0,gridWidth:0,gridHeight:0,scrollTop:t?.content?.scrollTop??0,scrollLeft:t?.content?.scrollLeft??0,leftGridScrollLeft:t?.content?.leftGridScrollLeft??0,topGridScrollTop:t?.content?.topGridScrollTop??0}})(n,t.snapshotData),[n,e.page,t.snapshotData]))(b,i,u),S=JF({rect:G(),layoutService:p,viewService:x,model:a,pageInfo:b}),[w,C]=UF({model:a,layoutService:p,viewService:x,pageInfo:b,rect:S}),E=R(()=>((e,t,n)=>{const r=n.isEnabled("VNA-670-SEPARATE_NULL_VALUE_STYLING"),o=t.layout.components?.find(e=>"theme"===e.key),i=o?.header,a=o?.dimensionValues,s=o?.measureValues,l=o?.measureLabels,c=o?.totalValues,u=o?.nullValues,d=(r?o?.dimensionNullValues:void 0)??u,p=o?.grid,f=(t,n,r)=>e.getStyle(t,n,r),h=+(p?.[qF.LineClamp]??f(TF.Grid,kF.Grid,OF.LineClamp)??1),m=+(p?.[qF.ColumnLineClamp]??f(TF.Grid,kF.Grid,OF.ColumnLineClamp)??1),g=_F(e,i?.[qF.Background])??f(TF.Dimension,kF.LabelName,OF.BackgroundColor)??EP.Transparent,v={header:{fontSize:NF(i?.[qF.FontSize])??f(TF.Dimension,kF.LabelName,OF.FontSize)??lP,fontFamily:i?.[qF.FontFamily]??f(TF.Dimension,kF.LabelName,OF.FontFamily)??cP,fontWeight:FF(i?.[qF.FontStyle],uP),fontStyle:zF(i?.[qF.FontStyle]),textDecoration:WF(i?.[qF.FontStyle]),color:_F(e,i?.[qF.FontColor])??f(TF.Dimension,kF.LabelName,OF.FontColor)??DL.TEXT,background:g,hoverBackground:xM(g,FD),activeBackground:xM(g,zD)},dimensionValues:{fontSize:NF(a?.[qF.FontSize])??f(TF.Dimension,kF.LabelValue,OF.FontSize)??lP,fontFamily:a?.[qF.FontFamily]??f(TF.Dimension,kF.LabelValue,OF.FontFamily)??cP,fontWeight:FF(a?.[qF.FontStyle],void 0),fontStyle:zF(a?.[qF.FontStyle]),textDecoration:WF(a?.[qF.FontStyle]),color:_F(e,a?.[qF.FontColor])??f(TF.Dimension,kF.LabelValue,OF.FontColor)??DL.TEXT,background:_F(e,a?.[qF.Background])??f(TF.Dimension,kF.LabelValue,OF.BackgroundColor)??EP.Transparent},measureValues:{fontSize:NF(s?.[qF.FontSize])??f(TF.Measure,kF.LabelValue,OF.FontSize)??lP,fontFamily:s?.[qF.FontFamily]??f(TF.Measure,kF.LabelValue,OF.FontFamily)??cP,fontWeight:FF(s?.[qF.FontStyle],"normal"),fontStyle:zF(s?.[qF.FontStyle]),textDecoration:WF(s?.[qF.FontStyle]),color:_F(e,s?.[qF.FontColor])??f(TF.Measure,kF.LabelValue,OF.FontColor)??EP.FontSecondary,background:_F(e,s?.[qF.Background])??f(TF.Measure,kF.LabelValue,OF.BackgroundColor)??EP.Transparent},measureLabels:{fontWeight:FF(l?.[qF.FontStyle],"normal"),fontStyle:zF(l?.[qF.FontStyle]),textDecoration:WF(l?.[qF.FontStyle]),color:_F(e,l?.[qF.FontColor])??f(TF.Measure,kF.LabelName,OF.FontColor)??EP.FontSecondary,background:_F(e,l?.[qF.Background])??f(TF.Measure,kF.LabelName,OF.BackgroundColor)??EP.Transparent},totalValues:{fontWeight:FF(c?.[qF.FontStyle],uP),fontStyle:zF(c?.[qF.FontStyle]),textDecoration:WF(c?.[qF.FontStyle]),color:_F(e,c?.[qF.FontColor])??f(TF.Total,kF.LabelValue,OF.FontColor)??DL.TEXT,background:_F(e,c?.[qF.Background])??f(TF.Total,kF.LabelValue,OF.BackgroundColor)??EP.Transparent},dimensionNull:{fontWeight:FF(d?.[qF.FontStyle],"normal"),fontStyle:zF(d?.[qF.FontStyle]),textDecoration:WF(d?.[qF.FontStyle]),color:_F(e,d?.[qF.FontColor])??f(TF.Null,kF.LabelValue,OF.FontColor)??DL.TEXT,background:_F(e,d?.[qF.Background])??f(TF.Null,kF.LabelValue,OF.BackgroundColor)??EP.NullValueBackground},nullValues:{fontWeight:FF(u?.[qF.FontStyle],"normal"),fontStyle:zF(u?.[qF.FontStyle]),textDecoration:WF(u?.[qF.FontStyle]),color:_F(e,u?.[qF.FontColor])??f(TF.Null,kF.LabelValue,OF.FontColor)??DL.TEXT,background:_F(e,u?.[qF.Background])??f(TF.Null,kF.LabelValue,OF.BackgroundColor)??EP.NullValueBackground},grid:{columnLineClamp:m,lineClamp:h,border:_F(e,p?.[qF.Border])??f(TF.Grid,kF.Grid,OF.BorderColor)??EP.DividerLight,divider:_F(e,p?.[qF.Divider])??f(TF.Grid,kF.Divider,OF.BorderColor)??EP.DividerDark,background:_F(e,p?.[qF.Background])??f(TF.Grid,kF.Grid,OF.BackgroundColor)??EP.Transparent},selectedColors:yM(e)};return v.headerCellHeight=Math.max(jF(v.header.fontSize,m),jF(v.dimensionValues.fontSize,m),32),v.contentCellHeight=Math.max(jF(v.measureValues.fontSize,h),jF(v.dimensionValues.fontSize,h),24),v.dimensionValueTextHeight=jF(v.dimensionValues.fontSize,1),v})(m,p,n),[m,p,n]),I=((e,t,n)=>{const[,r,o]=eq(async()=>{const t=rR(n.flags),r=e.getStyle("","","fontFamily"),o=e.getStyle("object","label.name","fontFamily"),i=e.getStyle("object","label.value","fontFamily"),a=e.getStyle("","","fontFamilies")??[];return Promise.all([...t,...a,r,o,i,lq].filter(e=>void 0!==e).map(async e=>{await document.fonts.load(`600 12px ${e}`),await document.fonts.load(`12px ${e}`)}))},[t,e,n]);return o?(console.warn("Failed to load fonts:",o),!0):!r})(m,i,e),{direction:D}=M();HF([BF({model:a,layoutService:p,effectivePropertiesService:d,translator:g})]),q(()=>{!C&&a&&!!w&&I&&PF(o,{selections:h,baseObjects:{rect:S,pageInfo:b,qPivotDataPages:w,updatePageInfo:y,direction:D},nebulaObjects:{env:e,app:s,model:a,embed:l,theme:m,keyboard:c,translator:g,interactions:f},coreServices:{styleService:E,viewService:x,layoutService:p,downloadService:u,effectivePropertiesService:d}},t)},[a,s,S,f,h,x,p,u,C,w,E,o,I,g,v,b,y,d,l,c,m,e,D,t])},tz={version:"7.42.0",qHyperCubeDef:{qAlwaysFullyExpanded:!1,qDimensions:[],qMeasures:[],qMode:"P",qSuppressMissing:!0,qSuppressZero:!1,qShowTotalsAbove:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:50,qHeight:50}],qIndentMode:!1},showTitles:!0,title:"",subtitle:"",footnote:"",nullValueRepresentation:{text:"-"},components:[]},nz=()=>({...tz,qHyperCubeDef:{...tz.qHyperCubeDef,qIndentMode:!1}})}}});
|