@nebula.js/stardust 3.1.0-alpha.4 → 3.1.0-alpha.5
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/dev.js +9 -7
- package/core/esm/dev.js.map +1 -1
- package/core/esm/index.js +2 -2
- package/core/esm/index.js.map +1 -1
- package/dist/stardust.dev.js +9 -7
- package/dist/stardust.dev.js.map +1 -1
- package/dist/stardust.js +2 -2
- package/dist/stardust.js.map +1 -1
- package/package.json +9 -9
- package/types/index.d.ts +28 -20
package/core/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* @nebula.js/stardust v3.1.0-alpha.
|
|
2
|
+
* @nebula.js/stardust v3.1.0-alpha.5
|
|
3
3
|
* Copyright (c) 2023 QlikTech International AB
|
|
4
4
|
* Released under the MIT license.
|
|
5
5
|
*/
|
|
@@ -9,5 +9,5 @@ import*as e from"react";import t,{useState as n,useEffect as r,useReducer as o,f
|
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/function Nn(){return Nn=Object.assign?Object.assign.bind():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},Nn.apply(this,arguments)}function zn(e,t){return t?dt(e,t,{clone:!1}):e}const jn={xs:0,sm:600,md:900,lg:1200,xl:1536},Fn={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${jn[e]}px)`};function Bn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||Fn;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||Fn;return Object.keys(t).reduce(((r,o)=>{if(-1!==Object.keys(e.values||jn).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r}),{})}return n(t)}function Hn(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function Wn(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Hn(e,n)||r,t&&(o=t(o,r,e)),o}function Un(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=Hn(e.theme,r)||{};return Bn(e,i,(e=>{let r=Wn(a,o,e);return e===r&&"string"==typeof e&&(r=Wn(a,o,`${t}${"default"===e?"":ht(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes={},i.filterProps=[t],i}function $n(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?zn(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}const Gn={m:"margin",p:"padding"},Vn={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Kn={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Zn=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!Kn[e])return[e];e=Kn[e]}const[t,n]=e.split(""),r=Gn[t],o=Vn[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),Xn=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Jn=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function Yn(e,t,n,r){var o;const i=null!=(o=Hn(e,t,!1))?o:n;return"number"==typeof i?e=>"string"==typeof e?e:i*e:Array.isArray(i)?e=>"string"==typeof e?e:i[e]:"function"==typeof i?i:()=>{}}function Qn(e){return Yn(e,"spacing",8)}function er(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function tr(e,t,n,r){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=er(t,n),e)),{})}(Zn(n),r);return Bn(e,e[n],o)}function nr(e,t){const n=Qn(e.theme);return Object.keys(e).map((r=>tr(e,t,r,n))).reduce(zn,{})}function rr(e){return nr(e,Xn)}function or(e){return nr(e,Jn)}function ir(e){return"number"!=typeof e?e:`${e}px solid`}rr.propTypes={},rr.filterProps=Xn,or.propTypes={},or.filterProps=Jn;const ar=Un({prop:"border",themeKey:"borders",transform:ir}),sr=Un({prop:"borderTop",themeKey:"borders",transform:ir}),lr=Un({prop:"borderRight",themeKey:"borders",transform:ir}),cr=Un({prop:"borderBottom",themeKey:"borders",transform:ir}),ur=Un({prop:"borderLeft",themeKey:"borders",transform:ir}),dr=Un({prop:"borderColor",themeKey:"palette"}),pr=Un({prop:"borderTopColor",themeKey:"palette"}),hr=Un({prop:"borderRightColor",themeKey:"palette"}),fr=Un({prop:"borderBottomColor",themeKey:"palette"}),mr=Un({prop:"borderLeftColor",themeKey:"palette"}),gr=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Yn(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:er(t,e)});return Bn(e,e.borderRadius,n)}return null};gr.propTypes={},gr.filterProps=["borderRadius"],$n(ar,sr,lr,cr,ur,dr,pr,hr,fr,mr,gr);const yr=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Yn(e.theme,"spacing",8),n=e=>({gap:er(t,e)});return Bn(e,e.gap,n)}return null};yr.propTypes={},yr.filterProps=["gap"];const br=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Yn(e.theme,"spacing",8),n=e=>({columnGap:er(t,e)});return Bn(e,e.columnGap,n)}return null};br.propTypes={},br.filterProps=["columnGap"];const vr=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Yn(e.theme,"spacing",8),n=e=>({rowGap:er(t,e)});return Bn(e,e.rowGap,n)}return null};vr.propTypes={},vr.filterProps=["rowGap"];function Er(e,t){return"grey"===t?t:e}$n(yr,br,vr,Un({prop:"gridColumn"}),Un({prop:"gridRow"}),Un({prop:"gridAutoFlow"}),Un({prop:"gridAutoColumns"}),Un({prop:"gridAutoRows"}),Un({prop:"gridTemplateColumns"}),Un({prop:"gridTemplateRows"}),Un({prop:"gridTemplateAreas"}),Un({prop:"gridArea"}));function Cr(e){return e<=1&&0!==e?100*e+"%":e}$n(Un({prop:"color",themeKey:"palette",transform:Er}),Un({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Er}),Un({prop:"backgroundColor",themeKey:"palette",transform:Er}));const xr=Un({prop:"width",transform:Cr}),Sr=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r,o;return{maxWidth:(null==(n=e.theme)||null==(r=n.breakpoints)||null==(o=r.values)?void 0:o[t])||jn[t]||Cr(t)}};return Bn(e,e.maxWidth,t)}return null};Sr.filterProps=["maxWidth"];const Lr=Un({prop:"minWidth",transform:Cr}),wr=Un({prop:"height",transform:Cr}),Or=Un({prop:"maxHeight",transform:Cr}),Rr=Un({prop:"minHeight",transform:Cr});Un({prop:"size",cssProperty:"width",transform:Cr}),Un({prop:"size",cssProperty:"height",transform:Cr});$n(xr,Sr,Lr,wr,Or,Rr,Un({prop:"boxSizing"}));var Ir={border:{themeKey:"borders",transform:ir},borderTop:{themeKey:"borders",transform:ir},borderRight:{themeKey:"borders",transform:ir},borderBottom:{themeKey:"borders",transform:ir},borderLeft:{themeKey:"borders",transform:ir},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:gr},color:{themeKey:"palette",transform:Er},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Er},backgroundColor:{themeKey:"palette",transform:Er},p:{style:or},pt:{style:or},pr:{style:or},pb:{style:or},pl:{style:or},px:{style:or},py:{style:or},padding:{style:or},paddingTop:{style:or},paddingRight:{style:or},paddingBottom:{style:or},paddingLeft:{style:or},paddingX:{style:or},paddingY:{style:or},paddingInline:{style:or},paddingInlineStart:{style:or},paddingInlineEnd:{style:or},paddingBlock:{style:or},paddingBlockStart:{style:or},paddingBlockEnd:{style:or},m:{style:rr},mt:{style:rr},mr:{style:rr},mb:{style:rr},ml:{style:rr},mx:{style:rr},my:{style:rr},margin:{style:rr},marginTop:{style:rr},marginRight:{style:rr},marginBottom:{style:rr},marginLeft:{style:rr},marginX:{style:rr},marginY:{style:rr},marginInline:{style:rr},marginInlineStart:{style:rr},marginInlineEnd:{style:rr},marginBlock:{style:rr},marginBlockStart:{style:rr},marginBlockEnd:{style:rr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:yr},rowGap:{style:vr},columnGap:{style:br},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Cr},maxWidth:{style:Sr},minWidth:{transform:Cr},height:{transform:Cr},maxHeight:{transform:Cr},minHeight:{transform:Cr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const kr=function(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=i;if(null==t)return null;const u=Hn(n,s)||{};if(c)return c(o);return Bn(o,t,(t=>{let n=Wn(u,l,t);return t===n&&"string"==typeof t&&(n=Wn(u,l,`${e}${"default"===t?"":ht(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const a=null!=(r=i.unstable_sxConfig)?r:Ir;function s(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const o=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}(i.breakpoints),s=Object.keys(o);let l=o;return Object.keys(r).forEach((n=>{const o=(s=r[n],c=i,"function"==typeof s?s(c):s);var s,c;if(null!=o)if("object"==typeof o)if(a[n])l=zn(l,e(n,o,i,a));else{const e=Bn({theme:i},o,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,o)?l=zn(l,e):l[n]=t({sx:o,theme:i})}else l=zn(l,e(n,o,i,a))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(s,l)}return Array.isArray(o)?o.map(s):s(o)}}();kr.filterProps=["sx"];var qr=kr;function _r(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}const Tr=["values","unit","step"];function Ar(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=_r(e,Tr),i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Nn({},e,{[t.key]:t.val})),{})})(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return Nn({keys:a,values:i,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},o)}var Dr={borderRadius:4};function Pr(e=8){if(e.mui)return e;const t=Qn({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}const Mr=["breakpoints","palette","spacing","shape"];function Nr(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=e,a=_r(e,Mr),s=Ar(n),l=Pr(o);let c=dt({breakpoints:s,direction:"ltr",components:{},palette:Nn({mode:"light"},r),spacing:l,shape:Nn({},Dr,i)},a);return c=t.reduce(((e,t)=>dt(e,t)),c),c.unstable_sxConfig=Nn({},Ir,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return qr({sx:e,theme:this})},c}function zr(){return zr=Object.assign?Object.assign.bind():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},zr.apply(this,arguments)}var jr=e.createContext(null);function Fr(){return e.useContext(jr)}var Br="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function Hr(t){const{children:n,theme:r}=t,o=Fr(),i=e.useMemo((()=>{const e=null===o?r:function(e,t){if("function"==typeof t)return t(e);return zr({},e,t)}(o,r);return null!=e&&(e[Br]=null!==o),e}),[r,o]);return wn.jsx(jr.Provider,{value:i,children:n})}function Wr(e=null){const t=Fr();return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}const Ur=Nr();function $r(e=Ur){return Wr(e)}const Gr=["variant"];function Vr(e){return 0===e.length}function Kr(e){const{variant:t}=e,n=_r(e,Gr);let r=t||"";return Object.keys(n).sort().forEach((t=>{r+="color"===t?Vr(r)?e[t]:ht(e[t]):`${Vr(r)?t:ht(t)}${ht(e[t].toString())}`})),r}const Zr=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],Xr=["theme"],Jr=["theme"];function Yr(e){return 0===Object.keys(e).length}function Qr(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const eo=Nr();function to(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function no(e){if(e.type)return e;if("#"===e.charAt(0))return no(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(pt(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error(pt(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}function ro(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function oo(e){let t="hsl"===(e=no(e)).type||"hsla"===e.type?no(function(e){e=no(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),ro({type:s,values:l})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}const io={};function ao(e){const t=$r();return wn.jsx(g.Provider,{value:"object"==typeof t?t:io,children:e.children})}function so(e){const{children:t,theme:n}=e;return wn.jsx(Hr,{theme:n,children:wn.jsx(ao,{children:t})})}const lo=["defaultProps","mixins","overrides","palette","props","styleOverrides"],co=["type","mode"];var uo={black:"#000",white:"#fff"};var po={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var ho={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var fo={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var mo={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var go={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var yo={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var bo={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};const vo=["mode","contrastThreshold","tonalOffset"],Eo={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:uo.white,default:uo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Co={text:{primary:uo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:uo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function xo(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=no(e),t=to(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ro(e)}(e.main,o):"dark"===t&&(e.dark=function(e,t){if(e=no(e),t=to(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ro(e)}(e.main,i)))}function So(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=bt(e,vo),i=e.primary||function(e="light"){return"dark"===e?{main:go[200],light:go[50],dark:go[400]}:{main:go[700],light:go[400],dark:go[800]}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:ho[200],light:ho[50],dark:ho[400]}:{main:ho[500],light:ho[300],dark:ho[700]}}(t),s=e.error||function(e="light"){return"dark"===e?{main:fo[500],light:fo[300],dark:fo[700]}:{main:fo[700],light:fo[400],dark:fo[800]}}(t),l=e.info||function(e="light"){return"dark"===e?{main:yo[400],light:yo[300],dark:yo[700]}:{main:yo[700],light:yo[500],dark:yo[900]}}(t),c=e.success||function(e="light"){return"dark"===e?{main:bo[400],light:bo[300],dark:bo[700]}:{main:bo[800],light:bo[500],dark:bo[900]}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:mo[400],light:mo[300],dark:mo[700]}:{main:"#ed6c02",light:mo[500],dark:mo[900]}}(t);function d(e){const t=function(e,t){const n=oo(e),r=oo(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Co.text.primary)>=n?Co.text.primary:Eo.text.primary;return t}const p=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e=yt({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(pt(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(pt(12,t?` (${t})`:"",JSON.stringify(e.main)));return xo(e,"light",o,r),xo(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e},h={dark:Co,light:Eo};return dt(yt({common:yt({},uo),mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:po,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r},h[t]),o)}const Lo=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const wo={textTransform:"uppercase"},Oo='"Roboto", "Helvetica", "Arial", sans-serif';function Ro(e,t){const n="function"==typeof t?t(e):t,{fontFamily:r=Oo,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,p=bt(n,Lo),h=o/14,f=d||(e=>e/c*h+"rem"),m=(e,t,n,o,i)=>{return yt({fontFamily:r,fontWeight:e,fontSize:f(t),lineHeight:n},r===Oo?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},i,u);var a},g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(s,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(s,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(s,14,1.75,.4,wo),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,wo)};return dt(yt({htmlFontSize:c,pxToRem:f,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},g),p,{clone:!1})}function Io(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}var ko=["none",Io(0,2,1,-1,0,1,1,0,0,1,3,0),Io(0,3,1,-2,0,2,2,0,0,1,5,0),Io(0,3,3,-2,0,3,4,0,0,1,8,0),Io(0,2,4,-1,0,4,5,0,0,1,10,0),Io(0,3,5,-1,0,5,8,0,0,1,14,0),Io(0,3,5,-1,0,6,10,0,0,1,18,0),Io(0,4,5,-2,0,7,10,1,0,2,16,1),Io(0,5,5,-3,0,8,10,1,0,3,14,2),Io(0,5,6,-3,0,9,12,1,0,3,16,2),Io(0,6,6,-3,0,10,14,1,0,4,18,3),Io(0,6,7,-4,0,11,15,1,0,4,20,3),Io(0,7,8,-4,0,12,17,2,0,5,22,4),Io(0,7,8,-4,0,13,19,2,0,5,24,4),Io(0,7,9,-4,0,14,21,2,0,5,26,4),Io(0,8,9,-5,0,15,22,2,0,6,28,5),Io(0,8,10,-5,0,16,24,2,0,6,30,5),Io(0,8,11,-5,0,17,26,2,0,6,32,5),Io(0,9,11,-5,0,18,28,2,0,7,34,6),Io(0,9,12,-6,0,19,29,2,0,7,36,6),Io(0,10,13,-6,0,20,31,3,0,8,38,7),Io(0,10,13,-6,0,21,33,3,0,8,40,7),Io(0,10,14,-6,0,22,35,3,0,8,42,7),Io(0,11,14,-7,0,23,36,3,0,9,44,8),Io(0,11,15,-7,0,24,38,3,0,9,46,8)];const qo=["duration","easing","delay"],_o={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},To={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ao(e){return`${Math.round(e)}ms`}function Do(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function Po(e){const t=yt({},_o,e.easing),n=yt({},To,e.duration);return yt({getAutoHeightDuration:Do,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0}=r;return bt(r,qo),(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:Ao(o)} ${i} ${"string"==typeof a?a:Ao(a)}`)).join(",")}},e,{easing:t,duration:n})}var Mo={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const No=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function zo(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,a=bt(e,No);if(e.vars)throw new Error(pt(18));const s=So(r),l=Nr(e);let c=dt(l,{mixins:(u=l.breakpoints,d=n,yt({toolbar:{minHeight:56,[u.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[u.up("sm")]:{minHeight:64}}},d)),palette:s,shadows:ko.slice(),typography:Ro(s,i),transitions:Po(o),zIndex:yt({},Mo)});var u,d;return c=dt(c,a),c=t.reduce(((e,t)=>dt(e,t)),c),c.unstable_sxConfig=yt({},Ir,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return qr({sx:e,theme:this})},c}var jo=zo();function Fo(){return $r(jo)}const Bo=function(e={}){const{defaultTheme:t=eo,rootShouldForwardProp:n=Qr,slotShouldForwardProp:r=Qr}=e,o=e=>{const n=Yr(e.theme)?t:e.theme;return qr(Nn({},e,{theme:n}))};return o.__mui_systemSx=!0,(e,i={})=>{((e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))})(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:a,slot:s,skipVariantsResolver:l,skipSx:c,overridesResolver:u}=i,d=_r(i,Zr),p=void 0!==l?l:s&&"Root"!==s||!1,h=c||!1;let f=Qr;"Root"===s?f=n:s?f=r:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(f=void 0);const m=function(e,t){return z(e,t)}(e,Nn({shouldForwardProp:f,label:undefined},d)),g=(e,...n)=>{const r=n?n.map((e=>"function"==typeof e&&e.__emotion_real!==e?n=>{let{theme:r}=n,o=_r(n,Xr);return e(Nn({theme:Yr(r)?t:r},o))}:e)):[];let i=e;a&&u&&r.push((e=>{const n=Yr(e.theme)?t:e.theme,r=((e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null)(a,n);if(r){const t={};return Object.entries(r).forEach((([r,o])=>{t[r]="function"==typeof o?o(Nn({},e,{theme:n})):o})),u(e,t)}return null})),a&&!p&&r.push((e=>{const n=Yr(e.theme)?t:e.theme;return((e,t,n,r)=>{var o,i;const{ownerState:a={}}=e,s=[],l=null==n||null==(o=n.components)||null==(i=o[r])?void 0:i.variants;return l&&l.forEach((n=>{let r=!0;Object.keys(n.props).forEach((t=>{a[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)})),r&&s.push(t[Kr(n.props)])})),s})(e,((e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const r={};return n.forEach((e=>{const t=Kr(e.props);r[t]=e.style})),r})(a,n),n,a)})),h||r.push(o);const s=r.length-n.length;if(Array.isArray(e)&&s>0){const t=new Array(s).fill("");i=[...e,...t],i.raw=[...e.raw,...t]}else"function"==typeof e&&e.__emotion_real!==e&&(i=n=>{let{theme:r}=n,o=_r(n,Jr);return e(Nn({theme:Yr(r)?t:r},o))});return m(i,...r)};return m.withConfig&&(g.withConfig=m.withConfig),g}}({defaultTheme:jo,rootShouldForwardProp:e=>Qr(e)&&"classes"!==e});var Ho=Bo;function Wo(){return Wo=Object.assign?Object.assign.bind():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},Wo.apply(this,arguments)}function Uo(e,t){return Uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uo(e,t)}function $o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Uo(e,t)}function Go(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Vo=function(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=function(e,t,n="Mui"){const r=gt[t];return r?`${n}-${r}`:`${mt.generate(e)}-${t}`}(e,t,n)})),r}("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"]),Ko={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 Zo="#009845",Xo="#3F8AB3",Jo="#ffffff",Yo="#404040",Qo="#333333",ei="#1A1A1A",ti={mode:"light",palette:{primary:{main:Yo,contrastText:Jo},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Yo,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{active:Yo,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:Jo,default:Jo,lightest:Jo,lighter:"#FBFBFB",darker:"#F2F2F2",darkest:"#E6E6E6"},custom:{focusBorder:Xo,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)"},selected:{main:Zo,alternative:"#E4E4E4",excluded:"#BEBEBE",mainContrastText:Jo,alternativeContrastText:Yo,excludedContrastText:Yo},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)"}}},ni={mode:"dark",palette:{primary:{main:Qo,contrastText:Jo},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Jo,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)"},action:{active:Jo,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:Yo,lighter:Qo,darker:"#262626",darkest:ei},custom:{focusBorder:Xo,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)"},selected:{main:Zo,alternative:Qo,excluded:ei,mainContrastText:Jo,alternativeContrastText:Jo,excludedContrastText:Jo},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)"}}},ri={},oi=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(Vo.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(Vo.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(Vo.disabled)]:{backgroundColor:e.palette.btn.disabled}},"&:active":{boxShadow:"none",backgroundColor:e.palette.btn.active},["&.".concat(Vo.disabled)]:{backgroundColor:e.palette.btn.disabled}}},MuiAccordionSummary:{content:{margin:"8px 0"}}});function ii(e){let t=ti,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn("Invalid theme: '".concat(e,"'")):"dark"===e&&(t=ni));const r=JSON.stringify(t);if(ri[r])return ri[r];const o={palette:B(B({type:t.mode},Ko.palette),t.palette),typography:B({},Ko.typography),shadows:Ko.shadows,props:B({},Ko.props),shape:B({},Ko.shape)};return ri[r]=zo(function(e){const{defaultProps:t={},mixins:n={},overrides:r={},palette:o={},props:i={},styleOverrides:a={}}=e,s=yt({},bt(e,lo),{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=Pr(e.spacing);const l=Ar(e.breakpoints||{}),c=s.spacing;s.mixins=yt({gutters:(e={})=>yt({paddingLeft:c(2),paddingRight:c(2)},e,{[l.up("sm")]:yt({paddingLeft:c(3),paddingRight:c(3)},e[l.up("sm")])})},n);const{type:u,mode:d}=o,p=bt(o,co),h=d||u||"light";return s.palette=yt({text:{hint:"dark"===h?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:h,type:h},p),s}(B(B({},o),{},{overrides:oi(o)}))),ri[r].name=n,ri[r]}mt.configure((e=>"njs-".concat("d2af","-").concat(e.replace("Mui",""))));var ai=t.createContext({language:null,theme:null,translator:null,constraints:{},themeApi:null}),si=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const o=e,i=[],a={get:e=>o[e],set:(e,n)=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));return o[e]=n,t({type:"SET",value:n}),n},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));o[e]=null},dispatch:e=>{i.forEach((t=>t(e?{}:o)))}},s=()=>{const[,e]=n(o);return r((()=>(i.push(e),()=>{const t=i.indexOf(e);i.splice(t,1)})),[e]),[a]};return[s,a]};const[li,ci]=si({}),[ui,di]=si({}),[pi,hi]=si({}),[fi,mi]=si({}),[gi,yi]=si({}),[,bi]=si({}),vi=e=>{let{type:t,value:n}=e;const r=bi.get(n.id);bi.set(n.id,{});const o=()=>{di.clear(n.id),yi.set(n.id,{}),yi.dispatch(!0)},i=()=>{n.removeListener("changed",o),ci.clear(n.id),di.clear(n.id),hi.clear(n.id),mi.clear(n.id),yi.clear(n.id),bi.clear(n.id)};if("SET"===t)r||(n.on("changed",o),n.once("closed",(()=>{i()})));return i},[Ei,Ci]=si({},vi),xi=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=B(B({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:B({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=B(B({},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 Si(e,t){const n=e?"".concat(e.id):null,[i]=li(),[a,s]=o(xi,n?i.get(n):null),[l]=gi(),[c]=ui();let u;n&&(u=c.get(n),u||(u={},c.set(n,u)));const d=async r=>{let o=u[t];if(!o||o&&o.rpcRetry){o={rpc:e[t](),rpcRetry:!1},u[t]=o,s({type:"INVALID",method:t,key:n,model:e,rpcResultStore:i,canCancel:!0})}try{const r=await o.rpc;s({type:"VALID",result:r,key:n,method:t,model:e,rpcResultStore:i})}catch(e){15!==e.code||r||(o.rpcRetry||(o.rpcRetry=!0),d(!0))}},p={cancel:async()=>{const r=e.session.getObjectApi({handle:-1});await r.cancelRequest(u[t].rpc.requestId),s({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:i})},retry:()=>{u[t].rpcRetry=!0,d()}};return r((()=>{e&&d()}),[e,l.get(e&&e.id),n,t]),[a&&a.result,{validating:a&&a.validating,canCancel:a&&a.canCancel,canRetry:a&&a.canRetry},p]}function Li(e){return Si(e,"getLayout")}function wi(e){return Si(e,"getAppLayout")}function Oi(e,t){const o=t?"".concat(t.id,"/").concat(JSON.stringify(e)):null,[i]=Ei(),[a]=pi(),[s,l]=n();let c;o&&(c=a.get(o));for(var u=arguments.length,d=new Array(u>2?u-2:0),p=2;p<u;p++)d[p-2]=arguments[p];return r((()=>{if(!t)return;(async()=>{if(!c){const n=t.createSessionObject(e);c=n,a.set(o,c)}const n=await c;i.set(o,n),l(n)})()}),[t,...d]),[s]}const Ri={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Ii(e){return Oi(Ri,e)}function ki(e){const[t]=Ii(e),[o]=Li(t),[i]=wi(e),[a,s]=n(null);return r((()=>{i&&t&&o&&((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,o,i)}),[i,t,o]),r((()=>{if(!o)return;let e=!1,t=!1,n=!1;[o,...o.alternateStates||[]].forEach((r=>{e=e||r.qSelectionObject&&r.qSelectionObject.qBackCount>0,t=t||r.qSelectionObject&&r.qSelectionObject.qForwardCount>0,n=n||(r.qSelectionObject&&r.qSelectionObject.qSelections||[]).filter((e=>!0!==e.qLocked)).length>0})),s({canGoBack:e,canGoForward:t,canClear:n})}),[o]),[a,t,o]}const[qi,_i]=si({}),[Ti,Ai]=si({}),[Di,Pi]=si({}),[Mi,Ni]=si({});function zi(e){if(!e.session)return[];const[t,n,o]=ki(e),[i]=qi(),a=e?e.id:null;let s=i.get(a);return r((()=>{e&&n&&o&&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=Ni.get(o);t&&(await t.endSelections(e),Ni.clear(o),Pi.get(t.id).emit("deactivated"))},a={begin:async function(e,n){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e===Ni.get(o))return;i(r),Ni.set(o,e);const a=Array.isArray(n)?n:[n],s=async n=>{try{await e.beginSelections(a),Ni.set(o,e)}catch(e){6003!==e.code||n?Ni.clear(o):(await t.abortModal(r),s(!0))}};await s()},end:i};Ai.set(o,a);const s={model:t,isInModal:()=>!!Ni.get(o),isModal:e=>e?Ni.get(o)===e:!!Ni.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:o,navState:t}),i.set(a,s),i.dispatch(!0))}),[e,n,o,t]),[s,t]}const ji=i(((e,r)=>{let{initialContext:o,app:i}=e;const[l]=zi(i),[c,u]=n(o),[d,p]=n(),{theme:h}=a((()=>({theme:ii(d)})),[d]),[f,m]=n([]);return s(r,(()=>({addComponent(e){m([...f,e])},removeComponent(e){const t=f.indexOf(e);-1!==t&&(f.splice(t,1),m([...f]))},setMuiThemeName:p,setContext:u,getAppSelections:()=>l}))),t.createElement(Mn,{injectFirst:!0},t.createElement(so,{theme:h},t.createElement(ai.Provider,{value:c},f)))}));function Fi(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.1.0-alpha.4"),s.setAttribute("data-app-id",r.id),document.body.appendChild(s),f.render(t.createElement(ji,{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},removeCell(e){delete l[e]},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 Bi(){const[e,t]=n(),[r,o]=n(),i=l((e=>{e&&t(e)}),[]),a=()=>{const{left:t,top:n,width:r,height:i}=e.getBoundingClientRect();o({left:t,top:n,width:r,height:i})};return c((()=>{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]),[i,r,e]}function Hi(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Wi(e){let{size:n,style:r={},viewBox:o="0 0 16 16",shapes:i=[]}=e;const a=B({fontSize:Hi(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,W({key:n},o))}))))}var Ui=e=>Wi((e=>B(B({},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 $i=e=>Wi((e=>B(B({},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 Gi=e=>Wi((e=>B(B({},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));var Vi=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ki=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}}(),Zi=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},Xi=function(e){function t(){var e,n,r;Vi(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=Zi(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},Zi(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,u),Ki(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),d=l+1;d<=u&&!t(d);d++)l=d;a.push(s,l)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var p=a[0]-1;if(t(p))break;a[0]=p}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 Ji=["S","XS"],Yi=e=>e.reduce(((e,t)=>e.concat(t)));function Qi(e){return Ji.includes(e)}function ea(e){return Array.isArray(e)?Array.from(new Set(e)):void 0}async function ta(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 na(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 ra(e){let{layout:t,selections:o,pages:i=[],checkboxes:a=!1,selectDisabled:s,doc:c=document,isSingleSelect:u=!1}=e;const[d,p]=n(i),[h,f]=n(!1),[m,g]=n(!1),[y,b]=n(u),[v,E]=n([]),[C,x]=n(!1),[S,L]=n([]),w=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 Yi(t)}(i);r((()=>{b(u)}),[u]);const O=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 n=t?e.filter((e=>!v.includes(e))):e;await ta({selections:o,elemNumbers:n,isSingleSelect:y}),g(!1),L([])},R=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s()||L((n=>{const r=ea([...n,...e]),o=t?r.filter((e=>!v.includes(e))):r;return t?na(r,w):o}))},I=e=>{(e.ctrlKey||e.metaKey)&&(b(!0),e.currentTarget.focus(),e.preventDefault())},k=l((e=>{if(m||s())return;const t=+e.currentTarget.getAttribute("data-n");L([t]),I(e)}),[m,s]),q=l((e=>{if(m||s())return;x(!1),f(!0);const t=+e.currentTarget.getAttribute("data-n");L([t]),I(e)}),[m,s]),_=l((e=>{const t=+e.currentTarget.getAttribute("data-n");y||!h||m||1===S.length&&S[0]===t||R([t])}),[h,m,S,v,C,s]),T=l((()=>{f(!1),g(!1),x(!1),b(u)}),[u]),A=l((e=>{if(y||!h||m||s())return;x(!0);const t=+e.currentTarget.getAttribute("data-n");R([t],!0)}),[h,m,C,S,v,s,t&&t.qListObject.qDimensionInfo.qIsOneAndOnlyOne]);r((()=>{const e=!h;S&&S.length&&!m&&e&&t&&O(S,C)}),[S,h,s()]),r((()=>(c.addEventListener("mouseup",T),()=>{c.removeEventListener("mouseup",T)})),[T]),r((()=>{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!!Qi(t.qState)&&t.qElemNumber}));return t.filter((e=>!1!==e))}));return Yi(t)}(i);E(e)}),[i]),r((()=>{if(m||!i||!a&&!h)return;const e=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e=>t.length<=1&&Qi(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,[B(B({},o),{},{qState:a}),e.slice(1)]}));return B(B({},e),{},{qMatrix:o})}));return o}(i,S,y);p(e)}),[S]);const D={};return a?Object.assign(D,{onClick:k}):Object.assign(D,{onMouseUp:_,onMouseDown:q,onMouseEnter:A}),{instantPages:d,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];x(!1),f(!0),R(e,t||C);const n=O(e,t||C);return f(!1),n}}}const oa=e=>B(B({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var ia=e=>Wi(oa(e));const aa="ListBoxCheckbox",sa={cbIcon:"".concat(aa,"-cbIcon"),cbIconChecked:"".concat(aa,"-cbIconChecked"),cbIconExcluded:"".concat(aa,"-cbIconExcluded"),cbIconAlternative:"".concat(aa,"-cbIconAlternative"),checkbox:"".concat(aa,"-checkbox"),dense:"".concat(aa,"-dense")},la=Ho(y)((e=>{let{theme:t}=e;return{["& .".concat(sa.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(sa.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(sa.cbIconExcluded)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.excluded},["& .".concat(sa.cbIconAlternative)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.alternative},["&.".concat(sa.checkbox)]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},["&.".concat(sa.dense)]:{padding:"4px 8px"}}})),ca=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 ua(e){let{checked:n,label:r,dense:o,excluded:i,showGray:a=!0}=e;return t.createElement(la,{edge:"start",checked:n,disableRipple:!0,className:[sa.checkbox,o&&sa.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":r},name:r,icon:ca(sa,a,i),checkedIcon:t.createElement("span",{className:sa.cbIconChecked})})}const da="ListBoxRadioButton",pa={denseRadioButton:"".concat(da,"-denseRadioButton"),radioButton:"".concat(da,"-radioButton")},ha=Ho(b)((e=>{let{theme:t,checked:n}=e;return{["&.".concat(pa.radioButton)]:{right:"5px",color:n?t.palette.selected.main:t.palette.main}}}));function fa(e){let{checked:n,label:r,dense:o}=e;return t.createElement(ha,{checked:n,value:r,name:r,className:pa.radioButton,style:{backgroundColor:"transparent"},disableRipple:!0,size:o?"small":"medium",sx:o&&{padding:"0px 0px 0px 12px"}})}const ma=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===ma.ARROW_UP||e===ma.ARROW_DOWN||e===ma.ARROW_LEFT||e===ma.ARROW_RIGHT});function ga(e){let{setKeyboardActive:t}=e;return e=>{const{keyCode:n}=e.nativeEvent;switch(n){case ma.ENTER:case ma.SPACE:if(!e.target.classList.contains("listbox-container"))return;(e=>{const n=e.querySelector(".search input, .value.selector, .value, .ActionsToolbar-* button");t(!0),n&&n.focus()})(e.currentTarget);break;case ma.ESCAPE:r=e.currentTarget,t(!1),r.focus();break;default:return}var r;e.preventDefault()}}const ya="RowColumn",ba={row:"".concat(ya,"-row"),rowBorderBottom:"".concat(ya,"-rowBorderBottom"),column:"".concat(ya,"-column"),fieldRoot:"".concat(ya,"-fieldRoot"),cell:"".concat(ya,"-cell"),labelText:"".concat(ya,"-labelText"),labelDense:"".concat(ya,"-labelDense"),highlighted:"".concat(ya,"-highlighted"),checkboxLabel:"".concat(ya,"-checkboxLabel"),icon:"".concat(ya,"-icon"),S:"".concat(ya,"-S"),XS:"".concat(ya,"-XS"),A:"".concat(ya,"-A"),X:"".concat(ya,"-X"),frequencyCount:"".concat(ya,"-frequencyCount"),barContainer:"".concat(ya,"-barContainer"),bar:"".concat(ya,"-bar"),barSelected:"".concat(ya,"-barSelected"),barWithCheckbox:"".concat(ya,"-barWithCheckbox"),barSelectedWithCheckbox:"".concat(ya,"-barSelectedWithCheckbox"),excludedTextWithCheckbox:"".concat(ya,"-excludedTextWithCheckbox")},va={width:"100%",overflow:"hidden",textOverflow:"ellipsis"},Ea=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}}},Ca=Ho("div",{shouldForwardProp:e=>"flexBasisProp"!==e})((e=>{var t,n,r,o,i,a,s,l,c,u;let{theme:d,flexBasisProp:p,dense:h}=e;return{["& .".concat(ba.row)]:{flexWrap:"nowrap",color:null!==(t=null===(n=d.listBox)||void 0===n||null===(r=n.content)||void 0===r?void 0:r.color)&&void 0!==t?t:d.palette.text.primary},["& .".concat(ba.rowBorderBottom)]:{borderBottom:"1px solid ".concat(d.palette.divider)},["& .".concat(ba.column)]:{flexWrap:"nowrap",borderRight:"1px solid ".concat(d.palette.divider),color:null!==(o=null===(i=d.listBox)||void 0===i||null===(a=i.content)||void 0===a?void 0:a.color)&&void 0!==o?o:d.palette.text.primary},["& .".concat(ba.fieldRoot)]:{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(d.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"}},["& .".concat(ba.cell)]:{display:"flex",alignItems:"center",minWidth:0,flexGrow:1,paddingLeft:"9px",paddingRight:"9px"},["& .".concat(ba.labelText)]:B(B({flexBasis:p,lineHeight:"16px",userSelect:"none",whiteSpace:"pre",paddingRight:"9px"},va),{},{fontSize:null===(s=d.listBox)||void 0===s||null===(l=s.content)||void 0===l?void 0:l.fontSize,fontFamily:null===(c=d.listBox)||void 0===c||null===(u=c.content)||void 0===u?void 0:u.fontFamily}),["& .".concat(ba.labelDense)]:{fontSize:12},["& .".concat(ba.highlighted)]:{overflow:"visible",width:"100%","& > span":{width:"100%",backgroundColor:"#FFC72A"}},["& .".concat(ba.checkboxLabel)]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":B(B({},va),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},["& .".concat(ba.icon)]:{display:"flex",padding:d.spacing(1,1,1,0)},["& .".concat(ba.S)]:B({},Ea({theme:d})),["& .".concat(ba.XS)]:B(B({},Ea({theme:d})),{},{background:d.palette.selected.excluded,color:d.palette.selected.mainContrastText}),["& .".concat(ba.A)]:{background:d.palette.selected.alternative,color:d.palette.selected.alternativeContrastText},["& .".concat(ba.X)]:{background:d.palette.selected.excluded,color:d.palette.selected.excludedContrastText},["& .".concat(ba.frequencyCount)]:{width:"66px",justifyContent:"flex-end"},["&.".concat(ba.barContainer)]:{height:"100%",display:"inline-block"},["& .".concat(ba.bar)]:{border:"".concat(1,"px solid"),borderColor:"#D9D9D9",height:h?"16px":"20px",position:"absolute",zIndex:"-1",alignSelf:"center",left:"".concat(4,"px"),transition:"width 0.2s",backgroundColor:"#FAFAFA"},["& .".concat(ba.barSelected)]:{opacity:"30%",zIndex:"0",background:d.palette.background.lighter},["& .".concat(ba.barWithCheckbox)]:{left:"".concat(29,"px")},["& .".concat(ba.barSelectedWithCheckbox)]:{background:"#BFE5D0",borderColor:"#BFE5D0"},["& .".concat(ba.excludedTextWithCheckbox)]:{color:"#828282",fontStyle:"italic"}}}));function xa(e){let{index:o,rowIndex:i,columnIndex:a,style:s,data:c}=e;const{onClick:u,onMouseDown:d,onMouseUp:p,onMouseEnter:h,pages:f,isLocked:m,column:g=!1,checkboxes:y=!1,textAlign:b,direction:x,dense:S=!1,freqIsAllowed:L,isSingleSelect:w,actions:O,frequencyMax:R="",histogram:I=!1,keyboard:k,showGray:q=!0,columnCount:_=1,rowCount:T=1,layoutOrder:A}=c;let D,P;if("number"==typeof i&&"number"==typeof a){D="row"===A?i*_+a:a*T+i;const e=0;P=B(B({},s),{},{left:e+(0===a?s.left:Number(s.left)+a*e),top:0===i?s.top:Number(s.top)+i*e})}else D=o,P=B({},s);const M=l(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 ma.SHIFT:a(!0);break;case ma.SPACE:t([+e.currentTarget.getAttribute("data-n")]);break;case ma.ARROW_DOWN:case ma.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 ma.ARROW_UP:case ma.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 ma.ENTER:n();break;case ma.ESCAPE:return void r();default:return}s&&s.focus(),e.preventDefault(),e.stopPropagation()}}(O),[O]),[N,z]=n(!1),[j,F]=n(),[H,W]=n([]);r((()=>{if(!f)return;let e;const t=f.filter((e=>e.qArea.qTop<=D&&D<e.qArea.qTop+e.qArea.qHeight))[0];if(t){const n=t.qArea;D>=n.qTop&&D<n.qTop+n.qHeight&&([e]=t.qMatrix[D-n.qTop])}F(e)}),[f]);const U=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,$=e=>e?"A"===e.qState:null;if(r((()=>{if(!j)return;const e="S"===j.qState||"XS"===j.qState||"L"===j.qState;z(e);const t=[g?ba.column:ba.row];I&&S||y||t.push(ba.rowBorderBottom),y||("XS"===j.qState?t.push(q?ba.XS:ba.S):"S"===j.qState||"L"===j.qState?t.push(ba.S):q&&$(j)?t.push(ba.A):q&&U(j)&&t.push(ba.X)),W(t)}),[j&&j.qState,I,S,y]),!j)return null;const G=e=>e.filter((e=>!!e)).join(" ").trim(),V=()=>($(j)||U(j))&&y,K=!["NaN",void 0].includes(null==j?void 0:j.qNum);let Z;const X=!b||b.auto;Z=X?K?"right":{rtl:"right",ltr:"left"}[x]:(null==b?void 0:b.align)||"left";const J=e=>{let{lbl:n,ix:r,color:o,highlighted:i=!1}=e;return t.createElement(E,{component:"span",variant:"body2",key:r,className:G([ba.labelText,i&&ba.highlighted,S&&ba.labelDense,q&&V()&&ba.excludedTextWithCheckbox]),color:o,justifyContent:Z},t.createElement("span",{style:{whiteSpace:"pre"}},n))},Y=e=>{let{lbl:n,color:r,qElemNumber:o}=e;const i=t.createElement(ua,{label:n,checked:N,dense:S,excluded:U(j),showGray:q}),a=t.createElement(fa,{label:n,checked:N,dense:S}),s="string"==typeof n?J({lbl:n,color:r,highlighted:!1}):n;return t.createElement(C,{color:r,control:w?a:i,className:ba.checkboxLabel,label:s,key:o})},Q=j?j.qText:"",ee=()=>j?j.qFrequency?j.qFrequency:"-":"",te=j&&j.qHighlightRanges&&j.qHighlightRanges.qRanges.sort(((e,t)=>e.qCharPos-t.qCharPos))||[],ne=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}(Q,te),re=y?Y:J,oe={alignItems:"center",display:"flex"},ie=N&&m,ae=!y&&N&&!m,se={display:"flex",alignItems:"center",minWidth:0,flexGrow:1,padding:y?0:void 0,justifyContent:Z},le=0===o,ce=y?"auto":"max-content";return t.createElement(Ca,{className:ba.barContainer,flexBasisProp:ce,dense:S},t.createElement(v,{container:!0,gap:0,className:G(["value",...H]),classes:{root:ba.fieldRoot},style:P,onClick:u,onMouseDown:d,onMouseUp:p,onMouseEnter:h,onKeyDown:M,onContextMenu:e=>{y&&u(e),e.preventDefault()},role:g?"column":"row",tabIndex:!le||k.enabled&&!k.active?-1:0,"data-n":j&&j.qElemNumber},j&&I&&"-"!==ee()&&t.createElement("div",{className:G([ba.bar,y&&ba.barWithCheckbox,N&&(y?ba.barSelectedWithCheckbox:ba.barSelected)]),style:{width:(e=>{const t=String(e),n="%"===t.substring(t.length-1),r=parseFloat(n?t:e),o=y?"(".concat(29,"px + ").concat(6,"px)"):"".concat(10,"px");return"calc(".concat(n?r:r/R*100,"% - ").concat(o,")")})(j.qFrequency)}}),t.createElement(v,{item:!0,style:se,className:G([ba.cell,ba.selectedCell]),title:"".concat(Q)},0===te.length?re({lbl:Q,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 y?Y({lbl:n}):n})({lbls:ne})),L&&t.createElement(v,{item:!0,style:{display:"flex",alignItems:"center"},className:ba.frequencyCount},t.createElement(E,{noWrap:!0,color:"inherit",variant:"body2",className:G([S&&ba.labelDense,ba.labelText,q&&V()&&ba.excludedTextWithCheckbox])},ee())),!y&&t.createElement(v,{item:!0,className:ba.icon},!ie&&!ae&&t.createElement("span",{style:{minWidth:"12px"}}),ie&&t.createElement($i,{style:oe,size:"small"}),ae&&t.createElement(ia,{style:oe,size:"small"}))))}function Sa(e){let{width:t,layout:n,frequencyMode:r}=e;const o=t>80,{frequencyEnabled:i=!1}=(null==n?void 0:n.qListObject)||{},a=!["none",void 0].includes(r);return!(!o||!a&&!i)}var La=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function wa(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||La(r)&&La(o)))return!1;var r,o;return!0}function Oa(e,t){var n;void 0===t&&(t=wa);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 Ra="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Ia(e){cancelAnimationFrame(e.id)}function ka(e,t){var n=Ra();var r={id:requestAnimationFrame((function o(){Ra()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var qa=-1;function _a(e){if(void 0===e&&(e=!1),-1===qa||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),qa=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return qa}var Ta=null;function Aa(e){if(void 0===e&&(e=!1),null===Ta||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?Ta="positive-descending":(t.scrollLeft=1,Ta=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Ta}return Ta}var Da=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function Pa(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,p=e.getRowHeight,h=e.getRowOffset,f=e.getRowStartIndexForOffset,m=e.getRowStopIndexForStartIndex,g=e.initInstanceProps,y=e.shouldResetStyleCacheOnItemSizeChange,b=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=g(r.props,Go(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Go(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Oa((function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=Oa((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,a=r.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,u=r._getItemStyleCache(y&&s,y&&l,y&&c),d=e+":"+t;if(u.hasOwnProperty(d))o=u[d];else{var f=n(r.props,t,r._instanceProps),m="rtl"===l;u[d]=o={position:"absolute",left:m?void 0:f,right:m?f:void 0,top:h(r.props,e,r._instanceProps),height:p(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=Oa((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(Aa()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&Ia(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ka(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}$o(t,e),t.getDerivedStateFromProps=function(e,t){return Ma(e,t),b(e),null};var u=t.prototype;return u.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},u.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,u=i.columnCount,d=i.height,p=i.rowCount,h=i.width,f=this.state,m=f.scrollLeft,g=f.scrollTop,y=_a();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>h?y:0,E=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,E):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,v):g})},u.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},u.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(Aa()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},u.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Ia(this._resetIsScrollingTimeoutId)},u.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,c=e.innerElementType,u=e.innerTagName,p=e.itemData,h=e.itemKey,f=void 0===h?Da:h,m=e.outerElementType,g=e.outerTagName,y=e.rowCount,b=e.style,v=e.useIsScrolling,E=e.width,C=this.state.isScrolling,x=this._getHorizontalRangeToRender(),S=x[0],L=x[1],w=this._getVerticalRangeToRender(),O=w[0],R=w[1],I=[];if(r>0&&y)for(var k=O;k<=R;k++)for(var q=S;q<=L;q++)I.push(d(t,{columnIndex:q,data:p,isScrolling:v?C:void 0,key:f({columnIndex:q,data:p,rowIndex:k}),rowIndex:k,style:this._getItemStyle(k,q)}));var _=a(this.props,this._instanceProps),T=s(this.props,this._instanceProps);return d(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Wo({position:"relative",height:i,width:E,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},d(c||u||"div",{children:I,ref:l,style:{height:_,pointerEvents:C?"none":void 0,width:T}}))},u._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],h=u[2],f=u[3];this._callOnItemsRendered(a,s,d,p,l,c,h,f)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,b=m.scrollTop,v=m.scrollUpdateWasRequested,E=m.verticalScrollDirection;this._callOnScroll(y,b,g,E,v)}},u._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var h=r(this.props,d,this._instanceProps),f=o(this.props,h,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,h-m),Math.max(0,Math.min(t-1,f+g)),h,f]},u._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),p=m(this.props,d,c,this._instanceProps),h=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-h),Math.max(0,Math.min(i-1,p+g)),d,p]},t}(u),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var Ma=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},Na=function(e,t){return e};function za(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,p=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Go(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Go(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Oa((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=Oa((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 d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),h="horizontal"===a||"horizontal"===l,f="rtl"===a,m=h?d:0;u[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:h?0:d,height:h?"100%":p,width:h?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=Oa((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(Aa()){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(){null!==r._resetIsScrollingTimeoutId&&Ia(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ka(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}$o(t,e),t.getDerivedStateFromProps=function(e,t){return ja(e,t),p(e),null};var u=t.prototype;return u.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)},u.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?_a():0:l.scrollHeight>l.clientHeight?_a():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},u.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()},u.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(Aa()){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()},u.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Ia(this._resetIsScrollingTimeoutId)},u.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,h=void 0===p?Na:p,f=e.layout,m=e.outerElementType,g=e.outerTagName,y=e.style,b=e.useIsScrolling,v=e.width,E=this.state.isScrolling,C="horizontal"===o||"horizontal"===f,x=C?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),L=S[0],w=S[1],O=[];if(c>0)for(var R=L;R<=w;R++)O.push(d(t,{data:u,key:h(R,u),index:R,isScrolling:b?E:void 0,style:this._getItemStyle(R)}));var I=r(this.props,this._instanceProps);return d(m||g||"div",{className:n,onScroll:x,ref:this._outerRefSetter,style:Wo({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},d(s||l||"div",{children:O,ref:a,style:{height:C?"100%":I,pointerEvents:E?"none":void 0,width:C?I:"100%"}}))},u._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)}},u._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),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(u),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var ja=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Fa=Pa({getColumnOffset:function(e,t){return t*e.columnWidth},getColumnWidth:function(e,t){return e.columnWidth},getRowOffset:function(e,t){return t*e.rowHeight},getRowHeight:function(e,t){return e.rowHeight},getEstimatedTotalHeight:function(e){var t=e.rowCount;return e.rowHeight*t},getEstimatedTotalWidth:function(e){var t=e.columnCount;return e.columnWidth*t},getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){var a=e.columnCount,s=e.columnWidth,l=e.width,c=Math.max(0,a*s-l),u=Math.min(c,t*s),d=Math.max(0,t*s-l+i+s);switch("smart"===n&&(n=r>=d-l&&r<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(l/2)?0:p>c+Math.floor(l/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){var a=e.rowHeight,s=e.height,l=e.rowCount,c=Math.max(0,l*a-s),u=Math.min(c,t*a),d=Math.max(0,t*a-s+i+a);switch("smart"===n&&(n=r>=d-s&&r<=u+s?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(s/2)?0:p>c+Math.floor(s/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getColumnStartIndexForOffset:function(e,t){var n=e.columnWidth,r=e.columnCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getColumnStopIndexForStartIndex:function(e,t,n){var r=e.columnWidth,o=e.columnCount,i=e.width,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},getRowStartIndexForOffset:function(e,t){var n=e.rowHeight,r=e.rowCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getRowStopIndexForStartIndex:function(e,t,n){var r=e.rowHeight,o=e.rowCount,i=e.height,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}}),Ba=za({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,o,i){var a=e.direction,s=e.height,l=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,p="horizontal"===a||"horizontal"===u?d:s,h=Math.max(0,l*c-p),f=Math.min(h,t*c),m=Math.max(0,t*c-p+c+i);switch("smart"===n&&(n=r>=m-p&&r<=f+p?"auto":"center"),n){case"start":return f;case"end":return m;case"center":var g=Math.round(m+(f-m)/2);return g<Math.ceil(p/2)?0:g>h+Math.floor(p/2)?h:g;default:return r>=m&&r<=f?r:r<m?m:f}},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,d=Math.ceil((u+n-c)/a);return Math.max(0,Math.min(i-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});const Ha="#BBB",Wa="#555",Ua="#f1f1f1",$a={styledScrollbars:"".concat("ListBox","-styledScrollbars")};const{StyledFixedSizeList:Ga,StyledFixedSizeGrid:Va}=function(){const e={scrollbarColor:"".concat(Ha," ").concat(Ua),"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ua},"&::-webkit-scrollbar-thumb":{backgroundColor:Ha,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:Wa}};return{StyledFixedSizeList:z(Ba)((()=>({["&.".concat($a.styledScrollbars)]:e,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ua},"&::-webkit-scrollbar-thumb":{backgroundColor:Ha,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:Wa}}))),StyledFixedSizeGrid:z(Fa)((()=>({["&.".concat($a.styledScrollbars)]:e,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ua},"&::-webkit-scrollbar-thumb":{backgroundColor:Ha,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:Wa}})))}}();const Ka=(e,t)=>{const n=(()=>{const e=document.createDocumentFragment(),t=document.createElement("canvas");return e.appendChild(t),t.getContext("2d")})();if(n.font=t,Array.isArray(e))return Math.max(...e.map((e=>n.measureText(e).width)));return n.measureText(e).width};function Za(e){if(!e)return"";const t=e.qListObject.qDimensionInfo.qApprMaxGlyphCount;let n="";for(let e=0;e<t;e++)n+="M";return n}function Xa(e){let{pages:t,minimumBatchSize:n,count:r,calculatePagesHeight:o=!1}=e;const i=null!=t&&t.length&&o?(e=>{let{pages:t=[],minimumBatchSize:n,count:r}=e;const o=t.some((e=>e.qArea.qHeight<n)),i=Math.max(...t.map((e=>e.qArea.qTop+e.qArea.qHeight)));return o?i:r})({pages:t,minimumBatchSize:n,count:r}):r;return i||0}const[Ja,Ya]=si({});function Qa(e){const t="".concat(e.id),[n]=Ja();return{setStoreValue:(e,r)=>n.set("".concat(t,"/").concat(e),r),getStoreValue:e=>n.get("".concat(t,"/").concat(e))}}function es(e){let{width:n}=e;const{translator:r}=p(ai);return t.createElement(E,{component:"div",variant:"body1",minWidth:n,textAlign:"center",py:"16px"},r.get("Listbox.NoMatchesForYourTerms"))}const ts=["isLoadingData"];function ns(e){var o;let{model:i,selections:s,direction:c,checkboxes:u,height:d,width:p,listLayout:f="vertical",frequencyMode:m,update:g,fetchStart:y,postProcessPages:b,calculatePagesHeight:v=!1,keyboard:E={},showGray:C=!0,scrollState:x,selectDisabled:S=(()=>!1)}=e;const[L,w]=n(!1),[O]=Li(i),R=!(!O||!O.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:I=u,histogram:k}=null!=O?O:{},q=h(null),_=h({queue:[],validPages:!1}),T=h({pages:[]}),A=function(e){let{local:t,loaderRef:r,model:o,fetchStart:i,scrollTimeout:a,postProcessPages:s,listData:l}=e;const[c,u]=n(!1),[d,p]=n([]);let[h]=n(0);const f=(e,n)=>{t.current.queue.push({start:e,stop:n});const c=!!r.current&&r.current._listRef&&r.current._listRef.state.isScrolling;return t.current.queue.length>10&&t.current.queue.shift(),clearTimeout(t.current.timeout),u(!0),new Promise((e=>{t.current.timeout=setTimeout((()=>{const n=t.current.queue.slice(-1)[0],r=o.getListObjectData("/qListObjectDef",[{qTop:n.start>h?n.start-h:0,qHeight:h,qLeft:0,qWidth:1},{qTop:n.start,qHeight:h,qLeft:0,qWidth:1}]).then((n=>{const r=s?s(n):n;t.current.validPages=!0,l.current.pages=r,p(r),u(!1),e()}));i&&i(r)}),c?a:0)}))};return{loadMoreItems:{with(e){let{minimumBatchSize:t}=e;return t&&(h=t),f}},pages:d,isLoading:c}}({local:_,loaderRef:q,model:i,fetchStart:y,scrollTimeout:0,postProcessPages:b,listData:T}),{isLoadingData:D}=A,P=U(A,ts),[M,N]=n([]),{setStoreValue:z}=Qa(i),j=l(P.loadMoreItems,[O]);r((()=>{N((null==P?void 0:P.pages)||[])}),[null==P?void 0:P.pages]);const F=l((e=>{if(null==M||!M.length||!_.current.validPages)return!1;_.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=M.filter((e=>t(e)))[0];return n&&t(n)}),[O,M]),{instantPages:H=[],interactionEvents:$,select:G}=ra({layout:O,selections:s,pages:M,checkboxes:I,selectDisabled:S,doc:document,isSingleSelect:R}),V=()=>{if(_.current.queue=[],_.current.validPages=!1,q.current){if(q.current.resetloadMoreItemsCache(!0),O&&O.qSelectionInfo.qInSelections)return;q.current._listRef.scrollToItem(0)}};g&&g.call(null,V),r((()=>{H&&!D&&N(H)}),[H]),r((()=>{x&&!L&&q.current&&(q.current._listRef.scrollToItem(x.initScrollPos),w(!0))}),[q.current]),r((()=>{V()}),[O]);const K=(e=>{const t=a((()=>"text"in e?e:{}),[e]);return a((()=>Ka(t.text,t.font||"14px Source Sans Pro")),[t.text,t.font])})({text:Za(O),font:"14px Source sans pro"}),{layoutOptions:Z={}}=O||{};let X=100;const J=Z.dataLayout?"singleColumn"===Z.dataLayout:"horizontal"!==f,Y=null==O||null===(o=O.qListObject.qSize)||void 0===o?void 0:o.qcy,Q=Xa({pages:M,minimumBatchSize:X,count:Y,calculatePagesHeight:v});z("listCount",Q);const ee=function(e){let{layout:t,width:n,height:r,listCount:o,count:i,textWidth:a}=e;const{layoutOptions:s={}}=t||{},{layoutOrder:l,maxVisibleRows:c={},maxVisibleColumns:u,dense:d}=s,p=Math.min(150,a+18);let h,f,m,g;const y=d?20:29,b=r||8*y;if(l)if("row"===l){h={overflowX:"hidden"};const e=u.maxColumns||3;f=!1!==u.auto?Math.min(o,Math.ceil((n-10)/p)):Math.min(o,e),g=Math.ceil(o/f),m=(n-10)/f}else{h={overflowY:"hidden"};const e=c.maxRows||3;g=!1!==c.auto?Math.floor(b/y):Math.min(o,e),f=Math.ceil(o/g),m=Math.max(p,n/f)}return{columnCount:f,columnWidth:m,rowCount:g,overflowStyling:h,itemSize:y,listHeight:b,scrollBarWidth:10,count:i,listCount:o}}({layout:O,width:p,height:d,listCount:Q,count:Y,textWidth:K}),{textAlign:te}=(null==O?void 0:O.qListObject.qDimensionInfo)||{},{List:ne,Grid:re}=function(e){let{layout:n,width:r,checkboxes:o,local:i,isVertical:a,pages:s,selectDisabled:l,interactionEvents:c,frequencyMode:u,histogram:d,isSingleSelect:p,select:h,textAlign:f,selections:m,keyboard:g,showGray:y,scrollState:b,direction:v,listLayout:E,sizes:C,listCount:x}=e;const{layoutOptions:S={},frequencyMax:L}=n||{},{dense:w=!1}=S||{},{listHeight:O,itemSize:R,rowCount:I,columnCount:k}=C||{},q={direction:"rtl"===v?"rtl":"ltr",useIsScrolling:!0,className:$a.styledScrollbars},_=null==n?void 0:n.qListObject.qDimensionInfo.qLocked,T=B(B({isLocked:_,column:!a,pages:s},_||l()?{}:c),{},{checkboxes:o,dense:w,frequencyMode:u,freqIsAllowed:Sa({width:r,layout:n,frequencyMode:u}),isSingleSelect:p,textAlign:f,actions:{select:h,confirm:()=>null==m?void 0:m.confirm.call(m),cancel:()=>null==m?void 0:m.cancel.call(m)},frequencyMax:L,histogram:d,keyboard:g,showGray:y});return{List:e=>{let{onItemsRendered:n,ref:o}=e;return i.current.listRef=o,t.createElement(Ga,W({},q,{dataTestid:"fixed-size-list",height:O,width:r,itemCount:x,layout:E,itemData:B({},T),itemSize:R,onItemsRendered:e=>{b&&b.setScrollPos(e.visibleStopIndex),n(B({},e))},ref:o}),xa)},Grid:e=>{let{onItemsRendered:n,ref:o}=e;const{columnWidth:a,overflowStyling:s,scrollBarWidth:l}=C,{layoutOrder:c}=S||{},u=Math.min(O,I*R+l);return i.current.listRef=o,t.createElement(Va,W({},q,{dataTestid:"fixed-size-grid",height:u,width:r,columnCount:k,columnWidth:a,rowCount:I,rowHeight:R,style:B({},s),itemData:B(B({},T),{},{column:void 0,columnCount:k,rowCount:I,layoutOrder:c}),onItemsRendered:e=>{const t=function(e){const{renderProps:t,scrollState:n,layoutOrder:r,rowCount:o,columnCount:i}=e,{overscanRowStartIndex:a,overscanRowStopIndex:s,overscanColumnStartIndex:l,overscanColumnStopIndex:c,visibleStopIndex:u}=t;let d,p,h,f;return n&&n.setScrollPos(u),"column"===r?(d=l*o,p=a,h=c*o,f=s):(d=l,p=a*i,h=c,f=s*i),{visibleStartIndex:d+p,visibleStopIndex:h+f}}({renderProps:e,scrollState:b,layoutOrder:c,rowCount:I,columnCount:k});n(t)},ref:o}),xa)}}}({direction:c,layout:O,height:d,width:p,checkboxes:I,frequencyMode:m,histogram:k,keyboard:E,showGray:C,interactionEvents:$,select:G,textAlign:te,isVertical:J,pages:M,selectDisabled:S,isSingleSelect:R,selections:s,scrollState:x,local:_,sizes:ee,listCount:Q}),{columnWidth:oe,listHeight:ie,itemSize:ae}=ee||{};return J||(X=function(e){let{width:t,columnWidth:n,listHeight:r,itemSize:o}=e;return Math.ceil(t/n)*Math.ceil(r/o)*2}({width:p,columnWidth:oe,listHeight:ie,itemSize:ae})),t.createElement(t.Fragment,null,!Q&&t.createElement(es,{width:p}),t.createElement(Xi,{isItemLoaded:F,itemCount:Q||1,loadMoreItems:j.with({minimumBatchSize:X}),threshold:0,minimumBatchSize:X,ref:q},J?ne:re))}const rs=e=>B(B({},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"}}]}),os=e=>B(B({},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"}}]}),is=e=>B(B({},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"}}]}),as=e=>B(B({},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 ss=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:rs,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:is,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:os,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:as,enabled:()=>["qAlternative","qExcluded"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{n.selectListObjectExcluded("/qListObjectDef")}}]};const ls=e=>B(B({},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 cs(e){const t=Fo(),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 us="njs-cell-action",ds=t.forwardRef(((e,n)=>{let{ariaExpanded:r=!1,item:o,addAnchor:i=!1}=e;const a=Fo(),{hidden:s,disabled:l,style:c,hasSvgIconShape:u}=cs(o);if(s)return null;const d=Number.parseInt(a.spacing(.5),10),p=o.keyboardAction?e=>["Enter"," ","Spacebar"].includes(e.key)&&o.keyboardAction():null;return t.createElement(x,{ref:i?null:n,title:o.label,onClick:o.action,onKeyDown:p,disabled:l,style:c,className:us,size:"large","aria-expanded":r,"aria-controls":"moreMenuList"},u&&Wi(o.getSvgIconShape()),i&&t.createElement("div",{ref:n,style:{bottom:-d,right:0,position:"absolute",width:"100%",height:0}}))})),ps=e=>B(B({},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"}}]}),hs=e=>B(B({},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 fs=e=>Wi(hs(e));const ms={icon:"".concat("More","-icon")},gs=Ho(S)((e=>{let{theme:t}=e;return{["& .".concat(ms.icon)]:{color:t.palette.text.primary}}}));function ys(e){let{item:n,onActionClick:r=(()=>{})}=e;const{hidden:o,disabled:i,hasSvgIconShape:a}=cs(n);return o?null:t.createElement(w,{title:n.label,onClick:()=>{n.action(),r()},disabled:i,tabindex:"0"},a&&t.createElement(O,{className:ms.icon},Wi(n.getSvgIconShape())),t.createElement(E,{noWrap:!0},n.label))}const bs=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(gs,W({},a,{onClose:l,ref:n,open:o,anchorEl:i.current,getContentAnchorEl:null,hideBackdrop:!0,style:{pointerEvents:"none"},transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{style:B({pointerEvents:"auto",maxWidth:"250px"},s)}}),t.createElement(L,{id:"moreMenuList"},r.map(((e,n)=>t.createElement(ys,{key:n,item:e,onActionClick:l})))))})),vs="ActionsToolbar",Es={itemSpacing:"".concat(vs,"-itemSpacing"),firstItemSpacing:"".concat(vs,"-firstItemSpacing"),lastItemSpacing:"".concat(vs,"-lastItemSpacing")},Cs=Ho(S)((e=>{let{theme:t}=e;return{["& .".concat(Es.itemSpacing)]:{padding:t.spacing(0,.5)},["& .".concat(Es.firstItemSpacing)]:{padding:t.spacing(0,.5,0,0)},["& .".concat(Es.lastItemSpacing)]:{padding:t.spacing(0,0,0,.5)}}})),xs="njs-action-toolbar-popover",Ss=t.forwardRef(((e,n)=>{let{ariaExpanded:r=!1,actions:o=[],first:i=!1,last:a=!1,addAnchor:s=!1}=e;return o.length>0?t.createElement(v,{item:!0,container:!0,gap:0,wrap:"nowrap"},o.map(((e,l)=>{let c=[];const u=i&&0===l,d=a&&o.length-1===l;return u&&!d&&(c=[Es.firstItemSpacing]),d&&!u&&(c=[...c,Es.lastItemSpacing]),u||d||0!==c.length||(c=[Es.itemSpacing]),t.createElement(v,{item:!0,key:e.key,className:c.join(" ").trim()},t.createElement(ds,{ariaExpanded:r,key:e.key,item:e,ref:0===l?n:null,addAnchor:s}))}))):null})),Ls={pointerEvents:"none"},ws={vertical:"top",horizontal:"right"},Os={vertical:"bottom",horizontal:"right"};function Rs(e){let{show:o=!0,actions:i=[],maxItems:s=3,selections:l={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},more:c={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{}},popover:u={show:!1,anchorEl:null},focusHandler:d=null,actionsRefMock:f=null}=e;const m=function(e){let{api:t,onConfirm:n=(()=>{}),onCancel:r=(()=>{}),onKeyDeactivate:o=(()=>{})}=e;const{translator:i}=p(ai);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>t.canClear(),action:()=>t.clear(),getSvgIconShape:hs},{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:ps},{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:oa}]}(l),{translator:g,keyboardNavigation:y}=p(ai),[b,E]=n(!1),[C,x]=n(c.enabled),[S,L]=n(c.actions),w=h(),O=h(),I=Fo(),k=a((()=>({margin:I.spacing(.5,0)}))),q=e=>{const t=O.current||f;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]};r((()=>()=>E(!1)),[u.show]),r((()=>{x(c.enabled)}),[c.enabled]),r((()=>{if(!d)return;d.on("focus_toolbar_first",(()=>{const e=q(!1);e&&e.focus()})),d.on("focus_toolbar_last",(()=>{const e=q(!0);e&&e.focus()}))}),[]);const _=a((()=>i.filter((e=>!e.hidden))),[i]);if(!l.show&&0===_.length)return null;const T={key:"more",label:g.get("Menu.More"),getSvgIconShape:ls,hidden:!1,active:b,enabled:()=>C,action:()=>E(!b)};if(_.length>s){const e=_.splice(-(_.length-s)-1);x(!0),L([...e,...c.actions])}const A=y&&d&&d.refocusContent?e=>{if("Tab"!==e.key)return;(e.shiftKey&&q(!1)===e.target||!e.shiftKey&&q(!0)===e.target)&&(e.preventDefault(),e.stopPropagation(),d.refocusContent())}:null,D=_.length>0,P=S.length>0,M=D&&l.show||P&&l.show,N=t.createElement(v,{ref:O,onKeyDown:A,container:!0,gap:0,wrap:"nowrap"},D&&t.createElement(Ss,{actions:_,first:!0,last:!P&&!l.show}),P&&t.createElement(Ss,{ref:w,ariaExpanded:b,actions:[T],first:!D,last:!l.show,addAnchor:!0}),M&&t.createElement(v,{item:!0,className:Es.itemSpacing,style:k},t.createElement(R,{orientation:"vertical"})),l.show&&t.createElement(Ss,{actions:m,first:!D&&!P,last:!0}),b&&t.createElement(bs,{show:b,actions:S,alignTo:w,popoverProps:c.popoverProps,popoverPaperStyle:c.popoverPaperStyle,onCloseOrActionClick:()=>{E(!1)}}));return u.show?t.createElement(Cs,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:u.show,anchorEl:u.anchorEl,anchorOrigin:ws,transformOrigin:Os,hideBackdrop:!0,style:Ls,PaperProps:{className:xs,style:{pointerEvents:"auto",padding:I.spacing(1,1)}}},N):o&&N}var Is=e=>Wi((e=>B(B({},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));const ks="/qListObjectDef",qs=Ho(I)((e=>{var t,n;let{theme:r}=e;return{color:null===(t=r.listBox)||void 0===t||null===(n=t.content)||void 0===n?void 0:n.color}})),_s=Ho(k)((e=>{var t,n;let{theme:r}=e;return{color:null===(t=r.listBox)||void 0===t||null===(n=t.content)||void 0===n?void 0:n.color}}));function Ts(e){let{selections:o,model:i,keyboard:a,dense:s=!1,visible:l=!0}=e;const{translator:c}=p(ai),[u,d]=n(""),h=Fo(),{getStoreValue:f}=Qa(i),m=async()=>{if(o.isModal())try{await i.abortListObjectSearch(ks)}finally{d("")}};r((()=>{l||m()}),[l]),r((()=>(o.on("deactivated",m),()=>{o.removeListener&&o.removeListener("deactivated",m)})),[]);const g=async()=>{let e;return await i.searchListObjectFor(ks,u)&&u.length&&f("listCount")>0&&(e=i.acceptListObjectSearch(ks,!0),o.selectionsMade=!0,d("")),e};return l?t.createElement(_s,{startAdornment:t.createElement(qs,{position:"start"},t.createElement(Is,{size:s?"small":"normal"})),className:"search",sx:[{border:"none",borderRadius:0,backgroundColor:"transparent","& fieldset":{border:"1px solid ".concat(h.palette.divider),borderWidth:"1px 0 1px 0",borderRadius:0},"&:hover":{border:"none"}},s&&{fontSize:12,paddingLeft:h.spacing(1),"& input":{paddingTop:"5px",paddingBottom:"5px"}}],size:"small",fullWidth:!0,placeholder:c.get("Listbox.Search"),value:u,onFocus:()=>{o.isModal()||o.begin(["/qListObjectDef"])},onChange:async e=>(d(e.target.value),e.target.value.length?i.searchListObjectFor(ks,e.target.value):m()),onKeyDown:async e=>{let t;switch(e.key){case"Enter":t=await g();break;case"Escape":t=o.isActive()&&o.cancel(),e.preventDefault(),e.stopPropagation()}return t},inputProps:{tabIndex:!a||a.enabled&&!a.active?-1:0}}):null}function As(e){return Object.keys(Y.prototype).forEach((t=>{e[t]=Y.prototype[t]})),Y.init(e),e}const Ds=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 As(s),s},Ps=e=>{let{elements:t,objectSelections:n}=e;const r=function(e){let{elements:t,handleClickOutside:n}=e;return e=>{if(!document.contains(e.target))return;const r=t.map((e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current)).filter((e=>!!e&&!!document.contains(e)));r.length&&!r.some((t=>t.contains(e.target)))&&n(e)}}({elements:t,handleClickOutside:()=>n.confirm.call(n)});return{activateClickOut(){document.addEventListener("mousedown",r)},deactivateClickOut(){document.removeEventListener("mousedown",r)}}};function Ms(e,t,n){const o=Array.isArray(n)?n:[n],[i]=zi(e),[a]=Li(t),s=t?t.id:null,[l]=Ti(),[c]=Di(),u=l.get(e.id);let d=c.get(s);return r((()=>{i&&t&&!d&&(d=Ds({appSelections:i,appModal:u,model:t}),c.set(s,d),c.dispatch(!0))}),[i,t]),r((()=>{if(!d)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=Ps({elements:o,objectSelections:d});return d.addListener("activated",e),d.addListener("deactivated",t),()=>{d.removeListener("activated",e),d.removeListener("deactivated",t)}}),[d]),r((()=>{d&&d.setLayout(a)}),[d,a]),[d]}const Ns=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return null!==(n=null==e?void 0:e[t])&&void 0!==n?n:r};function zs(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return Ns(t,"qSelected",0)+Ns(t,"qSelectedExcluded",0)+Ns(t,"qLocked",0)+Ns(t,"qLockedExcluded",0)>0}function js(e){let{alignTo:o,show:i,close:a,app:s,fieldName:c,stateName:u="$"}=e;const d=i&&Boolean(o.current),[f,m]=n(0),g=Fo(),[y]=Oi({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:u,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],qFieldDefs:[c]}}},s,c,u),b=l((()=>{y.lock("/qListObjectDef")}),[y]),E=l((()=>{y.unlock("/qListObjectDef")}),[y]),{translator:C}=p(ai),L=h(),w=h(),[O]=Ms(s,y,w),[R]=Li(y);if(r((()=>{O&&d&&(O.isModal(y)||O.goModal("/qListObjectDef"))}),[O,d]),!y||!R||!C)return null;const I=!0===R.qListObject.qDimensionInfo.qLocked,k=(e,t)=>{const n="escapeKeyDown"!==t;O.noModal(n),a()},q=ss({layout:R,model:y,translator:C}),_=zs(R);return t.createElement(S,{open:d,onClose:k,anchorEl:o.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"250px"}}},t.createElement(v,{container:!0,direction:"column",gap:0,ref:w},t.createElement(v,{item:!0,container:!0,style:{padding:g.spacing(1)}},t.createElement(v,{item:!0},I?t.createElement(x,{onClick:E,disabled:!I,size:"large"},t.createElement($i,{title:C.get("Listbox.Unlock")})):t.createElement(x,{onClick:b,disabled:!_,size:"large"},t.createElement(Gi,{title:C.get("Listbox.Lock")}))),t.createElement(v,{item:!0,xs:!0}),t.createElement(v,{item:!0},t.createElement(Rs,{more:{enabled:!I,actions:q,alignTo:L,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:O,onConfirm:k,onCancel:()=>k(0,"escapeKeyDown")}}))),t.createElement(v,{item:!0,xs:!0},t.createElement("div",{ref:L}),t.createElement(Ts,{selections:O,model:y,listCount:f,visible:!0}),t.createElement(ns,{model:y,selections:O,direction:"ltr",onSetListCount:e=>m(e)}))))}function Fs(e){let{field:r,api:o,stateIx:i=0,skipHandleShowListBoxPopover:a=!1,moreAlignTo:s=null,onClose:l=(()=>{})}=e;const{translator:c}=p(ai),u=s||h(),d=Fo(),[f,m]=n(!1),g=e=>{e.currentTarget.contains(e.target)&&m(!f)},y=()=>{m(!1),l()},b=r.selections[i];void 0===b.qTotal&&(b.qTotal=0);const C=b.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},S=(C.qSelected+C.qLocked)/b.qTotal,L=C.qAlternative/b.qTotal,w=(C.qExcluded+C.qLockedExcluded+C.qSelectedExcluded)/b.qTotal,O=C.qSelected+C.qSelectedExcluded+C.qLocked+C.qLockedExcluded,R=0===O&&0===b.qTotal;let I="";b.qTotal===O&&b.qTotal>1?I=c.get("CurrentSelections.All"):O>1&&b.qTotal?I=c.get("CurrentSelections.Of",[O,b.qTotal]):b.qSelectedFieldSelectionInfo&&(I=b.qSelectedFieldSelectionInfo.map((e=>e.qName)).join(", ")),"$"!==r.states[i]&&(I="".concat(r.states[i],": ").concat(I));const k=[{color:d.palette.selected.main,ratio:S},{color:d.palette.selected.alternative,ratio:L},{color:d.palette.selected.excluded,ratio:w}];k.forEach(((e,t)=>{e.offset=t?k[t-1].offset+k[t-1].ratio:0}));let q=null,_=null,T=null,A=null;return s||(q=t.createElement(v,{item:!0,xs:!0,style:{minWidth:0,flexGrow:1,opacity:b.qLocked?"0.3":""}},t.createElement(E,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},b.qField),t.createElement(E,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"}},I)),b.qLocked?_=t.createElement(v,{item:!0},t.createElement(x,{size:"large"},t.createElement($i,null))):b.qOneAndOnlyOne||(_=t.createElement(v,{item:!0},t.createElement(x,{title:c.get("Selection.Clear"),onClick:e=>{e.stopPropagation(),o.clearField(b.qField,r.states[i])},size:"large"},t.createElement(Ui,null)))),T=t.createElement("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"}},!1===R&&k.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(v,{container:!0,gap:1,ref:u,sx:{backgroundColor:d.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:d.palette.action.hover}},onClick:!1===a&&g||null},q,_,T,f&&t.createElement(js,{alignTo:u,show:f,close:y,app:o.model,fieldName:b.qField,stateName:r.states[i]}))),s?t.createElement(js,{alignTo:u,show:!0,close:y,app:o.model,fieldName:b.qField,stateName:r.states[i]}):A}var Bs=e=>Wi((e=>B(B({},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 Hs={item:"".concat("MultiState","-item")},Ws=Ho(v)((e=>{let{theme:t}=e;return{["&.".concat(Hs.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"}}}));function Us(e){let{field:r,api:o,moreAlignTo:i=null,onClose:a=(()=>{})}=e;const[s,l]=n(!!i),[c,u]=n(-1),[d,f]=n(i?i.current:null),m=i||h(),{translator:g}=p(ai),y=g.get("Selection.ClearAllStates"),b=()=>{u(-1),a()};let C=null;i||(C=t.createElement(t.Fragment,null,t.createElement(v,{item:!0,xs:!0,zeroMinWidth:!0},t.createElement(q,{style:{padding:"0px 8px"},color:"secondary",badgeContent:r.states.length},t.createElement(E,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},r.name))),t.createElement(v,{item:!0},t.createElement("div",{style:{width:"12px"}})),t.createElement(v,{item:!0},t.createElement(x,{size:"large"},t.createElement(Bs,null)))));const L=t.createElement(_,{dense:!0},t.createElement(T,{title:y,onClick:()=>{r.states.forEach((e=>o.clearField(r.name,e)))}},t.createElement(A,{variant:"contained",fullWidth:!0},y)),r.states.map(((e,n)=>t.createElement(T,{key:n,title:r.name,onClick:e=>((e,t)=>{e.stopPropagation(),l(!1),u(t)})(e,n)},t.createElement(D,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},t.createElement(Fs,{field:r,api:o,stateIx:n,skipHandleShowListBoxPopover:!0})))))),w=t.createElement(S,{open:s,onClose:()=>{l(!1),a()},anchorEl:d,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},L),O=i?w:t.createElement(Ws,{container:!0,gap:0,className:Hs.item,onClick:e=>{e.currentTarget.contains(e.target)&&(f(e.currentTarget),m.current=e.currentTarget,l(!s))}},C,s&&w,c>-1&&t.createElement(js,{alignTo:m,show:c>-1,close:b,app:o.model,fieldName:r.selections[c].qField,stateName:r.states[c]}));return i&&c>-1?t.createElement(js,{alignTo:m,show:c>-1,close:b,app:o.model,fieldName:r.selections[c].qField,stateName:r.states[c]}):O}const $s="More",Gs={item:"".concat($s,"-item"),badge:"".concat($s,"-badge")},Vs=Ho(v)((e=>{let{theme:t}=e;return{["&.".concat(Gs.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"},["& .".concat(Gs.badge)]:{padding:t.spacing(0,1)}}}));function Ks(e){let{items:r=[],api:o}=e;const i=Fo(),[a,s]=n(!1),[l,c]=n(-1),[u,d]=n(null),p=h(),f=()=>{c(-1)};let m=null;return l>-1&&(m=r[l].states.length>1?t.createElement(Us,{field:r[l],api:o,moreAlignTo:p,onClose:f}):t.createElement(Fs,{field:r[l],api:o,skipHandleShowListBoxPopover:!0,moreAlignTo:p,onClose:f})),t.createElement(Vs,{container:!0,gap:0,className:Gs.item,onClick:e=>{e.currentTarget.contains(e.target)&&(d(e.currentTarget),p.current=e.currentTarget,s(!a))}},t.createElement(v,{item:!0},t.createElement(D,{borderRadius:i.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:i.palette.selected.main,color:i.palette.selected.mainContrastText}},t.createElement(E,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit"},"+",r.length))),t.createElement(v,{item:!0},t.createElement(x,{size:"large"},t.createElement(Bs,null))),a&&t.createElement(S,{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(_,{dense:!0},r.map(((e,n)=>t.createElement(T,{key:n,title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),s(!1),c(t)})(e,n)},t.createElement(D,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},e.states.length>1?t.createElement(Us,{field:e,api:o}):t.createElement(Fs,{field:e,api:o}))))))),m)}function Zs(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 Xs(e){let{api:o,app:i}=e;const a=Fo(),[s]=Ii(i),[l]=Li(s),[c,u]=n({items:[],more:[]}),[d]=Mi(),[p,h]=Bi(),[f,m]=n(0);return r((()=>{if(!h)return;const{width:e}=h,t=Math.floor(e)-72,n=Math.floor(t/120);m(n)}),[h]),r((()=>{if(!(i&&s&&l&&f))return;const e=function(e){if(!e)return[];const t={};return e.qSelectionObject&&Zs(e.qSelectionObject,t),e.alternateStates&&e.alternateStates.forEach((e=>Zs(e.qSelectionObject,t,e.stateName))),Object.keys(t).map((e=>t[e]))}(l);u((t=>{const n=e;if((()=>{const e=d.get(i.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 r=[];return f<n.length&&(r=n.splice(f-n.length)),{items:n,more:r}}))}),[i,s,l,o.isInModal(),f]),t.createElement(v,{ref:p,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"}},c.items.map((e=>t.createElement(v,{item:!0,key:"".concat(e.states.join("::"),"::").concat(e.name),style:{position:"relative",maxWidth:"240px",minWidth:"".concat(120,"px"),background:a.palette.background.paper,borderRight:"1px solid ".concat(a.palette.divider)}},e.states.length>1?t.createElement(Us,{field:e,api:o}):t.createElement(Fs,{field:e,api:o})))),c.more.length>0&&t.createElement(v,{item:!0,style:{position:"relative",maxWidth:"98px",minWidth:"".concat(72,"px"),background:a.palette.background.paper,borderRight:"1px solid ".concat(a.palette.divider)}},t.createElement(Ks,{items:c.more,api:o})))}var Js=e=>Wi((e=>B(B({},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 Ys=e=>Wi((e=>B(B({},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 Qs(e){let{api:n,app:r}=e;const{translator:o}=p(ai),[i]=ki(r);return t.createElement(v,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"}},t.createElement(v,{item:!0},t.createElement(x,{style:{marginRight:"8px"},disabled:!i||!i.canGoBack,title:o.get("Navigate.Back"),onClick:()=>n.back(),size:"large"},t.createElement(Js,null))),t.createElement(v,{item:!0},t.createElement(x,{style:{marginRight:"8px"},disabled:!i||!i.canGoForward,title:o.get("Navigate.Forward"),onClick:()=>n.forward(),size:"large"},t.createElement(Ys,null))),t.createElement(v,{item:!0},t.createElement(x,{disabled:!i||!i.canClear,title:o.get("Selection.ClearAll"),onClick:()=>n.clear(),size:"large"},t.createElement(fs,null))))}function el(e){let{app:n}=e;const r=Fo(),[o]=zi(n);return o?t.createElement(v,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:r.palette.background.paper,minHeight:"40px"}},t.createElement(v,{item:!0,style:{borderRight:"1px solid ".concat(r.palette.divider)}},t.createElement(Qs,{api:o,app:n})),t.createElement(v,{item:!0,xs:!0,style:{backgroundColor:r.palette.background.darker,overflow:"hidden"}},t.createElement(Xs,{api:o,app:n}))):null}function tl(e){let{element:n,app:r}=e;return f.createPortal(t.createElement(el,{app:r}),n)}var nl=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},rl=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}}(),ol=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},il=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},al=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")},sl=void 0;sl="undefined"!=typeof window?window:"undefined"!=typeof self?self:global;var ll=null,cl=null,ul=sl.clearTimeout,dl=sl.setTimeout,pl=sl.cancelAnimationFrame||sl.mozCancelAnimationFrame||sl.webkitCancelAnimationFrame,hl=sl.requestAnimationFrame||sl.mozRequestAnimationFrame||sl.webkitRequestAnimationFrame;function fl(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__&&ll(this.__resizeRAF__),this.__resizeRAF__=cl((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 d="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h=document.createElement("fakeelement");if(void 0!==h.style.animationName&&(c=!0),!1===c)for(var f=0;f<d.length;f++)if(void 0!==h.style[d[f]+"AnimationName"]){u="-"+d[f].toLowerCase()+"-",r=p[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,d=sl.getComputedStyle(i);d&&"static"===d.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 p=u.createElement("div");p.className="expand-trigger",p.appendChild(u.createElement("div"));var h=u.createElement("div");h.className="contract-trigger",i.__resizeTriggers__.appendChild(p),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==pl||null==hl?(ll=ul,cl=function(e){return dl(e,20)}):(ll=function(e){var t=al(e,2),n=t[0],r=t[1];pl(n),ul(r)},cl=function(e){var t=hl((function(){ul(n),e()})),n=dl((function(){pl(t),e()}),20);return[t,n]});var ml=function(e){function t(){var e,n,r;nl(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=il(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,d=parseInt(s.paddingBottom,10)||0,p=i-u-d,h=a-l-c;(!t&&r.state.height!==p||!n&&r.state.width!==h)&&(r.setState({height:i-u-d,width:a-l-c}),o({height:i,width:a}))}},r._setRef=function(e){r._autoSizer=e},il(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,u),rl(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=fl(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),d("div",{className:n,ref:this._setRef,style:ol({},c,i)},!p&&t(u))}}]),t}();ml.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}};const gl="ListBoxInline",yl={listBoxHeader:"".concat(gl,"-listBoxHeader"),screenReaderOnly:"".concat(gl,"-screenReaderOnly")},bl=Ho(v)((e=>{var t,n;let{theme:r}=e;return{backgroundColor:null!==(t=null===(n=r.listBox)||void 0===n?void 0:n.backgroundColor)&&void 0!==t?t:r.palette.background.default,["& .".concat(yl.listBoxHeader)]:{alignSelf:"center",display:"inline-flex"},["& .".concat(yl.screenReaderOnly)]:{position:"absolute",height:0,width:0,overflow:"hidden"}}})),vl=Ho(E)((e=>{var t,n,r,o,i,a,s,l,c;let{theme:u}=e;return{color:null===(t=u.listBox)||void 0===t||null===(n=t.title)||void 0===n||null===(r=n.main)||void 0===r?void 0:r.color,fontSize:null===(o=u.listBox)||void 0===o||null===(i=o.title)||void 0===i||null===(a=i.main)||void 0===a?void 0:a.fontSize,fontFamily:null===(s=u.listBox)||void 0===s||null===(l=s.title)||void 0===l||null===(c=l.main)||void 0===c?void 0:c.fontFamily}}));function El(e){var o,i;let{options:a={}}=e;const{direction:s,frequencyMode:c,listLayout:u,checkboxes:d,search:f=!0,focusSearch:m=!1,toolbar:g=!0,rangeSelect:y=!0,model:b,selections:E,update:C,fetchStart:S,selectDisabled:L=(()=>!1),postProcessPages:w,calculatePagesHeight:O,showGray:R=!0,scrollState:I}=a,k=Fo(),q=l((()=>{b.lock("/qListObjectDef")}),[b]),_=l((()=>{b.unlock("/qListObjectDef")}),[b]),{translator:T,keyboardNavigation:A,themeApi:D}=p(ai);k.listBox=(e=>{const t=t=>e.getStyle("object","","listBox.".concat(t));return{backgroundColor:t("backgroundColor"),title:{main:{color:t("title.main.color"),fontSize:t("title.main.fontSize"),fontFamily:t("title.main.fontFamily")}},content:{color:t("content.color"),fontSize:t("content.fontSize"),fontFamily:t("content.fontFamily")}}})(D);const P=h(),[M,N]=(()=>{const[e,t]=n({}),r=l((e=>{t({current:e})}),[t]);return[e,r]})(),[z]=Li(b),[j,F]=n(!1),[B,H]=n(!1),[W,U]=n(!1),$=ga({setKeyboardActive:U}),G={enabled:A,active:W};if(r((()=>{const e=()=>{F(!0)},t=()=>{F(!1),"toggle"===f&&H(!1)};return E&&(E.isModal()||(E.on("deactivated",t),E.on("activated",e)),F(E.isActive())),()=>{E&&E.removeListener&&(E.removeListener("deactivated",e),E.removeListener("activated",t))}}),[E]),r((()=>{if(M&&M.current&&(f&&m||"toggle"===f&&B)){const e=M.current.querySelector("input");e&&e.focus()}}),[M&&M.current,B,f,m]),!b||!z||!T)return null;const V=!0===z.qListObject.qDimensionInfo.qLocked,K=g?ss({layout:z,model:b,translator:T}):[],Z=zs(z),X=(!0===f||"toggle"===f&&B)&&!L(),J=null!==(o=null===(i=z.layoutOptions)||void 0===i?void 0:i.dense)&&void 0!==o&&o,Y=49+(X?J?27:40:0)+(J?39:49),Q=()=>{H(!B)};return t.createElement(bl,{className:"listbox-container",container:!0,tabIndex:G.enabled&&!G.active?0:-1,direction:"column",gap:0,style:{height:"100%",minHeight:"".concat(Y,"px"),flexFlow:"column nowrap"},onKeyDown:$},g&&t.createElement(v,{item:!0,container:!0,style:{padding:k.spacing(1)}},t.createElement(v,{item:!0},V?t.createElement(x,{tabIndex:-1,onClick:_,disabled:!V,size:"large"},t.createElement($i,{title:T.get("Listbox.Unlock")})):"toggle"!==f||Z?t.createElement(x,{onClick:q,tabIndex:-1,disabled:!Z,size:"large"},t.createElement(Gi,null)):t.createElement(x,{onClick:Q,tabIndex:-1,title:T.get("Listbox.Search"),size:"large"},t.createElement(Is,null))),t.createElement(v,{item:!0,className:yl.listBoxHeader},t.createElement(vl,{variant:"h6",noWrap:!0},z.title||z.qListObject.qDimensionInfo.qFallbackTitle)),t.createElement(v,{item:!0,xs:!0}),t.createElement(v,{item:!0},t.createElement(Rs,{more:{enabled:!V,actions:K,alignTo:P,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:j,api:E,onConfirm:()=>{},onCancel:()=>{}}}))),t.createElement(v,{item:!0,container:!0,direction:"column",style:{height:"100%",minHeight:"".concat(Y,"px")},role:"region","aria-label":T.get("Listbox.ResultFilterLabel")},t.createElement(v,{item:!0,ref:N},t.createElement("div",{className:yl.screenReaderOnly},T.get("Listbox.Search.ScreenReaderInstructions")),t.createElement(Ts,{selections:E,model:b,dense:J,keyboard:G,visible:X,searchContainerRef:N})),t.createElement(v,{item:!0,xs:!0},t.createElement("div",{ref:P}),t.createElement("div",{className:yl.screenReaderOnly},T.get("Listbox.ScreenReaderInstructions")),t.createElement(ml,null,(e=>{let{height:n,width:r}=e;return t.createElement(ns,{model:b,selections:E,direction:s,listLayout:u,frequencyMode:c,rangeSelect:y,checkboxes:d,height:n,width:r,update:C,fetchStart:S,postProcessPages:w,calculatePagesHeight:O,selectDisabled:L,keyboard:G,showGray:R,scrollState:I})})))))}function Cl(e){let{app:o,fieldIdentifier:i,qId:a,stateName:s,element:l,options:c}=e;const{isExistingObject:u,hasExternalSelectionsApi:d}=function(e){let{qId:t,options:n}=e;return{isExistingObject:!(!t&&!n.sessionModel),hasExternalSelectionsApi:!!n.selectionsApi}}({qId:a,options:c}),[p,f]=n(0);r((()=>{if(p)throw new Error("Source or selection Api can not change after a listbox has been mounted");f(p+1)}),[u,d]);const m=u?function(e){let{app:t,qId:o,options:i={}}=e;const[a,s]=n(),[l]=Ei(),{sessionModel:c}=i,u=["dense","frequencyMode","checkboxes","histogram","title","stateName","listLayout"],d=Object.keys(i).filter((e=>u.includes(e)));if(d.length)throw new Error('Option "'.concat(d.join(", "),'" is not applicable for existing objects.'));return r((()=>{c?s(c):async function(){const e=l.get(o);if(e)s(e);else{const e=await t.getObject(o);l.set(e.id,e),s(e)}}()}),[]),a}({app:o,qId:a,options:c}):function(e){let{app:t,fieldIdentifier:o,stateName:i,options:a={}}=e;const[s,l]=n(""),[c,u]=n(!0),[d,p]=n();r((()=>{const e=a.histogram||"N"!==a.frequencyMode;o.qLibraryId&&e?async function(){try{const e=await t.getDimension(o.qLibraryId),n=await e.getLayout();l(n.qDim.qFieldDefs?n.qDim.qFieldDefs[0]:""),u(!1)}catch(e){throw u(!1),l({failedToFetchFieldDef:!0}),new Error("Disabling frequency count and histogram: ".concat(e&&e.message))}}():u(!1)}),[]);const{title:h,dense:f,checkboxes:m,properties:g={}}=a;let{frequencyMode:y,histogram:b=!1}=a;switch(s&&s.failedToFetchFieldDef&&(b=!1,y="N"),!0){case["none","N","NX_FREQUENCY_NONE"].includes(y):y="N";break;case["value","V","NX_FREQUENCY_VALUE","default"].includes(y):y="V";break;case["percent","P","NX_FREQUENCY_PERCENT"].includes(y):y="P";break;case["relative","R","NX_FREQUENCY_RELATIVE"].includes(y):y="R";break;default:y="N"}const v={qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:i,qShowAlternatives:!0,qFrequencyMode:b&&"N"===y?"V":y,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}]}},histogram:b,checkboxes:m,layoutOptions:{dense:f},title:h};let E;if(He(!0,v,g),o.qLibraryId?(v.qListObjectDef.qLibraryId=o.qLibraryId,E=o.qLibraryId):(v.qListObjectDef.qDef.qFieldDefs=[o],E=o),"N"!==y||b){const e=o.qLibraryId?s:E;v.frequencyMax={qValueExpression:"Max(AGGR(Count([".concat(e,"]), [").concat(e,"]))")}}const[C]=Oi(v,c?null:t,E,i);return r((()=>{C&&p(C)}),[C]),d}({app:o,fieldIdentifier:i,stateName:s,options:c}),g=h(l),y=d?c.selectionsApi:Ms(o,m,g)[0];if(!y||!m)return null;const b=B(B({},c),{},{selections:y,model:m});return t.createElement(El,{options:b})}function xl(e){let{element:n,app:r,fieldIdentifier:o,qId:i,stateName:a="$",options:s={}}=e;return f.createPortal(t.createElement(Cl,{app:r,element:n,fieldIdentifier:o,qId:i,stateName:a,options:s}),n)}const Sl=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function Ll(e){let[t,n]=e;return(t+(Math.random()*(n-t)|0)).toString(32)}function wl(){return Sl.map(Ll).join("")}function Ol(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function Rl(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 Il(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="string"==typeof e?(e=>({qDef:{qFieldDefs:[e]}}))(e):B(B({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||wl(),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),Ol(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)),r},removeDimension(e){const r=t.qDimensions.splice(e,1)[0];return Rl(t.qInterColumnSortOrder,e),n.dimensions.removed(r,o,e),r},addMeasure(e){const r="string"==typeof e?(e=>({qDef:{qDef:e}}))(e):B(B({},e),{},{qDef:e.qDef||{}});r.qDef.cId=r.qDef.cId||wl(),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),Ol(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];Rl(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 kl=(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},ql=(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]},_l=e=>0===Object.keys(e).length&&e.constructor===Object;var Tl={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}};const Al=2**53-1;function Dl(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function Pl(e,t){const n=He(!0,{},t,e);return kl(n,"qOtherTotalSpec.qOtherCounted")||ql(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),kl(n,"qOtherTotalSpec.qOtherLimit")||ql(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function Ml(e,t){return He(!0,{},t,e)}function Nl(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var zl={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach((t=>{e.qLayoutExclude.changed[t].to===kl(e,t)&&ql(e,t,e.qLayoutExclude.changed[t].from)}))},isMasterItemProperty:Dl,importCommonProperties:function(e,t,n){const r="masterobject"===kl(t,"properties.qInfo.qType")?"masterobject":kl(n,"qInfo.qType");ql(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:Pl,createDefaultMeasure:Ml,resolveValue:Nl,getHypercubePath:function(e){const t=kl(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?(Tl.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,Tl.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=He(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?ql(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||Dl(e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),o=He(!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=Nl(i.max,r.dimensions.length,Al),s=Nl(i.min,r.dimensions.length,0);return{maxDimensions:Nl(o.max,a,Al),minDimensions:Nl(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(Pl(a.dimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Pl(a.dimensions[s],i));else if(a.dimensions.length)for(s=0;s<a.dimensions.length;++s)o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Pl(a.dimensions[s],i));if(a.excludedDimensions.length)for(s=0;s<a.excludedDimensions.length;++s)o.qDimensions.length<r?o.qDimensions.push(Pl(a.excludedDimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Pl(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(Ml(a.measures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Ml(a.measures[s],i));else if(a.measures.length)for(s=0;s<a.measures.length;++s)o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Ml(a.measures[s],i));if(a.excludedMeasures.length)for(s=0;s<a.excludedMeasures.length;++s)o.qMeasures.length<r?o.qMeasures.push(Ml(a.excludedMeasures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Ml(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=kl(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=kl(t,r||"").qHyperCubeDef,o=[...e.qMeasures];e.qMeasures=[],o.forEach((r=>{e.qMeasures.push(r),n.measures.added(r,t)}))}}};var jl={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=kl(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();Tl.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&&(zl.restoreChangedProperties(o),delete o.qLayoutExclude.changed),o.qLayoutExclude.quarantine&&!_l(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=zl.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:i}),l=kl(n,i||"").qHyperCubeDef,c=kl(s,i||"").qHyperCubeDef,{maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:h}=zl.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:r}),{defaultDimension:f=zl.getDefaultDimension(),defaultMeasure:m=zl.getDefaultMeasure()}=o;return c.qDimensions.length=0,c.qMeasures.length=0,zl.shouldInitLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:h})&&zl.initLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:h,newHyperCubeDef:c}),zl.addDefaultDimensions({exportFormat:t,maxDimensions:u,minDimensions:d,newHyperCubeDef:c,defaultDimension:f}),zl.addDefaultMeasures({exportFormat:t,maxMeasures:p,minMeasures:h,newHyperCubeDef:c,defaultMeasure:m}),zl.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:c}),zl.copyPropertyIfExist("qMaxStackedCells",l,c),zl.copyPropertyIfExist("qNoOfLeftDims",l,c),zl.copyPropertyOrSetDefault("qInitialDataFetch",l,c,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),zl.copyPropertyOrSetDefault("qMode",l,c,"S"),zl.copyPropertyOrSetDefault("qReductionMode",l,c,"N"),zl.copyPropertyOrSetDefault("qSortbyYValue",l,c),zl.copyPropertyOrSetDefault("qIndentMode",l,c),zl.copyPropertyOrSetDefault("qShowTotalsAbove",l,c),zl.importCommonProperties(s,t,n),zl.updateDimensionsOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),zl.updateMeasuresOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),a.qProperty=s,a}(e)};const Fl=e=>kl(e,"data.targets.0.propertyPath"),Bl=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return jl.exportProperties})(Fl(e))},Hl=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return jl.importProperties})(Fl(e))},Wl=async e=>{let{halo:t,model:n,cellRef:r,newType:o}=e;const i=await n.getFullPropertyTree(),a=r.current.getQae(),s=Bl(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 Hl(c)({exportFormat:s({propertyTree:i,hypercubePath:zl.getHypercubePath(a)}),initialProperties:B({qInfo:{qType:o},visualization:o},kl(c,"properties.initial",{})),dataDefinition:kl(c,"data.targets.0.",{}),hypercubePath:zl.getHypercubePath(c)})},Ul={hypercube:jl};var $l=e=>Wi((e=>B(B({},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 Gl(e){let{d:n}=e;const r=Fo();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(E,{style:{lineHeight:"30px",paddingRight:r.spacing(1)}},t.createElement(P,null,n.missing||n.error?t.createElement($l,{style:a}):t.createElement(ia,{style:a})));return t.createElement(v,{item:!0,container:!0,alignItems:"center",wrap:"nowrap"},t.createElement(v,{item:!0},s),t.createElement(v,{container:!0,item:!0,zeroMinWidth:!0,wrap:"nowrap"},t.createElement(E,{noWrap:!0,component:"p"},t.createElement(E,{component:"span",variant:"subtitle2",color:o},n.description),t.createElement(E,{component:"span"}," "),t.createElement(E,{component:"span",variant:"subtitle2",color:n.error?"error":"inherit",style:{fontWeight:400}},n.label))))}function Vl(e){let{data:n}=e;const r=Fo();return t.createElement(v,{container:!0,item:!0,style:{maxWidth:"300px",overflow:"hidden"}},n.map(((e,n)=>{const o=e.descriptions.map(((e,n)=>t.createElement(Gl,{d:e,key:n})));return o.length>0&&t.createElement(v,{container:!0,item:!0,key:n,direction:"column",style:{paddingBottom:r.spacing(2)}},t.createElement(E,{noWrap:!0,key:n,variant:"subtitle1",align:"left",color:"textSecondary"},e.title),o)})))}function Kl(e){let{title:n="Error",message:r="",data:o=[]}=e;return t.createElement(v,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"}},t.createElement(v,{item:!0},t.createElement($l,{style:{fontSize:"38px"}})),t.createElement(v,{item:!0},t.createElement(E,{variant:"h6",align:"center","data-tid":"error-title"},n)),t.createElement(v,{item:!0},t.createElement(E,{variant:"subtitle1",align:"center","data-tid":"error-message"},r)),t.createElement(Vl,{data:o}))}const Zl=["size"],Xl="Progress",Jl={root:"".concat(Xl,"-root"),front:"".concat(Xl,"-front"),back:"".concat(Xl,"-back")},Yl=Ho("div")((e=>{let{theme:t}=e;return{["&.".concat(Jl.root)]:{position:"relative",display:"inline-block"},["& .".concat(Jl.front)]:{color:t.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},["& .".concat(Jl.back)]:{color:t.palette.divider}}})),Ql={small:16,medium:32,large:64,xlarge:128};function ec(e){let{size:n="medium"}=e,r=U(e,Zl);const o=Ql[n];return t.createElement(Yl,{className:Jl.root},t.createElement(M,W({variant:"determinate",value:100,className:Jl.back,size:o,thickness:3},r)),t.createElement(M,W({variant:"indeterminate",disableShrink:!0,className:Jl.front,size:o,thickness:3},r)))}const tc=["cancel","translator"],nc=["retry","translator"],rc={stripes:"".concat("LongRunningQuery","-stripes")},oc=Ho(v)((()=>({["& .".concat(rc.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 ic(e){let{cancel:n,translator:r}=e,o=U(e,tc);return t.createElement(t.Fragment,null,t.createElement(oc,{container:!0,item:!0,direction:"column",alignItems:"center",gap:2},t.createElement(v,{item:!0},t.createElement(ec,null)),t.createElement(v,{item:!0},t.createElement(E,{variant:"h6",align:"center","data-tid":"update-active"},r.get("Object.Update.Active")))),t.createElement(v,W({item:!0},o),t.createElement(A,{variant:"contained",onClick:n},r.get("Cancel"))))}function ac(e){let{retry:n,translator:r}=e,o=U(e,nc);return t.createElement(t.Fragment,null,t.createElement(v,{item:!0},t.createElement($l,{style:{fontSize:"38px"}})),t.createElement(v,{item:!0},t.createElement(E,{variant:"h6",align:"center","data-tid":"update-cancelled"},r.get("Object.Update.Cancelled"))),t.createElement(v,{item:!0},t.createElement(A,W({variant:"contained",onClick:n},o),r.get("Retry"))))}function sc(e){let{canCancel:n,canRetry:r,api:o}=e;const{translator:i}=p(ai);return t.createElement(v,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:rc.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},n&&t.createElement(ic,{cancel:o.cancel,translator:i,className:rc.cancel}),r&&t.createElement(ac,{retry:o.retry,translator:i,className:rc.retry}))}function lc(){return t.createElement(v,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},t.createElement(ec,{size:"large"}))}const cc="Header",uc={containerStyle:"".concat(cc,"-containerStyle"),containerTitleStyle:"".concat(cc,"-containerTitleStyle")},dc=Ho(v)((e=>{let{theme:t}=e;return{["&.".concat(uc.containerStyle)]:{flexGrow:0},["&.".concat(uc.containerTitleStyle)]:{paddingBottom:t.spacing(1)}}})),pc="njs-cell-title",hc="njs-cell-sub-title";function fc(e){let{layout:o,sn:i,anchorEl:a,hovering:s,focusHandler:l}=e;const c=o.showTitles&&!!o.title,u=o.showTitles&&!!o.subtitle,d=o.qSelectionInfo&&o.qSelectionInfo.qInSelections,[p,h]=n([]),[f,m]=Bi(),[g,y]=n(!1);r((()=>{i&&i.component&&i.component.isHooked&&i.component.observeActions((e=>{h([...e,...i&&i.selectionToolbar&&i.selectionToolbar.items||[]])}))}),[i]),r((()=>{if(!m)return;const{width:e}=m;y(e<221)}),[m]);const b=c||u,C=[uc.containerStyle,...b?[uc.containerTitleStyle]:[]],x=(s||d)&&(g||!b),S=b&&!x&&!g,L=t.createElement(Rs,{show:S,selections:{show:d,api:i.component.selections,onKeyDeactivate:l.refocusContent},actions:p,popover:{show:x,anchorEl:a},focusHandler:l});return t.createElement(dc,{ref:f,item:!0,container:!0,wrap:"nowrap",className:C.join(" ")},t.createElement(v,{item:!0,zeroMinWidth:!0,xs:!0},t.createElement(v,{container:!0,wrap:"nowrap",direction:"column"},c&&t.createElement(E,{variant:"h6",noWrap:!0,className:pc},o.title),u&&t.createElement(E,{variant:"body2",noWrap:!0,className:hc},o.subtitle))),t.createElement(v,{item:!0},L))}const mc={itemStyle:"".concat("Footer","-itemStyle")},gc=Ho(v)((e=>{let{theme:t}=e;return{["& .".concat(mc.itemStyle)]:{minWidth:0,paddingTop:t.spacing(1)}}})),yc="njs-cell-footer";function bc(e){let{layout:n}=e;return n&&n.showTitles&&n.footnote?t.createElement(gc,{container:!0},t.createElement(v,{item:!0,className:mc.itemStyle},t.createElement(E,{noWrap:!0,variant:"body2",className:yc},n.footnote))):null}class vc{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 Ec="njs-viz";function Cc(e){let{sn:o,snOptions:i,snPlugins:a,layout:s,appLayout:c,halo:u}=e;const{component:d}=o,{theme:h,language:f,constraints:m,keyboardNavigation:g}=p(ai),[y]=n((()=>new vc)),[b,v]=n(!1),[E,C]=n(0),[x,S,L]=Bi(),[w,O]=n(null),R=l((e=>{e&&O(e)}),[]);return r((()=>{if(w)return d.created({options:i}),d.mounted(w),v(!0),()=>{y.stop(),d.willUnmount()}}),[w,d]),r((()=>{b&&w&&S&&(!d.isHooked&&s&&s.qSelectionInfo&&s.qSelectionInfo.qInSelections||y.schedule((()=>{const e=[];return m.passive||e.push("passive"),m.active||e.push("interact"),m.select||e.push("select"),u.app&&u.app.session&&e.push("fetch"),Promise.resolve(d.render({layout:s,options:i,plugins:a,embed:u.public.nebbie,context:B({constraints:m,theme:u.public.theme,appLayout:c,keyboardNavigation:g},d.isHooked?{}:{logicalSize:o.logicalSize({layout:s}),localeInfo:(c||{}).qLocaleInfo,permissions:e})})).then((e=>{!1!==e&&(0===E&&"function"==typeof i.onInitialRender&&i.onInitialRender.call(null),C(E+1))}))})))}),[S,i,a,w,L,s,c,h,f,m,b,g]),t.createElement("div",{ref:x,"data-render-count":E,style:{position:"relative",height:"100%"},className:Ec},t.createElement("div",{ref:R,style:{position:"absolute",width:"100%",height:"100%"}}))}const xc={originalSize:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",stretchFit:"100% 100%",alwaysFill:"cover"},Sc={"top-left":"top left","top-center":"top center","top-right":"top right","center-left":"center left","center-center":"center center","center-right":"center right","bottom-left":"bottom left","bottom-center":"bottom center","bottom-right":"bottom right"};function Lc(e,t){return t?function(e){var t;let n,r,o,i;if(null!=e&&null!==(t=e.session)&&void 0!==t&&t.config)return n=e.session.config,r=new URL(n.url),i="wss:"===r.protocol,o=i?"https://":"http://",o+r.host}(e)+t:void 0}const wc=(e,t)=>{const n=null==e?void 0:e.bgImage;if(n){let i="";var r,o;if("media"===n.mode||"media"===e.useImage)i=null!=n&&null!==(r=n.mediaUrl)&&void 0!==r&&null!==(o=r.qStaticContentUrl)&&void 0!==o&&o.qUrl?decodeURIComponent(n.mediaUrl.qStaticContentUrl.qUrl):void 0,i=Lc(t,i);"expression"===n.mode&&(i=n.expressionUrl?decodeURIComponent(n.expressionUrl):void 0);const a=function(e){var t;let n="center center";return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.position&&(n=Sc[e.bgImage.position]),n}(e),s=function(e){var t;let n=xc.originalSize;return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.sizing&&(n=xc[e.bgImage.sizing]),n}(e);return i?{url:i,pos:a,size:s}:void 0}},Oc=(e,t)=>{const n=null==e?void 0:e.bgColor;if(n&&t)return n.useExpression?t.validateColor(n.colorExpression):n.color&&"none"!==n.color.color?t.getColorPickerColor(n.color,!0):void 0},Rc="njs-cell",Ic=(e,t)=>{switch(t.type){case"LOADING":return B(B({},e),{},{loading:!0});case"LOADED":return B(B({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return B(B({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return B(B({},e),{},{longRunningQuery:!0});case"ERROR":return B(B({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error("Unhandled type: ".concat(t.type))}};function kc(e){let{delay:o=750}=e;const[i,a]=n(!1);return r((()=>{const e=setTimeout((()=>a(!0)),o);return()=>clearTimeout(e)}),[]),i?t.createElement(lc,null):null}const qc=e=>!e.qError||7005===e.qError.qErrorCode,_c=(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}})),Tc=e=>e&&(Array.isArray(e)?e:[e])||[],Ac=(e,t,n,r)=>{const o=r.dimensions.min(),i=r.measures.min(),a=r.resolveLayout(t);return{reqDimErrors:_c(o,Tc(a.qDimensionInfo),(e=>r.dimensions.description(n,e)),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),reqMeasErrors:_c(i,Tc(a.qMeasureInfo),(e=>r.measures.description(n,e)),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"))}},Dc=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],d=u.dimensions.min(),p=u.measures.min(),h=u.resolveLayout(n),f=Tc(h.qDimensionInfo).filter(qc),m=Tc(h.qMeasureInfo).filter(qc);if(o+=d,i+=p,(f.length<d||m.length<p)&&(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=[],d=[];let p=null;for(let n=0;n<o.length;++n){const a=o[n];if(!l&&i){const n=p||await r.getProperties();p=n;const o=Ac(e,t,n,a);u.push(...o.reqDimErrors),d.push(...o.reqMeasErrors)}}const h=u.filter((e=>!(e.missing||e.error))).length,f=e.get("Visualization.Incomplete.Dimensions",[h,a]),m=d.filter((e=>!(e.missing||e.error))).length,g=e.get("Visualization.Incomplete.Measures",[m,s]),y=[{title:f,descriptions:[...u]},{title:g,descriptions:[...d]}],b=l?c:y;return[l||i,{title:l?c[0].title:e.get("Visualization.Incomplete"),data:b}]},Pc=i(((e,i)=>{let{halo:a,model:l,initialSnOptions:c,initialSnPlugins:u,initialError:d,onMount:f,currentId:m}=e;const{app:g,types:y}=a,{nebbie:b}=a.public,{disableCellPadding:E=!1}=a.context||{},{theme:C,translator:x,language:S,keyboardNavigation:L}=p(ai),w=Fo(),[O,R,I]=Bi(),[k,q]=o(Ic,{loading:!1,loaded:!1,longRunningQuery:!1,error:(_=d)?{title:_.message}:null,sn:null,visualization:null});var _;const[T,{validating:A,canCancel:D,canRetry:P},M]=Li(l),[z]=wi(g),[j,F,H]=Bi(),[W,U]=n(c),[$,G]=n(u),V="njs-cell-".concat(m),[K]=Ms(g,l,["#".concat(V),".njs-action-toolbar-popover"]),[Z,X]=n(!1),J=h({enter:null,leave:null}),[Y,Q]=n(void 0),[ee,te]=n(void 0),ne=h({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});r((()=>{As(ne.current)}),[]),r((()=>{const e=null!=T&&T.components?T.components.find((e=>"general"===e.key)):null;Q(Oc(e,a.public.theme)),te(wc(e,a.app))}),[T,a.public.theme,a.app,C]),ne.current.blurCallback=e=>{a.root.toggleFocusOfCells(),e&&H&&H.focus()},ne.current.refocusContent=()=>{k.sn.component&&"function"==typeof k.sn.component.focus&&k.sn.component.focus()};r((()=>{if(d||!z||!T)return;if(k.visualization===T.visualization&&k.sn)return void(async e=>{const[t,n]=await Dc(x,T,e.generator.qae.data,l);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:k.sn,layout:T,model:l})})(k.sn);const e=y.getSupportedVersion(T.visualization,T.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:l,app:g,selections:K,nebbie:b,focusHandler:ne.current});n&&(q({type:"LOADED",sn:n,visualization:e}),f())})(T.visualization,e),()=>{};q({type:"ERROR",error:{title:"Could not find a version of '".concat(T.visualization,"' that supports current object version. Did you forget to register ").concat(T.visualization,"?")}})}),[y,k.sn,l,K,T,z,S]),r((()=>{if(!A)return;const e=setTimeout((()=>q({type:"LONG_RUNNING_QUERY"})),2e3);return()=>clearTimeout(e)}),[A]),s(i,(()=>({getQae:()=>k.sn.generator.qae,toggleFocus(e){"function"==typeof k.sn.component.focus&&(e?k.sn.component.focus():k.sn.component.blur())},setSnOptions:U,setSnPlugins:G,async takeSnapshot(){const{width:e,height:t}=R;let n=JSON.parse(JSON.stringify(T));return"function"==typeof k.sn.component.setSnapshotData&&(n=await k.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:x.language(),theme:w.name,appLayout:z,size:{width:Math.round(e),height:Math.round(t)}},layout:n}},async exportImage(){if("function"!=typeof a.config.snapshot.capture)throw new Error("Stardust embed has not been configured with snapshot.capture callback");const e=await this.takeSnapshot();return a.config.snapshot.capture(e)}})),[k.sn,F,R,T,w.name,z]);let re=null;return k.loading&&!k.longRunningQuery?re=t.createElement(kc,null):k.error?re=t.createElement(Kl,k.error):k.loaded&&(re=t.createElement(Cc,{key:T.visualization,sn:k.sn,halo:a,snOptions:W,snPlugins:$,layout:T,appLayout:z})),t.createElement(N,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:Y||"unset",backgroundImage:ee&&ee.url?"url(".concat(ee.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:ee&&ee.size,backgroundPosition:ee&&ee.pos},elevation:0,square:!0,className:Rc,ref:O,id:V,onMouseEnter:()=>{J.current.leave&&clearTimeout(J.current.leave),J.enter||(J.current.enter=setTimeout((()=>{X(!0),J.current.enter=null}),250))},onMouseLeave:()=>{J.current.enter&&clearTimeout(J.current.enter),J.current.leave||(J.current.leave=setTimeout((()=>{X(!1),J.current.leave=null}),750))}},t.createElement(v,{container:!0,direction:"column",gap:0,style:B(B({position:"relative",width:"100%",height:"100%"},E?{}:{padding:w.spacing(1)}),k.longRunningQuery?{opacity:"0.3"}:{})},I&&T&&k.sn&&t.createElement(fc,{layout:T,sn:k.sn,anchorEl:I,hovering:Z,focusHandler:ne.current}," "),t.createElement(v,{tabIndex:L?0:-1,onKeyDown:L?e=>{["Enter"," ","Spacebar"].includes(e.key)&&a.root.toggleFocusOfCells(m)}:null,item:!0,xs:!0,style:{height:"100%"},ref:j},re),t.createElement(bc,{layout:T})),k.longRunningQuery&&t.createElement(sc,{canCancel:D,canRetry:P,api:M}))}));function Mc(e){let{halo:n,element:r,model:o,initialSnOptions:i,initialSnPlugins:a,onMount:s,initialError:l}=e;const{root:c}=n,u=t.createRef(),d=wl(),p=f.createPortal(t.createElement(Pc,{ref:u,halo:n,model:o,currentId:d,initialSnOptions:i,initialSnPlugins:a,initialError:l,onMount:s}),r,o.id),h=()=>{c.remove(p),o.removeListener("closed",h)};return o.on("closed",h),c.add(p),c.addCell(d,u),[h,u]}function Nc(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function zc(e,t){return Nc(e)&&Nc(t)?JSON.stringify(e)===JSON.stringify(t):!Array.isArray(e)&&!Array.isArray(t)&&e===t}function jc(){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)?zc(i,n[o])||r.push({qPath:e+o,qOp:"add",qValue:JSON.stringify(t[o])}):r.push(...jc("".concat(e).concat(o,"/"),t[o],n[o]))})),r}function Fc(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 Bc=()=>{};function Hc(){let{model:e,halo:t,initialError:n,onDestroy:r=(async()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=Bc,i=null,a=null,s=null;const l=new Promise((e=>{s=e}));let c={},u=[];const d=async e=>{a?(async()=>{await l,i.current.setSnOptions(B(B({},c),e))})():c=B(B({},c),e)},p=async e=>{Fc(e),a?(async()=>{await l,i.current.setSnPlugins(e)})():u=e},h={id:e.id,model:e,async destroy(){await r(),o(),o=Bc},async convertTo(n){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=await Wl({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]=Mc({halo:t,element:r,model:e,initialSnOptions:c,initialSnPlugins:u,initialError:n,onMount:s}),l},async applyProperties(t){const n=jc("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){d(e)},plugins(e){p(e)},exportImage:()=>i.current.exportImage(),takeSnapshot:()=>i.current.takeSnapshot(),getModel:()=>e}};return h}async function Wc(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:async()=>{};const i=Hc({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 Uc(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&&Il({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 d=await t.app.createSessionObject(u);Ci.set(d.id,d);const p=(e=>{const t=vi({type:"SET",value:e});return()=>{t(),Ci.clear(e.id)}})(d);return Wc(d,{options:s,plugins:l,element:c},t,n,(async()=>{await t.app.destroySessionObject(d.id),p()}))}const $c="njs-sheet";function Gc(e){let{model:o,halo:i,initialSnOptions:s,initialSnPlugins:l,initialError:c,onMount:u}=e;const{root:d}=i,[h]=Li(o),{theme:f}=p(ai),[m,g]=n([]),[y,b]=n(void 0),[v,E]=n(void 0),[C,x]=n("");r((()=>{if(h){const e=JSON.stringify(h.cells);if(e===C)return;x(e);const n=async()=>{m.forEach((e=>{d.removeCell(e.currentId)}));const e=h.cells,n=await Promise.all(e.map((async e=>{let n;const r=new Promise((e=>{n=e})),o=m.find((t=>t.id===e.name));if(o)return o.bounds=e.bounds,delete o.mountedPromise,o;const a=await async function(e,t){let{id:n,options:r,plugins:o,element:i}=e;const a="".concat(n);let s=mi.get(a);s||(s=t.app.getObject(n),mi.set(a,s));const l=await s;return Ci.set(a,l),Wc(l,{options:r,plugins:o,element:i},t)}({id:e.name},i);return{model:a.model,id:e.name,bounds:e.bounds,cellRef:t.createRef(),currentId:wl(),mounted:n,mountedPromise:r}})));n.forEach((e=>d.addCell(e.currentId,e.cellRef))),g(n)};n()}}),[h]);const S=a((()=>m?m.map((e=>function(e,n,r,o,i,a){const{x:s,y:l,width:c,height:u}=e.bounds;return t.createElement("div",{style:{left:"".concat(s,"%"),top:"".concat(l,"%"),width:"".concat(c,"%"),height:"".concat(u,"%"),position:"absolute"}},t.createElement(Pc,{ref:e.cellRef,halo:n,model:e.model,currentId:e.currentId,initialSnOptions:r,initialSnPlugins:o,initialError:i,onMount:a}))}(e,i,s,l,c,e.mounted))):[]),[m]);r((()=>{const e=null!=h&&h.components?h.components.find((e=>"general"===e.key)):null;b(Oc(e,i.public.theme)),E(wc(e,i.app))}),[h,i.public.theme,i.app,f]);const L=!h||Number.isNaN(h.height)?"100%":"".concat(Number(h.height),"%"),w=m.map((e=>e.mountedPromise)),O=w.filter((e=>!!e));return O.length&&Promise.all(w).then((()=>{u()})),t.createElement("div",{className:$c,style:{width:"100%",height:L,position:"relative",backgroundColor:y,backgroundImage:v&&v.url?"url(".concat(v.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:v&&v.size,backgroundPosition:v&&v.pos}},S)}function Vc(e){let{halo:n,element:r,model:o,initialSnOptions:i,initialSnPlugins:a,onMount:s,initialError:l}=e;const{root:c}=n,u=t.createRef(),d=f.createPortal(t.createElement(Gc,{ref:u,halo:n,model:o,initialSnOptions:i,initialSnPlugins:a,initialError:l,onMount:s}),r,o.id),p=()=>{c.remove(d),o.removeListener("closed",p)};return o.on("closed",p),c.add(d),[p,u]}const Kc=()=>{};function Zc(){let{model:e,halo:t,initialError:n,onDestroy:r=(async()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=Kc,i=null,a=null,s=null;const l=new Promise((e=>{s=e}));let c={},u=[];const d=async e=>{a?(async()=>{await l,i.current.setSnOptions(B(B({},c),e))})():c=B(B({},c),e)},p=async e=>{Fc(e),a?(async()=>{await l,i.current.setSnPlugins(e)})():u=e},h={id:e.id,model:e,async destroy(){await r(),o(),o=Kc},__DO_NOT_USE__:{mount(r){if(a)throw new Error("Already mounted");return a=r,[o,i]=Vc({halo:t,element:r,model:e,initialSnOptions:c,initialSnPlugins:u,initialError:n,onMount:s}),l},async applyProperties(t){const n=jc("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){d(e)},plugins(e){p(e)},exportImage(){throw new Error("Not implemented")},takeSnapshot(){throw new Error("Not implemented")},getModel:()=>e}};return h}async function Xc(e,t){let{id:n,options:r,plugins:o,element:i}=e;const a="".concat(n);let s=mi.get(a);s||(s=t.app.getObject(n),mi.set(a,s));const l=await s;return Ci.set(a,l),"sheet"===l.genericType?async function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:async()=>{};const i=Zc({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}(l,{options:r,plugins:o,element:i},t):Wc(l,{options:r,plugins:o,element:i},t)}function Jc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{isEnabled:t=>!0===e[t]}}const Yc=He.bind(null,!0),Qc={},{isArray:eu}=Array;function tu(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function nu(e){return void 0===e}function ru(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function ou(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]=nu(e[r||t])?i:e[t],e=e[r||t]})),e}function iu(e,t){let n=!0;if(tu(e)&&tu(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{iu(e[r],t[r])||(n=!1)})),n);if(eu(e)&&eu(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!iu(e[n],t[n]))return!1;return!0}return e===t}Qc.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Yc({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);iu(i,a)||ru(t,o)||(nu(a)?r.push({op:"add",path:s,value:i}):tu(i)&&tu(a)?r=r.concat(Qc.generate(a,i,s)):eu(i)&&eu(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]&&nu(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(iu(t,o))return r;if(!nu(t[0])&&nu(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(Qc.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=>{nu(t[o])&&!ru(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},Qc.apply=function(e,t){t.forEach((t=>{let n=ou(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(eu(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(eu(o)&&eu(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(tu(o)&&tu(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!ru(a,e)&&delete a[e]})),Yc(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=ou(e,t.from);eu(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(eu(n)?n.splice(+r,1):delete n[r]);var a}))},Qc.clone=function(e){return Yc({},e)},Qc.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},Qc.updateObject=function(e,t){Object.keys(e).length?Qc.apply(e,Qc.generate(e,t)):Yc(e,t)};const au=e=>t=>{const n=(r=B(B({},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(Y.prototype).forEach((e=>{r[e]=Y.prototype[e]})),Y.init(r),r);var r;return n};let su,lu;function cu(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 uu(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:[],menus:[],actions:{list:[]},pendingEffects:[],pendingLayoutEffects:[],pendingPromises:[],resizer:{setters:[],explicitResize:t},accessibility:{setter:null}}}function du(e){hu(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 pu(e){if(e.__hooks.obsolete)return Promise.resolve();lu=-1,su=e,su.__hooks.initiated&&su.__hooks.list.length;try{su.fn.call(null)}catch(e){console.error(e)}su.__hooks.initiated=!0;const t=su.__hooks;return yu(su),lu=void 0,su=void 0,t.chain.promise||(t.chain.promise=new Promise((e=>{t.chain.resolve=e}))),function(e){hu(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame((()=>{!function(e){hu(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 hu(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 fu(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 mu(e,t,n){try{return Promise.all(e.__hooks.menus.map((e=>Promise.resolve(e.fn(t,n))))).then((e=>e[e.length-1]))}catch(e){console.error(e)}return Promise.resolve()}function gu(e){return e.__hooks.imperativeHandle}function yu(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function bu(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,yu(e))}function vu(e){if(void 0===su)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=su.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function Eu(e){vu(++lu);return su.context[e]}function Cu(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function xu(e){return{__hooked:!0,fn:e,initiate:uu,run:pu,teardown:du,runSnaps:fu,runMenu:mu,focus:Xu,blur:Ju,observeActions:bu,getImperativeHandle:gu,updateRectOnNextRun:Cu}}function Su(e){const t=vu(++lu);if(!t.value){t.component=su;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,pu(r)}),0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function Lu(e,t){const n=vu(++lu);cu(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===su.__hooks.pendingEffects.indexOf(n)&&su.__hooks.pendingEffects.push(n))}function wu(e,t){const n=vu(++lu);cu(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],su.__hooks.pendingLayoutEffects.push(n))}function Ou(e,t){const n=vu(++lu);return cu(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function Ru(e,t){const[n,r]=Su((()=>({resolved:void 0,rejected:void 0,state:"pending"}))),o=vu(++lu);return o.component||(o.component=su),wu((()=>{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 Iu(){return Eu("element")}function ku(){const e=Iu(),t=su.__hooks.resizer,[n,r]=Su((()=>{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()),wu((()=>{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 qu(){return Eu("layout")}function _u(){const e=Eu("layout"),[t]=Su({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current}function Tu(){return Eu("appLayout")}function Au(){const e=Eu("model");return e&&e.session?e:void 0}function Du(){const e=Eu("app");return e&&e.session?e:void 0}function Pu(){const e=Eu("global");return e&&e.session?e:void 0}function Mu(){return Eu("selections")}function Nu(){return Eu("theme")}function zu(){return Eu("nebbie")}function ju(){return Eu("translator")}function Fu(){return Eu("deviceType")}function Bu(){return Eu("plugins")}function Hu(e,t){const[n]=Su({action(){n._config.action.call(null)}});return n.component||(n.component=su,su.__hooks.actions.list.push(n)),Ou((()=>{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 Wu(){return Eu("constraints")}function Uu(){return Eu("options")}function $u(e,t){const n=vu(++lu);if(n.imperative||(n.imperative=!0),cu(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],su.__hooks.imperativeHandle=r}}function Gu(e){const t=vu(++lu);t.value||(t.value=1,su.__hooks.snaps.push(t)),t.fn=e}function Vu(e){const t=vu(++lu);t.value||(t.value=1,su.__hooks.menus.push(t)),t.fn=e}function Ku(){vu(++lu);const e=su.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}}function Zu(){const e=Eu("keyboardNavigation"),t=Eu("focusHandler");if(!su.__hooks.accessibility.exitFunction){const e=function(e){const n=this.__hooks.accessibility;n.enabled&&n.active&&(Ju(this),t&&t.blurCallback&&t.blurCallback(e))}.bind(su);su.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),Xu(this))}.bind(su);su.__hooks.accessibility.focusFunction=n;const r=function(e){this.__hooks.accessibility.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind(su);su.__hooks.accessibility.focusSelectionFunction=r}const n=su.__hooks.accessibility.focusFunction,r=su.__hooks.accessibility.exitFunction,o=su.__hooks.accessibility.focusSelectionFunction,[i,a]=Su({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return su.__hooks.accessibility.setter=a,su.__hooks.accessibility.enabled=e,Lu((()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o})),[e]),i}function Xu(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 Ju(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 Yu={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},Qu=Object.keys(Yu);function ed(e,t){const n=B({},Yu);var r;r=n,Object.keys(Y.prototype).forEach((e=>{r[e]=Y.prototype[e]})),Y.init(r);const o={emit(){n.emit(...arguments)}};Object.keys(e.component||{}).forEach((t=>{-1!==Qu.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=au(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 td(e,t,n){"function"==typeof e.component&&(e.component=xu(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(B(B({},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)},onContextMenu(t,n){return e.component.runMenu(this,t,n)},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):ed(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=Qc.clone(o),a=n.map((e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath})));Qc.apply(o,a),e.qae.properties.onChange.call({model:t.model},o);const s=Qc.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 nd=()=>{};function rd(e,t){return void 0===e?()=>t:()=>e}function od(e){const t=e||{};return{min:"function"==typeof t.min?t.min:rd(t.min,0),max:"function"==typeof t.max?t.max:rd(t.max,1e3),added:t.added||t.add||nd,description:t.description||nd,moved:t.moved||t.move||nd,removed:t.removed||t.remove||nd,replaced:t.replaced||t.replace||nd,isDefined:()=>!!e}}function id(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:od(e.dimensions),measures:od(e.measures)}}function ad(){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(id)},exportProperties:t.exportProperties,importProperties:t.importProperties};return r}function sd(e,t){let n;n="function"==typeof e?e(t):e;const r={qae:ad(n.qae),component:n.component||{},create:e=>td(r,e,t),definition:{}};return Object.keys(n).forEach((e=>{r[e]||(r.definition[e]=n[e])})),r}var ld={},cd={get exports(){return ld},set exports(e){ld=e}};!function(e,t){var n;t=cd.exports=d,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 d)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 d(e,t)}catch(e){return null}}function d(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof d){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 d))return new d(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=d,d.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},d.prototype.toString=function(){return this.version},d.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof d||(e=new d(e,this.options)),this.compareMain(e)||this.comparePre(e)},d.prototype.compareMain=function(e){return e instanceof d||(e=new d(e,this.options)),h(this.major,e.major)||h(this.minor,e.minor)||h(this.patch,e.patch)},d.prototype.comparePre=function(e){if(e instanceof d||(e=new d(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)},d.prototype.compareBuild=function(e){e instanceof d||(e=new d(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)},d.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 d(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 p=/^[0-9]+$/;function h(e,t){var n=p.test(e),r=p.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 d(e,n).compare(new d(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 C(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 x(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof x){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof x))return new x(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 d(e,t).major},t.minor=function(e,t){return new d(e,t).minor},t.patch=function(e,t){return new d(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 d(e,n),o=new d(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=C,t.Comparator=x;var S={};function L(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof L)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new L(e.raw,t);if(e instanceof x)return new L(e.value,t);if(!(this instanceof L))return new L(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 w(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 O(e){return!e||"x"===e.toLowerCase()||"*"===e}function R(e,t,n,r,o,i,a,s,l,c,u,d,p){return((t=O(n)?"":O(r)?">="+n+".0.0":O(o)?">="+n+"."+r+".0":">="+t)+" "+(s=O(l)?"":O(c)?"<"+(+l+1)+".0.0":O(u)?"<"+l+"."+(+c+1)+".0":d?"<="+l+"."+c+"."+u+"-"+d:"<="+s)).trim()}function I(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 k(e,t,n){try{t=new L(t,n)}catch(e){return!1}return t.test(e)}function q(e,t,n,r){var o,i,a,s,l;switch(e=new d(e,r),t=new L(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(k(e,t,r))return!1;for(var c=0;c<t.set.length;++c){var u=t.set[c],p=null,h=null;if(u.forEach((function(e){e.semver===S&&(e=new x(">=0.0.0")),p=p||e,h=h||e,o(e.semver,p.semver,r)?p=e:a(e.semver,h.semver,r)&&(h=e)})),p.operator===s||p.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}x.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 d(n[2],this.options.loose):this.semver=S},x.prototype.toString=function(){return this.value},x.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 d(e,this.options)}catch(e){return!1}return C(e,this.operator,this.semver,this.options)},x.prototype.intersects=function(e,t){if(!(e instanceof x))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 L(e.value,t),k(this.value,n,t));if(""===e.operator)return""===e.value||(n=new L(this.value,t),k(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=C(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=C(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||o||i&&a||s||l},t.Range=L,L.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},L.prototype.toString=function(){return this.range},L.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,R),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),O(r)?s="":O(o)?s=">="+r+".0.0 <"+(+r+1)+".0.0":O(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),O(r)?s="":O(o)?s=">="+r+".0.0 <"+(+r+1)+".0.0":O(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=O(i),u=c||O(a),d=u||O(s),p=d;return"="===o&&p&&(o=""),l=t.includePrerelease?"-0":"",c?r=">"===o||"<"===o?"<0.0.0-0":"*":o&&p?(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:d&&(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 x(e,this.options)}),this)},L.prototype.intersects=function(e,t){if(!(e instanceof L))throw new TypeError("a Range is required");return this.set.some((function(n){return w(n,t)&&e.set.some((function(e){return w(e,t)&&n.every((function(n){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new L(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},L.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(I(this.set[t],e,this.options))return!0;return!1},t.satisfies=k,t.maxSatisfying=function(e,t,n){var r=null,o=null;try{var i=new L(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&-1!==o.compare(e)||(o=new d(r=e,n)))})),r},t.minSatisfying=function(e,t,n){var r=null,o=null;try{var i=new L(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&1!==o.compare(e)||(o=new d(r=e,n)))})),r},t.minVersion=function(e,t){e=new L(e,t);var n=new d("0.0.0");if(e.test(n))return n;if(n=new d("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 d(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 L(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return q(e,t,"<",n)},t.gtr=function(e,t,n){return q(e,t,">",n)},t.outside=q,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 L(e,n),t=new L(t,n),e.intersects(t)},t.coerce=function(e,t){if(e instanceof d)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)}}(0,ld);const ud={};async function dd(e,t,n,r){let{config:o}=n;const i="".concat(e,"__").concat(t);if(!ud[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);ud[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 ud[i]}function pd(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)||ld.satisfies(e,i.deps.properties),supernova:()=>dd(a.name,a.version,t,o.load).then((e=>(n=n||sd(e,t.public.galaxy),r=JSON.stringify(n.qae.properties.initial),n))),initialProperties(e){return this.supernova().then((()=>B(B({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=>{var t;r||(t=Object.keys(n),r=[...t.filter((e=>"undefined"===e)),...t.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(".")))]);for(let t=r.length-1;t>=0;t--){if(n[r[t]].supportsPropertiesVersion(e))return r[t]}return null},versions:n}}function hd(e){let{halo:t,parent:n}=e;const r={},o=n||{get:()=>{}};return{register:(e,n)=>{r[e.name]||(r[e.name]=pd(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(ud).forEach((t=>{t.split("__")[0]===e&&(ud[t]=void 0)}))}(e)}}}const fd=["__DO_NOT_USE__"],md=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return B(B({},e),t)},gd=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))},yd=(e,t)=>({context:md(e.context,t.context),load:t.load||e.load,snapshot:B({},t.snapshot||e.snapshot),types:gd(e.types,t.types),themes:gd(e.themes,t.themes),flags:md(e.flags,t.flags),anything:md(e.anything,t.anything)}),bd=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{__DO_NOT_USE__:t={}}=e,n=U(e,fd),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=B(B(B({},n),r),t);return o};var vd=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Z(t.context.language);function r(e,o){if(o)return r.createConfiguration(o)(e);let i=B(B({},t.context),{},{translator:n.translator});const[a]=Fi({app:e,context:i}),s=at({themes:t.themes,root:a});i.themeApi=s.externalAPI;const l={galaxy:{translator:n.translator,flags:Jc(t.flags),deviceType:st(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=hd({halo:c});t.types.forEach((e=>u.register({name:e.name,version:e.version},{meta:e.meta,load:e.load})));let d=s.setTheme(t.context.theme),p=null,h=null;const f={render:async e=>(await d,e.id?Xc(e,c):Uc(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=B(B(B({},i),t),{},{translator:n.translator}),c.context=i,t.theme&&(d=s.setTheme(t.theme),await d),t.language&&c.public.translator.language(t.language),a.context(i))},selections:async()=>(p||(p={mount(t){h||(h=tl({element:t,app:e}),a.add(h))},unmount(){h&&(a.remove(h),h=null)}}),p),field:async t=>{let n;const r="string"==typeof t?t:t.qLibraryId;if(t.qId)n=t.qId;else if(!r)throw new Error("Field identifier or object id must be provided");const o={fieldName:r,mount(o){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!o)throw new Error("Element for ".concat(r||n," not provided"));if(this._instance)throw new Error("Field or object ".concat(r||n," already mounted"));this._instance=xl({element:o,app:e,fieldIdentifier:t,qId:n,options:bd(i),stateName:i.stateName||"$"}),a.add(this._instance)},unmount(){this._instance&&(a.remove(this._instance),this._instance=null)}};return o},getRegisteredTypes:u.getList,__DO_NOT_USE__:{types:u}};return c.public.nebbie=f,c.types=u,f}return r.createConfiguration=n=>e(yd(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()))}});function Ed(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - ".concat(+Date.now())})}}const Cd=globalThis.crypto||{getRandomValues:()=>123456};function xd(){return e=>{const t=He({},e);t.qInfo=t.qInfo||{},t.qInfo.qId=t.qInfo.qId||"mock-".concat(([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^Cd.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))));const n=t._mock;let r=t;return n&&(delete t._mock,r=He({},t,n)),Promise.resolve(B({on:()=>{},once:()=>{},getLayout:()=>Promise.resolve(r),getProperties:()=>Promise.resolve(t),getEffectiveProperties:()=>Promise.resolve(t),id:t.qInfo.qId},t))}}const Sd=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},Ld=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=Sd(e,{defaultValue:t,args:i});return n?new Promise((e=>{setTimeout((()=>e(s)),r)})):s}},wd=["id","session"],Od=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function Rd(e){return!Od.includes(e)}function Id(e){const t=Sd(e.getLayout);return t.qInfo&&t.qInfo.qId}function kd(e,t){return e.reduce(((e,n)=>B(B({},e),function(e,t){let n=Id(e);const{delay:r}=t,{id:o,session:i}=e,a=U(e,wd);if(o&&n&&o!==n)throw new Error("Generic object has multiple IDs, qInfo.qId: ".concat(n,", id: ").concat(o));return n=n||o||"object - ".concat(+Date.now()),{[n]:B(B({id:n,session:Sd(i,{defaultValue:!0}),on:()=>{},once:()=>{}},Object.entries(a).reduce(((e,t)=>{let[n,o]=t;return B(B({},e),{},{[n]:Ld(o,{async:Rd(n),delay:r})})}),{})),{},{genericType:e.type})}}(n,t))),{})}function qd(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!Id(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function _d(){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(qd);const n=kd(e,t);return async e=>Promise.resolve(n[e])}function Td(){return()=>Promise.resolve({id:"app-layout"})}const Ad={fromGenericObjects(e){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new Ed,r=new xd,o=new _d(e,t),i=new Td,a={id:"app - ".concat(+Date.now()),session:n,createSessionObject:r,getObject:o,getAppLayout:i};return Promise.resolve(a)}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},Dd={generator:sd,hook:xu,theme:ot,locale:V};export{Ad as EnigmaMocker,Dd as __DO_NOT_USE__,Ul as conversion,vd as embed,Vu as onContextMenu,Gu as onTakeSnapshot,Hu as useAction,Du as useApp,Tu as useAppLayout,Wu as useConstraints,Fu as useDeviceType,Lu as useEffect,Iu as useElement,zu as useEmbed,Pu as useGlobal,$u as useImperativeHandle,Zu as useKeyboard,qu as useLayout,Ou as useMemo,Au as useModel,Uu as useOptions,Bu as usePlugins,Ru as usePromise,ku as useRect,Ku as useRenderState,Mu as useSelections,_u as useStaleLayout,Su as useState,Nu as useTheme,ju as useTranslator};
|
|
12
|
+
*/function Nn(){return Nn=Object.assign?Object.assign.bind():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},Nn.apply(this,arguments)}function zn(e,t){return t?dt(e,t,{clone:!1}):e}const jn={xs:0,sm:600,md:900,lg:1200,xl:1536},Fn={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${jn[e]}px)`};function Bn(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||Fn;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||Fn;return Object.keys(t).reduce(((r,o)=>{if(-1!==Object.keys(e.values||jn).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r}),{})}return n(t)}function Hn(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function Wn(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:Hn(e,n)||r,t&&(o=t(o,r,e)),o}function Un(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=Hn(e.theme,r)||{};return Bn(e,i,(e=>{let r=Wn(a,o,e);return e===r&&"string"==typeof e&&(r=Wn(a,o,`${t}${"default"===e?"":ht(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes={},i.filterProps=[t],i}function $n(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?zn(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}const Gn={m:"margin",p:"padding"},Vn={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Kn={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Zn=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!Kn[e])return[e];e=Kn[e]}const[t,n]=e.split(""),r=Gn[t],o=Vn[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),Xn=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Jn=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function Yn(e,t,n,r){var o;const i=null!=(o=Hn(e,t,!1))?o:n;return"number"==typeof i?e=>"string"==typeof e?e:i*e:Array.isArray(i)?e=>"string"==typeof e?e:i[e]:"function"==typeof i?i:()=>{}}function Qn(e){return Yn(e,"spacing",8)}function er(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function tr(e,t,n,r){if(-1===t.indexOf(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=er(t,n),e)),{})}(Zn(n),r);return Bn(e,e[n],o)}function nr(e,t){const n=Qn(e.theme);return Object.keys(e).map((r=>tr(e,t,r,n))).reduce(zn,{})}function rr(e){return nr(e,Xn)}function or(e){return nr(e,Jn)}function ir(e){return"number"!=typeof e?e:`${e}px solid`}rr.propTypes={},rr.filterProps=Xn,or.propTypes={},or.filterProps=Jn;const ar=Un({prop:"border",themeKey:"borders",transform:ir}),sr=Un({prop:"borderTop",themeKey:"borders",transform:ir}),lr=Un({prop:"borderRight",themeKey:"borders",transform:ir}),cr=Un({prop:"borderBottom",themeKey:"borders",transform:ir}),ur=Un({prop:"borderLeft",themeKey:"borders",transform:ir}),dr=Un({prop:"borderColor",themeKey:"palette"}),pr=Un({prop:"borderTopColor",themeKey:"palette"}),hr=Un({prop:"borderRightColor",themeKey:"palette"}),fr=Un({prop:"borderBottomColor",themeKey:"palette"}),mr=Un({prop:"borderLeftColor",themeKey:"palette"}),gr=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Yn(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:er(t,e)});return Bn(e,e.borderRadius,n)}return null};gr.propTypes={},gr.filterProps=["borderRadius"],$n(ar,sr,lr,cr,ur,dr,pr,hr,fr,mr,gr);const yr=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Yn(e.theme,"spacing",8),n=e=>({gap:er(t,e)});return Bn(e,e.gap,n)}return null};yr.propTypes={},yr.filterProps=["gap"];const br=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Yn(e.theme,"spacing",8),n=e=>({columnGap:er(t,e)});return Bn(e,e.columnGap,n)}return null};br.propTypes={},br.filterProps=["columnGap"];const vr=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Yn(e.theme,"spacing",8),n=e=>({rowGap:er(t,e)});return Bn(e,e.rowGap,n)}return null};vr.propTypes={},vr.filterProps=["rowGap"];function Er(e,t){return"grey"===t?t:e}$n(yr,br,vr,Un({prop:"gridColumn"}),Un({prop:"gridRow"}),Un({prop:"gridAutoFlow"}),Un({prop:"gridAutoColumns"}),Un({prop:"gridAutoRows"}),Un({prop:"gridTemplateColumns"}),Un({prop:"gridTemplateRows"}),Un({prop:"gridTemplateAreas"}),Un({prop:"gridArea"}));function Cr(e){return e<=1&&0!==e?100*e+"%":e}$n(Un({prop:"color",themeKey:"palette",transform:Er}),Un({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Er}),Un({prop:"backgroundColor",themeKey:"palette",transform:Er}));const xr=Un({prop:"width",transform:Cr}),Sr=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r,o;return{maxWidth:(null==(n=e.theme)||null==(r=n.breakpoints)||null==(o=r.values)?void 0:o[t])||jn[t]||Cr(t)}};return Bn(e,e.maxWidth,t)}return null};Sr.filterProps=["maxWidth"];const Lr=Un({prop:"minWidth",transform:Cr}),wr=Un({prop:"height",transform:Cr}),Or=Un({prop:"maxHeight",transform:Cr}),Rr=Un({prop:"minHeight",transform:Cr});Un({prop:"size",cssProperty:"width",transform:Cr}),Un({prop:"size",cssProperty:"height",transform:Cr});$n(xr,Sr,Lr,wr,Or,Rr,Un({prop:"boxSizing"}));var Ir={border:{themeKey:"borders",transform:ir},borderTop:{themeKey:"borders",transform:ir},borderRight:{themeKey:"borders",transform:ir},borderBottom:{themeKey:"borders",transform:ir},borderLeft:{themeKey:"borders",transform:ir},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:gr},color:{themeKey:"palette",transform:Er},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Er},backgroundColor:{themeKey:"palette",transform:Er},p:{style:or},pt:{style:or},pr:{style:or},pb:{style:or},pl:{style:or},px:{style:or},py:{style:or},padding:{style:or},paddingTop:{style:or},paddingRight:{style:or},paddingBottom:{style:or},paddingLeft:{style:or},paddingX:{style:or},paddingY:{style:or},paddingInline:{style:or},paddingInlineStart:{style:or},paddingInlineEnd:{style:or},paddingBlock:{style:or},paddingBlockStart:{style:or},paddingBlockEnd:{style:or},m:{style:rr},mt:{style:rr},mr:{style:rr},mb:{style:rr},ml:{style:rr},mx:{style:rr},my:{style:rr},margin:{style:rr},marginTop:{style:rr},marginRight:{style:rr},marginBottom:{style:rr},marginLeft:{style:rr},marginX:{style:rr},marginY:{style:rr},marginInline:{style:rr},marginInlineStart:{style:rr},marginInlineEnd:{style:rr},marginBlock:{style:rr},marginBlockStart:{style:rr},marginBlockEnd:{style:rr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:yr},rowGap:{style:vr},columnGap:{style:br},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Cr},maxWidth:{style:Sr},minWidth:{transform:Cr},height:{transform:Cr},maxHeight:{transform:Cr},minHeight:{transform:Cr},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const kr=function(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=i;if(null==t)return null;const u=Hn(n,s)||{};if(c)return c(o);return Bn(o,t,(t=>{let n=Wn(u,l,t);return t===n&&"string"==typeof t&&(n=Wn(u,l,`${e}${"default"===t?"":ht(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const a=null!=(r=i.unstable_sxConfig)?r:Ir;function s(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const o=function(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}(i.breakpoints),s=Object.keys(o);let l=o;return Object.keys(r).forEach((n=>{const o=(s=r[n],c=i,"function"==typeof s?s(c):s);var s,c;if(null!=o)if("object"==typeof o)if(a[n])l=zn(l,e(n,o,i,a));else{const e=Bn({theme:i},o,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,o)?l=zn(l,e):l[n]=t({sx:o,theme:i})}else l=zn(l,e(n,o,i,a))})),function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(s,l)}return Array.isArray(o)?o.map(s):s(o)}}();kr.filterProps=["sx"];var qr=kr;function _r(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}const Tr=["values","unit","step"];function Ar(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=_r(e,Tr),i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Nn({},e,{[t.key]:t.val})),{})})(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return Nn({keys:a,values:i,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},o)}var Dr={borderRadius:4};function Pr(e=8){if(e.mui)return e;const t=Qn({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}const Mr=["breakpoints","palette","spacing","shape"];function Nr(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=e,a=_r(e,Mr),s=Ar(n),l=Pr(o);let c=dt({breakpoints:s,direction:"ltr",components:{},palette:Nn({mode:"light"},r),spacing:l,shape:Nn({},Dr,i)},a);return c=t.reduce(((e,t)=>dt(e,t)),c),c.unstable_sxConfig=Nn({},Ir,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return qr({sx:e,theme:this})},c}function zr(){return zr=Object.assign?Object.assign.bind():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},zr.apply(this,arguments)}var jr=e.createContext(null);function Fr(){return e.useContext(jr)}var Br="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function Hr(t){const{children:n,theme:r}=t,o=Fr(),i=e.useMemo((()=>{const e=null===o?r:function(e,t){if("function"==typeof t)return t(e);return zr({},e,t)}(o,r);return null!=e&&(e[Br]=null!==o),e}),[r,o]);return wn.jsx(jr.Provider,{value:i,children:n})}function Wr(e=null){const t=Fr();return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}const Ur=Nr();function $r(e=Ur){return Wr(e)}const Gr=["variant"];function Vr(e){return 0===e.length}function Kr(e){const{variant:t}=e,n=_r(e,Gr);let r=t||"";return Object.keys(n).sort().forEach((t=>{r+="color"===t?Vr(r)?e[t]:ht(e[t]):`${Vr(r)?t:ht(t)}${ht(e[t].toString())}`})),r}const Zr=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],Xr=["theme"],Jr=["theme"];function Yr(e){return 0===Object.keys(e).length}function Qr(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const eo=Nr();function to(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function no(e){if(e.type)return e;if("#"===e.charAt(0))return no(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(pt(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error(pt(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}function ro(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function oo(e){let t="hsl"===(e=no(e)).type||"hsla"===e.type?no(function(e){e=no(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),ro({type:s,values:l})}(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}const io={};function ao(e){const t=$r();return wn.jsx(g.Provider,{value:"object"==typeof t?t:io,children:e.children})}function so(e){const{children:t,theme:n}=e;return wn.jsx(Hr,{theme:n,children:wn.jsx(ao,{children:t})})}const lo=["defaultProps","mixins","overrides","palette","props","styleOverrides"],co=["type","mode"];var uo={black:"#000",white:"#fff"};var po={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};var ho={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};var fo={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};var mo={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};var go={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};var yo={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};var bo={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};const vo=["mode","contrastThreshold","tonalOffset"],Eo={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:uo.white,default:uo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Co={text:{primary:uo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:uo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function xo(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=function(e,t){if(e=no(e),t=to(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return ro(e)}(e.main,o):"dark"===t&&(e.dark=function(e,t){if(e=no(e),t=to(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return ro(e)}(e.main,i)))}function So(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=bt(e,vo),i=e.primary||function(e="light"){return"dark"===e?{main:go[200],light:go[50],dark:go[400]}:{main:go[700],light:go[400],dark:go[800]}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:ho[200],light:ho[50],dark:ho[400]}:{main:ho[500],light:ho[300],dark:ho[700]}}(t),s=e.error||function(e="light"){return"dark"===e?{main:fo[500],light:fo[300],dark:fo[700]}:{main:fo[700],light:fo[400],dark:fo[800]}}(t),l=e.info||function(e="light"){return"dark"===e?{main:yo[400],light:yo[300],dark:yo[700]}:{main:yo[700],light:yo[500],dark:yo[900]}}(t),c=e.success||function(e="light"){return"dark"===e?{main:bo[400],light:bo[300],dark:bo[700]}:{main:bo[800],light:bo[500],dark:bo[900]}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:mo[400],light:mo[300],dark:mo[700]}:{main:"#ed6c02",light:mo[500],dark:mo[900]}}(t);function d(e){const t=function(e,t){const n=oo(e),r=oo(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Co.text.primary)>=n?Co.text.primary:Eo.text.primary;return t}const p=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e=yt({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(pt(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(pt(12,t?` (${t})`:"",JSON.stringify(e.main)));return xo(e,"light",o,r),xo(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e},h={dark:Co,light:Eo};return dt(yt({common:yt({},uo),mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:po,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r},h[t]),o)}const Lo=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const wo={textTransform:"uppercase"},Oo='"Roboto", "Helvetica", "Arial", sans-serif';function Ro(e,t){const n="function"==typeof t?t(e):t,{fontFamily:r=Oo,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,p=bt(n,Lo),h=o/14,f=d||(e=>e/c*h+"rem"),m=(e,t,n,o,i)=>{return yt({fontFamily:r,fontWeight:e,fontSize:f(t),lineHeight:n},r===Oo?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},i,u);var a},g={h1:m(i,96,1.167,-1.5),h2:m(i,60,1.2,-.5),h3:m(a,48,1.167,0),h4:m(a,34,1.235,.25),h5:m(a,24,1.334,0),h6:m(s,20,1.6,.15),subtitle1:m(a,16,1.75,.15),subtitle2:m(s,14,1.57,.1),body1:m(a,16,1.5,.15),body2:m(a,14,1.43,.15),button:m(s,14,1.75,.4,wo),caption:m(a,12,1.66,.4),overline:m(a,12,2.66,1,wo)};return dt(yt({htmlFontSize:c,pxToRem:f,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},g),p,{clone:!1})}function Io(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}var ko=["none",Io(0,2,1,-1,0,1,1,0,0,1,3,0),Io(0,3,1,-2,0,2,2,0,0,1,5,0),Io(0,3,3,-2,0,3,4,0,0,1,8,0),Io(0,2,4,-1,0,4,5,0,0,1,10,0),Io(0,3,5,-1,0,5,8,0,0,1,14,0),Io(0,3,5,-1,0,6,10,0,0,1,18,0),Io(0,4,5,-2,0,7,10,1,0,2,16,1),Io(0,5,5,-3,0,8,10,1,0,3,14,2),Io(0,5,6,-3,0,9,12,1,0,3,16,2),Io(0,6,6,-3,0,10,14,1,0,4,18,3),Io(0,6,7,-4,0,11,15,1,0,4,20,3),Io(0,7,8,-4,0,12,17,2,0,5,22,4),Io(0,7,8,-4,0,13,19,2,0,5,24,4),Io(0,7,9,-4,0,14,21,2,0,5,26,4),Io(0,8,9,-5,0,15,22,2,0,6,28,5),Io(0,8,10,-5,0,16,24,2,0,6,30,5),Io(0,8,11,-5,0,17,26,2,0,6,32,5),Io(0,9,11,-5,0,18,28,2,0,7,34,6),Io(0,9,12,-6,0,19,29,2,0,7,36,6),Io(0,10,13,-6,0,20,31,3,0,8,38,7),Io(0,10,13,-6,0,21,33,3,0,8,40,7),Io(0,10,14,-6,0,22,35,3,0,8,42,7),Io(0,11,14,-7,0,23,36,3,0,9,44,8),Io(0,11,15,-7,0,24,38,3,0,9,46,8)];const qo=["duration","easing","delay"],_o={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},To={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function Ao(e){return`${Math.round(e)}ms`}function Do(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function Po(e){const t=yt({},_o,e.easing),n=yt({},To,e.duration);return yt({getAutoHeightDuration:Do,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0}=r;return bt(r,qo),(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:Ao(o)} ${i} ${"string"==typeof a?a:Ao(a)}`)).join(",")}},e,{easing:t,duration:n})}var Mo={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};const No=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function zo(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,a=bt(e,No);if(e.vars)throw new Error(pt(18));const s=So(r),l=Nr(e);let c=dt(l,{mixins:(u=l.breakpoints,d=n,yt({toolbar:{minHeight:56,[u.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[u.up("sm")]:{minHeight:64}}},d)),palette:s,shadows:ko.slice(),typography:Ro(s,i),transitions:Po(o),zIndex:yt({},Mo)});var u,d;return c=dt(c,a),c=t.reduce(((e,t)=>dt(e,t)),c),c.unstable_sxConfig=yt({},Ir,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return qr({sx:e,theme:this})},c}var jo=zo();function Fo(){return $r(jo)}const Bo=function(e={}){const{defaultTheme:t=eo,rootShouldForwardProp:n=Qr,slotShouldForwardProp:r=Qr}=e,o=e=>{const n=Yr(e.theme)?t:e.theme;return qr(Nn({},e,{theme:n}))};return o.__mui_systemSx=!0,(e,i={})=>{((e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))})(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:a,slot:s,skipVariantsResolver:l,skipSx:c,overridesResolver:u}=i,d=_r(i,Zr),p=void 0!==l?l:s&&"Root"!==s||!1,h=c||!1;let f=Qr;"Root"===s?f=n:s?f=r:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(f=void 0);const m=function(e,t){return z(e,t)}(e,Nn({shouldForwardProp:f,label:undefined},d)),g=(e,...n)=>{const r=n?n.map((e=>"function"==typeof e&&e.__emotion_real!==e?n=>{let{theme:r}=n,o=_r(n,Xr);return e(Nn({theme:Yr(r)?t:r},o))}:e)):[];let i=e;a&&u&&r.push((e=>{const n=Yr(e.theme)?t:e.theme,r=((e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null)(a,n);if(r){const t={};return Object.entries(r).forEach((([r,o])=>{t[r]="function"==typeof o?o(Nn({},e,{theme:n})):o})),u(e,t)}return null})),a&&!p&&r.push((e=>{const n=Yr(e.theme)?t:e.theme;return((e,t,n,r)=>{var o,i;const{ownerState:a={}}=e,s=[],l=null==n||null==(o=n.components)||null==(i=o[r])?void 0:i.variants;return l&&l.forEach((n=>{let r=!0;Object.keys(n.props).forEach((t=>{a[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)})),r&&s.push(t[Kr(n.props)])})),s})(e,((e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const r={};return n.forEach((e=>{const t=Kr(e.props);r[t]=e.style})),r})(a,n),n,a)})),h||r.push(o);const s=r.length-n.length;if(Array.isArray(e)&&s>0){const t=new Array(s).fill("");i=[...e,...t],i.raw=[...e.raw,...t]}else"function"==typeof e&&e.__emotion_real!==e&&(i=n=>{let{theme:r}=n,o=_r(n,Jr);return e(Nn({theme:Yr(r)?t:r},o))});return m(i,...r)};return m.withConfig&&(g.withConfig=m.withConfig),g}}({defaultTheme:jo,rootShouldForwardProp:e=>Qr(e)&&"classes"!==e});var Ho=Bo;function Wo(){return Wo=Object.assign?Object.assign.bind():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},Wo.apply(this,arguments)}function Uo(e,t){return Uo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Uo(e,t)}function $o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Uo(e,t)}function Go(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Vo=function(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=function(e,t,n="Mui"){const r=gt[t];return r?`${n}-${r}`:`${mt.generate(e)}-${t}`}(e,t,n)})),r}("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"]),Ko={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 Zo="#009845",Xo="#3F8AB3",Jo="#ffffff",Yo="#404040",Qo="#333333",ei="#1A1A1A",ti={mode:"light",palette:{primary:{main:Yo,contrastText:Jo},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Yo,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)"},action:{active:Yo,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:Jo,default:Jo,lightest:Jo,lighter:"#FBFBFB",darker:"#F2F2F2",darkest:"#E6E6E6"},custom:{focusBorder:Xo,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)"},selected:{main:Zo,alternative:"#E4E4E4",excluded:"#BEBEBE",mainContrastText:Jo,alternativeContrastText:Yo,excludedContrastText:Yo},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)"}}},ni={mode:"dark",palette:{primary:{main:Qo,contrastText:Jo},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:Jo,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)"},action:{active:Jo,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:Yo,lighter:Qo,darker:"#262626",darkest:ei},custom:{focusBorder:Xo,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)"},selected:{main:Zo,alternative:Qo,excluded:ei,mainContrastText:Jo,alternativeContrastText:Jo,excludedContrastText:Jo},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)"}}},ri={},oi=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(Vo.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(Vo.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(Vo.disabled)]:{backgroundColor:e.palette.btn.disabled}},"&:active":{boxShadow:"none",backgroundColor:e.palette.btn.active},["&.".concat(Vo.disabled)]:{backgroundColor:e.palette.btn.disabled}}},MuiAccordionSummary:{content:{margin:"8px 0"}}});function ii(e){let t=ti,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn("Invalid theme: '".concat(e,"'")):"dark"===e&&(t=ni));const r=JSON.stringify(t);if(ri[r])return ri[r];const o={palette:B(B({type:t.mode},Ko.palette),t.palette),typography:B({},Ko.typography),shadows:Ko.shadows,props:B({},Ko.props),shape:B({},Ko.shape)};return ri[r]=zo(function(e){const{defaultProps:t={},mixins:n={},overrides:r={},palette:o={},props:i={},styleOverrides:a={}}=e,s=yt({},bt(e,lo),{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=Pr(e.spacing);const l=Ar(e.breakpoints||{}),c=s.spacing;s.mixins=yt({gutters:(e={})=>yt({paddingLeft:c(2),paddingRight:c(2)},e,{[l.up("sm")]:yt({paddingLeft:c(3),paddingRight:c(3)},e[l.up("sm")])})},n);const{type:u,mode:d}=o,p=bt(o,co),h=d||u||"light";return s.palette=yt({text:{hint:"dark"===h?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.38)"},mode:h,type:h},p),s}(B(B({},o),{},{overrides:oi(o)}))),ri[r].name=n,ri[r]}mt.configure((e=>"njs-".concat("f26d","-").concat(e.replace("Mui",""))));var ai=t.createContext({language:null,theme:null,translator:null,constraints:{},themeApi:null}),si=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};const o=e,i=[],a={get:e=>o[e],set:(e,n)=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));return o[e]=n,t({type:"SET",value:n}),n},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error("Invalid key: ".concat(JSON.stringify(e)));o[e]=null},dispatch:e=>{i.forEach((t=>t(e?{}:o)))}},s=()=>{const[,e]=n(o);return r((()=>(i.push(e),()=>{const t=i.indexOf(e);i.splice(t,1)})),[e]),[a]};return[s,a]};const[li,ci]=si({}),[ui,di]=si({}),[pi,hi]=si({}),[fi,mi]=si({}),[gi,yi]=si({}),[,bi]=si({}),vi=e=>{let{type:t,value:n}=e;const r=bi.get(n.id);bi.set(n.id,{});const o=()=>{di.clear(n.id),yi.set(n.id,{}),yi.dispatch(!0)},i=()=>{n.removeListener("changed",o),ci.clear(n.id),di.clear(n.id),hi.clear(n.id),mi.clear(n.id),yi.clear(n.id),bi.clear(n.id)};if("SET"===t)r||(n.on("changed",o),n.once("closed",(()=>{i()})));return i},[Ei,Ci]=si({},vi),xi=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=B(B({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:B({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=B(B({},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 Si(e,t){const n=e?"".concat(e.id):null,[i]=li(),[a,s]=o(xi,n?i.get(n):null),[l]=gi(),[c]=ui();let u;n&&(u=c.get(n),u||(u={},c.set(n,u)));const d=async r=>{let o=u[t];if(!o||o&&o.rpcRetry){o={rpc:e[t](),rpcRetry:!1},u[t]=o,s({type:"INVALID",method:t,key:n,model:e,rpcResultStore:i,canCancel:!0})}try{const r=await o.rpc;s({type:"VALID",result:r,key:n,method:t,model:e,rpcResultStore:i})}catch(e){15!==e.code||r||(o.rpcRetry||(o.rpcRetry=!0),d(!0))}},p={cancel:async()=>{const r=e.session.getObjectApi({handle:-1});await r.cancelRequest(u[t].rpc.requestId),s({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:i})},retry:()=>{u[t].rpcRetry=!0,d()}};return r((()=>{e&&d()}),[e,l.get(e&&e.id),n,t]),[a&&a.result,{validating:a&&a.validating,canCancel:a&&a.canCancel,canRetry:a&&a.canRetry},p]}function Li(e){return Si(e,"getLayout")}function wi(e){return Si(e,"getAppLayout")}function Oi(e,t){const o=t?"".concat(t.id,"/").concat(JSON.stringify(e)):null,[i]=Ei(),[a]=pi(),[s,l]=n();let c;o&&(c=a.get(o));for(var u=arguments.length,d=new Array(u>2?u-2:0),p=2;p<u;p++)d[p-2]=arguments[p];return r((()=>{if(!t)return;(async()=>{if(!c){const n=t.createSessionObject(e);c=n,a.set(o,c)}const n=await c;i.set(o,n),l(n)})()}),[t,...d]),[s]}const Ri={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Ii(e){return Oi(Ri,e)}function ki(e){const[t]=Ii(e),[o]=Li(t),[i]=wi(e),[a,s]=n(null);return r((()=>{i&&t&&o&&((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,o,i)}),[i,t,o]),r((()=>{if(!o)return;let e=!1,t=!1,n=!1;[o,...o.alternateStates||[]].forEach((r=>{e=e||r.qSelectionObject&&r.qSelectionObject.qBackCount>0,t=t||r.qSelectionObject&&r.qSelectionObject.qForwardCount>0,n=n||(r.qSelectionObject&&r.qSelectionObject.qSelections||[]).filter((e=>!0!==e.qLocked)).length>0})),s({canGoBack:e,canGoForward:t,canClear:n})}),[o]),[a,t,o]}const[qi,_i]=si({}),[Ti,Ai]=si({}),[Di,Pi]=si({}),[Mi,Ni]=si({});function zi(e){if(!e.session)return[];const[t,n,o]=ki(e),[i]=qi(),a=e?e.id:null;let s=i.get(a);return r((()=>{e&&n&&o&&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=Ni.get(o);t&&(await t.endSelections(e),Ni.clear(o),Pi.get(t.id).emit("deactivated"))},a={begin:async function(e,n){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e===Ni.get(o))return;i(r),Ni.set(o,e);const a=Array.isArray(n)?n:[n],s=async n=>{try{await e.beginSelections(a),Ni.set(o,e)}catch(e){6003!==e.code||n?Ni.clear(o):(await t.abortModal(r),s(!0))}};await s()},end:i};Ai.set(o,a);const s={model:t,isInModal:()=>!!Ni.get(o),isModal:e=>e?Ni.get(o)===e:!!Ni.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:o,navState:t}),i.set(a,s),i.dispatch(!0))}),[e,n,o,t]),[s,t]}const ji=i(((e,r)=>{let{initialContext:o,app:i}=e;const[l]=zi(i),[c,u]=n(o),[d,p]=n(),{theme:h}=a((()=>({theme:ii(d)})),[d]),[f,m]=n([]);return s(r,(()=>({addComponent(e){m([...f,e])},removeComponent(e){const t=f.indexOf(e);-1!==t&&(f.splice(t,1),m([...f]))},setMuiThemeName:p,setContext:u,getAppSelections:()=>l}))),t.createElement(Mn,{injectFirst:!0},t.createElement(so,{theme:h},t.createElement(ai.Provider,{value:c},f)))}));function Fi(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.1.0-alpha.5"),s.setAttribute("data-app-id",r.id),document.body.appendChild(s),f.render(t.createElement(ji,{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},removeCell(e){delete l[e]},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 Bi(){const[e,t]=n(),[r,o]=n(),i=l((e=>{e&&t(e)}),[]),a=()=>{const{left:t,top:n,width:r,height:i}=e.getBoundingClientRect();o({left:t,top:n,width:r,height:i})};return c((()=>{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]),[i,r,e]}function Hi(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Wi(e){let{size:n,style:r={},viewBox:o="0 0 16 16",shapes:i=[]}=e;const a=B({fontSize:Hi(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,W({key:n},o))}))))}var Ui=e=>Wi((e=>B(B({},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 $i=e=>Wi((e=>B(B({},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 Gi=e=>Wi((e=>B(B({},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));var Vi=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Ki=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}}(),Zi=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},Xi=function(e){function t(){var e,n,r;Vi(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=Zi(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},Zi(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,u),Ki(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),d=l+1;d<=u&&!t(d);d++)l=d;a.push(s,l)}if(a.length)for(;a[1]-a[0]+1<r&&a[0]>0;){var p=a[0]-1;if(t(p))break;a[0]=p}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 Ji=["S","XS"],Yi=e=>e.reduce(((e,t)=>e.concat(t)));function Qi(e){return Ji.includes(e)}function ea(e){return Array.isArray(e)?Array.from(new Set(e)):void 0}async function ta(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 na(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 ra(e){let{layout:t,selections:o,pages:i=[],checkboxes:a=!1,selectDisabled:s,doc:c=document,isSingleSelect:u=!1}=e;const[d,p]=n(i),[h,f]=n(!1),[m,g]=n(!1),[y,b]=n(u),[v,E]=n([]),[C,x]=n(!1),[S,L]=n([]),w=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 Yi(t)}(i);r((()=>{b(u)}),[u]);const O=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 n=t?e.filter((e=>!v.includes(e))):e;await ta({selections:o,elemNumbers:n,isSingleSelect:y}),g(!1),L([])},R=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s()||L((n=>{const r=ea([...n,...e]),o=t?r.filter((e=>!v.includes(e))):r;return t?na(r,w):o}))},I=e=>{(e.ctrlKey||e.metaKey)&&(b(!0),e.currentTarget.focus(),e.preventDefault())},k=l((e=>{if(m||s())return;const t=+e.currentTarget.getAttribute("data-n");L([t]),I(e)}),[m,s]),q=l((e=>{if(m||s())return;x(!1),f(!0);const t=+e.currentTarget.getAttribute("data-n");L([t]),I(e)}),[m,s]),_=l((e=>{const t=+e.currentTarget.getAttribute("data-n");y||!h||m||1===S.length&&S[0]===t||R([t])}),[h,m,S,v,C,s]),T=l((()=>{f(!1),g(!1),x(!1),b(u)}),[u]),A=l((e=>{if(y||!h||m||s())return;x(!0);const t=+e.currentTarget.getAttribute("data-n");R([t],!0)}),[h,m,C,S,v,s,t&&t.qListObject.qDimensionInfo.qIsOneAndOnlyOne]);r((()=>{const e=!h;S&&S.length&&!m&&e&&t&&O(S,C)}),[S,h,s()]),r((()=>(c.addEventListener("mouseup",T),()=>{c.removeEventListener("mouseup",T)})),[T]),r((()=>{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!!Qi(t.qState)&&t.qElemNumber}));return t.filter((e=>!1!==e))}));return Yi(t)}(i);E(e)}),[i]),r((()=>{if(m||!i||!a&&!h)return;const e=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e=>t.length<=1&&Qi(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,[B(B({},o),{},{qState:a}),e.slice(1)]}));return B(B({},e),{},{qMatrix:o})}));return o}(i,S,y);p(e)}),[S]);const D={};return a?Object.assign(D,{onClick:k}):Object.assign(D,{onMouseUp:_,onMouseDown:q,onMouseEnter:A}),{instantPages:d,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];x(!1),f(!0),R(e,t||C);const n=O(e,t||C);return f(!1),n}}}const oa=e=>B(B({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var ia=e=>Wi(oa(e));const aa="ListBoxCheckbox",sa={cbIcon:"".concat(aa,"-cbIcon"),cbIconChecked:"".concat(aa,"-cbIconChecked"),cbIconExcluded:"".concat(aa,"-cbIconExcluded"),cbIconAlternative:"".concat(aa,"-cbIconAlternative"),checkbox:"".concat(aa,"-checkbox"),dense:"".concat(aa,"-dense")},la=Ho(y)((e=>{let{theme:t}=e;return{["& .".concat(sa.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(sa.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(sa.cbIconExcluded)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.excluded},["& .".concat(sa.cbIconAlternative)]:{borderRadius:2,width:12,height:12,backgroundColor:t.palette.selected.alternative},["&.".concat(sa.checkbox)]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},["&.".concat(sa.dense)]:{padding:"4px 8px"}}})),ca=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 ua(e){let{checked:n,label:r,dense:o,excluded:i,showGray:a=!0}=e;return t.createElement(la,{edge:"start",checked:n,disableRipple:!0,className:[sa.checkbox,o&&sa.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":r},name:r,icon:ca(sa,a,i),checkedIcon:t.createElement("span",{className:sa.cbIconChecked})})}const da="ListBoxRadioButton",pa={denseRadioButton:"".concat(da,"-denseRadioButton"),radioButton:"".concat(da,"-radioButton")},ha=Ho(b)((e=>{let{theme:t,checked:n}=e;return{["&.".concat(pa.radioButton)]:{right:"5px",color:n?t.palette.selected.main:t.palette.main}}}));function fa(e){let{checked:n,label:r,dense:o}=e;return t.createElement(ha,{checked:n,value:r,name:r,className:pa.radioButton,style:{backgroundColor:"transparent"},disableRipple:!0,size:o?"small":"medium",sx:o&&{padding:"0px 0px 0px 12px"}})}const ma=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===ma.ARROW_UP||e===ma.ARROW_DOWN||e===ma.ARROW_LEFT||e===ma.ARROW_RIGHT});function ga(e){let{setKeyboardActive:t}=e;return e=>{const{keyCode:n}=e.nativeEvent;switch(n){case ma.ENTER:case ma.SPACE:if(!e.target.classList.contains("listbox-container"))return;(e=>{const n=e.querySelector(".search input, .value.selector, .value, .ActionsToolbar-* button");t(!0),n&&n.focus()})(e.currentTarget);break;case ma.ESCAPE:r=e.currentTarget,t(!1),r.focus();break;default:return}var r;e.preventDefault()}}const ya="RowColumn",ba={row:"".concat(ya,"-row"),rowBorderBottom:"".concat(ya,"-rowBorderBottom"),column:"".concat(ya,"-column"),fieldRoot:"".concat(ya,"-fieldRoot"),cell:"".concat(ya,"-cell"),labelText:"".concat(ya,"-labelText"),labelDense:"".concat(ya,"-labelDense"),highlighted:"".concat(ya,"-highlighted"),checkboxLabel:"".concat(ya,"-checkboxLabel"),icon:"".concat(ya,"-icon"),S:"".concat(ya,"-S"),XS:"".concat(ya,"-XS"),A:"".concat(ya,"-A"),X:"".concat(ya,"-X"),frequencyCount:"".concat(ya,"-frequencyCount"),barContainer:"".concat(ya,"-barContainer"),bar:"".concat(ya,"-bar"),barSelected:"".concat(ya,"-barSelected"),barWithCheckbox:"".concat(ya,"-barWithCheckbox"),barSelectedWithCheckbox:"".concat(ya,"-barSelectedWithCheckbox"),excludedTextWithCheckbox:"".concat(ya,"-excludedTextWithCheckbox")},va={width:"100%",overflow:"hidden",textOverflow:"ellipsis"},Ea=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}}},Ca=Ho("div",{shouldForwardProp:e=>"flexBasisProp"!==e})((e=>{var t,n,r,o,i,a,s,l,c,u;let{theme:d,flexBasisProp:p,dense:h}=e;return{["& .".concat(ba.row)]:{flexWrap:"nowrap",color:null!==(t=null===(n=d.listBox)||void 0===n||null===(r=n.content)||void 0===r?void 0:r.color)&&void 0!==t?t:d.palette.text.primary},["& .".concat(ba.rowBorderBottom)]:{borderBottom:"1px solid ".concat(d.palette.divider)},["& .".concat(ba.column)]:{flexWrap:"nowrap",borderRight:"1px solid ".concat(d.palette.divider),color:null!==(o=null===(i=d.listBox)||void 0===i||null===(a=i.content)||void 0===a?void 0:a.color)&&void 0!==o?o:d.palette.text.primary},["& .".concat(ba.fieldRoot)]:{"&:focus":{boxShadow:"inset 0 0 0 2px ".concat(d.palette.custom.focusBorder," !important")},"&:focus-visible":{outline:"none"}},["& .".concat(ba.cell)]:{display:"flex",alignItems:"center",minWidth:0,flexGrow:1,paddingLeft:"9px",paddingRight:"9px"},["& .".concat(ba.labelText)]:B(B({flexBasis:p,lineHeight:"16px",userSelect:"none",whiteSpace:"pre",paddingRight:"9px"},va),{},{fontSize:null===(s=d.listBox)||void 0===s||null===(l=s.content)||void 0===l?void 0:l.fontSize,fontFamily:null===(c=d.listBox)||void 0===c||null===(u=c.content)||void 0===u?void 0:u.fontFamily}),["& .".concat(ba.labelDense)]:{fontSize:12},["& .".concat(ba.highlighted)]:{overflow:"visible",width:"100%","& > span":{width:"100%",backgroundColor:"#FFC72A"}},["& .".concat(ba.checkboxLabel)]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":B(B({},va),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},["& .".concat(ba.icon)]:{display:"flex",padding:d.spacing(1,1,1,0)},["& .".concat(ba.S)]:B({},Ea({theme:d})),["& .".concat(ba.XS)]:B(B({},Ea({theme:d})),{},{background:d.palette.selected.excluded,color:d.palette.selected.mainContrastText}),["& .".concat(ba.A)]:{background:d.palette.selected.alternative,color:d.palette.selected.alternativeContrastText},["& .".concat(ba.X)]:{background:d.palette.selected.excluded,color:d.palette.selected.excludedContrastText},["& .".concat(ba.frequencyCount)]:{width:"66px",justifyContent:"flex-end"},["&.".concat(ba.barContainer)]:{height:"100%",display:"inline-block"},["& .".concat(ba.bar)]:{border:"".concat(1,"px solid"),borderColor:"#D9D9D9",height:h?"16px":"20px",position:"absolute",zIndex:"-1",alignSelf:"center",left:"".concat(4,"px"),transition:"width 0.2s",backgroundColor:"#FAFAFA"},["& .".concat(ba.barSelected)]:{opacity:"30%",zIndex:"0",background:d.palette.background.lighter},["& .".concat(ba.barWithCheckbox)]:{left:"".concat(29,"px")},["& .".concat(ba.barSelectedWithCheckbox)]:{background:"#BFE5D0",borderColor:"#BFE5D0"},["& .".concat(ba.excludedTextWithCheckbox)]:{color:"#828282",fontStyle:"italic"}}}));function xa(e){let{index:o,rowIndex:i,columnIndex:a,style:s,data:c}=e;const{onClick:u,onMouseDown:d,onMouseUp:p,onMouseEnter:h,pages:f,isLocked:m,column:g=!1,checkboxes:y=!1,textAlign:b,direction:x,dense:S=!1,freqIsAllowed:L,isSingleSelect:w,actions:O,frequencyMax:R="",histogram:I=!1,keyboard:k,showGray:q=!0,columnCount:_=1,rowCount:T=1,layoutOrder:A}=c;let D,P;if("number"==typeof i&&"number"==typeof a){D="row"===A?i*_+a:a*T+i;const e=0;P=B(B({},s),{},{left:e+(0===a?s.left:Number(s.left)+a*e),top:0===i?s.top:Number(s.top)+i*e})}else D=o,P=B({},s);const M=l(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 ma.SHIFT:a(!0);break;case ma.SPACE:t([+e.currentTarget.getAttribute("data-n")]);break;case ma.ARROW_DOWN:case ma.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 ma.ARROW_UP:case ma.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 ma.ENTER:n();break;case ma.ESCAPE:return void r();default:return}s&&s.focus(),e.preventDefault(),e.stopPropagation()}}(O),[O]),[N,z]=n(!1),[j,F]=n(),[H,W]=n([]);r((()=>{if(!f)return;let e;const t=f.filter((e=>e.qArea.qTop<=D&&D<e.qArea.qTop+e.qArea.qHeight))[0];if(t){const n=t.qArea;D>=n.qTop&&D<n.qTop+n.qHeight&&([e]=t.qMatrix[D-n.qTop])}F(e)}),[f]);const U=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,$=e=>e?"A"===e.qState:null;if(r((()=>{if(!j)return;const e="S"===j.qState||"XS"===j.qState||"L"===j.qState;z(e);const t=[g?ba.column:ba.row];I&&S||y||t.push(ba.rowBorderBottom),y||("XS"===j.qState?t.push(q?ba.XS:ba.S):"S"===j.qState||"L"===j.qState?t.push(ba.S):q&&$(j)?t.push(ba.A):q&&U(j)&&t.push(ba.X)),W(t)}),[j&&j.qState,I,S,y]),!j)return null;const G=e=>e.filter((e=>!!e)).join(" ").trim(),V=()=>($(j)||U(j))&&y,K=!["NaN",void 0].includes(null==j?void 0:j.qNum);let Z;const X=!b||b.auto;Z=X?K?"right":{rtl:"right",ltr:"left"}[x]:(null==b?void 0:b.align)||"left";const J=e=>{let{lbl:n,ix:r,color:o,highlighted:i=!1}=e;return t.createElement(E,{component:"span",variant:"body2",key:r,className:G([ba.labelText,i&&ba.highlighted,S&&ba.labelDense,q&&V()&&ba.excludedTextWithCheckbox]),color:o,justifyContent:Z},t.createElement("span",{style:{whiteSpace:"pre"}},n))},Y=e=>{let{lbl:n,color:r,qElemNumber:o}=e;const i=t.createElement(ua,{label:n,checked:N,dense:S,excluded:U(j),showGray:q}),a=t.createElement(fa,{label:n,checked:N,dense:S}),s="string"==typeof n?J({lbl:n,color:r,highlighted:!1}):n;return t.createElement(C,{color:r,control:w?a:i,className:ba.checkboxLabel,label:s,key:o})},Q=j?j.qText:"",ee=()=>j?j.qFrequency?j.qFrequency:"-":"",te=j&&j.qHighlightRanges&&j.qHighlightRanges.qRanges.sort(((e,t)=>e.qCharPos-t.qCharPos))||[],ne=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}(Q,te),re=y?Y:J,oe={alignItems:"center",display:"flex"},ie=N&&m,ae=!y&&N&&!m,se={display:"flex",alignItems:"center",minWidth:0,flexGrow:1,padding:y?0:void 0,justifyContent:Z},le=0===o,ce=y?"auto":"max-content";return t.createElement(Ca,{className:ba.barContainer,flexBasisProp:ce,dense:S},t.createElement(v,{container:!0,gap:0,className:G(["value",...H]),classes:{root:ba.fieldRoot},style:P,onClick:u,onMouseDown:d,onMouseUp:p,onMouseEnter:h,onKeyDown:M,onContextMenu:e=>{y&&u(e),e.preventDefault()},role:g?"column":"row",tabIndex:!le||k.enabled&&!k.active?-1:0,"data-n":j&&j.qElemNumber},j&&I&&"-"!==ee()&&t.createElement("div",{className:G([ba.bar,y&&ba.barWithCheckbox,N&&(y?ba.barSelectedWithCheckbox:ba.barSelected)]),style:{width:(e=>{const t=String(e),n="%"===t.substring(t.length-1),r=parseFloat(n?t:e),o=y?"(".concat(29,"px + ").concat(6,"px)"):"".concat(10,"px");return"calc(".concat(n?r:r/R*100,"% - ").concat(o,")")})(j.qFrequency)}}),t.createElement(v,{item:!0,style:se,className:G([ba.cell,ba.selectedCell]),title:"".concat(Q)},0===te.length?re({lbl:Q,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 y?Y({lbl:n}):n})({lbls:ne})),L&&t.createElement(v,{item:!0,style:{display:"flex",alignItems:"center"},className:ba.frequencyCount},t.createElement(E,{noWrap:!0,color:"inherit",variant:"body2",className:G([S&&ba.labelDense,ba.labelText,q&&V()&&ba.excludedTextWithCheckbox])},ee())),!y&&t.createElement(v,{item:!0,className:ba.icon},!ie&&!ae&&t.createElement("span",{style:{minWidth:"12px"}}),ie&&t.createElement($i,{style:oe,size:"small"}),ae&&t.createElement(ia,{style:oe,size:"small"}))))}function Sa(e){let{width:t,layout:n,frequencyMode:r}=e;const o=t>80,{frequencyEnabled:i=!1}=(null==n?void 0:n.qListObject)||{},a=!["none",void 0].includes(r);return!(!o||!a&&!i)}var La=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function wa(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||La(r)&&La(o)))return!1;var r,o;return!0}function Oa(e,t){var n;void 0===t&&(t=wa);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 Ra="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Ia(e){cancelAnimationFrame(e.id)}function ka(e,t){var n=Ra();var r={id:requestAnimationFrame((function o(){Ra()-n>=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var qa=-1;function _a(e){if(void 0===e&&(e=!1),-1===qa||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),qa=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return qa}var Ta=null;function Aa(e){if(void 0===e&&(e=!1),null===Ta||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?Ta="positive-descending":(t.scrollLeft=1,Ta=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Ta}return Ta}var Da=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function Pa(e){var t,n=e.getColumnOffset,r=e.getColumnStartIndexForOffset,o=e.getColumnStopIndexForStartIndex,i=e.getColumnWidth,a=e.getEstimatedTotalHeight,s=e.getEstimatedTotalWidth,l=e.getOffsetForColumnAndAlignment,c=e.getOffsetForRowAndAlignment,p=e.getRowHeight,h=e.getRowOffset,f=e.getRowStartIndexForOffset,m=e.getRowStopIndexForStartIndex,g=e.initInstanceProps,y=e.shouldResetStyleCacheOnItemSizeChange,b=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=g(r.props,Go(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:Go(r),isScrolling:!1,horizontalScrollDirection:"forward",scrollLeft:"number"==typeof r.props.initialScrollLeft?r.props.initialScrollLeft:0,scrollTop:"number"==typeof r.props.initialScrollTop?r.props.initialScrollTop:0,scrollUpdateWasRequested:!1,verticalScrollDirection:"forward"},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Oa((function(e,t,n,o,i,a,s,l){return r.props.onItemsRendered({overscanColumnStartIndex:e,overscanColumnStopIndex:t,overscanRowStartIndex:n,overscanRowStopIndex:o,visibleColumnStartIndex:i,visibleColumnStopIndex:a,visibleRowStartIndex:s,visibleRowStopIndex:l})})),r._callOnScroll=void 0,r._callOnScroll=Oa((function(e,t,n,o,i){return r.props.onScroll({horizontalScrollDirection:n,scrollLeft:e,scrollTop:t,verticalScrollDirection:o,scrollUpdateWasRequested:i})})),r._getItemStyle=void 0,r._getItemStyle=function(e,t){var o,a=r.props,s=a.columnWidth,l=a.direction,c=a.rowHeight,u=r._getItemStyleCache(y&&s,y&&l,y&&c),d=e+":"+t;if(u.hasOwnProperty(d))o=u[d];else{var f=n(r.props,t,r._instanceProps),m="rtl"===l;u[d]=o={position:"absolute",left:m?void 0:f,right:m?f:void 0,top:h(r.props,e,r._instanceProps),height:p(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=Oa((function(e,t,n){return{}})),r._onScroll=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.clientWidth,i=t.scrollLeft,a=t.scrollTop,s=t.scrollHeight,l=t.scrollWidth;r.setState((function(e){if(e.scrollLeft===i&&e.scrollTop===a)return null;var t=r.props.direction,c=i;if("rtl"===t)switch(Aa()){case"negative":c=-i;break;case"positive-descending":c=l-o-i}c=Math.max(0,Math.min(c,l-o));var u=Math.max(0,Math.min(a,s-n));return{isScrolling:!0,horizontalScrollDirection:e.scrollLeft<i?"forward":"backward",scrollLeft:c,scrollTop:u,verticalScrollDirection:e.scrollTop<a?"forward":"backward",scrollUpdateWasRequested:!1}}),r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&Ia(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ka(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1)}))},r}$o(t,e),t.getDerivedStateFromProps=function(e,t){return Ma(e,t),b(e),null};var u=t.prototype;return u.scrollTo=function(e){var t=e.scrollLeft,n=e.scrollTop;void 0!==t&&(t=Math.max(0,t)),void 0!==n&&(n=Math.max(0,n)),this.setState((function(e){return void 0===t&&(t=e.scrollLeft),void 0===n&&(n=e.scrollTop),e.scrollLeft===t&&e.scrollTop===n?null:{horizontalScrollDirection:e.scrollLeft<t?"forward":"backward",scrollLeft:t,scrollTop:n,scrollUpdateWasRequested:!0,verticalScrollDirection:e.scrollTop<n?"forward":"backward"}}),this._resetIsScrollingDebounced)},u.scrollToItem=function(e){var t=e.align,n=void 0===t?"auto":t,r=e.columnIndex,o=e.rowIndex,i=this.props,u=i.columnCount,d=i.height,p=i.rowCount,h=i.width,f=this.state,m=f.scrollLeft,g=f.scrollTop,y=_a();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,p-1)));var b=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>h?y:0,E=b>d?y:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,E):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,v):g})},u.componentDidMount=function(){var e=this.props,t=e.initialScrollLeft,n=e.initialScrollTop;if(null!=this._outerRef){var r=this._outerRef;"number"==typeof t&&(r.scrollLeft=t),"number"==typeof n&&(r.scrollTop=n)}this._callPropsCallbacks()},u.componentDidUpdate=function(){var e=this.props.direction,t=this.state,n=t.scrollLeft,r=t.scrollTop;if(t.scrollUpdateWasRequested&&null!=this._outerRef){var o=this._outerRef;if("rtl"===e)switch(Aa()){case"negative":o.scrollLeft=-n;break;case"positive-ascending":o.scrollLeft=n;break;default:var i=o.clientWidth,a=o.scrollWidth;o.scrollLeft=a-i-n}else o.scrollLeft=Math.max(0,n);o.scrollTop=Math.max(0,r)}this._callPropsCallbacks()},u.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Ia(this._resetIsScrollingTimeoutId)},u.render=function(){var e=this.props,t=e.children,n=e.className,r=e.columnCount,o=e.direction,i=e.height,l=e.innerRef,c=e.innerElementType,u=e.innerTagName,p=e.itemData,h=e.itemKey,f=void 0===h?Da:h,m=e.outerElementType,g=e.outerTagName,y=e.rowCount,b=e.style,v=e.useIsScrolling,E=e.width,C=this.state.isScrolling,x=this._getHorizontalRangeToRender(),S=x[0],L=x[1],w=this._getVerticalRangeToRender(),O=w[0],R=w[1],I=[];if(r>0&&y)for(var k=O;k<=R;k++)for(var q=S;q<=L;q++)I.push(d(t,{columnIndex:q,data:p,isScrolling:v?C:void 0,key:f({columnIndex:q,data:p,rowIndex:k}),rowIndex:k,style:this._getItemStyle(k,q)}));var _=a(this.props,this._instanceProps),T=s(this.props,this._instanceProps);return d(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:Wo({position:"relative",height:i,width:E,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},d(c||u||"div",{children:I,ref:l,style:{height:_,pointerEvents:C?"none":void 0,width:T}}))},u._callPropsCallbacks=function(){var e=this.props,t=e.columnCount,n=e.onItemsRendered,r=e.onScroll,o=e.rowCount;if("function"==typeof n&&t>0&&o>0){var i=this._getHorizontalRangeToRender(),a=i[0],s=i[1],l=i[2],c=i[3],u=this._getVerticalRangeToRender(),d=u[0],p=u[1],h=u[2],f=u[3];this._callOnItemsRendered(a,s,d,p,l,c,h,f)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,y=m.scrollLeft,b=m.scrollTop,v=m.scrollUpdateWasRequested,E=m.verticalScrollDirection;this._callOnScroll(y,b,g,E,v)}},u._getHorizontalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanColumnCount,i=e.overscanColumnsCount,a=e.overscanCount,s=e.rowCount,l=this.state,c=l.horizontalScrollDirection,u=l.isScrolling,d=l.scrollLeft,p=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var h=r(this.props,d,this._instanceProps),f=o(this.props,h,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,p),g=u&&"forward"!==c?1:Math.max(1,p);return[Math.max(0,h-m),Math.max(0,Math.min(t-1,f+g)),h,f]},u._getVerticalRangeToRender=function(){var e=this.props,t=e.columnCount,n=e.overscanCount,r=e.overscanRowCount,o=e.overscanRowsCount,i=e.rowCount,a=this.state,s=a.isScrolling,l=a.verticalScrollDirection,c=a.scrollTop,u=r||o||n||1;if(0===t||0===i)return[0,0,0,0];var d=f(this.props,c,this._instanceProps),p=m(this.props,d,c,this._instanceProps),h=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-h),Math.max(0,Math.min(i-1,p+g)),d,p]},t}(u),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var Ma=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},Na=function(e,t){return e};function za(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,p=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,Go(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:Go(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=Oa((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=Oa((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 d=n(r.props,e,r._instanceProps),p=o(r.props,e,r._instanceProps),h="horizontal"===a||"horizontal"===l,f="rtl"===a,m=h?d:0;u[e]=t={position:"absolute",left:f?void 0:m,right:f?m:void 0,top:h?0:d,height:h?"100%":p,width:h?p:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=Oa((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(Aa()){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(){null!==r._resetIsScrollingTimeoutId&&Ia(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=ka(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},(function(){r._getItemStyleCache(-1,null)}))},r}$o(t,e),t.getDerivedStateFromProps=function(e,t){return ja(e,t),p(e),null};var u=t.prototype;return u.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)},u.scrollToItem=function(e,t){void 0===t&&(t="auto");var n=this.props,r=n.itemCount,o=n.layout,a=this.state.scrollOffset;e=Math.max(0,Math.min(e,r-1));var s=0;if(this._outerRef){var l=this._outerRef;s="vertical"===o?l.scrollWidth>l.clientWidth?_a():0:l.scrollHeight>l.clientHeight?_a():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},u.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()},u.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(Aa()){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()},u.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&Ia(this._resetIsScrollingTimeoutId)},u.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,h=void 0===p?Na:p,f=e.layout,m=e.outerElementType,g=e.outerTagName,y=e.style,b=e.useIsScrolling,v=e.width,E=this.state.isScrolling,C="horizontal"===o||"horizontal"===f,x=C?this._onScrollHorizontal:this._onScrollVertical,S=this._getRangeToRender(),L=S[0],w=S[1],O=[];if(c>0)for(var R=L;R<=w;R++)O.push(d(t,{data:u,key:h(R,u),index:R,isScrolling:b?E:void 0,style:this._getItemStyle(R)}));var I=r(this.props,this._instanceProps);return d(m||g||"div",{className:n,onScroll:x,ref:this._outerRefSetter,style:Wo({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},d(s||l||"div",{children:O,ref:a,style:{height:C?"100%":I,pointerEvents:E?"none":void 0,width:C?I:"100%"}}))},u._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)}},u._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),d=o&&"backward"!==i?1:Math.max(1,n),p=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+p)),c,u]},t}(u),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var ja=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},Fa=Pa({getColumnOffset:function(e,t){return t*e.columnWidth},getColumnWidth:function(e,t){return e.columnWidth},getRowOffset:function(e,t){return t*e.rowHeight},getRowHeight:function(e,t){return e.rowHeight},getEstimatedTotalHeight:function(e){var t=e.rowCount;return e.rowHeight*t},getEstimatedTotalWidth:function(e){var t=e.columnCount;return e.columnWidth*t},getOffsetForColumnAndAlignment:function(e,t,n,r,o,i){var a=e.columnCount,s=e.columnWidth,l=e.width,c=Math.max(0,a*s-l),u=Math.min(c,t*s),d=Math.max(0,t*s-l+i+s);switch("smart"===n&&(n=r>=d-l&&r<=u+l?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(l/2)?0:p>c+Math.floor(l/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getOffsetForRowAndAlignment:function(e,t,n,r,o,i){var a=e.rowHeight,s=e.height,l=e.rowCount,c=Math.max(0,l*a-s),u=Math.min(c,t*a),d=Math.max(0,t*a-s+i+a);switch("smart"===n&&(n=r>=d-s&&r<=u+s?"auto":"center"),n){case"start":return u;case"end":return d;case"center":var p=Math.round(d+(u-d)/2);return p<Math.ceil(s/2)?0:p>c+Math.floor(s/2)?c:p;default:return r>=d&&r<=u?r:d>u||r<d?d:u}},getColumnStartIndexForOffset:function(e,t){var n=e.columnWidth,r=e.columnCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getColumnStopIndexForStartIndex:function(e,t,n){var r=e.columnWidth,o=e.columnCount,i=e.width,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},getRowStartIndexForOffset:function(e,t){var n=e.rowHeight,r=e.rowCount;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getRowStopIndexForStartIndex:function(e,t,n){var r=e.rowHeight,o=e.rowCount,i=e.height,a=t*r,s=Math.ceil((i+n-a)/r);return Math.max(0,Math.min(o-1,t+s-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.columnWidth,e.rowHeight}}),Ba=za({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,o,i){var a=e.direction,s=e.height,l=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,p="horizontal"===a||"horizontal"===u?d:s,h=Math.max(0,l*c-p),f=Math.min(h,t*c),m=Math.max(0,t*c-p+c+i);switch("smart"===n&&(n=r>=m-p&&r<=f+p?"auto":"center"),n){case"start":return f;case"end":return m;case"center":var g=Math.round(m+(f-m)/2);return g<Math.ceil(p/2)?0:g>h+Math.floor(p/2)?h:g;default:return r>=m&&r<=f?r:r<m?m:f}},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,d=Math.ceil((u+n-c)/a);return Math.max(0,Math.min(i-1,t+d-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});const Ha="#BBB",Wa="#555",Ua="#f1f1f1",$a={styledScrollbars:"".concat("ListBox","-styledScrollbars")};const{StyledFixedSizeList:Ga,StyledFixedSizeGrid:Va}=function(){const e={scrollbarColor:"".concat(Ha," ").concat(Ua),"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ua},"&::-webkit-scrollbar-thumb":{backgroundColor:Ha,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:Wa}};return{StyledFixedSizeList:z(Ba)((()=>({["&.".concat($a.styledScrollbars)]:e,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ua},"&::-webkit-scrollbar-thumb":{backgroundColor:Ha,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:Wa}}))),StyledFixedSizeGrid:z(Fa)((()=>({["&.".concat($a.styledScrollbars)]:e,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ua},"&::-webkit-scrollbar-thumb":{backgroundColor:Ha,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:Wa}})))}}();const Ka=(e,t)=>{const n=(()=>{const e=document.createDocumentFragment(),t=document.createElement("canvas");return e.appendChild(t),t.getContext("2d")})();if(n.font=t,Array.isArray(e))return Math.max(...e.map((e=>n.measureText(e).width)));return n.measureText(e).width};function Za(e){if(!e)return"";const t=e.qListObject.qDimensionInfo.qApprMaxGlyphCount;let n="";for(let e=0;e<t;e++)n+="M";return n}function Xa(e){let{pages:t,minimumBatchSize:n,count:r,calculatePagesHeight:o=!1}=e;const i=null!=t&&t.length&&o?(e=>{let{pages:t=[],minimumBatchSize:n,count:r}=e;const o=t.some((e=>e.qArea.qHeight<n)),i=Math.max(...t.map((e=>e.qArea.qTop+e.qArea.qHeight)));return o?i:r})({pages:t,minimumBatchSize:n,count:r}):r;return i||0}const[Ja,Ya]=si({});function Qa(e){const t="".concat(e.id),[n]=Ja();return{setStoreValue:(e,r)=>n.set("".concat(t,"/").concat(e),r),getStoreValue:e=>n.get("".concat(t,"/").concat(e))}}function es(e){let{width:n}=e;const{translator:r}=p(ai);return t.createElement(E,{component:"div",variant:"body1",minWidth:n,textAlign:"center",py:"16px"},r.get("Listbox.NoMatchesForYourTerms"))}const ts=["isLoadingData"];function ns(e){var o;let{model:i,selections:s,direction:c,checkboxes:u,height:d,width:p,listLayout:f="vertical",frequencyMode:m,update:g,fetchStart:y,postProcessPages:b,calculatePagesHeight:v=!1,keyboard:E={},showGray:C=!0,scrollState:x,selectDisabled:S=(()=>!1)}=e;const[L,w]=n(!1),[O]=Li(i),R=!(!O||!O.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:I=u,histogram:k}=null!=O?O:{},q=h(null),_=h({queue:[],validPages:!1}),T=h({pages:[]}),A=function(e){let{local:t,loaderRef:r,model:o,fetchStart:i,scrollTimeout:a,postProcessPages:s,listData:l}=e;const[c,u]=n(!1),[d,p]=n([]);let[h]=n(0);const f=(e,n)=>{t.current.queue.push({start:e,stop:n});const c=!!r.current&&r.current._listRef&&r.current._listRef.state.isScrolling;return t.current.queue.length>10&&t.current.queue.shift(),clearTimeout(t.current.timeout),u(!0),new Promise((e=>{t.current.timeout=setTimeout((()=>{const n=t.current.queue.slice(-1)[0],r=o.getListObjectData("/qListObjectDef",[{qTop:n.start>h?n.start-h:0,qHeight:h,qLeft:0,qWidth:1},{qTop:n.start,qHeight:h,qLeft:0,qWidth:1}]).then((n=>{const r=s?s(n):n;t.current.validPages=!0,l.current.pages=r,p(r),u(!1),e()}));i&&i(r)}),c?a:0)}))};return{loadMoreItems:{with(e){let{minimumBatchSize:t}=e;return t&&(h=t),f}},pages:d,isLoading:c}}({local:_,loaderRef:q,model:i,fetchStart:y,scrollTimeout:0,postProcessPages:b,listData:T}),{isLoadingData:D}=A,P=U(A,ts),[M,N]=n([]),{setStoreValue:z}=Qa(i),j=l(P.loadMoreItems,[O]);r((()=>{N((null==P?void 0:P.pages)||[])}),[null==P?void 0:P.pages]);const F=l((e=>{if(null==M||!M.length||!_.current.validPages)return!1;_.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=M.filter((e=>t(e)))[0];return n&&t(n)}),[O,M]),{instantPages:H=[],interactionEvents:$,select:G}=ra({layout:O,selections:s,pages:M,checkboxes:I,selectDisabled:S,doc:document,isSingleSelect:R}),V=()=>{if(_.current.queue=[],_.current.validPages=!1,q.current){if(q.current.resetloadMoreItemsCache(!0),O&&O.qSelectionInfo.qInSelections)return;q.current._listRef.scrollToItem(0)}};g&&g.call(null,V),r((()=>{H&&!D&&N(H)}),[H]),r((()=>{x&&!L&&q.current&&(q.current._listRef.scrollToItem(x.initScrollPos),w(!0))}),[q.current]),r((()=>{V()}),[O]);const K=(e=>{const t=a((()=>"text"in e?e:{}),[e]);return a((()=>Ka(t.text,t.font||"14px Source Sans Pro")),[t.text,t.font])})({text:Za(O),font:"14px Source sans pro"}),{layoutOptions:Z={}}=O||{};let X=100;const J=Z.dataLayout?"singleColumn"===Z.dataLayout:"horizontal"!==f,Y=null==O||null===(o=O.qListObject.qSize)||void 0===o?void 0:o.qcy,Q=Xa({pages:M,minimumBatchSize:X,count:Y,calculatePagesHeight:v});z("listCount",Q);const ee=function(e){let{layout:t,width:n,height:r,listCount:o,count:i,textWidth:a}=e;const{layoutOptions:s={}}=t||{},{layoutOrder:l,maxVisibleRows:c={},maxVisibleColumns:u,dense:d}=s,p=Math.min(150,a+18);let h,f,m,g;const y=d?20:29,b=r||8*y;if(l)if("row"===l){h={overflowX:"hidden"};const e=u.maxColumns||3;f=!1!==u.auto?Math.min(o,Math.ceil((n-10)/p)):Math.min(o,e),g=Math.ceil(o/f),m=(n-10)/f}else{h={overflowY:"hidden"};const e=c.maxRows||3;g=!1!==c.auto?Math.floor(b/y):Math.min(o,e),f=Math.ceil(o/g),m=Math.max(p,n/f)}return{columnCount:f,columnWidth:m,rowCount:g,overflowStyling:h,itemSize:y,listHeight:b,scrollBarWidth:10,count:i,listCount:o}}({layout:O,width:p,height:d,listCount:Q,count:Y,textWidth:K}),{textAlign:te}=(null==O?void 0:O.qListObject.qDimensionInfo)||{},{List:ne,Grid:re}=function(e){let{layout:n,width:r,checkboxes:o,local:i,isVertical:a,pages:s,selectDisabled:l,interactionEvents:c,frequencyMode:u,histogram:d,isSingleSelect:p,select:h,textAlign:f,selections:m,keyboard:g,showGray:y,scrollState:b,direction:v,listLayout:E,sizes:C,listCount:x}=e;const{layoutOptions:S={},frequencyMax:L}=n||{},{dense:w=!1}=S||{},{listHeight:O,itemSize:R,rowCount:I,columnCount:k}=C||{},q={direction:"rtl"===v?"rtl":"ltr",useIsScrolling:!0,className:$a.styledScrollbars},_=null==n?void 0:n.qListObject.qDimensionInfo.qLocked,T=B(B({isLocked:_,column:!a,pages:s},_||l()?{}:c),{},{checkboxes:o,dense:w,frequencyMode:u,freqIsAllowed:Sa({width:r,layout:n,frequencyMode:u}),isSingleSelect:p,textAlign:f,actions:{select:h,confirm:()=>null==m?void 0:m.confirm.call(m),cancel:()=>null==m?void 0:m.cancel.call(m)},frequencyMax:L,histogram:d,keyboard:g,showGray:y});return{List:e=>{let{onItemsRendered:n,ref:o}=e;return i.current.listRef=o,t.createElement(Ga,W({},q,{dataTestid:"fixed-size-list",height:O,width:r,itemCount:x,layout:E,itemData:B({},T),itemSize:R,onItemsRendered:e=>{b&&b.setScrollPos(e.visibleStopIndex),n(B({},e))},ref:o}),xa)},Grid:e=>{let{onItemsRendered:n,ref:o}=e;const{columnWidth:a,overflowStyling:s,scrollBarWidth:l}=C,{layoutOrder:c}=S||{},u=Math.min(O,I*R+l);return i.current.listRef=o,t.createElement(Va,W({},q,{dataTestid:"fixed-size-grid",height:u,width:r,columnCount:k,columnWidth:a,rowCount:I,rowHeight:R,style:B({},s),itemData:B(B({},T),{},{column:void 0,columnCount:k,rowCount:I,layoutOrder:c}),onItemsRendered:e=>{const t=function(e){const{renderProps:t,scrollState:n,layoutOrder:r,rowCount:o,columnCount:i}=e,{overscanRowStartIndex:a,overscanRowStopIndex:s,overscanColumnStartIndex:l,overscanColumnStopIndex:c,visibleStopIndex:u}=t;let d,p,h,f;return n&&n.setScrollPos(u),"column"===r?(d=l*o,p=a,h=c*o,f=s):(d=l,p=a*i,h=c,f=s*i),{visibleStartIndex:d+p,visibleStopIndex:h+f}}({renderProps:e,scrollState:b,layoutOrder:c,rowCount:I,columnCount:k});n(t)},ref:o}),xa)}}}({direction:c,layout:O,height:d,width:p,checkboxes:I,frequencyMode:m,histogram:k,keyboard:E,showGray:C,interactionEvents:$,select:G,textAlign:te,isVertical:J,pages:M,selectDisabled:S,isSingleSelect:R,selections:s,scrollState:x,local:_,sizes:ee,listCount:Q}),{columnWidth:oe,listHeight:ie,itemSize:ae}=ee||{};return J||(X=function(e){let{width:t,columnWidth:n,listHeight:r,itemSize:o}=e;return Math.ceil(t/n)*Math.ceil(r/o)*2}({width:p,columnWidth:oe,listHeight:ie,itemSize:ae})),t.createElement(t.Fragment,null,!Q&&t.createElement(es,{width:p}),t.createElement(Xi,{isItemLoaded:F,itemCount:Q||1,loadMoreItems:j.with({minimumBatchSize:X}),threshold:0,minimumBatchSize:X,ref:q},J?ne:re))}const rs=e=>B(B({},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"}}]}),os=e=>B(B({},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"}}]}),is=e=>B(B({},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"}}]}),as=e=>B(B({},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 ss=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:rs,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:is,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:os,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:as,enabled:()=>["qAlternative","qExcluded"].some((e=>t.qListObject.qDimensionInfo.qStateCounts[e]>0)),action:()=>{n.selectListObjectExcluded("/qListObjectDef")}}]};const ls=e=>B(B({},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 cs(e){const t=Fo(),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 us="njs-cell-action",ds=t.forwardRef(((e,n)=>{let{ariaExpanded:r=!1,item:o,addAnchor:i=!1}=e;const a=Fo(),{hidden:s,disabled:l,style:c,hasSvgIconShape:u}=cs(o);if(s)return null;const d=Number.parseInt(a.spacing(.5),10),p=o.keyboardAction?e=>["Enter"," ","Spacebar"].includes(e.key)&&o.keyboardAction():null;return t.createElement(x,{ref:i?null:n,title:o.label,onClick:o.action,onKeyDown:p,disabled:l,style:c,className:us,size:"large","aria-expanded":r,"aria-controls":"moreMenuList"},u&&Wi(o.getSvgIconShape()),i&&t.createElement("div",{ref:n,style:{bottom:-d,right:0,position:"absolute",width:"100%",height:0}}))})),ps=e=>B(B({},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"}}]}),hs=e=>B(B({},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 fs=e=>Wi(hs(e));const ms={icon:"".concat("More","-icon")},gs=Ho(S)((e=>{let{theme:t}=e;return{["& .".concat(ms.icon)]:{color:t.palette.text.primary}}}));function ys(e){let{item:n,onActionClick:r=(()=>{})}=e;const{hidden:o,disabled:i,hasSvgIconShape:a}=cs(n);return o?null:t.createElement(w,{title:n.label,onClick:()=>{n.action(),r()},disabled:i,tabindex:"0"},a&&t.createElement(O,{className:ms.icon},Wi(n.getSvgIconShape())),t.createElement(E,{noWrap:!0},n.label))}const bs=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(gs,W({},a,{onClose:l,ref:n,open:o,anchorEl:i.current,getContentAnchorEl:null,hideBackdrop:!0,style:{pointerEvents:"none"},transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},PaperProps:{style:B({pointerEvents:"auto",maxWidth:"250px"},s)}}),t.createElement(L,{id:"moreMenuList"},r.map(((e,n)=>t.createElement(ys,{key:n,item:e,onActionClick:l})))))})),vs="ActionsToolbar",Es={itemSpacing:"".concat(vs,"-itemSpacing"),firstItemSpacing:"".concat(vs,"-firstItemSpacing"),lastItemSpacing:"".concat(vs,"-lastItemSpacing")},Cs=Ho(S)((e=>{let{theme:t}=e;return{["& .".concat(Es.itemSpacing)]:{padding:t.spacing(0,.5)},["& .".concat(Es.firstItemSpacing)]:{padding:t.spacing(0,.5,0,0)},["& .".concat(Es.lastItemSpacing)]:{padding:t.spacing(0,0,0,.5)}}})),xs="njs-action-toolbar-popover",Ss=t.forwardRef(((e,n)=>{let{ariaExpanded:r=!1,actions:o=[],first:i=!1,last:a=!1,addAnchor:s=!1}=e;return o.length>0?t.createElement(v,{item:!0,container:!0,gap:0,wrap:"nowrap"},o.map(((e,l)=>{let c=[];const u=i&&0===l,d=a&&o.length-1===l;return u&&!d&&(c=[Es.firstItemSpacing]),d&&!u&&(c=[...c,Es.lastItemSpacing]),u||d||0!==c.length||(c=[Es.itemSpacing]),t.createElement(v,{item:!0,key:e.key,className:c.join(" ").trim()},t.createElement(ds,{ariaExpanded:r,key:e.key,item:e,ref:0===l?n:null,addAnchor:s}))}))):null})),Ls={pointerEvents:"none"},ws={vertical:"top",horizontal:"right"},Os={vertical:"bottom",horizontal:"right"};function Rs(e){let{show:o=!0,actions:i=[],maxItems:s=3,selections:l={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},more:c={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{}},popover:u={show:!1,anchorEl:null},focusHandler:d=null,actionsRefMock:f=null}=e;const m=function(e){let{api:t,onConfirm:n=(()=>{}),onCancel:r=(()=>{}),onKeyDeactivate:o=(()=>{})}=e;const{translator:i}=p(ai);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>t.canClear(),action:()=>t.clear(),getSvgIconShape:hs},{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:ps},{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:oa}]}(l),{translator:g,keyboardNavigation:y}=p(ai),[b,E]=n(!1),[C,x]=n(c.enabled),[S,L]=n(c.actions),w=h(),O=h(),I=Fo(),k=a((()=>({margin:I.spacing(.5,0)}))),q=e=>{const t=O.current||f;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]};r((()=>()=>E(!1)),[u.show]),r((()=>{x(c.enabled)}),[c.enabled]),r((()=>{if(!d)return;d.on("focus_toolbar_first",(()=>{const e=q(!1);e&&e.focus()})),d.on("focus_toolbar_last",(()=>{const e=q(!0);e&&e.focus()}))}),[]);const _=a((()=>i.filter((e=>!e.hidden))),[i]);if(!l.show&&0===_.length)return null;const T={key:"more",label:g.get("Menu.More"),getSvgIconShape:ls,hidden:!1,active:b,enabled:()=>C,action:()=>E(!b)};if(_.length>s){const e=_.splice(-(_.length-s)-1);x(!0),L([...e,...c.actions])}const A=y&&d&&d.refocusContent?e=>{if("Tab"!==e.key)return;(e.shiftKey&&q(!1)===e.target||!e.shiftKey&&q(!0)===e.target)&&(e.preventDefault(),e.stopPropagation(),d.refocusContent())}:null,D=_.length>0,P=S.length>0,M=D&&l.show||P&&l.show,N=t.createElement(v,{ref:O,onKeyDown:A,container:!0,gap:0,wrap:"nowrap"},D&&t.createElement(Ss,{actions:_,first:!0,last:!P&&!l.show}),P&&t.createElement(Ss,{ref:w,ariaExpanded:b,actions:[T],first:!D,last:!l.show,addAnchor:!0}),M&&t.createElement(v,{item:!0,className:Es.itemSpacing,style:k},t.createElement(R,{orientation:"vertical"})),l.show&&t.createElement(Ss,{actions:m,first:!D&&!P,last:!0}),b&&t.createElement(bs,{show:b,actions:S,alignTo:w,popoverProps:c.popoverProps,popoverPaperStyle:c.popoverPaperStyle,onCloseOrActionClick:()=>{E(!1)}}));return u.show?t.createElement(Cs,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:u.show,anchorEl:u.anchorEl,anchorOrigin:ws,transformOrigin:Os,hideBackdrop:!0,style:Ls,PaperProps:{className:xs,style:{pointerEvents:"auto",padding:I.spacing(1,1)}}},N):o&&N}var Is=e=>Wi((e=>B(B({},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));const ks="/qListObjectDef",qs=Ho(I)((e=>{var t,n;let{theme:r}=e;return{color:null===(t=r.listBox)||void 0===t||null===(n=t.content)||void 0===n?void 0:n.color}})),_s=Ho(k)((e=>{var t,n;let{theme:r}=e;return{color:null===(t=r.listBox)||void 0===t||null===(n=t.content)||void 0===n?void 0:n.color}}));function Ts(e){let{selections:o,model:i,keyboard:a,dense:s=!1,visible:l=!0}=e;const{translator:c}=p(ai),[u,d]=n(""),h=Fo(),{getStoreValue:f}=Qa(i),m=async()=>{if(o.isModal())try{await i.abortListObjectSearch(ks)}finally{d("")}};r((()=>{l||m()}),[l]),r((()=>(o.on("deactivated",m),()=>{o.removeListener&&o.removeListener("deactivated",m)})),[]);const g=async()=>{let e;return await i.searchListObjectFor(ks,u)&&u.length&&f("listCount")>0&&(e=i.acceptListObjectSearch(ks,!0),o.selectionsMade=!0,d("")),e};return l?t.createElement(_s,{startAdornment:t.createElement(qs,{position:"start"},t.createElement(Is,{size:s?"small":"normal"})),className:"search",sx:[{border:"none",borderRadius:0,backgroundColor:"transparent","& fieldset":{border:"1px solid ".concat(h.palette.divider),borderWidth:"1px 0 1px 0",borderRadius:0},"&:hover":{border:"none"}},s&&{fontSize:12,paddingLeft:h.spacing(1),"& input":{paddingTop:"5px",paddingBottom:"5px"}}],size:"small",fullWidth:!0,placeholder:c.get("Listbox.Search"),value:u,onFocus:()=>{o.isModal()||o.begin(["/qListObjectDef"])},onChange:async e=>(d(e.target.value),e.target.value.length?i.searchListObjectFor(ks,e.target.value):m()),onKeyDown:async e=>{let t;switch(e.key){case"Enter":t=await g();break;case"Escape":t=o.isActive()&&o.cancel(),e.preventDefault(),e.stopPropagation()}return t},inputProps:{tabIndex:!a||a.enabled&&!a.active?-1:0}}):null}function As(e){return Object.keys(Y.prototype).forEach((t=>{e[t]=Y.prototype[t]})),Y.init(e),e}const Ds=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 As(s),s},Ps=e=>{let{elements:t,objectSelections:n}=e;const r=function(e){let{elements:t,handleClickOutside:n}=e;return e=>{if(!document.contains(e.target))return;const r=t.map((e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current)).filter((e=>!!e&&!!document.contains(e)));r.length&&!r.some((t=>t.contains(e.target)))&&n(e)}}({elements:t,handleClickOutside:()=>n.confirm.call(n)});return{activateClickOut(){document.addEventListener("mousedown",r)},deactivateClickOut(){document.removeEventListener("mousedown",r)}}};function Ms(e,t,n){const o=Array.isArray(n)?n:[n],[i]=zi(e),[a]=Li(t),s=t?t.id:null,[l]=Ti(),[c]=Di(),u=l.get(e.id);let d=c.get(s);return r((()=>{i&&t&&!d&&(d=Ds({appSelections:i,appModal:u,model:t}),c.set(s,d),c.dispatch(!0))}),[i,t]),r((()=>{if(!d)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=Ps({elements:o,objectSelections:d});return d.addListener("activated",e),d.addListener("deactivated",t),()=>{d.removeListener("activated",e),d.removeListener("deactivated",t)}}),[d]),r((()=>{d&&d.setLayout(a)}),[d,a]),[d]}const Ns=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;return null!==(n=null==e?void 0:e[t])&&void 0!==n?n:r};function zs(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return Ns(t,"qSelected",0)+Ns(t,"qSelectedExcluded",0)+Ns(t,"qLocked",0)+Ns(t,"qLockedExcluded",0)>0}function js(e){let{alignTo:o,show:i,close:a,app:s,fieldName:c,stateName:u="$"}=e;const d=i&&Boolean(o.current),[f,m]=n(0),g=Fo(),[y]=Oi({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:u,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],qFieldDefs:[c]}}},s,c,u),b=l((()=>{y.lock("/qListObjectDef")}),[y]),E=l((()=>{y.unlock("/qListObjectDef")}),[y]),{translator:C}=p(ai),L=h(),w=h(),[O]=Ms(s,y,w),[R]=Li(y);if(r((()=>{O&&d&&(O.isModal(y)||O.goModal("/qListObjectDef"))}),[O,d]),!y||!R||!C)return null;const I=!0===R.qListObject.qDimensionInfo.qLocked,k=(e,t)=>{const n="escapeKeyDown"!==t;O.noModal(n),a()},q=ss({layout:R,model:y,translator:C}),_=zs(R);return t.createElement(S,{open:d,onClose:k,anchorEl:o.current,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"250px"}}},t.createElement(v,{container:!0,direction:"column",gap:0,ref:w},t.createElement(v,{item:!0,container:!0,style:{padding:g.spacing(1)}},t.createElement(v,{item:!0},I?t.createElement(x,{onClick:E,disabled:!I,size:"large"},t.createElement($i,{title:C.get("Listbox.Unlock")})):t.createElement(x,{onClick:b,disabled:!_,size:"large"},t.createElement(Gi,{title:C.get("Listbox.Lock")}))),t.createElement(v,{item:!0,xs:!0}),t.createElement(v,{item:!0},t.createElement(Rs,{more:{enabled:!I,actions:q,alignTo:L,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:O,onConfirm:k,onCancel:()=>k(0,"escapeKeyDown")}}))),t.createElement(v,{item:!0,xs:!0},t.createElement("div",{ref:L}),t.createElement(Ts,{selections:O,model:y,listCount:f,visible:!0}),t.createElement(ns,{model:y,selections:O,direction:"ltr",onSetListCount:e=>m(e)}))))}function Fs(e){let{field:r,api:o,stateIx:i=0,skipHandleShowListBoxPopover:a=!1,moreAlignTo:s=null,onClose:l=(()=>{})}=e;const{translator:c}=p(ai),u=s||h(),d=Fo(),[f,m]=n(!1),g=e=>{e.currentTarget.contains(e.target)&&m(!f)},y=()=>{m(!1),l()},b=r.selections[i];void 0===b.qTotal&&(b.qTotal=0);const C=b.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},S=(C.qSelected+C.qLocked)/b.qTotal,L=C.qAlternative/b.qTotal,w=(C.qExcluded+C.qLockedExcluded+C.qSelectedExcluded)/b.qTotal,O=C.qSelected+C.qSelectedExcluded+C.qLocked+C.qLockedExcluded,R=0===O&&0===b.qTotal;let I="";b.qTotal===O&&b.qTotal>1?I=c.get("CurrentSelections.All"):O>1&&b.qTotal?I=c.get("CurrentSelections.Of",[O,b.qTotal]):b.qSelectedFieldSelectionInfo&&(I=b.qSelectedFieldSelectionInfo.map((e=>e.qName)).join(", ")),"$"!==r.states[i]&&(I="".concat(r.states[i],": ").concat(I));const k=[{color:d.palette.selected.main,ratio:S},{color:d.palette.selected.alternative,ratio:L},{color:d.palette.selected.excluded,ratio:w}];k.forEach(((e,t)=>{e.offset=t?k[t-1].offset+k[t-1].ratio:0}));let q=null,_=null,T=null,A=null;return s||(q=t.createElement(v,{item:!0,xs:!0,style:{minWidth:0,flexGrow:1,opacity:b.qLocked?"0.3":""}},t.createElement(E,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},b.qField),t.createElement(E,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"}},I)),b.qLocked?_=t.createElement(v,{item:!0},t.createElement(x,{size:"large"},t.createElement($i,null))):b.qOneAndOnlyOne||(_=t.createElement(v,{item:!0},t.createElement(x,{title:c.get("Selection.Clear"),onClick:e=>{e.stopPropagation(),o.clearField(b.qField,r.states[i])},size:"large"},t.createElement(Ui,null)))),T=t.createElement("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"}},!1===R&&k.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(v,{container:!0,gap:1,ref:u,sx:{backgroundColor:d.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:d.palette.action.hover}},onClick:!1===a&&g||null},q,_,T,f&&t.createElement(js,{alignTo:u,show:f,close:y,app:o.model,fieldName:b.qField,stateName:r.states[i]}))),s?t.createElement(js,{alignTo:u,show:!0,close:y,app:o.model,fieldName:b.qField,stateName:r.states[i]}):A}var Bs=e=>Wi((e=>B(B({},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 Hs={item:"".concat("MultiState","-item")},Ws=Ho(v)((e=>{let{theme:t}=e;return{["&.".concat(Hs.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"}}}));function Us(e){let{field:r,api:o,moreAlignTo:i=null,onClose:a=(()=>{})}=e;const[s,l]=n(!!i),[c,u]=n(-1),[d,f]=n(i?i.current:null),m=i||h(),{translator:g}=p(ai),y=g.get("Selection.ClearAllStates"),b=()=>{u(-1),a()};let C=null;i||(C=t.createElement(t.Fragment,null,t.createElement(v,{item:!0,xs:!0,zeroMinWidth:!0},t.createElement(q,{style:{padding:"0px 8px"},color:"secondary",badgeContent:r.states.length},t.createElement(E,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600}},r.name))),t.createElement(v,{item:!0},t.createElement("div",{style:{width:"12px"}})),t.createElement(v,{item:!0},t.createElement(x,{size:"large"},t.createElement(Bs,null)))));const L=t.createElement(_,{dense:!0},t.createElement(T,{title:y,onClick:()=>{r.states.forEach((e=>o.clearField(r.name,e)))}},t.createElement(A,{variant:"contained",fullWidth:!0},y)),r.states.map(((e,n)=>t.createElement(T,{key:n,title:r.name,onClick:e=>((e,t)=>{e.stopPropagation(),l(!1),u(t)})(e,n)},t.createElement(D,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},t.createElement(Fs,{field:r,api:o,stateIx:n,skipHandleShowListBoxPopover:!0})))))),w=t.createElement(S,{open:s,onClose:()=>{l(!1),a()},anchorEl:d,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}}},L),O=i?w:t.createElement(Ws,{container:!0,gap:0,className:Hs.item,onClick:e=>{e.currentTarget.contains(e.target)&&(f(e.currentTarget),m.current=e.currentTarget,l(!s))}},C,s&&w,c>-1&&t.createElement(js,{alignTo:m,show:c>-1,close:b,app:o.model,fieldName:r.selections[c].qField,stateName:r.states[c]}));return i&&c>-1?t.createElement(js,{alignTo:m,show:c>-1,close:b,app:o.model,fieldName:r.selections[c].qField,stateName:r.states[c]}):O}const $s="More",Gs={item:"".concat($s,"-item"),badge:"".concat($s,"-badge")},Vs=Ho(v)((e=>{let{theme:t}=e;return{["&.".concat(Gs.item)]:{backgroundColor:t.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:t.palette.action.hover},height:"100%",alignItems:"center"},["& .".concat(Gs.badge)]:{padding:t.spacing(0,1)}}}));function Ks(e){let{items:r=[],api:o}=e;const i=Fo(),[a,s]=n(!1),[l,c]=n(-1),[u,d]=n(null),p=h(),f=()=>{c(-1)};let m=null;return l>-1&&(m=r[l].states.length>1?t.createElement(Us,{field:r[l],api:o,moreAlignTo:p,onClose:f}):t.createElement(Fs,{field:r[l],api:o,skipHandleShowListBoxPopover:!0,moreAlignTo:p,onClose:f})),t.createElement(Vs,{container:!0,gap:0,className:Gs.item,onClick:e=>{e.currentTarget.contains(e.target)&&(d(e.currentTarget),p.current=e.currentTarget,s(!a))}},t.createElement(v,{item:!0},t.createElement(D,{borderRadius:i.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:i.palette.selected.main,color:i.palette.selected.mainContrastText}},t.createElement(E,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit"},"+",r.length))),t.createElement(v,{item:!0},t.createElement(x,{size:"large"},t.createElement(Bs,null))),a&&t.createElement(S,{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(_,{dense:!0},r.map(((e,n)=>t.createElement(T,{key:n,title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),s(!1),c(t)})(e,n)},t.createElement(D,{border:1,width:"100%",borderRadius:1,borderColor:"divider"},e.states.length>1?t.createElement(Us,{field:e,api:o}):t.createElement(Fs,{field:e,api:o}))))))),m)}function Zs(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 Xs(e){let{api:o,app:i}=e;const a=Fo(),[s]=Ii(i),[l]=Li(s),[c,u]=n({items:[],more:[]}),[d]=Mi(),[p,h]=Bi(),[f,m]=n(0);return r((()=>{if(!h)return;const{width:e}=h,t=Math.floor(e)-72,n=Math.floor(t/120);m(n)}),[h]),r((()=>{if(!(i&&s&&l&&f))return;const e=function(e){if(!e)return[];const t={};return e.qSelectionObject&&Zs(e.qSelectionObject,t),e.alternateStates&&e.alternateStates.forEach((e=>Zs(e.qSelectionObject,t,e.stateName))),Object.keys(t).map((e=>t[e]))}(l);u((t=>{const n=e;if((()=>{const e=d.get(i.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 r=[];return f<n.length&&(r=n.splice(f-n.length)),{items:n,more:r}}))}),[i,s,l,o.isInModal(),f]),t.createElement(v,{ref:p,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"}},c.items.map((e=>t.createElement(v,{item:!0,key:"".concat(e.states.join("::"),"::").concat(e.name),style:{position:"relative",maxWidth:"240px",minWidth:"".concat(120,"px"),background:a.palette.background.paper,borderRight:"1px solid ".concat(a.palette.divider)}},e.states.length>1?t.createElement(Us,{field:e,api:o}):t.createElement(Fs,{field:e,api:o})))),c.more.length>0&&t.createElement(v,{item:!0,style:{position:"relative",maxWidth:"98px",minWidth:"".concat(72,"px"),background:a.palette.background.paper,borderRight:"1px solid ".concat(a.palette.divider)}},t.createElement(Ks,{items:c.more,api:o})))}var Js=e=>Wi((e=>B(B({},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 Ys=e=>Wi((e=>B(B({},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 Qs(e){let{api:n,app:r}=e;const{translator:o}=p(ai),[i]=ki(r);return t.createElement(v,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"}},t.createElement(v,{item:!0},t.createElement(x,{style:{marginRight:"8px"},disabled:!i||!i.canGoBack,title:o.get("Navigate.Back"),onClick:()=>n.back(),size:"large"},t.createElement(Js,null))),t.createElement(v,{item:!0},t.createElement(x,{style:{marginRight:"8px"},disabled:!i||!i.canGoForward,title:o.get("Navigate.Forward"),onClick:()=>n.forward(),size:"large"},t.createElement(Ys,null))),t.createElement(v,{item:!0},t.createElement(x,{disabled:!i||!i.canClear,title:o.get("Selection.ClearAll"),onClick:()=>n.clear(),size:"large"},t.createElement(fs,null))))}function el(e){let{app:n}=e;const r=Fo(),[o]=zi(n);return o?t.createElement(v,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:r.palette.background.paper,minHeight:"40px"}},t.createElement(v,{item:!0,style:{borderRight:"1px solid ".concat(r.palette.divider)}},t.createElement(Qs,{api:o,app:n})),t.createElement(v,{item:!0,xs:!0,style:{backgroundColor:r.palette.background.darker,overflow:"hidden"}},t.createElement(Xs,{api:o,app:n}))):null}function tl(e){let{element:n,app:r}=e;return f.createPortal(t.createElement(el,{app:r}),n)}var nl=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},rl=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}}(),ol=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},il=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},al=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")},sl=void 0;sl="undefined"!=typeof window?window:"undefined"!=typeof self?self:global;var ll=null,cl=null,ul=sl.clearTimeout,dl=sl.setTimeout,pl=sl.cancelAnimationFrame||sl.mozCancelAnimationFrame||sl.webkitCancelAnimationFrame,hl=sl.requestAnimationFrame||sl.mozRequestAnimationFrame||sl.webkitRequestAnimationFrame;function fl(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__&&ll(this.__resizeRAF__),this.__resizeRAF__=cl((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 d="Webkit Moz O ms".split(" "),p="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h=document.createElement("fakeelement");if(void 0!==h.style.animationName&&(c=!0),!1===c)for(var f=0;f<d.length;f++)if(void 0!==h.style[d[f]+"AnimationName"]){u="-"+d[f].toLowerCase()+"-",r=p[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,d=sl.getComputedStyle(i);d&&"static"===d.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 p=u.createElement("div");p.className="expand-trigger",p.appendChild(u.createElement("div"));var h=u.createElement("div");h.className="contract-trigger",i.__resizeTriggers__.appendChild(p),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==pl||null==hl?(ll=ul,cl=function(e){return dl(e,20)}):(ll=function(e){var t=al(e,2),n=t[0],r=t[1];pl(n),ul(r)},cl=function(e){var t=hl((function(){ul(n),e()})),n=dl((function(){pl(t),e()}),20);return[t,n]});var ml=function(e){function t(){var e,n,r;nl(this,t);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=il(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,d=parseInt(s.paddingBottom,10)||0,p=i-u-d,h=a-l-c;(!t&&r.state.height!==p||!n&&r.state.width!==h)&&(r.setState({height:i-u-d,width:a-l-c}),o({height:i,width:a}))}},r._setRef=function(e){r._autoSizer=e},il(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,u),rl(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=fl(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),d("div",{className:n,ref:this._setRef,style:ol({},c,i)},!p&&t(u))}}]),t}();ml.defaultProps={onResize:function(){},disableHeight:!1,disableWidth:!1,style:{}};const gl="ListBoxInline",yl={listBoxHeader:"".concat(gl,"-listBoxHeader"),screenReaderOnly:"".concat(gl,"-screenReaderOnly")},bl=Ho(v)((e=>{var t,n;let{theme:r}=e;return{backgroundColor:null!==(t=null===(n=r.listBox)||void 0===n?void 0:n.backgroundColor)&&void 0!==t?t:r.palette.background.default,["& .".concat(yl.listBoxHeader)]:{alignSelf:"center",display:"inline-flex"},["& .".concat(yl.screenReaderOnly)]:{position:"absolute",height:0,width:0,overflow:"hidden"}}})),vl=Ho(E)((e=>{var t,n,r,o,i,a,s,l,c;let{theme:u}=e;return{color:null===(t=u.listBox)||void 0===t||null===(n=t.title)||void 0===n||null===(r=n.main)||void 0===r?void 0:r.color,fontSize:null===(o=u.listBox)||void 0===o||null===(i=o.title)||void 0===i||null===(a=i.main)||void 0===a?void 0:a.fontSize,fontFamily:null===(s=u.listBox)||void 0===s||null===(l=s.title)||void 0===l||null===(c=l.main)||void 0===c?void 0:c.fontFamily}}));function El(e){var o,i;let{options:a={}}=e;const{direction:s,frequencyMode:c,listLayout:u,checkboxes:d,search:f=!0,focusSearch:m=!1,toolbar:g=!0,rangeSelect:y=!0,model:b,selections:E,update:C,fetchStart:S,selectDisabled:L=(()=>!1),postProcessPages:w,calculatePagesHeight:O,showGray:R=!0,scrollState:I}=a,k=Fo(),q=l((()=>{b.lock("/qListObjectDef")}),[b]),_=l((()=>{b.unlock("/qListObjectDef")}),[b]),{translator:T,keyboardNavigation:A,themeApi:D}=p(ai);k.listBox=(e=>{const t=t=>e.getStyle("object","","listBox.".concat(t));return{backgroundColor:t("backgroundColor"),title:{main:{color:t("title.main.color"),fontSize:t("title.main.fontSize"),fontFamily:t("title.main.fontFamily")}},content:{color:t("content.color"),fontSize:t("content.fontSize"),fontFamily:t("content.fontFamily")}}})(D);const P=h(),[M,N]=(()=>{const[e,t]=n({}),r=l((e=>{t({current:e})}),[t]);return[e,r]})(),[z]=Li(b),[j,F]=n(!1),[B,H]=n(!1),[W,U]=n(!1),$=ga({setKeyboardActive:U}),G={enabled:A,active:W};if(r((()=>{const e=()=>{F(!0)},t=()=>{F(!1),"toggle"===f&&H(!1)};return E&&(E.isModal()||(E.on("deactivated",t),E.on("activated",e)),F(E.isActive())),()=>{E&&E.removeListener&&(E.removeListener("deactivated",e),E.removeListener("activated",t))}}),[E]),r((()=>{if(M&&M.current&&(f&&m||"toggle"===f&&B)){const e=M.current.querySelector("input");e&&e.focus()}}),[M&&M.current,B,f,m]),!b||!z||!T)return null;const V=!0===z.qListObject.qDimensionInfo.qLocked,K=g?ss({layout:z,model:b,translator:T}):[],Z=zs(z),X=(!0===f||"toggle"===f&&B)&&!L(),J=null!==(o=null===(i=z.layoutOptions)||void 0===i?void 0:i.dense)&&void 0!==o&&o,Y=49+(X?J?27:40:0)+(J?39:49),Q=()=>{H(!B)};return t.createElement(bl,{className:"listbox-container",container:!0,tabIndex:G.enabled&&!G.active?0:-1,direction:"column",gap:0,style:{height:"100%",minHeight:"".concat(Y,"px"),flexFlow:"column nowrap"},onKeyDown:$},g&&t.createElement(v,{item:!0,container:!0,style:{padding:k.spacing(1)}},t.createElement(v,{item:!0},V?t.createElement(x,{tabIndex:-1,onClick:_,disabled:!V,size:"large"},t.createElement($i,{title:T.get("Listbox.Unlock")})):"toggle"!==f||Z?t.createElement(x,{onClick:q,tabIndex:-1,disabled:!Z,size:"large"},t.createElement(Gi,null)):t.createElement(x,{onClick:Q,tabIndex:-1,title:T.get("Listbox.Search"),size:"large"},t.createElement(Is,null))),t.createElement(v,{item:!0,className:yl.listBoxHeader},t.createElement(vl,{variant:"h6",noWrap:!0},z.title||z.qListObject.qDimensionInfo.qFallbackTitle)),t.createElement(v,{item:!0,xs:!0}),t.createElement(v,{item:!0},t.createElement(Rs,{more:{enabled:!V,actions:K,alignTo:P,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:j,api:E,onConfirm:()=>{},onCancel:()=>{}}}))),t.createElement(v,{item:!0,container:!0,direction:"column",style:{height:"100%",minHeight:"".concat(Y,"px")},role:"region","aria-label":T.get("Listbox.ResultFilterLabel")},t.createElement(v,{item:!0,ref:N},t.createElement("div",{className:yl.screenReaderOnly},T.get("Listbox.Search.ScreenReaderInstructions")),t.createElement(Ts,{selections:E,model:b,dense:J,keyboard:G,visible:X,searchContainerRef:N})),t.createElement(v,{item:!0,xs:!0},t.createElement("div",{ref:P}),t.createElement("div",{className:yl.screenReaderOnly},T.get("Listbox.ScreenReaderInstructions")),t.createElement(ml,null,(e=>{let{height:n,width:r}=e;return t.createElement(ns,{model:b,selections:E,direction:s,listLayout:u,frequencyMode:c,rangeSelect:y,checkboxes:d,height:n,width:r,update:C,fetchStart:S,postProcessPages:w,calculatePagesHeight:O,selectDisabled:L,keyboard:G,showGray:R,scrollState:I})})))))}function Cl(e){let{app:o,fieldIdentifier:i,qId:a,stateName:s,element:l,options:c}=e;const{isExistingObject:u,hasExternalSelectionsApi:d}=function(e){let{qId:t,options:n}=e;return{isExistingObject:!(!t&&!n.sessionModel),hasExternalSelectionsApi:!!n.selectionsApi}}({qId:a,options:c}),[p,f]=n(0);r((()=>{if(p)throw new Error("Source or selection Api can not change after a listbox has been mounted");f(p+1)}),[u,d]);const m=u?function(e){let{app:t,qId:o,options:i={}}=e;const[a,s]=n(),[l]=Ei(),{sessionModel:c}=i,u=["dense","frequencyMode","checkboxes","histogram","title","stateName","listLayout"],d=Object.keys(i).filter((e=>u.includes(e)));if(d.length)throw new Error('Option "'.concat(d.join(", "),'" is not applicable for existing objects.'));return r((()=>{c?s(c):async function(){const e=l.get(o);if(e)s(e);else{const e=await t.getObject(o);l.set(e.id,e),s(e)}}()}),[]),a}({app:o,qId:a,options:c}):function(e){let{app:t,fieldIdentifier:o,stateName:i,options:a={}}=e;const[s,l]=n(""),[c,u]=n(!0),[d,p]=n();r((()=>{const e=a.histogram||"N"!==a.frequencyMode;o.qLibraryId&&e?async function(){try{const e=await t.getDimension(o.qLibraryId),n=await e.getLayout();l(n.qDim.qFieldDefs?n.qDim.qFieldDefs[0]:""),u(!1)}catch(e){throw u(!1),l({failedToFetchFieldDef:!0}),new Error("Disabling frequency count and histogram: ".concat(e&&e.message))}}():u(!1)}),[]);const{title:h,dense:f,checkboxes:m,properties:g={}}=a;let{frequencyMode:y,histogram:b=!1}=a;switch(s&&s.failedToFetchFieldDef&&(b=!1,y="N"),!0){case["none","N","NX_FREQUENCY_NONE"].includes(y):y="N";break;case["value","V","NX_FREQUENCY_VALUE","default"].includes(y):y="V";break;case["percent","P","NX_FREQUENCY_PERCENT"].includes(y):y="P";break;case["relative","R","NX_FREQUENCY_RELATIVE"].includes(y):y="R";break;default:y="N"}const v={qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:i,qShowAlternatives:!0,qFrequencyMode:b&&"N"===y?"V":y,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}]}},histogram:b,checkboxes:m,layoutOptions:{dense:f},title:h};let E;if(He(!0,v,g),o.qLibraryId?(v.qListObjectDef.qLibraryId=o.qLibraryId,E=o.qLibraryId):(v.qListObjectDef.qDef.qFieldDefs=[o],E=o),"N"!==y||b){const e=o.qLibraryId?s:E;v.frequencyMax={qValueExpression:"Max(AGGR(Count([".concat(e,"]), [").concat(e,"]))")}}const[C]=Oi(v,c?null:t,E,i);return r((()=>{C&&p(C)}),[C]),d}({app:o,fieldIdentifier:i,stateName:s,options:c}),g=h(l),y=d?c.selectionsApi:Ms(o,m,g)[0];if(!y||!m)return null;const b=B(B({},c),{},{selections:y,model:m});return t.createElement(El,{options:b})}function xl(e){let{element:n,app:r,fieldIdentifier:o,qId:i,stateName:a="$",options:s={}}=e;return f.createPortal(t.createElement(Cl,{app:r,element:n,fieldIdentifier:o,qId:i,stateName:a,options:s}),n)}const Sl=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function Ll(e){let[t,n]=e;return(t+(Math.random()*(n-t)|0)).toString(32)}function wl(){return Sl.map(Ll).join("")}function Ol(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function Rl(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 Il(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="string"==typeof e?(e=>({qDef:{qFieldDefs:[e]}}))(e):B(B({},e),{},{qDef:e.qDef||{}});return r.qDef.cId=r.qDef.cId||wl(),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),Ol(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)),r},removeDimension(e){const r=t.qDimensions.splice(e,1)[0];return Rl(t.qInterColumnSortOrder,e),n.dimensions.removed(r,o,e),r},addMeasure(e){const r="string"==typeof e?(e=>({qDef:{qDef:e}}))(e):B(B({},e),{},{qDef:e.qDef||{}});r.qDef.cId=r.qDef.cId||wl(),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),Ol(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];Rl(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 kl=(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},ql=(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]},_l=e=>0===Object.keys(e).length&&e.constructor===Object;var Tl={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}};const Al=2**53-1;function Dl(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function Pl(e,t){const n=He(!0,{},t,e);return kl(n,"qOtherTotalSpec.qOtherCounted")||ql(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),kl(n,"qOtherTotalSpec.qOtherLimit")||ql(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function Ml(e,t){return He(!0,{},t,e)}function Nl(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var zl={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach((t=>{e.qLayoutExclude.changed[t].to===kl(e,t)&&ql(e,t,e.qLayoutExclude.changed[t].from)}))},isMasterItemProperty:Dl,importCommonProperties:function(e,t,n){const r="masterobject"===kl(t,"properties.qInfo.qType")?"masterobject":kl(n,"qInfo.qType");ql(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:Pl,createDefaultMeasure:Ml,resolveValue:Nl,getHypercubePath:function(e){const t=kl(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?(Tl.indexAdded(n.qInterColumnSortOrder,i),++i):(--i,Tl.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=He(!0,{},t.properties[e].quarantine)):"qHyperCubeDef"===e&&r?ql(o,"".concat(r,".qHyperCubeDef"),t.properties.qHyperCubeDef):n.hasOwnProperty(e)||Dl(e)?o[e]=t.properties[e]:o.qLayoutExclude.disabled[e]=t.properties[e]})),o=He(!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=Nl(i.max,r.dimensions.length,Al),s=Nl(i.min,r.dimensions.length,0);return{maxDimensions:Nl(o.max,a,Al),minDimensions:Nl(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(Pl(a.dimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Pl(a.dimensions[s],i));else if(a.dimensions.length)for(s=0;s<a.dimensions.length;++s)o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Pl(a.dimensions[s],i));if(a.excludedDimensions.length)for(s=0;s<a.excludedDimensions.length;++s)o.qDimensions.length<r?o.qDimensions.push(Pl(a.excludedDimensions[s],i)):o.qLayoutExclude.qHyperCubeDef.qDimensions.push(Pl(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(Ml(a.measures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Ml(a.measures[s],i));else if(a.measures.length)for(s=0;s<a.measures.length;++s)o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Ml(a.measures[s],i));if(a.excludedMeasures.length)for(s=0;s<a.excludedMeasures.length;++s)o.qMeasures.length<r?o.qMeasures.push(Ml(a.excludedMeasures[s],i)):o.qLayoutExclude.qHyperCubeDef.qMeasures.push(Ml(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=kl(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=kl(t,r||"").qHyperCubeDef,o=[...e.qMeasures];e.qMeasures=[],o.forEach((r=>{e.qMeasures.push(r),n.measures.added(r,t)}))}}};var jl={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=kl(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();Tl.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&&(zl.restoreChangedProperties(o),delete o.qLayoutExclude.changed),o.qLayoutExclude.quarantine&&!_l(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=zl.createNewProperties({exportFormat:t,initialProperties:n,hypercubePath:i}),l=kl(n,i||"").qHyperCubeDef,c=kl(s,i||"").qHyperCubeDef,{maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:h}=zl.getMaxMinDimensionMeasure({exportFormat:t,dataDefinition:r}),{defaultDimension:f=zl.getDefaultDimension(),defaultMeasure:m=zl.getDefaultMeasure()}=o;return c.qDimensions.length=0,c.qMeasures.length=0,zl.shouldInitLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:h})&&zl.initLayoutExclude({exportFormat:t,maxDimensions:u,minDimensions:d,maxMeasures:p,minMeasures:h,newHyperCubeDef:c}),zl.addDefaultDimensions({exportFormat:t,maxDimensions:u,minDimensions:d,newHyperCubeDef:c,defaultDimension:f}),zl.addDefaultMeasures({exportFormat:t,maxMeasures:p,minMeasures:h,newHyperCubeDef:c,defaultMeasure:m}),zl.setInterColumnSortOrder({exportFormat:t,newHyperCubeDef:c}),zl.copyPropertyIfExist("qMaxStackedCells",l,c),zl.copyPropertyIfExist("qNoOfLeftDims",l,c),zl.copyPropertyOrSetDefault("qInitialDataFetch",l,c,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),zl.copyPropertyOrSetDefault("qMode",l,c,"S"),zl.copyPropertyOrSetDefault("qReductionMode",l,c,"N"),zl.copyPropertyOrSetDefault("qSortbyYValue",l,c),zl.copyPropertyOrSetDefault("qIndentMode",l,c),zl.copyPropertyOrSetDefault("qShowTotalsAbove",l,c),zl.importCommonProperties(s,t,n),zl.updateDimensionsOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),zl.updateMeasuresOnAdded({newProperties:s,dataDefinition:r,hypercubePath:i}),a.qProperty=s,a}(e)};const Fl=e=>kl(e,"data.targets.0.propertyPath"),Bl=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return jl.exportProperties})(Fl(e))},Hl=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return jl.importProperties})(Fl(e))},Wl=async e=>{let{halo:t,model:n,cellRef:r,newType:o}=e;const i=await n.getFullPropertyTree(),a=r.current.getQae(),s=Bl(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 Hl(c)({exportFormat:s({propertyTree:i,hypercubePath:zl.getHypercubePath(a)}),initialProperties:B({qInfo:{qType:o},visualization:o},kl(c,"properties.initial",{})),dataDefinition:kl(c,"data.targets.0.",{}),hypercubePath:zl.getHypercubePath(c)})},Ul={hypercube:jl};var $l=e=>Wi((e=>B(B({},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 Gl(e){let{d:n}=e;const r=Fo();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(E,{style:{lineHeight:"30px",paddingRight:r.spacing(1)}},t.createElement(P,null,n.missing||n.error?t.createElement($l,{style:a}):t.createElement(ia,{style:a})));return t.createElement(v,{item:!0,container:!0,alignItems:"center",wrap:"nowrap"},t.createElement(v,{item:!0},s),t.createElement(v,{container:!0,item:!0,zeroMinWidth:!0,wrap:"nowrap"},t.createElement(E,{noWrap:!0,component:"p"},t.createElement(E,{component:"span",variant:"subtitle2",color:o},n.description),t.createElement(E,{component:"span"}," "),t.createElement(E,{component:"span",variant:"subtitle2",color:n.error?"error":"inherit",style:{fontWeight:400}},n.label))))}function Vl(e){let{data:n}=e;const r=Fo();return t.createElement(v,{container:!0,item:!0,style:{maxWidth:"300px",overflow:"hidden"}},n.map(((e,n)=>{const o=e.descriptions.map(((e,n)=>t.createElement(Gl,{d:e,key:n})));return o.length>0&&t.createElement(v,{container:!0,item:!0,key:n,direction:"column",style:{paddingBottom:r.spacing(2)}},t.createElement(E,{noWrap:!0,key:n,variant:"subtitle1",align:"left",color:"textSecondary"},e.title),o)})))}function Kl(e){let{title:n="Error",message:r="",data:o=[]}=e;return t.createElement(v,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"}},t.createElement(v,{item:!0},t.createElement($l,{style:{fontSize:"38px"}})),t.createElement(v,{item:!0},t.createElement(E,{variant:"h6",align:"center","data-tid":"error-title"},n)),t.createElement(v,{item:!0},t.createElement(E,{variant:"subtitle1",align:"center","data-tid":"error-message"},r)),t.createElement(Vl,{data:o}))}const Zl=["size"],Xl="Progress",Jl={root:"".concat(Xl,"-root"),front:"".concat(Xl,"-front"),back:"".concat(Xl,"-back")},Yl=Ho("div")((e=>{let{theme:t}=e;return{["&.".concat(Jl.root)]:{position:"relative",display:"inline-block"},["& .".concat(Jl.front)]:{color:t.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},["& .".concat(Jl.back)]:{color:t.palette.divider}}})),Ql={small:16,medium:32,large:64,xlarge:128};function ec(e){let{size:n="medium"}=e,r=U(e,Zl);const o=Ql[n];return t.createElement(Yl,{className:Jl.root},t.createElement(M,W({variant:"determinate",value:100,className:Jl.back,size:o,thickness:3},r)),t.createElement(M,W({variant:"indeterminate",disableShrink:!0,className:Jl.front,size:o,thickness:3},r)))}const tc=["cancel","translator"],nc=["retry","translator"],rc={stripes:"".concat("LongRunningQuery","-stripes")},oc=Ho(v)((()=>({["& .".concat(rc.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 ic(e){let{cancel:n,translator:r}=e,o=U(e,tc);return t.createElement(t.Fragment,null,t.createElement(oc,{container:!0,item:!0,direction:"column",alignItems:"center",gap:2},t.createElement(v,{item:!0},t.createElement(ec,null)),t.createElement(v,{item:!0},t.createElement(E,{variant:"h6",align:"center","data-tid":"update-active"},r.get("Object.Update.Active")))),t.createElement(v,W({item:!0},o),t.createElement(A,{variant:"contained",onClick:n},r.get("Cancel"))))}function ac(e){let{retry:n,translator:r}=e,o=U(e,nc);return t.createElement(t.Fragment,null,t.createElement(v,{item:!0},t.createElement($l,{style:{fontSize:"38px"}})),t.createElement(v,{item:!0},t.createElement(E,{variant:"h6",align:"center","data-tid":"update-cancelled"},r.get("Object.Update.Cancelled"))),t.createElement(v,{item:!0},t.createElement(A,W({variant:"contained",onClick:n},o),r.get("Retry"))))}function sc(e){let{canCancel:n,canRetry:r,api:o}=e;const{translator:i}=p(ai);return t.createElement(v,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:rc.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},n&&t.createElement(ic,{cancel:o.cancel,translator:i,className:rc.cancel}),r&&t.createElement(ac,{retry:o.retry,translator:i,className:rc.retry}))}function lc(){return t.createElement(v,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2},t.createElement(ec,{size:"large"}))}const cc="Header",uc={containerStyle:"".concat(cc,"-containerStyle"),containerTitleStyle:"".concat(cc,"-containerTitleStyle")},dc=Ho(v)((e=>{let{theme:t}=e;return{["&.".concat(uc.containerStyle)]:{flexGrow:0},["&.".concat(uc.containerTitleStyle)]:{paddingBottom:t.spacing(1)}}})),pc="njs-cell-title",hc="njs-cell-sub-title";function fc(e){let{layout:o,sn:i,anchorEl:a,hovering:s,focusHandler:l}=e;const c=o.showTitles&&!!o.title,u=o.showTitles&&!!o.subtitle,d=o.qSelectionInfo&&o.qSelectionInfo.qInSelections,[p,h]=n([]),[f,m]=Bi(),[g,y]=n(!1);r((()=>{i&&i.component&&i.component.isHooked&&i.component.observeActions((e=>{h([...e,...i&&i.selectionToolbar&&i.selectionToolbar.items||[]])}))}),[i]),r((()=>{if(!m)return;const{width:e}=m;y(e<221)}),[m]);const b=c||u,C=[uc.containerStyle,...b?[uc.containerTitleStyle]:[]],x=(s||d)&&(g||!b),S=b&&!x&&!g,L=t.createElement(Rs,{show:S,selections:{show:d,api:i.component.selections,onKeyDeactivate:l.refocusContent},actions:p,popover:{show:x,anchorEl:a},focusHandler:l});return t.createElement(dc,{ref:f,item:!0,container:!0,wrap:"nowrap",className:C.join(" ")},t.createElement(v,{item:!0,zeroMinWidth:!0,xs:!0},t.createElement(v,{container:!0,wrap:"nowrap",direction:"column"},c&&t.createElement(E,{variant:"h6",noWrap:!0,className:pc},o.title),u&&t.createElement(E,{variant:"body2",noWrap:!0,className:hc},o.subtitle))),t.createElement(v,{item:!0},L))}const mc={itemStyle:"".concat("Footer","-itemStyle")},gc=Ho(v)((e=>{let{theme:t}=e;return{["& .".concat(mc.itemStyle)]:{minWidth:0,paddingTop:t.spacing(1)}}})),yc="njs-cell-footer";function bc(e){let{layout:n}=e;return n&&n.showTitles&&n.footnote?t.createElement(gc,{container:!0},t.createElement(v,{item:!0,className:mc.itemStyle},t.createElement(E,{noWrap:!0,variant:"body2",className:yc},n.footnote))):null}class vc{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 Ec="njs-viz";function Cc(e){let{sn:o,snOptions:i,snPlugins:a,layout:s,appLayout:c,halo:u}=e;const{component:d}=o,{theme:h,language:f,constraints:m,keyboardNavigation:g}=p(ai),[y]=n((()=>new vc)),[b,v]=n(!1),[E,C]=n(0),[x,S,L]=Bi(),[w,O]=n(null),R=l((e=>{e&&O(e)}),[]);return r((()=>{if(w)return d.created({options:i}),d.mounted(w),v(!0),()=>{y.stop(),d.willUnmount()}}),[w,d]),r((()=>{b&&w&&S&&(!d.isHooked&&s&&s.qSelectionInfo&&s.qSelectionInfo.qInSelections||y.schedule((()=>{const e=[];return m.passive||e.push("passive"),m.active||e.push("interact"),m.select||e.push("select"),u.app&&u.app.session&&e.push("fetch"),Promise.resolve(d.render({layout:s,options:i,plugins:a,embed:u.public.nebbie,context:B({constraints:m,theme:u.public.theme,appLayout:c,keyboardNavigation:g},d.isHooked?{}:{logicalSize:o.logicalSize({layout:s}),localeInfo:(c||{}).qLocaleInfo,permissions:e})})).then((e=>{!1!==e&&(0===E&&"function"==typeof i.onInitialRender&&i.onInitialRender.call(null),C(E+1))}))})))}),[S,i,a,w,L,s,c,h,f,m,b,g]),t.createElement("div",{ref:x,"data-render-count":E,style:{position:"relative",height:"100%"},className:Ec},t.createElement("div",{ref:R,style:{position:"absolute",width:"100%",height:"100%"}}))}const xc={originalSize:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",stretchFit:"100% 100%",alwaysFill:"cover"},Sc={"top-left":"top left","top-center":"top center","top-right":"top right","center-left":"center left","center-center":"center center","center-right":"center right","bottom-left":"bottom left","bottom-center":"bottom center","bottom-right":"bottom right"};function Lc(e,t){return t?function(e){var t;let n,r,o,i;if(null!=e&&null!==(t=e.session)&&void 0!==t&&t.config)return n=e.session.config,r=new URL(n.url),i="wss:"===r.protocol,o=i?"https://":"http://",o+r.host}(e)+t:void 0}const wc=(e,t)=>{const n=null==e?void 0:e.bgImage;if(n){let i="";var r,o;if("media"===n.mode||"media"===e.useImage)i=null!=n&&null!==(r=n.mediaUrl)&&void 0!==r&&null!==(o=r.qStaticContentUrl)&&void 0!==o&&o.qUrl?decodeURIComponent(n.mediaUrl.qStaticContentUrl.qUrl):void 0,i=Lc(t,i);"expression"===n.mode&&(i=n.expressionUrl?decodeURIComponent(n.expressionUrl):void 0);const a=function(e){var t;let n="center center";return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.position&&(n=Sc[e.bgImage.position]),n}(e),s=function(e){var t;let n=xc.originalSize;return null!=e&&null!==(t=e.bgImage)&&void 0!==t&&t.sizing&&(n=xc[e.bgImage.sizing]),n}(e);return i?{url:i,pos:a,size:s}:void 0}},Oc=(e,t)=>{const n=null==e?void 0:e.bgColor;if(n&&t)return n.useExpression?t.validateColor(n.colorExpression):n.color&&"none"!==n.color.color?t.getColorPickerColor(n.color,!0):void 0},Rc="njs-cell",Ic=(e,t)=>{switch(t.type){case"LOADING":return B(B({},e),{},{loading:!0});case"LOADED":return B(B({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return B(B({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return B(B({},e),{},{longRunningQuery:!0});case"ERROR":return B(B({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error("Unhandled type: ".concat(t.type))}};function kc(e){let{delay:o=750}=e;const[i,a]=n(!1);return r((()=>{const e=setTimeout((()=>a(!0)),o);return()=>clearTimeout(e)}),[]),i?t.createElement(lc,null):null}const qc=e=>!e.qError||7005===e.qError.qErrorCode,_c=(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}})),Tc=e=>e&&(Array.isArray(e)?e:[e])||[],Ac=(e,t,n,r)=>{const o=r.dimensions.min(),i=r.measures.min(),a=r.resolveLayout(t);return{reqDimErrors:_c(o,Tc(a.qDimensionInfo),(e=>r.dimensions.description(n,e)),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),reqMeasErrors:_c(i,Tc(a.qMeasureInfo),(e=>r.measures.description(n,e)),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"))}},Dc=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],d=u.dimensions.min(),p=u.measures.min(),h=u.resolveLayout(n),f=Tc(h.qDimensionInfo).filter(qc),m=Tc(h.qMeasureInfo).filter(qc);if(o+=d,i+=p,(f.length<d||m.length<p)&&(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=[],d=[];let p=null;for(let n=0;n<o.length;++n){const a=o[n];if(!l&&i){const n=p||await r.getProperties();p=n;const o=Ac(e,t,n,a);u.push(...o.reqDimErrors),d.push(...o.reqMeasErrors)}}const h=u.filter((e=>!(e.missing||e.error))).length,f=e.get("Visualization.Incomplete.Dimensions",[h,a]),m=d.filter((e=>!(e.missing||e.error))).length,g=e.get("Visualization.Incomplete.Measures",[m,s]),y=[{title:f,descriptions:[...u]},{title:g,descriptions:[...d]}],b=l?c:y;return[l||i,{title:l?c[0].title:e.get("Visualization.Incomplete"),data:b}]},Pc=i(((e,i)=>{let{halo:a,model:l,initialSnOptions:c,initialSnPlugins:u,initialError:d,onMount:f,currentId:m}=e;const{app:g,types:y}=a,{nebbie:b}=a.public,{disableCellPadding:E=!1}=a.context||{},{theme:C,translator:x,language:S,keyboardNavigation:L}=p(ai),w=Fo(),[O,R,I]=Bi(),[k,q]=o(Ic,{loading:!1,loaded:!1,longRunningQuery:!1,error:(_=d)?{title:_.message}:null,sn:null,visualization:null});var _;const[T,{validating:A,canCancel:D,canRetry:P},M]=Li(l),[z]=wi(g),[j,F,H]=Bi(),[W,U]=n(c),[$,G]=n(u),V="njs-cell-".concat(m),[K]=Ms(g,l,["#".concat(V),".njs-action-toolbar-popover"]),[Z,X]=n(!1),J=h({enter:null,leave:null}),[Y,Q]=n(void 0),[ee,te]=n(void 0),ne=h({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});r((()=>{As(ne.current)}),[]),r((()=>{const e=null!=T&&T.components?T.components.find((e=>"general"===e.key)):null;Q(Oc(e,a.public.theme)),te(wc(e,a.app))}),[T,a.public.theme,a.app,C]),ne.current.blurCallback=e=>{a.root.toggleFocusOfCells(),e&&H&&H.focus()},ne.current.refocusContent=()=>{k.sn.component&&"function"==typeof k.sn.component.focus&&k.sn.component.focus()};r((()=>{if(d||!z||!T)return;if(k.visualization===T.visualization&&k.sn)return void(async e=>{const[t,n]=await Dc(x,T,e.generator.qae.data,l);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:k.sn,layout:T,model:l})})(k.sn);const e=y.getSupportedVersion(T.visualization,T.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:l,app:g,selections:K,nebbie:b,focusHandler:ne.current});n&&(q({type:"LOADED",sn:n,visualization:e}),f())})(T.visualization,e),()=>{};q({type:"ERROR",error:{title:"Could not find a version of '".concat(T.visualization,"' that supports current object version. Did you forget to register ").concat(T.visualization,"?")}})}),[y,k.sn,l,K,T,z,S]),r((()=>{if(!A)return;const e=setTimeout((()=>q({type:"LONG_RUNNING_QUERY"})),2e3);return()=>clearTimeout(e)}),[A]),s(i,(()=>({getQae:()=>k.sn.generator.qae,toggleFocus(e){"function"==typeof k.sn.component.focus&&(e?k.sn.component.focus():k.sn.component.blur())},setSnOptions:U,setSnPlugins:G,async takeSnapshot(){const{width:e,height:t}=R;let n=JSON.parse(JSON.stringify(T));return"function"==typeof k.sn.component.setSnapshotData&&(n=await k.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:x.language(),theme:w.name,appLayout:z,size:{width:Math.round(e),height:Math.round(t)}},layout:n}},async exportImage(){if("function"!=typeof a.config.snapshot.capture)throw new Error("Stardust embed has not been configured with snapshot.capture callback");const e=await this.takeSnapshot();return a.config.snapshot.capture(e)}})),[k.sn,F,R,T,w.name,z]);let re=null;return k.loading&&!k.longRunningQuery?re=t.createElement(kc,null):k.error?re=t.createElement(Kl,k.error):k.loaded&&(re=t.createElement(Cc,{key:T.visualization,sn:k.sn,halo:a,snOptions:W,snPlugins:$,layout:T,appLayout:z})),t.createElement(N,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:Y||"unset",backgroundImage:ee&&ee.url?"url(".concat(ee.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:ee&&ee.size,backgroundPosition:ee&&ee.pos},elevation:0,square:!0,className:Rc,ref:O,id:V,onMouseEnter:()=>{J.current.leave&&clearTimeout(J.current.leave),J.enter||(J.current.enter=setTimeout((()=>{X(!0),J.current.enter=null}),250))},onMouseLeave:()=>{J.current.enter&&clearTimeout(J.current.enter),J.current.leave||(J.current.leave=setTimeout((()=>{X(!1),J.current.leave=null}),750))}},t.createElement(v,{container:!0,direction:"column",gap:0,style:B(B({position:"relative",width:"100%",height:"100%"},E?{}:{padding:w.spacing(1)}),k.longRunningQuery?{opacity:"0.3"}:{})},I&&T&&k.sn&&t.createElement(fc,{layout:T,sn:k.sn,anchorEl:I,hovering:Z,focusHandler:ne.current}," "),t.createElement(v,{tabIndex:L?0:-1,onKeyDown:L?e=>{["Enter"," ","Spacebar"].includes(e.key)&&a.root.toggleFocusOfCells(m)}:null,item:!0,xs:!0,style:{height:"100%"},ref:j},re),t.createElement(bc,{layout:T})),k.longRunningQuery&&t.createElement(sc,{canCancel:D,canRetry:P,api:M}))}));function Mc(e){let{halo:n,element:r,model:o,initialSnOptions:i,initialSnPlugins:a,onMount:s,initialError:l}=e;const{root:c}=n,u=t.createRef(),d=wl(),p=f.createPortal(t.createElement(Pc,{ref:u,halo:n,model:o,currentId:d,initialSnOptions:i,initialSnPlugins:a,initialError:l,onMount:s}),r,o.id),h=()=>{c.remove(p),o.removeListener("closed",h)};return o.on("closed",h),c.add(p),c.addCell(d,u),[h,u]}function Nc(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function zc(e,t){return Nc(e)&&Nc(t)?JSON.stringify(e)===JSON.stringify(t):!Array.isArray(e)&&!Array.isArray(t)&&e===t}function jc(){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)?zc(i,n[o])||r.push({qPath:e+o,qOp:"add",qValue:JSON.stringify(t[o])}):r.push(...jc("".concat(e).concat(o,"/"),t[o],n[o]))})),r}function Fc(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 Bc=()=>{};function Hc(){let{model:e,halo:t,initialError:n,onDestroy:r=(async()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=Bc,i=null,a=null,s=null;const l=new Promise((e=>{s=e}));let c={},u=[];const d=async e=>{a?(async()=>{await l,i.current.setSnOptions(B(B({},c),e))})():c=B(B({},c),e)},p=async e=>{Fc(e),a?(async()=>{await l,i.current.setSnPlugins(e)})():u=e},h={id:e.id,model:e,async destroy(){await r(),o(),o=Bc},async convertTo(n){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=await Wl({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]=Mc({halo:t,element:r,model:e,initialSnOptions:c,initialSnPlugins:u,initialError:n,onMount:s}),l},async applyProperties(t){const n=jc("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){d(e)},plugins(e){p(e)},exportImage:()=>i.current.exportImage(),takeSnapshot:()=>i.current.takeSnapshot(),getModel:()=>e}};return h}async function Wc(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:async()=>{};const i=Hc({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 Uc(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&&Il({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 d=await t.app.createSessionObject(u);Ci.set(d.id,d);const p=(e=>{const t=vi({type:"SET",value:e});return()=>{t(),Ci.clear(e.id)}})(d);return Wc(d,{options:s,plugins:l,element:c},t,n,(async()=>{await t.app.destroySessionObject(d.id),p()}))}const $c="njs-sheet";function Gc(e){let{model:o,halo:i,initialSnOptions:s,initialSnPlugins:l,initialError:c,onMount:u}=e;const{root:d}=i,[h]=Li(o),{theme:f}=p(ai),[m,g]=n([]),[y,b]=n(void 0),[v,E]=n(void 0),[C,x]=n("");r((()=>{if(h){const e=JSON.stringify(h.cells);if(e===C)return;x(e);const n=async()=>{m.forEach((e=>{d.removeCell(e.currentId)}));const e=h.cells,n=await Promise.all(e.map((async e=>{let n;const r=new Promise((e=>{n=e})),o=m.find((t=>t.id===e.name));if(o)return o.bounds=e.bounds,delete o.mountedPromise,o;const a=await async function(e,t){let{id:n,options:r,plugins:o,element:i}=e;const a="".concat(n);let s=mi.get(a);s||(s=t.app.getObject(n),mi.set(a,s));const l=await s;return Ci.set(a,l),Wc(l,{options:r,plugins:o,element:i},t)}({id:e.name},i);return{model:a.model,id:e.name,bounds:e.bounds,cellRef:t.createRef(),currentId:wl(),mounted:n,mountedPromise:r}})));n.forEach((e=>d.addCell(e.currentId,e.cellRef))),g(n)};n()}}),[h]);const S=a((()=>m?m.map((e=>function(e,n,r,o,i,a){const{x:s,y:l,width:c,height:u}=e.bounds;return t.createElement("div",{style:{left:"".concat(s,"%"),top:"".concat(l,"%"),width:"".concat(c,"%"),height:"".concat(u,"%"),position:"absolute"}},t.createElement(Pc,{ref:e.cellRef,halo:n,model:e.model,currentId:e.currentId,initialSnOptions:r,initialSnPlugins:o,initialError:i,onMount:a}))}(e,i,s,l,c,e.mounted))):[]),[m]);r((()=>{const e=null!=h&&h.components?h.components.find((e=>"general"===e.key)):null;b(Oc(e,i.public.theme)),E(wc(e,i.app))}),[h,i.public.theme,i.app,f]);const L=!h||Number.isNaN(h.height)?"100%":"".concat(Number(h.height),"%"),w=m.map((e=>e.mountedPromise)),O=w.filter((e=>!!e));return O.length&&Promise.all(w).then((()=>{u()})),t.createElement("div",{className:$c,style:{width:"100%",height:L,position:"relative",backgroundColor:y,backgroundImage:v&&v.url?"url(".concat(v.url,")"):void 0,backgroundRepeat:"no-repeat",backgroundSize:v&&v.size,backgroundPosition:v&&v.pos}},S)}function Vc(e){let{halo:n,element:r,model:o,initialSnOptions:i,initialSnPlugins:a,onMount:s,initialError:l}=e;const{root:c}=n,u=t.createRef(),d=f.createPortal(t.createElement(Gc,{ref:u,halo:n,model:o,initialSnOptions:i,initialSnPlugins:a,initialError:l,onMount:s}),r,o.id),p=()=>{c.remove(d),o.removeListener("closed",p)};return o.on("closed",p),c.add(d),[p,u]}const Kc=()=>{};function Zc(){let{model:e,halo:t,initialError:n,onDestroy:r=(async()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=Kc,i=null,a=null,s=null;const l=new Promise((e=>{s=e}));let c={},u=[];const d=async e=>{a?(async()=>{await l,i.current.setSnOptions(B(B({},c),e))})():c=B(B({},c),e)},p=async e=>{Fc(e),a?(async()=>{await l,i.current.setSnPlugins(e)})():u=e},h={id:e.id,model:e,async destroy(){await r(),o(),o=Kc},__DO_NOT_USE__:{mount(r){if(a)throw new Error("Already mounted");return a=r,[o,i]=Vc({halo:t,element:r,model:e,initialSnOptions:c,initialSnPlugins:u,initialError:n,onMount:s}),l},async applyProperties(t){const n=jc("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){d(e)},plugins(e){p(e)},exportImage(){throw new Error("Not implemented")},takeSnapshot(){throw new Error("Not implemented")},getModel:()=>e}};return h}async function Xc(e,t){let{id:n,options:r,plugins:o,element:i}=e;const a="".concat(n);let s=mi.get(a);s||(s=t.app.getObject(n),mi.set(a,s));const l=await s;return Ci.set(a,l),"sheet"===l.genericType?async function(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:async()=>{};const i=Zc({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}(l,{options:r,plugins:o,element:i},t):Wc(l,{options:r,plugins:o,element:i},t)}function Jc(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{isEnabled:t=>!0===e[t]}}const Yc=He.bind(null,!0),Qc={},{isArray:eu}=Array;function tu(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function nu(e){return void 0===e}function ru(e,t){return"function"==typeof e[t]||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function ou(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]=nu(e[r||t])?i:e[t],e=e[r||t]})),e}function iu(e,t){let n=!0;if(tu(e)&&tu(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach((r=>{iu(e[r],t[r])||(n=!1)})),n);if(eu(e)&&eu(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!iu(e[n],t[n]))return!1;return!0}return e===t}Qc.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach((o=>{const i=function(e){return e?Yc({},{val:e}).val:e}(t[o]),a=e[o],s="".concat(n,"/").concat(o);iu(i,a)||ru(t,o)||(nu(a)?r.push({op:"add",path:s,value:i}):tu(i)&&tu(a)?r=r.concat(Qc.generate(a,i,s)):eu(i)&&eu(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]&&nu(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(iu(t,o))return r;if(!nu(t[0])&&nu(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(Qc.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=>{nu(t[o])&&!ru(e,o)&&r.push({op:"remove",path:"".concat(n,"/").concat(o)})})),r},Qc.apply=function(e,t){t.forEach((t=>{let n=ou(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(eu(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(eu(o)&&eu(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(tu(o)&&tu(t.value))a=o,Object.keys(a).forEach((e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!ru(a,e)&&delete a[e]})),Yc(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=ou(e,t.from);eu(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(eu(n)?n.splice(+r,1):delete n[r]);var a}))},Qc.clone=function(e){return Yc({},e)},Qc.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},Qc.updateObject=function(e,t){Object.keys(e).length?Qc.apply(e,Qc.generate(e,t)):Yc(e,t)};const au=e=>t=>{const n=(r=B(B({},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(Y.prototype).forEach((e=>{r[e]=Y.prototype[e]})),Y.init(r),r);var r;return n};let su,lu;function cu(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 uu(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:[],menus:[],actions:{list:[]},pendingEffects:[],pendingLayoutEffects:[],pendingPromises:[],resizer:{setters:[],explicitResize:t},accessibility:{setter:null}}}function du(e){hu(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 pu(e){if(e.__hooks.obsolete)return Promise.resolve();lu=-1,su=e,su.__hooks.initiated&&su.__hooks.list.length;try{su.fn.call(null)}catch(e){console.error(e)}su.__hooks.initiated=!0;const t=su.__hooks;return yu(su),lu=void 0,su=void 0,t.chain.promise||(t.chain.promise=new Promise((e=>{t.chain.resolve=e}))),function(e){hu(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame((()=>{!function(e){hu(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 hu(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 fu(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 mu(e,t,n){try{return Promise.all(e.__hooks.menus.map((e=>Promise.resolve(e.fn(t,n))))).then((e=>e[e.length-1]))}catch(e){console.error(e)}return Promise.resolve()}function gu(e){return e.__hooks.imperativeHandle}function yu(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function bu(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,yu(e))}function vu(e){if(void 0===su)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=su.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function Eu(e){vu(++lu);return su.context[e]}function Cu(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function xu(e){return{__hooked:!0,fn:e,initiate:uu,run:pu,teardown:du,runSnaps:fu,runMenu:mu,focus:Xu,blur:Ju,observeActions:bu,getImperativeHandle:gu,updateRectOnNextRun:Cu}}function Su(e){const t=vu(++lu);if(!t.value){t.component=su;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,pu(r)}),0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function Lu(e,t){const n=vu(++lu);cu(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===su.__hooks.pendingEffects.indexOf(n)&&su.__hooks.pendingEffects.push(n))}function wu(e,t){const n=vu(++lu);cu(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],su.__hooks.pendingLayoutEffects.push(n))}function Ou(e,t){const n=vu(++lu);return cu(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function Ru(e,t){const[n,r]=Su((()=>({resolved:void 0,rejected:void 0,state:"pending"}))),o=vu(++lu);return o.component||(o.component=su),wu((()=>{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 Iu(){return Eu("element")}function ku(){const e=Iu(),t=su.__hooks.resizer,[n,r]=Su((()=>{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()),wu((()=>{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 qu(){return Eu("layout")}function _u(){const e=Eu("layout"),[t]=Su({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current}function Tu(){return Eu("appLayout")}function Au(){const e=Eu("model");return e&&e.session?e:void 0}function Du(){const e=Eu("app");return e&&e.session?e:void 0}function Pu(){const e=Eu("global");return e&&e.session?e:void 0}function Mu(){return Eu("selections")}function Nu(){return Eu("theme")}function zu(){return Eu("nebbie")}function ju(){return Eu("translator")}function Fu(){return Eu("deviceType")}function Bu(){return Eu("plugins")}function Hu(e,t){const[n]=Su({action(){n._config.action.call(null)}});return n.component||(n.component=su,su.__hooks.actions.list.push(n)),Ou((()=>{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 Wu(){return Eu("constraints")}function Uu(){return Eu("options")}function $u(e,t){const n=vu(++lu);if(n.imperative||(n.imperative=!0),cu(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],su.__hooks.imperativeHandle=r}}function Gu(e){const t=vu(++lu);t.value||(t.value=1,su.__hooks.snaps.push(t)),t.fn=e}function Vu(e){const t=vu(++lu);t.value||(t.value=1,su.__hooks.menus.push(t)),t.fn=e}function Ku(){vu(++lu);const e=su.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}}function Zu(){const e=Eu("keyboardNavigation"),t=Eu("focusHandler");if(!su.__hooks.accessibility.exitFunction){const e=function(e){const n=this.__hooks.accessibility;n.enabled&&n.active&&(Ju(this),t&&t.blurCallback&&t.blurCallback(e))}.bind(su);su.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),Xu(this))}.bind(su);su.__hooks.accessibility.focusFunction=n;const r=function(e){this.__hooks.accessibility.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind(su);su.__hooks.accessibility.focusSelectionFunction=r}const n=su.__hooks.accessibility.focusFunction,r=su.__hooks.accessibility.exitFunction,o=su.__hooks.accessibility.focusSelectionFunction,[i,a]=Su({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return su.__hooks.accessibility.setter=a,su.__hooks.accessibility.enabled=e,Lu((()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o})),[e]),i}function Xu(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 Ju(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 Yu={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},Qu=Object.keys(Yu);function ed(e,t){const n=B({},Yu);var r;r=n,Object.keys(Y.prototype).forEach((e=>{r[e]=Y.prototype[e]})),Y.init(r);const o={emit(){n.emit(...arguments)}};Object.keys(e.component||{}).forEach((t=>{-1!==Qu.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=au(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 td(e,t,n){"function"==typeof e.component&&(e.component=xu(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(B(B({},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)},onContextMenu(t,n){return e.component.runMenu(this,t,n)},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):ed(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=Qc.clone(o),a=n.map((e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath})));Qc.apply(o,a),e.qae.properties.onChange.call({model:t.model},o);const s=Qc.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 nd=()=>{};function rd(e,t){return void 0===e?()=>t:()=>e}function od(e){const t=e||{};return{min:"function"==typeof t.min?t.min:rd(t.min,0),max:"function"==typeof t.max?t.max:rd(t.max,1e3),added:t.added||t.add||nd,description:t.description||nd,moved:t.moved||t.move||nd,removed:t.removed||t.remove||nd,replaced:t.replaced||t.replace||nd,isDefined:()=>!!e}}function id(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:od(e.dimensions),measures:od(e.measures)}}function ad(){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(id)},exportProperties:t.exportProperties,importProperties:t.importProperties};return r}function sd(e,t){let n;n="function"==typeof e?e(t):e;const r={qae:ad(n.qae),component:n.component||{},create:e=>td(r,e,t),definition:{}};return Object.keys(n).forEach((e=>{r[e]||(r.definition[e]=n[e])})),r}var ld={},cd={get exports(){return ld},set exports(e){ld=e}};!function(e,t){var n;t=cd.exports=d,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 d)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 d(e,t)}catch(e){return null}}function d(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof d){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 d))return new d(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=d,d.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},d.prototype.toString=function(){return this.version},d.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof d||(e=new d(e,this.options)),this.compareMain(e)||this.comparePre(e)},d.prototype.compareMain=function(e){return e instanceof d||(e=new d(e,this.options)),h(this.major,e.major)||h(this.minor,e.minor)||h(this.patch,e.patch)},d.prototype.comparePre=function(e){if(e instanceof d||(e=new d(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)},d.prototype.compareBuild=function(e){e instanceof d||(e=new d(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)},d.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 d(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 p=/^[0-9]+$/;function h(e,t){var n=p.test(e),r=p.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 d(e,n).compare(new d(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 C(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 x(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof x){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof x))return new x(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 d(e,t).major},t.minor=function(e,t){return new d(e,t).minor},t.patch=function(e,t){return new d(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 d(e,n),o=new d(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=C,t.Comparator=x;var S={};function L(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof L)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new L(e.raw,t);if(e instanceof x)return new L(e.value,t);if(!(this instanceof L))return new L(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 w(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 O(e){return!e||"x"===e.toLowerCase()||"*"===e}function R(e,t,n,r,o,i,a,s,l,c,u,d,p){return((t=O(n)?"":O(r)?">="+n+".0.0":O(o)?">="+n+"."+r+".0":">="+t)+" "+(s=O(l)?"":O(c)?"<"+(+l+1)+".0.0":O(u)?"<"+l+"."+(+c+1)+".0":d?"<="+l+"."+c+"."+u+"-"+d:"<="+s)).trim()}function I(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 k(e,t,n){try{t=new L(t,n)}catch(e){return!1}return t.test(e)}function q(e,t,n,r){var o,i,a,s,l;switch(e=new d(e,r),t=new L(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(k(e,t,r))return!1;for(var c=0;c<t.set.length;++c){var u=t.set[c],p=null,h=null;if(u.forEach((function(e){e.semver===S&&(e=new x(">=0.0.0")),p=p||e,h=h||e,o(e.semver,p.semver,r)?p=e:a(e.semver,h.semver,r)&&(h=e)})),p.operator===s||p.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}x.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 d(n[2],this.options.loose):this.semver=S},x.prototype.toString=function(){return this.value},x.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 d(e,this.options)}catch(e){return!1}return C(e,this.operator,this.semver,this.options)},x.prototype.intersects=function(e,t){if(!(e instanceof x))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 L(e.value,t),k(this.value,n,t));if(""===e.operator)return""===e.value||(n=new L(this.value,t),k(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=C(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=C(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||o||i&&a||s||l},t.Range=L,L.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},L.prototype.toString=function(){return this.range},L.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,R),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),O(r)?s="":O(o)?s=">="+r+".0.0 <"+(+r+1)+".0.0":O(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),O(r)?s="":O(o)?s=">="+r+".0.0 <"+(+r+1)+".0.0":O(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=O(i),u=c||O(a),d=u||O(s),p=d;return"="===o&&p&&(o=""),l=t.includePrerelease?"-0":"",c?r=">"===o||"<"===o?"<0.0.0-0":"*":o&&p?(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:d&&(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 x(e,this.options)}),this)},L.prototype.intersects=function(e,t){if(!(e instanceof L))throw new TypeError("a Range is required");return this.set.some((function(n){return w(n,t)&&e.set.some((function(e){return w(e,t)&&n.every((function(n){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new L(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},L.prototype.test=function(e){if(!e)return!1;if("string"==typeof e)try{e=new d(e,this.options)}catch(e){return!1}for(var t=0;t<this.set.length;t++)if(I(this.set[t],e,this.options))return!0;return!1},t.satisfies=k,t.maxSatisfying=function(e,t,n){var r=null,o=null;try{var i=new L(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&-1!==o.compare(e)||(o=new d(r=e,n)))})),r},t.minSatisfying=function(e,t,n){var r=null,o=null;try{var i=new L(t,n)}catch(e){return null}return e.forEach((function(e){i.test(e)&&(r&&1!==o.compare(e)||(o=new d(r=e,n)))})),r},t.minVersion=function(e,t){e=new L(e,t);var n=new d("0.0.0");if(e.test(n))return n;if(n=new d("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 d(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 L(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return q(e,t,"<",n)},t.gtr=function(e,t,n){return q(e,t,">",n)},t.outside=q,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 L(e,n),t=new L(t,n),e.intersects(t)},t.coerce=function(e,t){if(e instanceof d)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)}}(0,ld);const ud={};async function dd(e,t,n,r){let{config:o}=n;const i="".concat(e,"__").concat(t);if(!ud[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);ud[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 ud[i]}function pd(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)||ld.satisfies(e,i.deps.properties),supernova:()=>dd(a.name,a.version,t,o.load).then((e=>(n=n||sd(e,t.public.galaxy),r=JSON.stringify(n.qae.properties.initial),n))),initialProperties(e){return this.supernova().then((()=>B(B({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=>{var t;r||(t=Object.keys(n),r=[...t.filter((e=>"undefined"===e)),...t.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(".")))]);for(let t=r.length-1;t>=0;t--){if(n[r[t]].supportsPropertiesVersion(e))return r[t]}return null},versions:n}}function hd(e){let{halo:t,parent:n}=e;const r={},o=n||{get:()=>{}};return{register:(e,n)=>{r[e.name]||(r[e.name]=pd(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(ud).forEach((t=>{t.split("__")[0]===e&&(ud[t]=void 0)}))}(e)}}}const fd=["__DO_NOT_USE__"],md=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return B(B({},e),t)},gd=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))},yd=(e,t)=>({context:md(e.context,t.context),load:t.load||e.load,snapshot:B({},t.snapshot||e.snapshot),types:gd(e.types,t.types),themes:gd(e.themes,t.themes),flags:md(e.flags,t.flags),anything:md(e.anything,t.anything)}),bd=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{__DO_NOT_USE__:t={}}=e,n=U(e,fd),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=B(B(B({},n),r),t);return o};var vd=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=Z(t.context.language);function r(e,o){if(o)return r.createConfiguration(o)(e);let i=B(B({},t.context),{},{translator:n.translator});const[a]=Fi({app:e,context:i}),s=at({themes:t.themes,root:a});i.themeApi=s.externalAPI;const l={galaxy:{translator:n.translator,flags:Jc(t.flags),deviceType:st(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=hd({halo:c});t.types.forEach((e=>u.register({name:e.name,version:e.version},{meta:e.meta,load:e.load})));let d=s.setTheme(t.context.theme),p=null,h=null;const f={render:async e=>(await d,e.id?Xc(e,c):Uc(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=B(B(B({},i),t),{},{translator:n.translator}),c.context=i,t.theme&&(d=s.setTheme(t.theme),await d),t.language&&c.public.translator.language(t.language),a.context(i))},selections:async()=>(p||(p={mount(t){h||(h=tl({element:t,app:e}),a.add(h))},unmount(){h&&(a.remove(h),h=null)}}),p),field:async t=>{let n;const r="string"==typeof t?t:t.qLibraryId;if(t.qId)n=t.qId;else if(!r)throw new Error("Field identifier or object id must be provided");const o={fieldName:r,mount(o){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!o)throw new Error("Element for ".concat(r||n," not provided"));if(this._instance)throw new Error("Field or object ".concat(r||n," already mounted"));this._instance=xl({element:o,app:e,fieldIdentifier:t,qId:n,options:bd(i),stateName:i.stateName||"$"}),a.add(this._instance)},unmount(){this._instance&&(a.remove(this._instance),this._instance=null)}};return o},getRegisteredTypes:u.getList,__DO_NOT_USE__:{types:u}};return c.public.nebbie=f,c.types=u,f}return r.createConfiguration=n=>e(yd(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()))}});function Ed(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - ".concat(+Date.now())})}}const Cd=globalThis.crypto||{getRandomValues:()=>123456};function xd(){return e=>{const t=He({},e);t.qInfo=t.qInfo||{},t.qInfo.qId=t.qInfo.qId||"mock-".concat(([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(e=>(e^Cd.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))));const n=t._mock;let r=t;return n&&(delete t._mock,r=He({},t,n)),Promise.resolve(B({on:()=>{},once:()=>{},getLayout:()=>Promise.resolve(r),getProperties:()=>Promise.resolve(t),getEffectiveProperties:()=>Promise.resolve(t),id:t.qInfo.qId},t))}}const Sd=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},Ld=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=Sd(e,{defaultValue:t,args:i});return n?new Promise((e=>{setTimeout((()=>e(s)),r)})):s}},wd=["id","session"],Od=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function Rd(e){return!Od.includes(e)}function Id(e){const t=Sd(e.getLayout);return t.qInfo&&t.qInfo.qId}function kd(e,t){return e.reduce(((e,n)=>B(B({},e),function(e,t){let n=Id(e);const{delay:r}=t,{id:o,session:i}=e,a=U(e,wd);if(o&&n&&o!==n)throw new Error("Generic object has multiple IDs, qInfo.qId: ".concat(n,", id: ").concat(o));return n=n||o||"object - ".concat(+Date.now()),{[n]:B(B({id:n,session:Sd(i,{defaultValue:!0}),on:()=>{},once:()=>{}},Object.entries(a).reduce(((e,t)=>{let[n,o]=t;return B(B({},e),{},{[n]:Ld(o,{async:Rd(n),delay:r})})}),{})),{},{genericType:e.type})}}(n,t))),{})}function qd(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!Id(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function _d(){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(qd);const n=kd(e,t);return async e=>Promise.resolve(n[e])}function Td(){return()=>Promise.resolve({id:"app-layout"})}const Ad={fromGenericObjects(e){return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=new Ed,r=new xd,o=new _d(e,t),i=new Td,a={id:"app - ".concat(+Date.now()),session:n,createSessionObject:r,getObject:o,getAppLayout:i};return Promise.resolve(a)}(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}},Dd={generator:sd,hook:xu,theme:ot,locale:V};export{Ad as EnigmaMocker,Dd as __DO_NOT_USE__,Ul as conversion,vd as embed,Vu as onContextMenu,Gu as onTakeSnapshot,Hu as useAction,Du as useApp,Tu as useAppLayout,Wu as useConstraints,Fu as useDeviceType,Lu as useEffect,Iu as useElement,zu as useEmbed,Pu as useGlobal,$u as useImperativeHandle,Zu as useKeyboard,qu as useLayout,Ou as useMemo,Au as useModel,Uu as useOptions,Bu as usePlugins,Ru as usePromise,ku as useRect,Ku as useRenderState,Mu as useSelections,_u as useStaleLayout,Su as useState,Nu as useTheme,ju as useTranslator};
|
|
13
13
|
//# sourceMappingURL=index.js.map
|