@nebula.js/stardust 3.0.0-rc.3 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v3.0.0-rc.3
2
+ * @nebula.js/stardust v3.0.0
3
3
  * Copyright (c) 2022 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -83,5 +83,5 @@ function Zn(e,t){return b(e,t)}function Xn(){return Xn=Object.assign?Object.assi
83
83
  animation-iteration-count: infinite;
84
84
  animation-delay: 200ms;
85
85
  }
86
- `),al.rippleVisible,hl,550,(({theme:e})=>e.transitions.easing.easeInOut),al.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),al.child,al.childLeaving,fl,550,(({theme:e})=>e.transitions.easing.easeInOut),al.childPulsate,ml,(({theme:e})=>e.transitions.easing.easeInOut)),bl=e.forwardRef((function(t,n){const r=Es({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a}=r,s=At(r,sl),[l,c]=e.useState([]),u=e.useRef(0),p=e.useRef(null);e.useEffect((()=>{p.current&&(p.current(),p.current=null)}),[l]);const d=e.useRef(!1),h=e.useRef(null),f=e.useRef(null),m=e.useRef(null);e.useEffect((()=>()=>{clearTimeout(h.current)}),[]);const g=e.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c((e=>[...e,jn.exports.jsx(yl,{classes:{ripple:ws(i.ripple,al.ripple),rippleVisible:ws(i.rippleVisible,al.rippleVisible),ripplePulsate:ws(i.ripplePulsate,al.ripplePulsate),child:ws(i.child,al.child),childLeaving:ws(i.childLeaving,al.childLeaving),childPulsate:ws(i.childPulsate,al.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)])),u.current+=1,p.current=a}),[i]),y=e.useCallback(((e={},t={},n)=>{const{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,p;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)p=Math.sqrt((2*l.width**2+l.height**2)/3),p%2==0&&(p+=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;p=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{g({pulsate:r,rippleX:c,rippleY:u,rippleSize:p,cb:n})},h.current=setTimeout((()=>{f.current&&(f.current(),f.current=null)}),80)):g({pulsate:r,rippleX:c,rippleY:u,rippleSize:p,cb:n})}),[o,g]),b=e.useCallback((()=>{y({},{pulsate:!0})}),[y]),v=e.useCallback(((e,t)=>{if(clearTimeout(h.current),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void(h.current=setTimeout((()=>{v(e,t)})));f.current=null,c((e=>e.length>0?e.slice(1):e)),p.current=t}),[]);return e.useImperativeHandle(n,(()=>({pulsate:b,start:y,stop:v})),[b,y,v]),jn.exports.jsx(gl,Tt({className:ws(al.root,i.root,a),ref:m},s,{children:jn.exports.jsx(Qs,{component:null,exit:!0,children:l})}))}));function vl(e){return Pr("MuiButtonBase",e)}const El=Mr("MuiButtonBase",["root","disabled","focusVisible"]),xl=["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"],Cl=Cs("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"},[`&.${El.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Sl=e.forwardRef((function(t,n){const r=Es({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:p=!1,focusRipple:d=!1,LinkComponent:h="a",onBlur:f,onClick:m,onContextMenu:g,onDragLeave:y,onFocus:b,onFocusVisible:v,onKeyDown:E,onKeyUp:x,onMouseDown:C,onMouseLeave:S,onMouseUp:w,onTouchEnd:L,onTouchMove:k,onTouchStart:O,tabIndex:R=0,TouchRippleProps:q,touchRippleRef:I,type:_}=r,T=At(r,xl),A=e.useRef(null),D=e.useRef(null),N=xr(D,I),{isFocusVisibleRef:P,onFocus:M,onBlur:j,ref:z}=Ir(),[F,B]=e.useState(!1);c&&F&&B(!1),e.useImperativeHandle(o,(()=>({focusVisible:()=>{B(!0),A.current.focus()}})),[]);const[$,U]=e.useState(!1);e.useEffect((()=>{U(!0)}),[]);const H=$&&!u&&!c;function W(e,t,n=p){return Er((r=>{t&&t(r);return!n&&D.current&&D.current[e](r),!0}))}e.useEffect((()=>{F&&d&&!u&&$&&D.current.pulsate()}),[u,d,F,$]);const V=W("start",C),G=W("stop",g),K=W("stop",y),Z=W("stop",w),X=W("stop",(e=>{F&&e.preventDefault(),S&&S(e)})),J=W("start",O),Y=W("stop",L),Q=W("stop",k),ee=W("stop",(e=>{j(e),!1===P.current&&B(!1),f&&f(e)}),!1),te=Er((e=>{A.current||(A.current=e.currentTarget),M(e),!0===P.current&&(B(!0),v&&v(e)),b&&b(e)})),ne=()=>{const e=A.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=e.useRef(!1),oe=Er((e=>{d&&!re.current&&F&&D.current&&" "===e.key&&(re.current=!0,D.current.stop(e,(()=>{D.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),E&&E(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),m&&m(e))})),ie=Er((e=>{d&&" "===e.key&&D.current&&F&&!e.defaultPrevented&&(re.current=!1,D.current.stop(e,(()=>{D.current.pulsate(e)}))),x&&x(e),m&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let ae=l;"button"===ae&&(T.href||T.to)&&(ae=h);const se={};"button"===ae?(se.type=void 0===_?"button":_,se.disabled=c):(T.href||T.to||(se.role="button"),c&&(se["aria-disabled"]=c));const le=xr(z,A),ce=xr(n,le),ue=Tt({},r,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:p,focusRipple:d,tabIndex:R,focusVisible:F}),pe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Tr({root:["root",t&&"disabled",n&&"focusVisible"]},vl,o);return n&&r&&(i.root+=` ${r}`),i})(ue);return jn.exports.jsxs(Cl,Tt({as:ae,className:ws(pe.root,s),ownerState:ue,onBlur:ee,onClick:m,onContextMenu:G,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:V,onMouseLeave:X,onMouseUp:Z,onDragLeave:K,onTouchEnd:Y,onTouchMove:Q,onTouchStart:J,ref:ce,tabIndex:c?-1:R,type:_},se,T,{children:[a,H?jn.exports.jsx(bl,Tt({ref:N,center:i},q)):null]}))})),wl=Mr("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","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Ll=e=>Tt({},"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}});Cs(Sl,{shouldForwardProp:e=>xs(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${yr(n.color)}`],t[`size${yr(n.size)}`],t[`${n.variant}Size${yr(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;return Tt({},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":Tt({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Di(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})`:Di(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})`:Di(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:(e.vars||e).palette.grey.A100,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":Tt({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${wl.focusVisible}`]:Tt({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${wl.disabled}`]:Tt({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"outlined"===t.variant&&"secondary"===t.color&&{border:`1px solid ${(e.vars||e).palette.action.disabled}`},"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 ${Di(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).palette.grey[300],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"},[`&.${wl.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${wl.disabled}`]:{boxShadow:"none"}})),Cs("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${yr(n.size)}`]]}})((({ownerState:e})=>Tt({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},Ll(e)))),Cs("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${yr(n.size)}`]]}})((({ownerState:e})=>Tt({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},Ll(e))));var kl={typography:{fontSize:14,htmlFontSize:16,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontFamily:['"Source Sans Pro"','"Segoe UI"','"Helvetica Neue"',"-apple-system","Arial","sans-serif"].join(","),button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},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)"],props:{MuiButtonBase:{disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},MuiCheckbox:{color:"secondary"},MuiRadio:{color:"secondary"},MuiTabs:{indicatorColor:"secondary"}}};const Ol="#009845",Rl="#3F8AB3",ql="#ffffff",Il="#404040",_l="#333333",Tl="#1A1A1A",Al={mode:"light",palette:{primary:{main:Il,contrastText:ql},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Il,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{active:Il,hover:"rgba(0, 0, 0, 0.03)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.05)",disabled:"rgba(0, 0, 0, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},background:{paper:ql,default:ql,lightest:ql,lighter:"#FBFBFB",darker:"#F2F2F2",darkest:"#E6E6E6"},custom:{focusBorder:Rl,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)"},selected:{main:Ol,alternative:"#E4E4E4",excluded:"#BEBEBE",mainContrastText:ql,alternativeContrastText:Il,excludedContrastText:Il},btn:{normal:"rgba(255, 255, 255, 0.6)",hover:"rgba(0, 0, 0, 0.03)",active:"rgba(0, 0, 0, 0.1)",disabled:"rgba(255, 255, 255, 0.6)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.15)"}}},Dl={mode:"dark",palette:{primary:{main:_l,contrastText:ql},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:ql,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)"},action:{active:ql,hover:"rgba(255, 255, 255, 0.05)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.03)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},divider:"rgba(0,0,0,0.3)",background:{default:"#323232",paper:"#323232",lightest:Il,lighter:_l,darker:"#262626",darkest:Tl},custom:{focusBorder:Rl,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)"},selected:{main:Ol,alternative:_l,excluded:Tl,mainContrastText:ql,alternativeContrastText:ql,excludedContrastText:ql},btn:{normal:"rgba(255, 255, 255, 0.15)",hover:"rgba(255, 255, 255, 0.25)",active:"rgba(0, 0, 0, 0.6)",disabled:"rgba(255, 255, 255, 0.15)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.30)"}}},Nl={},Pl=e=>({MuiTypography:{root:{color:e.palette.text.primary}},MuiGrid:{variants:[{props:{alignItems:"center"},style:{"align-items":"center"}}]},MuiButtonBase:{root:{borderRadius:2,border:"1px solid transparent","&:focus":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}}},MuiIconButton:{root:{padding:7,borderRadius:2,border:"1px solid transparent","&:focus":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}}},MuiOutlinedInput:{root:{backgroundColor:e.palette.custom.inputBackground,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.btn.border},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.custom.focusBorder,borderWidth:2}}},MuiButton:{outlined:{padding:"3px 11px",["&.".concat(wl.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:"1px solid ".concat(e.palette.btn.border),backgroundColor:e.palette.btn.normal,boxShadow:"none",["&.".concat(wl.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",["&.".concat(wl.disabled)]:{backgroundColor:e.palette.btn.disabled}},"&:active":{boxShadow:"none",backgroundColor:e.palette.btn.active},["&.".concat(wl.disabled)]:{backgroundColor:e.palette.btn.disabled}}},MuiAccordionSummary:{content:{margin:"8px 0"}}});function Ml(e){let t=Al,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn("Invalid theme: '".concat(e,"'")):"dark"===e&&(t=Dl));const r=JSON.stringify(t);if(Nl[r])return Nl[r];const o={palette:V(V({type:t.mode},kl.palette),t.palette),typography:V({},kl.typography),shadows:kl.shadows,props:V({},kl.props),shape:V({},kl.shape)};return Nl[r]=ys(function(e){const{defaultProps:t={},mixins:n={},overrides:r={},palette:o={},props:i={},styleOverrides:a={}}=e,s=Tt({},At(e,ma),{components:{}});Object.keys(t).forEach((e=>{const n=s.components[e]||{};n.defaultProps=t[e],s.components[e]=n})),Object.keys(i).forEach((e=>{const t=s.components[e]||{};t.defaultProps=i[e],s.components[e]=t})),Object.keys(a).forEach((e=>{const t=s.components[e]||{};t.styleOverrides=a[e],s.components[e]=t})),Object.keys(r).forEach((e=>{const t=s.components[e]||{};t.styleOverrides=r[e],s.components[e]=t})),s.spacing=oi(e.spacing);const l=ni(e.breakpoints||{}),c=s.spacing;s.mixins=Tt({gutters:(e={})=>Tt({paddingLeft:c(2),paddingRight:c(2)},e,{[l.up("sm")]:Tt({paddingLeft:c(3),paddingRight:c(3)},e[l.up("sm")])})},n);const{type:u,mode:p}=o,d=At(o,ga),h=p||u||"light";return s.palette=Tt({text:{hint:"dark"===h?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:h,type:h},d),s}(V(V({},o),{},{overrides:Pl(o)}))),Nl[r].name=n,Nl[r]}Dr.configure((e=>"njs-".concat("4db5","-").concat(e.replace("Mui",""))));var jl=t.createContext({language:null,theme:null,translator:null,constraints:{}}),zl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const n=e,r=[],o={get:e=>n[e],set:(e,r)=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));return n[e]=r,t({type:"SET",value:r}),r},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));n[e]=null},dispatch:e=>{r.forEach((t=>t(e?{}:n)))}},s=()=>{const[,e]=i(n);return a((()=>(r.push(e),()=>{const t=r.indexOf(e);r.splice(t,1)})),[e]),[o]};return[s,o]};const[Fl,Bl]=zl({}),[$l,Ul]=zl({}),[Hl,Wl]=zl({}),[Vl,Gl]=zl({}),[Kl,Zl]=zl({}),[,Xl]=zl({}),Jl=e=>{let{type:t,value:n}=e;const r=Xl.get(n.id);Xl.set(n.id,{});const o=()=>{Ul.clear(n.id),Zl.set(n.id,{}),Zl.dispatch(!0)},i=()=>{n.removeListener("changed",o),Bl.clear(n.id),Ul.clear(n.id),Wl.clear(n.id),Gl.clear(n.id),Zl.clear(n.id),Xl.clear(n.id)};if("SET"===t)r||(n.on("changed",o),n.once("closed",(()=>{i()})));return i},[Yl,Ql]=zl({},Jl),ec=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=V(V({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:V({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=V(V({},e),{},{invalid:!0,valid:!1,validating:!1,canCancel:!1,canRetry:!0,rpcRetry:!1});break;default:throw new Error("Undefined action")}let a=n.get(r);return a||(a={}),a[o]=i,n.set(r,a),i};function tc(e,t){const n=e?"".concat(e.id):null,[r]=Fl(),[o,i]=s(ec,n?r.get(n):null),[l]=Kl(),[c]=$l();let u;n&&(u=c.get(n),u||(u={},c.set(n,u)));const p=async o=>{let a=u[t];if(!a||a&&a.rpcRetry){a={rpc:e[t](),rpcRetry:!1},u[t]=a,i({type:"INVALID",method:t,key:n,model:e,rpcResultStore:r,canCancel:!0})}try{const o=await a.rpc;i({type:"VALID",result:o,key:n,method:t,model:e,rpcResultStore:r})}catch(e){15!==e.code||o||(a.rpcRetry||(a.rpcRetry=!0),p(!0))}},d={cancel:async()=>{const o=e.session.getObjectApi({handle:-1});await o.cancelRequest(u[t].rpc.requestId),i({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:r})},retry:()=>{u[t].rpcRetry=!0,p()}};return a((()=>{e&&p()}),[e,l.get(e&&e.id),n,t]),[o&&o.result,{validating:o&&o.validating,canCancel:o&&o.canCancel,canRetry:o&&o.canRetry},d]}function nc(e){return tc(e,"getLayout")}function rc(e){return tc(e,"getAppLayout")}function oc(e,t){const n=t?"".concat(t.id,"/").concat(JSON.stringify(e)):null,[r]=Yl(),[o]=Hl(),[s,l]=i();let c;n&&(c=o.get(n));for(var u=arguments.length,p=new Array(u>2?u-2:0),d=2;d<u;d++)p[d-2]=arguments[d];return a((()=>{if(!t)return;(async()=>{if(!c){const r=t.createSessionObject(e);c=r,o.set(n,c)}const i=await c;r.set(n,i),l(i)})()}),[t,...p]),[s]}const ic={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function ac(e){return oc(ic,e)}function sc(e){const[t]=ac(e),[n]=nc(t),[r]=rc(e),[o,s]=i(null);return a((()=>{r&&t&&n&&((e,t,n)=>{const r=[...n.qStateNames||[]].map((e=>({stateName:e,qSelectionObjectDef:{qStateName:e}})));(t&&t.alternateStates?t.alternateStates.map((e=>e.stateName)):[]).join("::")!==(n.qStateNames||[]).map((e=>e)).join("::")&&e.applyPatches([{qOp:"replace",qPath:"/alternateStates",qValue:JSON.stringify(r)}],!0)})(t,n,r)}),[r,t,n]),a((()=>{if(!n)return;let e=!1,t=!1,r=!1;[n,...n.alternateStates||[]].forEach((n=>{e=e||n.qSelectionObject&&n.qSelectionObject.qBackCount>0,t=t||n.qSelectionObject&&n.qSelectionObject.qForwardCount>0,r=r||(n.qSelectionObject&&n.qSelectionObject.qSelections||[]).filter((e=>!0!==e.qLocked)).length>0})),s({canGoBack:e,canGoForward:t,canClear:r})}),[n]),[o,t,n]}const[lc,cc]=zl({}),[uc,pc]=zl({}),[dc,hc]=zl({}),[fc,mc]=zl({});function gc(e){if(!e.session)return[];const[t,n,r]=sc(e),[o]=lc(),i=e?e.id:null;let s=o.get(i);return a((()=>{e&&n&&r&&t&&!s&&(s=function(e){let{app:t,currentSelectionsLayout:n,navState:r}=e;const o="".concat(t.id),i=async function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=mc.get(o);t&&(await t.endSelections(e),mc.clear(o),hc.get(t.id).emit("deactivated"))},a={begin:async function(e,n){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e===mc.get(o))return;i(r),mc.set(o,e);const a=Array.isArray(n)?n:[n],s=async n=>{try{await e.beginSelections(a),mc.set(o,e)}catch(e){6003!==e.code||n?mc.clear(o):(await t.abortModal(r),s(!0))}};await s()},end:i};pc.set(o,a);const s={model:t,isInModal:()=>!!mc.get(o),isModal:e=>e?mc.get(o)===e:!!mc.get(o),canGoForward:()=>r.canGoForward,canGoBack:()=>r.canGoBack,canClear:()=>r.canClear,layout:()=>n,forward:()=>a.end().then((()=>t.forward())),back:()=>a.end().then((()=>t.back())),clear:()=>a.end().then((()=>t.clearAll())),clearField(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$";return a.end().then((()=>t.getField(e,n).then((e=>e.clear()))))}};return s}({app:e,currentSelectionsLayout:r,navState:t}),o.set(i,s),o.dispatch(!0))}),[e,n,r,t]),[s,t]}const yc=l(((e,n)=>{let{initialContext:r,app:o}=e;const[a]=gc(o),[s,l]=i(r),[p,d]=i(),{theme:h}=c((()=>({theme:Ml(p)})),[p]),[f,m]=i([]);return u(n,(()=>({addComponent(e){m([...f,e])},removeComponent(e){const t=f.indexOf(e);-1!==t&&(f.splice(t,1),m([...f]))},setMuiThemeName:d,setContext:l,getAppSelections:()=>a}))),t.createElement(Kn,{injectFirst:!0},t.createElement(zi,{theme:h},t.createElement(jl.Provider,{value:s},f)))}));function bc(e){let n,{app:r,context:o}=e;const i=new Promise((e=>{n=e})),a=t.createRef(),s=document.createElement("div");s.style.display="none",s.setAttribute("data-nebulajs-version","3.0.0-rc.3"),s.setAttribute("data-app-id",r.id),document.body.appendChild(s),y.render(t.createElement(yc,{ref:a,app:r,initialContext:o}),s,n);const l={};return[{toggleFocusOfCells(e){Object.keys(l).forEach((t=>{l[t].current.toggleFocus(t===e)}))},cells:l,addCell(e,t){l[e]=t},add(e){(async()=>{await i,a.current.addComponent(e)})()},remove(e){(async()=>{await i,a.current.removeComponent(e)})()},setMuiThemeName(e){(async()=>{await i,a.current.setMuiThemeName(e)})()},context(e){(async()=>{await i,a.current.setContext(e)})()},getAppSelections:async()=>(await i,a.current.getAppSelections())},a,i]}function vc(){const[e,t]=i(),[n,r]=i(),o=p((e=>{e&&t(e)}),[]),a=()=>{const{left:t,top:n,width:o,height:i}=e.getBoundingClientRect();r({left:t,top:n,width:o,height:i})};return d((()=>{if(e){if("function"==typeof ResizeObserver){let t=new ResizeObserver(a);return t.observe(e),()=>{t.unobserve(e),t.disconnect(e),t=null}}return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}}}),[e]),[o,n,e]}function Ec(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function xc(e){let{size:n,style:r={},viewBox:o="0 0 16 16",shapes:i=[]}=e;const a=V({fontSize:Ec(n),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},r);return t.createElement("i",{style:a},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:o,fill:"currentColor"},i.map(((e,n)=>{let{type:r,attrs:o}=e;return t.createElement(r,K({key:n},o))}))))}var Cc=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M9.41421356,8 L11.8890873,5.52512627 C12.065864,5.34834957 12.0305087,4.95944084 11.8183766,4.74730881 L11.2526912,4.18162338 C11.0405592,3.96949135 10.6516504,3.93413601 10.4748737,4.1109127 L8,6.58578644 L5.52512627,4.1109127 C5.34834957,3.93413601 4.95944084,3.96949135 4.74730881,4.18162338 L4.25233406,4.67659813 C3.96949135,4.95944084 3.93413601,5.34834957 4.1109127,5.52512627 L6.58578644,8 L4.1109127,10.4748737 C3.93413601,10.6516504 3.96949135,11.0405592 4.18162338,11.2526912 L4.67659813,11.7476659 C4.95944084,12.0305087 5.34834957,12.065864 5.52512627,11.8890873 L8,9.41421356 L10.4748737,11.8890873 C10.6516504,12.065864 11.0405592,12.0305087 11.2526912,11.8183766 L11.8183766,11.2526912 C12.0305087,11.0405592 12.065864,10.6516504 11.8890873,10.4748737 L9.41421356,8 Z M8,0 C12.4,0 16,3.6 16,8 C16,12.4 12.4,16 8,16 C3.6,16 0,12.4 0,8 C0,3.6 3.6,0 8,0 Z"}}]}))(e));var Sc=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"}}]}))(e));var wc=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M2.5,7 L11,7 C11.5522847,7 12,7.44771525 12,8 L12,15 C12,15.5522847 11.5522847,16 11,16 L1,16 C0.44771525,16 0,15.5522847 0,15 L0,8 C0,7.44771525 0.44771525,7 1,7 L1,4.98151367 C1,2.23029964 3.23857625,0 6,0 C8.4241995,0 10.4454541,1.71883353 10.9029715,4 L9.34209114,4 C8.9671727,2.54028848 7.9088888,1.5 6,1.5 C3.54860291,1.5 2.5,3.21561511 2.5,5.33193359 L2.5,7 Z"}}]}))(e)),Lc=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function kc(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||Lc(r)&&Lc(o)))return!1;var r,o;return!0}function Oc(e,t){var n;void 0===t&&(t=kc);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 Rc="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function qc(e){cancelAnimationFrame(e.id)}var Ic=null;function _c(e){if(void 0===e&&(e=!1),null===Ic||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?Ic="positive-descending":(t.scrollLeft=1,Ic=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Ic}return Ic}var Tc=function(e,t){return e};function Ac(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Vs(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Vs(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Oc((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=Oc((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var p=n(r.props,e,r._instanceProps),d=o(r.props,e,r._instanceProps),h="horizontal"===a||"horizontal"===l,f="rtl"===a,m=h?p:0;u[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:h?0:p,height:h?"100%":d,width:h?d:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=Oc((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(_c()){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<o?"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(){var e,t,n,o;null!==r._resetIsScrollingTimeoutId&&qc(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=(e=r._resetIsScrolling,t=150,n=Rc(),o={id:requestAnimationFrame((function r(){Rc()-n>=t?e.call(null):o.id=requestAnimationFrame(r)}))},o)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}Ds(t,e),t.getDerivedStateFromProps=function(e,t){return Dc(e,t),u(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.itemCount,r=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1)),this.scrollTo(i(this.props,e,t,r,this._instanceProps))},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(_c()){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&&qc(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,p=e.itemKey,d=void 0===p?Tc:p,f=e.layout,m=e.outerElementType,g=e.outerTagName,y=e.style,b=e.useIsScrolling,v=e.width,E=this.state.isScrolling,x="horizontal"===o||"horizontal"===f,C=x?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),w=S[0],L=S[1],k=[];if(c>0)for(var O=w;O<=L;O++)k.push(h(t,{data:u,key:d(O,u),index:O,isScrolling:b?E:void 0,style:this._getItemStyle(O)}));var R=r(this.props,this._instanceProps);return h(m||g||"div",{className:n,onScroll:C,ref:this._outerRefSetter,style:_s({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},h(s||l||"div",{children:k,ref:a,style:{height:x?"100%":R,pointerEvents:E?"none":void 0,width:x?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,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),p=o&&"backward"!==i?1:Math.max(1,n),d=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-p),Math.max(0,Math.min(t-1,u+d)),c,u]},t}(f),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Dc=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Nc=Ac({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r){var o=e.direction,i=e.height,a=e.itemCount,s=e.itemSize,l=e.layout,c=e.width,u="horizontal"===o||"horizontal"===l?c:i,p=Math.max(0,a*s-u),d=Math.min(p,t*s),h=Math.max(0,t*s-u+s);switch("smart"===n&&(n=r>=h-u&&r<=d+u?"auto":"center"),n){case"start":return d;case"end":return h;case"center":var f=Math.round(h+(d-h)/2);return f<Math.ceil(u/2)?0:f>p+Math.floor(u/2)?p:f;default:return r>=h&&r<=d?r:r<h?h:d}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,o=e.height,i=e.itemCount,a=e.itemSize,s=e.layout,l=e.width,c=t*a,u="horizontal"===r||"horizontal"===s?l:o,p=Math.ceil((u+n-c)/a);return Math.max(0,Math.min(i-1,t+p-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});var Pc=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Mc=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),jc=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},zc=function(e){function t(){var e,n,r;Pc(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=jc(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(e){var t=e.visibleStartIndex,n=e.visibleStopIndex;r._lastRenderedStartIndex=t,r._lastRenderedStopIndex=n,r._ensureRowsLoaded(t,n)},r._setRef=function(e){r._listRef=e},jc(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,f),Mc(t,[{key:"resetloadMoreItemsCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,o=n.itemCount,i=n.minimumBatchSize,a=void 0===i?10:i,s=n.threshold,l=void 0===s?15:s,c=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,i=e.stopIndex,a=[],s=null,l=null,c=o;c<=i;c++)t(c)?null!==l&&(a.push(s,l),s=l=null):(l=c,null===s&&(s=c));if(null!==l){for(var u=Math.min(Math.max(l,s+r-1),n-1),p=l+1;p<=u&&!t(p);p++)l=p;a.push(s,l)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var d=a[0]-1;if(t(d))break;a[0]=d}return a}({isItemLoaded:r,itemCount:o,minimumBatchSize:a,startIndex:Math.max(0,e-l),stopIndex:Math.min(o-1,t+l)});(this._memoizedUnloadedRanges.length!==c.length||this._memoizedUnloadedRanges.some((function(e,t){return c[t]!==e})))&&(this._memoizedUnloadedRanges=c,this._loadUnloadedRanges(c))}},{key:"_loadUnloadedRanges",value:function(e){for(var t=this,n=this.props.loadMoreItems||this.props.loadMoreRows,r=function(r){var o=e[r],i=e[r+1],a=n(o,i);null!=a&&a.then((function(){if(function(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,o=e.stopIndex;return!(r>n||o<t)}({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:o,stopIndex:i})){if(null==t._listRef)return;"function"==typeof t._listRef.resetAfterIndex?t._listRef.resetAfterIndex(o,!0):("function"==typeof t._listRef._getItemStyleCache&&t._listRef._getItemStyleCache(-1),t._listRef.forceUpdate())}}))},o=0;o<e.length;o+=2)r(o)}}]),t}();const Fc=["S","XS"],Bc=e=>e.reduce(((e,t)=>e.concat(t)));function $c(e){return Fc.includes(e)}function Uc(e){return Array.isArray(e)?Array.from(new Set(e)):void 0}async function Hc(e){let{selections:t,elemNumbers:n,isSingleSelect:r=!1}=e,o=Promise.resolve(!1);if(!n.some((e=>Number.isNaN(e)))){const e=n;o=t.select({method:"selectListObjectValues",params:["/qListObjectDef",e,!r]}).then((e=>!1!==e)).catch((()=>!1))}return o}function Wc(e,t){if(!e)return[];if(e.length<=1)return e;const{min:n,max:r}=function(e,t){let n=1/0,r=-1/0;return e.forEach((e=>{const o=t.indexOf(e);n=o<n?o:n,r=o>r?o:r})),{min:n,max:r}}(e,t);return t.slice(n,r+1)}function Vc(e){let{layout:t,selections:n,pages:r=[],checkboxes:o=!1,selectDisabled:s,doc:l=document,isSingleSelect:c=!1}=e;const[u,d]=i(r),[h,f]=i(!1),[m,g]=i(!1),[y,b]=i(c),[v,E]=i([]),[x,C]=i(!1),[S,w]=i([]),L=function(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[{qElemNumber:t}]=e;return t}));return t}));return Bc(t)}(r);a((()=>{b(c)}),[c]);const k=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(s())return;g(!0);const r=t?e.filter((e=>!v.includes(e))):e;await Hc({selections:n,elemNumbers:r,isSingleSelect:y}),g(!1),w([])},O=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s()||w((n=>{const r=Uc([...n,...e]),o=t?r.filter((e=>!v.includes(e))):r;return t?Wc(r,L):o}))},R=e=>{(e.ctrlKey||e.metaKey)&&(b(!0),e.currentTarget.focus(),e.preventDefault())},q=p((e=>{if(m||s())return;const t=+e.currentTarget.getAttribute("data-n");w([t]),R(e)}),[m,s]),I=p((e=>{if(m||s())return;C(!1),f(!0);const t=+e.currentTarget.getAttribute("data-n");w([t]),R(e)}),[m,s]),_=p((e=>{const t=+e.currentTarget.getAttribute("data-n");y||!h||m||1===S.length&&S[0]===t||O([t])}),[h,m,S,v,x,s]),T=p((()=>{f(!1),g(!1),C(!1),b(c)}),[c]),A=p((e=>{if(y||!h||m||s())return;C(!0);const t=+e.currentTarget.getAttribute("data-n");O([t],!0)}),[h,m,x,S,v,s,t&&t.qListObject.qDimensionInfo.qIsOneAndOnlyOne]);a((()=>{const e=!h;S&&S.length&&!m&&e&&t&&k(S,x)}),[S,h,s()]),a((()=>(l.addEventListener("mouseup",T),()=>{l.removeEventListener("mouseup",T)})),[T]),a((()=>{if(m||h)return;const e=function(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[t]=e;return!!$c(t.qState)&&t.qElemNumber}));return t.filter((e=>!1!==e))}));return Bc(t)}(r);E(e)}),[r]),a((()=>{if(m||!r||!o&&!h)return;const e=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e=>t.length<=1&&$c(e)?"A":"S",o=e.map((e=>{const o=e.qMatrix.map((e=>{const[o]=e,i=t.includes(o.qElemNumber);let a;return a=n?i?"S":"A":i?r(o.qState):o.qState,[V(V({},o),{},{qState:a}),e.slice(1)]}));return V(V({},e),{},{qMatrix:o})}));return o}(r,S,y);d(e)}),[S]);const D={};return o?Object.assign(D,{onClick:q}):Object.assign(D,{onMouseUp:_,onMouseDown:I,onMouseEnter:A}),{instantPages:u,interactionEvents:D,select:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];C(!1),f(!0),O(e,t||x);const n=k(e,t||x);return f(!1),n}}}const Gc=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var Kc=e=>xc(Gc(e));const Zc="ListBoxCheckbox",Xc={cbIcon:"".concat(Zc,"-cbIcon"),cbIconChecked:"".concat(Zc,"-cbIconChecked"),cbIconExcluded:"".concat(Zc,"-cbIconExcluded"),cbIconAlternative:"".concat(Zc,"-cbIconAlternative"),checkbox:"".concat(Zc,"-checkbox"),dense:"".concat(Zc,"-dense")},Jc=Cs(S)((e=>{let{theme:t}=e;return{["& .".concat(Xc.cbIcon)]:{borderRadius:3,width:16,height:16,boxShadow:"inset 0 0 0 1px rgba(16,22,26,.2), inset 0 -1px 0 rgba(16,22,26,.1)",backgroundColor:"#f5f8fa",backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))",display:"flex",alignItems:"center",justifyContent:"center"},["& .".concat(Xc.cbIconChecked)]:{borderRadius:3,backgroundColor:t.palette.selected.main,backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))","&:before":{display:"block",width:16,height:16,backgroundImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\")",content:'""'}},["& .".concat(Xc.cbIconExcluded)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.excluded},["& .".concat(Xc.cbIconAlternative)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.alternative},["&.".concat(Xc.checkbox)]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},["&.".concat(Xc.dense)]:{padding:"4px 8px"}}})),Yc=function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.createElement("span",{className:e.cbIcon},r&&t.createElement("span",{className:n&&r?e.cbIconExcluded:""}))};function Qc(e){let{checked:n,label:r,dense:o,excluded:i,showGray:a=!0}=e;return t.createElement(Jc,{edge:"start",checked:n,disableRipple:!0,className:[Xc.checkbox,o&&Xc.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":r},name:r,icon:Yc(Xc,a,i),checkedIcon:t.createElement("span",{className:Xc.cbIconChecked})})}const eu={denseRadioButton:"".concat("ListBoxRadioButton","-denseRadioButton"),radioButton:"".concat("ListBoxRadioButton","-radioButton")},tu=Cs(w)((()=>({["&.".concat(eu.radioButton)]:{right:"5px"}})));function nu(e){let{checked:n,label:r,dense:o}=e;return t.createElement(tu,{checked:n,value:r,name:r,className:eu.radioButton,style:{backgroundColor:"transparent"},disableRipple:!0,size:o?"small":"medium",sx:o&&{padding:"0px 0px 0px 12px"}})}const ru=Object.freeze({ENTER:13,ESCAPE:27,SPACE:32,TAB:9,BACKSPACE:8,DELETE:46,ALT:18,CTRL:17,SHIFT:16,ARROW_UP:38,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,PAGE_DOWN:34,PAGE_UP:33,HOME:36,END:35,F10:121,A:65,F:70,ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,SUBTRACTION:189,DECIMAL:190,NUMPAD_DECIMAL:110,isArrow:e=>e===ru.ARROW_UP||e===ru.ARROW_DOWN||e===ru.ARROW_LEFT||e===ru.ARROW_RIGHT});function ou(e){let{setKeyboardActive:t}=e;return e=>{const{keyCode:n}=e.nativeEvent;switch(n){case ru.ENTER:case ru.SPACE:(e=>{const n=e.querySelector(".search input, .value.selector, .value");t(!0),n&&n.focus()})(e.currentTarget);break;case ru.ESCAPE:r=e.currentTarget,t(!1),r.focus();break;default:return}var r;e.preventDefault()}}const iu="RowColumn",au={row:"".concat(iu,"-row"),rowBorderBottom:"".concat(iu,"-rowBorderBottom"),column:"".concat(iu,"-column"),fieldRoot:"".concat(iu,"-fieldRoot"),cell:"".concat(iu,"-cell"),labelText:"".concat(iu,"-labelText"),labelDense:"".concat(iu,"-labelDense"),highlighted:"".concat(iu,"-highlighted"),checkboxLabel:"".concat(iu,"-checkboxLabel"),icon:"".concat(iu,"-icon"),S:"".concat(iu,"-S"),XS:"".concat(iu,"-XS"),A:"".concat(iu,"-A"),X:"".concat(iu,"-X"),frequencyCount:"".concat(iu,"-frequencyCount"),barContainer:"".concat(iu,"-barContainer"),bar:"".concat(iu,"-bar"),barSelected:"".concat(iu,"-barSelected"),barWithCheckbox:"".concat(iu,"-barWithCheckbox"),barSelectedWithCheckbox:"".concat(iu,"-barSelectedWithCheckbox"),excludedTextWithCheckbox:"".concat(iu,"-excludedTextWithCheckbox")},su={width:"100%",overflow:"hidden",textOverflow:"ellipsis"},lu=e=>{let{theme:t}=e;return{background:t.palette.selected.main,color:t.palette.selected.mainContrastText,"&:focus":{boxShadow:"inset 0 0 0 2px rgba(0, 0, 0, 0.3)",outline:"none"},"& $cell":{paddingRight:0}}},cu=Cs("div")((e=>{let{theme:t}=e;return{["& .".concat(au.row)]:{flexWrap:"nowrap",color:t.palette.text.primary},["& .".concat(au.rowBorderBottom)]:{borderBottom:"1px solid ".concat(t.palette.divider)},["& .".concat(au.column)]:{flexWrap:"nowrap",borderRight:"1px solid ".concat(t.palette.divider),color:t.palette.text.primary},["& .".concat(au.fieldRoot)]:{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"}},["& .".concat(au.cell)]:{display:"flex",alignItems:"center",minWidth:0,flexGrow:1,paddingLeft:"9px",paddingRight:"9px"},["& .".concat(au.labelText)]:V({flexBasis:"max-content",lineHeight:"16px",userSelect:"none",whiteSpace:"pre"},su),["& .".concat(au.labelDense)]:{fontSize:12},["& .".concat(au.highlighted)]:{overflow:"visible",width:"100%","& > span":{width:"100%",backgroundColor:"#FFC72A"}},["& .".concat(au.checkboxLabel)]:{margin:0,width:"100%",height:"100%","& > span:nth-child(1)":{paddingRight:"8px"},"& > span:nth-child(2)":V(V({},su),{},{display:"flex",alignItems:"center",paddingLeft:0})},["& .".concat(au.icon)]:{display:"flex",padding:t.spacing(1,1,1,0)},["& .".concat(au.S)]:V({},lu({theme:t})),["& .".concat(au.XS)]:V(V({},lu({theme:t})),{},{background:t.palette.selected.excluded,color:t.palette.selected.mainContrastText}),["& .".concat(au.A)]:{background:t.palette.selected.alternative,color:t.palette.selected.alternativeContrastText},["& .".concat(au.X)]:{background:t.palette.selected.excluded,color:t.palette.selected.excludedContrastText},["& .".concat(au.frequencyCount)]:{paddingLeft:"8px",paddingRight:"8px"},["&.".concat(au.barContainer)]:{height:"100%",display:"inline-block"},["& .".concat(au.bar)]:{border:"".concat(1,"px solid"),borderColor:"#D9D9D9",height:"16px",position:"absolute",zIndex:"-1",alignSelf:"center",left:"".concat(4,"px"),transition:"width 0.2s",backgroundColor:"#FAFAFA"},["& .".concat(au.barSelected)]:{opacity:"30%",zIndex:"0",background:t.palette.background.lighter},["& .".concat(au.barWithCheckbox)]:{left:"".concat(29,"px")},["& .".concat(au.barSelectedWithCheckbox)]:{background:"#BFE5D0",borderColor:"#BFE5D0"},["& .".concat(au.excludedTextWithCheckbox)]:{color:"#828282",fontStyle:"italic"}}}));function uu(e){let{index:n,style:r,data:o}=e;const{onClick:s,onMouseDown:l,onMouseUp:c,onMouseEnter:u,pages:d,isLocked:h,column:f=!1,checkboxes:m=!1,dense:g=!1,frequencyMode:y="N",isSingleSelect:b,actions:v,frequencyMax:E="",histogram:x=!1,keyboard:C,showGray:S=!0}=o,w=p(function(e){let{select:t,confirm:n,cancel:r}=e;const o=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e&&e.parentElement[t?"nextElementSibling":"previousElementSibling"];return n&&n.querySelector("[role]")};let i=!1;const a=e=>{i=e};return e=>{let s;const{keyCode:l,shiftKey:c=!1}=e.nativeEvent;switch(l){case ru.SHIFT:a(!0);break;case ru.SPACE:t([+e.currentTarget.getAttribute("data-n")]);break;case ru.ARROW_DOWN:case ru.ARROW_RIGHT:s=o(e.currentTarget,!0),c&&s&&(i&&(t([+e.currentTarget.getAttribute("data-n")],!0),a(!1)),t([+s.getAttribute("data-n")],!0));break;case ru.ARROW_UP:case ru.ARROW_LEFT:s=o(e.currentTarget,!1),c&&s&&(i&&(t([+e.currentTarget.getAttribute("data-n")],!0),a(!1)),t([+s.getAttribute("data-n")],!0));break;case ru.ENTER:n();break;case ru.ESCAPE:return void r();default:return}s&&s.focus(),e.preventDefault(),e.stopPropagation()}}(v),[v]),[R,q]=i(!1),[I,_]=i(),[T,A]=i([]);a((()=>{if(!d)return;let e;const t=d.filter((e=>e.qArea.qTop<=n&&n<e.qArea.qTop+e.qArea.qHeight))[0];if(t){const r=t.qArea;n>=r.qTop&&n<r.qTop+r.qHeight&&([e]=t.qMatrix[n-r.qTop])}_(e)}),[d]);const D=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,N=e=>e?"A"===e.qState:null;a((()=>{if(!I)return;const e="S"===I.qState||"XS"===I.qState||"L"===I.qState;q(e);const t=[f?au.column:au.row];x&&g||t.push(au.rowBorderBottom),m||("XS"===I.qState?t.push(S?au.XS:au.S):"S"===I.qState||"L"===I.qState?t.push(au.S):S&&N(I)?t.push(au.A):S&&D(I)&&t.push(au.X)),A(t)}),[I&&I.qState]);const P=e=>e.filter((e=>!!e)).join(" ").trim(),M=()=>(N(I)||D(I))&&m,j=e=>{let{lbl:n,ix:r,color:o,highlighted:i=!1}=e;return t.createElement(k,{component:"span",variant:"body2",key:r,className:P([au.labelText,i&&au.highlighted,g&&au.labelDense,S&&M()&&au.excludedTextWithCheckbox]),color:o},t.createElement("span",{style:{whiteSpace:"pre"}},n))},z=e=>{let{lbl:n,color:r,qElemNumber:o}=e;const i=t.createElement(Qc,{label:n,checked:R,dense:g,excluded:D(I),showGray:S}),a=t.createElement(nu,{label:n,checked:R,dense:g}),s="string"==typeof n?j({lbl:n,color:r,highlighted:!1}):n;return t.createElement(O,{color:r,control:b?a:i,className:au.checkboxLabel,label:s,key:o})},F=I?I.qText:"",B=()=>I?I.qFrequency?I.qFrequency:"0":"",$=I&&I.qHighlightRanges&&I.qHighlightRanges.qRanges.sort(((e,t)=>e.qCharPos-t.qCharPos))||[],U=function(e,t){if(!t.length)return[];const n=t.reduce(((n,r,o)=>{const i=0===o?0:t[o-1].qCharPos+t[o-1].qCharCount;n.push(...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const{qCharPos:r,qCharCount:o}=t,i=[];return r>n&&i.push([e.slice(n,r),!1]),i.push([e.slice(r,r+o),!0]),i}(e,r,i));const a=o===t.length-1,s=t[o].qCharPos+t[o].qCharCount;return a&&s<e.length&&n.push([e.slice(s),!1]),n}),[]);return n}(F,$),H=m?z:j,W={alignItems:"center",display:"flex"},V=R&&h,G=!m&&R&&!h,K={display:"flex",alignItems:"center",minWidth:0,flexGrow:1,padding:m?0:void 0},Z=0===n;return t.createElement(cu,{className:au.barContainer},t.createElement(L,{container:!0,gap:0,className:P(["value",...T]),classes:{root:au.fieldRoot},style:r,onClick:s,onMouseDown:l,onMouseUp:c,onMouseEnter:u,onKeyDown:w,onContextMenu:e=>{m&&s(e),e.preventDefault()},role:f?"column":"row",tabIndex:!Z||C.enabled&&!C.active?-1:0,"data-n":I&&I.qElemNumber},I&&x&&"0"!==B()&&t.createElement("div",{className:P([au.bar,m&&au.barWithCheckbox,R&&(m?au.barSelectedWithCheckbox:au.barSelected)]),style:{width:(e=>{const t=String(e),n="%"===t.substring(t.length-1),r=parseFloat(n?t:e),o=m?"(".concat(29,"px + ").concat(6,"px)"):"".concat(10,"px");return"calc(".concat(n?r:r/E*100,"% - ").concat(o,")")})(I.qFrequency)}}),t.createElement(L,{item:!0,style:K,className:P([au.cell,au.selectedCell]),title:"".concat(F)},0===$.length?H({lbl:F,color:"inherit"}):(e=>{let{lbls:t}=e;const n=t.map(((e,t)=>{let[n,r]=e;return j({ix:t,highlighted:r,lbl:n})}));return m?z({lbl:n}):n})({lbls:U})),"N"!==y&&t.createElement(L,{item:!0,style:{display:"flex",alignItems:"center"},className:au.frequencyCount},t.createElement(k,{noWrap:!0,color:"inherit",variant:"body2",className:P([g&&au.labelDense,au.labelText,S&&M()&&au.excludedTextWithCheckbox])},B())),(V||G)&&t.createElement(L,{item:!0,className:au.icon},V&&t.createElement(Sc,{style:W,size:"small"}),G&&t.createElement(Kc,{style:W,size:"small"}))))}const pu={styledScrollbars:"".concat("ListBox","-styledScrollbars")},du=Cs(Nc)((()=>({["&.".concat(pu.styledScrollbars)]:{scrollbarColor:"".concat("#BBB"," ").concat("#f1f1f1"),"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#BBB",borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}}})));function hu(e){let{model:n,selections:r,direction:o,height:s,width:l,listLayout:c="vertical",frequencyMode:u="N",histogram:d=!1,checkboxes:h=!1,update:f,fetchStart:g,postProcessPages:y,calculatePagesHeight:b=!1,dense:v=!1,keyboard:E={},showGray:x=!0,scrollState:C,sortByState:S,selectDisabled:w=(()=>!1),setCount:L}=e;const[k]=nc(n),O=!(!k||!k.qListObject.qDimensionInfo.qIsOneAndOnlyOne),[R,q]=i(null),[I,_]=i(!1),{instantPages:T=[],interactionEvents:A,select:D}=Vc({layout:k,selections:r,pages:R,checkboxes:h,selectDisabled:w,doc:document,isSingleSelect:O}),N=m(null),P=m({queue:[],validPages:!1}),M=m({pages:[]}),j=p((e=>{if(!R||!P.current.validPages)return!1;P.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=R.filter((e=>t(e)))[0];return n&&t(n)}),[k,R]),z=p(((e,t)=>{P.current.queue.push({start:e,stop:t});!!N.current&&N.current._listRef.state.isScrolling;return P.current.queue.length>10&&P.current.queue.shift(),clearTimeout(P.current.timeout),_(!0),new Promise((e=>{P.current.timeout=setTimeout((()=>{const t=P.current.queue.slice(-1)[0],r=n.getListObjectData("/qListObjectDef",[{qTop:t.start>100?t.start-100:0,qHeight:100,qLeft:0,qWidth:1},{qTop:t.start,qHeight:100,qLeft:0,qWidth:1}]).then((t=>{const n=y?y(t):t;P.current.validPages=!0,M.current.pages=n,q(n),_(!1),e()}));g&&g(r)}),0)}))}),[k]),F=()=>{if(P.current.queue=[],P.current.validPages=!1,N.current){if(N.current.resetloadMoreItemsCache(!0),k&&k.qSelectionInfo.qInSelections||0===S)return;N.current._listRef.scrollToItem(0)}};f&&f.call(null,F),a((()=>{F(),"function"==typeof L&&k&&L(k.qListObject.qSize.qcy)}),[k,k&&k.qListObject.qSize.qcy]),a((()=>{T&&!I&&q(T)}),[T]);const[B,$]=i(!1);if(a((()=>{C&&!B&&N.current&&(N.current._listRef.scrollToItem(C.initScrollPos),$(!0))}),[N.current]),!k)return null;const U="horizontal"!==c,H=k.qListObject.qSize.qcy,W=R&&R.length&&b?(e=>{const t=e.some((e=>e.qArea.qHeight<100)),n=Math.max(...e.map((e=>e.qArea.qTop+e.qArea.qHeight)));return t?n:H})(R):H,{itemSize:G,listHeight:K}=function(e){let{isVertical:t,checkboxes:n,dense:r,height:o}=e,i=n?40:33;r&&(i=20);const a=t?i:200;return{itemSize:a,listHeight:o||8*a}}({isVertical:U,checkboxes:h,dense:v,height:s}),Z=k&&k.qListObject.qDimensionInfo.qLocked,{frequencyMax:X}=k;return t.createElement(zc,{isItemLoaded:j,itemCount:W||1,loadMoreItems:z,threshold:0,minimumBatchSize:100,ref:N},(e=>{let{onItemsRendered:n,ref:i}=e;return P.current.listRef=i,t.createElement(du,{direction:"rtl"===o?"rtl":"ltr","data-testid":"fixed-size-list",useIsScrolling:!0,height:K,width:l,itemCount:W,layout:c,className:pu.styledScrollbars,itemData:V(V({isLocked:Z,column:!U,pages:R},Z||w()?{}:A),{},{checkboxes:h,dense:v,frequencyMode:u,isSingleSelect:O,actions:{select:D,confirm:()=>r&&r.confirm.call(r),cancel:()=>r&&r.cancel.call(r)},frequencyMax:X,histogram:d,keyboard:E,showGray:x}),itemSize:G,onItemsRendered:e=>{C&&C.setScrollPos(e.visibleStopIndex),n(V({},e))},ref:i},uu)}))}const fu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M15.4,9 C15.8,9 16,9.3 16,9.6 L16,15.4 C16,15.7 15.8,16 15.4,16 L9.6,16 C9.3,16 9,15.8 9,15.4 L9,9.6 C9,9.3 9.3,9 9.6,9 L15.4,9 Z M15,10 L10,10 L10,15 L15,15 L15,10 Z M6.5,0 C6.8,0 7,0.3 7,0.6 L7,6.4 C7,6.8 6.8,7 6.5,7 L0.6,7 C0.3,7 0,6.8 0,6.5 L0,0.6 C0,0.3 0.3,0 0.6,0 L6.5,0 Z M6,2.8 C6.3,2.5 6.3,2.1 6.1,1.8 C5.9,1.5 5.4,1.6 5.1,1.9 L3.1,3.9 L2.4,3.2 C2.1,2.9 1.7,2.9 1.4,3.1 C1.2,3.3 1.2,3.8 1.5,4.1 L2.7,5.3 C3,5.6 3.4,5.6 3.7,5.3 L3.8,5.3 L6,2.8 Z M6.5,9 C6.8,9 7,9.3 7,9.6 L7,15.4 C7,15.8 6.8,16 6.5,16 L0.6,16 C0.3,16 0,15.8 0,15.4 L0,9.6 C0,9.3 0.3,9 0.6,9 L6.5,9 Z M6,11.8 C6.3,11.5 6.3,11.1 6.1,10.8 C5.9,10.6 5.4,10.6 5.1,10.8 L3.1,12.8 L2.3,12 C2,11.7 1.6,11.7 1.3,12 C1.1,12.3 1.1,12.7 1.4,13 L2.6,14.2 C2.9,14.5 3.3,14.5 3.6,14.3 L3.7,14.2 L6,11.8 Z M15.4,0 C15.8,0 16,0.3 16,0.6 L16,6.4 C16,6.8 15.8,7 15.4,7 L9.6,7 C9.3,7 9,6.8 9,6.5 L9,0.6 C9,0.3 9.3,0 9.6,0 L15.4,0 Z M15,2.8 C15.3,2.5 15.3,2.1 15.1,1.8 C14.9,1.5 14.4,1.6 14.1,1.9 L12.1,3.9 L11.3,3.1 C11,2.8 10.6,2.8 10.3,3 C10,3.2 10.1,3.7 10.3,4 L11.5,5.2 C11.8,5.5 12.2,5.5 12.5,5.2 L15,2.8 Z"}}]}),mu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),gu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),yu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]});var bu=e=>{let{layout:t,model:n,translator:r}=e;if(t.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];return[{key:"selectAll",type:"menu-icon-button",label:r.get("Selection.SelectAll"),getSvgIconShape:fu,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{n.selectListObjectAll("/qListObjectDef")}},{key:"selectPossible",type:"menu-icon-button",label:r.get("Selection.SelectPossible"),getSvgIconShape:gu,enabled:()=>["qOption"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{n.selectListObjectPossible("/qListObjectDef")}},{key:"selectAlternative",type:"menu-icon-button",label:r.get("Selection.SelectAlternative"),getSvgIconShape:mu,enabled:()=>["qAlternative"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{n.selectListObjectAlternative("/qListObjectDef")}},{key:"selectExcluded",type:"menu-icon-button",label:r.get("Selection.SelectExcluded"),getSvgIconShape:yu,enabled:()=>["qAlternative","qExcluded"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{n.selectListObjectExcluded("/qListObjectDef")}}]};const vu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M2,6.5 L3,6.5 C3.55228475,6.5 4,6.94771525 4,7.5 L4,8.5 C4,9.05228475 3.55228475,9.5 3,9.5 L2,9.5 C1.44771525,9.5 1,9.05228475 1,8.5 L1,7.5 C1,6.94771525 1.44771525,6.5 2,6.5 Z M7.5,6.5 L8.5,6.5 C9.05228475,6.5 9.5,6.94771525 9.5,7.5 L9.5,8.5 C9.5,9.05228475 9.05228475,9.5 8.5,9.5 L7.5,9.5 C6.94771525,9.5 6.5,9.05228475 6.5,8.5 L6.5,7.5 C6.5,6.94771525 6.94771525,6.5 7.5,6.5 Z M13,6.5 L14,6.5 C14.5522847,6.5 15,6.94771525 15,7.5 L15,8.5 C15,9.05228475 14.5522847,9.5 14,9.5 L13,9.5 C12.4477153,9.5 12,9.05228475 12,8.5 L12,7.5 C12,6.94771525 12.4477153,6.5 13,6.5 Z"}}]});function Eu(e){const t=vs(),n="function"==typeof e.enabled?!e.enabled():!!e.disabled,r="function"==typeof e.getSvgIconShape;return{hidden:!0===e.hidden,disabled:n,style:{backgroundColor:e.active?t.palette.btn.active:void 0},hasSvgIconShape:r}}const xu="njs-cell-action",Cu=t.forwardRef(((e,n)=>{let{item:r,addAnchor:o=!1}=e;const i=vs(),{hidden:a,disabled:s,style:l,hasSvgIconShape:c}=Eu(r);if(a)return null;const u=r.keyboardAction?e=>["Enter"," ","Spacebar"].includes(e.key)&&r.keyboardAction():null;return t.createElement(R,{ref:o?null:n,title:r.label,onClick:r.action,onKeyDown:u,disabled:s,style:l,className:xu,size:"large"},c&&xc(r.getSvgIconShape()),o&&t.createElement("div",{ref:n,style:{bottom:-i.spacing(.5),right:0,position:"absolute",width:"100%",height:0}}))})),Su=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M9.34535242,8 L13.3273238,11.9819714 C13.6988326,12.3534802 13.6988326,12.955815 13.3273238,13.3273238 C12.955815,13.6988326 12.3534802,13.6988326 11.9819714,13.3273238 L8,9.34535242 L4.01802863,13.3273238 C3.64651982,13.6988326 3.04418502,13.6988326 2.67267621,13.3273238 C2.3011674,12.955815 2.3011674,12.3534802 2.67267621,11.9819714 L6.65464758,8 L2.67267621,4.01802863 C2.3011674,3.64651982 2.3011674,3.04418502 2.67267621,2.67267621 C3.04418502,2.3011674 3.64651982,2.3011674 4.01802863,2.67267621 L8,6.65464758 L11.9819714,2.67267621 C12.3534802,2.3011674 12.955815,2.3011674 13.3273238,2.67267621 C13.6988326,3.04418502 13.6988326,3.64651982 13.3273238,4.01802863 L9.34535242,8 Z"}}]}),wu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M9.1661442,6.1661442 C10.7210031,4.61128527 13.2789969,4.61128527 14.8338558,6.1661442 C16.3887147,7.72100313 16.3887147,10.2789969 14.8338558,11.8338558 C13.2789969,13.3887147 10.7210031,13.3887147 9.1661442,11.8338558 C7.61128527,10.2789969 7.61128527,7.77115987 9.1661442,6.1661442 Z M14.1316614,7.72100313 C14.3322884,7.52037618 14.3824451,7.169279 14.1316614,6.9184953 C13.8808777,6.6677116 13.5297806,6.71786834 13.3291536,6.9184953 L12.0250784,8.22257053 L10.7210031,6.9184953 C10.5203762,6.6677116 10.1191223,6.6677116 9.9184953,6.9184953 C9.6677116,7.11912226 9.6677116,7.52037618 9.9184953,7.72100313 L11.2225705,9.02507837 L9.9184953,10.3291536 C9.6677116,10.5297806 9.6677116,10.8808777 9.9184953,11.1316614 C10.169279,11.3824451 10.5203762,11.3824451 10.7210031,11.1316614 L12.0250784,9.82758621 L13.3291536,11.1316614 C13.5297806,11.3824451 13.8808777,11.3824451 14.1316614,11.1316614 C14.3322884,10.9310345 14.3824451,10.5297806 14.1316614,10.3291536 L12.8275862,9.02507837 L14.1316614,7.72100313 Z"}}]});var Lu=e=>xc(wu(e));const ku={icon:"".concat("More","-icon")},Ou=Cs(q)((e=>{let{theme:t}=e;return{["& .".concat(ku.icon)]:{color:t.palette.text.primary}}}));function Ru(e){let{item:n,onActionClick:r=(()=>{})}=e;const{hidden:o,disabled:i,hasSvgIconShape:a}=Eu(n);return o?null:t.createElement(_,{title:n.label,onClick:()=>{n.action(),r()},disabled:i},a&&t.createElement(T,{className:ku.icon},xc(n.getSvgIconShape())),t.createElement(k,{noWrap:!0},n.label))}const qu=t.forwardRef(((e,n)=>{let{actions:r=[],show:o=!0,alignTo:i,popoverProps:a={},popoverPaperStyle:s={},onCloseOrActionClick:l=(()=>{})}=e;return r.length>0&&t.createElement(Ou,K({},a,{onClose:l,ref:n,open:o,anchorEl:i.current,getContentAnchorEl:null,container:i.current,disablePortal:!0,hideBackdrop:!0,style:{pointerEvents:"none"},transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{style:V({pointerEvents:"auto",maxWidth:"250px"},s)}}),t.createElement(I,null,r.map(((e,n)=>t.createElement(Ru,{key:n,item:e,onActionClick:l})))))})),Iu={itemSpacing:"".concat("ActionsToolbar","-itemSpacing"),firstItemSpacing:"".concat("ActionsToolbar","-firstItemSpacing"),lastItemSpacing:"".concat("ActionsToolbar","-lastItemSpacing")},_u=Cs(q)((e=>{let{theme:t}=e;return{["& .".concat(Iu.itemSpacing)]:{padding:t.spacing(0,.5)},["& .".concat(Iu.firstItemSpacing)]:{padding:t.spacing(0,.5,0,0)},["& .".concat(Iu.lastItemSpacing)]:{padding:t.spacing(0,0,0,.5)}}})),Tu="njs-action-toolbar-popover",Au=t.forwardRef(((e,n)=>{let{actions:r=[],first:o=!1,last:i=!1,addAnchor:a=!1}=e;return r.length>0?t.createElement(L,{item:!0,container:!0,gap:0,wrap:"nowrap"},r.map(((e,s)=>{let l=[];const c=o&&0===s,u=i&&r.length-1===s;return c&&!u&&(l=[Iu.firstItemSpacing]),u&&!c&&(l=[...l,Iu.lastItemSpacing]),c||u||0!==l.length||(l=[Iu.itemSpacing]),t.createElement(L,{item:!0,key:e.key,className:l.join(" ").trim()},t.createElement(Cu,{key:e.key,item:e,ref:0===s?n:null,addAnchor:a}))}))):null})),Du={pointerEvents:"none"},Nu={vertical:"top",horizontal:"right"},Pu={vertical:"bottom",horizontal:"right"};function Mu(e){let{show:n=!0,actions:r=[],maxItems:o=3,selections:s={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},more:l={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{}},popover:u={show:!1,anchorEl:null},focusHandler:p=null,actionsRefMock:d=null}=e;const h=function(e){let{api:t,onConfirm:n=(()=>{}),onCancel:r=(()=>{}),onKeyDeactivate:o=(()=>{})}=e;const{translator:i}=g(jl);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>t.canClear(),action:()=>t.clear(),getSvgIconShape:wu},{key:"cancel",type:"icon-button",label:i.get("Selection.Cancel"),enabled:()=>t.canCancel(),action:()=>{r(),t.cancel()},keyboardAction:e=>{o(e),r(),t.cancel()},getSvgIconShape:Su},{key:"confirm",type:"icon-button",label:i.get("Selection.Confirm"),enabled:()=>t.canConfirm(),action:()=>{n(),t.confirm()},keyboardAction:e=>{o(e),n(),t.confirm()},getSvgIconShape:Gc}]}(s),{translator:f,keyboardNavigation:y}=g(jl),[b,v]=i(!1),[E,x]=i(l.enabled),[C,S]=i(l.actions),[w,k]=i(l.alignTo),O=m(),R=m(),q=vs(),I=c((()=>({margin:q.spacing(.5,0)}))),_=e=>{const t=R.current||d;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]};a((()=>()=>v(!1)),[u.show]),a((()=>{x(l.enabled)}),[l.enabled]),a((()=>{if(!p)return;p.on("focus_toolbar_first",(()=>{const e=_(!1);e&&e.focus()})),p.on("focus_toolbar_last",(()=>{const e=_(!0);e&&e.focus()}))}),[]);const T=c((()=>r.filter((e=>!e.hidden))),[r]);if(!s.show&&0===T.length)return null;const D={key:"more",label:f.get("Menu.More"),getSvgIconShape:vu,hidden:!1,enabled:()=>E,action:()=>v(!b)};if(T.length>o){const e=T.splice(-(T.length-o)-1);x(!0),S([...e,...l.actions]),k(O)}const N=y&&p&&p.refocusContent?e=>{if("Tab"!==e.key)return;(e.shiftKey&&_(!1)===e.target||!e.shiftKey&&_(!0)===e.target)&&(e.preventDefault(),e.stopPropagation(),p.refocusContent())}:null,P=T.length>0,M=C.length>0,j=P&&s.show||M&&s.show,z=t.createElement(L,{ref:R,onKeyDown:N,container:!0,gap:0,wrap:"nowrap"},P&&t.createElement(Au,{actions:T,first:!0,last:!M&&!s.show}),M&&t.createElement(Au,{ref:O,actions:[D],first:!P,last:!s.show,addAnchor:!0}),j&&t.createElement(L,{item:!0,className:Iu.itemSpacing,style:I},t.createElement(A,{orientation:"vertical"})),s.show&&t.createElement(Au,{actions:h,first:!P&&!M,last:!0}),b&&t.createElement(qu,{show:b,actions:C,alignTo:w,popoverProps:l.popoverProps,popoverPaperStyle:l.popoverPaperStyle,onCloseOrActionClick:()=>{v(!1)}}));return u.show?t.createElement(_u,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:u.show,anchorEl:u.anchorEl,anchorOrigin:Nu,transformOrigin:Pu,hideBackdrop:!0,style:Du,PaperProps:{className:Tu,style:{pointerEvents:"auto",padding:q.spacing(1,1)}}},z):n&&z}var ju=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M15.7873809,13.80959 C16.1870614,14.209868 15.9872212,15.1104934 15.4876205,15.5107714 C15.08794,15.9110493 14.1886588,16.2112578 13.7889782,15.8109798 L11.0911347,13.1091035 L10.9912145,12.5086866 L10.2917736,11.8082001 C9.19265216,12.5086866 7.89369045,13.0090341 6.49480859,13.0090341 C2.89768383,13.0090341 0,10.1070188 0,6.50451703 C0,2.90201529 2.89768383,0 6.49480859,0 C10.0919334,0 12.9896172,2.90201529 12.9896172,6.50451703 C12.9896172,7.90548992 12.4900165,9.20639333 11.7905756,10.3071577 L12.4900165,11.0076442 L13.0895373,11.1077137 L15.7873809,13.80959 Z M11.2909749,6.50451703 C11.2909749,5.20361362 10.7913743,4.00277971 9.89209309,3.00208478 C8.9928119,2.10145935 7.79377031,1.60111188 6.49480859,1.60111188 C5.19584688,1.60111188 3.99680529,2.10145935 2.99760397,3.00208478 C2.09832278,4.00277971 1.59872212,5.20361362 1.59872212,6.50451703 C1.59872212,7.80542043 2.09832278,9.00625434 2.99760397,9.90687978 C3.89688516,10.8075052 5.09592674,11.3078527 6.49480859,11.3078527 C7.79377031,11.4079222 8.9928119,10.9075747 9.89209309,9.90687978 C10.7913743,9.00625434 11.2909749,7.80542043 11.2909749,6.50451703 Z"}}]}))(e));function zu(e){let{model:n,keyboard:r,dense:o=!1,visible:s=!0}=e;const{translator:l}=g(jl),[c,u]=i(""),[p,d]=i(!1),h=vs(),f=async()=>{await n.abortListObjectSearch("/qListObjectDef"),d(!1)};a((()=>{!s&&p&&f()}),[s]);return s?t.createElement(D,{startAdornment:t.createElement(N,{position:"start"},t.createElement(ju,{size:o?"small":"normal"})),className:"search",sx:[{border:"none",borderRadius:0,"& fieldset":{border:"1px solid ".concat(h.palette.divider),borderWidth:"1px 0 1px 0",borderRadius:0},"&:hover":{border:"none"}},o&&{fontSize:12,paddingLeft:h.spacing(1),"& input":{paddingTop:"5px",paddingBottom:"5px"}}],size:"small",fullWidth:!0,placeholder:l.get("Listbox.Search"),value:c,onChange:e=>{u(e.target.value),0===e.target.value.length?f():(n.searchListObjectFor("/qListObjectDef",e.target.value),d(!0))},onKeyDown:e=>{switch(e.key){case"Enter":n.acceptListObjectSearch("/qListObjectDef",!0),u("");break;case"Escape":f(),u("")}},inputProps:{tabIndex:!r||r.enabled&&!r.active?-1:0}}):null}function Fu(e){return Object.keys(re.prototype).forEach((t=>{e[t]=re.prototype[t]})),re.init(e),e}function Bu(e,t){const[n]=gc(e),[r]=nc(t),o=t?t.id:null,[i]=uc(),[s]=dc(),l=i.get(e.id);let c=s.get(o);return a((()=>{n&&t&&!c&&(c=function(e){let t,{appSelections:n,appModal:r,model:o}=e,i=!1,a=!1;const s={id:o.id,setLayout(e){t=e},begin(e){const t=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",t),t.isPrevented()?Promise.resolve():(i=!0,this.emit("activated"),r.begin(o,e,!0))},clear(){return a=!1,this.emit("cleared"),t.qListObject?o.clearSelections("/qListObjectDef"):o.resetMadeSelections()},confirm(){return a=!1,i=!1,this.emit("confirmed"),this.emit("deactivated"),r.end(!0)},cancel(){return a=!1,i=!1,this.emit("canceled"),this.emit("deactivated"),r.end(!1)},async select(e){const t=this.begin([e.params[0]]);if(!n.isModal())return!1;await t;const r=await o[e.method](...e.params);return a="resetMadeSelections"!==e.method,!!r||(o.resetMadeSelections(),!1)},canClear:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked&&!t.qListObject.qDimensionInfo.qIsOneAndOnlyOne:a,canConfirm:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked:a,canCancel:()=>!(t&&t.qListObject&&t.qListObject.qDimensionInfo&&t.qListObject.qDimensionInfo.qLocked),isActive:()=>i,isModal:()=>n.isModal(o),goModal:e=>r.begin(o,e,!1),noModal:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r.end(e)}};return Fu(s),s}({appSelections:n,appModal:l,model:t}),s.set(o,c),s.dispatch(!0))}),[n,t]),a((()=>{c&&c.setLayout(r)}),[c,r]),[c]}function $u(e){let{alignTo:n,show:r,close:o,app:i,fieldName:s,stateName:l="$"}=e;const c=r&&Boolean(n.current),u=vs(),[d]=oc({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:l,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],qFieldDefs:[s]}}},i,s,l),h=p((()=>{d.lock("/qListObjectDef")}),[d]),f=p((()=>{d.unlock("/qListObjectDef")}),[d]),{translator:y}=g(jl),b=m(),[v]=Bu(i,d),[E]=nc(d);if(a((()=>{v&&c&&(v.isModal(d)||v.goModal("/qListObjectDef"))}),[v,c]),!d||!E||!y)return null;const x=!0===E.qListObject.qDimensionInfo.qLocked,C=(e,t)=>{const n="escapeKeyDown"!==t;v.noModal(n),o()},S=bu({layout:E,model:d,translator:y}),w=E.qListObject.qDimensionInfo.qStateCounts,k=w.qSelected+w.qSelectedExcluded+w.qLocked+w.qLockedExcluded>0;return t.createElement(q,{open:c,onClose:C,anchorEl:n.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"250px"}}},t.createElement(L,{container:!0,direction:"column",gap:0},t.createElement(L,{item:!0,container:!0,style:{padding:u.spacing(1)}},t.createElement(L,{item:!0},x?t.createElement(R,{onClick:f,disabled:!x,size:"large"},t.createElement(Sc,{title:y.get("Listbox.Unlock")})):t.createElement(R,{onClick:h,disabled:!k,size:"large"},t.createElement(wc,{title:y.get("Listbox.Lock")}))),t.createElement(L,{item:!0,xs:!0}),t.createElement(L,{item:!0},t.createElement(Mu,{more:{enabled:!x,actions:S,alignTo:b,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:v,onConfirm:C,onCancel:()=>C(0,"escapeKeyDown")}}))),t.createElement(L,{item:!0,xs:!0},t.createElement("div",{ref:b}),t.createElement(zu,{model:d,visible:!0}),t.createElement(hu,{model:d,selections:v,direction:"ltr"}))))}function Uu(e){let{field:n,api:r,stateIx:o=0,skipHandleShowListBoxPopover:a=!1,moreAlignTo:s=null,onClose:l=(()=>{})}=e;const{translator:c}=g(jl),u=s||m(),p=vs(),[d,h]=i(!1),f=e=>{e.currentTarget.contains(e.target)&&h(!d)},y=()=>{h(!1),l()},b=n.selections[o];void 0===b.qTotal&&(b.qTotal=0);const v=b.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},E=(v.qSelected+v.qLocked)/b.qTotal,x=v.qAlternative/b.qTotal,C=(v.qExcluded+v.qLockedExcluded+v.qSelectedExcluded)/b.qTotal,S=v.qSelected+v.qSelectedExcluded+v.qLocked+v.qLockedExcluded,w=0===S&&0===b.qTotal;let O="";b.qTotal===S&&b.qTotal>1?O=c.get("CurrentSelections.All"):S>1&&b.qTotal?O=c.get("CurrentSelections.Of",[S,b.qTotal]):b.qSelectedFieldSelectionInfo&&(O=b.qSelectedFieldSelectionInfo.map((e=>e.qName)).join(", ")),"$"!==n.states[o]&&(O="".concat(n.states[o],": ").concat(O));const q=[{color:p.palette.selected.main,ratio:E},{color:p.palette.selected.alternative,ratio:x},{color:p.palette.selected.excluded,ratio:C}];q.forEach(((e,t)=>{e.offset=t?q[t-1].offset+q[t-1].ratio:0}));let I=null,_=null,T=null,A=null;return s||(I=t.createElement(L,{item:!0,xs:!0,style:{minWidth:0,flexGrow:1,opacity:b.qLocked?"0.3":""}},t.createElement(k,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},b.qField),t.createElement(k,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"}},O)),b.qLocked?_=t.createElement(L,{item:!0},t.createElement(R,{size:"large"},t.createElement(Sc,null))):b.qOneAndOnlyOne||(_=t.createElement(L,{item:!0},t.createElement(R,{title:c.get("Selection.Clear"),onClick:e=>{e.stopPropagation(),r.clearField(b.qField,n.states[o])},size:"large"},t.createElement(Cc,null)))),T=t.createElement("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"}},!1===w&&q.map((e=>t.createElement("div",{key:e.color,style:{position:"absolute",background:e.color,height:"100%",top:0,width:"".concat(100*e.ratio,"%"),left:"".concat(100*e.offset,"%")}})))),A=t.createElement(L,{container:!0,gap:1,ref:u,sx:{backgroundColor:p.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:p.palette.action.hover}},onClick:!1===a&&f||null},I,_,T,d&&t.createElement($u,{alignTo:u,show:d,close:y,app:r.model,fieldName:b.qField,stateName:n.states[o]}))),s?t.createElement($u,{alignTo:u,show:!0,close:y,app:r.model,fieldName:b.qField,stateName:n.states[o]}):A}var Hu=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M8,9 L12.5,4.5 L14,6 L9.5,10.5 L8,12 L2,6 L3.5,4.5 L8,9 Z"}}]}))(e));const Wu={item:"".concat("MultiState","-item")},Vu=Cs(L)((e=>{let{theme:t}=e;return{["&.".concat(Wu.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"}}}));function Gu(e){let{field:n,api:r,moreAlignTo:o=null,onClose:a=(()=>{})}=e;const[s,l]=i(!!o),[c,u]=i(-1),[p,d]=i(o?o.current:null),h=o||m(),{translator:f}=g(jl),y=f.get("Selection.ClearAllStates"),b=()=>{u(-1),a()};let v=null;o||(v=t.createElement(t.Fragment,null,t.createElement(L,{item:!0,xs:!0,zeroMinWidth:!0},t.createElement(P,{style:{padding:"0px 8px"},color:"secondary",badgeContent:n.states.length},t.createElement(k,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},n.name))),t.createElement(L,{item:!0},t.createElement("div",{style:{width:"12px"}})),t.createElement(L,{item:!0},t.createElement(R,{size:"large"},t.createElement(Hu,null)))));const E=t.createElement(M,{dense:!0},t.createElement(j,{title:y,onClick:()=>{n.states.forEach((e=>r.clearField(n.name,e)))}},t.createElement(z,{variant:"contained",fullWidth:!0},y)),n.states.map(((e,o)=>t.createElement(j,{key:o,title:n.name,onClick:e=>((e,t)=>{e.stopPropagation(),l(!1),u(t)})(e,o)},t.createElement(F,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},t.createElement(Uu,{field:n,api:r,stateIx:o,skipHandleShowListBoxPopover:!0})))))),x=t.createElement(q,{open:s,onClose:()=>{l(!1),a()},anchorEl:p,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},E),C=o?x:t.createElement(Vu,{container:!0,gap:0,className:Wu.item,onClick:e=>{e.currentTarget.contains(e.target)&&(d(e.currentTarget),h.current=e.currentTarget,l(!s))}},v,s&&x,c>-1&&t.createElement($u,{alignTo:h,show:c>-1,close:b,app:r.model,fieldName:n.selections[c].qField,stateName:n.states[c]}));return o&&c>-1?t.createElement($u,{alignTo:h,show:c>-1,close:b,app:r.model,fieldName:n.selections[c].qField,stateName:n.states[c]}):C}const Ku={item:"".concat("More","-item"),badge:"".concat("More","-badge")},Zu=Cs(L)((e=>{let{theme:t}=e;return{["&.".concat(Ku.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"},["& .".concat(Ku.badge)]:{padding:t.spacing(0,1)}}}));function Xu(e){let{items:n=[],api:r}=e;const o=vs(),[a,s]=i(!1),[l,c]=i(-1),[u,p]=i(null),d=m(),h=()=>{c(-1)};let f=null;return l>-1&&(f=n[l].states.length>1?t.createElement(Gu,{field:n[l],api:r,moreAlignTo:d,onClose:h}):t.createElement(Uu,{field:n[l],api:r,skipHandleShowListBoxPopover:!0,moreAlignTo:d,onClose:h})),t.createElement(Zu,{container:!0,gap:0,className:Ku.item,onClick:e=>{e.currentTarget.contains(e.target)&&(p(e.currentTarget),d.current=e.currentTarget,s(!a))}},t.createElement(L,{item:!0},t.createElement(F,{borderRadius:o.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:o.palette.selected.main,color:o.palette.selected.mainContrastText}},t.createElement(k,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit"},"+",n.length))),t.createElement(L,{item:!0},t.createElement(R,{size:"large"},t.createElement(Hu,null))),a&&t.createElement(q,{open:a,onClose:()=>{s(!1)},anchorEl:u,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},t.createElement(M,{dense:!0},n.map(((e,n)=>t.createElement(j,{key:n,title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),s(!1),c(t)})(e,n)},t.createElement(F,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},e.states.length>1?t.createElement(Gu,{field:e,api:r}):t.createElement(Uu,{field:e,api:r}))))))),f)}function Ju(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"$";e.qSelections.forEach((e=>{const r=e.qField,o=t[r]=t[r]||{name:r,states:[],selections:[]};-1===o.states.indexOf(n)&&(o.states.push(n),o.selections.push(e))}))}function Yu(e){let{api:n,app:r}=e;const o=vs(),[s]=ac(r),[l]=nc(s),[c,u]=i({items:[],more:[]}),[p]=fc(),[d,h]=vc(),[f,m]=i(0);return a((()=>{if(!h)return;const{width:e}=h,t=Math.floor(e)-72,n=Math.floor(t/120);m(n)}),[h]),a((()=>{if(!(r&&s&&l&&f))return;const e=function(e){if(!e)return[];const t={};return e.qSelectionObject&&Ju(e.qSelectionObject,t),e.alternateStates&&e.alternateStates.forEach((e=>Ju(e.qSelectionObject,t,e.stateName))),Object.keys(t).map((e=>t[e]))}(l);u((t=>{const n=e;if((()=>{const e=p.get(r.id);return e&&"njsListbox"===e.genericType})()&&n.length+1===t.items.length){const e=t.items.filter((e=>!1===n.some((t=>e.name===t.name))))[0],{qField:r}=e.selections[0];e.selections=[{qField:r}];const o=t.items.indexOf(e);n.splice(o,0,e)}let o=[];return f<n.length&&(o=n.splice(f-n.length)),{items:n,more:o}}))}),[r,s,l,n.isInModal(),f]),t.createElement(L,{ref:d,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"}},c.items.map((e=>t.createElement(L,{item:!0,key:"".concat(e.states.join("::"),"::").concat(e.name),style:{position:"relative",maxWidth:"240px",minWidth:"".concat(120,"px"),background:o.palette.background.paper,borderRight:"1px solid ".concat(o.palette.divider)}},e.states.length>1?t.createElement(Gu,{field:e,api:n}):t.createElement(Uu,{field:e,api:n})))),c.more.length>0&&t.createElement(L,{item:!0,style:{position:"relative",maxWidth:"98px",minWidth:"".concat(72,"px"),background:o.palette.background.paper,borderRight:"1px solid ".concat(o.palette.divider)}},t.createElement(Xu,{items:c.more,api:n})))}var Qu=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 Z M16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,-5.07265313e-17 13.5,0 L15,0 C15.5522847,1.01453063e-16 16,0.44771525 16,1 L16,2.5 Z M10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 C6,0.223857625 6.22385763,-5.07265313e-17 6.5,0 L9.5,0 C9.77614237,5.07265313e-17 10,0.223857625 10,0.5 Z M1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 5.18696197e-13,2.77614237 5.18696197e-13,2.5 L5.18696197e-13,1 C5.18696197e-13,0.44771525 0.44771525,-1.01453063e-16 1,0 L2.5,0 C2.77614237,5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 5.18696197e-13,15.5522847 5.18696197e-13,15 L5.18696197e-13,13.5 C5.18696197e-13,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M4,7 C7.49095643,7 10,10.1337595 10,12.1872632 C10,12.1872632 8.16051135,9.86624054 4,10 L4,12 C4,12 2.66666667,10.8333333 -1.0658141e-14,8.5 C-2.59348099e-13,8.5 1.33333333,7.33333333 4,5 C4,5 4,5.66666667 4,7 Z"}}]}))(e));var ep=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M12,7 C12,5.66666667 12,5 12,5 C14.6666667,7.33333333 16,8.5 16,8.5 C13.3333333,10.8333333 12,12 12,12 L12,10 C7.83948865,9.86624054 6,12.1872632 6,12.1872632 C6,10.1337595 8.50904357,7 12,7 Z"}}]}))(e));function tp(e){let{api:n,app:r}=e;const{translator:o}=g(jl),[i]=sc(r);return t.createElement(L,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"}},t.createElement(L,{item:!0},t.createElement(R,{style:{marginRight:"8px"},disabled:!i||!i.canGoBack,title:o.get("Navigate.Back"),onClick:()=>n.back(),size:"large"},t.createElement(Qu,null))),t.createElement(L,{item:!0},t.createElement(R,{style:{marginRight:"8px"},disabled:!i||!i.canGoForward,title:o.get("Navigate.Forward"),onClick:()=>n.forward(),size:"large"},t.createElement(ep,null))),t.createElement(L,{item:!0},t.createElement(R,{disabled:!i||!i.canClear,title:o.get("Selection.ClearAll"),onClick:()=>n.clear(),size:"large"},t.createElement(Lu,null))))}function np(e){let{app:n}=e;const r=vs(),[o]=gc(n);return o?t.createElement(L,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:r.palette.background.paper,minHeight:"40px"}},t.createElement(L,{item:!0,style:{borderRight:"1px solid ".concat(r.palette.divider)}},t.createElement(tp,{api:o,app:n})),t.createElement(L,{item:!0,xs:!0,style:{backgroundColor:r.palette.background.darker,overflow:"hidden"}},t.createElement(Yu,{api:o,app:n}))):null}function rp(e){let{element:n,app:r}=e;return y.createPortal(t.createElement(np,{app:r}),n)}var op=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ip=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ap=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sp=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},lp=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},cp=void 0;cp="undefined"!=typeof window?window:"undefined"!=typeof self?self:global;var up=null,pp=null,dp=cp.clearTimeout,hp=cp.setTimeout,fp=cp.cancelAnimationFrame||cp.mozCancelAnimationFrame||cp.webkitCancelAnimationFrame,mp=cp.requestAnimationFrame||cp.mozRequestAnimationFrame||cp.webkitRequestAnimationFrame;function gp(e){var t=void 0,n=void 0,r=void 0,o=void 0,i=void 0,a=void 0,s=void 0,l="undefined"!=typeof document&&document.attachEvent;if(!l){a=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;a(this),this.__resizeRAF__&&up(this.__resizeRAF__),this.__resizeRAF__=pp((function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))}};var c=!1,u="";r="animationstart";var p="Webkit Moz O ms".split(" "),d="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h=document.createElement("fakeelement");if(void 0!==h.style.animationName&&(c=!0),!1===c)for(var f=0;f<p.length;f++)if(void 0!==h.style[p[f]+"AnimationName"]){u="-"+p[f].toLowerCase()+"-",r=d[f],c=!0;break}t="@"+u+"keyframes "+(n="resizeanim")+" { from { opacity: 0; } to { opacity: 0; } } ",o=u+"animation: 1ms "+n+"; "}return{addResizeListener:function(i,c){if(l)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){var u=i.ownerDocument,p=cp.getComputedStyle(i);p&&"static"===p.position&&(i.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){var r=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],a=n.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(n.createTextNode(r)),i.appendChild(a)}}(u),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=u.createElement("div")).className="resize-triggers";var d=u.createElement("div");d.className="expand-trigger",d.appendChild(u.createElement("div"));var h=u.createElement("div");h.className="contract-trigger",i.__resizeTriggers__.appendChild(d),i.__resizeTriggers__.appendChild(h),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",s,!0),r&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&a(i)},i.__resizeTriggers__.addEventListener(r,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(c)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}null==fp||null==mp?(up=dp,pp=function(e){return hp(e,20)}):(up=function(e){var t=lp(e,2),n=t[0],r=t[1];fp(n),dp(r)},pp=function(e){var t=mp((function(){dp(n),e()})),n=hp((function(){fp(t),e()}),20);return[t,n]});var yp=function(e){function t(){var e,n,r;op(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=sp(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.state={height:r.props.defaultHeight||0,width:r.props.defaultWidth||0},r._onResize=function(){var e=r.props,t=e.disableHeight,n=e.disableWidth,o=e.onResize;if(r._parentNode){var i=r._parentNode.offsetHeight||0,a=r._parentNode.offsetWidth||0,s=window.getComputedStyle(r._parentNode)||{},l=parseInt(s.paddingLeft,10)||0,c=parseInt(s.paddingRight,10)||0,u=parseInt(s.paddingTop,10)||0,p=parseInt(s.paddingBottom,10)||0,d=i-u-p,h=a-l-c;(!t&&r.state.height!==d||!n&&r.state.width!==h)&&(r.setState({height:i-u-p,width:a-l-c}),o({height:i,width:a}))}},r._setRef=function(e){r._autoSizer=e},sp(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,f),ip(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._detectElementResize=gp(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.disableHeight,o=e.disableWidth,i=e.style,a=this.state,s=a.height,l=a.width,c={overflow:"visible"},u={},p=!1;return r||(0===s&&(p=!0),c.height=0,u.height=s),o||(0===l&&(p=!0),c.width=0,u.width=l),h("div",{className:n,ref:this._setRef,style:ap({},c,i)},!p&&t(u))}}]),t}();yp.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}};const bp={listBoxHeader:"".concat("ListBoxInline","-listBoxHeader")},vp=Cs(L)((()=>({["& .".concat(bp.listBoxHeader)]:{alignSelf:"center",display:"inline-flex"}})));function Ep(e){let{app:n,fieldIdentifier:r,stateName:o="$",options:s={},fieldDef:l}=e;const{title:c,direction:u,listLayout:d,search:h=!0,focusSearch:f=!1,toolbar:y=!0,rangeSelect:b=!0,checkboxes:v=!1,properties:E={},sessionModel:x,selectionsApi:C,update:S,fetchStart:w,dense:O=!1,selectDisabled:q=(()=>!1),postProcessPages:I,calculatePagesHeight:_,showGray:T=!0,scrollState:A,setCount:D,shouldConfirmOnBlur:N}=s;let{frequencyMode:P,histogram:M=!1}=s;switch(l&&l.failedToFetchFieldDef&&(M=!1,P="N"),!0){case["none","N","NX_FREQUENCY_NONE"].includes(P):P="N";break;case["value","V","NX_FREQUENCY_VALUE","default"].includes(P):P="V";break;case["percent","P","NX_FREQUENCY_PERCENT"].includes(P):P="P";break;case["relative","R","NX_FREQUENCY_RELATIVE"].includes(P):P="R";break;default:P="N"}const j={qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:o,qShowAlternatives:!0,qFrequencyMode:M&&"N"===P?"V":P,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}]}},title:c};let z;if(de(!0,j,E),r.qLibraryId?(j.qListObjectDef.qLibraryId=r.qLibraryId,z=r.qLibraryId):(j.qListObjectDef.qDef.qFieldDefs=[r],z=r),"N"!==P||M){const e=r.qLibraryId?l:z;j.frequencyMax={qValueExpression:"Max(AGGR(Count([".concat(e,"]), [").concat(e,"]))")}}let[F]=oc(j,x?null:n,z,o);x&&(F=x);let B=Bu(C?{}:n,F)[0];C&&(B=C);const $=vs(),U=p((()=>{F.lock("/qListObjectDef")}),[F]),H=p((()=>{F.unlock("/qListObjectDef")}),[F]),{translator:W,keyboardNavigation:V}=g(jl),G=m(),[K,Z]=(()=>{const[e,t]=i({}),n=p((e=>{t({current:e})}),[t]);return[e,n]})(),[X]=nc(F),[J,Y]=i(!1),[Q,ee]=i(!1),[te,ne]=i(!1),re=ou({setKeyboardActive:ne}),oe={enabled:V,active:te};a((()=>{const e=()=>Y(!0),t=()=>Y(!1);return B&&(B.isModal(F)||(B.on("deactivated",t),B.on("activated",e))),()=>{B&&(B.removeListener("deactivated",e),B.removeListener("activated",t))}}),[B]),a((()=>{B&&Y(B.isActive())}),[B]);const ie=m(null);if(function(e,t,n){const[r,o]=i(!1),s=m(r),l=e=>{s.current=e,o(e)};a((()=>{if(!n)return;const r=n=>{const r=e.current&&e.current.contains(n.target),o=s.current;r||o?r&&l(!1):(t&&t.confirm.call(t),l(!0))};return document.addEventListener("mousedown",r),document.addEventListener("keydown",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",r)}}),[e,t,n])}(ie,B,N),a((()=>{if(K&&K.current&&(h&&f||"toggle"===h&&Q)){const e=K.current.querySelector("input");e&&e.focus()}}),[K&&K.current,Q,h,f]),!F||!X||!W)return null;const ae=!0===X.qListObject.qDimensionInfo.qLocked,se=y?bu({layout:X,model:F,translator:W}):[],le=X.qListObject.qDimensionInfo.qStateCounts,ce=le.qSelected+le.qSelectedExcluded+le.qLocked+le.qLockedExcluded>0,ue=(!0===h||"toggle"===h&&Q)&&!q(),pe=49+(ue?O?27:40:0)+(O?39:49),he=()=>{ee(!Q)};return t.createElement(vp,{container:!0,tabIndex:oe.enabled&&!oe.active?0:-1,direction:"column",gap:0,style:{height:"100%",minHeight:"".concat(pe,"px")},onKeyDown:re,ref:ie},y&&t.createElement(L,{item:!0,container:!0,style:{padding:$.spacing(1)}},t.createElement(L,{item:!0},ae?t.createElement(R,{tabIndex:-1,onClick:H,disabled:!ae,size:"large"},t.createElement(Sc,{title:W.get("Listbox.Unlock")})):"toggle"!==h||ce?t.createElement(R,{onClick:U,tabIndex:-1,disabled:!ce,size:"large"},t.createElement(wc,null)):t.createElement(R,{onClick:he,tabIndex:-1,title:W.get("Listbox.Search"),size:"large"},t.createElement(ju,null))),t.createElement(L,{item:!0,className:bp.listBoxHeader},t.createElement(k,{variant:"h6",noWrap:!0},X.title||X.qListObject.qDimensionInfo.qFallbackTitle)),t.createElement(L,{item:!0,xs:!0}),t.createElement(L,{item:!0},t.createElement(Mu,{more:{enabled:!ae,actions:se,alignTo:G,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:J,api:B,onConfirm:()=>{},onCancel:()=>{}}}))),t.createElement(L,{item:!0,ref:Z},t.createElement(zu,{model:F,dense:O,keyboard:oe,visible:ue})),t.createElement(L,{item:!0,xs:!0},t.createElement("div",{ref:G}),t.createElement(yp,null,(e=>{let{height:n,width:r}=e;return t.createElement(hu,{model:F,selections:B,direction:u,listLayout:d,frequencyMode:P,histogram:M,rangeSelect:b,checkboxes:v,height:n,width:r,update:S,fetchStart:w,postProcessPages:I,calculatePagesHeight:_,dense:O,selectDisabled:q,keyboard:oe,showGray:T,scrollState:A,sortByState:j.qListObjectDef.qDef.qSortCriterias[0].qSortByState,setCount:D})}))))}function xp(e){let{app:n,fieldIdentifier:r,stateName:o="$",options:s={}}=e;const[l,c]=i(""),[u,p]=i(!1);return a((()=>{!async function(){p(!0);try{const e=await n.getDimension(r.qLibraryId),t=await e.getLayout();c(t.qDim.qFieldDefs?t.qDim.qFieldDefs[0]:""),p(!1)}catch(e){throw p(!1),c({failedToFetchFieldDef:!0}),new Error("Disabling frequency count and histogram: ".concat(e&&e.message))}}()}),[]),u?null:t.createElement(Ep,{app:n,fieldIdentifier:r,stateName:o,options:s,fieldDef:l})}function Cp(e){let{app:n,fieldIdentifier:r,stateName:o,element:i,options:a}=e;const s=a.histogram||"N"!==a.frequencyMode,l=r.qLibraryId&&s?xp:Ep;return y.createPortal(t.createElement(l,{app:n,fieldIdentifier:r,stateName:o,element:i,options:a}),i)}const Sp=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function wp(e){let[t,n]=e;return(t+(Math.random()*(n-t)|0)).toString(32)}function Lp(){return Sp.map(wp).join("")}function kp(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function Op(e,t){let n=0;for(let r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n}function Rp(e){let{sn:t,properties:n,fields:r}=e;if(!r.length)return;const o=t.qae.data.targets[0];if(!o)return;const{propertyPath:i}=o,a=i.split("/");let s=n;for(let e=0;e<a.length;e++){const t=a[e];s=t?s[t]:s}const l=function(e){let{dc:t,def:n,properties:r}=e;t.qDimensions=t.qDimensions||[],t.qMeasures=t.qMeasures||[],t.qInterColumnSortOrder=t.qInterColumnSortOrder||[],t.qInitialDataFetch=t.qInitialDataFetch||[],t.qColumnOrder=t.qColumnOrder||[],t.qExpansionState=t.qExpansionState||[];const o=r,i={dimensions:()=>t.qDimensions,measures:()=>t.qMeasures,addDimension(e){const r=V(V({},e),{},{qDef:e.qDef||{}});r.qDef.cId=r.qDef.cId||Lp(),r.qDef.qSortCriterias=r.qDef.qSortCriterias||[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],r.qOtherTotalSpec=r.qOtherTotalSpec||{},r.qAttributeExpressions=r.qAttributeExpressions||[],r.qAttributeDimensions=r.qAttributeDimensions||[],t.qDimensions.length<i.maxDimensions()?(t.qDimensions.push(r),kp(t.qInterColumnSortOrder,t.qDimensions.length-1),n.dimensions.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qDimensions.push(r))},removeDimension(e){const r=t.qDimensions.splice(e,1)[0];Op(t.qInterColumnSortOrder,e),n.dimensions.removed(r,o,e)},addMeasure(e){const r="string"==typeof e?(e=>({qDef:{qDef:e}}))(e):V(V({},e),{},{qDef:e.qDef||{}});r.qDef.cId=r.qDef.cId||Lp(),r.qSortBy=r.qSortBy||{qSortByLoadOrder:1,qSortByNumeric:-1},r.qAttributeDimensions=r.qAttributeDimensions||[],r.qAttributeExpressions=r.qAttributeExpressions||[],t.qMeasures.length<i.maxMeasures()?(t.qMeasures.push(r),kp(t.qInterColumnSortOrder,t.qDimensions.length+t.qMeasures.length-1),n.measures.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qMeasures.push(r))},removeMeasure(e){const r=t.qMeasures.splice(e,1)[0];Op(t.qInterColumnSortOrder,t.qDimensions.length+e),n.measures.removed(r,o,e)},maxDimensions:()=>n.dimensions.max(t.qMeasures.length),maxMeasures:()=>n.measures.max(t.qDimensions.length),canAddDimension:()=>t.qDimensions.length<i.maxDimensions(),canAddMeasure:()=>t.qMeasures.length<i.maxMeasures()};return i}({dc:s,def:o,properties:n});r.forEach((e=>{const t=function(e){return"string"==typeof e&&"="===e[0]||"object"==typeof e&&e.qDef&&e.qDef.qDef||"object"==typeof e&&e.qLibraryId&&"measure"===e.type?"measure":"dimension"}(e);"measure"===t?l.addMeasure(e):l.addDimension(e)}))}var qp=(e,t,n)=>{if(null==e||null==t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(""!==t){if(void 0===o[t]||null===o[t])return n;o=o[t]}}return o},Ip=(e,t,n)=>{if(null==e||null==t)return;const r=t.split("."),o=r[r.length-1];let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0!==i[t]&&null!==i[t]||(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n&&"__proto__"!==o&&"constructor"!==o?i[o]=n:delete i[o]},_p=e=>0===Object.keys(e).length&&e.constructor===Object;var Tp={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;let n=e.indexOf(t[0]);if(-1!==n){for(let r=0;r<t.length;r++){const o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){let n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){let 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}};function Ap(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function Dp(e,t){const n=de(!0,{},t,e);return qp(n,"qOtherTotalSpec.qOtherCounted")||Ip(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),qp(n,"qOtherTotalSpec.qOtherLimit")||Ip(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function Np(e,t){return de(!0,{},t,e)}function Pp(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var Mp={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach((t=>{e.qLayoutExclude.changed[t].to===qp(e,t)&&Ip(e,t,e.qLayoutExclude.changed[t].from)}))},isMasterItemProperty:Ap,importCommonProperties:function(e,t,n){const r="masterobject"===qp(t,"properties.qInfo.qType")?"masterobject":qp(n,"qInfo.qType");Ip(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},createDefaultDimension:Dp,createDefaultMeasure:Np,resolveValue:Pp,getHypercubePath:function(e){const t=qp(e,"data.targets.0.propertyPath","").split("/");return t.length&&"qHyperCubeDef"===t[t.length-1]&&(t.length-=1),t.join(".")},getDefaultDimension: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}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},setInterColumnSortOrder:function(e){let{exportFormat:t,newHyperCubeDef:n}=e;const r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();let i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(Tp.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,Tp.indexRemoved(n.qInterColumnSortOrder,i))},createNewProperties:function(e){let{exportFormat:t,initialProperties:n,hypercubePath:r}=e,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((e=>{"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=de(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?Ip(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||Ap(e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),o=de(!0,{},n,o),null===o.components&&(o.components=[]),o},getMaxMinDimensionMeasure:function(e){let{exportFormat:t,dataDefinition:n={}}=e;const r=t.data[0],o=n.dimensions||{max:0},i=n.measures||{max:0},a=Pp(i.max,r.dimensions.length,9007199254740991),s=Pp(i.min,r.dimensions.length,0);return{maxDimensions:Pp(o.max,a,9007199254740991),minDimensions:Pp(o.min,s,0),maxMeasures:a,minMeasures:s}},shouldInitLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i}=e;const 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},initLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i,newHyperCubeDef:a}=e;const 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=[]))},addDefaultDimensions:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,newHyperCubeDef:o,defaultDimension:i}=e;const a=t.data[0];let s;if(n>0)for(s=0;s<a.dimensions.length;++s)o.qDimensions.length<n?o.qDimensions.push(Dp(a.dimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Dp(a.dimensions[s],i));else if(a.dimensions.length)for(s=0;s<a.dimensions.length;++s)o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Dp(a.dimensions[s],i));if(a.excludedDimensions.length)for(s=0;s<a.excludedDimensions.length;++s)o.qDimensions.length<r?o.qDimensions.push(Dp(a.excludedDimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Dp(a.excludedDimensions[s],i))},addDefaultMeasures:function(e){let{exportFormat:t,maxMeasures:n,minMeasures:r,newHyperCubeDef:o,defaultMeasure:i}=e;const a=t.data[0];let s;if(n>0)for(s=0;s<a.measures.length;++s)o.qMeasures.length<n?o.qMeasures.push(Np(a.measures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Np(a.measures[s],i));else if(a.measures.length)for(s=0;s<a.measures.length;++s)o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Np(a.measures[s],i));if(a.excludedMeasures.length)for(s=0;s<a.excludedMeasures.length;++s)o.qMeasures.length<r?o.qMeasures.push(Np(a.excludedMeasures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Np(a.excludedMeasures[s],i))},updateDimensionsOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.dimensions&&"function"==typeof n.dimensions.added){const e=qp(t,r||"").qHyperCubeDef,o=[...e.qDimensions];e.qDimensions=[],o.forEach((r=>{e.qDimensions.push(r),n.dimensions.added(r,t)}))}},updateMeasuresOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.measures&&"function"==typeof n.measures.added){const e=qp(t,r||"").qHyperCubeDef,o=[...e.qMeasures];e.qMeasures=[],o.forEach((r=>{e.qMeasures.push(r),n.measures.added(r,t)}))}}};var jp={exportProperties:e=>function(e){let{propertyTree:t,hypercubePath:n}=e;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t={data:[],properties:{}};for(let n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),o=t.qProperty,i=qp(o,n||""),a=i.qHyperCubeDef,s=r.data[0];if(a.qInterColumnSortOrder||(a.qInterColumnSortOrder=[]),s.dimensions.push(...a.qDimensions),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qDimensions&&s.excludedDimensions.push(...a.qLayoutExclude.qHyperCubeDef.qDimensions),s.measures.push(...a.qMeasures),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qMeasures&&s.excludedMeasures.push(...a.qLayoutExclude.qHyperCubeDef.qMeasures),s.interColumnSortOrder=a.qInterColumnSortOrder.concat(),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder){const e=a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder.concat();Tp.isOrderedSubset(e,s.interColumnSortOrder)&&(s.interColumnSortOrder=e)}return delete a.qLayoutExclude,Object.keys(o).forEach((e=>{r.properties[e]=o[e]})),n&&(r.properties.qHyperCubeDef=i.qHyperCubeDef,delete i.qHyperCubeDef),o.qLayoutExclude||(o.qLayoutExclude={}),o.qLayoutExclude.disabled&&(Object.keys(o.qLayoutExclude.disabled).forEach((e=>{r.properties.hasOwnProperty(e)||(r.properties[e]=o.qLayoutExclude.disabled[e])})),delete o.qLayoutExclude.disabled),o.qLayoutExclude.changed&&(Mp.restoreChangedProperties(o),delete o.qLayoutExclude.changed),o.qLayoutExclude.quarantine&&!_p(o.qLayoutExclude.quarantine)||delete o.qLayoutExclude,r}(e),importProperties:e=>function(e){let{exportFormat:t,initialProperties:n={},dataDefinition:r={},defaultPropertyValues:o={},hypercubePath:i}=e;const a={qChildren:[]},s=Mp.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:i}),l=qp(n,i||"").qHyperCubeDef,c=qp(s,i||"").qHyperCubeDef,{maxDimensions:u,minDimensions:p,maxMeasures:d,minMeasures:h}=Mp.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:r}),{defaultDimension:f=Mp.getDefaultDimension(),defaultMeasure:m=Mp.getDefaultMeasure()}=o;return c.qDimensions.length=0,c.qMeasures.length=0,Mp.shouldInitLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:p,maxMeasures:d,minMeasures:h})&&Mp.initLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:p,maxMeasures:d,minMeasures:h,newHyperCubeDef:c}),Mp.addDefaultDimensions({exportFormat:t,maxDimensions:u,minDimensions:p,newHyperCubeDef:c,defaultDimension:f}),Mp.addDefaultMeasures({exportFormat:t,maxMeasures:d,minMeasures:h,newHyperCubeDef:c,defaultMeasure:m}),Mp.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:c}),Mp.copyPropertyIfExist("qMaxStackedCells",l,c),Mp.copyPropertyIfExist("qNoOfLeftDims",l,c),Mp.copyPropertyOrSetDefault("qInitialDataFetch",l,c,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),Mp.copyPropertyOrSetDefault("qMode",l,c,"S"),Mp.copyPropertyOrSetDefault("qReductionMode",l,c,"N"),Mp.copyPropertyOrSetDefault("qSortbyYValue",l,c),Mp.copyPropertyOrSetDefault("qIndentMode",l,c),Mp.copyPropertyOrSetDefault("qShowTotalsAbove",l,c),Mp.importCommonProperties(s,t,n),Mp.updateDimensionsOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),Mp.updateMeasuresOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),a.qProperty=s,a}(e)};const zp=e=>qp(e,"data.targets.0.propertyPath"),Fp=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return jp.exportProperties})(zp(e))},Bp=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return jp.importProperties})(zp(e))},$p=async e=>{let{halo:t,model:n,cellRef:r,newType:o}=e;const i=await n.getFullPropertyTree(),a=r.current.getQae(),s=Fp(a),l=await(async e=>{let{halo:t,name:n,version:r}=e;const{types:o}=t;return await o.get({name:n,version:r}).supernova()})({halo:t,name:o}),c=l.qae;return Bp(c)({exportFormat:s({propertyTree:i,hypercubePath:Mp.getHypercubePath(a)}),initialProperties:V({qInfo:{qType:o},visualization:o},qp(c,"properties.initial",{})),dataDefinition:qp(c,"data.targets.0.",{}),hypercubePath:Mp.getHypercubePath(c)})},Up={hypercube:jp};var Hp=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M8.86225926,1.6 L15.7815749,13.5 C16.2829746,14.3 15.8818548,15 14.9793354,15 L1.04042422,15 C0.0853772072,15 -0.232971797,14.3650794 0.172002787,13.6135407 L7.05722041,1.6 C7.55862009,0.8 8.36085958,0.8 8.86225926,1.6 Z M7.962,2.007 C7.95987183,2.02476599 7.95607967,2.03712023 7.94920396,2.05249845 L1.1033193,14 L14.915544,14 L7.99777452,2.10265906 L7.97779697,2.06138411 L7.96394459,2.01964415 L7.962,2.007 Z M7.5,11 L8.5,11 C8.76666667,11 8.95432099,11.1580247 8.99272977,11.4038409 L9,11.5 L9,12.5 C9,12.7666667 8.84197531,12.954321 8.59615912,12.9927298 L8.5,13 L7.5,13 C7.23333333,13 7.04567901,12.8419753 7.00727023,12.5961591 L7,12.5 L7,11.5 C7,11.2333333 7.15802469,11.045679 7.40384088,11.0072702 L7.5,11 L8.5,11 L7.5,11 Z M7.5,5 L8.5,5 C8.76666667,5 8.95432099,5.15802469 8.99272977,5.40384088 L9,5.5 L9,9.5 C9,9.76666667 8.84197531,9.95432099 8.59615912,9.99272977 L8.5,10 L7.5,10 C7.23333333,10 7.04567901,9.84197531 7.00727023,9.59615912 L7,9.5 L7,5.5 C7,5.23333333 7.15802469,5.04567901 7.40384088,5.00727023 L7.5,5 L8.5,5 L7.5,5 Z"}}]}))(e));function Wp(e){let{d:n}=e;const r=vs();let o="inherit",i=r.palette.success.main;n.missing?i=r.palette.warning.main:n.error&&(o="error",i=r.palette.error.main);const a={color:i},s=t.createElement(k,{style:{lineHeight:"30px",paddingRight:r.spacing(1)}},t.createElement(B,null,n.missing||n.error?t.createElement(Hp,{style:a}):t.createElement(Kc,{style:a})));return t.createElement(L,{item:!0,container:!0,alignItems:"center",wrap:"nowrap"},t.createElement(L,{item:!0},s),t.createElement(L,{container:!0,item:!0,zeroMinWidth:!0,wrap:"nowrap"},t.createElement(k,{noWrap:!0,component:"p"},t.createElement(k,{component:"span",variant:"subtitle2",color:o},n.description),t.createElement(k,{component:"span"}," "),t.createElement(k,{component:"span",variant:"subtitle2",color:n.error?"error":"inherit",style:{fontWeight:400}},n.label))))}function Vp(e){let{data:n}=e;const r=vs();return t.createElement(L,{container:!0,item:!0,style:{maxWidth:"300px",overflow:"hidden"}},n.map(((e,n)=>{const o=e.descriptions.map(((e,n)=>t.createElement(Wp,{d:e,key:n})));return o.length>0&&t.createElement(L,{container:!0,item:!0,key:n,direction:"column",style:{paddingBottom:r.spacing(2)}},t.createElement(k,{noWrap:!0,key:n,variant:"subtitle1",align:"left",color:"textSecondary"},e.title),o)})))}function Gp(e){let{title:n="Error",message:r="",data:o=[]}=e;return t.createElement(L,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"}},t.createElement(L,{item:!0},t.createElement(Hp,{style:{fontSize:"38px"}})),t.createElement(L,{item:!0},t.createElement(k,{variant:"h6",align:"center","data-tid":"error-title"},n)),t.createElement(L,{item:!0},t.createElement(k,{variant:"subtitle1",align:"center","data-tid":"error-message"},r)),t.createElement(Vp,{data:o}))}const Kp=["size"],Zp={root:"".concat("Progress","-root"),front:"".concat("Progress","-front"),back:"".concat("Progress","-back")},Xp=Cs("div")((e=>{let{theme:t}=e;return{["&.".concat(Zp.root)]:{position:"relative",display:"inline-block"},["& .".concat(Zp.front)]:{color:t.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},["& .".concat(Zp.back)]:{color:t.palette.divider}}})),Jp={small:16,medium:32,large:64,xlarge:128};function Yp(e){let{size:n="medium"}=e,r=Z(e,Kp);const o=Jp[n];return t.createElement(Xp,{className:Zp.root},t.createElement($,K({variant:"determinate",value:100,className:Zp.back,size:o,thickness:3},r)),t.createElement($,K({variant:"indeterminate",disableShrink:!0,className:Zp.front,size:o,thickness:3},r)))}const Qp=["cancel","translator"],ed=["retry","translator"],td={stripes:"".concat("LongRunningQuery","-stripes")},nd=Cs(L)((()=>({["& .".concat(td.stripes)]:{"&::before":{position:"absolute",height:"100%",width:"100%",top:0,left:0,content:'""',backgroundSize:"14.14px 14.14px",backgroundImage:"linear-gradient(135deg, currentColor 10%, rgba(0,0,0,0) 10%, rgba(0,0,0,0) 50%, currentColor 50%, currentColor 59%, rgba(0,0,0,0) 60%, rgba(0,0,0,0) 103%)",opacity:.1}}})));function rd(e){let{cancel:n,translator:r}=e,o=Z(e,Qp);return t.createElement(t.Fragment,null,t.createElement(nd,{container:!0,item:!0,direction:"column",alignItems:"center",gap:2},t.createElement(L,{item:!0},t.createElement(Yp,null)),t.createElement(L,{item:!0},t.createElement(k,{variant:"h6",align:"center","data-tid":"update-active"},r.get("Object.Update.Active")))),t.createElement(L,K({item:!0},o),t.createElement(z,{variant:"contained",onClick:n},r.get("Cancel"))))}function od(e){let{retry:n,translator:r}=e,o=Z(e,ed);return t.createElement(t.Fragment,null,t.createElement(L,{item:!0},t.createElement(Hp,{style:{fontSize:"38px"}})),t.createElement(L,{item:!0},t.createElement(k,{variant:"h6",align:"center","data-tid":"update-cancelled"},r.get("Object.Update.Cancelled"))),t.createElement(L,{item:!0},t.createElement(z,K({variant:"contained",onClick:n},o),r.get("Retry"))))}function id(e){let{canCancel:n,canRetry:r,api:o}=e;const{translator:i}=g(jl);return t.createElement(L,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:td.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},n&&t.createElement(rd,{cancel:o.cancel,translator:i,className:td.cancel}),r&&t.createElement(od,{retry:o.retry,translator:i,className:td.retry}))}function ad(){return t.createElement(L,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},t.createElement(Yp,{size:"large"}))}const sd={containerStyle:"".concat("Header","-containerStyle"),containerTitleStyle:"".concat("Header","-containerTitleStyle")},ld=Cs(L)((e=>{let{theme:t}=e;return{["& .".concat(sd.containerStyle)]:{flexGrow:0},["& .".concat(sd.containerTitleStyle)]:{paddingBottom:t.spacing(1)}}})),cd="njs-cell-title",ud="njs-cell-sub-title";function pd(e){let{layout:n,sn:r,anchorEl:o,hovering:s,focusHandler:l}=e;const c=n.showTitles&&!!n.title,u=n.showTitles&&!!n.subtitle,p=n.qSelectionInfo&&n.qSelectionInfo.qInSelections,[d,h]=i([]),[f,m]=vc(),[g,y]=i(!1);a((()=>{r&&r.component&&r.component.isHooked&&r.component.observeActions((e=>{h([...e,...r&&r.selectionToolbar&&r.selectionToolbar.items||[]])}))}),[r]),a((()=>{if(!m)return;const{width:e}=m;y(e<221)}),[m]);const b=c||u,v=[sd.containerStyle,...b?[sd.containerTitleStyle]:[]],E=(s||p)&&(g||!b),x=b&&!E&&!g,C=t.createElement(Mu,{show:x,selections:{show:p,api:r.component.selections,onKeyDeactivate:l.refocusContent},actions:d,popover:{show:E,anchorEl:o},focusHandler:l});return t.createElement(ld,{ref:f,item:!0,container:!0,wrap:"nowrap",className:v.join(" ")},t.createElement(L,{item:!0,zeroMinWidth:!0,xs:!0},t.createElement(L,{container:!0,wrap:"nowrap",direction:"column"},c&&t.createElement(k,{variant:"h6",noWrap:!0,className:cd},n.title),u&&t.createElement(k,{variant:"body2",noWrap:!0,className:ud},n.subtitle))),t.createElement(L,{item:!0},C))}const dd={itemStyle:"".concat("Footer","-itemStyle")},hd=Cs(L)((e=>{let{theme:t}=e;return{["& .".concat(dd.itemStyle)]:{minWidth:0,paddingTop:t.spacing(1)}}})),fd="njs-cell-footer";function md(e){let{layout:n}=e;return n&&n.showTitles&&n.footnote?t.createElement(hd,{container:!0},t.createElement(L,{item:!0,className:dd.itemStyle},t.createElement(k,{noWrap:!0,variant:"body2",className:fd},n.footnote))):null}class gd{constructor(){this.timer=null,this.next=null,this.running=!1}start(){this.running||(this.running=!0,this.scheduleNext())}scheduleNext(){this.timer=setTimeout((()=>{this.doNext()}),10)}async doNext(){const e=this.next;this.next=null,e?(await e(),this.scheduleNext()):this.stop()}schedule(e){this.next=e,this.start()}stop(){this.running&&(clearTimeout(this.timer),this.timer=null,this.running=!1)}}const yd="njs-viz";function bd(e){let{sn:n,snOptions:r,snPlugins:o,layout:s,appLayout:l,halo:c}=e;const{component:u}=n,{theme:d,language:h,constraints:f,keyboardNavigation:m}=g(jl),[y]=i((()=>new gd)),[b,v]=i(!1),[E,x]=i(0),[C,S,w]=vc(),[L,k]=i(null),O=p((e=>{e&&k(e)}),[]);return a((()=>{if(L)return u.created({options:r}),u.mounted(L),v(!0),()=>{y.stop(),u.willUnmount()}}),[L,u]),a((()=>{b&&L&&S&&(!u.isHooked&&s&&s.qSelectionInfo&&s.qSelectionInfo.qInSelections||y.schedule((()=>{const e=[];return f.passive||e.push("passive"),f.active||e.push("interact"),f.select||e.push("select"),c.app&&c.app.session&&e.push("fetch"),Promise.resolve(u.render({layout:s,options:r,plugins:o,embed:c.public.nebbie,context:V({constraints:f,theme:c.public.theme,appLayout:l,keyboardNavigation:m},u.isHooked?{}:{logicalSize:n.logicalSize({layout:s}),localeInfo:(l||{}).qLocaleInfo,permissions:e})})).then((e=>{!1!==e&&(0===E&&"function"==typeof r.onInitialRender&&r.onInitialRender.call(null),x(E+1))}))})))}),[S,r,o,L,w,s,l,d,h,f,b,m]),t.createElement("div",{ref:C,"data-render-count":E,style:{position:"relative",height:"100%"},className:yd},t.createElement("div",{ref:O,style:{position:"absolute",width:"100%",height:"100%"}}))}const vd="njs-cell",Ed=(e,t)=>{switch(t.type){case"LOADING":return V(V({},e),{},{loading:!0});case"LOADED":return V(V({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return V(V({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return V(V({},e),{},{longRunningQuery:!0});case"ERROR":return V(V({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error("Unhandled type: ".concat(t.type))}};function xd(e){let{delay:n=750}=e;const[r,o]=i(!1);return a((()=>{const e=setTimeout((()=>o(!0)),n);return()=>clearTimeout(e)}),[]),r?t.createElement(ad,null):null}const Cd=e=>!e.qError||7005===e.qError.qErrorCode,Sd=(e,t,n,r,o)=>[...Array(e).keys()].map((e=>{const i=!(!t||!t[e]),a=i&&t[e].qError&&7005===t[e].qError.qErrorCode,s=i&&!a&&t[e].qError,l=a&&t[e].qCalcCondMsg,c="".concat(s?r:a?l||o:i&&t[e].qFallbackTitle||""),u=n(e);return{description:u?"".concat(u).concat(c.length?":":""):null,label:c,missing:t&&!i&&!s&&e>=t.length||a,error:s}})),wd=e=>e&&(Array.isArray(e)?e:[e])||[],Ld=(e,t,n,r)=>{const o=r.dimensions.min(),i=r.measures.min(),a=r.resolveLayout(t);return{reqDimErrors:Sd(o,wd(a.qDimensionInfo),(e=>r.dimensions.description(n,e)),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),reqMeasErrors:Sd(i,wd(a.qMeasureInfo),(e=>r.measures.description(n,e)),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"))}},kd=async(e,t,n,r)=>{let{targets:o}=n;const{hasUnfulfilledErrors:i,aggMinD:a,aggMinM:s,hasLayoutErrors:l,layoutErrors:c}=((e,t,n)=>{let r=!1,o=0,i=0,a=!1,s=!1;const l=[];for(let c=0;c<t.length;++c){const u=t[c],p=u.dimensions.min(),d=u.measures.min(),h=u.resolveLayout(n),f=wd(h.qDimensionInfo).filter(Cd),m=wd(h.qMeasureInfo).filter(Cd);if(o+=p,i+=d,(f.length<p||m.length<d)&&(r=!0),h.qError){a=!0,s=7005===h.qError.qErrorCode;const t=s&&h.qCalcCondMsg?h.qCalcCondMsg:s?e.get("Visualization.UnfulfilledCalculationCondition"):e.get("Visualization.LayoutError");l.push({title:t,descriptions:[]})}}return{hasUnfulfilledErrors:r,aggMinD:o,aggMinM:i,hasLayoutErrors:a,layoutErrors:l}})(e,o,t),u=[],p=[];let d=null;for(let n=0;n<o.length;++n){const a=o[n];if(!l&&i){const n=d||await r.getProperties();d=n;const o=Ld(e,t,n,a);u.push(...o.reqDimErrors),p.push(...o.reqMeasErrors)}}const h=u.filter((e=>!(e.missing||e.error))).length,f=e.get("Visualization.Incomplete.Dimensions",[h,a]),m=p.filter((e=>!(e.missing||e.error))).length,g=e.get("Visualization.Incomplete.Measures",[m,s]),y=[{title:f,descriptions:[...u]},{title:g,descriptions:[...p]}],b=l?c:y;return[l||i,{title:l?c[0].title:e.get("Visualization.Incomplete"),data:b}]},Od=l(((e,n)=>{let{halo:r,model:o,initialSnOptions:l,initialSnPlugins:c,initialError:p,onMount:d,currentId:h}=e;const{app:f,types:y}=r,{nebbie:b}=r.public,{disableCellPadding:v=!1}=r.context||{},{translator:E,language:x,keyboardNavigation:C}=g(jl),S=vs(),[w,k,O]=vc(),[R,q]=s(Ed,{loading:!1,loaded:!1,longRunningQuery:!1,error:(I=p)?{title:I.message}:null,sn:null,visualization:null});var I;const[_,{validating:T,canCancel:A,canRetry:D},N]=nc(o),[P]=rc(f),[M,j,z]=vc(),[F,B]=i(l),[$,H]=i(c),[W]=Bu(f,o),[G,K]=i(!1),Z=m({enter:null,leave:null}),X=m({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});a((()=>{Fu(X.current)}),[]),X.current.blurCallback=e=>{r.root.toggleFocusOfCells(),e&&z&&z.focus()},X.current.refocusContent=()=>{R.sn.component&&"function"==typeof R.sn.component.focus&&R.sn.component.focus()};a((()=>{if(p||!P||!_)return;if(R.visualization===_.visualization&&R.sn)return void(async e=>{const[t,n]=await kd(E,_,e.generator.qae.data,o);q(t?{type:"ERROR",error:n}:{type:"RENDER"}),(e=>{let{sn:t,layout:n,model:r}=e;const o=t&&t.component&&t.component.selections;if(o&&o.id&&r.id&&o.id===r.id){if(n&&n.qSelectionInfo&&n.qSelectionInfo.qInSelections&&!o.isModal()){const{targets:e}=t.generator.qae.data,n=e[0].propertyPath;o.goModal(n)}n.qSelectionInfo&&n.qSelectionInfo.qInSelections||o.isModal()&&o.noModal()}})({sn:R.sn,layout:_,model:o})})(R.sn);const e=y.getSupportedVersion(_.visualization,_.version);if(e)return(async(e,t)=>{q({type:"LOADING"});const n=await(async e=>{let{dispatch:t,types:n,visualization:r,version:o,model:i,app:a,selections:s,nebbie:l,focusHandler:c}=e;try{const e=await(async e=>{let{types:t,name:n,version:r}=e;return await t.get({name:n,version:r}).supernova()})({types:n,name:r,version:o});return e.create({model:i,app:a,selections:s,nebbie:l,focusHandler:c})}catch(e){t({type:"ERROR",error:{title:e.message}})}})({dispatch:q,types:y,visualization:e,version:t,model:o,app:f,selections:W,nebbie:b,focusHandler:X.current});n&&(q({type:"LOADED",sn:n,visualization:e}),d())})(_.visualization,e),()=>{};q({type:"ERROR",error:{title:"Could not find a version of '".concat(_.visualization,"' that supports current object version. Did you forget to register ").concat(_.visualization,"?")}})}),[y,R.sn,o,W,_,P,x]),a((()=>{if(!T)return;const e=setTimeout((()=>q({type:"LONG_RUNNING_QUERY"})),2e3);return()=>clearTimeout(e)}),[T]),u(n,(()=>({getQae:()=>R.sn.generator.qae,toggleFocus(e){"function"==typeof R.sn.component.focus&&(e?R.sn.component.focus():R.sn.component.blur())},setSnOptions:B,setSnPlugins:H,async takeSnapshot(){const{width:e,height:t}=k;let n=JSON.parse(JSON.stringify(_));return"function"==typeof R.sn.component.setSnapshotData&&(n=await R.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:E.language(),theme:S.name,appLayout:P,size:{width:Math.round(e),height:Math.round(t)}},layout:n}},async exportImage(){if("function"!=typeof r.config.snapshot.capture)throw new Error("Stardust embed has not been configured with snapshot.capture callback");const e=await this.takeSnapshot();return r.config.snapshot.capture(e)}})),[R.sn,j,k,_,S.name,P]);let J=null;return R.loading&&!R.longRunningQuery?J=t.createElement(xd,null):R.error?J=t.createElement(Gp,R.error):R.loaded&&(J=t.createElement(bd,{key:_.visualization,sn:R.sn,halo:r,snOptions:F,snPlugins:$,layout:_,appLayout:P})),t.createElement(U,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},elevation:0,square:!0,className:vd,ref:w,onMouseEnter:()=>{Z.current.leave&&clearTimeout(Z.current.leave),Z.enter||(Z.current.enter=setTimeout((()=>{K(!0),Z.current.enter=null}),250))},onMouseLeave:()=>{Z.current.enter&&clearTimeout(Z.current.enter),Z.current.leave||(Z.current.leave=setTimeout((()=>{K(!1),Z.current.leave=null}),750))}},t.createElement(L,{container:!0,direction:"column",gap:0,style:V(V({position:"relative",width:"100%",height:"100%"},v?{}:{padding:S.spacing(1)}),R.longRunningQuery?{opacity:"0.3"}:{})},O&&_&&R.sn&&t.createElement(pd,{layout:_,sn:R.sn,anchorEl:O,hovering:G,focusHandler:X.current}," "),t.createElement(L,{tabIndex:C?0:-1,onKeyDown:C?e=>{["Enter"," ","Spacebar"].includes(e.key)&&r.root.toggleFocusOfCells(h)}:null,item:!0,xs:!0,style:{height:"100%"},ref:M},J),t.createElement(md,{layout:_})),R.longRunningQuery&&t.createElement(id,{canCancel:A,canRetry:D,api:N}))}));function Rd(e){let{halo:n,element:r,model:o,initialSnOptions:i,initialSnPlugins:a,onMount:s,initialError:l}=e;const{root:c}=n,u=t.createRef(),p=Lp(),d=y.createPortal(t.createElement(Od,{ref:u,halo:n,model:o,currentId:p,initialSnOptions:i,initialSnPlugins:a,initialError:l,onMount:s}),r,o.id),h=()=>{c.remove(d),o.removeListener("closed",h)};return o.on("closed",h),c.add(d),c.addCell(p,u),[h,u]}function qd(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Id(e,t){return qd(e)&&qd(t)?JSON.stringify(e)===JSON.stringify(t):!Array.isArray(e)&&!Array.isArray(t)&&e===t}function _d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const r=[];return Object.keys(t).forEach((o=>{const i=t[o];"object"!=typeof n[o]||"object"!=typeof i||Array.isArray(i)?Id(i,n[o])||r.push({qPath:e+o,qOp:"add",qValue:JSON.stringify(t[o])}):r.push(..._d("".concat(e).concat(o,"/"),t[o],n[o]))})),r}function Td(e){if(!Array.isArray(e))throw new Error("Invalid plugin format: plugins should be an array!");e.forEach((e=>{if("object"!=typeof e)throw new Error("Invalid plugin format: a plugin should be an object");if("object"!=typeof e.info||"string"!=typeof e.info.name)throw new Error("Invalid plugin format: a plugin should have an info object containing a name");if("function"!=typeof e.fn)throw new Error('Invalid plugin format: The plugin "'.concat(e.info.name,'" has no "fn" function'))}))}const Ad=()=>{};function Dd(){let{model:e,halo:t,initialError:n,onDestroy:r=(async()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=Ad,i=null,a=null,s=null;const l=new Promise((e=>{s=e}));let c={},u=[];const p=async e=>{a?(async()=>{await l,i.current.setSnOptions(V(V({},c),e))})():c=V(V({},c),e)},d=async e=>{Td(e),a?(async()=>{await l,i.current.setSnPlugins(e)})():u=e},h={id:e.id,async destroy(){await r(),o(),o=Ad},async convertTo(n){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=await $p({halo:t,model:e,cellRef:i,newType:n});return r&&(e.__snInterceptor?await e.__snInterceptor.setProperties.call(e,o.qProperty):await e.setProperties(o.qProperty)),o},__DO_NOT_USE__:{mount(r){if(a)throw new Error("Already mounted");return a=r,[o,i]=Rd({halo:t,element:r,model:e,initialSnOptions:c,initialSnPlugins:u,initialError:n,onMount:s}),l},async applyProperties(t){const n=_d("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){p(e)},plugins(e){d(e)},exportImage:()=>i.current.exportImage(),takeSnapshot:()=>i.current.takeSnapshot(),getModel:()=>e}};return h}async function Nd(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:async()=>{};const i=Dd({model:e,halo:n,initialError:r,onDestroy:o});return t.options&&i.__DO_NOT_USE__.options(t.options),t.plugins&&i.__DO_NOT_USE__.plugins(t.plugins),t.element&&await i.__DO_NOT_USE__.mount(t.element),i}async function Pd(e,t){let n,{type:r,version:o,fields:i,properties:a,options:s,plugins:l,element:c}=e,u={};try{const e=t.types.get({name:r,version:o});u=await e.initialProperties(a);const n=await e.supernova();i&&Rp({sn:n,properties:u,fields:i}),a&&n&&n.qae.properties.onChange&&n.qae.properties.onChange.call({},u)}catch(e){n=e,u={qInfo:{qType:r},visualization:r}}const p=await t.app.createSessionObject(u);Ql.set(p.id,p);const d=(e=>{const t=Jl({type:"SET",value:e});return()=>{t(),Ql.clear(e.id)}})(p);return Nd(p,{options:s,plugins:l,element:c},t,n,(async()=>{await t.app.destroySessionObject(p.id),d()}))}async function Md(e,t){let{id:n,options:r,plugins:o,element:i}=e;const a="".concat(n);let s=Gl.get(a);s||(s=t.app.getObject(n),Gl.set(a,s));const l=await s;return Ql.set(a,l),Nd(l,{options:r,plugins:o,element:i},t)}function jd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{isEnabled:t=>!0===e[t]}}const zd=de.bind(null,!0),Fd={},{isArray:Bd}=Array;function $d(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Ud(e){return void 0===e}function Hd(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Wd(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=Ud(e[r||t])?i:e[t],e=e[r||t]})),e}function Vd(e,t){let n=!0;if($d(e)&&$d(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{Vd(e[r],t[r])||(n=!1)})),n);if(Bd(e)&&Bd(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Vd(e[n],t[n]))return!1;return!0}return e===t}Fd.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?zd({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);Vd(i,a)||Hd(t,o)||(Ud(a)?r.push({op:"add",path:s,value:i}):$d(i)&&$d(a)?r=r.concat(Fd.generate(a,i,s)):Bd(i)&&Bd(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&Ud(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Vd(t,o))return r;if(!Ud(t[0])&&Ud(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:"".concat(n,"/").concat(e)}),o.splice(e,1)):r=r.concat(Fd.generate(o[e],t[i],"".concat(n,"/").concat(e)));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:"".concat(n,"/").concat(e),value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:"".concat(n,"/").concat(e),from:"".concat(n,"/").concat(i)}),o.splice(e,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((o=>{Ud(t[o])&&!Hd(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},Fd.apply=function(e,t){t.forEach((t=>{let n=Wd(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Bd(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Bd(o)&&Bd(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if($d(o)&&$d(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Hd(a,e)&&delete a[e]})),zd(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=Wd(e,t.from);Bd(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Bd(n)?n.splice(+r,1):delete n[r]);var a}))},Fd.clone=function(e){return zd({},e)},Fd.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Fd.updateObject=function(e,t){Object.keys(e).length?Fd.apply(e,Fd.generate(e,t)):zd(e,t)};const Gd=e=>t=>{const n=(r=V(V({},t),{},{action(){"function"==typeof t.action&&t.action.call(n,e),n.emit("changed")},enabled:()=>"function"!=typeof t.enabled||t.enabled.call(n,e),active:"function"==typeof t.active?function(){return t.active.call(n,e)}:void 0}),Object.keys(re.prototype).forEach((e=>{r[e]=re.prototype[e]})),re.init(r),r);var r;return n};let Kd,Zd;function Xd(e,t){if(!e)return!0;if(t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!0;return!1}function Jd(e){let{explicitResize:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.__hooks={obsolete:!1,error:!1,waitForData:!1,chain:{promise:null,resolve:()=>{}},list:[],snaps:[],actions:{list:[]},pendingEffects:[],pendingLayoutEffects:[],pendingPromises:[],resizer:{setters:[],explicitResize:t},accessibility:{setter:null}}}function Yd(e){eh(e.__hooks.list,!0),e.__hooks.obsolete=!0,e.__hooks.list.length=0,e.__hooks.pendingEffects.length=0,e.__hooks.pendingLayoutEffects.length=0,e.__hooks.actions=null,e.__hooks.imperativeHandle=null,e.__hooks.resizer=null,e.__hooks.accessibility=null,e.__actionsDispatch=null,clearTimeout(e.__hooks.micro),cancelAnimationFrame(e.__hooks.macro)}async function Qd(e){if(e.__hooks.obsolete)return Promise.resolve();Zd=-1,Kd=e,Kd.__hooks.initiated&&Kd.__hooks.list.length;try{Kd.fn.call(null)}catch(e){console.error(e)}Kd.__hooks.initiated=!0;const t=Kd.__hooks;return rh(Kd),Zd=void 0,Kd=void 0,t.chain.promise||(t.chain.promise=new Promise((e=>{t.chain.resolve=e}))),function(e){eh(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame((()=>{!function(e){eh(e.pendingEffects),e.macro=null,function(e){if(e.pendingPromises.length||e.micro||e.macro)return;e.chain.promise=null,e.chain.resolve(!e.waitForData)}(e)}(e)}))}(t),t.chain.promise}function eh(e,t){try{e.forEach((e=>{"function"==typeof e.teardown&&e.teardown(),t||(e.teardown=e.value[0]())}))}catch(e){console.error(e)}e.length=0}function th(e,t){try{return Promise.all(e.__hooks.snaps.map((e=>Promise.resolve(e.fn(t))))).then((e=>e[e.length-1]))}catch(e){console.error(e)}return Promise.resolve()}function nh(e){return e.__hooks.imperativeHandle}function rh(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function oh(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,rh(e))}function ih(e){if(void 0===Kd)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=Kd.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function ah(e){ih(++Zd);return Kd.context[e]}function sh(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function lh(e){return{__hooked:!0,fn:e,initiate:Jd,run:Qd,teardown:Yd,runSnaps:th,focus:Nh,blur:Ph,observeActions:oh,getImperativeHandle:nh,updateRectOnNextRun:sh}}function ch(e){const t=ih(++Zd);if(!t.value){t.component=Kd;const n=e=>{if(t.component.__hooks.obsolete)return;const n="function"==typeof e?e(t.value[0]):e;var r;n!==t.value[0]&&(t.value[0]=n,(r=t.component).__hooks.micro||(r.__hooks.micro=setTimeout((()=>{r.__hooks.micro=null,Qd(r)}),0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function uh(e,t){const n=ih(++Zd);Xd(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===Kd.__hooks.pendingEffects.indexOf(n)&&Kd.__hooks.pendingEffects.push(n))}function ph(e,t){const n=ih(++Zd);Xd(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],Kd.__hooks.pendingLayoutEffects.push(n))}function dh(e,t){const n=ih(++Zd);return Xd(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function hh(e,t){const[n,r]=ch((()=>({resolved:void 0,rejected:void 0,state:"pending"}))),o=ih(++Zd);return o.component||(o.component=Kd),ph((()=>{let t=!1;return o.teardown=()=>{t=!0,o.teardown=null;const e=o.component.__hooks.pendingPromises.indexOf(o);e>-1&&o.component.__hooks.pendingPromises.splice(e,1)},e().then((e=>{t||(o.teardown&&o.teardown(),r({resolved:e,rejected:void 0,state:"resolved"}))})).catch((e=>{t||(o.teardown&&o.teardown(),r({resolved:void 0,rejected:e,state:"resolved"}))})),o.component.__hooks.pendingPromises.push(o),()=>{o.teardown&&o.teardown()}}),t),[n.resolved,n.rejected]}function fh(){return ah("element")}function mh(){const e=fh(),t=Kd.__hooks.resizer,[n,r]=ch((()=>{const{left:t,top:n,width:r,height:o}=e.getBoundingClientRect();return{left:t,top:n,width:r,height:o}}));return t.current=n,-1===t.setters.indexOf(r)&&t.setters.push(r),t.update&&t.resize&&(t.update=!1,t.resize()),ph((()=>{if(t.initiated)return;t.initiated=!0;const n=()=>{const{left:n,top:r,width:o,height:i}=e.getBoundingClientRect(),a=t.current;a.width===o&&a.height===i&&a.left===n&&a.top===r||t.setters.forEach((e=>e({left:n,top:r,width:o,height:i})))};if(t.resize=()=>{n()},t.explicitResize)return()=>{t.resize=void 0};if("function"==typeof ResizeObserver){let r=new ResizeObserver(n);return r.observe(e),()=>{r.unobserve(e),r.disconnect(e),r=null,t.resize=void 0}}}),[e]),n}function gh(){return ah("layout")}function yh(){const e=ah("layout"),[t]=ch({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current}function bh(){return ah("appLayout")}function vh(){const e=ah("model");return e&&e.session?e:void 0}function Eh(){const e=ah("app");return e&&e.session?e:void 0}function xh(){const e=ah("global");return e&&e.session?e:void 0}function Ch(){return ah("selections")}function Sh(){return ah("theme")}function wh(){return ah("nebbie")}function Lh(){return ah("translator")}function kh(){return ah("deviceType")}function Oh(){return ah("plugins")}function Rh(e,t){const[n]=ch({action(){n._config.action.call(null)}});return n.component||(n.component=Kd,Kd.__hooks.actions.list.push(n)),dh((()=>{const t=e();n._config=t,n.active=t.active||!1,n.disabled=t.disabled||!1,n.hidden=t.hidden||!1,n.label=t.label||"",n.getSvgIconShape=t.icon?()=>t.icon:void 0,n.key=t.key||n.component.__hooks.actions.list.length,n.component.__hooks.actions.changed=!0}),t),n.action}function qh(){return ah("constraints")}function Ih(){return ah("options")}function _h(e,t){const n=ih(++Zd);if(n.imperative||(n.imperative=!0),Xd(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],Kd.__hooks.imperativeHandle=r}}function Th(e){const t=ih(++Zd);t.value||(t.value=1,Kd.__hooks.snaps.push(t)),t.fn=e}function Ah(){ih(++Zd);const e=Kd.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}}function Dh(){const e=ah("keyboardNavigation"),t=ah("focusHandler");if(!Kd.__hooks.accessibility.exitFunction){const e=function(e){const n=this.__hooks.accessibility;n.enabled&&n.active&&(Ph(this),t&&t.blurCallback&&t.blurCallback(e))}.bind(Kd);Kd.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),Nh(this))}.bind(Kd);Kd.__hooks.accessibility.focusFunction=n;const r=function(e){this.__hooks.accessibility.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind(Kd);Kd.__hooks.accessibility.focusSelectionFunction=r}const n=Kd.__hooks.accessibility.focusFunction,r=Kd.__hooks.accessibility.exitFunction,o=Kd.__hooks.accessibility.focusSelectionFunction,[i,a]=ch({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return Kd.__hooks.accessibility.setter=a,Kd.__hooks.accessibility.enabled=e,uh((()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o})),[e]),i}function Nh(e){const t=e.__hooks.accessibility;t.active||(t.active=!0,t&&t.setter&&t.setter({active:!0,enabled:t.enabled,blur:t.exitFunction,focus:t.focusFunction,focusSelection:t.focusSelectionFunction}))}function Ph(e){const t=e.__hooks.accessibility;t&&t.active&&(t.active=!1,t&&t.setter&&t.setter({active:!1,enabled:t.enabled,blur:t.exitFunction,focus:t.focusFunction,focusSelection:t.focusSelectionFunction}))}const Mh={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},jh=Object.keys(Mh);function zh(e,t){const n=V({},Mh);var r;r=n,Object.keys(re.prototype).forEach((e=>{r[e]=re.prototype[e]})),re.init(r);const o={emit(){n.emit(...arguments)}};Object.keys(e.component||{}).forEach((t=>{-1!==jh.indexOf(t)?n[t]=e.component[t].bind(o):o[t]=e.component[t]}));const i=function(e){let{sn:t,component:n}=e;const r={},o=[],i=Gd(n);return((t.definition.selectionToolbar||{}).items||[]).forEach((e=>{const t=i(e);r[e.key]=t,o.push(t)})),(t.definition.actions||[]).forEach((e=>{const t=i(e);r[e.key]=t})),{actions:r,selectionToolbarItems:o,destroy(){o.length=0}}}({sn:e,component:o}),a=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):null;return Object.assign(o,{model:t.model,app:t.app,global:a,selections:t.selections,actions:i.actions}),Object.assign(n,{actions:i.actions,model:t.model,app:t.app,selections:t.selections}),[n,i]}function Fh(e,t,n){"function"==typeof e.component&&(e.component=lh(e.component));const[r,o]=e.component&&e.component.__hooked?function(e,t,n){const r=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):void 0;let o=!1;const i={},a=["appLayout","constraints"],s={};t.model&&t.model.session||(s.select=!0);const l={context:{model:t.model,app:t.app,global:r,selections:t.selections,nebbie:t.nebbie,element:void 0,deviceType:n.deviceType,theme:void 0,translator:n.translator,layout:{},appLayout:{},keyboardNavigation:t.keyboardNavigation,focusHandler:t.focusHandler,constraints:s,options:{},plugins:[]},fn:e.component.fn,created(){},mounted(n){this.context.element=n,e.component.initiate(l,{explicitResize:!!t.explicitResize})},render(t){let n=!o||!1;if(t){if(t.layout&&t.layout!==this.context.layout&&(n=!0,this.context.layout=t.layout),t.context&&t.context.theme&&(this.context.theme=t.context.theme),t.context&&!!t.context.keyboardNavigation!=!!this.context.keyboardNavigation&&(this.context.keyboardNavigation=!!t.context.keyboardNavigation,n=!0),t.context&&t.context.focusHandler&&(this.context.focusHandler=t.context.focusHandler),t.options){const e={};let r=!1;Object.keys(t.options).forEach((n=>{e[n]=t.options[n],this.context.options[n]!==t.options[n]&&(r=!0)})),r&&(this.context.options=e,n=!0)}if(t.plugins){let e=this.context.plugins.length!==t.plugins.length;t.plugins.forEach(((t,n)=>{this.context.plugins[n]!==t&&(e=!0)})),e&&(this.context.plugins=[...t.plugins],n=!0)}a.forEach((e=>{const r=t.context;if(r&&Object.prototype.hasOwnProperty.call(r,e)){let t=JSON.stringify(r[e]);"constraints"===e&&(t=JSON.stringify(V(V({},r[e]),s))),t!==i[e]&&(n=!0,i[e]=t,this.context[e]=JSON.parse(t))}}))}else n=!0;return this.context.theme&&this.context.theme.name()!==i.themeName&&(n=!0,i.themeName=this.context.theme.name()),this.context.translator.language()!==i.language&&(n=!0,i.language=l.context.translator.language()),n?(o=!0,this.currentResult=e.component.run(this),this.currentResult):this.currentResult||Promise.resolve()},resize(){return e.component.updateRectOnNextRun(this),this.render()},willUnmount(){e.component.teardown(this)},setSnapshotData(t){return e.component.runSnaps(this,t)},focus(){e.component.focus(this)},blur(){e.component.blur(this)},getImperativeHandle(){return e.component.getImperativeHandle(this)},destroy(){},observeActions(t){e.component.observeActions(this,t)},isHooked:!0};return a.forEach((e=>{i[e]=JSON.stringify(l.context[e])})),i.themeName=l.context.theme?l.context.theme.name():void 0,i.language=l.context.translator?l.context.translator.language():void 0,Object.assign(l,{selections:t.selections}),[l,null]}(e,t,n):zh(e,t),i=[];return t.model.__snInterceptor&&t.model.__snInterceptor.teardown(),e.qae.properties.onChange&&(t.model.__snInterceptor={setProperties:t.model.setProperties,applyPatches:t.model.applyPatches,teardown:void 0},t.model.setProperties=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.qae.properties.onChange.call({model:t.model},...r),t.model.__snInterceptor.setProperties.call(this,...r)},t.model.applyPatches=function(n,r){const o=r?"getEffectiveProperties":"getProperties";return t.model[o]().then((o=>{const i=Fd.clone(o),a=n.map((e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath})));Fd.apply(o,a),e.qae.properties.onChange.call({model:t.model},o);const s=Fd.generate(i,o).map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})));return t.model.__snInterceptor.applyPatches.call(this,s,r)}))},t.model.__snInterceptor.teardown=()=>{t.model.setProperties=t.model.__snInterceptor.setProperties,delete t.model.__snInterceptor},i.push(t.model.__snInterceptor.teardown)),{generator:e,component:r,selectionToolbar:{items:o?o.selectionToolbarItems:[]},destroy(){i.forEach((e=>e()))},logicalSize:e.definition.logicalSize||(()=>!1)}}const Bh=()=>{};function $h(e,t){return void 0===e?()=>t:()=>e}function Uh(e){const t=e||{};return{min:"function"==typeof t.min?t.min:$h(t.min,0),max:"function"==typeof t.max?t.max:$h(t.max,1e3),added:t.added||t.add||Bh,description:t.description||Bh,moved:t.moved||t.move||Bh,removed:t.removed||t.remove||Bh,replaced:t.replaced||t.replace||Bh,isDefined:()=>!!e}}function Hh(e){const t=e.path||"/qHyperCubeDef",n=t.slice(0,-3);if(!1===/\/(qHyperCube|qListObject)$/.test(n)){const e=n.includes("/qHyperCube")?"qHyperCubeDef":"qListObjectDef";throw new Error("Incorrect definition for ".concat(e," at ").concat(t,". Valid paths include /qHyperCubeDef or /qListObjectDef, e.g. data/qHyperCubeDef"))}return{propertyPath:t,layoutPath:n,resolveLayout:e=>((e,t,n)=>{const r=t.split("/");let o=e;if(void 0===o)return n;for(let e=0;e<r.length;++e)if(""!==r[e]){if(void 0===o[r[e]])return n;o=o[r[e]]}return o})(e,n,{}),dimensions:Uh(e.dimensions),measures:Uh(e.measures)}}function Wh(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.properties||{};t.properties&&(t.properties.initial||t.properties.onChange)&&(n=t.properties.initial,e=t.properties.onChange);const r={properties:{initial:n,onChange:e},data:{targets:((t.data||{}).targets||[]).map(Hh)},exportProperties:t.exportProperties,importProperties:t.importProperties};return r}function Vh(e,t){let n;n="function"==typeof e?e(t):e;const r={qae:Wh(n.qae),component:n.component||{},create:e=>Fh(r,e,t),definition:{}};return Object.keys(n).forEach((e=>{r[e]||(r.definition[e]=n[e])})),r}var Gh={exports:{}};!function(e,t){var n;t=e.exports=p,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,o=t.re=[],i=t.src=[],a=t.tokens={},s=0;function l(e){a[e]=s++}l("NUMERICIDENTIFIER"),i[a.NUMERICIDENTIFIER]="0|[1-9]\\d*",l("NUMERICIDENTIFIERLOOSE"),i[a.NUMERICIDENTIFIERLOOSE]="[0-9]+",l("NONNUMERICIDENTIFIER"),i[a.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",l("MAINVERSION"),i[a.MAINVERSION]="("+i[a.NUMERICIDENTIFIER]+")\\.("+i[a.NUMERICIDENTIFIER]+")\\.("+i[a.NUMERICIDENTIFIER]+")",l("MAINVERSIONLOOSE"),i[a.MAINVERSIONLOOSE]="("+i[a.NUMERICIDENTIFIERLOOSE]+")\\.("+i[a.NUMERICIDENTIFIERLOOSE]+")\\.("+i[a.NUMERICIDENTIFIERLOOSE]+")",l("PRERELEASEIDENTIFIER"),i[a.PRERELEASEIDENTIFIER]="(?:"+i[a.NUMERICIDENTIFIER]+"|"+i[a.NONNUMERICIDENTIFIER]+")",l("PRERELEASEIDENTIFIERLOOSE"),i[a.PRERELEASEIDENTIFIERLOOSE]="(?:"+i[a.NUMERICIDENTIFIERLOOSE]+"|"+i[a.NONNUMERICIDENTIFIER]+")",l("PRERELEASE"),i[a.PRERELEASE]="(?:-("+i[a.PRERELEASEIDENTIFIER]+"(?:\\."+i[a.PRERELEASEIDENTIFIER]+")*))",l("PRERELEASELOOSE"),i[a.PRERELEASELOOSE]="(?:-?("+i[a.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+i[a.PRERELEASEIDENTIFIERLOOSE]+")*))",l("BUILDIDENTIFIER"),i[a.BUILDIDENTIFIER]="[0-9A-Za-z-]+",l("BUILD"),i[a.BUILD]="(?:\\+("+i[a.BUILDIDENTIFIER]+"(?:\\."+i[a.BUILDIDENTIFIER]+")*))",l("FULL"),l("FULLPLAIN"),i[a.FULLPLAIN]="v?"+i[a.MAINVERSION]+i[a.PRERELEASE]+"?"+i[a.BUILD]+"?",i[a.FULL]="^"+i[a.FULLPLAIN]+"$",l("LOOSEPLAIN"),i[a.LOOSEPLAIN]="[v=\\s]*"+i[a.MAINVERSIONLOOSE]+i[a.PRERELEASELOOSE]+"?"+i[a.BUILD]+"?",l("LOOSE"),i[a.LOOSE]="^"+i[a.LOOSEPLAIN]+"$",l("GTLT"),i[a.GTLT]="((?:<|>)?=?)",l("XRANGEIDENTIFIERLOOSE"),i[a.XRANGEIDENTIFIERLOOSE]=i[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",l("XRANGEIDENTIFIER"),i[a.XRANGEIDENTIFIER]=i[a.NUMERICIDENTIFIER]+"|x|X|\\*",l("XRANGEPLAIN"),i[a.XRANGEPLAIN]="[v=\\s]*("+i[a.XRANGEIDENTIFIER]+")(?:\\.("+i[a.XRANGEIDENTIFIER]+")(?:\\.("+i[a.XRANGEIDENTIFIER]+")(?:"+i[a.PRERELEASE]+")?"+i[a.BUILD]+"?)?)?",l("XRANGEPLAINLOOSE"),i[a.XRANGEPLAINLOOSE]="[v=\\s]*("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:"+i[a.PRERELEASELOOSE]+")?"+i[a.BUILD]+"?)?)?",l("XRANGE"),i[a.XRANGE]="^"+i[a.GTLT]+"\\s*"+i[a.XRANGEPLAIN]+"$",l("XRANGELOOSE"),i[a.XRANGELOOSE]="^"+i[a.GTLT]+"\\s*"+i[a.XRANGEPLAINLOOSE]+"$",l("COERCE"),i[a.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",l("COERCERTL"),o[a.COERCERTL]=new RegExp(i[a.COERCE],"g"),l("LONETILDE"),i[a.LONETILDE]="(?:~>?)",l("TILDETRIM"),i[a.TILDETRIM]="(\\s*)"+i[a.LONETILDE]+"\\s+",o[a.TILDETRIM]=new RegExp(i[a.TILDETRIM],"g");l("TILDE"),i[a.TILDE]="^"+i[a.LONETILDE]+i[a.XRANGEPLAIN]+"$",l("TILDELOOSE"),i[a.TILDELOOSE]="^"+i[a.LONETILDE]+i[a.XRANGEPLAINLOOSE]+"$",l("LONECARET"),i[a.LONECARET]="(?:\\^)",l("CARETTRIM"),i[a.CARETTRIM]="(\\s*)"+i[a.LONECARET]+"\\s+",o[a.CARETTRIM]=new RegExp(i[a.CARETTRIM],"g");l("CARET"),i[a.CARET]="^"+i[a.LONECARET]+i[a.XRANGEPLAIN]+"$",l("CARETLOOSE"),i[a.CARETLOOSE]="^"+i[a.LONECARET]+i[a.XRANGEPLAINLOOSE]+"$",l("COMPARATORLOOSE"),i[a.COMPARATORLOOSE]="^"+i[a.GTLT]+"\\s*("+i[a.LOOSEPLAIN]+")$|^$",l("COMPARATOR"),i[a.COMPARATOR]="^"+i[a.GTLT]+"\\s*("+i[a.FULLPLAIN]+")$|^$",l("COMPARATORTRIM"),i[a.COMPARATORTRIM]="(\\s*)"+i[a.GTLT]+"\\s*("+i[a.LOOSEPLAIN]+"|"+i[a.XRANGEPLAIN]+")",o[a.COMPARATORTRIM]=new RegExp(i[a.COMPARATORTRIM],"g");l("HYPHENRANGE"),i[a.HYPHENRANGE]="^\\s*("+i[a.XRANGEPLAIN]+")\\s+-\\s+("+i[a.XRANGEPLAIN]+")\\s*$",l("HYPHENRANGELOOSE"),i[a.HYPHENRANGELOOSE]="^\\s*("+i[a.XRANGEPLAINLOOSE]+")\\s+-\\s+("+i[a.XRANGEPLAINLOOSE]+")\\s*$",l("STAR"),i[a.STAR]="(<|>)?=?\\s*\\*";for(var c=0;c<s;c++)n(c,i[c]),o[c]||(o[c]=new RegExp(i[c]));function u(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof p)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?o[a.LOOSE]:o[a.FULL]).test(e))return null;try{return new p(e,t)}catch(e){return null}}function p(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof p){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof p))return new p(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var i=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!i)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<r)return t}return e})):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}t.parse=u,t.valid=function(e,t){var n=u(e,t);return n?n.version:null},t.clean=function(e,t){var n=u(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=p,p.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},p.prototype.toString=function(){return this.version},p.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof p||(e=new p(e,this.options)),this.compareMain(e)||this.comparePre(e)},p.prototype.compareMain=function(e){return e instanceof p||(e=new p(e,this.options)),h(this.major,e.major)||h(this.minor,e.minor)||h(this.patch,e.patch)},p.prototype.comparePre=function(e){if(e instanceof p||(e=new p(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return h(r,o)}while(++t)},p.prototype.compareBuild=function(e){e instanceof p||(e=new p(e,this.options));var t=0;do{var r=this.build[t],o=e.build[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return h(r,o)}while(++t)},p.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new p(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(y(e,t))return null;var n=u(e),r=u(t),o="";if(n.prerelease.length||r.prerelease.length){o="pre";var i="prerelease"}for(var a in n)if(("major"===a||"minor"===a||"patch"===a)&&n[a]!==r[a])return o+a;return i},t.compareIdentifiers=h;var d=/^[0-9]+$/;function h(e,t){var n=d.test(e),r=d.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function f(e,t,n){return new p(e,n).compare(new p(t,n))}function m(e,t,n){return f(e,t,n)>0}function g(e,t,n){return f(e,t,n)<0}function y(e,t,n){return 0===f(e,t,n)}function b(e,t,n){return 0!==f(e,t,n)}function v(e,t,n){return f(e,t,n)>=0}function E(e,t,n){return f(e,t,n)<=0}function x(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return y(e,n,r);case"!=":return b(e,n,r);case">":return m(e,n,r);case">=":return v(e,n,r);case"<":return g(e,n,r);case"<=":return E(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function C(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof C){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof C))return new C(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===S?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return h(t,e)},t.major=function(e,t){return new p(e,t).major},t.minor=function(e,t){return new p(e,t).minor},t.patch=function(e,t){return new p(e,t).patch},t.compare=f,t.compareLoose=function(e,t){return f(e,t,!0)},t.compareBuild=function(e,t,n){var r=new p(e,n),o=new p(t,n);return r.compare(o)||r.compareBuild(o)},t.rcompare=function(e,t,n){return f(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compareBuild(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.compareBuild(r,e,n)}))},t.gt=m,t.lt=g,t.eq=y,t.neq=b,t.gte=v,t.lte=E,t.cmp=x,t.Comparator=C;var S={};function w(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof w)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new w(e.raw,t);if(e instanceof C)return new w(e.value,t);if(!(this instanceof w))return new w(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function L(e,t){for(var n=!0,r=e.slice(),o=r.pop();n&&r.length;)n=r.every((function(e){return o.intersects(e,t)})),o=r.pop();return n}function k(e){return!e||"x"===e.toLowerCase()||"*"===e}function O(e,t,n,r,o,i,a,s,l,c,u,p,d){return((t=k(n)?"":k(r)?">="+n+".0.0":k(o)?">="+n+"."+r+".0":">="+t)+" "+(s=k(l)?"":k(c)?"<"+(+l+1)+".0.0":k(u)?"<"+l+"."+(+c+1)+".0":p?"<="+l+"."+c+"."+u+"-"+p:"<="+s)).trim()}function R(e,t,r){for(var o=0;o<e.length;o++)if(!e[o].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(o=0;o<e.length;o++)if(n(e[o].semver),e[o].semver!==S&&e[o].semver.prerelease.length>0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function q(e,t,n){try{t=new w(t,n)}catch(e){return!1}return t.test(e)}function I(e,t,n,r){var o,i,a,s,l;switch(e=new p(e,r),t=new w(t,r),n){case">":o=m,i=E,a=g,s=">",l=">=";break;case"<":o=g,i=v,a=m,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(q(e,t,r))return!1;for(var c=0;c<t.set.length;++c){var u=t.set[c],d=null,h=null;if(u.forEach((function(e){e.semver===S&&(e=new C(">=0.0.0")),d=d||e,h=h||e,o(e.semver,d.semver,r)?d=e:a(e.semver,h.semver,r)&&(h=e)})),d.operator===s||d.operator===l)return!1;if((!h.operator||h.operator===s)&&i(e,h.semver))return!1;if(h.operator===l&&a(e,h.semver))return!1}return!0}C.prototype.parse=function(e){var t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new p(n[2],this.options.loose):this.semver=S},C.prototype.toString=function(){return this.value},C.prototype.test=function(e){if(n("Comparator.test",e,this.options.loose),this.semver===S||e===S)return!0;if("string"==typeof e)try{e=new p(e,this.options)}catch(e){return!1}return x(e,this.operator,this.semver,this.options)},C.prototype.intersects=function(e,t){if(!(e instanceof C))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(n=new w(e.value,t),q(this.value,n,t));if(""===e.operator)return""===e.value||(n=new w(this.value,t),q(e.semver,n,t));var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=x(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=x(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||o||i&&a||s||l},t.Range=w,w.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},w.prototype.toString=function(){return this.range},w.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[a.HYPHENRANGELOOSE]:o[a.HYPHENRANGE];e=e.replace(r,O),n("hyphen replace",e),e=e.replace(o[a.COMPARATORTRIM],"$1$2$3"),n("comparator trim",e,o[a.COMPARATORTRIM]),e=(e=(e=e.replace(o[a.TILDETRIM],"$1~")).replace(o[a.CARETTRIM],"$1^")).split(/\s+/).join(" ");var i=t?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?o[a.CARETLOOSE]:o[a.CARET];return e.replace(r,(function(t,r,o,i,a){var s;return n("caret",e,t,r,o,i,a),k(r)?s="":k(o)?s=">="+r+".0.0 <"+(+r+1)+".0.0":k(i)?s="0"===r?">="+r+"."+o+".0 <"+r+"."+(+o+1)+".0":">="+r+"."+o+".0 <"+(+r+1)+".0.0":a?(n("replaceCaret pr",a),s="0"===r?"0"===o?">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+o+"."+(+i+1):">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+(+o+1)+".0":">="+r+"."+o+"."+i+"-"+a+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===o?">="+r+"."+o+"."+i+" <"+r+"."+o+"."+(+i+1):">="+r+"."+o+"."+i+" <"+r+"."+(+o+1)+".0":">="+r+"."+o+"."+i+" <"+(+r+1)+".0.0"),n("caret return",s),s}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?o[a.TILDELOOSE]:o[a.TILDE];return e.replace(r,(function(t,r,o,i,a){var s;return n("tilde",e,t,r,o,i,a),k(r)?s="":k(o)?s=">="+r+".0.0 <"+(+r+1)+".0.0":k(i)?s=">="+r+"."+o+".0 <"+r+"."+(+o+1)+".0":a?(n("replaceTilde pr",a),s=">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+(+o+1)+".0"):s=">="+r+"."+o+"."+i+" <"+r+"."+(+o+1)+".0",n("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?o[a.XRANGELOOSE]:o[a.XRANGE];return e.replace(r,(function(r,o,i,a,s,l){n("xRange",e,r,o,i,a,s,l);var c=k(i),u=c||k(a),p=u||k(s),d=p;return"="===o&&d&&(o=""),l=t.includePrerelease?"-0":"",c?r=">"===o||"<"===o?"<0.0.0-0":"*":o&&d?(u&&(a=0),s=0,">"===o?(o=">=",u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===o&&(o="<",u?i=+i+1:a=+a+1),r=o+i+"."+a+"."+s+l):u?r=">="+i+".0.0"+l+" <"+(+i+1)+".0.0"+l:p&&(r=">="+i+"."+a+".0"+l+" <"+i+"."+(+a+1)+".0"+l),n("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[a.STAR],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(i)}))),s=s.map((function(e){return new C(e,this.options)}),this)},w.prototype.intersects=function(e,t){if(!(e instanceof w))throw new TypeError("a Range is required");return this.set.some((function(n){return L(n,t)&&e.set.some((function(e){return L(e,t)&&n.every((function(n){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new w(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},w.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new p(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1},t.satisfies=q,t.maxSatisfying=function(e,t,n){var r=null,o=null;try{var i=new w(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&-1!==o.compare(e)||(o=new p(r=e,n)))})),r},t.minSatisfying=function(e,t,n){var r=null,o=null;try{var i=new w(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&1!==o.compare(e)||(o=new p(r=e,n)))})),r},t.minVersion=function(e,t){e=new w(e,t);var n=new p("0.0.0");if(e.test(n))return n;if(n=new p("0.0.0-0"),e.test(n))return n;n=null;for(var r=0;r<e.set.length;++r){e.set[r].forEach((function(e){var t=new p(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!m(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(n&&e.test(n))return n;return null},t.validRange=function(e,t){try{return new w(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return I(e,t,"<",n)},t.gtr=function(e,t,n){return I(e,t,">",n)},t.outside=I,t.prerelease=function(e,t){var n=u(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new w(e,n),t=new w(t,n),e.intersects(t)},t.coerce=function(e,t){if(e instanceof p)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var r;(r=o[a.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),o[a.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;o[a.COERCERTL].lastIndex=-1}else n=e.match(o[a.COERCE]);if(null===n)return null;return u(n[2]+"."+(n[3]||"0")+"."+(n[4]||"0"),t)}}(Gh,Gh.exports);const Kh={};async function Zh(e,t,n,r){let{config:o}=n;const i="".concat(e,"__").concat(t);if(!Kh[i]){const n="".concat(e).concat(t&&" v".concat(t)||"");if(r&&"function"!=typeof r)throw new Error("load of visualization '".concat(n,"' is not a fuction, wrap load promise in function"));const a=(r||o.load)({name:e,version:t}),s=Promise.resolve(a);Kh[i]=s.then((e=>{if(!e)throw new Error("load() of visualization '".concat(n,"' resolved to an invalid object"));return e})).catch((e=>{throw new Error("Failed to load visualization: '".concat(n,"'"))}))}return Kh[i]}function Xh(e,t){const n={};let r=null;return{get:e=>n[e],register:(o,i)=>{if(n[o])throw new Error("Supernova '".concat(e,"@").concat(o,"' already registered."));n[o]=function(e,t){let n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{meta:i}=o,a={name:e.name,version:e.version,supportsPropertiesVersion:e=>!(e&&i&&i.deps&&i.deps.properties)||Gh.exports.satisfies(e,i.deps.properties),supernova:()=>Zh(a.name,a.version,t,o.load).then((e=>(n=n||Vh(e,t.public.galaxy),r=JSON.stringify(n.qae.properties.initial),n))),initialProperties(e){return this.supernova().then((()=>V(V({qInfo:{qType:a.name},visualization:a.name,version:a.version,showTitles:!0},JSON.parse(r)),e)))}};return a}({name:e,version:o},t,i),r=null},getMatchingVersionFromProperties:e=>{r||(r=function(e){const t=e.filter((e=>"undefined"===e));return[...t,...e.filter((e=>"undefined"!==e)).map((e=>e.split(".").map((e=>parseInt(e,10))))).sort(((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2])).map((e=>e.join(".")))]}(Object.keys(n)));for(let t=r.length-1;t>=0;t--){if(n[r[t]].supportsPropertiesVersion(e))return r[t]}return null},versions:n}}function Jh(e){let{halo:t,parent:n}=e;const r={},o=n||{get:()=>{}};return{register:(e,n)=>{r[e.name]||(r[e.name]=Xh(e.name,t)),r[e.name].register(e.version,n)},getSupportedVersion:(e,t)=>r[e]?r[e].getMatchingVersionFromProperties(t):null,get(e){const{name:t}=e;let{version:n}=e;if(r[t]){if(!r[t].versions[n]){n=Object.keys(r[t].versions)[0]}}else this.register({name:t,version:n});return r[t].get(n)||o.get(e)},getList:()=>Object.keys(r).map((e=>({name:e,versions:Object.keys(r[e].versions).map((e=>"undefined"===e?void 0:e))}))),clearFromCache:e=>{r[e]&&(r[e]=void 0),function(e){Object.keys(Kh).forEach((t=>{t.split("__")[0]===e&&(Kh[t]=void 0)}))}(e)}}}const Yh=["__DO_NOT_USE__"],Qh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return V(V({},e),t)},ef=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[...e,...t].filter(((e,t,n)=>n.indexOf(e)===t))},tf=(e,t)=>({context:Qh(e.context,t.context),load:t.load||e.load,snapshot:V({},t.snapshot||e.snapshot),types:ef(e.types,t.types),themes:ef(e.themes,t.themes),flags:Qh(e.flags,t.flags),anything:Qh(e.anything,t.anything)}),nf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{__DO_NOT_USE__:t={}}=e,n=Z(e,Yh),r={update:void 0,fetchStart:void 0,showGray:!0,focusSearch:!1,sessionModel:void 0,selectionsApi:void 0,selectDisabled:void 0,postProcessPages:void 0,calculatePagesHeight:!1},o=V(V(V({},n),r),t);return o};var rf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=ee(t.context.language);function r(e,o){if(o)return r.createConfiguration(o)(e);let i=V(V({},t.context),{},{translator:n.translator});const[a]=bc({app:e,context:i}),s=It({themes:t.themes,root:a}),l={galaxy:{translator:n.translator,flags:jd(t.flags),deviceType:_t(t.context.deviceType),anything:t.anything},theme:s.externalAPI,translator:n.translator,nebbie:null},c={app:e,root:a,config:t,public:l,context:i,types:null},u=Jh({halo:c});t.types.forEach((e=>u.register({name:e.name,version:e.version},{meta:e.meta,load:e.load})));let p=s.setTheme(t.context.theme),d=null,h=null;const f={render:async e=>(await p,e.id?Md(e,c):Pd(e,c)),context:async e=>{let t;["theme","language","constraints","keyboardNavigation"].forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==i[n]&&(t||(t={}),t[n]=e[n])})),t&&(i=V(V(V({},i),t),{},{translator:n.translator}),c.context=i,t.theme&&(p=s.setTheme(t.theme),await p),t.language&&c.public.translator.language(t.language),a.context(i))},selections:async()=>(d||(d={mount(t){h||(h=rp({element:t,app:e}),a.add(h))},unmount(){h&&(a.remove(h),h=null)}}),d),field:async t=>{const n="string"==typeof t?t:t.qLibraryId;if(!n)throw new Error("Field identifier must be provided");const r={fieldName:n,mount(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!r)throw new Error("Element for ".concat(n," not provided"));if(this._instance)throw new Error("Field ".concat(n," already mounted"));this._instance=Cp({element:r,app:e,fieldIdentifier:t,options:nf(o),stateName:o.stateName||"$"}),a.add(this._instance)},unmount(){this._instance&&(a.remove(this._instance),this._instance=null)}};return r},getRegisteredTypes:u.getList,__DO_NOT_USE__:{types:u}};return c.public.nebbie=f,c.types=u,f}return r.createConfiguration=n=>e(tf(t,n)),r.config=t,r}({context:{theme:"light",language:"en-US",deviceType:"auto",constraints:{},keyboardNavigation:!1,disableCellPadding:!1},load:()=>{},types:[],themes:[],anything:{},snapshot:{get:async e=>{const t=await fetch("/njs/snapshot/".concat(e));if(!t.ok)throw new Error(t.statusText);return t.json()},capture:e=>fetch("/njs/capture",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then((e=>e.json()))}}),of={exports:{}},af={exports:{}};af.exports=function(){function e(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - ".concat(+Date.now())})}}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===a.call(e)},u=function(e){if(!e||"[object Object]"!==a.call(e))return!1;var t,n=i.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&i.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||i.call(e,t)},p=function(e,t){s&&"__proto__"===t.name?s(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},d=function(e,t){if("__proto__"===t){if(!i.call(e,t))return;if(l)return l(e,t).value}return e[t]},h=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,h=arguments.length,f=!1;for("boolean"==typeof s&&(f=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<h;++l)if(null!=(t=arguments[l]))for(n in t)r=d(s,n),s!==(o=d(t,n))&&(f&&o&&(u(o)||(i=c(o)))?(i?(i=!1,a=r&&c(r)?r:[]):a=r&&u(r)?r:{},p(s,{name:n,newValue:e(f,a,o)})):void 0!==o&&p(s,{name:n,newValue:o}));return s};const f=globalThis.crypto||{getRandomValues:()=>123456};function m(){return e=>{const t=h({},e);t.qInfo=t.qInfo||{},t.qInfo.qId=t.qInfo.qId||"mock-".concat(([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^f.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))));const r=t._mock;let o=t;return r&&(delete t._mock,o=h({},t,r)),Promise.resolve(n({on:()=>{},once:()=>{},getLayout:()=>Promise.resolve(o),getProperties:()=>Promise.resolve(t),getEffectiveProperties:()=>Promise.resolve(t),id:t.qInfo.qId},t))}}const g=function(e){let{args:t=[],defaultValue:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"function"==typeof e?e(...t):void 0!==e?e:n},y=function(e){let{defaultValue:t,async:n=!0,delay:r=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];const s=g(e,{defaultValue:t,args:i});return n?new Promise((e=>{setTimeout((()=>e(s)),r)})):s}},b=["id","session"],v=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function E(e){return!v.includes(e)}function x(e){const t=g(e.getLayout);return t.qInfo&&t.qInfo.qId}function C(e,t){return e.reduce(((e,r)=>n(n({},e),function(e,t){const r=x(e),{delay:i}=t,{id:a,session:s}=e,l=o(e,b);return{[r]:n({id:g(a,{defaultValue:"object - ".concat(+Date.now())}),session:g(s,{defaultValue:!0}),on:()=>{},once:()=>{}},Object.entries(l).reduce(((e,t)=>{let[r,o]=t;return n(n({},e),{},{[r]:y(o,{async:E(r),delay:i})})}),{}))}}(r,t))),{})}function S(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!x(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function w(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return()=>{throw new Error('No "genericObjects" specified')};e.forEach(S);const n=C(e,t);return async e=>Promise.resolve(n[e])}function L(){return()=>Promise.resolve({id:"app-layout"})}const k={fromGenericObjects(t){return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new e,o=new m,i=new w(t,n),a=new L,s={id:"app - ".concat(+Date.now()),session:r,createSessionObject:o,getObject:i,getAppLayout:a};return Promise.resolve(s)}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}};return k}();var sf=H(of.exports=af.exports);const lf={generator:Vh,hook:lh,theme:Rt,locale:Y};export{sf as EnigmaMocker,lf as __DO_NOT_USE__,Up as conversion,rf as embed,Th as onTakeSnapshot,Rh as useAction,Eh as useApp,bh as useAppLayout,qh as useConstraints,kh as useDeviceType,uh as useEffect,fh as useElement,wh as useEmbed,xh as useGlobal,_h as useImperativeHandle,Dh as useKeyboard,gh as useLayout,dh as useMemo,vh as useModel,Ih as useOptions,Oh as usePlugins,hh as usePromise,mh as useRect,Ah as useRenderState,Ch as useSelections,yh as useStaleLayout,ch as useState,Sh as useTheme,Lh as useTranslator};
86
+ `),al.rippleVisible,hl,550,(({theme:e})=>e.transitions.easing.easeInOut),al.ripplePulsate,(({theme:e})=>e.transitions.duration.shorter),al.child,al.childLeaving,fl,550,(({theme:e})=>e.transitions.easing.easeInOut),al.childPulsate,ml,(({theme:e})=>e.transitions.easing.easeInOut)),bl=e.forwardRef((function(t,n){const r=Es({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a}=r,s=At(r,sl),[l,c]=e.useState([]),u=e.useRef(0),p=e.useRef(null);e.useEffect((()=>{p.current&&(p.current(),p.current=null)}),[l]);const d=e.useRef(!1),h=e.useRef(null),f=e.useRef(null),m=e.useRef(null);e.useEffect((()=>()=>{clearTimeout(h.current)}),[]);const g=e.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c((e=>[...e,jn.exports.jsx(yl,{classes:{ripple:ws(i.ripple,al.ripple),rippleVisible:ws(i.rippleVisible,al.rippleVisible),ripplePulsate:ws(i.ripplePulsate,al.ripplePulsate),child:ws(i.child,al.child),childLeaving:ws(i.childLeaving,al.childLeaving),childPulsate:ws(i.childPulsate,al.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)])),u.current+=1,p.current=a}),[i]),y=e.useCallback(((e={},t={},n)=>{const{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&d.current)return void(d.current=!1);"touchstart"===(null==e?void 0:e.type)&&(d.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,p;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)p=Math.sqrt((2*l.width**2+l.height**2)/3),p%2==0&&(p+=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;p=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===f.current&&(f.current=()=>{g({pulsate:r,rippleX:c,rippleY:u,rippleSize:p,cb:n})},h.current=setTimeout((()=>{f.current&&(f.current(),f.current=null)}),80)):g({pulsate:r,rippleX:c,rippleY:u,rippleSize:p,cb:n})}),[o,g]),b=e.useCallback((()=>{y({},{pulsate:!0})}),[y]),v=e.useCallback(((e,t)=>{if(clearTimeout(h.current),"touchend"===(null==e?void 0:e.type)&&f.current)return f.current(),f.current=null,void(h.current=setTimeout((()=>{v(e,t)})));f.current=null,c((e=>e.length>0?e.slice(1):e)),p.current=t}),[]);return e.useImperativeHandle(n,(()=>({pulsate:b,start:y,stop:v})),[b,y,v]),jn.exports.jsx(gl,Tt({className:ws(al.root,i.root,a),ref:m},s,{children:jn.exports.jsx(Qs,{component:null,exit:!0,children:l})}))}));function vl(e){return Pr("MuiButtonBase",e)}const El=Mr("MuiButtonBase",["root","disabled","focusVisible"]),xl=["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"],Cl=Cs("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"},[`&.${El.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Sl=e.forwardRef((function(t,n){const r=Es({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:p=!1,focusRipple:d=!1,LinkComponent:h="a",onBlur:f,onClick:m,onContextMenu:g,onDragLeave:y,onFocus:b,onFocusVisible:v,onKeyDown:E,onKeyUp:x,onMouseDown:C,onMouseLeave:S,onMouseUp:w,onTouchEnd:L,onTouchMove:k,onTouchStart:O,tabIndex:R=0,TouchRippleProps:q,touchRippleRef:I,type:_}=r,T=At(r,xl),A=e.useRef(null),D=e.useRef(null),N=xr(D,I),{isFocusVisibleRef:P,onFocus:M,onBlur:j,ref:z}=Ir(),[F,B]=e.useState(!1);c&&F&&B(!1),e.useImperativeHandle(o,(()=>({focusVisible:()=>{B(!0),A.current.focus()}})),[]);const[$,U]=e.useState(!1);e.useEffect((()=>{U(!0)}),[]);const H=$&&!u&&!c;function W(e,t,n=p){return Er((r=>{t&&t(r);return!n&&D.current&&D.current[e](r),!0}))}e.useEffect((()=>{F&&d&&!u&&$&&D.current.pulsate()}),[u,d,F,$]);const V=W("start",C),G=W("stop",g),K=W("stop",y),Z=W("stop",w),X=W("stop",(e=>{F&&e.preventDefault(),S&&S(e)})),J=W("start",O),Y=W("stop",L),Q=W("stop",k),ee=W("stop",(e=>{j(e),!1===P.current&&B(!1),f&&f(e)}),!1),te=Er((e=>{A.current||(A.current=e.currentTarget),M(e),!0===P.current&&(B(!0),v&&v(e)),b&&b(e)})),ne=()=>{const e=A.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},re=e.useRef(!1),oe=Er((e=>{d&&!re.current&&F&&D.current&&" "===e.key&&(re.current=!0,D.current.stop(e,(()=>{D.current.start(e)}))),e.target===e.currentTarget&&ne()&&" "===e.key&&e.preventDefault(),E&&E(e),e.target===e.currentTarget&&ne()&&"Enter"===e.key&&!c&&(e.preventDefault(),m&&m(e))})),ie=Er((e=>{d&&" "===e.key&&D.current&&F&&!e.defaultPrevented&&(re.current=!1,D.current.stop(e,(()=>{D.current.pulsate(e)}))),x&&x(e),m&&e.target===e.currentTarget&&ne()&&" "===e.key&&!e.defaultPrevented&&m(e)}));let ae=l;"button"===ae&&(T.href||T.to)&&(ae=h);const se={};"button"===ae?(se.type=void 0===_?"button":_,se.disabled=c):(T.href||T.to||(se.role="button"),c&&(se["aria-disabled"]=c));const le=xr(z,A),ce=xr(n,le),ue=Tt({},r,{centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:p,focusRipple:d,tabIndex:R,focusVisible:F}),pe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=Tr({root:["root",t&&"disabled",n&&"focusVisible"]},vl,o);return n&&r&&(i.root+=` ${r}`),i})(ue);return jn.exports.jsxs(Cl,Tt({as:ae,className:ws(pe.root,s),ownerState:ue,onBlur:ee,onClick:m,onContextMenu:G,onFocus:te,onKeyDown:oe,onKeyUp:ie,onMouseDown:V,onMouseLeave:X,onMouseUp:Z,onDragLeave:K,onTouchEnd:Y,onTouchMove:Q,onTouchStart:J,ref:ce,tabIndex:c?-1:R,type:_},se,T,{children:[a,H?jn.exports.jsx(bl,Tt({ref:N,center:i},q)):null]}))})),wl=Mr("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","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Ll=e=>Tt({},"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}});Cs(Sl,{shouldForwardProp:e=>xs(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${yr(n.color)}`],t[`size${yr(n.size)}`],t[`${n.variant}Size${yr(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((({theme:e,ownerState:t})=>{var n,r;return Tt({},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":Tt({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:Di(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})`:Di(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})`:Di(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===t.variant&&{backgroundColor:(e.vars||e).palette.grey.A100,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":Tt({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${wl.focusVisible}`]:Tt({},"contained"===t.variant&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${wl.disabled}`]:Tt({color:(e.vars||e).palette.action.disabled},"outlined"===t.variant&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"outlined"===t.variant&&"secondary"===t.color&&{border:`1px solid ${(e.vars||e).palette.action.disabled}`},"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 ${Di(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).palette.grey[300],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"},[`&.${wl.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${wl.disabled}`]:{boxShadow:"none"}})),Cs("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${yr(n.size)}`]]}})((({ownerState:e})=>Tt({display:"inherit",marginRight:8,marginLeft:-4},"small"===e.size&&{marginLeft:-2},Ll(e)))),Cs("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${yr(n.size)}`]]}})((({ownerState:e})=>Tt({display:"inherit",marginRight:-4,marginLeft:8},"small"===e.size&&{marginRight:-2},Ll(e))));var kl={typography:{fontSize:14,htmlFontSize:16,fontWeightLight:300,fontWeightRegular:400,fontWeightMedium:600,fontFamily:['"Source Sans Pro"','"Segoe UI"','"Helvetica Neue"',"-apple-system","Arial","sans-serif"].join(","),button:{textTransform:"initial",fontWeight:400}},shape:{borderRadius:2},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)"],props:{MuiButtonBase:{disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},MuiCheckbox:{color:"secondary"},MuiRadio:{color:"secondary"},MuiTabs:{indicatorColor:"secondary"}}};const Ol="#009845",Rl="#3F8AB3",ql="#ffffff",Il="#404040",_l="#333333",Tl="#1A1A1A",Al={mode:"light",palette:{primary:{main:Il,contrastText:ql},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Il,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{active:Il,hover:"rgba(0, 0, 0, 0.03)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.05)",disabled:"rgba(0, 0, 0, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},background:{paper:ql,default:ql,lightest:ql,lighter:"#FBFBFB",darker:"#F2F2F2",darkest:"#E6E6E6"},custom:{focusBorder:Rl,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)"},selected:{main:Ol,alternative:"#E4E4E4",excluded:"#BEBEBE",mainContrastText:ql,alternativeContrastText:Il,excludedContrastText:Il},btn:{normal:"rgba(255, 255, 255, 0.6)",hover:"rgba(0, 0, 0, 0.03)",active:"rgba(0, 0, 0, 0.1)",disabled:"rgba(255, 255, 255, 0.6)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.15)"}}},Dl={mode:"dark",palette:{primary:{main:_l,contrastText:ql},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:ql,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)"},action:{active:ql,hover:"rgba(255, 255, 255, 0.05)",hoverOpacity:.08,selected:"rgba(0, 0, 0, 0.03)",disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(0, 0, 0, 0.12)"},divider:"rgba(0,0,0,0.3)",background:{default:"#323232",paper:"#323232",lightest:Il,lighter:_l,darker:"#262626",darkest:Tl},custom:{focusBorder:Rl,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)"},selected:{main:Ol,alternative:_l,excluded:Tl,mainContrastText:ql,alternativeContrastText:ql,excludedContrastText:ql},btn:{normal:"rgba(255, 255, 255, 0.15)",hover:"rgba(255, 255, 255, 0.25)",active:"rgba(0, 0, 0, 0.6)",disabled:"rgba(255, 255, 255, 0.15)",border:"rgba(0, 0, 0, 0.15)",borderHover:"rgba(0, 0, 0, 0.30)"}}},Nl={},Pl=e=>({MuiTypography:{root:{color:e.palette.text.primary}},MuiGrid:{variants:[{props:{alignItems:"center"},style:{"align-items":"center"}}]},MuiButtonBase:{root:{borderRadius:2,border:"1px solid transparent","&:focus":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}}},MuiIconButton:{root:{padding:7,borderRadius:2,border:"1px solid transparent","&:focus":{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}}},MuiOutlinedInput:{root:{backgroundColor:e.palette.custom.inputBackground,"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.btn.border},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:e.palette.custom.focusBorder,borderWidth:2}}},MuiButton:{outlined:{padding:"3px 11px",["&.".concat(wl.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:"1px solid ".concat(e.palette.btn.border),backgroundColor:e.palette.btn.normal,boxShadow:"none",["&.".concat(wl.focusVisible)]:{borderColor:e.palette.custom.focusBorder,boxShadow:"0 0 0 2px ".concat(e.palette.custom.focusOutline)},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",["&.".concat(wl.disabled)]:{backgroundColor:e.palette.btn.disabled}},"&:active":{boxShadow:"none",backgroundColor:e.palette.btn.active},["&.".concat(wl.disabled)]:{backgroundColor:e.palette.btn.disabled}}},MuiAccordionSummary:{content:{margin:"8px 0"}}});function Ml(e){let t=Al,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn("Invalid theme: '".concat(e,"'")):"dark"===e&&(t=Dl));const r=JSON.stringify(t);if(Nl[r])return Nl[r];const o={palette:V(V({type:t.mode},kl.palette),t.palette),typography:V({},kl.typography),shadows:kl.shadows,props:V({},kl.props),shape:V({},kl.shape)};return Nl[r]=ys(function(e){const{defaultProps:t={},mixins:n={},overrides:r={},palette:o={},props:i={},styleOverrides:a={}}=e,s=Tt({},At(e,ma),{components:{}});Object.keys(t).forEach((e=>{const n=s.components[e]||{};n.defaultProps=t[e],s.components[e]=n})),Object.keys(i).forEach((e=>{const t=s.components[e]||{};t.defaultProps=i[e],s.components[e]=t})),Object.keys(a).forEach((e=>{const t=s.components[e]||{};t.styleOverrides=a[e],s.components[e]=t})),Object.keys(r).forEach((e=>{const t=s.components[e]||{};t.styleOverrides=r[e],s.components[e]=t})),s.spacing=oi(e.spacing);const l=ni(e.breakpoints||{}),c=s.spacing;s.mixins=Tt({gutters:(e={})=>Tt({paddingLeft:c(2),paddingRight:c(2)},e,{[l.up("sm")]:Tt({paddingLeft:c(3),paddingRight:c(3)},e[l.up("sm")])})},n);const{type:u,mode:p}=o,d=At(o,ga),h=p||u||"light";return s.palette=Tt({text:{hint:"dark"===h?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:h,type:h},d),s}(V(V({},o),{},{overrides:Pl(o)}))),Nl[r].name=n,Nl[r]}Dr.configure((e=>"njs-".concat("272f","-").concat(e.replace("Mui",""))));var jl=t.createContext({language:null,theme:null,translator:null,constraints:{}}),zl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const n=e,r=[],o={get:e=>n[e],set:(e,r)=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));return n[e]=r,t({type:"SET",value:r}),r},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));n[e]=null},dispatch:e=>{r.forEach((t=>t(e?{}:n)))}},s=()=>{const[,e]=i(n);return a((()=>(r.push(e),()=>{const t=r.indexOf(e);r.splice(t,1)})),[e]),[o]};return[s,o]};const[Fl,Bl]=zl({}),[$l,Ul]=zl({}),[Hl,Wl]=zl({}),[Vl,Gl]=zl({}),[Kl,Zl]=zl({}),[,Xl]=zl({}),Jl=e=>{let{type:t,value:n}=e;const r=Xl.get(n.id);Xl.set(n.id,{});const o=()=>{Ul.clear(n.id),Zl.set(n.id,{}),Zl.dispatch(!0)},i=()=>{n.removeListener("changed",o),Bl.clear(n.id),Ul.clear(n.id),Wl.clear(n.id),Gl.clear(n.id),Zl.clear(n.id),Xl.clear(n.id)};if("SET"===t)r||(n.on("changed",o),n.once("closed",(()=>{i()})));return i},[Yl,Ql]=zl({},Jl),ec=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=V(V({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:V({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=V(V({},e),{},{invalid:!0,valid:!1,validating:!1,canCancel:!1,canRetry:!0,rpcRetry:!1});break;default:throw new Error("Undefined action")}let a=n.get(r);return a||(a={}),a[o]=i,n.set(r,a),i};function tc(e,t){const n=e?"".concat(e.id):null,[r]=Fl(),[o,i]=s(ec,n?r.get(n):null),[l]=Kl(),[c]=$l();let u;n&&(u=c.get(n),u||(u={},c.set(n,u)));const p=async o=>{let a=u[t];if(!a||a&&a.rpcRetry){a={rpc:e[t](),rpcRetry:!1},u[t]=a,i({type:"INVALID",method:t,key:n,model:e,rpcResultStore:r,canCancel:!0})}try{const o=await a.rpc;i({type:"VALID",result:o,key:n,method:t,model:e,rpcResultStore:r})}catch(e){15!==e.code||o||(a.rpcRetry||(a.rpcRetry=!0),p(!0))}},d={cancel:async()=>{const o=e.session.getObjectApi({handle:-1});await o.cancelRequest(u[t].rpc.requestId),i({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:r})},retry:()=>{u[t].rpcRetry=!0,p()}};return a((()=>{e&&p()}),[e,l.get(e&&e.id),n,t]),[o&&o.result,{validating:o&&o.validating,canCancel:o&&o.canCancel,canRetry:o&&o.canRetry},d]}function nc(e){return tc(e,"getLayout")}function rc(e){return tc(e,"getAppLayout")}function oc(e,t){const n=t?"".concat(t.id,"/").concat(JSON.stringify(e)):null,[r]=Yl(),[o]=Hl(),[s,l]=i();let c;n&&(c=o.get(n));for(var u=arguments.length,p=new Array(u>2?u-2:0),d=2;d<u;d++)p[d-2]=arguments[d];return a((()=>{if(!t)return;(async()=>{if(!c){const r=t.createSessionObject(e);c=r,o.set(n,c)}const i=await c;r.set(n,i),l(i)})()}),[t,...p]),[s]}const ic={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function ac(e){return oc(ic,e)}function sc(e){const[t]=ac(e),[n]=nc(t),[r]=rc(e),[o,s]=i(null);return a((()=>{r&&t&&n&&((e,t,n)=>{const r=[...n.qStateNames||[]].map((e=>({stateName:e,qSelectionObjectDef:{qStateName:e}})));(t&&t.alternateStates?t.alternateStates.map((e=>e.stateName)):[]).join("::")!==(n.qStateNames||[]).map((e=>e)).join("::")&&e.applyPatches([{qOp:"replace",qPath:"/alternateStates",qValue:JSON.stringify(r)}],!0)})(t,n,r)}),[r,t,n]),a((()=>{if(!n)return;let e=!1,t=!1,r=!1;[n,...n.alternateStates||[]].forEach((n=>{e=e||n.qSelectionObject&&n.qSelectionObject.qBackCount>0,t=t||n.qSelectionObject&&n.qSelectionObject.qForwardCount>0,r=r||(n.qSelectionObject&&n.qSelectionObject.qSelections||[]).filter((e=>!0!==e.qLocked)).length>0})),s({canGoBack:e,canGoForward:t,canClear:r})}),[n]),[o,t,n]}const[lc,cc]=zl({}),[uc,pc]=zl({}),[dc,hc]=zl({}),[fc,mc]=zl({});function gc(e){if(!e.session)return[];const[t,n,r]=sc(e),[o]=lc(),i=e?e.id:null;let s=o.get(i);return a((()=>{e&&n&&r&&t&&!s&&(s=function(e){let{app:t,currentSelectionsLayout:n,navState:r}=e;const o="".concat(t.id),i=async function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=mc.get(o);t&&(await t.endSelections(e),mc.clear(o),hc.get(t.id).emit("deactivated"))},a={begin:async function(e,n){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e===mc.get(o))return;i(r),mc.set(o,e);const a=Array.isArray(n)?n:[n],s=async n=>{try{await e.beginSelections(a),mc.set(o,e)}catch(e){6003!==e.code||n?mc.clear(o):(await t.abortModal(r),s(!0))}};await s()},end:i};pc.set(o,a);const s={model:t,isInModal:()=>!!mc.get(o),isModal:e=>e?mc.get(o)===e:!!mc.get(o),canGoForward:()=>r.canGoForward,canGoBack:()=>r.canGoBack,canClear:()=>r.canClear,layout:()=>n,forward:()=>a.end().then((()=>t.forward())),back:()=>a.end().then((()=>t.back())),clear:()=>a.end().then((()=>t.clearAll())),clearField(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"$";return a.end().then((()=>t.getField(e,n).then((e=>e.clear()))))}};return s}({app:e,currentSelectionsLayout:r,navState:t}),o.set(i,s),o.dispatch(!0))}),[e,n,r,t]),[s,t]}const yc=l(((e,n)=>{let{initialContext:r,app:o}=e;const[a]=gc(o),[s,l]=i(r),[p,d]=i(),{theme:h}=c((()=>({theme:Ml(p)})),[p]),[f,m]=i([]);return u(n,(()=>({addComponent(e){m([...f,e])},removeComponent(e){const t=f.indexOf(e);-1!==t&&(f.splice(t,1),m([...f]))},setMuiThemeName:d,setContext:l,getAppSelections:()=>a}))),t.createElement(Kn,{injectFirst:!0},t.createElement(zi,{theme:h},t.createElement(jl.Provider,{value:s},f)))}));function bc(e){let n,{app:r,context:o}=e;const i=new Promise((e=>{n=e})),a=t.createRef(),s=document.createElement("div");s.style.display="none",s.setAttribute("data-nebulajs-version","3.0.0"),s.setAttribute("data-app-id",r.id),document.body.appendChild(s),y.render(t.createElement(yc,{ref:a,app:r,initialContext:o}),s,n);const l={};return[{toggleFocusOfCells(e){Object.keys(l).forEach((t=>{l[t].current.toggleFocus(t===e)}))},cells:l,addCell(e,t){l[e]=t},add(e){(async()=>{await i,a.current.addComponent(e)})()},remove(e){(async()=>{await i,a.current.removeComponent(e)})()},setMuiThemeName(e){(async()=>{await i,a.current.setMuiThemeName(e)})()},context(e){(async()=>{await i,a.current.setContext(e)})()},getAppSelections:async()=>(await i,a.current.getAppSelections())},a,i]}function vc(){const[e,t]=i(),[n,r]=i(),o=p((e=>{e&&t(e)}),[]),a=()=>{const{left:t,top:n,width:o,height:i}=e.getBoundingClientRect();r({left:t,top:n,width:o,height:i})};return d((()=>{if(e){if("function"==typeof ResizeObserver){let t=new ResizeObserver(a);return t.observe(e),()=>{t.unobserve(e),t.disconnect(e),t=null}}return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}}}),[e]),[o,n,e]}function Ec(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function xc(e){let{size:n,style:r={},viewBox:o="0 0 16 16",shapes:i=[]}=e;const a=V({fontSize:Ec(n),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},r);return t.createElement("i",{style:a},t.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:o,fill:"currentColor"},i.map(((e,n)=>{let{type:r,attrs:o}=e;return t.createElement(r,K({key:n},o))}))))}var Cc=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M9.41421356,8 L11.8890873,5.52512627 C12.065864,5.34834957 12.0305087,4.95944084 11.8183766,4.74730881 L11.2526912,4.18162338 C11.0405592,3.96949135 10.6516504,3.93413601 10.4748737,4.1109127 L8,6.58578644 L5.52512627,4.1109127 C5.34834957,3.93413601 4.95944084,3.96949135 4.74730881,4.18162338 L4.25233406,4.67659813 C3.96949135,4.95944084 3.93413601,5.34834957 4.1109127,5.52512627 L6.58578644,8 L4.1109127,10.4748737 C3.93413601,10.6516504 3.96949135,11.0405592 4.18162338,11.2526912 L4.67659813,11.7476659 C4.95944084,12.0305087 5.34834957,12.065864 5.52512627,11.8890873 L8,9.41421356 L10.4748737,11.8890873 C10.6516504,12.065864 11.0405592,12.0305087 11.2526912,11.8183766 L11.8183766,11.2526912 C12.0305087,11.0405592 12.065864,10.6516504 11.8890873,10.4748737 L9.41421356,8 Z M8,0 C12.4,0 16,3.6 16,8 C16,12.4 12.4,16 8,16 C3.6,16 0,12.4 0,8 C0,3.6 3.6,0 8,0 Z"}}]}))(e));var Sc=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M13,7 L8,7 L13,7 L13,4.98151367 C13,2.23029964 10.7614237,0 8,0 C5.23857625,0 3,2.23029964 3,4.98151367 L3,7 L3.75,7 L3,7 L4.5,7 L4.5,5.33193359 C4.5,3.21561511 5.54860291,1.5 8,1.5 C10.4513971,1.5 11.5,3.21561511 11.5,5.33193359 L11.5,7 L12.25,7 L3,7 C2.44771525,7 2,7.44771525 2,8 L2,15 C2,15.5522847 2.44771525,16 3,16 L13,16 C13.5522847,16 14,15.5522847 14,15 L14,8 C14,7.44771525 13.5522847,7 13,7 L3,7 L13,7 Z"}}]}))(e));var wc=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M2.5,7 L11,7 C11.5522847,7 12,7.44771525 12,8 L12,15 C12,15.5522847 11.5522847,16 11,16 L1,16 C0.44771525,16 0,15.5522847 0,15 L0,8 C0,7.44771525 0.44771525,7 1,7 L1,4.98151367 C1,2.23029964 3.23857625,0 6,0 C8.4241995,0 10.4454541,1.71883353 10.9029715,4 L9.34209114,4 C8.9671727,2.54028848 7.9088888,1.5 6,1.5 C3.54860291,1.5 2.5,3.21561511 2.5,5.33193359 L2.5,7 Z"}}]}))(e)),Lc=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function kc(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||Lc(r)&&Lc(o)))return!1;var r,o;return!0}function Oc(e,t){var n;void 0===t&&(t=kc);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 Rc="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function qc(e){cancelAnimationFrame(e.id)}var Ic=null;function _c(e){if(void 0===e&&(e=!1),null===Ic||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?Ic="positive-descending":(t.scrollLeft=1,Ic=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Ic}return Ic}var Tc=function(e,t){return e};function Ac(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Vs(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Vs(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Oc((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=Oc((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,i=r.props,a=i.direction,s=i.itemSize,l=i.layout,u=r._getItemStyleCache(c&&s,c&&l,c&&a);if(u.hasOwnProperty(e))t=u[e];else{var p=n(r.props,e,r._instanceProps),d=o(r.props,e,r._instanceProps),h="horizontal"===a||"horizontal"===l,f="rtl"===a,m=h?p:0;u[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:h?0:p,height:h?"100%":d,width:h?d:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=Oc((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(_c()){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<o?"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(){var e,t,n,o;null!==r._resetIsScrollingTimeoutId&&qc(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=(e=r._resetIsScrolling,t=150,n=Rc(),o={id:requestAnimationFrame((function r(){Rc()-n>=t?e.call(null):o.id=requestAnimationFrame(r)}))},o)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}Ds(t,e),t.getDerivedStateFromProps=function(e,t){return Dc(e,t),u(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.itemCount,r=this.state.scrollOffset;e=Math.max(0,Math.min(e,n-1)),this.scrollTo(i(this.props,e,t,r,this._instanceProps))},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(_c()){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&&qc(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,a=e.innerRef,s=e.innerElementType,l=e.innerTagName,c=e.itemCount,u=e.itemData,p=e.itemKey,d=void 0===p?Tc:p,f=e.layout,m=e.outerElementType,g=e.outerTagName,y=e.style,b=e.useIsScrolling,v=e.width,E=this.state.isScrolling,x="horizontal"===o||"horizontal"===f,C=x?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),w=S[0],L=S[1],k=[];if(c>0)for(var O=w;O<=L;O++)k.push(h(t,{data:u,key:d(O,u),index:O,isScrolling:b?E:void 0,style:this._getItemStyle(O)}));var R=r(this.props,this._instanceProps);return h(m||g||"div",{className:n,onScroll:C,ref:this._outerRefSetter,style:_s({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},h(s||l||"div",{children:k,ref:a,style:{height:x?"100%":R,pointerEvents:E?"none":void 0,width:x?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,l=r.scrollOffset;if(0===t)return[0,0,0,0];var c=a(this.props,l,this._instanceProps),u=s(this.props,c,l,this._instanceProps),p=o&&"backward"!==i?1:Math.max(1,n),d=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-p),Math.max(0,Math.min(t-1,u+d)),c,u]},t}(f),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Dc=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Nc=Ac({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r){var o=e.direction,i=e.height,a=e.itemCount,s=e.itemSize,l=e.layout,c=e.width,u="horizontal"===o||"horizontal"===l?c:i,p=Math.max(0,a*s-u),d=Math.min(p,t*s),h=Math.max(0,t*s-u+s);switch("smart"===n&&(n=r>=h-u&&r<=d+u?"auto":"center"),n){case"start":return d;case"end":return h;case"center":var f=Math.round(h+(d-h)/2);return f<Math.ceil(u/2)?0:f>p+Math.floor(u/2)?p:f;default:return r>=h&&r<=d?r:r<h?h:d}},getStartIndexForOffset:function(e,t){var n=e.itemCount,r=e.itemSize;return Math.max(0,Math.min(n-1,Math.floor(t/r)))},getStopIndexForStartIndex:function(e,t,n){var r=e.direction,o=e.height,i=e.itemCount,a=e.itemSize,s=e.layout,l=e.width,c=t*a,u="horizontal"===r||"horizontal"===s?l:o,p=Math.ceil((u+n-c)/a);return Math.max(0,Math.min(i-1,t+p-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});var Pc=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Mc=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),jc=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},zc=function(e){function t(){var e,n,r;Pc(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=jc(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r._lastRenderedStartIndex=-1,r._lastRenderedStopIndex=-1,r._memoizedUnloadedRanges=[],r._onItemsRendered=function(e){var t=e.visibleStartIndex,n=e.visibleStopIndex;r._lastRenderedStartIndex=t,r._lastRenderedStopIndex=n,r._ensureRowsLoaded(t,n)},r._setRef=function(e){r._listRef=e},jc(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,f),Mc(t,[{key:"resetloadMoreItemsCache",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,o=n.itemCount,i=n.minimumBatchSize,a=void 0===i?10:i,s=n.threshold,l=void 0===s?15:s,c=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,i=e.stopIndex,a=[],s=null,l=null,c=o;c<=i;c++)t(c)?null!==l&&(a.push(s,l),s=l=null):(l=c,null===s&&(s=c));if(null!==l){for(var u=Math.min(Math.max(l,s+r-1),n-1),p=l+1;p<=u&&!t(p);p++)l=p;a.push(s,l)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var d=a[0]-1;if(t(d))break;a[0]=d}return a}({isItemLoaded:r,itemCount:o,minimumBatchSize:a,startIndex:Math.max(0,e-l),stopIndex:Math.min(o-1,t+l)});(this._memoizedUnloadedRanges.length!==c.length||this._memoizedUnloadedRanges.some((function(e,t){return c[t]!==e})))&&(this._memoizedUnloadedRanges=c,this._loadUnloadedRanges(c))}},{key:"_loadUnloadedRanges",value:function(e){for(var t=this,n=this.props.loadMoreItems||this.props.loadMoreRows,r=function(r){var o=e[r],i=e[r+1],a=n(o,i);null!=a&&a.then((function(){if(function(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,o=e.stopIndex;return!(r>n||o<t)}({lastRenderedStartIndex:t._lastRenderedStartIndex,lastRenderedStopIndex:t._lastRenderedStopIndex,startIndex:o,stopIndex:i})){if(null==t._listRef)return;"function"==typeof t._listRef.resetAfterIndex?t._listRef.resetAfterIndex(o,!0):("function"==typeof t._listRef._getItemStyleCache&&t._listRef._getItemStyleCache(-1),t._listRef.forceUpdate())}}))},o=0;o<e.length;o+=2)r(o)}}]),t}();const Fc=["S","XS"],Bc=e=>e.reduce(((e,t)=>e.concat(t)));function $c(e){return Fc.includes(e)}function Uc(e){return Array.isArray(e)?Array.from(new Set(e)):void 0}async function Hc(e){let{selections:t,elemNumbers:n,isSingleSelect:r=!1}=e,o=Promise.resolve(!1);if(!n.some((e=>Number.isNaN(e)))){const e=n;o=t.select({method:"selectListObjectValues",params:["/qListObjectDef",e,!r]}).then((e=>!1!==e)).catch((()=>!1))}return o}function Wc(e,t){if(!e)return[];if(e.length<=1)return e;const{min:n,max:r}=function(e,t){let n=1/0,r=-1/0;return e.forEach((e=>{const o=t.indexOf(e);n=o<n?o:n,r=o>r?o:r})),{min:n,max:r}}(e,t);return t.slice(n,r+1)}function Vc(e){let{layout:t,selections:n,pages:r=[],checkboxes:o=!1,selectDisabled:s,doc:l=document,isSingleSelect:c=!1}=e;const[u,d]=i(r),[h,f]=i(!1),[m,g]=i(!1),[y,b]=i(c),[v,E]=i([]),[x,C]=i(!1),[S,w]=i([]),L=function(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[{qElemNumber:t}]=e;return t}));return t}));return Bc(t)}(r);a((()=>{b(c)}),[c]);const k=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(s())return;g(!0);const r=t?e.filter((e=>!v.includes(e))):e;await Hc({selections:n,elemNumbers:r,isSingleSelect:y}),g(!1),w([])},O=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s()||w((n=>{const r=Uc([...n,...e]),o=t?r.filter((e=>!v.includes(e))):r;return t?Wc(r,L):o}))},R=e=>{(e.ctrlKey||e.metaKey)&&(b(!0),e.currentTarget.focus(),e.preventDefault())},q=p((e=>{if(m||s())return;const t=+e.currentTarget.getAttribute("data-n");w([t]),R(e)}),[m,s]),I=p((e=>{if(m||s())return;C(!1),f(!0);const t=+e.currentTarget.getAttribute("data-n");w([t]),R(e)}),[m,s]),_=p((e=>{const t=+e.currentTarget.getAttribute("data-n");y||!h||m||1===S.length&&S[0]===t||O([t])}),[h,m,S,v,x,s]),T=p((()=>{f(!1),g(!1),C(!1),b(c)}),[c]),A=p((e=>{if(y||!h||m||s())return;C(!0);const t=+e.currentTarget.getAttribute("data-n");O([t],!0)}),[h,m,x,S,v,s,t&&t.qListObject.qDimensionInfo.qIsOneAndOnlyOne]);a((()=>{const e=!h;S&&S.length&&!m&&e&&t&&k(S,x)}),[S,h,s()]),a((()=>(l.addEventListener("mouseup",T),()=>{l.removeEventListener("mouseup",T)})),[T]),a((()=>{if(m||h)return;const e=function(e){if(!e||!e.length)return[];const t=e.map((e=>{const t=e.qMatrix.map((e=>{const[t]=e;return!!$c(t.qState)&&t.qElemNumber}));return t.filter((e=>!1!==e))}));return Bc(t)}(r);E(e)}),[r]),a((()=>{if(m||!r||!o&&!h)return;const e=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e=>t.length<=1&&$c(e)?"A":"S",o=e.map((e=>{const o=e.qMatrix.map((e=>{const[o]=e,i=t.includes(o.qElemNumber);let a;return a=n?i?"S":"A":i?r(o.qState):o.qState,[V(V({},o),{},{qState:a}),e.slice(1)]}));return V(V({},e),{},{qMatrix:o})}));return o}(r,S,y);d(e)}),[S]);const D={};return o?Object.assign(D,{onClick:q}):Object.assign(D,{onMouseUp:_,onMouseDown:I,onMouseEnter:A}),{instantPages:u,interactionEvents:D,select:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];C(!1),f(!0),O(e,t||x);const n=k(e,t||x);return f(!1),n}}}const Gc=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var Kc=e=>xc(Gc(e));const Zc="ListBoxCheckbox",Xc={cbIcon:"".concat(Zc,"-cbIcon"),cbIconChecked:"".concat(Zc,"-cbIconChecked"),cbIconExcluded:"".concat(Zc,"-cbIconExcluded"),cbIconAlternative:"".concat(Zc,"-cbIconAlternative"),checkbox:"".concat(Zc,"-checkbox"),dense:"".concat(Zc,"-dense")},Jc=Cs(S)((e=>{let{theme:t}=e;return{["& .".concat(Xc.cbIcon)]:{borderRadius:3,width:16,height:16,boxShadow:"inset 0 0 0 1px rgba(16,22,26,.2), inset 0 -1px 0 rgba(16,22,26,.1)",backgroundColor:"#f5f8fa",backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.8),hsla(0,0%,100%,0))",display:"flex",alignItems:"center",justifyContent:"center"},["& .".concat(Xc.cbIconChecked)]:{borderRadius:3,backgroundColor:t.palette.selected.main,backgroundImage:"linear-gradient(180deg,hsla(0,0%,100%,.1),hsla(0,0%,100%,0))","&:before":{display:"block",width:16,height:16,backgroundImage:"url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 5c-.28 0-.53.11-.71.29L7 9.59l-2.29-2.3a1.003 1.003 0 00-1.42 1.42l3 3c.18.18.43.29.71.29s.53-.11.71-.29l5-5A1.003 1.003 0 0012 5z' fill='%23fff'/%3E%3C/svg%3E\")",content:'""'}},["& .".concat(Xc.cbIconExcluded)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.excluded},["& .".concat(Xc.cbIconAlternative)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.alternative},["&.".concat(Xc.checkbox)]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},["&.".concat(Xc.dense)]:{padding:"4px 8px"}}})),Yc=function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t.createElement("span",{className:e.cbIcon},r&&t.createElement("span",{className:n&&r?e.cbIconExcluded:""}))};function Qc(e){let{checked:n,label:r,dense:o,excluded:i,showGray:a=!0}=e;return t.createElement(Jc,{edge:"start",checked:n,disableRipple:!0,className:[Xc.checkbox,o&&Xc.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":r},name:r,icon:Yc(Xc,a,i),checkedIcon:t.createElement("span",{className:Xc.cbIconChecked})})}const eu={denseRadioButton:"".concat("ListBoxRadioButton","-denseRadioButton"),radioButton:"".concat("ListBoxRadioButton","-radioButton")},tu=Cs(w)((()=>({["&.".concat(eu.radioButton)]:{right:"5px"}})));function nu(e){let{checked:n,label:r,dense:o}=e;return t.createElement(tu,{checked:n,value:r,name:r,className:eu.radioButton,style:{backgroundColor:"transparent"},disableRipple:!0,size:o?"small":"medium",sx:o&&{padding:"0px 0px 0px 12px"}})}const ru=Object.freeze({ENTER:13,ESCAPE:27,SPACE:32,TAB:9,BACKSPACE:8,DELETE:46,ALT:18,CTRL:17,SHIFT:16,ARROW_UP:38,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,PAGE_DOWN:34,PAGE_UP:33,HOME:36,END:35,F10:121,A:65,F:70,ZERO:48,NINE:57,NUMPAD_ZERO:96,NUMPAD_NINE:105,SUBTRACTION:189,DECIMAL:190,NUMPAD_DECIMAL:110,isArrow:e=>e===ru.ARROW_UP||e===ru.ARROW_DOWN||e===ru.ARROW_LEFT||e===ru.ARROW_RIGHT});function ou(e){let{setKeyboardActive:t}=e;return e=>{const{keyCode:n}=e.nativeEvent;switch(n){case ru.ENTER:case ru.SPACE:(e=>{const n=e.querySelector(".search input, .value.selector, .value");t(!0),n&&n.focus()})(e.currentTarget);break;case ru.ESCAPE:r=e.currentTarget,t(!1),r.focus();break;default:return}var r;e.preventDefault()}}const iu="RowColumn",au={row:"".concat(iu,"-row"),rowBorderBottom:"".concat(iu,"-rowBorderBottom"),column:"".concat(iu,"-column"),fieldRoot:"".concat(iu,"-fieldRoot"),cell:"".concat(iu,"-cell"),labelText:"".concat(iu,"-labelText"),labelDense:"".concat(iu,"-labelDense"),highlighted:"".concat(iu,"-highlighted"),checkboxLabel:"".concat(iu,"-checkboxLabel"),icon:"".concat(iu,"-icon"),S:"".concat(iu,"-S"),XS:"".concat(iu,"-XS"),A:"".concat(iu,"-A"),X:"".concat(iu,"-X"),frequencyCount:"".concat(iu,"-frequencyCount"),barContainer:"".concat(iu,"-barContainer"),bar:"".concat(iu,"-bar"),barSelected:"".concat(iu,"-barSelected"),barWithCheckbox:"".concat(iu,"-barWithCheckbox"),barSelectedWithCheckbox:"".concat(iu,"-barSelectedWithCheckbox"),excludedTextWithCheckbox:"".concat(iu,"-excludedTextWithCheckbox")},su={width:"100%",overflow:"hidden",textOverflow:"ellipsis"},lu=e=>{let{theme:t}=e;return{background:t.palette.selected.main,color:t.palette.selected.mainContrastText,"&:focus":{boxShadow:"inset 0 0 0 2px rgba(0, 0, 0, 0.3)",outline:"none"},"& $cell":{paddingRight:0}}},cu=Cs("div")((e=>{let{theme:t}=e;return{["& .".concat(au.row)]:{flexWrap:"nowrap",color:t.palette.text.primary},["& .".concat(au.rowBorderBottom)]:{borderBottom:"1px solid ".concat(t.palette.divider)},["& .".concat(au.column)]:{flexWrap:"nowrap",borderRight:"1px solid ".concat(t.palette.divider),color:t.palette.text.primary},["& .".concat(au.fieldRoot)]:{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(t.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"}},["& .".concat(au.cell)]:{display:"flex",alignItems:"center",minWidth:0,flexGrow:1,paddingLeft:"9px",paddingRight:"9px"},["& .".concat(au.labelText)]:V({flexBasis:"max-content",lineHeight:"16px",userSelect:"none",whiteSpace:"pre"},su),["& .".concat(au.labelDense)]:{fontSize:12},["& .".concat(au.highlighted)]:{overflow:"visible",width:"100%","& > span":{width:"100%",backgroundColor:"#FFC72A"}},["& .".concat(au.checkboxLabel)]:{margin:0,width:"100%",height:"100%","& > span:nth-child(1)":{paddingRight:"8px"},"& > span:nth-child(2)":V(V({},su),{},{display:"flex",alignItems:"center",paddingLeft:0})},["& .".concat(au.icon)]:{display:"flex",padding:t.spacing(1,1,1,0)},["& .".concat(au.S)]:V({},lu({theme:t})),["& .".concat(au.XS)]:V(V({},lu({theme:t})),{},{background:t.palette.selected.excluded,color:t.palette.selected.mainContrastText}),["& .".concat(au.A)]:{background:t.palette.selected.alternative,color:t.palette.selected.alternativeContrastText},["& .".concat(au.X)]:{background:t.palette.selected.excluded,color:t.palette.selected.excludedContrastText},["& .".concat(au.frequencyCount)]:{paddingLeft:"8px",paddingRight:"8px"},["&.".concat(au.barContainer)]:{height:"100%",display:"inline-block"},["& .".concat(au.bar)]:{border:"".concat(1,"px solid"),borderColor:"#D9D9D9",height:"16px",position:"absolute",zIndex:"-1",alignSelf:"center",left:"".concat(4,"px"),transition:"width 0.2s",backgroundColor:"#FAFAFA"},["& .".concat(au.barSelected)]:{opacity:"30%",zIndex:"0",background:t.palette.background.lighter},["& .".concat(au.barWithCheckbox)]:{left:"".concat(29,"px")},["& .".concat(au.barSelectedWithCheckbox)]:{background:"#BFE5D0",borderColor:"#BFE5D0"},["& .".concat(au.excludedTextWithCheckbox)]:{color:"#828282",fontStyle:"italic"}}}));function uu(e){let{index:n,style:r,data:o}=e;const{onClick:s,onMouseDown:l,onMouseUp:c,onMouseEnter:u,pages:d,isLocked:h,column:f=!1,checkboxes:m=!1,dense:g=!1,frequencyMode:y="N",isSingleSelect:b,actions:v,frequencyMax:E="",histogram:x=!1,keyboard:C,showGray:S=!0}=o,w=p(function(e){let{select:t,confirm:n,cancel:r}=e;const o=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e&&e.parentElement[t?"nextElementSibling":"previousElementSibling"];return n&&n.querySelector("[role]")};let i=!1;const a=e=>{i=e};return e=>{let s;const{keyCode:l,shiftKey:c=!1}=e.nativeEvent;switch(l){case ru.SHIFT:a(!0);break;case ru.SPACE:t([+e.currentTarget.getAttribute("data-n")]);break;case ru.ARROW_DOWN:case ru.ARROW_RIGHT:s=o(e.currentTarget,!0),c&&s&&(i&&(t([+e.currentTarget.getAttribute("data-n")],!0),a(!1)),t([+s.getAttribute("data-n")],!0));break;case ru.ARROW_UP:case ru.ARROW_LEFT:s=o(e.currentTarget,!1),c&&s&&(i&&(t([+e.currentTarget.getAttribute("data-n")],!0),a(!1)),t([+s.getAttribute("data-n")],!0));break;case ru.ENTER:n();break;case ru.ESCAPE:return void r();default:return}s&&s.focus(),e.preventDefault(),e.stopPropagation()}}(v),[v]),[R,q]=i(!1),[I,_]=i(),[T,A]=i([]);a((()=>{if(!d)return;let e;const t=d.filter((e=>e.qArea.qTop<=n&&n<e.qArea.qTop+e.qArea.qHeight))[0];if(t){const r=t.qArea;n>=r.qTop&&n<r.qTop+r.qHeight&&([e]=t.qMatrix[n-r.qTop])}_(e)}),[d]);const D=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,N=e=>e?"A"===e.qState:null;a((()=>{if(!I)return;const e="S"===I.qState||"XS"===I.qState||"L"===I.qState;q(e);const t=[f?au.column:au.row];x&&g||t.push(au.rowBorderBottom),m||("XS"===I.qState?t.push(S?au.XS:au.S):"S"===I.qState||"L"===I.qState?t.push(au.S):S&&N(I)?t.push(au.A):S&&D(I)&&t.push(au.X)),A(t)}),[I&&I.qState]);const P=e=>e.filter((e=>!!e)).join(" ").trim(),M=()=>(N(I)||D(I))&&m,j=e=>{let{lbl:n,ix:r,color:o,highlighted:i=!1}=e;return t.createElement(k,{component:"span",variant:"body2",key:r,className:P([au.labelText,i&&au.highlighted,g&&au.labelDense,S&&M()&&au.excludedTextWithCheckbox]),color:o},t.createElement("span",{style:{whiteSpace:"pre"}},n))},z=e=>{let{lbl:n,color:r,qElemNumber:o}=e;const i=t.createElement(Qc,{label:n,checked:R,dense:g,excluded:D(I),showGray:S}),a=t.createElement(nu,{label:n,checked:R,dense:g}),s="string"==typeof n?j({lbl:n,color:r,highlighted:!1}):n;return t.createElement(O,{color:r,control:b?a:i,className:au.checkboxLabel,label:s,key:o})},F=I?I.qText:"",B=()=>I?I.qFrequency?I.qFrequency:"0":"",$=I&&I.qHighlightRanges&&I.qHighlightRanges.qRanges.sort(((e,t)=>e.qCharPos-t.qCharPos))||[],U=function(e,t){if(!t.length)return[];const n=t.reduce(((n,r,o)=>{const i=0===o?0:t[o-1].qCharPos+t[o-1].qCharCount;n.push(...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const{qCharPos:r,qCharCount:o}=t,i=[];return r>n&&i.push([e.slice(n,r),!1]),i.push([e.slice(r,r+o),!0]),i}(e,r,i));const a=o===t.length-1,s=t[o].qCharPos+t[o].qCharCount;return a&&s<e.length&&n.push([e.slice(s),!1]),n}),[]);return n}(F,$),H=m?z:j,W={alignItems:"center",display:"flex"},V=R&&h,G=!m&&R&&!h,K={display:"flex",alignItems:"center",minWidth:0,flexGrow:1,padding:m?0:void 0},Z=0===n;return t.createElement(cu,{className:au.barContainer},t.createElement(L,{container:!0,gap:0,className:P(["value",...T]),classes:{root:au.fieldRoot},style:r,onClick:s,onMouseDown:l,onMouseUp:c,onMouseEnter:u,onKeyDown:w,onContextMenu:e=>{m&&s(e),e.preventDefault()},role:f?"column":"row",tabIndex:!Z||C.enabled&&!C.active?-1:0,"data-n":I&&I.qElemNumber},I&&x&&"0"!==B()&&t.createElement("div",{className:P([au.bar,m&&au.barWithCheckbox,R&&(m?au.barSelectedWithCheckbox:au.barSelected)]),style:{width:(e=>{const t=String(e),n="%"===t.substring(t.length-1),r=parseFloat(n?t:e),o=m?"(".concat(29,"px + ").concat(6,"px)"):"".concat(10,"px");return"calc(".concat(n?r:r/E*100,"% - ").concat(o,")")})(I.qFrequency)}}),t.createElement(L,{item:!0,style:K,className:P([au.cell,au.selectedCell]),title:"".concat(F)},0===$.length?H({lbl:F,color:"inherit"}):(e=>{let{lbls:t}=e;const n=t.map(((e,t)=>{let[n,r]=e;return j({ix:t,highlighted:r,lbl:n})}));return m?z({lbl:n}):n})({lbls:U})),"N"!==y&&t.createElement(L,{item:!0,style:{display:"flex",alignItems:"center"},className:au.frequencyCount},t.createElement(k,{noWrap:!0,color:"inherit",variant:"body2",className:P([g&&au.labelDense,au.labelText,S&&M()&&au.excludedTextWithCheckbox])},B())),(V||G)&&t.createElement(L,{item:!0,className:au.icon},V&&t.createElement(Sc,{style:W,size:"small"}),G&&t.createElement(Kc,{style:W,size:"small"}))))}const pu={styledScrollbars:"".concat("ListBox","-styledScrollbars")},du=Cs(Nc)((()=>({["&.".concat(pu.styledScrollbars)]:{scrollbarColor:"".concat("#BBB"," ").concat("#f1f1f1"),"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:"#f1f1f1"},"&::-webkit-scrollbar-thumb":{backgroundColor:"#BBB",borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}}})));function hu(e){let{model:n,selections:r,direction:o,height:s,width:l,listLayout:c="vertical",frequencyMode:u="N",histogram:d=!1,checkboxes:h=!1,update:f,fetchStart:g,postProcessPages:y,calculatePagesHeight:b=!1,dense:v=!1,keyboard:E={},showGray:x=!0,scrollState:C,sortByState:S,selectDisabled:w=(()=>!1),setCount:L}=e;const[k]=nc(n),O=!(!k||!k.qListObject.qDimensionInfo.qIsOneAndOnlyOne),[R,q]=i(null),[I,_]=i(!1),{instantPages:T=[],interactionEvents:A,select:D}=Vc({layout:k,selections:r,pages:R,checkboxes:h,selectDisabled:w,doc:document,isSingleSelect:O}),N=m(null),P=m({queue:[],validPages:!1}),M=m({pages:[]}),j=p((e=>{if(!R||!P.current.validPages)return!1;P.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=R.filter((e=>t(e)))[0];return n&&t(n)}),[k,R]),z=p(((e,t)=>{P.current.queue.push({start:e,stop:t});!!N.current&&N.current._listRef.state.isScrolling;return P.current.queue.length>10&&P.current.queue.shift(),clearTimeout(P.current.timeout),_(!0),new Promise((e=>{P.current.timeout=setTimeout((()=>{const t=P.current.queue.slice(-1)[0],r=n.getListObjectData("/qListObjectDef",[{qTop:t.start>100?t.start-100:0,qHeight:100,qLeft:0,qWidth:1},{qTop:t.start,qHeight:100,qLeft:0,qWidth:1}]).then((t=>{const n=y?y(t):t;P.current.validPages=!0,M.current.pages=n,q(n),_(!1),e()}));g&&g(r)}),0)}))}),[k]),F=()=>{if(P.current.queue=[],P.current.validPages=!1,N.current){if(N.current.resetloadMoreItemsCache(!0),k&&k.qSelectionInfo.qInSelections||0===S)return;N.current._listRef.scrollToItem(0)}};f&&f.call(null,F),a((()=>{F(),"function"==typeof L&&k&&L(k.qListObject.qSize.qcy)}),[k,k&&k.qListObject.qSize.qcy]),a((()=>{T&&!I&&q(T)}),[T]);const[B,$]=i(!1);if(a((()=>{C&&!B&&N.current&&(N.current._listRef.scrollToItem(C.initScrollPos),$(!0))}),[N.current]),!k)return null;const U="horizontal"!==c,H=k.qListObject.qSize.qcy,W=R&&R.length&&b?(e=>{const t=e.some((e=>e.qArea.qHeight<100)),n=Math.max(...e.map((e=>e.qArea.qTop+e.qArea.qHeight)));return t?n:H})(R):H,{itemSize:G,listHeight:K}=function(e){let{isVertical:t,checkboxes:n,dense:r,height:o}=e,i=n?40:33;r&&(i=20);const a=t?i:200;return{itemSize:a,listHeight:o||8*a}}({isVertical:U,checkboxes:h,dense:v,height:s}),Z=k&&k.qListObject.qDimensionInfo.qLocked,{frequencyMax:X}=k;return t.createElement(zc,{isItemLoaded:j,itemCount:W||1,loadMoreItems:z,threshold:0,minimumBatchSize:100,ref:N},(e=>{let{onItemsRendered:n,ref:i}=e;return P.current.listRef=i,t.createElement(du,{direction:"rtl"===o?"rtl":"ltr","data-testid":"fixed-size-list",useIsScrolling:!0,height:K,width:l,itemCount:W,layout:c,className:pu.styledScrollbars,itemData:V(V({isLocked:Z,column:!U,pages:R},Z||w()?{}:A),{},{checkboxes:h,dense:v,frequencyMode:u,isSingleSelect:O,actions:{select:D,confirm:()=>r&&r.confirm.call(r),cancel:()=>r&&r.cancel.call(r)},frequencyMax:X,histogram:d,keyboard:E,showGray:x}),itemSize:G,onItemsRendered:e=>{C&&C.setScrollPos(e.visibleStopIndex),n(V({},e))},ref:i},uu)}))}const fu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M15.4,9 C15.8,9 16,9.3 16,9.6 L16,15.4 C16,15.7 15.8,16 15.4,16 L9.6,16 C9.3,16 9,15.8 9,15.4 L9,9.6 C9,9.3 9.3,9 9.6,9 L15.4,9 Z M15,10 L10,10 L10,15 L15,15 L15,10 Z M6.5,0 C6.8,0 7,0.3 7,0.6 L7,6.4 C7,6.8 6.8,7 6.5,7 L0.6,7 C0.3,7 0,6.8 0,6.5 L0,0.6 C0,0.3 0.3,0 0.6,0 L6.5,0 Z M6,2.8 C6.3,2.5 6.3,2.1 6.1,1.8 C5.9,1.5 5.4,1.6 5.1,1.9 L3.1,3.9 L2.4,3.2 C2.1,2.9 1.7,2.9 1.4,3.1 C1.2,3.3 1.2,3.8 1.5,4.1 L2.7,5.3 C3,5.6 3.4,5.6 3.7,5.3 L3.8,5.3 L6,2.8 Z M6.5,9 C6.8,9 7,9.3 7,9.6 L7,15.4 C7,15.8 6.8,16 6.5,16 L0.6,16 C0.3,16 0,15.8 0,15.4 L0,9.6 C0,9.3 0.3,9 0.6,9 L6.5,9 Z M6,11.8 C6.3,11.5 6.3,11.1 6.1,10.8 C5.9,10.6 5.4,10.6 5.1,10.8 L3.1,12.8 L2.3,12 C2,11.7 1.6,11.7 1.3,12 C1.1,12.3 1.1,12.7 1.4,13 L2.6,14.2 C2.9,14.5 3.3,14.5 3.6,14.3 L3.7,14.2 L6,11.8 Z M15.4,0 C15.8,0 16,0.3 16,0.6 L16,6.4 C16,6.8 15.8,7 15.4,7 L9.6,7 C9.3,7 9,6.8 9,6.5 L9,0.6 C9,0.3 9.3,0 9.6,0 L15.4,0 Z M15,2.8 C15.3,2.5 15.3,2.1 15.1,1.8 C14.9,1.5 14.4,1.6 14.1,1.9 L12.1,3.9 L11.3,3.1 C11,2.8 10.6,2.8 10.3,3 C10,3.2 10.1,3.7 10.3,4 L11.5,5.2 C11.8,5.5 12.2,5.5 12.5,5.2 L15,2.8 Z"}}]}),mu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),gu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,4 L4,12 L12,12 L12,4 L4,4 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]}),yu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M4,3 L12,3 C12.5522847,3 13,3.44771525 13,4 L13,12 C13,12.5522847 12.5522847,13 12,13 L4,13 C3.44771525,13 3,12.5522847 3,12 L3,4 C3,3.44771525 3.44771525,3 4,3 Z"}}]});var bu=e=>{let{layout:t,model:n,translator:r}=e;if(t.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];return[{key:"selectAll",type:"menu-icon-button",label:r.get("Selection.SelectAll"),getSvgIconShape:fu,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{n.selectListObjectAll("/qListObjectDef")}},{key:"selectPossible",type:"menu-icon-button",label:r.get("Selection.SelectPossible"),getSvgIconShape:gu,enabled:()=>["qOption"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{n.selectListObjectPossible("/qListObjectDef")}},{key:"selectAlternative",type:"menu-icon-button",label:r.get("Selection.SelectAlternative"),getSvgIconShape:mu,enabled:()=>["qAlternative"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{n.selectListObjectAlternative("/qListObjectDef")}},{key:"selectExcluded",type:"menu-icon-button",label:r.get("Selection.SelectExcluded"),getSvgIconShape:yu,enabled:()=>["qAlternative","qExcluded"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{n.selectListObjectExcluded("/qListObjectDef")}}]};const vu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M2,6.5 L3,6.5 C3.55228475,6.5 4,6.94771525 4,7.5 L4,8.5 C4,9.05228475 3.55228475,9.5 3,9.5 L2,9.5 C1.44771525,9.5 1,9.05228475 1,8.5 L1,7.5 C1,6.94771525 1.44771525,6.5 2,6.5 Z M7.5,6.5 L8.5,6.5 C9.05228475,6.5 9.5,6.94771525 9.5,7.5 L9.5,8.5 C9.5,9.05228475 9.05228475,9.5 8.5,9.5 L7.5,9.5 C6.94771525,9.5 6.5,9.05228475 6.5,8.5 L6.5,7.5 C6.5,6.94771525 6.94771525,6.5 7.5,6.5 Z M13,6.5 L14,6.5 C14.5522847,6.5 15,6.94771525 15,7.5 L15,8.5 C15,9.05228475 14.5522847,9.5 14,9.5 L13,9.5 C12.4477153,9.5 12,9.05228475 12,8.5 L12,7.5 C12,6.94771525 12.4477153,6.5 13,6.5 Z"}}]});function Eu(e){const t=vs(),n="function"==typeof e.enabled?!e.enabled():!!e.disabled,r="function"==typeof e.getSvgIconShape;return{hidden:!0===e.hidden,disabled:n,style:{backgroundColor:e.active?t.palette.btn.active:void 0},hasSvgIconShape:r}}const xu="njs-cell-action",Cu=t.forwardRef(((e,n)=>{let{item:r,addAnchor:o=!1}=e;const i=vs(),{hidden:a,disabled:s,style:l,hasSvgIconShape:c}=Eu(r);if(a)return null;const u=r.keyboardAction?e=>["Enter"," ","Spacebar"].includes(e.key)&&r.keyboardAction():null;return t.createElement(R,{ref:o?null:n,title:r.label,onClick:r.action,onKeyDown:u,disabled:s,style:l,className:xu,size:"large"},c&&xc(r.getSvgIconShape()),o&&t.createElement("div",{ref:n,style:{bottom:-i.spacing(.5),right:0,position:"absolute",width:"100%",height:0}}))})),Su=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M9.34535242,8 L13.3273238,11.9819714 C13.6988326,12.3534802 13.6988326,12.955815 13.3273238,13.3273238 C12.955815,13.6988326 12.3534802,13.6988326 11.9819714,13.3273238 L8,9.34535242 L4.01802863,13.3273238 C3.64651982,13.6988326 3.04418502,13.6988326 2.67267621,13.3273238 C2.3011674,12.955815 2.3011674,12.3534802 2.67267621,11.9819714 L6.65464758,8 L2.67267621,4.01802863 C2.3011674,3.64651982 2.3011674,3.04418502 2.67267621,2.67267621 C3.04418502,2.3011674 3.64651982,2.3011674 4.01802863,2.67267621 L8,6.65464758 L11.9819714,2.67267621 C12.3534802,2.3011674 12.955815,2.3011674 13.3273238,2.67267621 C13.6988326,3.04418502 13.6988326,3.64651982 13.3273238,4.01802863 L9.34535242,8 Z"}}]}),wu=e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M9.1661442,6.1661442 C10.7210031,4.61128527 13.2789969,4.61128527 14.8338558,6.1661442 C16.3887147,7.72100313 16.3887147,10.2789969 14.8338558,11.8338558 C13.2789969,13.3887147 10.7210031,13.3887147 9.1661442,11.8338558 C7.61128527,10.2789969 7.61128527,7.77115987 9.1661442,6.1661442 Z M14.1316614,7.72100313 C14.3322884,7.52037618 14.3824451,7.169279 14.1316614,6.9184953 C13.8808777,6.6677116 13.5297806,6.71786834 13.3291536,6.9184953 L12.0250784,8.22257053 L10.7210031,6.9184953 C10.5203762,6.6677116 10.1191223,6.6677116 9.9184953,6.9184953 C9.6677116,7.11912226 9.6677116,7.52037618 9.9184953,7.72100313 L11.2225705,9.02507837 L9.9184953,10.3291536 C9.6677116,10.5297806 9.6677116,10.8808777 9.9184953,11.1316614 C10.169279,11.3824451 10.5203762,11.3824451 10.7210031,11.1316614 L12.0250784,9.82758621 L13.3291536,11.1316614 C13.5297806,11.3824451 13.8808777,11.3824451 14.1316614,11.1316614 C14.3322884,10.9310345 14.3824451,10.5297806 14.1316614,10.3291536 L12.8275862,9.02507837 L14.1316614,7.72100313 Z"}}]});var Lu=e=>xc(wu(e));const ku={icon:"".concat("More","-icon")},Ou=Cs(q)((e=>{let{theme:t}=e;return{["& .".concat(ku.icon)]:{color:t.palette.text.primary}}}));function Ru(e){let{item:n,onActionClick:r=(()=>{})}=e;const{hidden:o,disabled:i,hasSvgIconShape:a}=Eu(n);return o?null:t.createElement(_,{title:n.label,onClick:()=>{n.action(),r()},disabled:i},a&&t.createElement(T,{className:ku.icon},xc(n.getSvgIconShape())),t.createElement(k,{noWrap:!0},n.label))}const qu=t.forwardRef(((e,n)=>{let{actions:r=[],show:o=!0,alignTo:i,popoverProps:a={},popoverPaperStyle:s={},onCloseOrActionClick:l=(()=>{})}=e;return r.length>0&&t.createElement(Ou,K({},a,{onClose:l,ref:n,open:o,anchorEl:i.current,getContentAnchorEl:null,container:i.current,disablePortal:!0,hideBackdrop:!0,style:{pointerEvents:"none"},transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},PaperProps:{style:V({pointerEvents:"auto",maxWidth:"250px"},s)}}),t.createElement(I,null,r.map(((e,n)=>t.createElement(Ru,{key:n,item:e,onActionClick:l})))))})),Iu={itemSpacing:"".concat("ActionsToolbar","-itemSpacing"),firstItemSpacing:"".concat("ActionsToolbar","-firstItemSpacing"),lastItemSpacing:"".concat("ActionsToolbar","-lastItemSpacing")},_u=Cs(q)((e=>{let{theme:t}=e;return{["& .".concat(Iu.itemSpacing)]:{padding:t.spacing(0,.5)},["& .".concat(Iu.firstItemSpacing)]:{padding:t.spacing(0,.5,0,0)},["& .".concat(Iu.lastItemSpacing)]:{padding:t.spacing(0,0,0,.5)}}})),Tu="njs-action-toolbar-popover",Au=t.forwardRef(((e,n)=>{let{actions:r=[],first:o=!1,last:i=!1,addAnchor:a=!1}=e;return r.length>0?t.createElement(L,{item:!0,container:!0,gap:0,wrap:"nowrap"},r.map(((e,s)=>{let l=[];const c=o&&0===s,u=i&&r.length-1===s;return c&&!u&&(l=[Iu.firstItemSpacing]),u&&!c&&(l=[...l,Iu.lastItemSpacing]),c||u||0!==l.length||(l=[Iu.itemSpacing]),t.createElement(L,{item:!0,key:e.key,className:l.join(" ").trim()},t.createElement(Cu,{key:e.key,item:e,ref:0===s?n:null,addAnchor:a}))}))):null})),Du={pointerEvents:"none"},Nu={vertical:"top",horizontal:"right"},Pu={vertical:"bottom",horizontal:"right"};function Mu(e){let{show:n=!0,actions:r=[],maxItems:o=3,selections:s={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},more:l={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{}},popover:u={show:!1,anchorEl:null},focusHandler:p=null,actionsRefMock:d=null}=e;const h=function(e){let{api:t,onConfirm:n=(()=>{}),onCancel:r=(()=>{}),onKeyDeactivate:o=(()=>{})}=e;const{translator:i}=g(jl);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>t.canClear(),action:()=>t.clear(),getSvgIconShape:wu},{key:"cancel",type:"icon-button",label:i.get("Selection.Cancel"),enabled:()=>t.canCancel(),action:()=>{r(),t.cancel()},keyboardAction:e=>{o(e),r(),t.cancel()},getSvgIconShape:Su},{key:"confirm",type:"icon-button",label:i.get("Selection.Confirm"),enabled:()=>t.canConfirm(),action:()=>{n(),t.confirm()},keyboardAction:e=>{o(e),n(),t.confirm()},getSvgIconShape:Gc}]}(s),{translator:f,keyboardNavigation:y}=g(jl),[b,v]=i(!1),[E,x]=i(l.enabled),[C,S]=i(l.actions),[w,k]=i(l.alignTo),O=m(),R=m(),q=vs(),I=c((()=>({margin:q.spacing(.5,0)}))),_=e=>{const t=R.current||d;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]};a((()=>()=>v(!1)),[u.show]),a((()=>{x(l.enabled)}),[l.enabled]),a((()=>{if(!p)return;p.on("focus_toolbar_first",(()=>{const e=_(!1);e&&e.focus()})),p.on("focus_toolbar_last",(()=>{const e=_(!0);e&&e.focus()}))}),[]);const T=c((()=>r.filter((e=>!e.hidden))),[r]);if(!s.show&&0===T.length)return null;const D={key:"more",label:f.get("Menu.More"),getSvgIconShape:vu,hidden:!1,enabled:()=>E,action:()=>v(!b)};if(T.length>o){const e=T.splice(-(T.length-o)-1);x(!0),S([...e,...l.actions]),k(O)}const N=y&&p&&p.refocusContent?e=>{if("Tab"!==e.key)return;(e.shiftKey&&_(!1)===e.target||!e.shiftKey&&_(!0)===e.target)&&(e.preventDefault(),e.stopPropagation(),p.refocusContent())}:null,P=T.length>0,M=C.length>0,j=P&&s.show||M&&s.show,z=t.createElement(L,{ref:R,onKeyDown:N,container:!0,gap:0,wrap:"nowrap"},P&&t.createElement(Au,{actions:T,first:!0,last:!M&&!s.show}),M&&t.createElement(Au,{ref:O,actions:[D],first:!P,last:!s.show,addAnchor:!0}),j&&t.createElement(L,{item:!0,className:Iu.itemSpacing,style:I},t.createElement(A,{orientation:"vertical"})),s.show&&t.createElement(Au,{actions:h,first:!P&&!M,last:!0}),b&&t.createElement(qu,{show:b,actions:C,alignTo:w,popoverProps:l.popoverProps,popoverPaperStyle:l.popoverPaperStyle,onCloseOrActionClick:()=>{v(!1)}}));return u.show?t.createElement(_u,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:u.show,anchorEl:u.anchorEl,anchorOrigin:Nu,transformOrigin:Pu,hideBackdrop:!0,style:Du,PaperProps:{className:Tu,style:{pointerEvents:"auto",padding:q.spacing(1,1)}}},z):n&&z}var ju=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M15.7873809,13.80959 C16.1870614,14.209868 15.9872212,15.1104934 15.4876205,15.5107714 C15.08794,15.9110493 14.1886588,16.2112578 13.7889782,15.8109798 L11.0911347,13.1091035 L10.9912145,12.5086866 L10.2917736,11.8082001 C9.19265216,12.5086866 7.89369045,13.0090341 6.49480859,13.0090341 C2.89768383,13.0090341 0,10.1070188 0,6.50451703 C0,2.90201529 2.89768383,0 6.49480859,0 C10.0919334,0 12.9896172,2.90201529 12.9896172,6.50451703 C12.9896172,7.90548992 12.4900165,9.20639333 11.7905756,10.3071577 L12.4900165,11.0076442 L13.0895373,11.1077137 L15.7873809,13.80959 Z M11.2909749,6.50451703 C11.2909749,5.20361362 10.7913743,4.00277971 9.89209309,3.00208478 C8.9928119,2.10145935 7.79377031,1.60111188 6.49480859,1.60111188 C5.19584688,1.60111188 3.99680529,2.10145935 2.99760397,3.00208478 C2.09832278,4.00277971 1.59872212,5.20361362 1.59872212,6.50451703 C1.59872212,7.80542043 2.09832278,9.00625434 2.99760397,9.90687978 C3.89688516,10.8075052 5.09592674,11.3078527 6.49480859,11.3078527 C7.79377031,11.4079222 8.9928119,10.9075747 9.89209309,9.90687978 C10.7913743,9.00625434 11.2909749,7.80542043 11.2909749,6.50451703 Z"}}]}))(e));function zu(e){let{model:n,keyboard:r,dense:o=!1,visible:s=!0}=e;const{translator:l}=g(jl),[c,u]=i(""),[p,d]=i(!1),h=vs(),f=async()=>{await n.abortListObjectSearch("/qListObjectDef"),d(!1)};a((()=>{!s&&p&&f()}),[s]);return s?t.createElement(D,{startAdornment:t.createElement(N,{position:"start"},t.createElement(ju,{size:o?"small":"normal"})),className:"search",sx:[{border:"none",borderRadius:0,"& fieldset":{border:"1px solid ".concat(h.palette.divider),borderWidth:"1px 0 1px 0",borderRadius:0},"&:hover":{border:"none"}},o&&{fontSize:12,paddingLeft:h.spacing(1),"& input":{paddingTop:"5px",paddingBottom:"5px"}}],size:"small",fullWidth:!0,placeholder:l.get("Listbox.Search"),value:c,onChange:e=>{u(e.target.value),0===e.target.value.length?f():(n.searchListObjectFor("/qListObjectDef",e.target.value),d(!0))},onKeyDown:e=>{switch(e.key){case"Enter":n.acceptListObjectSearch("/qListObjectDef",!0),u("");break;case"Escape":f(),u("")}},inputProps:{tabIndex:!r||r.enabled&&!r.active?-1:0}}):null}function Fu(e){return Object.keys(re.prototype).forEach((t=>{e[t]=re.prototype[t]})),re.init(e),e}function Bu(e,t){const[n]=gc(e),[r]=nc(t),o=t?t.id:null,[i]=uc(),[s]=dc(),l=i.get(e.id);let c=s.get(o);return a((()=>{n&&t&&!c&&(c=function(e){let t,{appSelections:n,appModal:r,model:o}=e,i=!1,a=!1;const s={id:o.id,setLayout(e){t=e},begin(e){const t=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",t),t.isPrevented()?Promise.resolve():(i=!0,this.emit("activated"),r.begin(o,e,!0))},clear(){return a=!1,this.emit("cleared"),t.qListObject?o.clearSelections("/qListObjectDef"):o.resetMadeSelections()},confirm(){return a=!1,i=!1,this.emit("confirmed"),this.emit("deactivated"),r.end(!0)},cancel(){return a=!1,i=!1,this.emit("canceled"),this.emit("deactivated"),r.end(!1)},async select(e){const t=this.begin([e.params[0]]);if(!n.isModal())return!1;await t;const r=await o[e.method](...e.params);return a="resetMadeSelections"!==e.method,!!r||(o.resetMadeSelections(),!1)},canClear:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked&&!t.qListObject.qDimensionInfo.qIsOneAndOnlyOne:a,canConfirm:()=>t&&t.qListObject&&t.qListObject.qDimensionInfo?!t.qListObject.qDimensionInfo.qLocked:a,canCancel:()=>!(t&&t.qListObject&&t.qListObject.qDimensionInfo&&t.qListObject.qDimensionInfo.qLocked),isActive:()=>i,isModal:()=>n.isModal(o),goModal:e=>r.begin(o,e,!1),noModal:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return r.end(e)}};return Fu(s),s}({appSelections:n,appModal:l,model:t}),s.set(o,c),s.dispatch(!0))}),[n,t]),a((()=>{c&&c.setLayout(r)}),[c,r]),[c]}function $u(e){let{alignTo:n,show:r,close:o,app:i,fieldName:s,stateName:l="$"}=e;const c=r&&Boolean(n.current),u=vs(),[d]=oc({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:l,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],qFieldDefs:[s]}}},i,s,l),h=p((()=>{d.lock("/qListObjectDef")}),[d]),f=p((()=>{d.unlock("/qListObjectDef")}),[d]),{translator:y}=g(jl),b=m(),[v]=Bu(i,d),[E]=nc(d);if(a((()=>{v&&c&&(v.isModal(d)||v.goModal("/qListObjectDef"))}),[v,c]),!d||!E||!y)return null;const x=!0===E.qListObject.qDimensionInfo.qLocked,C=(e,t)=>{const n="escapeKeyDown"!==t;v.noModal(n),o()},S=bu({layout:E,model:d,translator:y}),w=E.qListObject.qDimensionInfo.qStateCounts,k=w.qSelected+w.qSelectedExcluded+w.qLocked+w.qLockedExcluded>0;return t.createElement(q,{open:c,onClose:C,anchorEl:n.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"250px"}}},t.createElement(L,{container:!0,direction:"column",gap:0},t.createElement(L,{item:!0,container:!0,style:{padding:u.spacing(1)}},t.createElement(L,{item:!0},x?t.createElement(R,{onClick:f,disabled:!x,size:"large"},t.createElement(Sc,{title:y.get("Listbox.Unlock")})):t.createElement(R,{onClick:h,disabled:!k,size:"large"},t.createElement(wc,{title:y.get("Listbox.Lock")}))),t.createElement(L,{item:!0,xs:!0}),t.createElement(L,{item:!0},t.createElement(Mu,{more:{enabled:!x,actions:S,alignTo:b,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:v,onConfirm:C,onCancel:()=>C(0,"escapeKeyDown")}}))),t.createElement(L,{item:!0,xs:!0},t.createElement("div",{ref:b}),t.createElement(zu,{model:d,visible:!0}),t.createElement(hu,{model:d,selections:v,direction:"ltr"}))))}function Uu(e){let{field:n,api:r,stateIx:o=0,skipHandleShowListBoxPopover:a=!1,moreAlignTo:s=null,onClose:l=(()=>{})}=e;const{translator:c}=g(jl),u=s||m(),p=vs(),[d,h]=i(!1),f=e=>{e.currentTarget.contains(e.target)&&h(!d)},y=()=>{h(!1),l()},b=n.selections[o];void 0===b.qTotal&&(b.qTotal=0);const v=b.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},E=(v.qSelected+v.qLocked)/b.qTotal,x=v.qAlternative/b.qTotal,C=(v.qExcluded+v.qLockedExcluded+v.qSelectedExcluded)/b.qTotal,S=v.qSelected+v.qSelectedExcluded+v.qLocked+v.qLockedExcluded,w=0===S&&0===b.qTotal;let O="";b.qTotal===S&&b.qTotal>1?O=c.get("CurrentSelections.All"):S>1&&b.qTotal?O=c.get("CurrentSelections.Of",[S,b.qTotal]):b.qSelectedFieldSelectionInfo&&(O=b.qSelectedFieldSelectionInfo.map((e=>e.qName)).join(", ")),"$"!==n.states[o]&&(O="".concat(n.states[o],": ").concat(O));const q=[{color:p.palette.selected.main,ratio:E},{color:p.palette.selected.alternative,ratio:x},{color:p.palette.selected.excluded,ratio:C}];q.forEach(((e,t)=>{e.offset=t?q[t-1].offset+q[t-1].ratio:0}));let I=null,_=null,T=null,A=null;return s||(I=t.createElement(L,{item:!0,xs:!0,style:{minWidth:0,flexGrow:1,opacity:b.qLocked?"0.3":""}},t.createElement(k,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},b.qField),t.createElement(k,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"}},O)),b.qLocked?_=t.createElement(L,{item:!0},t.createElement(R,{size:"large"},t.createElement(Sc,null))):b.qOneAndOnlyOne||(_=t.createElement(L,{item:!0},t.createElement(R,{title:c.get("Selection.Clear"),onClick:e=>{e.stopPropagation(),r.clearField(b.qField,n.states[o])},size:"large"},t.createElement(Cc,null)))),T=t.createElement("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"}},!1===w&&q.map((e=>t.createElement("div",{key:e.color,style:{position:"absolute",background:e.color,height:"100%",top:0,width:"".concat(100*e.ratio,"%"),left:"".concat(100*e.offset,"%")}})))),A=t.createElement(L,{container:!0,gap:1,ref:u,sx:{backgroundColor:p.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:p.palette.action.hover}},onClick:!1===a&&f||null},I,_,T,d&&t.createElement($u,{alignTo:u,show:d,close:y,app:r.model,fieldName:b.qField,stateName:n.states[o]}))),s?t.createElement($u,{alignTo:u,show:!0,close:y,app:r.model,fieldName:b.qField,stateName:n.states[o]}):A}var Hu=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M8,9 L12.5,4.5 L14,6 L9.5,10.5 L8,12 L2,6 L3.5,4.5 L8,9 Z"}}]}))(e));const Wu={item:"".concat("MultiState","-item")},Vu=Cs(L)((e=>{let{theme:t}=e;return{["&.".concat(Wu.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"}}}));function Gu(e){let{field:n,api:r,moreAlignTo:o=null,onClose:a=(()=>{})}=e;const[s,l]=i(!!o),[c,u]=i(-1),[p,d]=i(o?o.current:null),h=o||m(),{translator:f}=g(jl),y=f.get("Selection.ClearAllStates"),b=()=>{u(-1),a()};let v=null;o||(v=t.createElement(t.Fragment,null,t.createElement(L,{item:!0,xs:!0,zeroMinWidth:!0},t.createElement(P,{style:{padding:"0px 8px"},color:"secondary",badgeContent:n.states.length},t.createElement(k,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},n.name))),t.createElement(L,{item:!0},t.createElement("div",{style:{width:"12px"}})),t.createElement(L,{item:!0},t.createElement(R,{size:"large"},t.createElement(Hu,null)))));const E=t.createElement(M,{dense:!0},t.createElement(j,{title:y,onClick:()=>{n.states.forEach((e=>r.clearField(n.name,e)))}},t.createElement(z,{variant:"contained",fullWidth:!0},y)),n.states.map(((e,o)=>t.createElement(j,{key:o,title:n.name,onClick:e=>((e,t)=>{e.stopPropagation(),l(!1),u(t)})(e,o)},t.createElement(F,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},t.createElement(Uu,{field:n,api:r,stateIx:o,skipHandleShowListBoxPopover:!0})))))),x=t.createElement(q,{open:s,onClose:()=>{l(!1),a()},anchorEl:p,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},E),C=o?x:t.createElement(Vu,{container:!0,gap:0,className:Wu.item,onClick:e=>{e.currentTarget.contains(e.target)&&(d(e.currentTarget),h.current=e.currentTarget,l(!s))}},v,s&&x,c>-1&&t.createElement($u,{alignTo:h,show:c>-1,close:b,app:r.model,fieldName:n.selections[c].qField,stateName:n.states[c]}));return o&&c>-1?t.createElement($u,{alignTo:h,show:c>-1,close:b,app:r.model,fieldName:n.selections[c].qField,stateName:n.states[c]}):C}const Ku={item:"".concat("More","-item"),badge:"".concat("More","-badge")},Zu=Cs(L)((e=>{let{theme:t}=e;return{["&.".concat(Ku.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"},["& .".concat(Ku.badge)]:{padding:t.spacing(0,1)}}}));function Xu(e){let{items:n=[],api:r}=e;const o=vs(),[a,s]=i(!1),[l,c]=i(-1),[u,p]=i(null),d=m(),h=()=>{c(-1)};let f=null;return l>-1&&(f=n[l].states.length>1?t.createElement(Gu,{field:n[l],api:r,moreAlignTo:d,onClose:h}):t.createElement(Uu,{field:n[l],api:r,skipHandleShowListBoxPopover:!0,moreAlignTo:d,onClose:h})),t.createElement(Zu,{container:!0,gap:0,className:Ku.item,onClick:e=>{e.currentTarget.contains(e.target)&&(p(e.currentTarget),d.current=e.currentTarget,s(!a))}},t.createElement(L,{item:!0},t.createElement(F,{borderRadius:o.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:o.palette.selected.main,color:o.palette.selected.mainContrastText}},t.createElement(k,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit"},"+",n.length))),t.createElement(L,{item:!0},t.createElement(R,{size:"large"},t.createElement(Hu,null))),a&&t.createElement(q,{open:a,onClose:()=>{s(!1)},anchorEl:u,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},t.createElement(M,{dense:!0},n.map(((e,n)=>t.createElement(j,{key:n,title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),s(!1),c(t)})(e,n)},t.createElement(F,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},e.states.length>1?t.createElement(Gu,{field:e,api:r}):t.createElement(Uu,{field:e,api:r}))))))),f)}function Ju(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"$";e.qSelections.forEach((e=>{const r=e.qField,o=t[r]=t[r]||{name:r,states:[],selections:[]};-1===o.states.indexOf(n)&&(o.states.push(n),o.selections.push(e))}))}function Yu(e){let{api:n,app:r}=e;const o=vs(),[s]=ac(r),[l]=nc(s),[c,u]=i({items:[],more:[]}),[p]=fc(),[d,h]=vc(),[f,m]=i(0);return a((()=>{if(!h)return;const{width:e}=h,t=Math.floor(e)-72,n=Math.floor(t/120);m(n)}),[h]),a((()=>{if(!(r&&s&&l&&f))return;const e=function(e){if(!e)return[];const t={};return e.qSelectionObject&&Ju(e.qSelectionObject,t),e.alternateStates&&e.alternateStates.forEach((e=>Ju(e.qSelectionObject,t,e.stateName))),Object.keys(t).map((e=>t[e]))}(l);u((t=>{const n=e;if((()=>{const e=p.get(r.id);return e&&"njsListbox"===e.genericType})()&&n.length+1===t.items.length){const e=t.items.filter((e=>!1===n.some((t=>e.name===t.name))))[0],{qField:r}=e.selections[0];e.selections=[{qField:r}];const o=t.items.indexOf(e);n.splice(o,0,e)}let o=[];return f<n.length&&(o=n.splice(f-n.length)),{items:n,more:o}}))}),[r,s,l,n.isInModal(),f]),t.createElement(L,{ref:d,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"}},c.items.map((e=>t.createElement(L,{item:!0,key:"".concat(e.states.join("::"),"::").concat(e.name),style:{position:"relative",maxWidth:"240px",minWidth:"".concat(120,"px"),background:o.palette.background.paper,borderRight:"1px solid ".concat(o.palette.divider)}},e.states.length>1?t.createElement(Gu,{field:e,api:n}):t.createElement(Uu,{field:e,api:n})))),c.more.length>0&&t.createElement(L,{item:!0,style:{position:"relative",maxWidth:"98px",minWidth:"".concat(72,"px"),background:o.palette.background.paper,borderRight:"1px solid ".concat(o.palette.divider)}},t.createElement(Xu,{items:c.more,api:n})))}var Qu=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M15,6.5 C15,6.22385763 15.2238576,6 15.5,6 C15.7761424,6 16,6.22385763 16,6.5 L16,9.5 C16,9.77614237 15.7761424,10 15.5,10 C15.2238576,10 15,9.77614237 15,9.5 L15,6.5 Z M16,2.5 C16,2.77614237 15.7761424,3 15.5,3 C15.2238576,3 15,2.77614237 15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 C13,0.223857625 13.2238576,-5.07265313e-17 13.5,0 L15,0 C15.5522847,1.01453063e-16 16,0.44771525 16,1 L16,2.5 Z M10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 C6,0.223857625 6.22385763,-5.07265313e-17 6.5,0 L9.5,0 C9.77614237,5.07265313e-17 10,0.223857625 10,0.5 Z M1,2.5 C1,2.77614237 0.776142375,3 0.5,3 C0.223857625,3 5.18696197e-13,2.77614237 5.18696197e-13,2.5 L5.18696197e-13,1 C5.18696197e-13,0.44771525 0.44771525,-1.01453063e-16 1,0 L2.5,0 C2.77614237,5.07265313e-17 3,0.223857625 3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 5.18696197e-13,15.5522847 5.18696197e-13,15 L5.18696197e-13,13.5 C5.18696197e-13,13.2238576 0.223857625,13 0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M4,7 C7.49095643,7 10,10.1337595 10,12.1872632 C10,12.1872632 8.16051135,9.86624054 4,10 L4,12 C4,12 2.66666667,10.8333333 -1.0658141e-14,8.5 C-2.59348099e-13,8.5 1.33333333,7.33333333 4,5 C4,5 4,5.66666667 4,7 Z"}}]}))(e));var ep=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M6,15.5 L6,15.5 C6,15.2238576 6.22385763,15 6.5,15 L9.5,15 C9.77614237,15 10,15.2238576 10,15.5 L10,15.5 C10,15.7761424 9.77614237,16 9.5,16 L6.5,16 C6.22385763,16 6,15.7761424 6,15.5 Z M1,13.5 L1,14.5 C1,14.7761424 1.22385763,15 1.5,15 L2.5,15 C2.77614237,15 3,15.2238576 3,15.5 L3,15.5 C3,15.7761424 2.77614237,16 2.5,16 L1,16 C0.44771525,16 6.76353751e-17,15.5522847 0,15 L0,13.5 C-3.38176876e-17,13.2238576 0.223857625,13 0.5,13 L0.5,13 C0.776142375,13 1,13.2238576 1,13.5 Z M1,6.5 L1,9.5 C1,9.77614237 0.776142375,10 0.5,10 L0.5,10 C0.223857625,10 3.38176876e-17,9.77614237 0,9.5 L0,6.5 C-3.38176876e-17,6.22385763 0.223857625,6 0.5,6 L0.5,6 C0.776142375,6 1,6.22385763 1,6.5 Z M0,2.5 L0,1 C-6.76353751e-17,0.44771525 0.44771525,1.01453063e-16 1,0 L2.5,0 C2.77614237,-5.07265313e-17 3,0.223857625 3,0.5 L3,0.5 C3,0.776142375 2.77614237,1 2.5,1 L1.5,1 C1.22385763,1 1,1.22385763 1,1.5 L1,2.5 C1,2.77614237 0.776142375,3 0.5,3 L0.5,3 C0.223857625,3 3.38176876e-17,2.77614237 0,2.5 Z M6,0.5 L6,0.5 C6,0.223857625 6.22385763,5.07265313e-17 6.5,0 L9.5,0 C9.77614237,-5.07265313e-17 10,0.223857625 10,0.5 L10,0.5 C10,0.776142375 9.77614237,1 9.5,1 L6.5,1 C6.22385763,1 6,0.776142375 6,0.5 Z M15,2.5 L15,1.5 C15,1.22385763 14.7761424,1 14.5,1 L13.5,1 C13.2238576,1 13,0.776142375 13,0.5 L13,0.5 C13,0.223857625 13.2238576,5.07265313e-17 13.5,0 L15,0 C15.5522847,-1.01453063e-16 16,0.44771525 16,1 L16,2.5 C16,2.77614237 15.7761424,3 15.5,3 L15.5,3 C15.2238576,3 15,2.77614237 15,2.5 Z M15,13.5 C15,13.2238576 15.2238576,13 15.5,13 C15.7761424,13 16,13.2238576 16,13.5 L16,15 C16,15.5522847 15.5522847,16 15,16 L13.5,16 C13.2238576,16 13,15.7761424 13,15.5 C13,15.2238576 13.2238576,15 13.5,15 L14.5,15 C14.7761424,15 15,14.7761424 15,14.5 L15,13.5 Z M12,7 C12,5.66666667 12,5 12,5 C14.6666667,7.33333333 16,8.5 16,8.5 C13.3333333,10.8333333 12,12 12,12 L12,10 C7.83948865,9.86624054 6,12.1872632 6,12.1872632 C6,10.1337595 8.50904357,7 12,7 Z"}}]}))(e));function tp(e){let{api:n,app:r}=e;const{translator:o}=g(jl),[i]=sc(r);return t.createElement(L,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"}},t.createElement(L,{item:!0},t.createElement(R,{style:{marginRight:"8px"},disabled:!i||!i.canGoBack,title:o.get("Navigate.Back"),onClick:()=>n.back(),size:"large"},t.createElement(Qu,null))),t.createElement(L,{item:!0},t.createElement(R,{style:{marginRight:"8px"},disabled:!i||!i.canGoForward,title:o.get("Navigate.Forward"),onClick:()=>n.forward(),size:"large"},t.createElement(ep,null))),t.createElement(L,{item:!0},t.createElement(R,{disabled:!i||!i.canClear,title:o.get("Selection.ClearAll"),onClick:()=>n.clear(),size:"large"},t.createElement(Lu,null))))}function np(e){let{app:n}=e;const r=vs(),[o]=gc(n);return o?t.createElement(L,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:r.palette.background.paper,minHeight:"40px"}},t.createElement(L,{item:!0,style:{borderRight:"1px solid ".concat(r.palette.divider)}},t.createElement(tp,{api:o,app:n})),t.createElement(L,{item:!0,xs:!0,style:{backgroundColor:r.palette.background.darker,overflow:"hidden"}},t.createElement(Yu,{api:o,app:n}))):null}function rp(e){let{element:n,app:r}=e;return y.createPortal(t.createElement(np,{app:r}),n)}var op=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},ip=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),ap=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sp=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},lp=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},cp=void 0;cp="undefined"!=typeof window?window:"undefined"!=typeof self?self:global;var up=null,pp=null,dp=cp.clearTimeout,hp=cp.setTimeout,fp=cp.cancelAnimationFrame||cp.mozCancelAnimationFrame||cp.webkitCancelAnimationFrame,mp=cp.requestAnimationFrame||cp.mozRequestAnimationFrame||cp.webkitRequestAnimationFrame;function gp(e){var t=void 0,n=void 0,r=void 0,o=void 0,i=void 0,a=void 0,s=void 0,l="undefined"!=typeof document&&document.attachEvent;if(!l){a=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,o=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,o.style.width=n.offsetWidth+1+"px",o.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},i=function(e){return e.offsetWidth!==e.__resizeLast__.width||e.offsetHeight!==e.__resizeLast__.height},s=function(e){if(!(e.target.className&&"function"==typeof e.target.className.indexOf&&e.target.className.indexOf("contract-trigger")<0&&e.target.className.indexOf("expand-trigger")<0)){var t=this;a(this),this.__resizeRAF__&&up(this.__resizeRAF__),this.__resizeRAF__=pp((function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))}};var c=!1,u="";r="animationstart";var p="Webkit Moz O ms".split(" "),d="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h=document.createElement("fakeelement");if(void 0!==h.style.animationName&&(c=!0),!1===c)for(var f=0;f<p.length;f++)if(void 0!==h.style[p[f]+"AnimationName"]){u="-"+p[f].toLowerCase()+"-",r=d[f],c=!0;break}t="@"+u+"keyframes "+(n="resizeanim")+" { from { opacity: 0; } to { opacity: 0; } } ",o=u+"animation: 1ms "+n+"; "}return{addResizeListener:function(i,c){if(l)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){var u=i.ownerDocument,p=cp.getComputedStyle(i);p&&"static"===p.position&&(i.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){var r=(t||"")+".resize-triggers { "+(o||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=n.head||n.getElementsByTagName("head")[0],a=n.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(n.createTextNode(r)),i.appendChild(a)}}(u),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=u.createElement("div")).className="resize-triggers";var d=u.createElement("div");d.className="expand-trigger",d.appendChild(u.createElement("div"));var h=u.createElement("div");h.className="contract-trigger",i.__resizeTriggers__.appendChild(d),i.__resizeTriggers__.appendChild(h),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",s,!0),r&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===n&&a(i)},i.__resizeTriggers__.addEventListener(r,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(c)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",s,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(r,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}null==fp||null==mp?(up=dp,pp=function(e){return hp(e,20)}):(up=function(e){var t=lp(e,2),n=t[0],r=t[1];fp(n),dp(r)},pp=function(e){var t=mp((function(){dp(n),e()})),n=hp((function(){fp(t),e()}),20);return[t,n]});var yp=function(e){function t(){var e,n,r;op(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=sp(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(i))),r.state={height:r.props.defaultHeight||0,width:r.props.defaultWidth||0},r._onResize=function(){var e=r.props,t=e.disableHeight,n=e.disableWidth,o=e.onResize;if(r._parentNode){var i=r._parentNode.offsetHeight||0,a=r._parentNode.offsetWidth||0,s=window.getComputedStyle(r._parentNode)||{},l=parseInt(s.paddingLeft,10)||0,c=parseInt(s.paddingRight,10)||0,u=parseInt(s.paddingTop,10)||0,p=parseInt(s.paddingBottom,10)||0,d=i-u-p,h=a-l-c;(!t&&r.state.height!==d||!n&&r.state.width!==h)&&(r.setState({height:i-u-p,width:a-l-c}),o({height:i,width:a}))}},r._setRef=function(e){r._autoSizer=e},sp(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,f),ip(t,[{key:"componentDidMount",value:function(){var e=this.props.nonce;this._autoSizer&&this._autoSizer.parentNode&&this._autoSizer.parentNode.ownerDocument&&this._autoSizer.parentNode.ownerDocument.defaultView&&this._autoSizer.parentNode instanceof this._autoSizer.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=this._autoSizer.parentNode,this._detectElementResize=gp(e),this._detectElementResize.addResizeListener(this._parentNode,this._onResize),this._onResize())}},{key:"componentWillUnmount",value:function(){this._detectElementResize&&this._parentNode&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize)}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.className,r=e.disableHeight,o=e.disableWidth,i=e.style,a=this.state,s=a.height,l=a.width,c={overflow:"visible"},u={},p=!1;return r||(0===s&&(p=!0),c.height=0,u.height=s),o||(0===l&&(p=!0),c.width=0,u.width=l),h("div",{className:n,ref:this._setRef,style:ap({},c,i)},!p&&t(u))}}]),t}();yp.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}};const bp={listBoxHeader:"".concat("ListBoxInline","-listBoxHeader")},vp=Cs(L)((()=>({["& .".concat(bp.listBoxHeader)]:{alignSelf:"center",display:"inline-flex"}})));function Ep(e){let{app:n,fieldIdentifier:r,stateName:o="$",options:s={},fieldDef:l}=e;const{title:c,direction:u,listLayout:d,search:h=!0,focusSearch:f=!1,toolbar:y=!0,rangeSelect:b=!0,checkboxes:v=!1,properties:E={},sessionModel:x,selectionsApi:C,update:S,fetchStart:w,dense:O=!1,selectDisabled:q=(()=>!1),postProcessPages:I,calculatePagesHeight:_,showGray:T=!0,scrollState:A,setCount:D,shouldConfirmOnBlur:N}=s;let{frequencyMode:P,histogram:M=!1}=s;switch(l&&l.failedToFetchFieldDef&&(M=!1,P="N"),!0){case["none","N","NX_FREQUENCY_NONE"].includes(P):P="N";break;case["value","V","NX_FREQUENCY_VALUE","default"].includes(P):P="V";break;case["percent","P","NX_FREQUENCY_PERCENT"].includes(P):P="P";break;case["relative","R","NX_FREQUENCY_RELATIVE"].includes(P):P="R";break;default:P="N"}const j={qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:o,qShowAlternatives:!0,qFrequencyMode:M&&"N"===P?"V":P,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}]}},title:c};let z;if(de(!0,j,E),r.qLibraryId?(j.qListObjectDef.qLibraryId=r.qLibraryId,z=r.qLibraryId):(j.qListObjectDef.qDef.qFieldDefs=[r],z=r),"N"!==P||M){const e=r.qLibraryId?l:z;j.frequencyMax={qValueExpression:"Max(AGGR(Count([".concat(e,"]), [").concat(e,"]))")}}let[F]=oc(j,x?null:n,z,o);x&&(F=x);let B=Bu(C?{}:n,F)[0];C&&(B=C);const $=vs(),U=p((()=>{F.lock("/qListObjectDef")}),[F]),H=p((()=>{F.unlock("/qListObjectDef")}),[F]),{translator:W,keyboardNavigation:V}=g(jl),G=m(),[K,Z]=(()=>{const[e,t]=i({}),n=p((e=>{t({current:e})}),[t]);return[e,n]})(),[X]=nc(F),[J,Y]=i(!1),[Q,ee]=i(!1),[te,ne]=i(!1),re=ou({setKeyboardActive:ne}),oe={enabled:V,active:te};a((()=>{const e=()=>Y(!0),t=()=>Y(!1);return B&&(B.isModal(F)||(B.on("deactivated",t),B.on("activated",e))),()=>{B&&(B.removeListener("deactivated",e),B.removeListener("activated",t))}}),[B]),a((()=>{B&&Y(B.isActive())}),[B]);const ie=m(null);if(function(e,t,n){const[r,o]=i(!1),s=m(r),l=e=>{s.current=e,o(e)};a((()=>{if(!n)return;const r=n=>{const r=e.current&&e.current.contains(n.target),o=s.current;r||o?r&&l(!1):(t&&t.confirm.call(t),l(!0))};return document.addEventListener("mousedown",r),document.addEventListener("keydown",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",r)}}),[e,t,n])}(ie,B,N),a((()=>{if(K&&K.current&&(h&&f||"toggle"===h&&Q)){const e=K.current.querySelector("input");e&&e.focus()}}),[K&&K.current,Q,h,f]),!F||!X||!W)return null;const ae=!0===X.qListObject.qDimensionInfo.qLocked,se=y?bu({layout:X,model:F,translator:W}):[],le=X.qListObject.qDimensionInfo.qStateCounts,ce=le.qSelected+le.qSelectedExcluded+le.qLocked+le.qLockedExcluded>0,ue=(!0===h||"toggle"===h&&Q)&&!q(),pe=49+(ue?O?27:40:0)+(O?39:49),he=()=>{ee(!Q)};return t.createElement(vp,{container:!0,tabIndex:oe.enabled&&!oe.active?0:-1,direction:"column",gap:0,style:{height:"100%",minHeight:"".concat(pe,"px")},onKeyDown:re,ref:ie},y&&t.createElement(L,{item:!0,container:!0,style:{padding:$.spacing(1)}},t.createElement(L,{item:!0},ae?t.createElement(R,{tabIndex:-1,onClick:H,disabled:!ae,size:"large"},t.createElement(Sc,{title:W.get("Listbox.Unlock")})):"toggle"!==h||ce?t.createElement(R,{onClick:U,tabIndex:-1,disabled:!ce,size:"large"},t.createElement(wc,null)):t.createElement(R,{onClick:he,tabIndex:-1,title:W.get("Listbox.Search"),size:"large"},t.createElement(ju,null))),t.createElement(L,{item:!0,className:bp.listBoxHeader},t.createElement(k,{variant:"h6",noWrap:!0},X.title||X.qListObject.qDimensionInfo.qFallbackTitle)),t.createElement(L,{item:!0,xs:!0}),t.createElement(L,{item:!0},t.createElement(Mu,{more:{enabled:!ae,actions:se,alignTo:G,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:J,api:B,onConfirm:()=>{},onCancel:()=>{}}}))),t.createElement(L,{item:!0,ref:Z},t.createElement(zu,{model:F,dense:O,keyboard:oe,visible:ue})),t.createElement(L,{item:!0,xs:!0},t.createElement("div",{ref:G}),t.createElement(yp,null,(e=>{let{height:n,width:r}=e;return t.createElement(hu,{model:F,selections:B,direction:u,listLayout:d,frequencyMode:P,histogram:M,rangeSelect:b,checkboxes:v,height:n,width:r,update:S,fetchStart:w,postProcessPages:I,calculatePagesHeight:_,dense:O,selectDisabled:q,keyboard:oe,showGray:T,scrollState:A,sortByState:j.qListObjectDef.qDef.qSortCriterias[0].qSortByState,setCount:D})}))))}function xp(e){let{app:n,fieldIdentifier:r,stateName:o="$",options:s={}}=e;const[l,c]=i(""),[u,p]=i(!1);return a((()=>{!async function(){p(!0);try{const e=await n.getDimension(r.qLibraryId),t=await e.getLayout();c(t.qDim.qFieldDefs?t.qDim.qFieldDefs[0]:""),p(!1)}catch(e){throw p(!1),c({failedToFetchFieldDef:!0}),new Error("Disabling frequency count and histogram: ".concat(e&&e.message))}}()}),[]),u?null:t.createElement(Ep,{app:n,fieldIdentifier:r,stateName:o,options:s,fieldDef:l})}function Cp(e){let{app:n,fieldIdentifier:r,stateName:o,element:i,options:a}=e;const s=a.histogram||"N"!==a.frequencyMode,l=r.qLibraryId&&s?xp:Ep;return y.createPortal(t.createElement(l,{app:n,fieldIdentifier:r,stateName:o,element:i,options:a}),i)}const Sp=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function wp(e){let[t,n]=e;return(t+(Math.random()*(n-t)|0)).toString(32)}function Lp(){return Sp.map(wp).join("")}function kp(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function Op(e,t){let n=0;for(let r=0;r<e.length;++r)e[r]>t?--e[r]:e[r]===t&&(n=r);return e.splice(n,1),n}function Rp(e){let{sn:t,properties:n,fields:r}=e;if(!r.length)return;const o=t.qae.data.targets[0];if(!o)return;const{propertyPath:i}=o,a=i.split("/");let s=n;for(let e=0;e<a.length;e++){const t=a[e];s=t?s[t]:s}const l=function(e){let{dc:t,def:n,properties:r}=e;t.qDimensions=t.qDimensions||[],t.qMeasures=t.qMeasures||[],t.qInterColumnSortOrder=t.qInterColumnSortOrder||[],t.qInitialDataFetch=t.qInitialDataFetch||[],t.qColumnOrder=t.qColumnOrder||[],t.qExpansionState=t.qExpansionState||[];const o=r,i={dimensions:()=>t.qDimensions,measures:()=>t.qMeasures,addDimension(e){const r=V(V({},e),{},{qDef:e.qDef||{}});r.qDef.cId=r.qDef.cId||Lp(),r.qDef.qSortCriterias=r.qDef.qSortCriterias||[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],r.qOtherTotalSpec=r.qOtherTotalSpec||{},r.qAttributeExpressions=r.qAttributeExpressions||[],r.qAttributeDimensions=r.qAttributeDimensions||[],t.qDimensions.length<i.maxDimensions()?(t.qDimensions.push(r),kp(t.qInterColumnSortOrder,t.qDimensions.length-1),n.dimensions.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qDimensions.push(r))},removeDimension(e){const r=t.qDimensions.splice(e,1)[0];Op(t.qInterColumnSortOrder,e),n.dimensions.removed(r,o,e)},addMeasure(e){const r="string"==typeof e?(e=>({qDef:{qDef:e}}))(e):V(V({},e),{},{qDef:e.qDef||{}});r.qDef.cId=r.qDef.cId||Lp(),r.qSortBy=r.qSortBy||{qSortByLoadOrder:1,qSortByNumeric:-1},r.qAttributeDimensions=r.qAttributeDimensions||[],r.qAttributeExpressions=r.qAttributeExpressions||[],t.qMeasures.length<i.maxMeasures()?(t.qMeasures.push(r),kp(t.qInterColumnSortOrder,t.qDimensions.length+t.qMeasures.length-1),n.measures.added(r,o)):(t.qLayoutExclude=t.qLayoutExclude||{},t.qLayoutExclude.qHyperCubeDef=t.qLayoutExclude.qHyperCubeDef||{},t.qLayoutExclude.qHyperCubeDef.qDimensions=t.qLayoutExclude.qHyperCubeDef.qDimensions||[],t.qLayoutExclude.qHyperCubeDef.qMeasures=t.qLayoutExclude.qHyperCubeDef.qMeasures||[],t.qLayoutExclude.qHyperCubeDef.qMeasures.push(r))},removeMeasure(e){const r=t.qMeasures.splice(e,1)[0];Op(t.qInterColumnSortOrder,t.qDimensions.length+e),n.measures.removed(r,o,e)},maxDimensions:()=>n.dimensions.max(t.qMeasures.length),maxMeasures:()=>n.measures.max(t.qDimensions.length),canAddDimension:()=>t.qDimensions.length<i.maxDimensions(),canAddMeasure:()=>t.qMeasures.length<i.maxMeasures()};return i}({dc:s,def:o,properties:n});r.forEach((e=>{const t=function(e){return"string"==typeof e&&"="===e[0]||"object"==typeof e&&e.qDef&&e.qDef.qDef||"object"==typeof e&&e.qLibraryId&&"measure"===e.type?"measure":"dimension"}(e);"measure"===t?l.addMeasure(e):l.addDimension(e)}))}var qp=(e,t,n)=>{if(null==e||null==t)return n;const r=t.split(".");let o=e;for(let e=0;e<r.length;++e){const t=r[e];if(""!==t){if(void 0===o[t]||null===o[t])return n;o=o[t]}}return o},Ip=(e,t,n)=>{if(null==e||null==t)return;const r=t.split("."),o=r[r.length-1];let i=e;for(let e=0;e<r.length-1;++e){const t=r[e];void 0!==i[t]&&null!==i[t]||(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}void 0!==n&&"__proto__"!==o&&"constructor"!==o?i[o]=n:delete i[o]},_p=e=>0===Object.keys(e).length&&e.constructor===Object;var Tp={isOrderedSubset:function(e,t){if(!(e&&t&&e.length&&t.length))return!1;let n=e.indexOf(t[0]);if(-1!==n){for(let r=0;r<t.length;r++){const o=e.indexOf(t[r]);if(n>o)return!1;n=o}return!0}return!1},indexAdded:function(e,t){let n;for(n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)},indexRemoved:function(e,t){let 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}};function Ap(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function Dp(e,t){const n=de(!0,{},t,e);return qp(n,"qOtherTotalSpec.qOtherCounted")||Ip(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),qp(n,"qOtherTotalSpec.qOtherLimit")||Ip(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function Np(e,t){return de(!0,{},t,e)}function Pp(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var Mp={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach((t=>{e.qLayoutExclude.changed[t].to===qp(e,t)&&Ip(e,t,e.qLayoutExclude.changed[t].from)}))},isMasterItemProperty:Ap,importCommonProperties:function(e,t,n){const r="masterobject"===qp(t,"properties.qInfo.qType")?"masterobject":qp(n,"qInfo.qType");Ip(e,"qInfo.qType",r),e.visualization=n.visualization},copyPropertyIfExist:function(e,t,n){t.hasOwnProperty(e)&&(n[e]=t[e])},copyPropertyOrSetDefault:function(e,t,n,r){t.hasOwnProperty(e)?n[e]=t[e]:n[e]=r},createDefaultDimension:Dp,createDefaultMeasure:Np,resolveValue:Pp,getHypercubePath:function(e){const t=qp(e,"data.targets.0.propertyPath","").split("/");return t.length&&"qHyperCubeDef"===t[t.length-1]&&(t.length-=1),t.join(".")},getDefaultDimension: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}}},getDefaultMeasure:function(){return{qDef:{autoSort:!0,cId:"",numFormatFromTemplate:!0},qLibraryId:"",qTrendLines:[]}},setInterColumnSortOrder:function(e){let{exportFormat:t,newHyperCubeDef:n}=e;const r=t.data[0],o=n.qDimensions.length+n.qMeasures.length;n.qInterColumnSortOrder=r.interColumnSortOrder.concat();let i=n.qInterColumnSortOrder.length;if(i!==o)for(n.qLayoutExclude&&(n.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=r.interColumnSortOrder.concat());i!==o;)i<o?(Tp.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,Tp.indexRemoved(n.qInterColumnSortOrder,i))},createNewProperties:function(e){let{exportFormat:t,initialProperties:n,hypercubePath:r}=e,o={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(t.properties).forEach((e=>{"qLayoutExclude"===e?t.properties[e].quarantine&&(o.qLayoutExclude.quarantine=de(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?Ip(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||Ap(e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),o=de(!0,{},n,o),null===o.components&&(o.components=[]),o},getMaxMinDimensionMeasure:function(e){let{exportFormat:t,dataDefinition:n={}}=e;const r=t.data[0],o=n.dimensions||{max:0},i=n.measures||{max:0},a=Pp(i.max,r.dimensions.length,9007199254740991),s=Pp(i.min,r.dimensions.length,0);return{maxDimensions:Pp(o.max,a,9007199254740991),minDimensions:Pp(o.min,s,0),maxMeasures:a,minMeasures:s}},shouldInitLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i}=e;const 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},initLayoutExclude:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,maxMeasures:o,minMeasures:i,newHyperCubeDef:a}=e;const 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=[]))},addDefaultDimensions:function(e){let{exportFormat:t,maxDimensions:n,minDimensions:r,newHyperCubeDef:o,defaultDimension:i}=e;const a=t.data[0];let s;if(n>0)for(s=0;s<a.dimensions.length;++s)o.qDimensions.length<n?o.qDimensions.push(Dp(a.dimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Dp(a.dimensions[s],i));else if(a.dimensions.length)for(s=0;s<a.dimensions.length;++s)o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Dp(a.dimensions[s],i));if(a.excludedDimensions.length)for(s=0;s<a.excludedDimensions.length;++s)o.qDimensions.length<r?o.qDimensions.push(Dp(a.excludedDimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Dp(a.excludedDimensions[s],i))},addDefaultMeasures:function(e){let{exportFormat:t,maxMeasures:n,minMeasures:r,newHyperCubeDef:o,defaultMeasure:i}=e;const a=t.data[0];let s;if(n>0)for(s=0;s<a.measures.length;++s)o.qMeasures.length<n?o.qMeasures.push(Np(a.measures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Np(a.measures[s],i));else if(a.measures.length)for(s=0;s<a.measures.length;++s)o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Np(a.measures[s],i));if(a.excludedMeasures.length)for(s=0;s<a.excludedMeasures.length;++s)o.qMeasures.length<r?o.qMeasures.push(Np(a.excludedMeasures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Np(a.excludedMeasures[s],i))},updateDimensionsOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.dimensions&&"function"==typeof n.dimensions.added){const e=qp(t,r||"").qHyperCubeDef,o=[...e.qDimensions];e.qDimensions=[],o.forEach((r=>{e.qDimensions.push(r),n.dimensions.added(r,t)}))}},updateMeasuresOnAdded:function(e){let{newProperties:t,dataDefinition:n,hypercubePath:r}=e;if(n.measures&&"function"==typeof n.measures.added){const e=qp(t,r||"").qHyperCubeDef,o=[...e.qMeasures];e.qMeasures=[],o.forEach((r=>{e.qMeasures.push(r),n.measures.added(r,t)}))}}};var jp={exportProperties:e=>function(e){let{propertyTree:t,hypercubePath:n}=e;const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;const t={data:[],properties:{}};for(let n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),o=t.qProperty,i=qp(o,n||""),a=i.qHyperCubeDef,s=r.data[0];if(a.qInterColumnSortOrder||(a.qInterColumnSortOrder=[]),s.dimensions.push(...a.qDimensions),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qDimensions&&s.excludedDimensions.push(...a.qLayoutExclude.qHyperCubeDef.qDimensions),s.measures.push(...a.qMeasures),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qMeasures&&s.excludedMeasures.push(...a.qLayoutExclude.qHyperCubeDef.qMeasures),s.interColumnSortOrder=a.qInterColumnSortOrder.concat(),a.qLayoutExclude&&a.qLayoutExclude.qHyperCubeDef&&a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder){const e=a.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder.concat();Tp.isOrderedSubset(e,s.interColumnSortOrder)&&(s.interColumnSortOrder=e)}return delete a.qLayoutExclude,Object.keys(o).forEach((e=>{r.properties[e]=o[e]})),n&&(r.properties.qHyperCubeDef=i.qHyperCubeDef,delete i.qHyperCubeDef),o.qLayoutExclude||(o.qLayoutExclude={}),o.qLayoutExclude.disabled&&(Object.keys(o.qLayoutExclude.disabled).forEach((e=>{r.properties.hasOwnProperty(e)||(r.properties[e]=o.qLayoutExclude.disabled[e])})),delete o.qLayoutExclude.disabled),o.qLayoutExclude.changed&&(Mp.restoreChangedProperties(o),delete o.qLayoutExclude.changed),o.qLayoutExclude.quarantine&&!_p(o.qLayoutExclude.quarantine)||delete o.qLayoutExclude,r}(e),importProperties:e=>function(e){let{exportFormat:t,initialProperties:n={},dataDefinition:r={},defaultPropertyValues:o={},hypercubePath:i}=e;const a={qChildren:[]},s=Mp.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:i}),l=qp(n,i||"").qHyperCubeDef,c=qp(s,i||"").qHyperCubeDef,{maxDimensions:u,minDimensions:p,maxMeasures:d,minMeasures:h}=Mp.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:r}),{defaultDimension:f=Mp.getDefaultDimension(),defaultMeasure:m=Mp.getDefaultMeasure()}=o;return c.qDimensions.length=0,c.qMeasures.length=0,Mp.shouldInitLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:p,maxMeasures:d,minMeasures:h})&&Mp.initLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:p,maxMeasures:d,minMeasures:h,newHyperCubeDef:c}),Mp.addDefaultDimensions({exportFormat:t,maxDimensions:u,minDimensions:p,newHyperCubeDef:c,defaultDimension:f}),Mp.addDefaultMeasures({exportFormat:t,maxMeasures:d,minMeasures:h,newHyperCubeDef:c,defaultMeasure:m}),Mp.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:c}),Mp.copyPropertyIfExist("qMaxStackedCells",l,c),Mp.copyPropertyIfExist("qNoOfLeftDims",l,c),Mp.copyPropertyOrSetDefault("qInitialDataFetch",l,c,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),Mp.copyPropertyOrSetDefault("qMode",l,c,"S"),Mp.copyPropertyOrSetDefault("qReductionMode",l,c,"N"),Mp.copyPropertyOrSetDefault("qSortbyYValue",l,c),Mp.copyPropertyOrSetDefault("qIndentMode",l,c),Mp.copyPropertyOrSetDefault("qShowTotalsAbove",l,c),Mp.importCommonProperties(s,t,n),Mp.updateDimensionsOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),Mp.updateMeasuresOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),a.qProperty=s,a}(e)};const zp=e=>qp(e,"data.targets.0.propertyPath"),Fp=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return jp.exportProperties})(zp(e))},Bp=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return jp.importProperties})(zp(e))},$p=async e=>{let{halo:t,model:n,cellRef:r,newType:o}=e;const i=await n.getFullPropertyTree(),a=r.current.getQae(),s=Fp(a),l=await(async e=>{let{halo:t,name:n,version:r}=e;const{types:o}=t;return await o.get({name:n,version:r}).supernova()})({halo:t,name:o}),c=l.qae;return Bp(c)({exportFormat:s({propertyTree:i,hypercubePath:Mp.getHypercubePath(a)}),initialProperties:V({qInfo:{qType:o},visualization:o},qp(c,"properties.initial",{})),dataDefinition:qp(c,"data.targets.0.",{}),hypercubePath:Mp.getHypercubePath(c)})},Up={hypercube:jp};var Hp=e=>xc((e=>V(V({},e),{},{shapes:[{type:"path",attrs:{d:"M8.86225926,1.6 L15.7815749,13.5 C16.2829746,14.3 15.8818548,15 14.9793354,15 L1.04042422,15 C0.0853772072,15 -0.232971797,14.3650794 0.172002787,13.6135407 L7.05722041,1.6 C7.55862009,0.8 8.36085958,0.8 8.86225926,1.6 Z M7.962,2.007 C7.95987183,2.02476599 7.95607967,2.03712023 7.94920396,2.05249845 L1.1033193,14 L14.915544,14 L7.99777452,2.10265906 L7.97779697,2.06138411 L7.96394459,2.01964415 L7.962,2.007 Z M7.5,11 L8.5,11 C8.76666667,11 8.95432099,11.1580247 8.99272977,11.4038409 L9,11.5 L9,12.5 C9,12.7666667 8.84197531,12.954321 8.59615912,12.9927298 L8.5,13 L7.5,13 C7.23333333,13 7.04567901,12.8419753 7.00727023,12.5961591 L7,12.5 L7,11.5 C7,11.2333333 7.15802469,11.045679 7.40384088,11.0072702 L7.5,11 L8.5,11 L7.5,11 Z M7.5,5 L8.5,5 C8.76666667,5 8.95432099,5.15802469 8.99272977,5.40384088 L9,5.5 L9,9.5 C9,9.76666667 8.84197531,9.95432099 8.59615912,9.99272977 L8.5,10 L7.5,10 C7.23333333,10 7.04567901,9.84197531 7.00727023,9.59615912 L7,9.5 L7,5.5 C7,5.23333333 7.15802469,5.04567901 7.40384088,5.00727023 L7.5,5 L8.5,5 L7.5,5 Z"}}]}))(e));function Wp(e){let{d:n}=e;const r=vs();let o="inherit",i=r.palette.success.main;n.missing?i=r.palette.warning.main:n.error&&(o="error",i=r.palette.error.main);const a={color:i},s=t.createElement(k,{style:{lineHeight:"30px",paddingRight:r.spacing(1)}},t.createElement(B,null,n.missing||n.error?t.createElement(Hp,{style:a}):t.createElement(Kc,{style:a})));return t.createElement(L,{item:!0,container:!0,alignItems:"center",wrap:"nowrap"},t.createElement(L,{item:!0},s),t.createElement(L,{container:!0,item:!0,zeroMinWidth:!0,wrap:"nowrap"},t.createElement(k,{noWrap:!0,component:"p"},t.createElement(k,{component:"span",variant:"subtitle2",color:o},n.description),t.createElement(k,{component:"span"}," "),t.createElement(k,{component:"span",variant:"subtitle2",color:n.error?"error":"inherit",style:{fontWeight:400}},n.label))))}function Vp(e){let{data:n}=e;const r=vs();return t.createElement(L,{container:!0,item:!0,style:{maxWidth:"300px",overflow:"hidden"}},n.map(((e,n)=>{const o=e.descriptions.map(((e,n)=>t.createElement(Wp,{d:e,key:n})));return o.length>0&&t.createElement(L,{container:!0,item:!0,key:n,direction:"column",style:{paddingBottom:r.spacing(2)}},t.createElement(k,{noWrap:!0,key:n,variant:"subtitle1",align:"left",color:"textSecondary"},e.title),o)})))}function Gp(e){let{title:n="Error",message:r="",data:o=[]}=e;return t.createElement(L,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"}},t.createElement(L,{item:!0},t.createElement(Hp,{style:{fontSize:"38px"}})),t.createElement(L,{item:!0},t.createElement(k,{variant:"h6",align:"center","data-tid":"error-title"},n)),t.createElement(L,{item:!0},t.createElement(k,{variant:"subtitle1",align:"center","data-tid":"error-message"},r)),t.createElement(Vp,{data:o}))}const Kp=["size"],Zp={root:"".concat("Progress","-root"),front:"".concat("Progress","-front"),back:"".concat("Progress","-back")},Xp=Cs("div")((e=>{let{theme:t}=e;return{["&.".concat(Zp.root)]:{position:"relative",display:"inline-block"},["& .".concat(Zp.front)]:{color:t.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},["& .".concat(Zp.back)]:{color:t.palette.divider}}})),Jp={small:16,medium:32,large:64,xlarge:128};function Yp(e){let{size:n="medium"}=e,r=Z(e,Kp);const o=Jp[n];return t.createElement(Xp,{className:Zp.root},t.createElement($,K({variant:"determinate",value:100,className:Zp.back,size:o,thickness:3},r)),t.createElement($,K({variant:"indeterminate",disableShrink:!0,className:Zp.front,size:o,thickness:3},r)))}const Qp=["cancel","translator"],ed=["retry","translator"],td={stripes:"".concat("LongRunningQuery","-stripes")},nd=Cs(L)((()=>({["& .".concat(td.stripes)]:{"&::before":{position:"absolute",height:"100%",width:"100%",top:0,left:0,content:'""',backgroundSize:"14.14px 14.14px",backgroundImage:"linear-gradient(135deg, currentColor 10%, rgba(0,0,0,0) 10%, rgba(0,0,0,0) 50%, currentColor 50%, currentColor 59%, rgba(0,0,0,0) 60%, rgba(0,0,0,0) 103%)",opacity:.1}}})));function rd(e){let{cancel:n,translator:r}=e,o=Z(e,Qp);return t.createElement(t.Fragment,null,t.createElement(nd,{container:!0,item:!0,direction:"column",alignItems:"center",gap:2},t.createElement(L,{item:!0},t.createElement(Yp,null)),t.createElement(L,{item:!0},t.createElement(k,{variant:"h6",align:"center","data-tid":"update-active"},r.get("Object.Update.Active")))),t.createElement(L,K({item:!0},o),t.createElement(z,{variant:"contained",onClick:n},r.get("Cancel"))))}function od(e){let{retry:n,translator:r}=e,o=Z(e,ed);return t.createElement(t.Fragment,null,t.createElement(L,{item:!0},t.createElement(Hp,{style:{fontSize:"38px"}})),t.createElement(L,{item:!0},t.createElement(k,{variant:"h6",align:"center","data-tid":"update-cancelled"},r.get("Object.Update.Cancelled"))),t.createElement(L,{item:!0},t.createElement(z,K({variant:"contained",onClick:n},o),r.get("Retry"))))}function id(e){let{canCancel:n,canRetry:r,api:o}=e;const{translator:i}=g(jl);return t.createElement(L,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:td.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},n&&t.createElement(rd,{cancel:o.cancel,translator:i,className:td.cancel}),r&&t.createElement(od,{retry:o.retry,translator:i,className:td.retry}))}function ad(){return t.createElement(L,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},t.createElement(Yp,{size:"large"}))}const sd={containerStyle:"".concat("Header","-containerStyle"),containerTitleStyle:"".concat("Header","-containerTitleStyle")},ld=Cs(L)((e=>{let{theme:t}=e;return{["& .".concat(sd.containerStyle)]:{flexGrow:0},["& .".concat(sd.containerTitleStyle)]:{paddingBottom:t.spacing(1)}}})),cd="njs-cell-title",ud="njs-cell-sub-title";function pd(e){let{layout:n,sn:r,anchorEl:o,hovering:s,focusHandler:l}=e;const c=n.showTitles&&!!n.title,u=n.showTitles&&!!n.subtitle,p=n.qSelectionInfo&&n.qSelectionInfo.qInSelections,[d,h]=i([]),[f,m]=vc(),[g,y]=i(!1);a((()=>{r&&r.component&&r.component.isHooked&&r.component.observeActions((e=>{h([...e,...r&&r.selectionToolbar&&r.selectionToolbar.items||[]])}))}),[r]),a((()=>{if(!m)return;const{width:e}=m;y(e<221)}),[m]);const b=c||u,v=[sd.containerStyle,...b?[sd.containerTitleStyle]:[]],E=(s||p)&&(g||!b),x=b&&!E&&!g,C=t.createElement(Mu,{show:x,selections:{show:p,api:r.component.selections,onKeyDeactivate:l.refocusContent},actions:d,popover:{show:E,anchorEl:o},focusHandler:l});return t.createElement(ld,{ref:f,item:!0,container:!0,wrap:"nowrap",className:v.join(" ")},t.createElement(L,{item:!0,zeroMinWidth:!0,xs:!0},t.createElement(L,{container:!0,wrap:"nowrap",direction:"column"},c&&t.createElement(k,{variant:"h6",noWrap:!0,className:cd},n.title),u&&t.createElement(k,{variant:"body2",noWrap:!0,className:ud},n.subtitle))),t.createElement(L,{item:!0},C))}const dd={itemStyle:"".concat("Footer","-itemStyle")},hd=Cs(L)((e=>{let{theme:t}=e;return{["& .".concat(dd.itemStyle)]:{minWidth:0,paddingTop:t.spacing(1)}}})),fd="njs-cell-footer";function md(e){let{layout:n}=e;return n&&n.showTitles&&n.footnote?t.createElement(hd,{container:!0},t.createElement(L,{item:!0,className:dd.itemStyle},t.createElement(k,{noWrap:!0,variant:"body2",className:fd},n.footnote))):null}class gd{constructor(){this.timer=null,this.next=null,this.running=!1}start(){this.running||(this.running=!0,this.scheduleNext())}scheduleNext(){this.timer=setTimeout((()=>{this.doNext()}),10)}async doNext(){const e=this.next;this.next=null,e?(await e(),this.scheduleNext()):this.stop()}schedule(e){this.next=e,this.start()}stop(){this.running&&(clearTimeout(this.timer),this.timer=null,this.running=!1)}}const yd="njs-viz";function bd(e){let{sn:n,snOptions:r,snPlugins:o,layout:s,appLayout:l,halo:c}=e;const{component:u}=n,{theme:d,language:h,constraints:f,keyboardNavigation:m}=g(jl),[y]=i((()=>new gd)),[b,v]=i(!1),[E,x]=i(0),[C,S,w]=vc(),[L,k]=i(null),O=p((e=>{e&&k(e)}),[]);return a((()=>{if(L)return u.created({options:r}),u.mounted(L),v(!0),()=>{y.stop(),u.willUnmount()}}),[L,u]),a((()=>{b&&L&&S&&(!u.isHooked&&s&&s.qSelectionInfo&&s.qSelectionInfo.qInSelections||y.schedule((()=>{const e=[];return f.passive||e.push("passive"),f.active||e.push("interact"),f.select||e.push("select"),c.app&&c.app.session&&e.push("fetch"),Promise.resolve(u.render({layout:s,options:r,plugins:o,embed:c.public.nebbie,context:V({constraints:f,theme:c.public.theme,appLayout:l,keyboardNavigation:m},u.isHooked?{}:{logicalSize:n.logicalSize({layout:s}),localeInfo:(l||{}).qLocaleInfo,permissions:e})})).then((e=>{!1!==e&&(0===E&&"function"==typeof r.onInitialRender&&r.onInitialRender.call(null),x(E+1))}))})))}),[S,r,o,L,w,s,l,d,h,f,b,m]),t.createElement("div",{ref:C,"data-render-count":E,style:{position:"relative",height:"100%"},className:yd},t.createElement("div",{ref:O,style:{position:"absolute",width:"100%",height:"100%"}}))}const vd="njs-cell",Ed=(e,t)=>{switch(t.type){case"LOADING":return V(V({},e),{},{loading:!0});case"LOADED":return V(V({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return V(V({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return V(V({},e),{},{longRunningQuery:!0});case"ERROR":return V(V({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error("Unhandled type: ".concat(t.type))}};function xd(e){let{delay:n=750}=e;const[r,o]=i(!1);return a((()=>{const e=setTimeout((()=>o(!0)),n);return()=>clearTimeout(e)}),[]),r?t.createElement(ad,null):null}const Cd=e=>!e.qError||7005===e.qError.qErrorCode,Sd=(e,t,n,r,o)=>[...Array(e).keys()].map((e=>{const i=!(!t||!t[e]),a=i&&t[e].qError&&7005===t[e].qError.qErrorCode,s=i&&!a&&t[e].qError,l=a&&t[e].qCalcCondMsg,c="".concat(s?r:a?l||o:i&&t[e].qFallbackTitle||""),u=n(e);return{description:u?"".concat(u).concat(c.length?":":""):null,label:c,missing:t&&!i&&!s&&e>=t.length||a,error:s}})),wd=e=>e&&(Array.isArray(e)?e:[e])||[],Ld=(e,t,n,r)=>{const o=r.dimensions.min(),i=r.measures.min(),a=r.resolveLayout(t);return{reqDimErrors:Sd(o,wd(a.qDimensionInfo),(e=>r.dimensions.description(n,e)),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),reqMeasErrors:Sd(i,wd(a.qMeasureInfo),(e=>r.measures.description(n,e)),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"))}},kd=async(e,t,n,r)=>{let{targets:o}=n;const{hasUnfulfilledErrors:i,aggMinD:a,aggMinM:s,hasLayoutErrors:l,layoutErrors:c}=((e,t,n)=>{let r=!1,o=0,i=0,a=!1,s=!1;const l=[];for(let c=0;c<t.length;++c){const u=t[c],p=u.dimensions.min(),d=u.measures.min(),h=u.resolveLayout(n),f=wd(h.qDimensionInfo).filter(Cd),m=wd(h.qMeasureInfo).filter(Cd);if(o+=p,i+=d,(f.length<p||m.length<d)&&(r=!0),h.qError){a=!0,s=7005===h.qError.qErrorCode;const t=s&&h.qCalcCondMsg?h.qCalcCondMsg:s?e.get("Visualization.UnfulfilledCalculationCondition"):e.get("Visualization.LayoutError");l.push({title:t,descriptions:[]})}}return{hasUnfulfilledErrors:r,aggMinD:o,aggMinM:i,hasLayoutErrors:a,layoutErrors:l}})(e,o,t),u=[],p=[];let d=null;for(let n=0;n<o.length;++n){const a=o[n];if(!l&&i){const n=d||await r.getProperties();d=n;const o=Ld(e,t,n,a);u.push(...o.reqDimErrors),p.push(...o.reqMeasErrors)}}const h=u.filter((e=>!(e.missing||e.error))).length,f=e.get("Visualization.Incomplete.Dimensions",[h,a]),m=p.filter((e=>!(e.missing||e.error))).length,g=e.get("Visualization.Incomplete.Measures",[m,s]),y=[{title:f,descriptions:[...u]},{title:g,descriptions:[...p]}],b=l?c:y;return[l||i,{title:l?c[0].title:e.get("Visualization.Incomplete"),data:b}]},Od=l(((e,n)=>{let{halo:r,model:o,initialSnOptions:l,initialSnPlugins:c,initialError:p,onMount:d,currentId:h}=e;const{app:f,types:y}=r,{nebbie:b}=r.public,{disableCellPadding:v=!1}=r.context||{},{translator:E,language:x,keyboardNavigation:C}=g(jl),S=vs(),[w,k,O]=vc(),[R,q]=s(Ed,{loading:!1,loaded:!1,longRunningQuery:!1,error:(I=p)?{title:I.message}:null,sn:null,visualization:null});var I;const[_,{validating:T,canCancel:A,canRetry:D},N]=nc(o),[P]=rc(f),[M,j,z]=vc(),[F,B]=i(l),[$,H]=i(c),[W]=Bu(f,o),[G,K]=i(!1),Z=m({enter:null,leave:null}),X=m({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});a((()=>{Fu(X.current)}),[]),X.current.blurCallback=e=>{r.root.toggleFocusOfCells(),e&&z&&z.focus()},X.current.refocusContent=()=>{R.sn.component&&"function"==typeof R.sn.component.focus&&R.sn.component.focus()};a((()=>{if(p||!P||!_)return;if(R.visualization===_.visualization&&R.sn)return void(async e=>{const[t,n]=await kd(E,_,e.generator.qae.data,o);q(t?{type:"ERROR",error:n}:{type:"RENDER"}),(e=>{let{sn:t,layout:n,model:r}=e;const o=t&&t.component&&t.component.selections;if(o&&o.id&&r.id&&o.id===r.id){if(n&&n.qSelectionInfo&&n.qSelectionInfo.qInSelections&&!o.isModal()){const{targets:e}=t.generator.qae.data,n=e[0].propertyPath;o.goModal(n)}n.qSelectionInfo&&n.qSelectionInfo.qInSelections||o.isModal()&&o.noModal()}})({sn:R.sn,layout:_,model:o})})(R.sn);const e=y.getSupportedVersion(_.visualization,_.version);if(e)return(async(e,t)=>{q({type:"LOADING"});const n=await(async e=>{let{dispatch:t,types:n,visualization:r,version:o,model:i,app:a,selections:s,nebbie:l,focusHandler:c}=e;try{const e=await(async e=>{let{types:t,name:n,version:r}=e;return await t.get({name:n,version:r}).supernova()})({types:n,name:r,version:o});return e.create({model:i,app:a,selections:s,nebbie:l,focusHandler:c})}catch(e){t({type:"ERROR",error:{title:e.message}})}})({dispatch:q,types:y,visualization:e,version:t,model:o,app:f,selections:W,nebbie:b,focusHandler:X.current});n&&(q({type:"LOADED",sn:n,visualization:e}),d())})(_.visualization,e),()=>{};q({type:"ERROR",error:{title:"Could not find a version of '".concat(_.visualization,"' that supports current object version. Did you forget to register ").concat(_.visualization,"?")}})}),[y,R.sn,o,W,_,P,x]),a((()=>{if(!T)return;const e=setTimeout((()=>q({type:"LONG_RUNNING_QUERY"})),2e3);return()=>clearTimeout(e)}),[T]),u(n,(()=>({getQae:()=>R.sn.generator.qae,toggleFocus(e){"function"==typeof R.sn.component.focus&&(e?R.sn.component.focus():R.sn.component.blur())},setSnOptions:B,setSnPlugins:H,async takeSnapshot(){const{width:e,height:t}=k;let n=JSON.parse(JSON.stringify(_));return"function"==typeof R.sn.component.setSnapshotData&&(n=await R.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:E.language(),theme:S.name,appLayout:P,size:{width:Math.round(e),height:Math.round(t)}},layout:n}},async exportImage(){if("function"!=typeof r.config.snapshot.capture)throw new Error("Stardust embed has not been configured with snapshot.capture callback");const e=await this.takeSnapshot();return r.config.snapshot.capture(e)}})),[R.sn,j,k,_,S.name,P]);let J=null;return R.loading&&!R.longRunningQuery?J=t.createElement(xd,null):R.error?J=t.createElement(Gp,R.error):R.loaded&&(J=t.createElement(bd,{key:_.visualization,sn:R.sn,halo:r,snOptions:F,snPlugins:$,layout:_,appLayout:P})),t.createElement(U,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden"},elevation:0,square:!0,className:vd,ref:w,onMouseEnter:()=>{Z.current.leave&&clearTimeout(Z.current.leave),Z.enter||(Z.current.enter=setTimeout((()=>{K(!0),Z.current.enter=null}),250))},onMouseLeave:()=>{Z.current.enter&&clearTimeout(Z.current.enter),Z.current.leave||(Z.current.leave=setTimeout((()=>{K(!1),Z.current.leave=null}),750))}},t.createElement(L,{container:!0,direction:"column",gap:0,style:V(V({position:"relative",width:"100%",height:"100%"},v?{}:{padding:S.spacing(1)}),R.longRunningQuery?{opacity:"0.3"}:{})},O&&_&&R.sn&&t.createElement(pd,{layout:_,sn:R.sn,anchorEl:O,hovering:G,focusHandler:X.current}," "),t.createElement(L,{tabIndex:C?0:-1,onKeyDown:C?e=>{["Enter"," ","Spacebar"].includes(e.key)&&r.root.toggleFocusOfCells(h)}:null,item:!0,xs:!0,style:{height:"100%"},ref:M},J),t.createElement(md,{layout:_})),R.longRunningQuery&&t.createElement(id,{canCancel:A,canRetry:D,api:N}))}));function Rd(e){let{halo:n,element:r,model:o,initialSnOptions:i,initialSnPlugins:a,onMount:s,initialError:l}=e;const{root:c}=n,u=t.createRef(),p=Lp(),d=y.createPortal(t.createElement(Od,{ref:u,halo:n,model:o,currentId:p,initialSnOptions:i,initialSnPlugins:a,initialError:l,onMount:s}),r,o.id),h=()=>{c.remove(d),o.removeListener("closed",h)};return o.on("closed",h),c.add(d),c.addCell(p,u),[h,u]}function qd(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Id(e,t){return qd(e)&&qd(t)?JSON.stringify(e)===JSON.stringify(t):!Array.isArray(e)&&!Array.isArray(t)&&e===t}function _d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;const r=[];return Object.keys(t).forEach((o=>{const i=t[o];"object"!=typeof n[o]||"object"!=typeof i||Array.isArray(i)?Id(i,n[o])||r.push({qPath:e+o,qOp:"add",qValue:JSON.stringify(t[o])}):r.push(..._d("".concat(e).concat(o,"/"),t[o],n[o]))})),r}function Td(e){if(!Array.isArray(e))throw new Error("Invalid plugin format: plugins should be an array!");e.forEach((e=>{if("object"!=typeof e)throw new Error("Invalid plugin format: a plugin should be an object");if("object"!=typeof e.info||"string"!=typeof e.info.name)throw new Error("Invalid plugin format: a plugin should have an info object containing a name");if("function"!=typeof e.fn)throw new Error('Invalid plugin format: The plugin "'.concat(e.info.name,'" has no "fn" function'))}))}const Ad=()=>{};function Dd(){let{model:e,halo:t,initialError:n,onDestroy:r=(async()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=Ad,i=null,a=null,s=null;const l=new Promise((e=>{s=e}));let c={},u=[];const p=async e=>{a?(async()=>{await l,i.current.setSnOptions(V(V({},c),e))})():c=V(V({},c),e)},d=async e=>{Td(e),a?(async()=>{await l,i.current.setSnPlugins(e)})():u=e},h={id:e.id,async destroy(){await r(),o(),o=Ad},async convertTo(n){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=await $p({halo:t,model:e,cellRef:i,newType:n});return r&&(e.__snInterceptor?await e.__snInterceptor.setProperties.call(e,o.qProperty):await e.setProperties(o.qProperty)),o},__DO_NOT_USE__:{mount(r){if(a)throw new Error("Already mounted");return a=r,[o,i]=Rd({halo:t,element:r,model:e,initialSnOptions:c,initialSnPlugins:u,initialError:n,onMount:s}),l},async applyProperties(t){const n=_d("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){p(e)},plugins(e){d(e)},exportImage:()=>i.current.exportImage(),takeSnapshot:()=>i.current.takeSnapshot(),getModel:()=>e}};return h}async function Nd(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:async()=>{};const i=Dd({model:e,halo:n,initialError:r,onDestroy:o});return t.options&&i.__DO_NOT_USE__.options(t.options),t.plugins&&i.__DO_NOT_USE__.plugins(t.plugins),t.element&&await i.__DO_NOT_USE__.mount(t.element),i}async function Pd(e,t){let n,{type:r,version:o,fields:i,properties:a,options:s,plugins:l,element:c}=e,u={};try{const e=t.types.get({name:r,version:o});u=await e.initialProperties(a);const n=await e.supernova();i&&Rp({sn:n,properties:u,fields:i}),a&&n&&n.qae.properties.onChange&&n.qae.properties.onChange.call({},u)}catch(e){n=e,u={qInfo:{qType:r},visualization:r}}const p=await t.app.createSessionObject(u);Ql.set(p.id,p);const d=(e=>{const t=Jl({type:"SET",value:e});return()=>{t(),Ql.clear(e.id)}})(p);return Nd(p,{options:s,plugins:l,element:c},t,n,(async()=>{await t.app.destroySessionObject(p.id),d()}))}async function Md(e,t){let{id:n,options:r,plugins:o,element:i}=e;const a="".concat(n);let s=Gl.get(a);s||(s=t.app.getObject(n),Gl.set(a,s));const l=await s;return Ql.set(a,l),Nd(l,{options:r,plugins:o,element:i},t)}function jd(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{isEnabled:t=>!0===e[t]}}const zd=de.bind(null,!0),Fd={},{isArray:Bd}=Array;function $d(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Ud(e){return void 0===e}function Hd(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Wd(e,t){const n=t.substring(1).split("/").slice(0,-1);let r;return n.forEach(((t,o)=>{if(o===n.length)return;r=+t;const i=isNaN(r)?{}:[];e[r||t]=Ud(e[r||t])?i:e[t],e=e[r||t]})),e}function Vd(e,t){let n=!0;if($d(e)&&$d(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{Vd(e[r],t[r])||(n=!1)})),n);if(Bd(e)&&Bd(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!Vd(e[n],t[n]))return!1;return!0}return e===t}Fd.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?zd({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);Vd(i,a)||Hd(t,o)||(Ud(a)?r.push({op:"add",path:s,value:i}):$d(i)&&$d(a)?r=r.concat(Fd.generate(a,i,s)):Bd(i)&&Bd(a)?r=r.concat(function(e,t,n){let r=[];const o=e.slice();let i=-1;function a(e,t,n){if(e[n]&&Ud(e[n].qInfo))return null;if(e[n]&&e[n].qInfo.qId===t)return n;for(let n=0,r=e.length;n<r;n+=1)if(e[n]&&e[n].qInfo.qId===t)return n;return-1}if(Vd(t,o))return r;if(!Ud(t[0])&&Ud(t[0].qInfo))return r.push({op:"replace",path:n,value:t}),r;for(let e=o.length-1;e>=0;e-=1)i=a(t,o[e].qInfo&&o[e].qInfo.qId,e),-1===i?(r.push({op:"remove",path:"".concat(n,"/").concat(e)}),o.splice(e,1)):r=r.concat(Fd.generate(o[e],t[i],"".concat(n,"/").concat(e)));for(let e=0,s=t.length;e<s;e+=1)i=a(o,t[e].qInfo&&t[e].qInfo.qId),-1===i?(r.push({op:"add",path:"".concat(n,"/").concat(e),value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:"".concat(n,"/").concat(e),from:"".concat(n,"/").concat(i)}),o.splice(e,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((o=>{Ud(t[o])&&!Hd(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},Fd.apply=function(e,t){t.forEach((t=>{let n=Wd(e,t.path),r=t.path.split("/").splice(-1)[0],o=r&&isNaN(+r)?n[r]:n[+r]||n;const i=t.from?t.from.split("/").splice(-1)[0]:null;if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(Bd(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(Bd(o)&&Bd(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if($d(o)&&$d(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Hd(a,e)&&delete a[e]})),zd(o,t.value);else{if(!n)throw new Error("Patchee is not an object we can patch");n[r]=t.value}else if("move"===t.op){const o=Wd(e,t.from);Bd(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(Bd(n)?n.splice(+r,1):delete n[r]);var a}))},Fd.clone=function(e){return zd({},e)},Fd.createPatch=function(e,t,n){const r={op:e.toLowerCase(),path:n};return"move"===r.op?r.from=t:void 0!==t&&(r.value=t),r},Fd.updateObject=function(e,t){Object.keys(e).length?Fd.apply(e,Fd.generate(e,t)):zd(e,t)};const Gd=e=>t=>{const n=(r=V(V({},t),{},{action(){"function"==typeof t.action&&t.action.call(n,e),n.emit("changed")},enabled:()=>"function"!=typeof t.enabled||t.enabled.call(n,e),active:"function"==typeof t.active?function(){return t.active.call(n,e)}:void 0}),Object.keys(re.prototype).forEach((e=>{r[e]=re.prototype[e]})),re.init(r),r);var r;return n};let Kd,Zd;function Xd(e,t){if(!e)return!0;if(t.length!==e.length)return!0;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!0;return!1}function Jd(e){let{explicitResize:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.__hooks={obsolete:!1,error:!1,waitForData:!1,chain:{promise:null,resolve:()=>{}},list:[],snaps:[],actions:{list:[]},pendingEffects:[],pendingLayoutEffects:[],pendingPromises:[],resizer:{setters:[],explicitResize:t},accessibility:{setter:null}}}function Yd(e){eh(e.__hooks.list,!0),e.__hooks.obsolete=!0,e.__hooks.list.length=0,e.__hooks.pendingEffects.length=0,e.__hooks.pendingLayoutEffects.length=0,e.__hooks.actions=null,e.__hooks.imperativeHandle=null,e.__hooks.resizer=null,e.__hooks.accessibility=null,e.__actionsDispatch=null,clearTimeout(e.__hooks.micro),cancelAnimationFrame(e.__hooks.macro)}async function Qd(e){if(e.__hooks.obsolete)return Promise.resolve();Zd=-1,Kd=e,Kd.__hooks.initiated&&Kd.__hooks.list.length;try{Kd.fn.call(null)}catch(e){console.error(e)}Kd.__hooks.initiated=!0;const t=Kd.__hooks;return rh(Kd),Zd=void 0,Kd=void 0,t.chain.promise||(t.chain.promise=new Promise((e=>{t.chain.resolve=e}))),function(e){eh(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame((()=>{!function(e){eh(e.pendingEffects),e.macro=null,function(e){if(e.pendingPromises.length||e.micro||e.macro)return;e.chain.promise=null,e.chain.resolve(!e.waitForData)}(e)}(e)}))}(t),t.chain.promise}function eh(e,t){try{e.forEach((e=>{"function"==typeof e.teardown&&e.teardown(),t||(e.teardown=e.value[0]())}))}catch(e){console.error(e)}e.length=0}function th(e,t){try{return Promise.all(e.__hooks.snaps.map((e=>Promise.resolve(e.fn(t))))).then((e=>e[e.length-1]))}catch(e){console.error(e)}return Promise.resolve()}function nh(e){return e.__hooks.imperativeHandle}function rh(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function oh(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,rh(e))}function ih(e){if(void 0===Kd)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=Kd.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function ah(e){ih(++Zd);return Kd.context[e]}function sh(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function lh(e){return{__hooked:!0,fn:e,initiate:Jd,run:Qd,teardown:Yd,runSnaps:th,focus:Nh,blur:Ph,observeActions:oh,getImperativeHandle:nh,updateRectOnNextRun:sh}}function ch(e){const t=ih(++Zd);if(!t.value){t.component=Kd;const n=e=>{if(t.component.__hooks.obsolete)return;const n="function"==typeof e?e(t.value[0]):e;var r;n!==t.value[0]&&(t.value[0]=n,(r=t.component).__hooks.micro||(r.__hooks.micro=setTimeout((()=>{r.__hooks.micro=null,Qd(r)}),0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function uh(e,t){const n=ih(++Zd);Xd(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===Kd.__hooks.pendingEffects.indexOf(n)&&Kd.__hooks.pendingEffects.push(n))}function ph(e,t){const n=ih(++Zd);Xd(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],Kd.__hooks.pendingLayoutEffects.push(n))}function dh(e,t){const n=ih(++Zd);return Xd(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function hh(e,t){const[n,r]=ch((()=>({resolved:void 0,rejected:void 0,state:"pending"}))),o=ih(++Zd);return o.component||(o.component=Kd),ph((()=>{let t=!1;return o.teardown=()=>{t=!0,o.teardown=null;const e=o.component.__hooks.pendingPromises.indexOf(o);e>-1&&o.component.__hooks.pendingPromises.splice(e,1)},e().then((e=>{t||(o.teardown&&o.teardown(),r({resolved:e,rejected:void 0,state:"resolved"}))})).catch((e=>{t||(o.teardown&&o.teardown(),r({resolved:void 0,rejected:e,state:"resolved"}))})),o.component.__hooks.pendingPromises.push(o),()=>{o.teardown&&o.teardown()}}),t),[n.resolved,n.rejected]}function fh(){return ah("element")}function mh(){const e=fh(),t=Kd.__hooks.resizer,[n,r]=ch((()=>{const{left:t,top:n,width:r,height:o}=e.getBoundingClientRect();return{left:t,top:n,width:r,height:o}}));return t.current=n,-1===t.setters.indexOf(r)&&t.setters.push(r),t.update&&t.resize&&(t.update=!1,t.resize()),ph((()=>{if(t.initiated)return;t.initiated=!0;const n=()=>{const{left:n,top:r,width:o,height:i}=e.getBoundingClientRect(),a=t.current;a.width===o&&a.height===i&&a.left===n&&a.top===r||t.setters.forEach((e=>e({left:n,top:r,width:o,height:i})))};if(t.resize=()=>{n()},t.explicitResize)return()=>{t.resize=void 0};if("function"==typeof ResizeObserver){let r=new ResizeObserver(n);return r.observe(e),()=>{r.unobserve(e),r.disconnect(e),r=null,t.resize=void 0}}}),[e]),n}function gh(){return ah("layout")}function yh(){const e=ah("layout"),[t]=ch({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current}function bh(){return ah("appLayout")}function vh(){const e=ah("model");return e&&e.session?e:void 0}function Eh(){const e=ah("app");return e&&e.session?e:void 0}function xh(){const e=ah("global");return e&&e.session?e:void 0}function Ch(){return ah("selections")}function Sh(){return ah("theme")}function wh(){return ah("nebbie")}function Lh(){return ah("translator")}function kh(){return ah("deviceType")}function Oh(){return ah("plugins")}function Rh(e,t){const[n]=ch({action(){n._config.action.call(null)}});return n.component||(n.component=Kd,Kd.__hooks.actions.list.push(n)),dh((()=>{const t=e();n._config=t,n.active=t.active||!1,n.disabled=t.disabled||!1,n.hidden=t.hidden||!1,n.label=t.label||"",n.getSvgIconShape=t.icon?()=>t.icon:void 0,n.key=t.key||n.component.__hooks.actions.list.length,n.component.__hooks.actions.changed=!0}),t),n.action}function qh(){return ah("constraints")}function Ih(){return ah("options")}function _h(e,t){const n=ih(++Zd);if(n.imperative||(n.imperative=!0),Xd(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],Kd.__hooks.imperativeHandle=r}}function Th(e){const t=ih(++Zd);t.value||(t.value=1,Kd.__hooks.snaps.push(t)),t.fn=e}function Ah(){ih(++Zd);const e=Kd.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}}function Dh(){const e=ah("keyboardNavigation"),t=ah("focusHandler");if(!Kd.__hooks.accessibility.exitFunction){const e=function(e){const n=this.__hooks.accessibility;n.enabled&&n.active&&(Ph(this),t&&t.blurCallback&&t.blurCallback(e))}.bind(Kd);Kd.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),Nh(this))}.bind(Kd);Kd.__hooks.accessibility.focusFunction=n;const r=function(e){this.__hooks.accessibility.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind(Kd);Kd.__hooks.accessibility.focusSelectionFunction=r}const n=Kd.__hooks.accessibility.focusFunction,r=Kd.__hooks.accessibility.exitFunction,o=Kd.__hooks.accessibility.focusSelectionFunction,[i,a]=ch({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return Kd.__hooks.accessibility.setter=a,Kd.__hooks.accessibility.enabled=e,uh((()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o})),[e]),i}function Nh(e){const t=e.__hooks.accessibility;t.active||(t.active=!0,t&&t.setter&&t.setter({active:!0,enabled:t.enabled,blur:t.exitFunction,focus:t.focusFunction,focusSelection:t.focusSelectionFunction}))}function Ph(e){const t=e.__hooks.accessibility;t&&t.active&&(t.active=!1,t&&t.setter&&t.setter({active:!1,enabled:t.enabled,blur:t.exitFunction,focus:t.focusFunction,focusSelection:t.focusSelectionFunction}))}const Mh={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},jh=Object.keys(Mh);function zh(e,t){const n=V({},Mh);var r;r=n,Object.keys(re.prototype).forEach((e=>{r[e]=re.prototype[e]})),re.init(r);const o={emit(){n.emit(...arguments)}};Object.keys(e.component||{}).forEach((t=>{-1!==jh.indexOf(t)?n[t]=e.component[t].bind(o):o[t]=e.component[t]}));const i=function(e){let{sn:t,component:n}=e;const r={},o=[],i=Gd(n);return((t.definition.selectionToolbar||{}).items||[]).forEach((e=>{const t=i(e);r[e.key]=t,o.push(t)})),(t.definition.actions||[]).forEach((e=>{const t=i(e);r[e.key]=t})),{actions:r,selectionToolbarItems:o,destroy(){o.length=0}}}({sn:e,component:o}),a=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):null;return Object.assign(o,{model:t.model,app:t.app,global:a,selections:t.selections,actions:i.actions}),Object.assign(n,{actions:i.actions,model:t.model,app:t.app,selections:t.selections}),[n,i]}function Fh(e,t,n){"function"==typeof e.component&&(e.component=lh(e.component));const[r,o]=e.component&&e.component.__hooked?function(e,t,n){const r=t.app&&t.app.session?t.app.session.getObjectApi({handle:-1}):void 0;let o=!1;const i={},a=["appLayout","constraints"],s={};t.model&&t.model.session||(s.select=!0);const l={context:{model:t.model,app:t.app,global:r,selections:t.selections,nebbie:t.nebbie,element:void 0,deviceType:n.deviceType,theme:void 0,translator:n.translator,layout:{},appLayout:{},keyboardNavigation:t.keyboardNavigation,focusHandler:t.focusHandler,constraints:s,options:{},plugins:[]},fn:e.component.fn,created(){},mounted(n){this.context.element=n,e.component.initiate(l,{explicitResize:!!t.explicitResize})},render(t){let n=!o||!1;if(t){if(t.layout&&t.layout!==this.context.layout&&(n=!0,this.context.layout=t.layout),t.context&&t.context.theme&&(this.context.theme=t.context.theme),t.context&&!!t.context.keyboardNavigation!=!!this.context.keyboardNavigation&&(this.context.keyboardNavigation=!!t.context.keyboardNavigation,n=!0),t.context&&t.context.focusHandler&&(this.context.focusHandler=t.context.focusHandler),t.options){const e={};let r=!1;Object.keys(t.options).forEach((n=>{e[n]=t.options[n],this.context.options[n]!==t.options[n]&&(r=!0)})),r&&(this.context.options=e,n=!0)}if(t.plugins){let e=this.context.plugins.length!==t.plugins.length;t.plugins.forEach(((t,n)=>{this.context.plugins[n]!==t&&(e=!0)})),e&&(this.context.plugins=[...t.plugins],n=!0)}a.forEach((e=>{const r=t.context;if(r&&Object.prototype.hasOwnProperty.call(r,e)){let t=JSON.stringify(r[e]);"constraints"===e&&(t=JSON.stringify(V(V({},r[e]),s))),t!==i[e]&&(n=!0,i[e]=t,this.context[e]=JSON.parse(t))}}))}else n=!0;return this.context.theme&&this.context.theme.name()!==i.themeName&&(n=!0,i.themeName=this.context.theme.name()),this.context.translator.language()!==i.language&&(n=!0,i.language=l.context.translator.language()),n?(o=!0,this.currentResult=e.component.run(this),this.currentResult):this.currentResult||Promise.resolve()},resize(){return e.component.updateRectOnNextRun(this),this.render()},willUnmount(){e.component.teardown(this)},setSnapshotData(t){return e.component.runSnaps(this,t)},focus(){e.component.focus(this)},blur(){e.component.blur(this)},getImperativeHandle(){return e.component.getImperativeHandle(this)},destroy(){},observeActions(t){e.component.observeActions(this,t)},isHooked:!0};return a.forEach((e=>{i[e]=JSON.stringify(l.context[e])})),i.themeName=l.context.theme?l.context.theme.name():void 0,i.language=l.context.translator?l.context.translator.language():void 0,Object.assign(l,{selections:t.selections}),[l,null]}(e,t,n):zh(e,t),i=[];return t.model.__snInterceptor&&t.model.__snInterceptor.teardown(),e.qae.properties.onChange&&(t.model.__snInterceptor={setProperties:t.model.setProperties,applyPatches:t.model.applyPatches,teardown:void 0},t.model.setProperties=function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.qae.properties.onChange.call({model:t.model},...r),t.model.__snInterceptor.setProperties.call(this,...r)},t.model.applyPatches=function(n,r){const o=r?"getEffectiveProperties":"getProperties";return t.model[o]().then((o=>{const i=Fd.clone(o),a=n.map((e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath})));Fd.apply(o,a),e.qae.properties.onChange.call({model:t.model},o);const s=Fd.generate(i,o).map((e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})));return t.model.__snInterceptor.applyPatches.call(this,s,r)}))},t.model.__snInterceptor.teardown=()=>{t.model.setProperties=t.model.__snInterceptor.setProperties,delete t.model.__snInterceptor},i.push(t.model.__snInterceptor.teardown)),{generator:e,component:r,selectionToolbar:{items:o?o.selectionToolbarItems:[]},destroy(){i.forEach((e=>e()))},logicalSize:e.definition.logicalSize||(()=>!1)}}const Bh=()=>{};function $h(e,t){return void 0===e?()=>t:()=>e}function Uh(e){const t=e||{};return{min:"function"==typeof t.min?t.min:$h(t.min,0),max:"function"==typeof t.max?t.max:$h(t.max,1e3),added:t.added||t.add||Bh,description:t.description||Bh,moved:t.moved||t.move||Bh,removed:t.removed||t.remove||Bh,replaced:t.replaced||t.replace||Bh,isDefined:()=>!!e}}function Hh(e){const t=e.path||"/qHyperCubeDef",n=t.slice(0,-3);if(!1===/\/(qHyperCube|qListObject)$/.test(n)){const e=n.includes("/qHyperCube")?"qHyperCubeDef":"qListObjectDef";throw new Error("Incorrect definition for ".concat(e," at ").concat(t,". Valid paths include /qHyperCubeDef or /qListObjectDef, e.g. data/qHyperCubeDef"))}return{propertyPath:t,layoutPath:n,resolveLayout:e=>((e,t,n)=>{const r=t.split("/");let o=e;if(void 0===o)return n;for(let e=0;e<r.length;++e)if(""!==r[e]){if(void 0===o[r[e]])return n;o=o[r[e]]}return o})(e,n,{}),dimensions:Uh(e.dimensions),measures:Uh(e.measures)}}function Wh(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.properties||{};t.properties&&(t.properties.initial||t.properties.onChange)&&(n=t.properties.initial,e=t.properties.onChange);const r={properties:{initial:n,onChange:e},data:{targets:((t.data||{}).targets||[]).map(Hh)},exportProperties:t.exportProperties,importProperties:t.importProperties};return r}function Vh(e,t){let n;n="function"==typeof e?e(t):e;const r={qae:Wh(n.qae),component:n.component||{},create:e=>Fh(r,e,t),definition:{}};return Object.keys(n).forEach((e=>{r[e]||(r.definition[e]=n[e])})),r}var Gh={exports:{}};!function(e,t){var n;t=e.exports=p,n="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=Number.MAX_SAFE_INTEGER||9007199254740991,o=t.re=[],i=t.src=[],a=t.tokens={},s=0;function l(e){a[e]=s++}l("NUMERICIDENTIFIER"),i[a.NUMERICIDENTIFIER]="0|[1-9]\\d*",l("NUMERICIDENTIFIERLOOSE"),i[a.NUMERICIDENTIFIERLOOSE]="[0-9]+",l("NONNUMERICIDENTIFIER"),i[a.NONNUMERICIDENTIFIER]="\\d*[a-zA-Z-][a-zA-Z0-9-]*",l("MAINVERSION"),i[a.MAINVERSION]="("+i[a.NUMERICIDENTIFIER]+")\\.("+i[a.NUMERICIDENTIFIER]+")\\.("+i[a.NUMERICIDENTIFIER]+")",l("MAINVERSIONLOOSE"),i[a.MAINVERSIONLOOSE]="("+i[a.NUMERICIDENTIFIERLOOSE]+")\\.("+i[a.NUMERICIDENTIFIERLOOSE]+")\\.("+i[a.NUMERICIDENTIFIERLOOSE]+")",l("PRERELEASEIDENTIFIER"),i[a.PRERELEASEIDENTIFIER]="(?:"+i[a.NUMERICIDENTIFIER]+"|"+i[a.NONNUMERICIDENTIFIER]+")",l("PRERELEASEIDENTIFIERLOOSE"),i[a.PRERELEASEIDENTIFIERLOOSE]="(?:"+i[a.NUMERICIDENTIFIERLOOSE]+"|"+i[a.NONNUMERICIDENTIFIER]+")",l("PRERELEASE"),i[a.PRERELEASE]="(?:-("+i[a.PRERELEASEIDENTIFIER]+"(?:\\."+i[a.PRERELEASEIDENTIFIER]+")*))",l("PRERELEASELOOSE"),i[a.PRERELEASELOOSE]="(?:-?("+i[a.PRERELEASEIDENTIFIERLOOSE]+"(?:\\."+i[a.PRERELEASEIDENTIFIERLOOSE]+")*))",l("BUILDIDENTIFIER"),i[a.BUILDIDENTIFIER]="[0-9A-Za-z-]+",l("BUILD"),i[a.BUILD]="(?:\\+("+i[a.BUILDIDENTIFIER]+"(?:\\."+i[a.BUILDIDENTIFIER]+")*))",l("FULL"),l("FULLPLAIN"),i[a.FULLPLAIN]="v?"+i[a.MAINVERSION]+i[a.PRERELEASE]+"?"+i[a.BUILD]+"?",i[a.FULL]="^"+i[a.FULLPLAIN]+"$",l("LOOSEPLAIN"),i[a.LOOSEPLAIN]="[v=\\s]*"+i[a.MAINVERSIONLOOSE]+i[a.PRERELEASELOOSE]+"?"+i[a.BUILD]+"?",l("LOOSE"),i[a.LOOSE]="^"+i[a.LOOSEPLAIN]+"$",l("GTLT"),i[a.GTLT]="((?:<|>)?=?)",l("XRANGEIDENTIFIERLOOSE"),i[a.XRANGEIDENTIFIERLOOSE]=i[a.NUMERICIDENTIFIERLOOSE]+"|x|X|\\*",l("XRANGEIDENTIFIER"),i[a.XRANGEIDENTIFIER]=i[a.NUMERICIDENTIFIER]+"|x|X|\\*",l("XRANGEPLAIN"),i[a.XRANGEPLAIN]="[v=\\s]*("+i[a.XRANGEIDENTIFIER]+")(?:\\.("+i[a.XRANGEIDENTIFIER]+")(?:\\.("+i[a.XRANGEIDENTIFIER]+")(?:"+i[a.PRERELEASE]+")?"+i[a.BUILD]+"?)?)?",l("XRANGEPLAINLOOSE"),i[a.XRANGEPLAINLOOSE]="[v=\\s]*("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:\\.("+i[a.XRANGEIDENTIFIERLOOSE]+")(?:"+i[a.PRERELEASELOOSE]+")?"+i[a.BUILD]+"?)?)?",l("XRANGE"),i[a.XRANGE]="^"+i[a.GTLT]+"\\s*"+i[a.XRANGEPLAIN]+"$",l("XRANGELOOSE"),i[a.XRANGELOOSE]="^"+i[a.GTLT]+"\\s*"+i[a.XRANGEPLAINLOOSE]+"$",l("COERCE"),i[a.COERCE]="(^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])",l("COERCERTL"),o[a.COERCERTL]=new RegExp(i[a.COERCE],"g"),l("LONETILDE"),i[a.LONETILDE]="(?:~>?)",l("TILDETRIM"),i[a.TILDETRIM]="(\\s*)"+i[a.LONETILDE]+"\\s+",o[a.TILDETRIM]=new RegExp(i[a.TILDETRIM],"g");l("TILDE"),i[a.TILDE]="^"+i[a.LONETILDE]+i[a.XRANGEPLAIN]+"$",l("TILDELOOSE"),i[a.TILDELOOSE]="^"+i[a.LONETILDE]+i[a.XRANGEPLAINLOOSE]+"$",l("LONECARET"),i[a.LONECARET]="(?:\\^)",l("CARETTRIM"),i[a.CARETTRIM]="(\\s*)"+i[a.LONECARET]+"\\s+",o[a.CARETTRIM]=new RegExp(i[a.CARETTRIM],"g");l("CARET"),i[a.CARET]="^"+i[a.LONECARET]+i[a.XRANGEPLAIN]+"$",l("CARETLOOSE"),i[a.CARETLOOSE]="^"+i[a.LONECARET]+i[a.XRANGEPLAINLOOSE]+"$",l("COMPARATORLOOSE"),i[a.COMPARATORLOOSE]="^"+i[a.GTLT]+"\\s*("+i[a.LOOSEPLAIN]+")$|^$",l("COMPARATOR"),i[a.COMPARATOR]="^"+i[a.GTLT]+"\\s*("+i[a.FULLPLAIN]+")$|^$",l("COMPARATORTRIM"),i[a.COMPARATORTRIM]="(\\s*)"+i[a.GTLT]+"\\s*("+i[a.LOOSEPLAIN]+"|"+i[a.XRANGEPLAIN]+")",o[a.COMPARATORTRIM]=new RegExp(i[a.COMPARATORTRIM],"g");l("HYPHENRANGE"),i[a.HYPHENRANGE]="^\\s*("+i[a.XRANGEPLAIN]+")\\s+-\\s+("+i[a.XRANGEPLAIN]+")\\s*$",l("HYPHENRANGELOOSE"),i[a.HYPHENRANGELOOSE]="^\\s*("+i[a.XRANGEPLAINLOOSE]+")\\s+-\\s+("+i[a.XRANGEPLAINLOOSE]+")\\s*$",l("STAR"),i[a.STAR]="(<|>)?=?\\s*\\*";for(var c=0;c<s;c++)n(c,i[c]),o[c]||(o[c]=new RegExp(i[c]));function u(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof p)return e;if("string"!=typeof e)return null;if(e.length>256)return null;if(!(t.loose?o[a.LOOSE]:o[a.FULL]).test(e))return null;try{return new p(e,t)}catch(e){return null}}function p(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof p){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>256)throw new TypeError("version is longer than 256 characters");if(!(this instanceof p))return new p(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var i=e.trim().match(t.loose?o[a.LOOSE]:o[a.FULL]);if(!i)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<r)return t}return e})):this.prerelease=[],this.build=i[5]?i[5].split("."):[],this.format()}t.parse=u,t.valid=function(e,t){var n=u(e,t);return n?n.version:null},t.clean=function(e,t){var n=u(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=p,p.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},p.prototype.toString=function(){return this.version},p.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof p||(e=new p(e,this.options)),this.compareMain(e)||this.comparePre(e)},p.prototype.compareMain=function(e){return e instanceof p||(e=new p(e,this.options)),h(this.major,e.major)||h(this.minor,e.minor)||h(this.patch,e.patch)},p.prototype.comparePre=function(e){if(e instanceof p||(e=new p(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return h(r,o)}while(++t)},p.prototype.compareBuild=function(e){e instanceof p||(e=new p(e,this.options));var t=0;do{var r=this.build[t],o=e.build[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return h(r,o)}while(++t)},p.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new p(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(y(e,t))return null;var n=u(e),r=u(t),o="";if(n.prerelease.length||r.prerelease.length){o="pre";var i="prerelease"}for(var a in n)if(("major"===a||"minor"===a||"patch"===a)&&n[a]!==r[a])return o+a;return i},t.compareIdentifiers=h;var d=/^[0-9]+$/;function h(e,t){var n=d.test(e),r=d.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function f(e,t,n){return new p(e,n).compare(new p(t,n))}function m(e,t,n){return f(e,t,n)>0}function g(e,t,n){return f(e,t,n)<0}function y(e,t,n){return 0===f(e,t,n)}function b(e,t,n){return 0!==f(e,t,n)}function v(e,t,n){return f(e,t,n)>=0}function E(e,t,n){return f(e,t,n)<=0}function x(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return y(e,n,r);case"!=":return b(e,n,r);case">":return m(e,n,r);case">=":return v(e,n,r);case"<":return g(e,n,r);case"<=":return E(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function C(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof C){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof C))return new C(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===S?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return h(t,e)},t.major=function(e,t){return new p(e,t).major},t.minor=function(e,t){return new p(e,t).minor},t.patch=function(e,t){return new p(e,t).patch},t.compare=f,t.compareLoose=function(e,t){return f(e,t,!0)},t.compareBuild=function(e,t,n){var r=new p(e,n),o=new p(t,n);return r.compare(o)||r.compareBuild(o)},t.rcompare=function(e,t,n){return f(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compareBuild(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.compareBuild(r,e,n)}))},t.gt=m,t.lt=g,t.eq=y,t.neq=b,t.gte=v,t.lte=E,t.cmp=x,t.Comparator=C;var S={};function w(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof w)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new w(e.raw,t);if(e instanceof C)return new w(e.value,t);if(!(this instanceof w))return new w(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function L(e,t){for(var n=!0,r=e.slice(),o=r.pop();n&&r.length;)n=r.every((function(e){return o.intersects(e,t)})),o=r.pop();return n}function k(e){return!e||"x"===e.toLowerCase()||"*"===e}function O(e,t,n,r,o,i,a,s,l,c,u,p,d){return((t=k(n)?"":k(r)?">="+n+".0.0":k(o)?">="+n+"."+r+".0":">="+t)+" "+(s=k(l)?"":k(c)?"<"+(+l+1)+".0.0":k(u)?"<"+l+"."+(+c+1)+".0":p?"<="+l+"."+c+"."+u+"-"+p:"<="+s)).trim()}function R(e,t,r){for(var o=0;o<e.length;o++)if(!e[o].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(o=0;o<e.length;o++)if(n(e[o].semver),e[o].semver!==S&&e[o].semver.prerelease.length>0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function q(e,t,n){try{t=new w(t,n)}catch(e){return!1}return t.test(e)}function I(e,t,n,r){var o,i,a,s,l;switch(e=new p(e,r),t=new w(t,r),n){case">":o=m,i=E,a=g,s=">",l=">=";break;case"<":o=g,i=v,a=m,s="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(q(e,t,r))return!1;for(var c=0;c<t.set.length;++c){var u=t.set[c],d=null,h=null;if(u.forEach((function(e){e.semver===S&&(e=new C(">=0.0.0")),d=d||e,h=h||e,o(e.semver,d.semver,r)?d=e:a(e.semver,h.semver,r)&&(h=e)})),d.operator===s||d.operator===l)return!1;if((!h.operator||h.operator===s)&&i(e,h.semver))return!1;if(h.operator===l&&a(e,h.semver))return!1}return!0}C.prototype.parse=function(e){var t=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=void 0!==n[1]?n[1]:"","="===this.operator&&(this.operator=""),n[2]?this.semver=new p(n[2],this.options.loose):this.semver=S},C.prototype.toString=function(){return this.value},C.prototype.test=function(e){if(n("Comparator.test",e,this.options.loose),this.semver===S||e===S)return!0;if("string"==typeof e)try{e=new p(e,this.options)}catch(e){return!1}return x(e,this.operator,this.semver,this.options)},C.prototype.intersects=function(e,t){if(!(e instanceof C))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||(n=new w(e.value,t),q(this.value,n,t));if(""===e.operator)return""===e.value||(n=new w(this.value,t),q(e.semver,n,t));var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,a=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),s=x(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=x(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||o||i&&a||s||l},t.Range=w,w.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},w.prototype.toString=function(){return this.range},w.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[a.HYPHENRANGELOOSE]:o[a.HYPHENRANGE];e=e.replace(r,O),n("hyphen replace",e),e=e.replace(o[a.COMPARATORTRIM],"$1$2$3"),n("comparator trim",e,o[a.COMPARATORTRIM]),e=(e=(e=e.replace(o[a.TILDETRIM],"$1~")).replace(o[a.CARETTRIM],"$1^")).split(/\s+/).join(" ");var i=t?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],s=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?o[a.CARETLOOSE]:o[a.CARET];return e.replace(r,(function(t,r,o,i,a){var s;return n("caret",e,t,r,o,i,a),k(r)?s="":k(o)?s=">="+r+".0.0 <"+(+r+1)+".0.0":k(i)?s="0"===r?">="+r+"."+o+".0 <"+r+"."+(+o+1)+".0":">="+r+"."+o+".0 <"+(+r+1)+".0.0":a?(n("replaceCaret pr",a),s="0"===r?"0"===o?">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+o+"."+(+i+1):">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+(+o+1)+".0":">="+r+"."+o+"."+i+"-"+a+" <"+(+r+1)+".0.0"):(n("no pr"),s="0"===r?"0"===o?">="+r+"."+o+"."+i+" <"+r+"."+o+"."+(+i+1):">="+r+"."+o+"."+i+" <"+r+"."+(+o+1)+".0":">="+r+"."+o+"."+i+" <"+(+r+1)+".0.0"),n("caret return",s),s}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?o[a.TILDELOOSE]:o[a.TILDE];return e.replace(r,(function(t,r,o,i,a){var s;return n("tilde",e,t,r,o,i,a),k(r)?s="":k(o)?s=">="+r+".0.0 <"+(+r+1)+".0.0":k(i)?s=">="+r+"."+o+".0 <"+r+"."+(+o+1)+".0":a?(n("replaceTilde pr",a),s=">="+r+"."+o+"."+i+"-"+a+" <"+r+"."+(+o+1)+".0"):s=">="+r+"."+o+"."+i+" <"+r+"."+(+o+1)+".0",n("tilde return",s),s}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?o[a.XRANGELOOSE]:o[a.XRANGE];return e.replace(r,(function(r,o,i,a,s,l){n("xRange",e,r,o,i,a,s,l);var c=k(i),u=c||k(a),p=u||k(s),d=p;return"="===o&&d&&(o=""),l=t.includePrerelease?"-0":"",c?r=">"===o||"<"===o?"<0.0.0-0":"*":o&&d?(u&&(a=0),s=0,">"===o?(o=">=",u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):"<="===o&&(o="<",u?i=+i+1:a=+a+1),r=o+i+"."+a+"."+s+l):u?r=">="+i+".0.0"+l+" <"+(+i+1)+".0.0"+l:p&&(r=">="+i+"."+a+".0"+l+" <"+i+"."+(+a+1)+".0"+l),n("xRange return",r),r}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(o[a.STAR],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(i)}))),s=s.map((function(e){return new C(e,this.options)}),this)},w.prototype.intersects=function(e,t){if(!(e instanceof w))throw new TypeError("a Range is required");return this.set.some((function(n){return L(n,t)&&e.set.some((function(e){return L(e,t)&&n.every((function(n){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new w(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},w.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new p(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1},t.satisfies=q,t.maxSatisfying=function(e,t,n){var r=null,o=null;try{var i=new w(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&-1!==o.compare(e)||(o=new p(r=e,n)))})),r},t.minSatisfying=function(e,t,n){var r=null,o=null;try{var i=new w(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&1!==o.compare(e)||(o=new p(r=e,n)))})),r},t.minVersion=function(e,t){e=new w(e,t);var n=new p("0.0.0");if(e.test(n))return n;if(n=new p("0.0.0-0"),e.test(n))return n;n=null;for(var r=0;r<e.set.length;++r){e.set[r].forEach((function(e){var t=new p(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!m(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}))}if(n&&e.test(n))return n;return null},t.validRange=function(e,t){try{return new w(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return I(e,t,"<",n)},t.gtr=function(e,t,n){return I(e,t,">",n)},t.outside=I,t.prerelease=function(e,t){var n=u(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new w(e,n),t=new w(t,n),e.intersects(t)},t.coerce=function(e,t){if(e instanceof p)return e;"number"==typeof e&&(e=String(e));if("string"!=typeof e)return null;var n=null;if((t=t||{}).rtl){for(var r;(r=o[a.COERCERTL].exec(e))&&(!n||n.index+n[0].length!==e.length);)n&&r.index+r[0].length===n.index+n[0].length||(n=r),o[a.COERCERTL].lastIndex=r.index+r[1].length+r[2].length;o[a.COERCERTL].lastIndex=-1}else n=e.match(o[a.COERCE]);if(null===n)return null;return u(n[2]+"."+(n[3]||"0")+"."+(n[4]||"0"),t)}}(Gh,Gh.exports);const Kh={};async function Zh(e,t,n,r){let{config:o}=n;const i="".concat(e,"__").concat(t);if(!Kh[i]){const n="".concat(e).concat(t&&" v".concat(t)||"");if(r&&"function"!=typeof r)throw new Error("load of visualization '".concat(n,"' is not a fuction, wrap load promise in function"));const a=(r||o.load)({name:e,version:t}),s=Promise.resolve(a);Kh[i]=s.then((e=>{if(!e)throw new Error("load() of visualization '".concat(n,"' resolved to an invalid object"));return e})).catch((e=>{throw new Error("Failed to load visualization: '".concat(n,"'"))}))}return Kh[i]}function Xh(e,t){const n={};let r=null;return{get:e=>n[e],register:(o,i)=>{if(n[o])throw new Error("Supernova '".concat(e,"@").concat(o,"' already registered."));n[o]=function(e,t){let n,r,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{meta:i}=o,a={name:e.name,version:e.version,supportsPropertiesVersion:e=>!(e&&i&&i.deps&&i.deps.properties)||Gh.exports.satisfies(e,i.deps.properties),supernova:()=>Zh(a.name,a.version,t,o.load).then((e=>(n=n||Vh(e,t.public.galaxy),r=JSON.stringify(n.qae.properties.initial),n))),initialProperties(e){return this.supernova().then((()=>V(V({qInfo:{qType:a.name},visualization:a.name,version:a.version,showTitles:!0},JSON.parse(r)),e)))}};return a}({name:e,version:o},t,i),r=null},getMatchingVersionFromProperties:e=>{r||(r=function(e){const t=e.filter((e=>"undefined"===e));return[...t,...e.filter((e=>"undefined"!==e)).map((e=>e.split(".").map((e=>parseInt(e,10))))).sort(((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2])).map((e=>e.join(".")))]}(Object.keys(n)));for(let t=r.length-1;t>=0;t--){if(n[r[t]].supportsPropertiesVersion(e))return r[t]}return null},versions:n}}function Jh(e){let{halo:t,parent:n}=e;const r={},o=n||{get:()=>{}};return{register:(e,n)=>{r[e.name]||(r[e.name]=Xh(e.name,t)),r[e.name].register(e.version,n)},getSupportedVersion:(e,t)=>r[e]?r[e].getMatchingVersionFromProperties(t):null,get(e){const{name:t}=e;let{version:n}=e;if(r[t]){if(!r[t].versions[n]){n=Object.keys(r[t].versions)[0]}}else this.register({name:t,version:n});return r[t].get(n)||o.get(e)},getList:()=>Object.keys(r).map((e=>({name:e,versions:Object.keys(r[e].versions).map((e=>"undefined"===e?void 0:e))}))),clearFromCache:e=>{r[e]&&(r[e]=void 0),function(e){Object.keys(Kh).forEach((t=>{t.split("__")[0]===e&&(Kh[t]=void 0)}))}(e)}}}const Yh=["__DO_NOT_USE__"],Qh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return V(V({},e),t)},ef=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[...e,...t].filter(((e,t,n)=>n.indexOf(e)===t))},tf=(e,t)=>({context:Qh(e.context,t.context),load:t.load||e.load,snapshot:V({},t.snapshot||e.snapshot),types:ef(e.types,t.types),themes:ef(e.themes,t.themes),flags:Qh(e.flags,t.flags),anything:Qh(e.anything,t.anything)}),nf=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{__DO_NOT_USE__:t={}}=e,n=Z(e,Yh),r={update:void 0,fetchStart:void 0,showGray:!0,focusSearch:!1,sessionModel:void 0,selectionsApi:void 0,selectDisabled:void 0,postProcessPages:void 0,calculatePagesHeight:!1},o=V(V(V({},n),r),t);return o};var rf=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=ee(t.context.language);function r(e,o){if(o)return r.createConfiguration(o)(e);let i=V(V({},t.context),{},{translator:n.translator});const[a]=bc({app:e,context:i}),s=It({themes:t.themes,root:a}),l={galaxy:{translator:n.translator,flags:jd(t.flags),deviceType:_t(t.context.deviceType),anything:t.anything},theme:s.externalAPI,translator:n.translator,nebbie:null},c={app:e,root:a,config:t,public:l,context:i,types:null},u=Jh({halo:c});t.types.forEach((e=>u.register({name:e.name,version:e.version},{meta:e.meta,load:e.load})));let p=s.setTheme(t.context.theme),d=null,h=null;const f={render:async e=>(await p,e.id?Md(e,c):Pd(e,c)),context:async e=>{let t;["theme","language","constraints","keyboardNavigation"].forEach((n=>{Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==i[n]&&(t||(t={}),t[n]=e[n])})),t&&(i=V(V(V({},i),t),{},{translator:n.translator}),c.context=i,t.theme&&(p=s.setTheme(t.theme),await p),t.language&&c.public.translator.language(t.language),a.context(i))},selections:async()=>(d||(d={mount(t){h||(h=rp({element:t,app:e}),a.add(h))},unmount(){h&&(a.remove(h),h=null)}}),d),field:async t=>{const n="string"==typeof t?t:t.qLibraryId;if(!n)throw new Error("Field identifier must be provided");const r={fieldName:n,mount(r){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!r)throw new Error("Element for ".concat(n," not provided"));if(this._instance)throw new Error("Field ".concat(n," already mounted"));this._instance=Cp({element:r,app:e,fieldIdentifier:t,options:nf(o),stateName:o.stateName||"$"}),a.add(this._instance)},unmount(){this._instance&&(a.remove(this._instance),this._instance=null)}};return r},getRegisteredTypes:u.getList,__DO_NOT_USE__:{types:u}};return c.public.nebbie=f,c.types=u,f}return r.createConfiguration=n=>e(tf(t,n)),r.config=t,r}({context:{theme:"light",language:"en-US",deviceType:"auto",constraints:{},keyboardNavigation:!1,disableCellPadding:!1},load:()=>{},types:[],themes:[],anything:{},snapshot:{get:async e=>{const t=await fetch("/njs/snapshot/".concat(e));if(!t.ok)throw new Error(t.statusText);return t.json()},capture:e=>fetch("/njs/capture",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then((e=>e.json()))}}),of={exports:{}},af={exports:{}};af.exports=function(){function e(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - ".concat(+Date.now())})}}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===a.call(e)},u=function(e){if(!e||"[object Object]"!==a.call(e))return!1;var t,n=i.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&i.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||i.call(e,t)},p=function(e,t){s&&"__proto__"===t.name?s(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},d=function(e,t){if("__proto__"===t){if(!i.call(e,t))return;if(l)return l(e,t).value}return e[t]},h=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,h=arguments.length,f=!1;for("boolean"==typeof s&&(f=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<h;++l)if(null!=(t=arguments[l]))for(n in t)r=d(s,n),s!==(o=d(t,n))&&(f&&o&&(u(o)||(i=c(o)))?(i?(i=!1,a=r&&c(r)?r:[]):a=r&&u(r)?r:{},p(s,{name:n,newValue:e(f,a,o)})):void 0!==o&&p(s,{name:n,newValue:o}));return s};const f=globalThis.crypto||{getRandomValues:()=>123456};function m(){return e=>{const t=h({},e);t.qInfo=t.qInfo||{},t.qInfo.qId=t.qInfo.qId||"mock-".concat(([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^f.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))));const r=t._mock;let o=t;return r&&(delete t._mock,o=h({},t,r)),Promise.resolve(n({on:()=>{},once:()=>{},getLayout:()=>Promise.resolve(o),getProperties:()=>Promise.resolve(t),getEffectiveProperties:()=>Promise.resolve(t),id:t.qInfo.qId},t))}}const g=function(e){let{args:t=[],defaultValue:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"function"==typeof e?e(...t):void 0!==e?e:n},y=function(e){let{defaultValue:t,async:n=!0,delay:r=0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];const s=g(e,{defaultValue:t,args:i});return n?new Promise((e=>{setTimeout((()=>e(s)),r)})):s}},b=["id","session"],v=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function E(e){return!v.includes(e)}function x(e){const t=g(e.getLayout);return t.qInfo&&t.qInfo.qId}function C(e,t){return e.reduce(((e,r)=>n(n({},e),function(e,t){const r=x(e),{delay:i}=t,{id:a,session:s}=e,l=o(e,b);return{[r]:n({id:g(a,{defaultValue:"object - ".concat(+Date.now())}),session:g(s,{defaultValue:!0}),on:()=>{},once:()=>{}},Object.entries(l).reduce(((e,t)=>{let[r,o]=t;return n(n({},e),{},{[r]:y(o,{async:E(r),delay:i})})}),{}))}}(r,t))),{})}function S(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!x(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function w(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Array.isArray(e)||0===e.length)return()=>{throw new Error('No "genericObjects" specified')};e.forEach(S);const n=C(e,t);return async e=>Promise.resolve(n[e])}function L(){return()=>Promise.resolve({id:"app-layout"})}const k={fromGenericObjects(t){return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=new e,o=new m,i=new w(t,n),a=new L,s={id:"app - ".concat(+Date.now()),session:r,createSessionObject:o,getObject:i,getAppLayout:a};return Promise.resolve(s)}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}};return k}();var sf=H(of.exports=af.exports);const lf={generator:Vh,hook:lh,theme:Rt,locale:Y};export{sf as EnigmaMocker,lf as __DO_NOT_USE__,Up as conversion,rf as embed,Th as onTakeSnapshot,Rh as useAction,Eh as useApp,bh as useAppLayout,qh as useConstraints,kh as useDeviceType,uh as useEffect,fh as useElement,wh as useEmbed,xh as useGlobal,_h as useImperativeHandle,Dh as useKeyboard,gh as useLayout,dh as useMemo,vh as useModel,Ih as useOptions,Oh as usePlugins,hh as usePromise,mh as useRect,Ah as useRenderState,Ch as useSelections,yh as useStaleLayout,ch as useState,Sh as useTheme,Lh as useTranslator};
87
87
  //# sourceMappingURL=index.js.map