@nebula.js/stardust 7.3.0 → 7.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/stardust v7.3.0
2
+ * @nebula.js/stardust v7.4.0
3
3
  * Copyright (c) 2026 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -20,7 +20,7 @@ import*as e from"react";import t,{useState as n,useEffect as r,forwardRef as o,u
20
20
  * @license MIT
21
21
  * This source code is licensed under the MIT license found in the
22
22
  * LICENSE file in the root directory of this source tree.
23
- */const ur=[];function dr(e){return ur[0]=e,function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Jt=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Kt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Kt(n,t,e[a]),r&&(o+=i[a]);Qt.lastIndex=0;for(var s,l="";null!==(s=Qt.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Jt}}(ur)}var fr,pr,hr={exports:{}},mr={};function gr(){if(fr)return mr;fr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function h(p){if("object"==typeof p&&null!==p){var h=p.$$typeof;switch(h){case e:switch(p=p.type){case n:case o:case r:case l:case c:case f:return p;default:switch(p=p&&p.$$typeof){case a:case s:case d:case u:case i:return p;default:return h}}case t:return h}}}return mr.ContextConsumer=i,mr.ContextProvider=a,mr.Element=e,mr.ForwardRef=s,mr.Fragment=n,mr.Lazy=d,mr.Memo=u,mr.Portal=t,mr.Profiler=o,mr.StrictMode=r,mr.Suspense=l,mr.SuspenseList=c,mr.isContextConsumer=function(e){return h(e)===i},mr.isContextProvider=function(e){return h(e)===a},mr.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},mr.isForwardRef=function(e){return h(e)===s},mr.isFragment=function(e){return h(e)===n},mr.isLazy=function(e){return h(e)===d},mr.isMemo=function(e){return h(e)===u},mr.isPortal=function(e){return h(e)===t},mr.isProfiler=function(e){return h(e)===o},mr.isStrictMode=function(e){return h(e)===r},mr.isSuspense=function(e){return h(e)===l},mr.isSuspenseList=function(e){return h(e)===c},mr.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===l||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===s||e.$$typeof===p||void 0!==e.getModuleId)},mr.typeOf=h,mr}function br(){return pr||(pr=1,hr.exports=gr()),hr.exports}var yr=br();function vr(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Sr(t){if(e.isValidElement(t)||yr.isValidElementType(t)||!vr(t))return t;const n={};return Object.keys(t).forEach(e=>{n[e]=Sr(t[e])}),n}function wr(t,n,r={clone:!0}){const o=r.clone?{...t}:t;return vr(t)&&vr(n)&&Object.keys(n).forEach(i=>{e.isValidElement(n[i])||yr.isValidElementType(n[i])?o[i]=n[i]:vr(n[i])&&Object.prototype.hasOwnProperty.call(t,i)&&vr(t[i])?o[i]=wr(t[i],n[i],r):r.clone?o[i]=vr(n[i])?Sr(n[i]):n[i]:o[i]=n[i]}),o}function kr(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,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)=>({...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{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}}function xr(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}const Cr={borderRadius:4};function Er(e,t){return t?wr(e,t,{clone:!1}):e}const Lr={xs:0,sm:600,md:900,lg:1200,xl:1536},Rr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Lr[e]}px)`},Tr={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:Lr[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function qr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||Rr;return t.reduce((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r),{})}if("object"==typeof t){const e=r.breakpoints||Rr;return Object.keys(t).reduce((o,i)=>{if(a=e.keys,"@"===(s=i)||s.startsWith("@")&&(a.some(e=>s.startsWith(`@${e}`))||s.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}(r.containerQueries?r:Tr,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||Lr).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}var a,s;return o},{})}return n(t)}function Pr(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function Ir(e){if("string"!=typeof e)throw new Error(Mt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function _r(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 Or(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:_r(e,n)||r,t&&(o=t(o,r,e)),o}function Dr(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=_r(e.theme,r)||{};return qr(e,i,e=>{let r=Or(a,o,e);return e===r&&"string"==typeof e&&(r=Or(a,o,`${t}${"default"===e?"":Ir(e)}`,e)),!1===n?r:{[n]:r}})};return i.propTypes={},i.filterProps=[t],i}const Ar={m:"margin",p:"padding"},Nr={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},jr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Mr=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!jr[e])return[e];e=jr[e]}const[t,n]=e.split(""),r=Ar[t],o=Nr[n]||"";return Array.isArray(o)?o.map(e=>r+e):[r+o]}),$r=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],zr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function Fr(e,t,n,r){const o=_r(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:"string"==typeof o?o.startsWith("var(")&&0===e?0:o.startsWith("var(")&&1===e?o:`calc(${e} * ${o})`:o*e:Array.isArray(o)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=o[t];return e>=0?n:"number"==typeof n?-n:"string"==typeof n&&n.startsWith("var(")?`calc(-1 * ${n})`:`-${n}`}:"function"==typeof o?o:()=>{}}function Br(e){return Fr(e,"spacing",8)}function Ur(e,t){return"string"==typeof t||null==t?t:e(t)}function Wr(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=Ur(t,n),e),{})}(Mr(n),r);return qr(e,e[n],o)}function Hr(e,t){const n=Br(e.theme);return Object.keys(e).map(r=>Wr(e,t,r,n)).reduce(Er,{})}function Vr(e){return Hr(e,$r)}function Gr(e){return Hr(e,zr)}function Kr(e=8,t=Br({spacing:e})){if(e.mui)return e;const 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}function Jr(...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]?Er(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function Qr(e){return"number"!=typeof e?e:`${e}px solid`}function Zr(e,t){return Dr({prop:e,themeKey:"borders",transform:t})}Vr.propTypes={},Vr.filterProps=$r,Gr.propTypes={},Gr.filterProps=zr;const Xr=Zr("border",Qr),Yr=Zr("borderTop",Qr),eo=Zr("borderRight",Qr),to=Zr("borderBottom",Qr),no=Zr("borderLeft",Qr),ro=Zr("borderColor"),oo=Zr("borderTopColor"),io=Zr("borderRightColor"),ao=Zr("borderBottomColor"),so=Zr("borderLeftColor"),lo=Zr("outline",Qr),co=Zr("outlineColor"),uo=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Fr(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:Ur(t,e)});return qr(e,e.borderRadius,n)}return null};uo.propTypes={},uo.filterProps=["borderRadius"],Jr(Xr,Yr,eo,to,no,ro,oo,io,ao,so,uo,lo,co);const fo=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Fr(e.theme,"spacing",8),n=e=>({gap:Ur(t,e)});return qr(e,e.gap,n)}return null};fo.propTypes={},fo.filterProps=["gap"];const po=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Fr(e.theme,"spacing",8),n=e=>({columnGap:Ur(t,e)});return qr(e,e.columnGap,n)}return null};po.propTypes={},po.filterProps=["columnGap"];const ho=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Fr(e.theme,"spacing",8),n=e=>({rowGap:Ur(t,e)});return qr(e,e.rowGap,n)}return null};ho.propTypes={},ho.filterProps=["rowGap"];function mo(e,t){return"grey"===t?t:e}Jr(fo,po,ho,Dr({prop:"gridColumn"}),Dr({prop:"gridRow"}),Dr({prop:"gridAutoFlow"}),Dr({prop:"gridAutoColumns"}),Dr({prop:"gridAutoRows"}),Dr({prop:"gridTemplateColumns"}),Dr({prop:"gridTemplateRows"}),Dr({prop:"gridTemplateAreas"}),Dr({prop:"gridArea"}));function go(e){return e<=1&&0!==e?100*e+"%":e}Jr(Dr({prop:"color",themeKey:"palette",transform:mo}),Dr({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:mo}),Dr({prop:"backgroundColor",themeKey:"palette",transform:mo}));const bo=Dr({prop:"width",transform:go}),yo=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||Lr[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:go(t)}};return qr(e,e.maxWidth,t)}return null};yo.filterProps=["maxWidth"];const vo=Dr({prop:"minWidth",transform:go}),So=Dr({prop:"height",transform:go}),wo=Dr({prop:"maxHeight",transform:go}),ko=Dr({prop:"minHeight",transform:go});Dr({prop:"size",cssProperty:"width",transform:go}),Dr({prop:"size",cssProperty:"height",transform:go});Jr(bo,yo,vo,So,wo,ko,Dr({prop:"boxSizing"}));const xo={border:{themeKey:"borders",transform:Qr},borderTop:{themeKey:"borders",transform:Qr},borderRight:{themeKey:"borders",transform:Qr},borderBottom:{themeKey:"borders",transform:Qr},borderLeft:{themeKey:"borders",transform:Qr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Qr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:uo},color:{themeKey:"palette",transform:mo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:mo},backgroundColor:{themeKey:"palette",transform:mo},p:{style:Gr},pt:{style:Gr},pr:{style:Gr},pb:{style:Gr},pl:{style:Gr},px:{style:Gr},py:{style:Gr},padding:{style:Gr},paddingTop:{style:Gr},paddingRight:{style:Gr},paddingBottom:{style:Gr},paddingLeft:{style:Gr},paddingX:{style:Gr},paddingY:{style:Gr},paddingInline:{style:Gr},paddingInlineStart:{style:Gr},paddingInlineEnd:{style:Gr},paddingBlock:{style:Gr},paddingBlockStart:{style:Gr},paddingBlockEnd:{style:Gr},m:{style:Vr},mt:{style:Vr},mr:{style:Vr},mb:{style:Vr},ml:{style:Vr},mx:{style:Vr},my:{style:Vr},margin:{style:Vr},marginTop:{style:Vr},marginRight:{style:Vr},marginBottom:{style:Vr},marginLeft:{style:Vr},marginX:{style:Vr},marginY:{style:Vr},marginInline:{style:Vr},marginInlineStart:{style:Vr},marginInlineEnd:{style:Vr},marginBlock:{style:Vr},marginBlockStart:{style:Vr},marginBlockEnd:{style:Vr},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:fo},rowGap:{style:ho},columnGap:{style:po},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:go},maxWidth:{style:yo},minWidth:{transform:go},height:{transform:go},maxHeight:{transform:go},minHeight:{transform:go},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Co=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;if("typography"===s&&"inherit"===t)return{[e]:t};const u=_r(n,s)||{};if(c)return c(o);return qr(o,t,t=>{let n=Or(u,l,t);return t===n&&"string"==typeof t&&(n=Or(u,l,`${e}${"default"===t?"":Ir(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){const{sx:r,theme:o={},nested:i}=n||{};if(!r)return null;const a=o.unstable_sxConfig??xo;function s(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const s=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(o.breakpoints),l=Object.keys(s);let c=s;return Object.keys(r).forEach(n=>{const i=function(e,t){return"function"==typeof e?e(t):e}(r[n],o);if(null!=i)if("object"==typeof i)if(a[n])c=Er(c,e(n,i,o,a));else{const e=qr({theme:o},i,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,i)?c=Er(c,e):c[n]=t({sx:i,theme:o,nested:!0})}else c=Er(c,e(n,i,o,a))}),!i&&o.modularCssLayers?{"@layer sx":xr(o,Pr(l,c))}:xr(o,Pr(l,c))}return Array.isArray(r)?r.map(s):s(r)}}();function Eo(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Lo(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e;let s=wr({breakpoints:kr(n),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Kr(o),shape:{...Cr,...i}},a);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(s),s.applyStyles=Eo,s=t.reduce((e,t)=>wr(e,t),s),s.unstable_sxConfig={...xo,...a?.unstable_sxConfig},s.unstable_sx=function(e){return Co({sx:e,theme:this})},s}function Ro(t=null){const n=e.useContext(y);return n&&(r=n,0!==Object.keys(r).length)?n:t;var r}Co.filterProps=["sx"];const To=Lo();function qo(e=To){return Ro(e)}function Po(e){const t=dr(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Io({styles:e,themeId:t,defaultTheme:n={}}){const r=qo(n),o=t&&r[t]||r;let i="function"==typeof e?e(o):e;return o.modularCssLayers&&(i=Array.isArray(i)?i.map(e=>Po("function"==typeof e?e(o):e)):Po(i)),or.jsx(cr,{styles:i})}const _o=e=>e,Oo=(()=>{let e=_o;return{configure(t){e=t},generate:t=>e(t),reset(){e=_o}}})();function Do(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Do(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ao(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Do(e))&&(r&&(r+=" "),r+=t);return r}const No={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function jo(e,t,n="Mui"){const r=No[t];return r?`${n}-${r}`:`${Oo.generate(e)}-${t}`}function Mo(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=jo(e,t,n)}),r}function $o(e){const{variants:t,...n}=e,r={variants:t,style:dr(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=dr(e.style))}),r}const zo=Lo();function Fo(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function Bo(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Uo(e){return e?(t,n)=>n[e]:null}function Wo(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Wo(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Bo(r.style,n):r.style;else{const{variants:e,...o}=r;t=n?Bo(dr(o),n):o}return Ho(e,r.variants,[t],n)}return r?.isProcessed?n?Bo(dr(r.style),n):r.style:n?Bo(dr(r),n):r}function Ho(e,t,n=[],r=void 0){let o;e:for(let i=0;i<t.length;i+=1){const a=t[i];if("function"==typeof a.props){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(o))continue}else for(const t in a.props)if(e[t]!==a.props[t]&&e.ownerState?.[t]!==a.props[t])continue e;"function"==typeof a.style?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Bo(dr(a.style(o)),r):a.style(o))):n.push(r?Bo(dr(a.style),r):a.style)}return n}function Vo(e,t){}function Go(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function Ko(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if("components"===i||"slots"===i)r[i]={...e[i],...r[i]};else if("componentsProps"===i||"slotProps"===i){const o=e[i],a=t[i];if(a)if(o){r[i]={...a};for(const e in o)if(Object.prototype.hasOwnProperty.call(o,e)){const t=e;r[i][t]=Ko(o[t],a[t],n)}}else r[i]=a;else r[i]=o||{}}else"className"===i&&n&&t.className?r.className=Ao(e?.className,t?.className):"style"===i&&n&&t.style?r.style={...e?.style,...t?.style}:void 0===r[i]&&(r[i]=e[i])}return r}const Jo="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function Qo(e,t=0,n=1){return function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}(e,t,n)}function Zo(e){if(e.type)return e;if("#"===e.charAt(0))return Zo(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(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Mt(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)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(Mt(10,r))}else o=o.split(",");return o=o.map(e=>parseFloat(e)),{type:n,values:o,colorSpace:r}}const Xo=(e,t)=>{try{return(e=>{const t=Zo(e);return t.values.slice(0,3).map((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e).join(" ")})(e)}catch(t){return e}};function Yo(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function ei(e){e=Zo(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])),Yo({type:s,values:l})}function ti(e){let t="hsl"===(e=Zo(e)).type||"hsla"===e.type?Zo(ei(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))}function ni(e,t){return e=Zo(e),t=Qo(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,Yo(e)}function ri(e,t,n){try{return ni(e,t)}catch(t){return e}}function oi(e,t){if(e=Zo(e),t=Qo(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Yo(e)}function ii(e,t,n){try{return oi(e,t)}catch(t){return e}}function ai(e,t){if(e=Zo(e),t=Qo(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Yo(e)}function si(e,t,n){try{return ai(e,t)}catch(t){return e}}function li(e,t,n){try{return function(e,t=.15){return ti(e)>.5?oi(e,t):ai(e,t)}(e,t)}catch(t){return e}}const ci=e.createContext(null);function ui(){return e.useContext(ci)}var di="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function fi(t){const{children:n,theme:r}=t,o=ui(),i=e.useMemo(()=>{const e=null===o?{...r}:function(e,t){if("function"==typeof t)return t(e);return{...e,...t}}(o,r);return null!=e&&(e[di]=null!==o),e},[r,o]);return or.jsx(ci.Provider,{value:i,children:n})}const pi=e.createContext();function hi({value:e,...t}){return or.jsx(pi.Provider,{value:e??!0,...t})}const mi=e.createContext(void 0);function gi({value:e,children:t}){return or.jsx(mi.Provider,{value:e,children:t})}function bi({props:t,name:n}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Ko(o.defaultProps,r,t.components.mergeClassNameAndStyle):o.styleOverrides||o.variants?r:Ko(o,r,t.components.mergeClassNameAndStyle)}({props:t,name:n,theme:{components:e.useContext(mi)}})}let yi=0;const vi={...e}.useId;function Si(t){if(void 0!==vi){return vi()}return function(t){const[n,r]=e.useState(t),o=t||n;return e.useEffect(()=>{null==n&&(yi+=1,r(`mui-${yi}`))},[n]),o}(t)}const wi={};function ki(t,n,r,o=!1){return e.useMemo(()=>{const e=t&&n[t]||n;if("function"==typeof r){const i=r(e),a=t?{...n,[t]:i}:i;return o?()=>a:a}return t?{...n,[t]:r}:{...n,...r}},[t,n,r,o])}function xi(e){const{children:t,theme:n,themeId:r}=e,o=Ro(wi),i=ui()||wi,a=ki(r,o,n),s=ki(r,i,n,!0),l="rtl"===(r?a[r]:a).direction,c=function(e){const t=Ro(),n=Si()||"",{modularCssLayers:r}=e;let o="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return o=r&&null===t?"string"==typeof r?r.replace(/mui(?!\.)/g,o):`@layer ${o};`:"",Jo(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(o){if(t&&t.hasAttribute?.("data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const r=document.createElement("style");r.setAttribute("data-mui-layer-order",n),r.textContent=o,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[o,n]),o?or.jsx(Io,{styles:o}):null}(a);return or.jsx(fi,{theme:s,children:or.jsx(y.Provider,{value:a,children:or.jsx(hi,{value:l,children:or.jsxs(gi,{value:r?a[r].components:a.components,children:[c,t]})})})})}const Ci={theme:void 0};const Ei="mode",Li="color-scheme",Ri="data-color-scheme";function Ti(){}const qi=({key:e,storageWindow:t})=>(t||"undefined"==typeof window||(t=window),{get(n){if("undefined"==typeof window)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return Ti;const r=t=>{const r=t.newValue;t.key===e&&n(r)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function Pi(){}function Ii(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia&&"system"===e){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}}function _i(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function Oi(t){const{defaultMode:n="light",defaultLightColorScheme:r,defaultDarkColorScheme:o,supportedColorSchemes:i=[],modeStorageKey:a=Ei,colorSchemeStorageKey:s=Li,storageWindow:l=("undefined"==typeof window?void 0:window),storageManager:c=qi,noSsr:u=!1}=t,d=i.join(","),f=i.length>1,p=e.useMemo(()=>c?.({key:a,storageWindow:l}),[c,a,l]),h=e.useMemo(()=>c?.({key:`${s}-light`,storageWindow:l}),[c,s,l]),m=e.useMemo(()=>c?.({key:`${s}-dark`,storageWindow:l}),[c,s,l]),[g,b]=e.useState(()=>{const e=p?.get(n)||n,t=h?.get(r)||r,i=m?.get(o)||o;return{mode:e,systemMode:Ii(e),lightColorScheme:t,darkColorScheme:i}}),[y,v]=e.useState(u||!f);e.useEffect(()=>{v(!0)},[]);const S=function(e){return _i(e,t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0)}(g),w=e.useCallback(e=>{b(t=>{if(e===t.mode)return t;const r=e??n;return p?.set(r),{...t,mode:r,systemMode:Ii(r)}})},[p,n]),k=e.useCallback(e=>{e?"string"==typeof e?e&&!d.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):b(t=>{const n={...t};return _i(t,t=>{"light"===t&&(h?.set(e),n.lightColorScheme=e),"dark"===t&&(m?.set(e),n.darkColorScheme=e)}),n}):b(t=>{const n={...t},i=null===e.light?r:e.light,a=null===e.dark?o:e.dark;return i&&(d.includes(i)?(n.lightColorScheme=i,h?.set(i)):console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)),a&&(d.includes(a)?(n.darkColorScheme=a,m?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),n}):b(e=>(h?.set(r),m?.set(o),{...e,lightColorScheme:r,darkColorScheme:o}))},[d,h,m,r,o]),x=e.useCallback(e=>{"system"===g.mode&&b(t=>{const n=e?.matches?"dark":"light";return t.systemMode===n?t:{...t,systemMode:n}})},[g.mode]),C=e.useRef(x);return C.current=x,e.useEffect(()=>{if("function"!=typeof window.matchMedia||!f)return;const e=(...e)=>C.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}},[f]),e.useEffect(()=>{if(f){const e=p?.subscribe(e=>{e&&!["light","dark","system"].includes(e)||w(e||n)})||Pi,t=h?.subscribe(e=>{e&&!d.match(e)||k({light:e})})||Pi,r=m?.subscribe(e=>{e&&!d.match(e)||k({dark:e})})||Pi;return()=>{e(),t(),r()}}},[k,w,d,n,l,f,p,h,m]),{...g,mode:y?g.mode:void 0,systemMode:y?g.systemMode:void 0,colorScheme:y?S:void 0,setMode:w,setColorScheme:k}}function Di(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}const Ai=(e,t,n,r=[])=>{let o=e;t.forEach((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"==typeof o&&(o[e]=n):o&&"object"==typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])})};function Ni(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(o,{[r]:l}),Ai(i,e,`var(${r})`,s),Ai(a,e,`var(${r}, ${l})`,s)}},l=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach(([t,o])=>{(!l||l&&!l([...n,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...n,t],Array.isArray(o)?[...r,t]:r):s([...n,t],o,r))})}(e),{css:o,vars:i,varsWithDefaults:a}}const ji={black:"#000",white:"#fff"},Mi={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"},$i="#f3e5f5",zi="#ce93d8",Fi="#ba68c8",Bi="#ab47bc",Ui="#9c27b0",Wi="#7b1fa2",Hi="#e57373",Vi="#ef5350",Gi="#f44336",Ki="#d32f2f",Ji="#c62828",Qi="#ffb74d",Zi="#ffa726",Xi="#ff9800",Yi="#f57c00",ea="#e65100",ta="#e3f2fd",na="#90caf9",ra="#42a5f5",oa="#1976d2",ia="#1565c0",aa="#4fc3f7",sa="#29b6f6",la="#03a9f4",ca="#0288d1",ua="#01579b",da="#81c784",fa="#66bb6a",pa="#4caf50",ha="#388e3c",ma="#2e7d32",ga="#1b5e20";function ba(){return{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:ji.white,default:ji.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}}}const ya=ba();function va(){return{text:{primary:ji.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:ji.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}}}const Sa=va();function wa(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=ai(e.main,o):"dark"===t&&(e.dark=oi(e.main,i)))}function ka(e,t,n,r,o){const i=o.light||o,a=o.dark||1.5*o;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:"light"===n?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(100*i).toFixed(0)}%)`:"dark"===n&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(100*a).toFixed(0)}%)`))}function xa(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...i}=e,a=e.primary||function(e="light"){return"dark"===e?{main:na,light:ta,dark:ra}:{main:oa,light:ra,dark:ia}}(t),s=e.secondary||function(e="light"){return"dark"===e?{main:zi,light:$i,dark:Bi}:{main:Ui,light:Fi,dark:Wi}}(t),l=e.error||function(e="light"){return"dark"===e?{main:Gi,light:Hi,dark:Ki}:{main:Ki,light:Vi,dark:Ji}}(t),c=e.info||function(e="light"){return"dark"===e?{main:sa,light:aa,dark:ca}:{main:ca,light:la,dark:ua}}(t),u=e.success||function(e="light"){return"dark"===e?{main:fa,light:da,dark:ha}:{main:ma,light:pa,dark:ga}}(t),d=e.warning||function(e="light"){return"dark"===e?{main:Zi,light:Qi,dark:Yi}:{main:"#ed6c02",light:Xi,dark:ea}}(t);function f(e){if(o)return function(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}(e);const t=function(e,t){const n=ti(e),r=ti(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Sa.text.primary)>=n?Sa.text.primary:ya.text.primary;return t}const p=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:a=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(Mt(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(Mt(12,t?` (${t})`:"",JSON.stringify(e.main)));return o?(ka(o,e,"light",i,r),ka(o,e,"dark",a,r)):(wa(e,"light",i,r),wa(e,"dark",a,r)),e.contrastText||(e.contrastText=f(e.main)),e};let h;"light"===t?h=ba():"dark"===t&&(h=va());return wr({common:{...ji},mode:t,primary:p({color:a,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:u,name:"success"}),grey:Mi,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...h},i)}function Ca(e){const t={};return Object.entries(e).forEach(e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)}),t}const Ea={textTransform:"uppercase"},La='"Roboto", "Helvetica", "Arial", sans-serif';function Ra(e,t){const{fontFamily:n=La,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}="function"==typeof t?t(e):t,f=r/14,p=u||(e=>e/l*f+"rem"),h=(e,t,r,o,i)=>{return{fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===La?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},...i,...c};var a},m={h1:h(o,96,1.167,-1.5),h2:h(o,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,Ea),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,Ea),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return wr({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...m},d,{clone:!1})}function Ta(...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(",")}const qa=["none",Ta(0,2,1,-1,0,1,1,0,0,1,3,0),Ta(0,3,1,-2,0,2,2,0,0,1,5,0),Ta(0,3,3,-2,0,3,4,0,0,1,8,0),Ta(0,2,4,-1,0,4,5,0,0,1,10,0),Ta(0,3,5,-1,0,5,8,0,0,1,14,0),Ta(0,3,5,-1,0,6,10,0,0,1,18,0),Ta(0,4,5,-2,0,7,10,1,0,2,16,1),Ta(0,5,5,-3,0,8,10,1,0,3,14,2),Ta(0,5,6,-3,0,9,12,1,0,3,16,2),Ta(0,6,6,-3,0,10,14,1,0,4,18,3),Ta(0,6,7,-4,0,11,15,1,0,4,20,3),Ta(0,7,8,-4,0,12,17,2,0,5,22,4),Ta(0,7,8,-4,0,13,19,2,0,5,24,4),Ta(0,7,9,-4,0,14,21,2,0,5,26,4),Ta(0,8,9,-5,0,15,22,2,0,6,28,5),Ta(0,8,10,-5,0,16,24,2,0,6,30,5),Ta(0,8,11,-5,0,17,26,2,0,6,32,5),Ta(0,9,11,-5,0,18,28,2,0,7,34,6),Ta(0,9,12,-6,0,19,29,2,0,7,36,6),Ta(0,10,13,-6,0,20,31,3,0,8,38,7),Ta(0,10,13,-6,0,21,33,3,0,8,40,7),Ta(0,10,14,-6,0,22,35,3,0,8,42,7),Ta(0,11,14,-7,0,23,36,3,0,9,44,8),Ta(0,11,15,-7,0,24,38,3,0,9,46,8)],Pa={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)"},Ia={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function _a(e){return`${Math.round(e)}ms`}function Oa(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function Da(e){const t={...Pa,...e.easing},n={...Ia,...e.duration};return{getAutoHeightDuration:Oa,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0,...s}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof o?o:_a(o)} ${i} ${"string"==typeof a?a:_a(a)}`).join(",")},...e,easing:t,duration:n}}const Aa={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Na(e){return vr(e)||void 0===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)}function ja(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let r=0;r<n.length;r++){const[o,i]=n[r];!Na(i)||o.startsWith("unstable_")?delete t[o]:vr(i)&&(t[o]={...i},e(t[o]))}}(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(t,null,2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`}function Ma(e){return"number"==typeof e?`${(100*e).toFixed(0)}%`:`calc((${e}) * 100%)`}function $a(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${"string"==typeof n?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${"string"==typeof n?`calc(${n})`:n})`:ni(t,(e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n})(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Ma(n)})`:ai(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Ma(n)})`:oi(t,n)}})}function za(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,colorSpace:c,...u}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error(Mt(20));const d=xa({...i,colorSpace:c}),f=Lo(e);let p=wr(f,{mixins:(h=f.breakpoints,m=r,{toolbar:{minHeight:56,[h.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[h.up("sm")]:{minHeight:64}},...m}),palette:d,shadows:qa.slice(),typography:Ra(d,s),transitions:Da(a),zIndex:{...Aa}});var h,m;return p=wr(p,u),p=t.reduce((e,t)=>wr(e,t),p),p.unstable_sxConfig={...xo,...u?.unstable_sxConfig},p.unstable_sx=function(e){return Co({sx:e,theme:this})},p.toRuntimeSource=ja,$a(p),p}const Fa=[...Array(25)].map((e,t)=>{if(0===t)return"none";const n=function(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ba(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function Ua(e){return"dark"===e?Fa:[]}function Wa(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var Ha=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return(a=e.cssVarPrefix,[...[...Array(25)].map((e,t)=>`--${a?`${a}-`:""}overlays-${t}`),`--${a?`${a}-`:""}palette-AppBar-darkBg`,`--${a?`${a}-`:""}palette-AppBar-darkColor`]).forEach(e=>{o[e]=n[e],delete n[e]}),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}var a;return r};function Va(e,t,n){!e[t]&&n&&(e[t]=n)}function Ga(e){return"string"==typeof e&&e.startsWith("hsl")?ei(e):e}function Ka(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Xo(Ga(e[t])))}const Ja=e=>{try{return e()}catch(e){}};function Qa(e,t,n,r,o){if(!n)return;n=!0===n?{}:n;const i="dark"===o?"dark":"light";if(!r)return void(t[o]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...i}=e,a=xa({...t,colorSpace:o});return{palette:a,opacity:{...Ba(a.mode),...n},overlays:r||Ua(a.mode),...i}}({...n,palette:{mode:i,...n?.palette},colorSpace:e}));const{palette:a,...s}=za({...r,palette:{mode:i,...n?.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...Ba(i),...n?.opacity},overlays:n?.overlays||Ua(i)},s}function Za(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:s=Wa,colorSchemeSelector:l=(n.light&&n.dark?"media":void 0),rootSelector:c=":root",...u}=e,d=Object.keys(n)[0],f=r||(n.light&&"light"!==d?"light":d),p=((e="mui")=>Di(e))(i),{[f]:h,light:m,dark:g,...b}=n,y={...b};let v,S=h;if(("dark"===f&&!("dark"in n)||"light"===f&&!("light"in n))&&(S=!0),!S)throw new Error(Mt(21,f));a&&(v="oklch");const w=Qa(v,y,S,u,f);m&&!y.light&&Qa(v,y,m,void 0,"light"),g&&!y.dark&&Qa(v,y,g,void 0,"dark");let k={defaultColorScheme:f,...w,cssVarPrefix:i,colorSchemeSelector:l,rootSelector:c,getCssVar:p,colorSchemes:y,font:{...Ca(w.typography),...w.font},spacing:(x=u.spacing,"number"==typeof x?`${x}px`:"string"==typeof x||"function"==typeof x||Array.isArray(x)?x:"8px")};var x;Object.keys(k.colorSchemes).forEach(e=>{const t=k.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return p(e,t[r][o])};function r(e,t,n){if(v){let r;return e===ri&&(r=`transparent ${(100*(1-n)).toFixed(0)}%`),e===ii&&(r=`#000 ${(100*n).toFixed(0)}%`),e===si&&(r=`#fff ${(100*n).toFixed(0)}%`),`color-mix(in ${v}, ${t}, ${r})`}return e(t,n)}var o;if("light"===t.mode&&(Va(t.common,"background","#fff"),Va(t.common,"onBackground","#000")),"dark"===t.mode&&(Va(t.common,"background","#000"),Va(t.common,"onBackground","#fff")),o=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach(e=>{o[e]||(o[e]={})}),"light"===t.mode){Va(t.Alert,"errorColor",r(ii,a?p("palette-error-light"):t.error.light,.6)),Va(t.Alert,"infoColor",r(ii,a?p("palette-info-light"):t.info.light,.6)),Va(t.Alert,"successColor",r(ii,a?p("palette-success-light"):t.success.light,.6)),Va(t.Alert,"warningColor",r(ii,a?p("palette-warning-light"):t.warning.light,.6)),Va(t.Alert,"errorFilledBg",n("palette-error-main")),Va(t.Alert,"infoFilledBg",n("palette-info-main")),Va(t.Alert,"successFilledBg",n("palette-success-main")),Va(t.Alert,"warningFilledBg",n("palette-warning-main")),Va(t.Alert,"errorFilledColor",Ja(()=>t.getContrastText(t.error.main))),Va(t.Alert,"infoFilledColor",Ja(()=>t.getContrastText(t.info.main))),Va(t.Alert,"successFilledColor",Ja(()=>t.getContrastText(t.success.main))),Va(t.Alert,"warningFilledColor",Ja(()=>t.getContrastText(t.warning.main))),Va(t.Alert,"errorStandardBg",r(si,a?p("palette-error-light"):t.error.light,.9)),Va(t.Alert,"infoStandardBg",r(si,a?p("palette-info-light"):t.info.light,.9)),Va(t.Alert,"successStandardBg",r(si,a?p("palette-success-light"):t.success.light,.9)),Va(t.Alert,"warningStandardBg",r(si,a?p("palette-warning-light"):t.warning.light,.9)),Va(t.Alert,"errorIconColor",n("palette-error-main")),Va(t.Alert,"infoIconColor",n("palette-info-main")),Va(t.Alert,"successIconColor",n("palette-success-main")),Va(t.Alert,"warningIconColor",n("palette-warning-main")),Va(t.AppBar,"defaultBg",n("palette-grey-100")),Va(t.Avatar,"defaultBg",n("palette-grey-400")),Va(t.Button,"inheritContainedBg",n("palette-grey-300")),Va(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),Va(t.Chip,"defaultBorder",n("palette-grey-400")),Va(t.Chip,"defaultAvatarColor",n("palette-grey-700")),Va(t.Chip,"defaultIconColor",n("palette-grey-700")),Va(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Va(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Va(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Va(t.LinearProgress,"primaryBg",r(si,a?p("palette-primary-main"):t.primary.main,.62)),Va(t.LinearProgress,"secondaryBg",r(si,a?p("palette-secondary-main"):t.secondary.main,.62)),Va(t.LinearProgress,"errorBg",r(si,a?p("palette-error-main"):t.error.main,.62)),Va(t.LinearProgress,"infoBg",r(si,a?p("palette-info-main"):t.info.main,.62)),Va(t.LinearProgress,"successBg",r(si,a?p("palette-success-main"):t.success.main,.62)),Va(t.LinearProgress,"warningBg",r(si,a?p("palette-warning-light"):t.warning.main,.62)),Va(t.Skeleton,"bg",v?r(ri,a?p("palette-text-primary"):t.text.primary,.11):`rgba(${n("palette-text-primaryChannel")} / 0.11)`),Va(t.Slider,"primaryTrack",r(si,a?p("palette-primary-main"):t.primary.main,.62)),Va(t.Slider,"secondaryTrack",r(si,a?p("palette-secondary-main"):t.secondary.main,.62)),Va(t.Slider,"errorTrack",r(si,a?p("palette-error-main"):t.error.main,.62)),Va(t.Slider,"infoTrack",r(si,a?p("palette-info-main"):t.info.main,.62)),Va(t.Slider,"successTrack",r(si,a?p("palette-success-main"):t.success.main,.62)),Va(t.Slider,"warningTrack",r(si,a?p("palette-warning-main"):t.warning.main,.62));const e=v?r(ii,a?p("palette-background-default"):t.background.default,.6825):li(t.background.default,.8);Va(t.SnackbarContent,"bg",e),Va(t.SnackbarContent,"color",Ja(()=>v?Sa.text.primary:t.getContrastText(e))),Va(t.SpeedDialAction,"fabHoverBg",li(t.background.paper,.15)),Va(t.StepConnector,"border",n("palette-grey-400")),Va(t.StepContent,"border",n("palette-grey-400")),Va(t.Switch,"defaultColor",n("palette-common-white")),Va(t.Switch,"defaultDisabledColor",n("palette-grey-100")),Va(t.Switch,"primaryDisabledColor",r(si,a?p("palette-primary-main"):t.primary.main,.62)),Va(t.Switch,"secondaryDisabledColor",r(si,a?p("palette-secondary-main"):t.secondary.main,.62)),Va(t.Switch,"errorDisabledColor",r(si,a?p("palette-error-main"):t.error.main,.62)),Va(t.Switch,"infoDisabledColor",r(si,a?p("palette-info-main"):t.info.main,.62)),Va(t.Switch,"successDisabledColor",r(si,a?p("palette-success-main"):t.success.main,.62)),Va(t.Switch,"warningDisabledColor",r(si,a?p("palette-warning-main"):t.warning.main,.62)),Va(t.TableCell,"border",r(si,ri(a?p("palette-divider"):t.divider,1),.88)),Va(t.Tooltip,"bg",r(ri,a?p("palette-grey-700"):t.grey[700],.92))}if("dark"===t.mode){Va(t.Alert,"errorColor",r(si,a?p("palette-error-light"):t.error.light,.6)),Va(t.Alert,"infoColor",r(si,a?p("palette-info-light"):t.info.light,.6)),Va(t.Alert,"successColor",r(si,a?p("palette-success-light"):t.success.light,.6)),Va(t.Alert,"warningColor",r(si,a?p("palette-warning-light"):t.warning.light,.6)),Va(t.Alert,"errorFilledBg",n("palette-error-dark")),Va(t.Alert,"infoFilledBg",n("palette-info-dark")),Va(t.Alert,"successFilledBg",n("palette-success-dark")),Va(t.Alert,"warningFilledBg",n("palette-warning-dark")),Va(t.Alert,"errorFilledColor",Ja(()=>t.getContrastText(t.error.dark))),Va(t.Alert,"infoFilledColor",Ja(()=>t.getContrastText(t.info.dark))),Va(t.Alert,"successFilledColor",Ja(()=>t.getContrastText(t.success.dark))),Va(t.Alert,"warningFilledColor",Ja(()=>t.getContrastText(t.warning.dark))),Va(t.Alert,"errorStandardBg",r(ii,a?p("palette-error-light"):t.error.light,.9)),Va(t.Alert,"infoStandardBg",r(ii,a?p("palette-info-light"):t.info.light,.9)),Va(t.Alert,"successStandardBg",r(ii,a?p("palette-success-light"):t.success.light,.9)),Va(t.Alert,"warningStandardBg",r(ii,a?p("palette-warning-light"):t.warning.light,.9)),Va(t.Alert,"errorIconColor",n("palette-error-main")),Va(t.Alert,"infoIconColor",n("palette-info-main")),Va(t.Alert,"successIconColor",n("palette-success-main")),Va(t.Alert,"warningIconColor",n("palette-warning-main")),Va(t.AppBar,"defaultBg",n("palette-grey-900")),Va(t.AppBar,"darkBg",n("palette-background-paper")),Va(t.AppBar,"darkColor",n("palette-text-primary")),Va(t.Avatar,"defaultBg",n("palette-grey-600")),Va(t.Button,"inheritContainedBg",n("palette-grey-800")),Va(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),Va(t.Chip,"defaultBorder",n("palette-grey-700")),Va(t.Chip,"defaultAvatarColor",n("palette-grey-300")),Va(t.Chip,"defaultIconColor",n("palette-grey-300")),Va(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Va(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Va(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Va(t.LinearProgress,"primaryBg",r(ii,a?p("palette-primary-main"):t.primary.main,.5)),Va(t.LinearProgress,"secondaryBg",r(ii,a?p("palette-secondary-main"):t.secondary.main,.5)),Va(t.LinearProgress,"errorBg",r(ii,a?p("palette-error-main"):t.error.main,.5)),Va(t.LinearProgress,"infoBg",r(ii,a?p("palette-info-main"):t.info.main,.5)),Va(t.LinearProgress,"successBg",r(ii,a?p("palette-success-main"):t.success.main,.5)),Va(t.LinearProgress,"warningBg",r(ii,a?p("palette-warning-main"):t.warning.main,.5)),Va(t.Skeleton,"bg",v?r(ri,a?p("palette-text-primary"):t.text.primary,.13):`rgba(${n("palette-text-primaryChannel")} / 0.13)`),Va(t.Slider,"primaryTrack",r(ii,a?p("palette-primary-main"):t.primary.main,.5)),Va(t.Slider,"secondaryTrack",r(ii,a?p("palette-secondary-main"):t.secondary.main,.5)),Va(t.Slider,"errorTrack",r(ii,a?p("palette-error-main"):t.error.main,.5)),Va(t.Slider,"infoTrack",r(ii,a?p("palette-info-main"):t.info.main,.5)),Va(t.Slider,"successTrack",r(ii,a?p("palette-success-main"):t.success.main,.5)),Va(t.Slider,"warningTrack",r(ii,a?p("palette-warning-light"):t.warning.main,.5));const e=v?r(si,a?p("palette-background-default"):t.background.default,.985):li(t.background.default,.98);Va(t.SnackbarContent,"bg",e),Va(t.SnackbarContent,"color",Ja(()=>v?ya.text.primary:t.getContrastText(e))),Va(t.SpeedDialAction,"fabHoverBg",li(t.background.paper,.15)),Va(t.StepConnector,"border",n("palette-grey-600")),Va(t.StepContent,"border",n("palette-grey-600")),Va(t.Switch,"defaultColor",n("palette-grey-300")),Va(t.Switch,"defaultDisabledColor",n("palette-grey-600")),Va(t.Switch,"primaryDisabledColor",r(ii,a?p("palette-primary-main"):t.primary.main,.55)),Va(t.Switch,"secondaryDisabledColor",r(ii,a?p("palette-secondary-main"):t.secondary.main,.55)),Va(t.Switch,"errorDisabledColor",r(ii,a?p("palette-error-main"):t.error.main,.55)),Va(t.Switch,"infoDisabledColor",r(ii,a?p("palette-info-main"):t.info.main,.55)),Va(t.Switch,"successDisabledColor",r(ii,a?p("palette-success-main"):t.success.main,.55)),Va(t.Switch,"warningDisabledColor",r(ii,a?p("palette-warning-light"):t.warning.main,.55)),Va(t.TableCell,"border",r(ii,ri(a?p("palette-divider"):t.divider,1),.68)),Va(t.Tooltip,"bg",r(ri,a?p("palette-grey-700"):t.grey[700],.92))}a||(Ka(t.background,"default"),Ka(t.background,"paper"),Ka(t.common,"background"),Ka(t.common,"onBackground"),Ka(t,"divider")),Object.keys(t).forEach(e=>{const n=t[e];"tonalOffset"!==e&&!a&&n&&"object"==typeof n&&(n.main&&Va(t[e],"mainChannel",Xo(Ga(n.main))),n.light&&Va(t[e],"lightChannel",Xo(Ga(n.light))),n.dark&&Va(t[e],"darkChannel",Xo(Ga(n.dark))),n.contrastText&&Va(t[e],"contrastTextChannel",Xo(Ga(n.contrastText))),"text"===e&&(Ka(t[e],"primary"),Ka(t[e],"secondary")),"action"===e&&(n.active&&Ka(t[e],"active"),n.selected&&Ka(t[e],"selected")))})}),k=t.reduce((e,t)=>wr(e,t),k);const C={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:Ha(k),enableContrastVars:a},{vars:E,generateThemeVars:L,generateStyleSheets:R}=function(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:l="light",...c}=e,{vars:u,css:d,varsWithDefaults:f}=Ni(c,t);let p=f;const h={},{[l]:m,...g}=a;if(Object.entries(g||{}).forEach(([e,n])=>{const{vars:r,css:o,varsWithDefaults:i}=Ni(n,t);p=wr(p,i),h[e]={css:o,vars:r}}),m){const{css:e,vars:n,varsWithDefaults:r}=Ni(m,t);p=wr(p,r),h[l]={css:e,vars:n}}function b(t,n){let r=o;if("class"===o&&(r=".%s"),"data"===o&&(r="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(r=`[${o}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=a[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(h).forEach(([,{vars:t}])=>{e=wr(e,t)}),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function s(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);const{[o]:l,...c}=h;if(l){const{css:e}=l,t=a[o]?.palette?.mode,i=!r&&t?{colorScheme:t,...e}:{...e};s(n(o,{...i}),i)}return Object.entries(c).forEach(([e,{css:t}])=>{const o=a[e]?.palette?.mode,i=!r&&o?{colorScheme:o,...t}:{...t};s(n(e,{...i}),i)}),i&&t.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),t}}}(k,C);return k.vars=E,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([e,t])=>{k[e]=t}),k.generateThemeVars=L,k.generateStyleSheets=R,k.generateSpacing=function(){return Kr(u.spacing,Br(this))},k.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(l),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=s,k.unstable_sxConfig={...xo,...u?.unstable_sxConfig},k.unstable_sx=function(e){return Co({sx:e,theme:this})},k.toRuntimeSource=ja,k}function Xa(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:xa({...!0===n?{}:n.palette,mode:t})})}function Ya(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=(n?void 0:{light:!0}),defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],c={...o,...n?{[s]:{..."boolean"!=typeof l&&l,palette:n}}:void 0};if(!1===r){if(!("colorSchemes"in e))return za(e,...t);let r=n;"palette"in e||c[s]&&(!0!==c[s]?r=c[s].palette:"dark"===s&&(r={mode:"dark"}));const o=za({...e,palette:r},...t);return o.defaultColorScheme=s,o.colorSchemes=c,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==c.light&&c.light,palette:o.palette},Xa(o,"dark",c.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==c.dark&&c.dark,palette:o.palette},Xa(o,"light",c.light)),o}return n||"light"in c||"light"!==s||(c.light=!0),Za({...a,colorSchemes:c,defaultColorScheme:s,..."boolean"!=typeof r&&r},...t)}const es=Ya();function ts(){const e=qo(es);return e[$t]||e}const ns=function(e={}){const{themeId:t,defaultTheme:n=zo,rootShouldForwardProp:r=Fo,slotShouldForwardProp:o=Fo}=e;function i(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}(e,e=>e.filter(e=>e!==Co));const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=Uo(Go(a)),...u}=t,d=n&&n.startsWith("Mui")||a?"components":"custom",f=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,p=l||!1;let h=Fo;"Root"===a||"root"===a?h=r:a?h=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(h=void 0);const m=function(e,t){return v(e,t)}(e,{shouldForwardProp:h,label:Vo(),...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return Wo(t,e,t.theme.modularCssLayers?d:void 0)};if(vr(e)){const t=$o(e);return function(e){return t.variants?Wo(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Bo(t.style,d):t.style}}return e},b=(...t)=>{const r=[],o=t.map(g),a=[];if(r.push(i),n&&c&&a.push(function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=Wo(e,r[t],e.theme.modularCssLayers?"theme":void 0);return c(e,o)}),n&&!f&&a.push(function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?Ho(e,r,[],e.theme.modularCssLayers?"theme":void 0):null}),p||a.push(Co),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(a.length).fill("");let i;i=[...t,...e,...n],i.raw=[...t,...e.raw,...n],r.unshift(i)}const s=[...r,...o,...a],l=m(...s);return e.muiName&&(l.muiName=e.muiName),l};return m.withConfig&&(b.withConfig=m.withConfig),b}}({themeId:$t,defaultTheme:es,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e});function rs({theme:e,...t}){const n=$t in e?e[$t]:void 0;return or.jsx(xi,{...t,themeId:n?$t:void 0,theme:n||e})}const os="mui-color-scheme",is="light",as="dark",ss="mui-mode",{CssVarsProvider:ls}=function(t){const{themeId:n,theme:r={},modeStorageKey:o=Ei,colorSchemeStorageKey:i=Li,disableTransitionOnChange:a=!1,defaultColorScheme:s,resolveTheme:l}=t,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},u=e.createContext(void 0),d={},f={},p="string"==typeof s?s:s.light,h="string"==typeof s?s:s.dark;return{CssVarsProvider:function(t){const{children:c,theme:p,modeStorageKey:h=o,colorSchemeStorageKey:m=i,disableTransitionOnChange:g=a,storageManager:b,storageWindow:y=("undefined"==typeof window?void 0:window),documentNode:v=("undefined"==typeof document?void 0:document),colorSchemeNode:S=("undefined"==typeof document?void 0:document.documentElement),disableNestedContext:w=!1,disableStyleSheetGeneration:k=!1,defaultMode:x="system",forceThemeRerender:C=!1,noSsr:E}=t,L=e.useRef(!1),R=ui(),T=e.useContext(u),q=!!T&&!w,P=e.useMemo(()=>p||("function"==typeof r?r():r),[p]),I=P[n],_=I||P,{colorSchemes:O=d,components:D=f,cssVarPrefix:A}=_,N=Object.keys(O).filter(e=>!!O[e]).join(","),j=e.useMemo(()=>N.split(","),[N]),M="string"==typeof s?s:s.light,$="string"==typeof s?s:s.dark,z=O[M]&&O[$]?x:O[_.defaultColorScheme]?.palette?.mode||_.palette?.mode,{mode:F,setMode:B,systemMode:U,lightColorScheme:W,darkColorScheme:H,colorScheme:V,setColorScheme:G}=Oi({supportedColorSchemes:j,defaultLightColorScheme:M,defaultDarkColorScheme:$,modeStorageKey:h,colorSchemeStorageKey:m,defaultMode:z,storageManager:b,storageWindow:y,noSsr:E});let K=F,J=V;q&&(K=T.mode,J=T.colorScheme);let Q=J||_.defaultColorScheme;_.vars&&!C&&(Q=_.defaultColorScheme);const Z=e.useMemo(()=>{const e=_.generateThemeVars?.()||_.vars,t={..._,components:D,colorSchemes:O,cssVarPrefix:A,vars:e};if("function"==typeof t.generateSpacing&&(t.spacing=t.generateSpacing()),Q){const e=O[Q];e&&"object"==typeof e&&Object.keys(e).forEach(n=>{e[n]&&"object"==typeof e[n]?t[n]={...t[n],...e[n]}:t[n]=e[n]})}return l?l(t):t},[_,Q,D,O,A]),X=_.colorSchemeSelector;Jo(()=>{if(J&&S&&X&&"media"!==X){const e=X;let t=X;if("class"===e&&(t=".%s"),"data"===e&&(t="[data-%s]"),e?.startsWith("data-")&&!e.includes("%s")&&(t=`[${e}="%s"]`),t.startsWith("."))S.classList.remove(...j.map(e=>t.substring(1).replace("%s",e))),S.classList.add(t.substring(1).replace("%s",J));else{const e=t.replace("%s",J).match(/\[([^\]]+)\]/);if(e){const[t,n]=e[1].split("=");n||j.forEach(e=>{S.removeAttribute(t.replace(J,e))}),S.setAttribute(t,n?n.replace(/"|'/g,""):"")}else S.setAttribute(t,J)}}},[J,X,S,j]),e.useEffect(()=>{let e;if(g&&L.current&&v){const t=v.createElement("style");t.appendChild(v.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[J,g,v]),e.useEffect(()=>(L.current=!0,()=>{L.current=!1}),[]);const Y=e.useMemo(()=>({allColorSchemes:j,colorScheme:J,darkColorScheme:H,lightColorScheme:W,mode:K,setColorScheme:G,setMode:B,systemMode:U}),[j,J,H,W,K,G,B,U,Z.colorSchemeSelector]);let ee=!0;(k||!1===_.cssVariables||q&&R?.cssVarPrefix===A)&&(ee=!1);const te=or.jsxs(e.Fragment,{children:[or.jsx(xi,{themeId:I?n:void 0,theme:Z,children:c}),ee&&or.jsx(cr,{styles:Z.generateStyleSheets?.()||[]})]});return q?te:or.jsx(u.Provider,{value:Y,children:te})},useColorScheme:()=>e.useContext(u)||c,getInitColorSchemeScript:e=>function(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=Ei,colorSchemeStorageKey:i=Li,attribute:a=Ri,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if("class"===a&&(u=".%s"),"data"===a&&(u="[data-%s]"),u.startsWith(".")){const e=u.substring(1);c+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));\n ${s}.classList.add('${e}'.replace('%s', colorScheme));`}const d=u.match(/\[([^[\]]+)\]/);if(d){const[e,t]=d[1].split("=");t||(c+=`${s}.removeAttribute('${e}'.replace('%s', light));\n ${s}.removeAttribute('${e}'.replace('%s', dark));`),c+=`\n ${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else".%s"!==u&&(c+=`${s}.setAttribute('${u}', colorScheme);`);return or.jsx("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?l:"",dangerouslySetInnerHTML:{__html:`(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${o}') || '${t}';\n const dark = localStorage.getItem('${i}-dark') || '${r}';\n const light = localStorage.getItem('${i}-light') || '${n}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${c}\n }\n} catch(e){}})();`}},"mui-color-scheme-init")}({colorSchemeStorageKey:i,defaultLightColorScheme:p,defaultDarkColorScheme:h,modeStorageKey:o,...e})}}({themeId:$t,theme:()=>Ya({cssVariables:!0}),colorSchemeStorageKey:os,modeStorageKey:ss,defaultColorScheme:{light:is,dark:as},resolveTheme:e=>{const t={...e,typography:Ra(e.palette,e.typography)};return t.unstable_sx=function(e){return Co({sx:e,theme:this})},t}}),cs=ls;function us({theme:t,...n}){const r=e.useMemo(()=>{if("function"==typeof t)return t;const e=$t in t?t[$t]:t;return"colorSchemes"in e?null:"vars"in e?t:{...t,vars:null}},[t]);return r?or.jsx(rs,{theme:r,...n}):or.jsx(cs,{theme:t,...n})}const ds=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(Ci.theme=r.theme,o=$o(e(Ci)),t=o,n=r.theme),o}};function fs(e){return jo("MuiSvgIcon",e)}Mo("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ps=ns("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Ir(n.color)}`],t[`fontSize${Ir(n.fontSize)}`]]}})(ds(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),hs=e.forwardRef(function(t,n){const r=bi({props:t,name:"MuiSvgIcon"});const{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,h=e.isValidElement(o)&&"svg"===o.type,m={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h},g={};u||(g.viewBox=f);const b=(e=>{const{color:t,fontSize:n,classes:r}=e;return function(e,t,n){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=(!0===s?"":" ")+t(r),s=!1,n&&n[r]&&(a+=" "+n[r]))}r[o]=a}return r}({root:["root","inherit"!==t&&`color${Ir(t)}`,`fontSize${Ir(n)}`]},fs,r)})(m);return or.jsxs(ps,{as:s,className:Ao(b.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:n,...g,...p,...h&&o.props,ownerState:m,children:[h?o.props.children:o,d?or.jsx("title",{children:d}):null]})});function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ms.apply(null,arguments)}function gs(e,t){return gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gs(e,t)}function bs(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gs(e,t)}function ys(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}hs.muiName="SvgIcon";const vs=Mo("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]);var Ss={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)"]};const ws={green:"#00873D",blue:"#3F8AB3",blueDark:"#005DB9",grey100:"#ffffff",grey98:"#FBFBFB",grey95:"#F2F2F2",grey90:"#E6E6E6",grey45:"#737373",grey25:"#404040",grey20:"#333333",grey15:"#262626",grey10:"#1A1A1A",grey0:"#000000"},ks={mode:"light",palette:{primary:{main:ws.grey25,contrastText:ws.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:ws.grey25,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)",light:ws.grey100,dark:ws.grey0},action:{active:"#545454",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:ws.grey100,default:ws.grey100,lightest:ws.grey100,lighter:ws.grey98,darker:ws.grey95,darkest:ws.grey90},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:ws.blueDark,focusBorder:ws.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)",disabledBackground:ws.grey45,disabledContrastText:ws.grey100},selected:{main:ws.green,alternative:"#E4E4E4",excluded:"#BEBEBE",selectedExcluded:"#BEBEBE",possible:ws.grey100,selectedContrastText:ws.grey100,mainContrastText:ws.grey100,alternativeContrastText:ws.grey25,excludedContrastText:ws.grey25,selectedExcludedContrastText:ws.grey100,possibleContrastText:ws.grey0},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)"}}},xs={mode:"dark",palette:{primary:{main:ws.grey20,contrastText:ws.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:ws.grey100,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)",light:ws.grey100,dark:ws.grey0},action:{active:ws.grey100,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:ws.grey25,lighter:ws.grey20,darker:ws.grey15,darkest:ws.grey10},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:ws.blueDark,focusBorder:ws.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)",disabledBackground:ws.grey45,disabledContrastText:ws.grey100},selected:{main:ws.green,alternative:ws.grey20,excluded:ws.grey10,selectedExcluded:ws.grey10,possible:ws.grey80,selectedContrastText:ws.grey100,mainContrastText:ws.grey100,alternativeContrastText:ws.grey100,excludedContrastText:ws.grey100,selectedExcludedContrastText:ws.grey100,possibleContrastText:ws.grey0},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)"}}},Cs={},Es=e=>({MuiCheckbox:{defaultProps:{color:"secondary"}},MuiRadio:{defaultProps:{color:"secondary"}},MuiTabs:{defaultProps:{indicatorColor:"secondary"}},MuiTypography:{styleOverrides:{root:{color:e.palette.text.primary}}},MuiGrid:{styleOverrides:{variants:[{props:{alignItems:"center"},style:{"align-items":"center"}}]}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},styleOverrides:{root:{borderRadius:2,border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`}}}},MuiIconButton:{styleOverrides:{root:{padding:7,borderRadius:2,border:"1px solid transparent","&:hover":{backgroundColor:e.palette.btn.hover},"&.Mui-focusVisible":{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`},"&.Mui-active":{borderColor:"transparent",boxShadow:"none",backgroundColor:e.palette.btn.active},"&:not(.Mui-active):not(.Mui-focusVisible)":{borderColor:"transparent",boxShadow:"none"}}}},MuiOutlinedInput:{styleOverrides:{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:{styleOverrides:{outlined:{padding:"3px 11px",[`&.${vs.focusVisible}`]:{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:`1px solid ${e.palette.btn.border}`,backgroundColor:e.palette.btn.normal,boxShadow:"none",[`&.${vs.focusVisible}`]:{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",[`&.${vs.disabled}`]:{backgroundColor:e.palette.btn.disabled}},"&.Mui-active":{boxShadow:"none",backgroundColor:e.palette.btn.active},[`&.${vs.disabled}`]:{backgroundColor:e.palette.btn.disabled}}}},MuiAccordionSummary:{styleOverrides:{content:{margin:"8px 0"}}}});function Ls(e){let t=ks,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn(`Invalid theme: '${e}'`):"dark"===e&&(t=xs));const r=JSON.stringify(t);if(Cs[r])return Cs[r];const o={palette:Z(Z({type:t.mode},Ss.palette),t.palette),typography:Z({},Ss.typography),shadows:Ss.shadows,shape:Z({},Ss.shape)},i=Z(Z({},o),{},{components:Es(o)});return Cs[r]=Ya(i),Cs[r].name=n,Cs[r]}Oo.configure(e=>`njs-baf6-${e.replace("Mui","")}`);var Rs=t.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null,modelStore:{},selectionStore:{},hostConfig:null,queryParams:null});const Ts={active:!0,select:!0,passive:!0,edit:!1};function qs(e){const t={},n={},r=function(e){const{constraints:t={},interactions:n={}}=e;if(Object.keys(n).length>0)return n;const r={};return Object.keys(t).forEach(e=>{r[e]=!t[e]}),r}(e);Object.keys(Ts).forEach(e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=Ts[e],n[e]=!Ts[e])}),e.constraints=n,e.interactions=t}var Ps=(e={},t=()=>{})=>{const o=e,i=[],a={},s={get:e=>o[e],set:(e,n)=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);return o[e]=n,a[e]=t({type:"SET",value:n}),n},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);o[e]=null},dispatch:e=>{i.forEach(t=>t(e?{}:o))},destroy:()=>{Object.keys(a).forEach(e=>{a[e]&&a[e]()})}};return[()=>{const[,e]=n(o);return r(()=>(i.push(e),()=>{const t=i.indexOf(e);i.splice(t,1)}),[e]),[s]},s]};const Is=o(({initialContext:e,renderCallback:t,modelStore:o,selectionStore:s},l)=>{const[c,u]=n(e),[d,f]=n(),{theme:p}=i(()=>({theme:Ls(d)}),[d]),[h,m]=n([]);return r(()=>{t&&t()},[]),a(l,()=>({setComps(e){m([...e])},setMuiThemeName:f,setContext:e=>u(t=>JSON.stringify(t)!==JSON.stringify(e)?e:t)}),[]),c&&(c.modelStore=o,c.selectionStore=s),or.jsx(lr,{injectFirst:!0,children:or.jsx(us,{theme:p,children:or.jsx(Rs.Provider,{value:c,children:h})})})});function _s({app:e,context:n}){let r,o=!1;const i=new Promise(e=>{r=e}),a=t.createRef(),s=document.createElement("div");s.style.display="none",s.setAttribute("data-nebulajs-version","7.3.0"),s.setAttribute("data-app-id",e.id),document.body.appendChild(s),n&&qs(n);const l=function(e){const[t,n]=Ps({}),[r,o]=Ps({}),[i,a]=Ps({}),[s,l]=Ps({}),[c,u]=Ps({}),[,d]=Ps({}),f=({type:e,value:t})=>{const r=d.get(t.id);d.set(t.id,{});const i=()=>{o.clear(t.id),u.set(t.id,{}),u.dispatch(!0)},s=()=>{t.removeListener("closed",s),t.removeListener("changed",i),n.clear(t.id),o.clear(t.id),a.clear(t.id),l.clear(t.id),u.clear(t.id),d.clear(t.id)};return"SET"===e&&(r||(t.on("changed",i),t.once("closed",s))),s},[p,h]=Ps({},f);return{subscribe:e=>{const t=f({type:"SET",value:e});return()=>{t(),h.clear(e.id)}},destroy:()=>{h.destroy()},useModelStore:p,modelStore:h,useModelChangedStore:c,useRpcResultStore:t,rpcResultStore:n,useRpcRequestStore:r,rpcRequestStore:o,useRpcRequestModelStore:s,rpcRequestModelStore:l,useRpcRequestSessionModelStore:i,rpcRequestSessionModelStore:a,modelChangedStore:u,appId:e}}(e.id),c=function(e){const[t,n]=Ps({}),[r,o]=Ps({}),[i,a]=Ps({});return{useAppSelectionsStore:t,useAppModalStore:r,appSelectionsStore:n,appModalStore:o,useModalObjectStore:i,modalObjectStore:a,appId:e}}(e.id),u=jt.createRoot(s);u.render(or.jsx(Is,{ref:a,initialContext:n,renderCallback:r,modelStore:l,selectionStore:c}));const d={},f=[],p=[];return[{toggleFocusOfCells(e){Object.keys(d).forEach(t=>{var n;null===(n=d[t].current)||void 0===n||n.toggleFocus(t===e)})},cells:d,addCell(e,t){d[e]=t},removeCell(e){delete d[e]},add:(e,t)=>(async n=>{await i,p.push(e),f.push(t),null==a||null===(n=a.current)||void 0===n||n.setComps(p)})(),remove(e){o||(async t=>{await i;const n=p.indexOf(e);var r;-1!==n&&(null===(r=f[n])||void 0===r||r.call(f),p.splice(n,1),f.splice(n,1));null==a||null===(t=a.current)||void 0===t||t.setComps(p)})()},setMuiThemeName(e){(async t=>{await i,null==a||null===(t=a.current)||void 0===t||t.setMuiThemeName(e)})()},context(e){(async t=>{await i,e&&qs(e),null==a||null===(t=a.current)||void 0===t||t.setContext(e)})()},destroy(){o=!0,f.forEach(e=>{e&&e()}),l.destroy(),u.unmount(),document.body.removeChild(s)}},l,c,a,i]}function Os(){const{useModelStore:e}=s(Rs).modelStore;return e()}function Ds(e,t,...o){const i=t?`${t.id}/${JSON.stringify(e)}`:null,[a]=Os(),[l]=function(){const{useRpcRequestSessionModelStore:e}=s(Rs).modelStore;return e()}(),[c,u]=n();return r(()=>{if(!t)return;(async()=>{let n=l.get(i);n||(n=t.createSessionObject(e),l.set(i,n));const r=await n;a.set(i,r),u(r)})()},[t,...o]),[c]}const As={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Ns(e){return Ds(As,e)}const js=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=Z(Z({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:Z({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=Z(Z({},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 Ms(e,t){const n=e?`${e.id}`:null,[o]=function(){const{useRpcResultStore:e}=s(Rs).modelStore;return e()}(),[i,a]=l(js,n?o.get(n):null),[c]=function(){const{useModelChangedStore:e}=s(Rs).modelStore;return e()}(),[u]=function(){const{useRpcRequestStore:e}=s(Rs).modelStore;return e()}();let d;n&&(d=u.get(n),d||(d={},u.set(n,d)));const f=async r=>{let i=d[t];if(!i||i&&i.rpcRetry){i={rpc:e[t](),rpcRetry:!1},d[t]=i,a({type:"INVALID",method:t,key:n,model:e,rpcResultStore:o,canCancel:!0})}try{await(s=0,new Promise(e=>{setTimeout(e,s)}));const r=await i.rpc;a({type:"VALID",result:r,key:n,method:t,model:e,rpcResultStore:o})}catch(e){15!==e.code||r||(i.rpcRetry||(i.rpcRetry=!0),f(!0))}var s},p={cancel:async()=>{const r=e.session.getObjectApi({handle:-1});await r.cancelRequest(d[t].rpc.requestId),a({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:o})},retry:()=>{d[t].rpcRetry=!0,f()}};return r(()=>{e&&f()},[e,c.get(e&&e.id),n,t]),[i&&i.result,{validating:i&&i.validating,canCancel:i&&i.canCancel,canRetry:i&&i.canRetry},p]}function $s(e){const[t,{validating:n,canCancel:r,canRetry:o},i]=Ms(e,"getLayout");return null!=e&&e.pureLayout&&t?[e.pureLayout,{validating:n,canCancel:r,canRetry:o},i]:[t,{validating:n,canCancel:r,canRetry:o},i]}function zs(e){return Ms(e,"getAppLayout")}function Fs(){const[e,t]=n(),[r,o]=n(),i=c(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 u(()=>{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]}const Bs="singlepublic-pinnedItems",Us=e=>{var t;const[o]=(e=>{const[t,o]=n(null),[i,a]=n(null),[s]=Os();return r(()=>{let t=!0,n=()=>{};if(e)return async function(){try{const r=`${e.id}-${Bs}`;let i=s.get(r);if(!i){if(i=await(async(e,t)=>{var n;const r=!(null===(n=(await e.getLayout()).permissions)||void 0===n||!n.createMasterobject);let o=null;try{o=r?await e.getOrCreateObject({qInfo:{qType:"singlepublic",qId:t}}):await e.getObject(t)}catch(e){}return o})(e,Bs),!t)return;if(i){s.set(r,i);const e=()=>{s.clear(r)};i.once("closed",e),n=()=>{i.removeListener("closed",e)}}}t&&(a(null),o(i))}catch(e){t&&(a(e instanceof Error?e:new Error(String(e))),o(null))}}(),()=>{t=!1,n()}},[e,s]),[t,i]})(e),[i]=Ms(o,"getLayout");return[null!==(t=null==i?void 0:i.pinnedItems)&&void 0!==t?t:[]]},Ws=(e,t,o)=>{const[i,a]=n(void 0),[s,l]=n(void 0),[c]=Os();return r(()=>{let n=!0,r=()=>{};if("function"==typeof(null==e?void 0:e.getObject))return async function(){try{const i=`${e.id}-${t}`;let s=c.get(i);if(!s){try{s=await e.getObject(t)}catch(t){if(2!==t.code||"Object not found"!==t.message||!o)throw t;s=await e.createSessionObject(o)}if(!n)return;c.set(i,s);const a=()=>{c.clear(i)};s.once("closed",a),r=()=>{s.removeListener("closed",a)}}n&&(l(void 0),a(s))}catch(e){n&&(l(e instanceof Error?e:new Error(String(e))),a(void 0))}}(),()=>{n=!1,r()}},[e,t,c]),[i,s]},Hs={qInfo:{qId:"FieldList",qType:"FieldList"},qFieldListDef:{qShowSystem:!1,qShowHidden:!1,qShowSrcTables:!0,qShowSemantic:!0,qShowDerivedFields:!0}},Vs={qInfo:{qId:"DimensionList",qType:"DimensionList"},qDimensionListDef:{qType:"dimension",qData:{title:"/qMetaDef/title",tags:"/qMetaDef/tags",grouping:"/qDim/qGrouping",info:"/qDimInfos",labelExpression:"/qDim/qLabelExpression"}}},Gs="qField",Ks="id",Js=(e,t)=>{const n=e.selections[0],r=t.selections[0],o=!!n.qOneAndOnlyOne;return o===!!r.qOneAndOnlyOne?n.qSortIndex-r.qSortIndex:o?-1:1},Qs=(e,t,n,r)=>{if(!e||!r)return n;if(0===e.length||0===t.length&&0===n.length)return[];const o=((e,t,n)=>n.filter(n=>Gs in n&&n[Gs]?e.some(e=>e.qName===n[Gs]):!(!(Ks in n)||!n[Ks])&&t.some(e=>{var t,r;return(null===(t=e.qInfo)||void 0===t?void 0:t.qId)===n[Ks]&&"N"===(null===(r=e.qData)||void 0===r?void 0:r.grouping)})))(e,r,t),i=[],a=[...n];for(let e=0;e<o.length;e++){var s;const t=o[e],n=!(!(Ks in t)||!t[Ks]),l=n?r.find(e=>{var n;return(null===(n=e.qInfo)||void 0===n?void 0:n.qId)===t[Ks]}):null,c=n?null==l||null===(s=l.qData)||void 0===s||null===(s=s.info[0])||void 0===s?void 0:s.qName:t[Gs],u=a.findIndex(e=>{var r;return n&&(null===(r=e.selections[0].qDimensionReferences)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.qId)===t[Ks]||!n&&(e.selections[0].qField===c||e.selections[0].qReadableName===c)});if(!(-1!==i.findIndex(e=>{var t;return(null===(t=e.selections)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.qField)===c&&!e.isPinned})))if(-1===u){const t=Z(Z({},o[e]),{},{isPinned:!0,states:["$"]});n&&l&&(t.qField=c,t.qName=l.qData.labelExpression||l.qData.title||c),i.push(t)}else i.push(a[u]),a.splice(u,1)}return[...i,...a]};function Zs(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Xs({size:e,style:t={},viewBox:n="0 0 16 16",shapes:r=[]}){const o=Z({fontSize:Zs(e),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},t);return or.jsx("i",{style:o,children:or.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:n,fill:"currentColor",children:r.map(({type:e,attrs:t},n)=>or.jsx(e,Z({},t),n))})})}var Ys=e=>Xs((e=>Z(Z({},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 el=e=>Xs((e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10ZM3.625 7.035A2 2 0 0 0 2 9v5a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9a2 2 0 0 0-1.625-1.965V5.383a4.375 4.375 0 0 0-8.75 0v1.652ZM3 9a1 1 0 0 1 .931-.998h8.138A1 1 0 0 1 13 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9Zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0Z"}}]}))(e));const tl=e=>Z(Z({},e),{},{viewBox:"0 0 12 16",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"}}]});var nl=e=>Xs(tl(e));var 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=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},il=function(){function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=ol(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[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},ol(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)}(e,d),rl(e,[{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 f=a[0]-1;if(t(f))break;a[0]=f}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)}}]),e}();const al=["S","XS"],sl=e=>e.reduce((e,t)=>e.concat(t));function ll(e){if(!e||!e.length)return[];const t=e.map(e=>{const t=e.qMatrix.map(e=>{const[t]=e;return n=t.qState,!!al.includes(n)&&t.qElemNumber;var n});return t.filter(e=>!1!==e)});return sl(t)}async function cl({selections:e,elemNumbers:t,toggle:n,isSingleSelect:r}){if(0===t.length)return!1;let o=!1;if(!t.some(e=>Number.isNaN(e))){const i=t;try{o=!1!==await e.select({method:"selectListObjectValues",params:["/qListObjectDef",i,n]})}catch(e){o=!1}o||(r?e.cancel():e.clear())}return o}const ul="RowColumn",dl={row:`${ul}-row`,rowBorderBottom:`${ul}-rowBorderBottom`,column:`${ul}-column`,fieldRoot:`${ul}-fieldRoot`,cell:`${ul}-cell`,labelText:`${ul}-labelText`,labelDense:`${ul}-labelDense`,highlighted:`${ul}-highlighted`,checkboxLabel:`${ul}-checkboxLabel`,icon:`${ul}-icon`,S:`${ul}-S`,XS:`${ul}-XS`,A:`${ul}-A`,X:`${ul}-X`,frequencyCount:`${ul}-frequencyCount`,barContainer:`${ul}-barContainer`,bar:`${ul}-bar`,barSelected:`${ul}-barSelected`,barWithCheckbox:`${ul}-barWithCheckbox`,barSelectedWithCheckbox:`${ul}-barSelectedWithCheckbox`,excludedTextWithCheckbox:`${ul}-excludedTextWithCheckbox`},fl=`.${dl.fieldRoot}`,pl=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function hl({selectionState:e,selections:t,checkboxes:n=!1,doc:o=document,loaderRef:i}){var a;const s=f({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});r(()=>{var e;if(null===(e=i.current)||void 0===e||null===(e=e._listRef)||void 0===e||!e._outerRef)return;const t=e=>e.preventDefault(),n=e=>e.preventDefault(),r=e=>e.preventDefault(),o=i.current._listRef._outerRef;return o.addEventListener("gesturestart",t),o.addEventListener("gesturechange",n),o.addEventListener("gestureend",r),()=>{o.removeEventListener("gesturestart",t),o.removeEventListener("gesturechange",n),o.removeEventListener("gestureend",r)}},[null===(a=i.current)||void 0===a||null===(a=a._listRef)||void 0===a?void 0:a._outerRef]);const l=async()=>{var n;return(null===(n=e.selectDisabled)||void 0===n||!n.call(e))&&(e.setSelectableValuesUpdating(),cl({selections:t,elemNumbers:s.current.elemNumbers,isSingleSelect:e.isSingleSelect,toggle:s.current.toggle}))},u=(t,n)=>{const r=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 sl(t)}(e.enginePages);return function(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)}([t,n],r)},d=t=>{const{startElemNumber:n}=s.current;if(n===t)return;const r=u(s.current.startElemNumber,t);e.updateItems(r,!0,s.current.elemNumbers)},p=c(t=>{if(e.selectDisabled())return;const n=+t.target.getAttribute("data-n"),r=!e.isSingleSelect&&pl(t.nativeEvent);s.current.elemNumbers=[n],s.current.toggle=r,r||e.clearItemStates(!0),e.updateItem(n),s.current.active=!1,l()},[]),h=c(t=>{if(0!==t.button||e.selectDisabled())return;const n=+t.currentTarget.getAttribute("data-n"),r=!e.isSingleSelect&&pl(t);s.current.isRange=!1,s.current.startElemNumber=n,s.current.elemNumbers=[n],s.current.toggle=r,s.current.active=!0,r||e.clearItemStates(!0),e.updateItem(n),e.isSingleSelect&&(s.current.active=!1,l()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(t,t.currentTarget)},[]),m=c(e=>{if(0===e.button&&s.current.active){if(s.current.active=!1,s.current.isRange){const t=+e.currentTarget.getAttribute("data-n");d(t)}l()}},[]),g=c(e=>{0===e.button&&s.current.active&&(s.current.active=!1,l())},[]),b=c(t=>{if(!s.current.active)return;s.current.isRange||(s.current.isRange=!0,e.isSelected(s.current.startElemNumber)||(e.updateItem(s.current.startElemNumber,!0),s.current.elemNumbers=[]));const n=+t.currentTarget.getAttribute("data-n");d(n)},[]),y=c(t=>{var n,r;if(s.current.active||s.current.isRange||e.isSingleSelect||t.touches.length<=1)return;if(t.touches.length>2)return void l();const o=Number(null===(n=t.touches[0].target)||void 0===n||null===(n=n.closest(fl))||void 0===n?void 0:n.getAttribute("data-n")),i=Number(null===(r=t.touches[1].target)||void 0===r||null===(r=r.closest(fl))||void 0===r?void 0:r.getAttribute("data-n"));if(Number.isNaN(o)||Number.isNaN(o))return void l();s.current.active=!0;u(o,i).length<7&&(s.current.touchRangeSmall=!0),s.current.elemNumbers=[],s.current.touchElemNumbers=[o,i]},[]),v=c(()=>{if(2!==s.current.touchElemNumbers.length)return;if(s.current.touchRangeSmall)return s.current.touchRangeSmall=!1,s.current.touchElemNumbers=[],void(s.current.active=!1);const[e,t]=s.current.touchElemNumbers;s.current.startElemNumber=e,d(t),s.current.touchElemNumbers=[],s.current.active=!1,s.current.toggle=!0,l()},[]);r(()=>(o.addEventListener("mouseup",g),()=>{o.removeEventListener("mouseup",g)}),[g]),r(()=>{const n=()=>{e.clearItemStates(!1)},r=()=>{e.clearItemStates(!0),e.triggerStateChanged()};return t.on("clearItemStates",n),t.on("deactivated",n),t.on("cleared",r),()=>{t.removeListener("clearItemStates",n),t.removeListener("deactivated",n),t.removeListener("cleared",r)}},[t]);const S={};return n?Object.assign(S,{onChange:p}):Object.assign(S,{onMouseUp:m,onMouseDown:h,onMouseEnter:b,onTouchStart:y,onTouchEnd:v}),{interactionEvents:S,select:async(n=[],r=!1,o=void 0)=>{var i;if(null!==(i=e.selectDisabled)&&void 0!==i&&i.call(e))return!1;const a=!e.isSingleSelect&&pl(null==o?void 0:o.nativeEvent);a||e.clearItemStates(!0);const s=[];return e.updateItems(n,r,s),e.setSelectableValuesUpdating(),cl({selections:t,elemNumbers:r?s:n,isSingleSelect:e.isSingleSelect,toggle:a})}}}const ml=e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var gl=e=>Xs(ml(e));const bl=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,yl=({cell:e,checkboxes:t})=>((e=>e?"A"===e.qState:null)(e)||bl(e))&&t;const vl=({column:e,histogram:t,cell:n,showGray:r})=>{if(!n)return[];const o=[e?dl.column:dl.row];t||o.push(dl.rowBorderBottom);const i=function({cell:e,showGray:t}){let n;switch(e.qState){case"XS":n=t?dl.XS:dl.S;break;case"S":case"L":n=dl.S;break;case"A":n=!!t&&dl.A;break;case"X":case"XL":n=!!t&&dl.X;break;default:n=!1}return n}({cell:n,showGray:r});return i&&o.push(i),o},Sl=e=>e.filter(e=>!!e).join(" ").trim(),wl=e=>e||"-",kl=["backgroundColor"],xl=({sizes:e,frequencyMode:t,isGridMode:n,freqHitsValue:r})=>{if("P"===t)return`${e.freqMinWidth}px`;return n&&!r?"max-content":"25%"},Cl=({sizes:e,frequencyMode:t,isGridMode:n})=>n?"max-content":"P"===t?e.freqMinWidth:e.freqMaxWidth,El=({checkboxes:e,styles:t,selectionState:n})=>{if(e)return"selected"===n?{[`& .${dl.labelText}`]:{color:t.selections.selected}}:{};const r=t.selections,o=r[n],i=r[`${n}Contrast`];return{background:o,color:i,"& $cell":{paddingRight:0},[`& .${dl.labelText}`]:{color:i},[`& .${dl.icon}`]:{color:i}}},Ll={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},Rl=ns("div",{shouldForwardProp:e=>!["checkboxes","isGridMode","isGridCol","dense","direction","sizes","frequencyMode","freqHitsValue","layout","styles"].includes(e)})(({theme:e,checkboxes:t,isGridMode:n,isGridCol:r,dense:o,direction:i,sizes:a,frequencyMode:s,freqHitsValue:l,styles:c})=>{const u=c.content,{backgroundColor:d}=u,f=X(u,kl),p=El({styles:c,checkboxes:t,selectionState:"selected"}),h=El({styles:c,checkboxes:t,selectionState:"excluded"}),m={height:"100%",transition:"width 0.2s",border:"1px solid",borderColor:"#D9D9D9",backgroundColor:"#FAFAFA"},g={opacity:"30%"};return{"& .value":{"&:focus-visible":{boxShadow:`inset 0 0 0 2px ${e.palette.custom.newFocusBorder} !important`,borderRadius:"4px",outline:"none"}},[`& .${dl.row}`]:Z({flexWrap:"nowrap"},c.content),[`& .${dl.rowBorderBottom}`]:{borderBottom:r?"none":`1px solid ${e.palette.divider}`,borderLeft:r?`1px solid ${e.palette.divider}`:"none"},[`& .${dl.column}`]:Z({flexWrap:"nowrap",borderRight:`1px solid ${e.palette.divider}`},c.content),[`& .${dl.cell}`]:{zIndex:2,display:"flex",alignItems:"center",flexGrow:1,minWidth:t?"52px":"26px",flexBasis:t?"auto":"max-content",paddingLeft:"9px",paddingRight:0},[`& .${dl.labelText}`]:Z(Z({lineHeight:"24px",userSelect:"none",paddingRight:"1px"},Ll),f),[`& .${dl.labelDense}`]:{lineHeight:"18px"},[`& .${dl.highlighted}`]:{backgroundColor:"#FFC72A"},[`& .${dl.checkboxLabel}`]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":Z(Z({},Ll),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},[`& .${dl.icon}`]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24,color:f.color},[`& .${dl.S}`]:Z(Z({},p),{},{"&:focus-visible":{boxShadow:`inset 0 0 0 2px ${e.palette.custom.newFocusBorder}, inset 0 0 0 4px ${e.palette.custom.whiteBorder} !important`,borderRadius:"4px",outline:"none"},border:n?"none":void 0}),[`& .${dl.XS}`]:Z(Z({},El({styles:c,checkboxes:t,selectionState:"selectedExcluded"})),{},{border:n?"none":void 0}),[`& .${dl.A}`]:Z(Z({},El({styles:c,checkboxes:t,selectionState:"alternative"})),{},{border:n?"none":void 0}),[`& .${dl.X}`]:Z(Z({},h),{},{border:n?"none":void 0}),[`& .${dl.X}, & .${dl.XS}`]:{border:n?"none":void 0,[`& .${dl.barSelected} .bar-filled`]:Z({},m)},[`& .${dl.frequencyCount}`]:Z(Z({zIndex:3,justifyContent:"flex-end"},Ll),{},{flex:`0 0 ${xl({sizes:a,frequencyMode:s,isGridMode:n,freqHitsValue:l})}`,minWidth:!n&&"P"!==s&&l?a.freqMinWidth:"max-content",maxWidth:Cl({sizes:a,frequencyMode:s,isGridMode:n}),textAlign:"rtl"===i?"left":"right",paddingLeft:"rtl"!==i?"8px":0}),[`&.${dl.barContainer}`]:{height:"100%",display:"flex",alignItems:"center"},[`& .${dl.bar}`]:{height:o?"16px":"20px",position:"absolute",zIndex:1,alignSelf:"center",left:4,width:"calc(100% - 8px)",display:"flex",alignItems:"center","& .bar-filled":Z({},m)},[`& .${dl.barSelected}`]:{"& .bar-filled":Z({},g)},[`& .${dl.barWithCheckbox}`]:{left:"rtl"===i?4:29,width:"calc(100% - 33px)"},[`& .${dl.barSelectedWithCheckbox}`]:{"& .bar-filled":Z(Z({},g),{},{backgroundColor:c.selections.selected||"#BFE5D0",borderColor:c.selections.selected})},[`& .${dl.excludedTextWithCheckbox}`]:{color:c.content.color,fontStyle:"italic"}}});var Tl=t.memo(Rl);const ql="ListBoxCheckbox",Pl={cbIcon:`${ql}-cbIcon`,cbIconChecked:`${ql}-cbIconChecked`,cbIconExcluded:`${ql}-cbIconExcluded`,cbIconAlternative:`${ql}-cbIconAlternative`,checkbox:`${ql}-checkbox`,dense:`${ql}-dense`},Il=ns(S,{shouldForwardProp:e=>"styles"!==e})(({styles:e})=>({[`& .${Pl.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"},[`& .${Pl.cbIconChecked}`]:{borderRadius:3,backgroundColor:e.selections.selected,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:'""'}},[`& .${Pl.cbIconExcluded}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.excluded},[`& .${Pl.cbIconAlternative}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.alternative},[`&.${Pl.checkbox}`]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},[`&.${Pl.dense}`]:{padding:"4px 8px"}})),_l=(e,t=!0,n=!1)=>or.jsx("span",{className:e.cbIcon,children:n&&or.jsx("span",{className:t&&n?e.cbIconExcluded:""})});function Ol({onChange:e,checked:t,label:n,dense:r,excluded:o,styles:i,showGray:a=!0,dataN:s}){return or.jsx(Il,{edge:"start",onChange:e,checked:t,disableRipple:!0,className:[Pl.checkbox,r&&Pl.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":n,"data-n":s},name:n,icon:_l(Pl,a,o),checkedIcon:or.jsx("span",{className:Pl.cbIconChecked}),styles:i})}const Dl={radioButton:"ListBoxRadioButton-radioButton"},Al=ns(w,{shouldForwardProp:e=>!["dense","styles"].includes(e)})(({checked:e,styles:t,dense:n})=>({[`&.${Dl.radioButton}`]:{right:"5px",color:e?t.selections.selected:t.content.color,padding:n?"0px 0px 0px 12px":void 0,backgroundColor:"transparent"}}));function Nl({onChange:e,checked:t,label:n,dense:r,dataN:o,styles:i}){return or.jsx(Al,{checked:t,onChange:e,value:n,name:n,className:Dl.radioButton,inputProps:{"data-n":o},disableRipple:!0,size:r?"small":"medium",dense:r,styles:i})}function jl({label:e,dense:t,showGray:n=!0,checkboxes:r,cell:o,valueTextAlign:i}){return or.jsx(k,{component:"span",variant:"body2",className:Sl([dl.labelText,t&&dl.labelDense,n&&yl({cell:o,checkboxes:r})&&dl.excludedTextWithCheckbox]),align:i,dir:"auto",children:or.jsx("span",{children:e})})}function Ml({label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}){return"string"==typeof e?or.jsx(jl,{label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}):e}function $l({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}){const f=or.jsx(Ol,{onChange:e,label:t,checked:r,dense:o,excluded:bl(i),isGridCol:a,showGray:s,dataN:n,styles:d}),p=or.jsx(Nl,{onChange:e,label:t,checked:r,dense:o,dataN:n,styles:d});return or.jsx(x,{control:l?p:f,className:dl.checkboxLabel,label:or.jsx(Ml,{label:t,dense:o,showGray:s,checkboxes:c,cell:i,valueTextAlign:u})},n)}function zl({labels:e,dense:t,showGray:n,checkboxes:r}){const o=e.map(([e,t],n)=>or.jsx("span",{id:n,className:t?dl.highlighted:"",children:e}));return or.jsx(jl,{label:o,dense:t,showGray:n,checkboxes:r})}function Fl({onChange:e,labels:t,checkboxes:n,dense:r,showGray:o,qElemNumber:i,isSelected:a,cell:s,isGridCol:l,isSingleSelect:c,valueTextAlign:u,styles:d}){const f=or.jsx(zl,{labels:t,dense:r,showGray:o,checkboxes:n});return n?or.jsx($l,{onChange:e,label:f,qElemNumber:i,isSelected:a,dense:r,cell:s,isGridCol:l,showGray:o,isSingleSelect:c,checkboxes:n,valueTextAlign:u,styles:d}):f}var Bl=t.memo(function({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}){return c?or.jsx($l,{onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}):or.jsx(jl,{label:t,dense:o,showGray:!0,checkboxes:c,cell:i,valueTextAlign:u})});function Ul({qFrequency:e,histogram:t,checkboxes:n,isSelected:r,frequencyMax:o}){if(!(e&&t&&"-"!==wl(e)))return;const i=(({qFrequency:e,frequencyMax:t})=>{const n=String(e),r="%"===n.substring(n.length-1),o=parseFloat(r?n:e);return`${r?o:o/t*100}%`})({qFrequency:e,frequencyMax:o});return or.jsx(C,{className:Sl([dl.bar,n&&dl.barWithCheckbox,r&&(n?dl.barSelectedWithCheckbox:dl.barSelected)]),children:or.jsx(C,{className:"bar-filled",width:i})})}function Wl({cell:e,checkboxes:t,dense:n,showGray:r}){const o=wl(null==e?void 0:e.qFrequency);return or.jsx(E,{style:{display:"flex",alignItems:"center"},className:dl.frequencyCount,"aria-label":o,title:o,children:or.jsx(k,{noWrap:!0,color:"inherit",variant:"body2",className:Sl([n&&dl.labelDense,dl.labelText,r&&yl({cell:e,checkboxes:t})&&dl.excludedTextWithCheckbox]),children:o})})}function Hl({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:r}){if("singleColumn"===e)return{height:"100%",width:"100%"};switch(t){case"row":case"column":return{height:r?"100%":`calc(100% - ${n}px)`,width:`calc(100% - ${2*n}px)`,position:"absolute",left:4};default:return{}}}const Vl=ns(E,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction","fillHeight"].includes(e)})(({dataLayout:e,layoutOrder:t,itemPadding:n,cellPaddingRight:r,direction:o,fillHeight:i})=>{const a="padding"+("rtl"===o?"Left":"Right");return{[`&.${dl.fieldRoot}`]:Z(Z({},Hl({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:i})),{},{[a]:r?"8px":void 0})}});const Gl=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===Gl.ARROW_UP||e===Gl.ARROW_DOWN||e===Gl.ARROW_LEFT||e===Gl.ARROW_RIGHT});function Kl(e){null==e||e.querySelectorAll(".last-focused").forEach(e=>{e.classList.remove("last-focused")})}function Jl(e){return(null==e?void 0:e.closest(".njs-cell"))||(null==e?void 0:e.closest(".qv-gridcell"))||(null==e?void 0:e.closest(".qv-gs-listbox"))}function Ql({containerRef:e,enabled:t}){const[r,o]=n(!1),i={enabled:t,active:r,innerTabStops:!t||r,blur(n){var r;if(!t)return;o(!1);const i=Jl(e.current)||(null===(r=e.current)||void 0===r?void 0:r.parentElement);var a;null==(a=e.current)||a.querySelectorAll('[tabIndex="0"]').forEach(e=>{e.setAttribute("tabIndex",-1)}),Kl(e.current),n&&i&&(i.setAttribute("tabIndex",0),e.current.setAttribute("tabIndex",-1),i.focus())},focus(){if(!t)return;o(!0);const n=e.current,r=null==n?void 0:n.querySelector(".search input"),i=null==n?void 0:n.querySelector(".value.last-focused"),a=null==n?void 0:n.querySelector(".value.selector, .value"),s=null==n?void 0:n.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),l=null==n?void 0:n.querySelector("#listbox-unlock-button"),c=(null==n?void 0:n.querySelector(".listbox-cyclic-button"))||r||i||a||l||s;null==c||c.setAttribute("tabIndex",0),null==c||c.focus()},focusSelection(){const e=document.querySelector("#listbox-unlock-button"),t=document.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm:not(:disabled)"),n=e||t;return null==n||n.setAttribute("tabIndex",0),null==n||n.focus(),n}};return i}const Zl=e=>+e.getAttribute("data-n"),Xl=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},Yl=e=>{const t=null==e?void 0:e.querySelector(".value.last-focused"),n=null==e?void 0:e.querySelector(".value.selector"),r=null==e?void 0:e.querySelector(".value"),o=t||n||r;return null==o||o.setAttribute("tabIndex",0),null==o||o.focus(),Kl(e),o},ec=e=>{const t=null==e?void 0:e.querySelector(".listbox-cyclic-button:not(:disabled)");return null==t||t.setAttribute("tabIndex",0),null==t||t.focus(),t},tc=(e,t)=>{if(!t.enabled)return;const{currentTarget:n,target:r}=e,o=r.classList.contains("listbox-container"),i=n.closest(".listbox-container"),a=Jl(i),s=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(o||s)t.blur(!0);else{Kl(i),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}};function nc({select:e,selectAll:t,onCtrlF:n,confirm:r,cancel:o,setScrollPosition:i,focusListItems:a,keyboard:s,isModal:l,rowCount:c,columnCount:u,rowIndex:d,columnIndex:f,layoutOrder:p}){const h=(e,t,n=!1)=>{if(e===Gl.ARROW_LEFT||e===Gl.ARROW_RIGHT||"number"!=typeof d||"number"!=typeof f){const e=null==t?void 0:t.parentElement[n?"nextElementSibling":"previousElementSibling"];return null==e?void 0:e.querySelector("[role]")}const r=null==t?void 0:t.parentElement.parentElement,o=null==r?void 0:r.childElementCount;if(o){const n=(({rowIndex:e,columnIndex:t,rowCount:n,columnCount:r,layoutOrder:o,keyCode:i,numCells:a})=>{const s=e=>{let t;return"row"===o?(t=a%r,e<t?n:n-1):(t=a%n,e<r-1?n:t)};let l=e,c=t;if(i===Gl.ARROW_DOWN)if(e>=s(t)-1){if(t===r-1)return-1;l=0,c=t+1}else l=e+1;else if(0===e){if(0===t)return-1;l=s(t-1)-1,c=t-1}else l=e-1;if("row"===o)return l*r+c;const u=a%n;return 0===u||l<u?l*r+c:(l-u)*(r-1)+c+u*r})({rowIndex:d,columnIndex:f,rowCount:c,columnCount:u,layoutOrder:p,keyCode:e,numCells:o}),r=null==t?void 0:t.parentElement.parentElement.children[n];return null==r?void 0:r.querySelector("[role]")}};let m=!1;const g=e=>{m=e};return c=>{let u;const{currentTarget:d,nativeEvent:f}=c,{keyCode:p,shiftKey:b=!1,ctrlKey:y=!1,metaKey:v=!1}=f;switch(p){case Gl.TAB:{const e=d.closest(".listbox-container"),t=void 0!==l?l():void 0;d.classList.add("last-focused");if(!(null!=s&&s.enabled)){if(!t)return;return s.focusSelection(),c.preventDefault(),void c.stopPropagation()}if(b){Xl(e)||ec(e)||(t?s.focusSelection():tc(c,s));break}s.focusSelection()||ec(e)||Xl(e)||(d.blur(),tc(c,s));break}case Gl.SHIFT:g(!0);break;case Gl.SPACE:e([Zl(d)],!1,c);break;case Gl.ARROW_DOWN:case Gl.ARROW_RIGHT:u=h(p,d,!0),b&&u&&(m&&(e([Zl(d)],!0),g(!1)),e([Zl(u)],!0));break;case Gl.ARROW_UP:case Gl.ARROW_LEFT:u=h(p,d,!1),b&&u&&(m&&(e([Zl(d)],!0),g(!1)),e([Zl(u)],!0));break;case Gl.ENTER:if(r(),void 0===l)return;break;case Gl.ESCAPE:if(void 0===l)return void o();if(!l())return;o();break;case Gl.HOME:if(a.setFirst(!0),y){null==i||i("overflowStart");break}null==i||i("start");break;case Gl.END:if(a.setLast(!0),y){null==i||i("overflowEnd");break}null==i||i("end");break;case Gl.A:if(y||v){t();break}return;case Gl.F:if(y||v){n();break}return;default:return}u&&u.focus(),c.preventDefault(),c.stopPropagation()}}const rc={S:"Object.Listbox.Selected",A:"Object.Listbox.Alternative",O:"Object.Listbox.Optional",XS:"Object.Listbox.SelectedExcluded",L:"Object.Listbox.Locked",X:"Object.Listbox.Excluded",XL:"Object.Listbox.ExcludedLock"};function oc({index:e,rowIndex:t,columnIndex:o,style:a,data:s}){var l,u;const{onChange:d,onClick:f,onMouseDown:p,onMouseUp:h,onMouseEnter:m,onTouchStart:g,onTouchEnd:b,pages:y,isLocked:v,column:S=!1,checkboxes:w=!1,textAlign:k,direction:x,layoutOptions:C={},freqIsAllowed:L,isSingleSelect:R,actions:T,frequencyMax:q="",histogram:P=!1,keyboard:I,showGray:_=!0,showTick:O=!0,columnCount:D=1,rowCount:A=1,dataOffset:N,deducedFrequencyMode:j,focusListItems:M,listCount:$,sizes:z,translator:F,showSearch:B,isModal:U,contentFontStyle:W,styles:H,fillHeight:V}=s,{dense:G=!1,dataLayout:K="singleColumn",layoutOrder:J}=C,{itemPadding:Q}=z;let X,Y;const ee={max:null,currentIndex:null};if("number"==typeof t&&"number"==typeof o){"row"===J?(X=t*D+o,ee.max=A,ee.currentIndex=t):(X=o*A+t,ee.max=D,ee.currentIndex=o);const e=0;Y=Z(Z({},a),{},{height:V?"100%":a.height,left:e+(0===o?a.left:Number(a.left)+o*e),top:0===t?a.top:Number(a.top)+t*e})}else X=e,ee.max=$,ee.currentIndex=e,Y=Z({},a);X+=N;const[te,ne]=n(null);r(()=>{null!==te&&(0===ee.currentIndex&&M.first&&(te.focus(),M.setFirst(!1)),ee.currentIndex===ee.max-1&&M.last&&(te.focus(),M.setLast(!1)))},[te,M.first,M.last]);const re=c(nc(Z(Z({},T),{},{focusListItems:M,keyboard:I,isModal:U,rowCount:A,columnCount:D,rowIndex:t,columnIndex:o,layoutOrder:J})),[T,null==I?void 0:I.innerTabStops,A,D,t,o,J]),oe=i(()=>function({pages:e,cellIndex:t}){let n;const r=e.filter(e=>e.qArea.qTop<=t&&t<e.qArea.qTop+e.qArea.qHeight)[0];if(r){const e=r.qArea;t>=e.qTop&&t<e.qTop+e.qHeight&&([n]=r.qMatrix[t-e.qTop])}return n}({pages:y,cellIndex:X}),[y,X]),ie="S"===(null==oe?void 0:oe.qState)||"XS"===(null==oe?void 0:oe.qState)||"L"===(null==oe?void 0:oe.qState)||"XL"===(null==oe?void 0:oe.qState),ae=i(()=>vl({column:S,histogram:P,cell:oe,showGray:_}),[null==oe?void 0:oe.qState,P,G]),se=c(e=>{e.preventDefault()},[w]),le=i(()=>oe&&function({direction:e,cell:t,textAlign:n}){const r=!["NaN",void 0].includes(null==t?void 0:t.qNum);let o;return o=!n||n.auto?r?"rtl"===e?"left":"right":{rtl:"right",ltr:"left"}[e]:(null==n?void 0:n.align)||"left",["left","center","right"].includes(o)?o:"left"}({direction:x,cell:oe,textAlign:k}),[x,oe,k]);if(!oe)return null;const ce="grid"===K&&"column"===J,ue=null!==(l=null==oe?void 0:oe.qText)&&void 0!==l?l:"";let de;if(null!==(u=oe.qHighlightRanges)&&void 0!==u&&null!==(u=u.qRanges)&&void 0!==u&&u.length){const e=oe.qHighlightRanges.qRanges.sort((e,t)=>e.qCharPos-t.qCharPos)||[];de=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,n=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}(ue,e)}const fe={alignItems:"center",display:"flex",fontSize:"8px"},pe="rtl"===x,he={display:"flex",alignItems:"center",flexGrow:1,paddingLeft:pe?8:w?0:void 0,paddingRight:w?0:pe?8:0,justifyContent:le,textAlign:le},me=0===e,ge=ie&&v,be=!w&&ie&&!v,ye=!w&&O,ve=w||!O,Se=function({translator:e,label:t,qState:n,isSelected:r,currentIndex:o,maxIndex:i,showSearch:a}){const s=rc[n],l=e.get(s),c=[];if(r){const t=a?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=e.get(t);c.push(n)}const u=`${t} ${l}`,d=e.get("CurrentSelections.Of",[o+1,i+1]);return c.unshift(u,d),c.join(". ").trim()}({translator:F,label:ue,qState:oe.qState,currentIndex:ee.currentIndex,maxIndex:ee.max,showSearch:B}),we=!pe&&"right"===le||pe&&"left"===le;return or.jsx(Tl,{className:dl.barContainer,checkboxes:w,style:Y,styles:H,isGridCol:ce,isGridMode:"grid"===K,dense:G,direction:x,sizes:z,frequencyMode:j,freqHitsValue:we,contentFontStyle:W,"data-testid":"listbox.item",children:or.jsxs(Vl,{role:"row","aria-label":Se,"aria-selected":ie,"aria-setsize":ee.max,"aria-rowindex":ee.currentIndex,ref:ne,container:!0,dataLayout:K,cellPaddingRight:ve,layoutOrder:J,itemPadding:Q,gap:0,className:Sl(["value",dl.fieldRoot,...ae]),onClick:f,onMouseDown:p,onMouseUp:h,onMouseEnter:m,onKeyDown:re,onTouchStart:g,onTouchEnd:b,onContextMenu:se,tabIndex:me&&I.innerTabStops?0:-1,"data-n":null==oe?void 0:oe.qElemNumber,direction:x,fillHeight:V,children:[(null==oe?void 0:oe.qFrequency)&&or.jsx(Ul,{qFrequency:null==oe?void 0:oe.qFrequency,histogram:P,checkboxes:w,isSelected:ie,frequencyMax:q}),or.jsx(E,{style:he,className:Sl([dl.cell,dl.selectedCell]),title:`${ue}`,children:de?or.jsx(Fl,{onChange:d,labels:de,checkboxes:w,dense:G,showGray:_,qElemNumber:oe.qElemNumber,isSelected:ie,cell:oe,isGridCol:ce,isSingleSelect:R,valueTextAlign:le,styles:H}):or.jsx(Bl,{onChange:d,label:ue,qElemNumber:oe.qElemNumber,isSelected:ie,dense:G,cell:oe,isGridCol:ce,showGray:_,isSingleSelect:R,checkboxes:w,valueTextAlign:le,styles:H})}),L&&or.jsx(Wl,{cell:oe,checkboxes:w,dense:G,showGray:_}),ye&&or.jsxs(E,{className:dl.icon,children:[ge&&or.jsx(el,{style:fe,size:"small"}),be&&or.jsx(gl,{style:fe,size:"small"})]})]})})}var ic=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ac(e,t){return e===t||!(!ic(e)||!ic(t))}function sc(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ac(e[n],t[n]))return!1;return!0}function lc(e,t){var n;void 0===t&&(t=sc);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 cc="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function uc(e){cancelAnimationFrame(e.id)}function dc(e,t){var n=cc();var r={id:requestAnimationFrame(function o(){cc()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var fc=-1;function pc(e){if(void 0===e&&(e=!1),-1===fc||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),fc=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return fc}var hc=null;function mc(e){if(void 0===e&&(e=!1),null===hc||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?hc="positive-descending":(t.scrollLeft=1,hc=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),hc}return hc}var gc=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function bc(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,u=e.getRowHeight,f=e.getRowOffset,h=e.getRowStartIndexForOffset,m=e.getRowStopIndexForStartIndex,g=e.initInstanceProps,b=e.shouldResetStyleCacheOnItemSizeChange,y=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=g(r.props,ys(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:ys(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=lc(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=lc(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,d=r._getItemStyleCache(b&&s,b&&l,b&&c),p=e+":"+t;if(d.hasOwnProperty(p))o=d[p];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;d[p]=o={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:f(r.props,e,r._instanceProps),height:u(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=lc(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(mc()){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&&uc(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=dc(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}bs(t,e),t.getDerivedStateFromProps=function(e,t){return yc(e,t),y(e),null};var d=t.prototype;return d.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)},d.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,f=i.rowCount,p=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=pc();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,f-1)));var y=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>p?b:0,S=y>d?b:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,S):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,v):g})},d.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()},d.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(mc()){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()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&uc(this._resetIsScrollingTimeoutId)},d.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,d=e.itemData,f=e.itemKey,h=void 0===f?gc:f,m=e.outerElementType,g=e.outerTagName,b=e.rowCount,y=e.style,v=e.useIsScrolling,S=e.width,w=this.state.isScrolling,k=this._getHorizontalRangeToRender(),x=k[0],C=k[1],E=this._getVerticalRangeToRender(),L=E[0],R=E[1],T=[];if(r>0&&b)for(var q=L;q<=R;q++)for(var P=x;P<=C;P++)T.push(p(t,{columnIndex:P,data:d,isScrolling:v?w:void 0,key:h({columnIndex:P,data:d,rowIndex:q}),rowIndex:q,style:this._getItemStyle(q,P)}));var I=a(this.props,this._instanceProps),_=s(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:ms({position:"relative",height:i,width:S,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},p(c||u||"div",{children:T,ref:l,style:{height:I,pointerEvents:w?"none":void 0,width:_}}))},d._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],f=u[1],p=u[2],h=u[3];this._callOnItemsRendered(a,s,d,f,l,c,p,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,b=m.scrollLeft,y=m.scrollTop,v=m.scrollUpdateWasRequested,S=m.verticalScrollDirection;this._callOnScroll(b,y,g,S,v)}},d._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,f=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var p=r(this.props,d,this._instanceProps),h=o(this.props,p,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,f),g=u&&"forward"!==c?1:Math.max(1,f);return[Math.max(0,p-m),Math.max(0,Math.min(t-1,h+g)),p,h]},d._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=h(this.props,c,this._instanceProps),f=m(this.props,d,c,this._instanceProps),p=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-p),Math.max(0,Math.min(i-1,f+g)),d,f]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var yc=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},vc=function(e,t){return e};function Sc(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,ys(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:ys(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=lc(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=lc(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),f=o(r.props,e,r._instanceProps),p="horizontal"===a||"horizontal"===l,h="rtl"===a,m=p?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:p?0:d,height:p?"100%":f,width:p?f:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=lc(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(mc()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState(function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&uc(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=dc(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}bs(t,e),t.getDerivedStateFromProps=function(e,t){return wc(e,t),u(e),null};var d=t.prototype;return d.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)},d.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?pc():0:l.scrollHeight>l.clientHeight?pc():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},d.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()},d.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(mc()){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()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&uc(this._resetIsScrollingTimeoutId)},d.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,d=e.itemKey,f=void 0===d?vc:d,h=e.layout,m=e.outerElementType,g=e.outerTagName,b=e.style,y=e.useIsScrolling,v=e.width,S=this.state.isScrolling,w="horizontal"===o||"horizontal"===h,k=w?this._onScrollHorizontal:this._onScrollVertical,x=this._getRangeToRender(),C=x[0],E=x[1],L=[];if(c>0)for(var R=C;R<=E;R++)L.push(p(t,{data:u,key:f(R,u),index:R,isScrolling:y?S:void 0,style:this._getItemStyle(R)}));var T=r(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:k,ref:this._outerRefSetter,style:ms({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},p(s||l||"div",{children:L,ref:a,style:{height:w?"100%":T,pointerEvents:S?"none":void 0,width:w?T:"100%"}}))},d._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)}},d._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),f=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+f)),c,u]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var wc=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},kc=bc({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 f=Math.round(d+(u-d)/2);return f<Math.ceil(l/2)?0:f>c+Math.floor(l/2)?c:f;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 f=Math.round(d+(u-d)/2);return f<Math.ceil(s/2)?0:f>c+Math.floor(s/2)?c:f;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}}),xc=Sc({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,f="horizontal"===a||"horizontal"===u?d:s,p=Math.max(0,l*c-f),h=Math.min(p,t*c),m=Math.max(0,t*c-f+c+i);switch("smart"===n&&(n=r>=m-f&&r<=h+f?"auto":"center"),n){case"start":return h;case"end":return m;case"center":var g=Math.round(m+(h-m)/2);return g<Math.ceil(f/2)?0:g>p+Math.floor(f/2)?p:g;default:return r>=m&&r<=h?r:r<m?m:h}},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 Cc="#BBB",Ec="#f1f1f1",Lc={styledScrollbars:"ListBox-styledScrollbars"};function Rc({renderProps:e,layoutOptions:t,maxCount:n,columnCount:r,rowCount:o,overflowDisclaimer:i,qCardinal:a,dataOffset:s}){const l="column"===(null==t?void 0:t.layoutOrder)&&"singleColumn"!==t.dataLayout,c=((e,t)=>void 0!==(null==e?void 0:e.visibleRowStopIndex)||void 0!==e.visibleColumnStopIndex?t?e.visibleColumnStopIndex:e.visibleRowStopIndex:e.visibleStopIndex)(e,l),u=l?n.column:n.row,d=(l?r:o)>=u,f=((e,t,n,r)=>e===t*n+r+n)(a,c,l?o:r,s),p=!!s&&((e,t)=>void 0!==(null==e?void 0:e.visibleRowStartIndex)||void 0!==e.visibleColumnStartIndex?t?0===e.visibleColumnStartIndex:0===e.visibleRowStartIndex:0===e.visibleStartIndex)(e,l),h=d&&!f&&c>=u-1||p||i.state.show;i.set(h)}const{StyledFixedSizeList:Tc,StyledFixedSizeGrid:qc}=function(){const e=e=>({scrollbarColor:`${Cc} ${Ec}`,overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ec},"&::-webkit-scrollbar-thumb":{backgroundColor:Cc,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:v(xc,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${Lc.styledScrollbars}`]:e(t)})),StyledFixedSizeGrid:v(kc,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${Lc.styledScrollbars}`]:e(t)}))}}();const Pc=(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));const r=n.measureText(e);return Math.ceil(r.width||0)},Ic=e=>{const t=i(()=>"text"in e?e:{},[e]);return i(()=>Pc(t.text,t.font||"12px Source Sans Pro"),[t.text,t.font])};function _c(e){if(!e)return"";const t="number"==typeof e?e:e.qListObject.qDimensionInfo.qApprMaxGlyphCount;return Array(t).fill("M").join("")}function Oc({isGridMode:e,dense:t}){let n=t?20:e?32:29;return e&&(n+=4),n}function Dc({layout:e,width:t,height:n,listCount:r,count:o,freqIsAllowed:i,checkboxes:a,styles:s}){const{layoutOptions:l={}}=e||{},{layoutOrder:c,maxVisibleRows:u={},maxVisibleColumns:d,dense:f,dataLayout:p}=l,{fontSize:h="12px",fontFamily:m="Source sans pro"}=(null==s?void 0:s.content)||{},g=`${h} ${m}`,b=Ic({text:_c(e),font:g}),y=Ic({text:_c(5),font:g}),v=Ic({text:_c(8),font:g}),S=i?y:0,w=a?20:0;let k=56+S+w;!a&&k>=80&&(k+=20);let x,C,E,L,R=b+18+S+w;!a&&R>=80&&(R+=20),R=Math.min(150,Math.max(R,k));const T=Oc({isGridMode:"grid"===p,dense:f}),q=null!=n?n:8*T;if(c){let e=t;"row"===c?(x={overflowX:"hidden"},e+=8,({rowCount:L,columnWidth:E,columnCount:C}=function({maxVisibleColumns:e,listCount:t,containerWidth:n,columnAutoWidth:r,itemMinWidth:o}){const i=(null==e?void 0:e.maxColumns)||3,a=n-10;let s;const l=Math.min(t,Math.max(1,Math.round(a/Math.max(o,r))));s=!1!==(null==e?void 0:e.auto)?l:Math.min(t,i,l),s=Math.max(s,1);const c=a/s;return{rowCount:Math.ceil(t/s),columnWidth:c,columnCount:s}}({maxVisibleColumns:d,listCount:r,containerWidth:e,columnAutoWidth:R,itemMinWidth:k}))):(x={overflowY:"hidden"},({rowCount:L,columnWidth:E,columnCount:C}=function({maxVisibleRows:e,itemHeight:t,listCount:n,listHeight:r,columnAutoWidth:o,containerWidth:i,itemMinWidth:a}){let s;const l=(null==e?void 0:e.maxRows)||3,c=Math.floor(r/t);s=!1!==e.auto?c:Math.min(n,l,c),s=Math.max(s,1);const u=Math.ceil(n/s);return{columnWidth:Math.max(o,i/u,a),columnCount:u,rowCount:s}}({maxVisibleRows:u,itemHeight:T,listCount:r,listHeight:q,columnAutoWidth:R,containerWidth:e,itemMinWidth:k})))}C=("singleColumn"===p?1:C)||1,L=("singleColumn"===p?o:L)||r;const P=l.dense?838e3:577e3;L=Math.min(L,P);const I=Math.floor(3355e4/E);C=Math.min(C,I)||1;const _=L*C;return{columnCount:C,columnWidth:E,rowCount:L,overflowStyling:x,itemHeight:T,listHeight:q,listWidth:t,scrollBarWidth:10,count:o,listCount:Math.min(r,_),maxCount:{row:P,column:I},itemPadding:4,textWidth:b,freqMinWidth:y,freqMaxWidth:v}}function Ac({pages:e,minimumBatchSize:t,count:n,calculatePagesHeight:r=!1}){const o=null!=e&&e.length&&r?(({pages:e=[],minimumBatchSize:t,count:n})=>{const r=e.some(e=>e.qArea.qHeight<t),o=Math.max(...e.map(e=>e.qArea.qTop+e.qArea.qHeight));return r?o:n})({pages:e,minimumBatchSize:t,count:n}):n;return o||0}const[Nc]=Ps({});function jc(e){const t=`${e.id}`,[n]=Nc();return{setStoreValue:(e,r)=>n.set(`${t}/${e}`,r),getStoreValue:e=>n.get(`${t}/${e}`)}}const Mc=ns(k,{shouldForwardProp:e=>!["width","dense"].includes(e)})(({width:e,dense:t})=>Z({minWidth:`${e}px`,textAlign:"center",fontSize:""+(t?"12px":"14px"),whiteSpace:"normal"},t&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:e}));function $c({width:e,text:t,dense:n,tooltip:r}){const{translator:o}=s(Rs);return or.jsx(L,{title:r?o.get(t):"",children:or.jsx(Mc,{width:e,dense:n,component:"div",variant:"body1",py:"12px",children:o.get(t)})})}var zc=function(t){function n(e,n){return or.jsx(hs,{"data-testid":void 0,ref:n,...e,children:t})}return n.muiName=hs.muiName,e.memo(e.forwardRef(n))}(or.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));const Fc=ns(R)(({theme:e,left:t})=>({position:"absolute",bottom:"12px",display:"flex",border:`1px solid ${e.palette.divider}`,width:"calc(100% - 11px)",left:t})),Bc=ns("div")(()=>({paddingLeft:"6px",flexGrow:1})),Uc=ns("div")(({dense:e})=>({display:"flex",alignItems:""+(e?"center":"flex-start")})),Wc=ns(zc)(()=>({fontSize:"14px"}));function Hc({text:e,dismiss:t,dense:n,parentWidth:r=0}){const o="function"==typeof t,i=n?370:282,a=Math.max(r/2-i/2,0),s=Math.min(i,r)-42,l=n&&r<i;return or.jsxs(Fc,{left:a,style:{maxWidth:i},children:[or.jsx(Bc,{children:or.jsx($c,{text:e,dense:n,width:s,tooltip:l})}),or.jsx(Uc,{dense:n,children:o&&or.jsx(T,{"aria-label":"close",onClick:()=>t(),children:or.jsx(Wc,{})})})]})}function Vc({itemWidth:e,layout:t,frequencyMode:n}){const r=e>80,{frequencyEnabled:o=!1}=(null==t?void 0:t.qListObject)||{},i=!["N",void 0].includes(n);return!(!r||!i&&!o)}const Gc=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,Kc=e=>{const t=Gc(e);return`Max(AGGR(Count(${t}), ${t}))`},Jc=(e,t)=>{const o=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[i,a]=n(),[s,l]=n(o);return r(()=>{if(!o)return;(async()=>{const n=await(async(e,t)=>{const n=e.qListObject.qDimensionInfo,r=n.qGroupFieldDefs[n.qGroupPos],o=Kc(r);return(await t.evaluateEx(o)).qNumber})(t,e);a(n),l(!1)})()},[o&&t]),{frequencyMax:o?i:null==t?void 0:t.frequencyMax,awaitingFrequencyMax:s}};const Qc=["isLoadingData"],Zc=q("div")(()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}}));function Xc({model:e,app:t,constraints:o,layout:i,selections:a,selectionState:l,direction:u,checkboxes:d,height:p,width:h,frequencyMode:m,update:g,fetchStart:b,postProcessPages:y,calculatePagesHeight:v=!1,keyboard:S={},showGray:w=!0,scrollState:k,keyScroll:x={state:{},reset:()=>{}},currentScrollIndex:C={set:()=>{}},renderedCallback:E,onCtrlF:L,showSearch:R,isModal:T,styles:q}){var P,I;const{translator:_}=s(Rs),[O,D]=n(!1),A=!(!i||!i.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:N=d,histogram:j}=null!=i?i:{},M=f(null),$=f({queue:[],validPages:!1,dataOffset:0}),z=f({pages:[]}),{frequencyMax:F,awaitingFrequencyMax:B}=Jc(t,i),U=function({local:e,loaderRef:t,model:r,fetchStart:o,scrollTimeout:i,postProcessPages:a,listData:s}){const[l,c]=n(!1),[u,d]=n([]);let[f]=n(0);const p=(n,l)=>{const u=e.current.dataOffset;e.current.queue.push({start:n+u,stop:l+u});const p=!!t.current&&t.current._listRef&&t.current._listRef.state.isScrolling;return e.current.queue.length>10&&e.current.queue.shift(),clearTimeout(e.current.timeout),c(!0),new Promise(t=>{e.current.timeout=setTimeout(()=>{const n=e.current.queue.slice(-1)[0];if(!n)return c(!1),void t();const i=r.getListObjectData("/qListObjectDef",[{qTop:n.start>f?n.start-f:0,qHeight:f,qLeft:0,qWidth:1},{qTop:n.start,qHeight:f,qLeft:0,qWidth:1}]).then(n=>{const r=a?a(n):n;e.current.validPages=!0,s.current.pages=r,d(r),c(!1),t()});o&&o(i)},p?i:0)})};return{loadMoreItems:{with:({minimumBatchSize:e})=>(e&&(f=e),p)},pages:u,isLoading:l}}({local:$,loaderRef:M,model:e,fetchStart:b,scrollTimeout:0,postProcessPages:y,listData:z}),{isLoadingData:W}=U,H=X(U,Qc),{getStoreValue:V,setStoreValue:G}=jc(e),K=c(H.loadMoreItems,[i]),[J,Q]=n({show:!1,dismissed:!1}),[Y,ee]=n([]);null!=H&&H.pages&&l.update({setPages:ee,pages:H.pages,isSingleSelect:A,layout:i});const te=null==i?void 0:i.qListObject.qDimensionInfo.qCardinal;(null!=H&&H.pages.length&&!B||0===te)&&(null==E||E());const ne=c(e=>{if(null==Y||!Y.length||!$.current.validPages)return!1;$.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=Y.filter(e=>t(e))[0];return n&&t(n)},[i,Y]),{interactionEvents:re,select:oe}=hl({selectionState:l,selections:a,checkboxes:N,doc:document,loaderRef:M}),{layoutOptions:ie={}}=i||{};let ae=!0;ie.dataLayout&&(ae="singleColumn"===ie.dataLayout||"row"===(null==ie?void 0:ie.layoutOrder));const se="grid"===(null==ie?void 0:ie.dataLayout),le=e=>{const t=Z({},ae?{rowIndex:e}:{columnIndex:e}),n=se?t:e;M.current._listRef.scrollToItem(n)},ce=()=>{if($.current.queue=[],$.current.validPages=!1,M.current){M.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===x.state.scrollPosition;if(i&&i.qSelectionInfo.qInSelections||e)return void(e&&x.reset());$.current.dataOffset=0,le(0)}};g&&g.call(null,ce),r(()=>{k&&!O&&M.current&&(M.current._listRef.scrollToItem(k.initScrollPos),D(!0))},[M.current]),r(()=>{ce()},[i,$.current.dataOffset]);let ue=100;const de="grid"!==ie.dataLayout,fe=null==i||null===(P=i.qListObject.qSize)||void 0===P?void 0:P.qcy,pe=Ac({pages:Y,minimumBatchSize:ue,count:fe,calculatePagesHeight:v});let he=Vc({itemWidth:h,layout:i,frequencyMode:m});const me=function(e){return e.some(({qMatrix:e})=>e.some(([e])=>{var t;return!(null===(t=e.qFrequency)||void 0===t||!t.match("%"))}))?"P":"-"}(Y),ge=Dc({layout:i,width:h,height:p,listCount:pe,count:fe,freqIsAllowed:he,checkboxes:N,styles:q});ge.columnWidth&&(he=Vc({itemWidth:ge.columnWidth,layout:i,frequencyMode:m}));const{listCount:be}=ge;G("listCount",be);const ye=V("inputText"),ve=function({layout:e,searchInputText:t,listCount:n}){const{translator:r}=s(Rs),o=[];if(null!=t&&t.length){const e=function(e){let t;switch(e){case 0:t="Listbox.NoMatchesForYourTerms";break;case 1:t="ScreenReader.OneSearchResult";break;default:t="ScreenReader.ManySearchResults"}return t}(n),t=r.get(e,[n]);o.push(t)}const i=function({layout:e,translatorDynamic:t}){var n;const{qStateCounts:r={}}=(null==e||null===(n=e.qListObject)||void 0===n?void 0:n.qDimensionInfo)||{},o=r.qSelected+r.qSelectedExcluded+r.qLocked+r.qLockedExcluded;let i;switch(o){case 0:i="ScreenReader.ZeroSelected";break;case 1:i="ScreenReader.OneSelected";break;default:i="ScreenReader.ManySelected"}return t.get(i,[o])}({layout:e,translatorDynamic:r});o.push(i);const a=o.filter(e=>!(null==e||!e.length)).join(". ");return a}({layout:i,searchInputText:ye,listCount:be}),Se=e=>{const{scrollIndex:t,offset:n,triggerRerender:r}=function({position:e,isRow:t,sizes:n,layout:r,offset:o}){let i,a=!1,s=null!=o?o:0;switch(e){case"start":i=0;break;case"end":i=t?n.rowCount:n.columnCount;break;case"overflowStart":s=0,i=0,a=!0;break;case"overflowEnd":s=((e,t)=>e.qListObject.qDimensionInfo.qCardinal-t)(r,n.listCount),i=r.qListObject.qDimensionInfo.qCardinal,a=!0}return{scrollIndex:i,offset:s,triggerRerender:a}}({position:e,isRow:ae,sizes:ge,layout:i,offset:$.current.dataOffset});$.current.dataOffset=n,r&&l.triggerStateChanged(),le(t)};r(()=>{const e=x.state;e.up?le(C.state.start-e.up):e.down?le(C.state.stop+e.down):e.scrollPosition&&Se(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&x.reset()},[x.state.up,x.state.down,x.state.scrollPosition]);const{textAlign:we}=(null==i?void 0:i.qListObject.qDimensionInfo)||{},[ke,xe]=n({first:!1,last:!1}),{List:Ce,Grid:Ee}=function({layout:e,width:t,checkboxes:n,local:r,isVertical:o,pages:i,selectionState:a,interactionEvents:s,deducedFrequencyMode:l,histogram:c,isSingleSelect:u,select:d,selectAll:f,onCtrlF:p,textAlign:h,selections:m,keyboard:g,showGray:b,scrollState:y,direction:v,sizes:S,listCount:w,overflowDisclaimer:k,setScrollPosition:x,focusListItems:C,setCurrentScrollIndex:E,constraints:L,frequencyMax:R,freqIsAllowed:T,translator:q,showSearch:P,isModal:I,styles:_}){const{layoutOptions:O={}}=e||{},{columnWidth:D,listHeight:A,itemHeight:N,rowCount:j,columnCount:M}=S||{},$=("grid"===O.dataLayout?D:t)>80,z={direction:"rtl"===v?"rtl":"ltr",useIsScrolling:!0,className:Lc.styledScrollbars},F=null==e?void 0:e.qListObject.qDimensionInfo.qLocked,B=A<=N,U=Z(Z({isLocked:F,column:!o,pages:i},F||a.selectDisabled()?{}:s),{},{checkboxes:n,layoutOptions:O,deducedFrequencyMode:l,freqIsAllowed:T,isSingleSelect:u,textAlign:h,sizes:S,actions:{select:d,confirm:()=>null==m?void 0:m.confirm.call(m),cancel:()=>null==m?void 0:m.cancel.call(m),setScrollPosition:x,selectAll:f,onCtrlF:p},frequencyMax:R,histogram:c,keyboard:g,showGray:b,showTick:$,dataOffset:r.current.dataOffset,focusListItems:C,direction:v,translator:q,showSearch:P,isModal:I,styles:_,fillHeight:B});return{List:({onItemsRendered:n,ref:o})=>(r.current.listRef=o,or.jsx(Tc,Z(Z({},z),{},{dataTestid:"fixed-size-list",scrollDisabled:null==L?void 0:L.active,height:A,width:t,itemCount:w,itemData:Z(Z({},U),{},{listCount:w}),itemSize:N,onItemsRendered:t=>{var o;E({start:t.visibleStartIndex,stop:t.visibleStopIndex}),y&&y.setScrollPos(t.visibleStopIndex),Rc({renderProps:t,layoutOptions:O,maxCount:S.maxCount,columnCount:M,rowCount:j,overflowDisclaimer:k,qCardinal:null==e||null===(o=e.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qCardinal,dataOffset:r.current.dataOffset}),n(Z({},t))},ref:o,children:oc}))),Grid:({onItemsRendered:n,ref:o})=>{const{overflowStyling:i,scrollBarWidth:a}=S,{layoutOrder:s}=O||{},l=Math.min(A,j*N+a);return r.current.listRef=o,or.jsx(qc,Z(Z({},z),{},{dataTestid:"fixed-size-grid",scrollDisabled:null==L?void 0:L.active,height:l,width:t,columnCount:M,columnWidth:D,rowCount:j,rowHeight:N,style:Z({},i),itemData:Z(Z({},U),{},{column:void 0,columnCount:M,rowCount:j}),onItemsRendered:t=>{var o;const i="row"===s;E({start:i?t.visibleRowStartIndex:t.visibleColumnStartIndex,stop:i?t.visibleRowStopIndex:t.visibleColumnStopIndex});const a=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,f,p,h;return n&&n.setScrollPos(u),"column"===r?(d=l*o,f=a,p=c*o,h=s):(d=l,f=a*i,p=c,h=s*i),{visibleStartIndex:d+f,visibleStopIndex:p+h}}({renderProps:t,scrollState:y,layoutOrder:s,rowCount:j,columnCount:M});Rc({renderProps:t,layoutOptions:O,maxCount:S.maxCount,columnCount:M,rowCount:j,overflowDisclaimer:k,qCardinal:null==e||null===(o=e.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qCardinal,dataOffset:r.current.dataOffset}),n(a)},ref:o,children:oc}))}}}({direction:u,layout:i,width:h,checkboxes:N,deducedFrequencyMode:me,histogram:j,keyboard:S,showGray:w,interactionEvents:re,select:oe,selectAll:()=>{l.clearItemStates(!1),e.selectListObjectAll("/qListObjectDef")},onCtrlF:L,textAlign:we,isVertical:de,pages:Y,selectionState:l,isSingleSelect:A,selections:a,scrollState:k,local:$,sizes:ge,listCount:be,overflowDisclaimer:{state:J,set:e=>Q(t=>Z(Z({},t),{},{show:e}))},setScrollPosition:Se,focusListItems:{first:ke.first,setFirst:e=>xe(t=>Z(Z({},t),{},{first:e})),last:ke.last,setLast:e=>xe(t=>Z(Z({},t),{},{last:e}))},setCurrentScrollIndex:C.set,constraints:o,frequencyMax:F,freqIsAllowed:he,translator:_,showSearch:R,isModal:T,styles:q}),{columnWidth:Le,listHeight:Re,itemHeight:Te}=ge||{};return de||(ue=function({width:e,columnWidth:t,listHeight:n,itemHeight:r}){return Math.ceil(e/t)*Math.ceil(n/r)*2}({width:h,columnWidth:Le,listHeight:Re,itemHeight:Te})),or.jsxs(Zc,{children:[or.jsx("div",{className:"screenReaderOnly","aria-live":"assertive","aria-atomic":"true",children:ve}),!be&&te>0&&or.jsx($c,{width:h,text:"Listbox.NoMatchesForYourTerms"}),or.jsx(il,{isItemLoaded:ne,itemCount:be||1,loadMoreItems:K.with({minimumBatchSize:ue}),threshold:0,minimumBatchSize:ue,ref:M,role:"grid",children:de?Ce:Ee}),J.show&&!J.dismissed&&or.jsx(Hc,{text:"Listbox.ItemsOverflow",dismiss:()=>Q(e=>Z(Z({},e),{},{dismissed:!0})),parentWidth:null==M||null===(I=M.current)||void 0===I||null===(I=I._listRef)||void 0===I||null===(I=I.props)||void 0===I?void 0:I.width,dense:null==ie?void 0:ie.dense})]})}const Yc=e=>Z(Z({},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"}}]}),eu=e=>Z(Z({},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"}}]}),tu=e=>Z(Z({},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"}}]}),nu=e=>Z(Z({},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 ru=({layout:e,model:t,translator:n,selectionState:r,isDirectQuery:o=!1,selections:i})=>{if(e.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];const a="/qListObjectDef",s=()=>{i.isActive()||i.begin(a)};return[{key:"selectAll",type:"menu-icon-button",label:n.get("Selection.SelectAll"),getSvgIconShape:Yc,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectAll(a)}},{key:"selectPossible",type:"menu-icon-button",label:n.get("Selection.SelectPossible"),getSvgIconShape:tu,enabled:()=>["qOption"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectPossible(a)}},!o&&{key:"selectAlternative",type:"menu-icon-button",label:n.get("Selection.SelectAlternative"),getSvgIconShape:eu,enabled:()=>["qAlternative"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectAlternative(a)}},!o&&{key:"selectExcluded",type:"menu-icon-button",label:n.get("Selection.SelectExcluded"),getSvgIconShape:nu,enabled:()=>["qAlternative","qExcluded"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectExcluded(a)}}].filter(Boolean)};const ou=e=>Z(Z({},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 iu(e){const t=ts(),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 au={className:"njs-cell-action"},su=t.forwardRef(({item:e,addAnchor:t=!1},n)=>{const r=ts(),{hidden:o,disabled:i,style:a,hasSvgIconShape:s}=iu(e);if(o)return null;const l=Number.parseInt(r.spacing(.5),10),c=e.keyboardAction||e.action,u=c?e=>["Enter"].includes(e.key)&&c():null,d=c?e=>[" ","Spacebar"].includes(e.key)&&c():null,f=`actions-toolbar-${e.key}`,p=e.ref||(t?null:n);return or.jsxs(T,{ref:p,title:e.label,onClick:e.action,onKeyDown:u,onKeyUp:d,disabled:i,style:a,className:[au.className,f].join(" "),size:"large",disableRipple:!0,"aria-label":e.label,"data-testid":f,children:[s&&Xs(e.getSvgIconShape()),t&&or.jsx("div",{ref:n,style:{bottom:-l,right:0,position:"absolute",width:"100%",height:0}})]})}),lu=e=>Z(Z({},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"}}]});var cu=e=>Xs(lu(e));const uu=e=>Z(Z({},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 du=e=>Xs(uu(e));const fu="njs-action-toolbar-more",pu={icon:"More-icon"},hu=ns(P)(({theme:e})=>({pointerEvents:"none",[`& .${pu.icon} *`]:{color:e.palette.text.primary}}));function mu({item:e,autoFocus:t,onActionClick:n=()=>{}}){const{hidden:r,disabled:o,hasSvgIconShape:i}=iu(e);return r?null:or.jsxs(_,{autoFocus:t,title:e.label,onClick:()=>{e.action(),n()},disabled:o,tabindex:"0",children:[i&&or.jsx(O,{className:pu.icon,children:Xs(e.getSvgIconShape())}),or.jsx(k,{noWrap:!0,children:e.label})]})}const gu=t.forwardRef(({actions:e=[],show:t=!0,alignTo:n,popoverProps:r={},popoverPaperStyle:o={},onCloseOrActionClick:i=()=>{},disablePortal:a=!0},s)=>{const l=e.length>0,c=e.findIndex(e=>!e.disabled);return l&&or.jsx(hu,Z(Z({},r),{},{onClose:i,ref:s,open:t,anchorEl:n.current,getContentAnchorEl:a?null:void 0,container:a?n.current:void 0,disablePortal:a,hideBackdrop:!0,transitionDuration:0,slotProps:{root:{className:fu},paper:{style:Z({pointerEvents:"auto",maxWidth:"250px"},o)}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:or.jsx(I,{id:"moreMenuList",children:e.map((e,t)=>or.jsx(mu,{item:e,autoFocus:t===c,onActionClick:i},t))})}))});function bu({keyboardNavigation:e,focusHandler:t,getEnabledButton:n,selections:r,isRtl:o}){return i=>{const{target:a,nativeEvent:s}=i,{keyCode:l}=s;switch(l){case Gl.ARROW_LEFT:case Gl.ARROW_DOWN:case Gl.ARROW_RIGHT:case Gl.ARROW_UP:if(a.classList.contains("njs-cell-action")){const e=(e=>{const t=e.closest("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");return Array.from(n).indexOf(e)})(a);let t=[Gl.ARROW_LEFT,Gl.ARROW_DOWN].includes(l);t=o?!t:t,(e=>{const t=document.querySelector("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");if(!n.length)return;n[Math.min(Math.max(0,e),n.length-1)].focus()})(t?e-1:e+1)}i.stopPropagation(),i.preventDefault();break;case Gl.SPACE:i.preventDefault();break;case Gl.TAB:if(e&&null!=t&&t.refocusContent){(i.shiftKey&&n(!1)===i.target||!i.shiftKey&&n(!0)===i.target)&&(i.preventDefault(),i.stopPropagation(),t.refocusContent())}break;case Gl.ESCAPE:r&&(r.onCancel(),r.api.cancel(),i.preventDefault(),i.stopPropagation())}}}const yu="ActionsToolbar",vu={item:`${yu}-item`,itemSpacing:`${yu}-itemSpacing`},Su=ns(P)(({theme:e})=>({[`& .${vu.itemSpacing}`]:{padding:e.spacing(0,.25)}})),wu="njs-action-toolbar-popover",ku=t.forwardRef(({className:e,actions:t=[],addAnchor:n=!1,isRtl:r=!1},o)=>t.length>0?or.jsx(E,{container:!0,gap:0,flexDirection:r?"row-reverse":"row",wrap:"nowrap",className:e,children:t.map((e,t)=>or.jsx(E,{className:`${vu.itemSpacing} ${vu.item}`,children:or.jsx(su,{item:e,ref:0===t?o:null,addAnchor:n},e.key)},e.key))}):null),xu={pointerEvents:"none"};function Cu({show:e=!0,actions:t=[],maxItems:o=3,selections:a={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},extraItems:l,more:c={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{},disablePortal:!0},popover:u={show:!1,anchorEl:null},focusHandler:d=null,actionsRefMock:p=null,isRtl:h,autoConfirm:m=!1,layout:g}){var b,y;const v=function({api:e,layout:t,onConfirm:n=()=>{},onCancel:r=()=>{},onKeyDeactivate:o=()=>{}}){const{translator:i}=s(Rs);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>e.canClear(t),action:()=>e.clear(),getSvgIconShape:uu},{key:"cancel",type:"icon-button",label:i.get("Selection.Cancel"),enabled:()=>e.canCancel(t),action:()=>{r(),e.cancel()},keyboardAction:()=>{o(),r(),e.cancel()},getSvgIconShape:lu},{key:"confirm",type:"icon-button",label:i.get("Selection.Confirm"),enabled:()=>e.canConfirm(t),action:()=>{n(),e.confirm()},keyboardAction:()=>{o(),n(),e.confirm()},getSvgIconShape:ml}]}(Z(Z({},a),{},{layout:g})),{translator:S,keyboardNavigation:w}=s(Rs),[k,x]=n(!1),C={vertical:12,horizontal:h?0:(null!==(b=null===(y=u.anchorEl)||void 0===y?void 0:y.clientWidth)&&void 0!==b?b:0)-7},L={vertical:"bottom",horizontal:h?-7:"right"},R=f(),T=f(),q=ts(),P=i(()=>({margin:q.spacing(.5,0)})),I=e=>{const t=R.current||p;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},_=i(()=>bu({keyboardNavigation:w,focusHandler:d,getEnabledButton:I,selections:a,isRtl:h}),[w,d,I,a,h]);if(r(()=>()=>{x(!1)},[u.show,e,a.show]),r(()=>{if(!d)return;d.on("focus_toolbar_first",()=>{const e=I(!1);null==e||e.focus()}),d.on("focus_toolbar_last",()=>{const e=I(!0);null==e||e.focus()})},[]),m)return;let O=c.enabled,A=c.actions;const N=c.alignTo||T,j=t.filter(e=>!e.hidden);if(j.length>o){const e=j.splice(-(j.length-o)-1);O=!0,A=[...e,...c.actions]}if(!a.show&&0===j.length&&!O)return null;const M={key:"more",label:S.get("Menu.More"),getSvgIconShape:ou,hidden:!1,active:k,enabled:()=>O,action:()=>x(!k)},$=j.length>0,z=A.length>0,F=$&&a.show||z&&a.show,B=or.jsxs(E,{ref:R,onKeyDown:_,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:h?"row-reverse":"row"},children:[(null==l?void 0:l.length)&&or.jsx(ku,{className:"actions-toolbar-extra-actions",actions:l,isRtl:h}),$&&or.jsx(ku,{actions:j}),z&&or.jsx(ku,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:T,actions:[M],addAnchor:!0}),F&&or.jsx(E,{className:vu.itemSpacing,style:P,children:or.jsx(D,{orientation:"vertical"})}),a.show&&or.jsx(ku,{className:"actions-toolbar-default-actions",actions:v,isRtl:h}),k&&or.jsx(gu,{show:k,actions:A,alignTo:N,popoverProps:c.popoverProps,popoverPaperStyle:c.popoverPaperStyle,onCloseOrActionClick:()=>{x(!1)},disablePortal:c.disablePortal})]});return u.show?or.jsx(Su,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:u.show,anchorEl:u.anchorEl,anchorOrigin:C,transformOrigin:L,hideBackdrop:!0,style:xu,onMouseDown:e=>{e.stopPropagation()},slotProps:{paper:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:wu,style:{pointerEvents:"auto",padding:q.spacing(.5,.25)}}},children:B}):e&&B}var Eu=e=>Xs((e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014l-4.128-4.026ZM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0Zm-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6.034 6.034 0 0 1-1.413 1.415Z"}}]}))(e));const Lu="/qListObjectDef",Ru=e=>null==e?void 0:e.substring(0,64e3),Tu=ns(A,{shouldForwardProp:e=>!["styles","dense","isRtl"].includes(e)})(({styles:e,dense:t,isRtl:n})=>{let r={};return t&&(r={fontSize:12,"& input":{paddingTop:"5px",paddingBottom:"5px",color:e.search.color,textAlign:n?"right":"left"}}),Z({display:"flex",border:"none",fontSize:14,borderRadius:0,backgroundColor:e.search.backgroundColor,backdropFilter:e.background.backgroundImage?e.search.backdropFilter:void 0,paddingLeft:0,paddingRight:0,flexDirection:n?"row-reverse":"row","& fieldset":{borderColor:`${e.search.borderColor}`,borderWidth:"1px 0 1px 0",borderRadius:0},"&.Mui-focused fieldset":{borderColor:`${e.search.highlightBorderColor} !important`},"& .MuiInputBase-root":Z({},e.search),"& *":{color:e.search.color},"& input":{color:e.search.color,textAlign:n?"right":"left"}},r)}),qu=ns(T)(()=>({border:0,padding:"8px",cursor:"pointer",lineHeight:"12px","&:hover":{backgroundColor:"transparent"},":focus-visible":{borderRadius:"4px",boxShadow:"inset 0 0 0 2px rgb(2, 117, 217)"}}));var Pu=o(function({popoverOpen:e,selections:t,selectionState:o,model:i,keyboard:l,dense:c=!1,visible:u=!0,autoFocus:d=!0,beginSelectionOnFocus:p=!0,wildCardSearch:h=!1,searchEnabled:m,direction:g,hide:b,styles:y},v){const{translator:S}=s(Rs),[w,k]=n(""),[x,C]=n(!1),E=f(),L=f(),R=S.get("Listbox.Clear.Search"),{getStoreValue:T,setStoreValue:q}=jc(i),P="rtl"===g,I=async()=>{try{await i.abortListObjectSearch(Lu)}finally{k("")}};r(()=>u?()=>I():()=>{},[u]),r(()=>(t.on("deactivated",I),()=>{t.removeListener&&t.removeListener("deactivated",I)}),[]),r(()=>{if(x&&E.current){const e=w.length-1;E.current.setSelectionRange(e,e),C(!1)}},[x,E.current]),r(()=>{q("inputText",w)},[w]);const _=async()=>{let e;const n=Ru(w),r=await i.searchListObjectFor(Lu,n);return o.selectDisabled()?r:(r&&n.length&&T("listCount")>0&&(e=i.acceptListObjectSearch(Lu,!0),t.selectionsMade=!0,o.clearItemStates(!1),k("")),e)},O=()=>{var e;null===(e=E.current)||void 0===e||e.focus()},D=()=>{I(),O()};return a(v,()=>({focus(){O()}})),u&&!1!==m?or.jsxs(or.Fragment,{children:[or.jsx(Tu,{styles:y,dense:c,isRtl:P,startAdornment:or.jsx(N,{position:"start",sx:{marginLeft:c?"8px":"9px"},children:or.jsx(Eu,{size:c?"small":"normal"})}),endAdornment:or.jsx(N,{position:"end",sx:{marginLeft:0},children:""!==w&&or.jsx(qu,{tabIndex:0,ref:L,title:R,"aria-label":R,onClick:D,onKeyDown:e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.key){case"Enter":D();break;case"Tab":e.shiftKey?O():Yl(t);break;default:return}e.preventDefault(),e.stopPropagation()},children:or.jsx(cu,{size:c?"small":"normal"})})}),className:"search",inputRef:E,size:"small",fullWidth:!0,placeholder:S.get("Listbox.Search"),value:w,onFocus:()=>{h&&(k("**"),C(!0)),p&&!o.selectDisabled()&&!t.isModal()&&t.begin("/qListObjectDef")},onChange:async e=>{const t=Ru(e.target.value);return k(t),t.length?i.searchListObjectFor(Lu,t):I()},onKeyDown:async n=>{const{currentTarget:r}=n,o=r.closest(".listbox-container");switch(n.key){case"Enter":_();break;case"Escape":if(Yl(o),t.cancel(),e)return;break;case"Tab":n.shiftKey?ec(o)||l.focusSelection():L.current?L.current.focus():Yl(o);break;case"f":case"F":if(!n.ctrlKey&&!n.metaKey)return;b&&(b(),Yl(o));break;default:return}n.preventDefault(),n.stopPropagation()},autoFocus:d,inputProps:{tabIndex:l.innerTabStops?0:-1,"data-testid":"search-input-field","aria-label":S.get("Listbox.Search"),"aria-describedby":"listbox-search-instructions"}}),or.jsx("span",{id:"listbox-search-instructions",style:{position:"absolute",height:0,width:0,overflow:"hidden"},children:S.get("Listbox.Search.ScreenReaderInstructions")})]}):null});function Iu(e){if(!e.session)return[];const{selectionStore:t}=s(Rs),[n]=t.useAppSelectionsStore(),o=e?e.id:null;let i=n.get(o);return r(()=>{e&&!i&&(i=function({app:e,selectionStore:t}){const n=`${e.id}`,{modalObjectStore:r,appModalStore:o}=t,i=async(e=!0)=>{const{model:t,objectSelections:o}=r.get(n)||{};t&&(await t.endSelections(e),r.clear(n),o.emit("deactivated"))},a={begin:async({model:t,paths:o,accept:a=!0,objectSelections:s})=>{var l;if(s===(null===(l=r.get(n))||void 0===l?void 0:l.objectSelections))return;i(a),r.set(n,{model:t,objectSelections:s});const c=Array.isArray(o)?o:[o],u=async o=>{try{await t.beginSelections(c),r.set(n,{model:t,objectSelections:s})}catch(t){6003!==t.code||o?r.clear(n):(await e.abortModal(a),u(!0))}};await u()},end:i};o.set(n,a);const s={model:e,isInModal:()=>!!r.get(n),isModal(e){var t;return e?(null===(t=r.get(n))||void 0===t?void 0:t.objectSelections)===e:!!r.get(n)},forward:()=>a.end().then(()=>e.forward()),back:()=>a.end().then(()=>e.back()),clear:()=>a.end().then(()=>e.clearAll()),clearField:(t,n="$")=>a.end().then(()=>e.getField(t,n).then(e=>e.clear()))};return s}({app:e,selectionStore:t}),n.set(o,i),n.dispatch(!0))},[e]),[i]}function _u(e){return Object.keys(pe.prototype).forEach(t=>{e[t]=pe.prototype[t]}),pe.init(e),e}const Ou=({appSelections:e,appModal:t,model:n})=>{let r,o=!1,i=!1;const a={id:n.id,setLayout(e){r=e},begin(e){const r=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",r),r.isPrevented()?Promise.resolve():(o=!0,this.emit("activated"),t.begin({model:n,paths:e,accept:!0,objectSelections:a}))},clear(){return i=!1,this.emit("cleared"),r.qListObject?n.clearSelections("/qListObjectDef"):n.resetMadeSelections()},confirm(){return i=!1,o=!1,this.emit("confirmed"),this.emit("deactivated"),t.end(!0)},cancel(){return i=!1,o=!1,this.emit("canceled"),this.emit("deactivated"),t.end(!1)},async select(t){const r=this.begin([t.params[0]]);if(!e.isModal())return!1;await r;const o=await n[t.method](...t.params);return i="resetMadeSelections"!==t.method,!!o||(n.resetMadeSelections(),!1)},canClear:()=>r&&r.qListObject&&r.qListObject.qDimensionInfo?!r.qListObject.qDimensionInfo.qLocked&&!r.qListObject.qDimensionInfo.qIsOneAndOnlyOne:i,canConfirm:()=>r&&r.qListObject&&r.qListObject.qDimensionInfo?!r.qListObject.qDimensionInfo.qLocked:i,canCancel:()=>!(r&&r.qListObject&&r.qListObject.qDimensionInfo)||!r.qListObject.qDimensionInfo.qLocked,isActive:()=>o,isModal:()=>e.isModal(a),goModal:e=>t.begin({model:n,paths:e,accept:!1,objectSelections:a}),noModal:(e=!1)=>t.end(e)};return _u(a),a},Du=({elements:e,objectSelections:t,options:n={}})=>{const r=function({elements:e,handleClickOutside:t}){return n=>{if(!document.contains(n.target))return;const r=e.map(e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current).filter(e=>!!e&&!!document.contains(e));r.length&&!r.some(e=>e.contains(n.target))&&t(n)}}({elements:e,handleClickOutside:()=>t.confirm.call(t)});return{activateClickOut(){var e;document.addEventListener("mousedown",r),null==n||null===(e=n.onSelectionActivated)||void 0===e||e.call(n)},deactivateClickOut(){var e;document.removeEventListener("mousedown",r),null==n||null===(e=n.onSelectionDeactivated)||void 0===e||e.call(n)}}};function Au(e,t,o,i){const a=Array.isArray(o)?o:[o],[l]=Iu(e),[c]=$s(t),{appModalStore:u}=s(Rs).selectionStore,d=u.get(e.id),[f,p]=n();return r(()=>{l&&t&&!f&&p(Ou({appSelections:l,appModal:d,model:t}))},[l,t]),r(()=>{if(!f)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=Du({elements:a,objectSelections:f,options:i});return f.addListener("activated",e),f.addListener("deactivated",t),()=>{f.isActive()&&f.confirm(),f.removeListener("activated",e),f.removeListener("deactivated",t)}},[f]),r(()=>{f&&f.setLayout(c)},[f,c]),[f]}function Nu(e={}){const t=Z(Z({itemStates:{},ignoreSelectionState:!1,selectedInEngine:[],enginePages:[],setPages:void 0,lastRowCount:void 0,lastApprMaxGlyphCount:void 0,selectDisabled:void 0},e),{},{update({setPages:e,pages:n,isSingleSelect:r,selectDisabled:o,layout:i}){var a,s;this.setPages=e;const l=this.lastRowCount===i.qListObject.qSize.qcy,c=this.lastApprMaxGlyphCount===i.qListObject.qDimensionInfo.qApprMaxGlyphCount;l&&c||(this.lastRowCount=i.qListObject.qSize.qcy,this.lastApprMaxGlyphCount=i.qListObject.qDimensionInfo.qApprMaxGlyphCount,this.clearItemStates(!1)),t.enginePages!==n&&void 0!==n&&(t.enginePages=null!=n?n:[],t.selectedInEngine=ll(n),t.selectableValuesUpdating=!1,t.triggerStateChanged()),t.isSingleSelect=r,t.selectDisabled=o||t.selectDisabled,t.isDimCalculated=null!==(a=null==i||null===(s=i.qListObject)||void 0===s||null===(s=s.qDimensionInfo)||void 0===s?void 0:s.qIsCalculated)&&void 0!==a&&a},allowedToSelect:()=>!t.selectDisabled()&&!(t.isDimCalculated&&t.selectableValuesUpdating),setSelectableValuesUpdating(){t.selectableValuesUpdating=!0},useClientItemState:e=>t.ignoreSelectionState||e in t.itemStates,isSelected:e=>t.useClientItemState(e)?!!t.itemStates[e]:t.selectedInEngine.includes(e),getState(e){const{qElemNumber:n,qState:r}=e;return t.useClientItemState(n)?t.itemStates[n]?"XS"===r?"XS":"S":"S"===r||"XS"===r?"A":r:r},updateItemNoEvents(e,n,r){const o=t.isSelected(e);o&&!n?t.itemStates[e]=!1:o||(null==r||r.push(e),t.itemStates[e]=!0)},triggerStateChanged(){if(this.setPages){const e=t.applySelectionsOnPages(t.enginePages);this.setPages(e)}},applySelectionsOnPages(e){const n=e.map(e=>{const n=e.qMatrix.map(e=>{const[n]=e,r=t.getState(n);return[Z(Z({},n),{},{qState:r}),...e.slice(1)]});return Z(Z({},e),{},{qMatrix:n})});return n},updateItem(e,n,r){t.updateItemNoEvents(e,n,r),t.triggerStateChanged()},updateItems(e,n,r){e.forEach(e=>{t.updateItemNoEvents(e,n,r)}),t.triggerStateChanged()},clearItemStates(e){t.itemStates={},t.ignoreSelectionState=e}});return t}const ju=(e,t,n=void 0)=>{var r;return null!==(r=null==e?void 0:e[t])&&void 0!==r?r:n};function Mu(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return ju(t,"qSelected",0)+ju(t,"qSelectedExcluded",0)+ju(t,"qLocked",0)+ju(t,"qLockedExcluded",0)>0}function $u(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function zu(e){if("object"==typeof e&&$u(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let o;(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)):(o=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(o[1]+o[1],16),n=parseInt(o[2]+o[2],16),r=parseInt(o[3]+o[3],16))}return(t<<16)+(n<<8)+r}const Fu={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},Bu="qcm-color";function Uu(...e){const t={type:Bu,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===Bu)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if($u(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:i}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),i=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))i=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),i=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),i=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const f=a-.5*l;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);i=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const f=a-.5*l;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const f=a-l;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else{const e=a.toLowerCase();if(function(e){return e in Fu}(e)){const t=Fu[e];({r:n,g:r,b:o}=t),i="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(i=(4278190080&e[0])>>>24,i/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],o=e[2],i=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+o+i)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(o),t.a=i,t}function Wu(e){let t,n,r;if($u(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const o="string"==typeof e?zu(e):e;return t=((16711680&o)>>16).toString(16),n=((65280&o)>>8).toString(16),r=(255&o).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function Hu(e){let t,n,r=0;const o="string"==typeof e?Uu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,{a:l}=o,c=Math.max(i,a,s),u=Math.min(i,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function Vu(e){let t,n,r=0;const o="string"==typeof e?Uu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function Gu(e){if($u(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?zu(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function Ku(e,t){return $u(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:Ku(Uu(e))}function Ju(e){return $u(e)?1===e.a?Gu(e):Ku(e):Ju(Uu(e))}const Qu=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function Zu(e){return.2126*Qu(e.r)+.7152*Qu(e.g)+.0722*Qu(e.b)}function Xu(...e){const t=Uu(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=Hu(n)),n.spaces.hslaObject),o=e=>{const t=r(),{h:n,s:o,l:i,a:a}=t;return`hsla(${n}, ${o}, ${Math.max(0,Math.min(i+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=Uu(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=Uu(...e);return t.invalid||Zu(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=Gu(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=Ku(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=Ju(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=Wu(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?Uu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:o}=Hu(e);return`hsla(${t}, ${n}, ${r}, ${o})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:o,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=Vu(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=Vu(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>Xu(o(18*e)),getDarkenedColor:(e=1)=>Xu(o(18*-e))}}function Yu(e,t){if(!e||!t)return;const n=Zu(e),r=Zu(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const ed="#FFFFFF";function td(e,t){const n=Xu(ed),r=Xu(e),o=Xu(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=Yu(n,r),a=Yu(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?ed:"#000000"}function nd(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rd,od,id,ad="top",sd="top-right",ld="right",cd="bottom-right",ud="bottom",dd="bottom-left",fd="left",pd="top-left";nd(nd(nd(nd(nd(nd(nd(nd(nd(nd(rd={},"equal-equal",[ad,ud]),"equal-higher",[ud,cd]),"equal-lower",[ad,sd]),"equal-void",[ad,ud]),"higher-equal",[fd,dd,ad,sd]),"higher-higher-acute",[ud,dd,fd,sd]),"higher-higher-obtuse",[ud,ad]),"higher-lower-negative",[ad,sd,ld]),"higher-lower-positive",[ud,dd,fd]),"higher-void",[ad]),nd(nd(nd(nd(nd(nd(nd(nd(nd(nd(rd,"lower-equal",[ad]),"lower-higher-negative",[ad,pd]),"lower-higher-positive",[cd]),"lower-lower-acute",[ad,pd,fd,sd,ld]),"lower-lower-obtuse",[ad,ud]),"lower-void",[ad]),"void-equal",[ad]),"void-higher",[ad,ud]),"void-lower",[ad,ud,fd]),"void-void",[ad]),nd(rd,"unclassified",[ad,ud,ld,fd,sd,cd,dd,pd]);var hd=function(){if(id)return od;id=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return od=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},od}();function md(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gd(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function bd(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(hd);var yd=.7,vd=1/yd,Sd="\\s*([+-]?\\d+)\\s*",wd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",kd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xd=/^#([0-9a-f]{3,8})$/,Cd=new RegExp(`^rgb\\(${Sd},${Sd},${Sd}\\)$`),Ed=new RegExp(`^rgb\\(${kd},${kd},${kd}\\)$`),Ld=new RegExp(`^rgba\\(${Sd},${Sd},${Sd},${wd}\\)$`),Rd=new RegExp(`^rgba\\(${kd},${kd},${kd},${wd}\\)$`),Td=new RegExp(`^hsl\\(${wd},${kd},${kd}\\)$`),qd=new RegExp(`^hsla\\(${wd},${kd},${kd},${wd}\\)$`),Pd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Id(){return this.rgb().formatHex()}function _d(){return this.rgb().formatRgb()}function Od(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=xd.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Dd(t):3===n?new Md(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ad(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ad(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Cd.exec(e))?new Md(t[1],t[2],t[3],1):(t=Ed.exec(e))?new Md(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ld.exec(e))?Ad(t[1],t[2],t[3],t[4]):(t=Rd.exec(e))?Ad(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Td.exec(e))?Wd(t[1],t[2]/100,t[3]/100,1):(t=qd.exec(e))?Wd(t[1],t[2]/100,t[3]/100,t[4]):Pd.hasOwnProperty(e)?Dd(Pd[e]):"transparent"===e?new Md(NaN,NaN,NaN,0):null}function Dd(e){return new Md(e>>16&255,e>>8&255,255&e,1)}function Ad(e,t,n,r){return r<=0&&(e=t=n=NaN),new Md(e,t,n,r)}function Nd(e){return e instanceof bd||(e=Od(e)),e?new Md((e=e.rgb()).r,e.g,e.b,e.opacity):new Md}function jd(e,t,n,r){return 1===arguments.length?Nd(e):new Md(e,t,n,null==r?1:r)}function Md(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function $d(){return`#${Ud(this.r)}${Ud(this.g)}${Ud(this.b)}`}function zd(){const e=Fd(this.opacity);return`${1===e?"rgb(":"rgba("}${Bd(this.r)}, ${Bd(this.g)}, ${Bd(this.b)}${1===e?")":`, ${e})`}`}function Fd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Bd(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ud(e){return((e=Bd(e))<16?"0":"")+e.toString(16)}function Wd(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Vd(e,t,n,r)}function Hd(e){if(e instanceof Vd)return new Vd(e.h,e.s,e.l,e.opacity);if(e instanceof bd||(e=Od(e)),!e)return new Vd;if(e instanceof Vd)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Vd(a,s,l,e.opacity)}function Vd(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Gd(e){return(e=(e||0)%360)<0?e+360:e}function Kd(e){return Math.max(0,Math.min(1,e||0))}function Jd(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}md(bd,Od,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Id,formatHex:Id,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Hd(this).formatHsl()},formatRgb:_d,toString:_d}),md(Md,jd,gd(bd,{brighter(e){return e=null==e?vd:Math.pow(vd,e),new Md(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?yd:Math.pow(yd,e),new Md(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Md(Bd(this.r),Bd(this.g),Bd(this.b),Fd(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$d,formatHex:$d,formatHex8:function(){return`#${Ud(this.r)}${Ud(this.g)}${Ud(this.b)}${Ud(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:zd,toString:zd})),md(Vd,function(e,t,n,r){return 1===arguments.length?Hd(e):new Vd(e,t,n,null==r?1:r)},gd(bd,{brighter(e){return e=null==e?vd:Math.pow(vd,e),new Vd(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?yd:Math.pow(yd,e),new Vd(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Md(Jd(e>=240?e-240:e+120,o,r),Jd(e,o,r),Jd(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Vd(Gd(this.h),Kd(this.s),Kd(this.l),Fd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Fd(this.opacity);return`${1===e?"hsl(":"hsla("}${Gd(this.h)}, ${100*Kd(this.s)}%, ${100*Kd(this.l)}%${1===e?")":`, ${e})`}`}}));const Qd=Math.PI/180,Zd=180/Math.PI,Xd=.96422,Yd=.82521,ef=4/29,tf=6/29,nf=3*tf*tf,rf=tf*tf*tf;function of(e){if(e instanceof af)return new af(e.l,e.a,e.b,e.opacity);if(e instanceof df)return ff(e);e instanceof Md||(e=Nd(e));var t,n,r=uf(e.r),o=uf(e.g),i=uf(e.b),a=sf((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=sf((.4360747*r+.3850649*o+.1430804*i)/Xd),n=sf((.0139322*r+.0971045*o+.7141733*i)/Yd)),new af(116*a-16,500*(t-a),200*(a-n),e.opacity)}function af(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function sf(e){return e>rf?Math.pow(e,1/3):e/nf+ef}function lf(e){return e>tf?e*e*e:nf*(e-ef)}function cf(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function uf(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function df(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function ff(e){if(isNaN(e.h))return new af(e.l,0,0,e.opacity);var t=e.h*Qd;return new af(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}md(af,function(e,t,n,r){return 1===arguments.length?of(e):new af(e,t,n,null==r?1:r)},gd(bd,{brighter(e){return new af(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new af(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Md(cf(3.1338561*(t=Xd*lf(t))-1.6168667*(e=1*lf(e))-.4906146*(n=Yd*lf(n))),cf(-.9787684*t+1.9161415*e+.033454*n),cf(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),md(df,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof df)return new df(e.h,e.c,e.l,e.opacity);if(e instanceof af||(e=of(e)),0===e.a&&0===e.b)return new df(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Zd;return new df(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new df(e,t,n,null==r?1:r)},gd(bd,{brighter(e){return new df(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new df(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return ff(this).rgb()}}));var pf=e=>()=>e;function hf(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):pf(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?hf:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):pf(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=jd(e)).r,(t=jd(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=hf(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var mf,gf="center",bf="bottom";function yf(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function vf(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=wf)):void 0===t&&(t=Sf);for(var n,r,o,i,a,s=new Cf(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new Cf(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(xf)}function Sf(e){return e.children}function wf(e){return Array.isArray(e)?e[1]:null}function kf(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function xf(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Cf(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:gf,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:gf,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:gf,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:gf},{key:"DataRangeIncludingZero",alignment:bf},{key:"LimitedData",alignment:bf},{key:"NegativeOrZeroValues",alignment:bf}].reduce(function(e,t){return e[t.key]=t,e},{}),Cf.prototype=vf.prototype={constructor:Cf,count:function(){return this.eachAfter(yf)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return vf(this).eachBefore(kf)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}},mf=function(e){
23
+ */const ur=[];function dr(e){return ur[0]=e,function(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Jt=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Kt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++)o+=Kt(n,t,e[a]),r&&(o+=i[a]);Qt.lastIndex=0;for(var s,l="";null!==(s=Qt.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Jt}}(ur)}var fr,pr,hr={exports:{}},mr={};function gr(){if(fr)return mr;fr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function h(p){if("object"==typeof p&&null!==p){var h=p.$$typeof;switch(h){case e:switch(p=p.type){case n:case o:case r:case l:case c:case f:return p;default:switch(p=p&&p.$$typeof){case a:case s:case d:case u:case i:return p;default:return h}}case t:return h}}}return mr.ContextConsumer=i,mr.ContextProvider=a,mr.Element=e,mr.ForwardRef=s,mr.Fragment=n,mr.Lazy=d,mr.Memo=u,mr.Portal=t,mr.Profiler=o,mr.StrictMode=r,mr.Suspense=l,mr.SuspenseList=c,mr.isContextConsumer=function(e){return h(e)===i},mr.isContextProvider=function(e){return h(e)===a},mr.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},mr.isForwardRef=function(e){return h(e)===s},mr.isFragment=function(e){return h(e)===n},mr.isLazy=function(e){return h(e)===d},mr.isMemo=function(e){return h(e)===u},mr.isPortal=function(e){return h(e)===t},mr.isProfiler=function(e){return h(e)===o},mr.isStrictMode=function(e){return h(e)===r},mr.isSuspense=function(e){return h(e)===l},mr.isSuspenseList=function(e){return h(e)===c},mr.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===l||e===c||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===s||e.$$typeof===p||void 0!==e.getModuleId)},mr.typeOf=h,mr}function br(){return pr||(pr=1,hr.exports=gr()),hr.exports}var yr=br();function vr(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function Sr(t){if(e.isValidElement(t)||yr.isValidElementType(t)||!vr(t))return t;const n={};return Object.keys(t).forEach(e=>{n[e]=Sr(t[e])}),n}function wr(t,n,r={clone:!0}){const o=r.clone?{...t}:t;return vr(t)&&vr(n)&&Object.keys(n).forEach(i=>{e.isValidElement(n[i])||yr.isValidElementType(n[i])?o[i]=n[i]:vr(n[i])&&Object.prototype.hasOwnProperty.call(t,i)&&vr(t[i])?o[i]=wr(t[i],n[i],r):r.clone?o[i]=vr(n[i])?Sr(n[i]):n[i]:o[i]=n[i]}),o}function kr(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,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)=>({...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{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}}function xr(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(e=>e.startsWith("@container")).sort((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)});return n.length?n.reduce((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e},{...t}):t}const Cr={borderRadius:4};function Er(e,t){return t?wr(e,t,{clone:!1}):e}const Lr={xs:0,sm:600,md:900,lg:1200,xl:1536},Rr={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Lr[e]}px)`},Tr={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:Lr[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function qr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||Rr;return t.reduce((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r),{})}if("object"==typeof t){const e=r.breakpoints||Rr;return Object.keys(t).reduce((o,i)=>{if(a=e.keys,"@"===(s=i)||s.startsWith("@")&&(a.some(e=>s.startsWith(`@${e}`))||s.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}(r.containerQueries?r:Tr,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||Lr).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}var a,s;return o},{})}return n(t)}function Pr(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function Ir(e){if("string"!=typeof e)throw new Error(Mt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function _r(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 Or(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:_r(e,n)||r,t&&(o=t(o,r,e)),o}function Dr(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=_r(e.theme,r)||{};return qr(e,i,e=>{let r=Or(a,o,e);return e===r&&"string"==typeof e&&(r=Or(a,o,`${t}${"default"===e?"":Ir(e)}`,e)),!1===n?r:{[n]:r}})};return i.propTypes={},i.filterProps=[t],i}const Ar={m:"margin",p:"padding"},Nr={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},jr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Mr=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}(e=>{if(e.length>2){if(!jr[e])return[e];e=jr[e]}const[t,n]=e.split(""),r=Ar[t],o=Nr[n]||"";return Array.isArray(o)?o.map(e=>r+e):[r+o]}),$r=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],zr=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function Fr(e,t,n,r){const o=_r(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:"string"==typeof o?o.startsWith("var(")&&0===e?0:o.startsWith("var(")&&1===e?o:`calc(${e} * ${o})`:o*e:Array.isArray(o)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=o[t];return e>=0?n:"number"==typeof n?-n:"string"==typeof n&&n.startsWith("var(")?`calc(-1 * ${n})`:`-${n}`}:"function"==typeof o?o:()=>{}}function Br(e){return Fr(e,"spacing",8)}function Ur(e,t){return"string"==typeof t||null==t?t:e(t)}function Wr(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce((e,r)=>(e[r]=Ur(t,n),e),{})}(Mr(n),r);return qr(e,e[n],o)}function Hr(e,t){const n=Br(e.theme);return Object.keys(e).map(r=>Wr(e,t,r,n)).reduce(Er,{})}function Vr(e){return Hr(e,$r)}function Gr(e){return Hr(e,zr)}function Kr(e=8,t=Br({spacing:e})){if(e.mui)return e;const 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}function Jr(...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]?Er(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function Qr(e){return"number"!=typeof e?e:`${e}px solid`}function Zr(e,t){return Dr({prop:e,themeKey:"borders",transform:t})}Vr.propTypes={},Vr.filterProps=$r,Gr.propTypes={},Gr.filterProps=zr;const Xr=Zr("border",Qr),Yr=Zr("borderTop",Qr),eo=Zr("borderRight",Qr),to=Zr("borderBottom",Qr),no=Zr("borderLeft",Qr),ro=Zr("borderColor"),oo=Zr("borderTopColor"),io=Zr("borderRightColor"),ao=Zr("borderBottomColor"),so=Zr("borderLeftColor"),lo=Zr("outline",Qr),co=Zr("outlineColor"),uo=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=Fr(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:Ur(t,e)});return qr(e,e.borderRadius,n)}return null};uo.propTypes={},uo.filterProps=["borderRadius"],Jr(Xr,Yr,eo,to,no,ro,oo,io,ao,so,uo,lo,co);const fo=e=>{if(void 0!==e.gap&&null!==e.gap){const t=Fr(e.theme,"spacing",8),n=e=>({gap:Ur(t,e)});return qr(e,e.gap,n)}return null};fo.propTypes={},fo.filterProps=["gap"];const po=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=Fr(e.theme,"spacing",8),n=e=>({columnGap:Ur(t,e)});return qr(e,e.columnGap,n)}return null};po.propTypes={},po.filterProps=["columnGap"];const ho=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=Fr(e.theme,"spacing",8),n=e=>({rowGap:Ur(t,e)});return qr(e,e.rowGap,n)}return null};ho.propTypes={},ho.filterProps=["rowGap"];function mo(e,t){return"grey"===t?t:e}Jr(fo,po,ho,Dr({prop:"gridColumn"}),Dr({prop:"gridRow"}),Dr({prop:"gridAutoFlow"}),Dr({prop:"gridAutoColumns"}),Dr({prop:"gridAutoRows"}),Dr({prop:"gridTemplateColumns"}),Dr({prop:"gridTemplateRows"}),Dr({prop:"gridTemplateAreas"}),Dr({prop:"gridArea"}));function go(e){return e<=1&&0!==e?100*e+"%":e}Jr(Dr({prop:"color",themeKey:"palette",transform:mo}),Dr({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:mo}),Dr({prop:"backgroundColor",themeKey:"palette",transform:mo}));const bo=Dr({prop:"width",transform:go}),yo=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||Lr[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:go(t)}};return qr(e,e.maxWidth,t)}return null};yo.filterProps=["maxWidth"];const vo=Dr({prop:"minWidth",transform:go}),So=Dr({prop:"height",transform:go}),wo=Dr({prop:"maxHeight",transform:go}),ko=Dr({prop:"minHeight",transform:go});Dr({prop:"size",cssProperty:"width",transform:go}),Dr({prop:"size",cssProperty:"height",transform:go});Jr(bo,yo,vo,So,wo,ko,Dr({prop:"boxSizing"}));const xo={border:{themeKey:"borders",transform:Qr},borderTop:{themeKey:"borders",transform:Qr},borderRight:{themeKey:"borders",transform:Qr},borderBottom:{themeKey:"borders",transform:Qr},borderLeft:{themeKey:"borders",transform:Qr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Qr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:uo},color:{themeKey:"palette",transform:mo},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:mo},backgroundColor:{themeKey:"palette",transform:mo},p:{style:Gr},pt:{style:Gr},pr:{style:Gr},pb:{style:Gr},pl:{style:Gr},px:{style:Gr},py:{style:Gr},padding:{style:Gr},paddingTop:{style:Gr},paddingRight:{style:Gr},paddingBottom:{style:Gr},paddingLeft:{style:Gr},paddingX:{style:Gr},paddingY:{style:Gr},paddingInline:{style:Gr},paddingInlineStart:{style:Gr},paddingInlineEnd:{style:Gr},paddingBlock:{style:Gr},paddingBlockStart:{style:Gr},paddingBlockEnd:{style:Gr},m:{style:Vr},mt:{style:Vr},mr:{style:Vr},mb:{style:Vr},ml:{style:Vr},mx:{style:Vr},my:{style:Vr},margin:{style:Vr},marginTop:{style:Vr},marginRight:{style:Vr},marginBottom:{style:Vr},marginLeft:{style:Vr},marginX:{style:Vr},marginY:{style:Vr},marginInline:{style:Vr},marginInlineStart:{style:Vr},marginInlineEnd:{style:Vr},marginBlock:{style:Vr},marginBlockStart:{style:Vr},marginBlockEnd:{style:Vr},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:fo},rowGap:{style:ho},columnGap:{style:po},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:go},maxWidth:{style:yo},minWidth:{transform:go},height:{transform:go},maxHeight:{transform:go},minHeight:{transform:go},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};const Co=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;if("typography"===s&&"inherit"===t)return{[e]:t};const u=_r(n,s)||{};if(c)return c(o);return qr(o,t,t=>{let n=Or(u,l,t);return t===n&&"string"==typeof t&&(n=Or(u,l,`${e}${"default"===t?"":Ir(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){const{sx:r,theme:o={},nested:i}=n||{};if(!r)return null;const a=o.unstable_sxConfig??xo;function s(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const s=function(e={}){const t=e.keys?.reduce((t,n)=>(t[e.up(n)]={},t),{});return t||{}}(o.breakpoints),l=Object.keys(s);let c=s;return Object.keys(r).forEach(n=>{const i=function(e,t){return"function"==typeof e?e(t):e}(r[n],o);if(null!=i)if("object"==typeof i)if(a[n])c=Er(c,e(n,i,o,a));else{const e=qr({theme:o},i,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,i)?c=Er(c,e):c[n]=t({sx:i,theme:o,nested:!0})}else c=Er(c,e(n,i,o,a))}),!i&&o.modularCssLayers?{"@layer sx":xr(o,Pr(l,c))}:xr(o,Pr(l,c))}return Array.isArray(r)?r.map(s):s(r)}}();function Eo(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Lo(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e;let s=wr({breakpoints:kr(n),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Kr(o),shape:{...Cr,...i}},a);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(s),s.applyStyles=Eo,s=t.reduce((e,t)=>wr(e,t),s),s.unstable_sxConfig={...xo,...a?.unstable_sxConfig},s.unstable_sx=function(e){return Co({sx:e,theme:this})},s}function Ro(t=null){const n=e.useContext(y);return n&&(r=n,0!==Object.keys(r).length)?n:t;var r}Co.filterProps=["sx"];const To=Lo();function qo(e=To){return Ro(e)}function Po(e){const t=dr(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Io({styles:e,themeId:t,defaultTheme:n={}}){const r=qo(n),o=t&&r[t]||r;let i="function"==typeof e?e(o):e;return o.modularCssLayers&&(i=Array.isArray(i)?i.map(e=>Po("function"==typeof e?e(o):e)):Po(i)),or.jsx(cr,{styles:i})}const _o=e=>e,Oo=(()=>{let e=_o;return{configure(t){e=t},generate:t=>e(t),reset(){e=_o}}})();function Do(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Do(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ao(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Do(e))&&(r&&(r+=" "),r+=t);return r}const No={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function jo(e,t,n="Mui"){const r=No[t];return r?`${n}-${r}`:`${Oo.generate(e)}-${t}`}function Mo(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=jo(e,t,n)}),r}function $o(e){const{variants:t,...n}=e,r={variants:t,style:dr(n),isProcessed:!0};return r.style===n||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=dr(e.style))}),r}const zo=Lo();function Fo(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function Bo(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Uo(e){return e?(t,n)=>n[e]:null}function Wo(e,t,n){const r="function"==typeof t?t(e):t;if(Array.isArray(r))return r.flatMap(t=>Wo(e,t,n));if(Array.isArray(r?.variants)){let t;if(r.isProcessed)t=n?Bo(r.style,n):r.style;else{const{variants:e,...o}=r;t=n?Bo(dr(o),n):o}return Ho(e,r.variants,[t],n)}return r?.isProcessed?n?Bo(dr(r.style),n):r.style:n?Bo(dr(r),n):r}function Ho(e,t,n=[],r=void 0){let o;e:for(let i=0;i<t.length;i+=1){const a=t[i];if("function"==typeof a.props){if(o??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(o))continue}else for(const t in a.props)if(e[t]!==a.props[t]&&e.ownerState?.[t]!==a.props[t])continue e;"function"==typeof a.style?(o??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Bo(dr(a.style(o)),r):a.style(o))):n.push(r?Bo(dr(a.style),r):a.style)}return n}function Vo(e,t){}function Go(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function Ko(e,t,n=!1){const r={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if("components"===i||"slots"===i)r[i]={...e[i],...r[i]};else if("componentsProps"===i||"slotProps"===i){const o=e[i],a=t[i];if(a)if(o){r[i]={...a};for(const e in o)if(Object.prototype.hasOwnProperty.call(o,e)){const t=e;r[i][t]=Ko(o[t],a[t],n)}}else r[i]=a;else r[i]=o||{}}else"className"===i&&n&&t.className?r.className=Ao(e?.className,t?.className):"style"===i&&n&&t.style?r.style={...e?.style,...t?.style}:void 0===r[i]&&(r[i]=e[i])}return r}const Jo="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function Qo(e,t=0,n=1){return function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}(e,t,n)}function Zo(e){if(e.type)return e;if("#"===e.charAt(0))return Zo(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(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Mt(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)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(Mt(10,r))}else o=o.split(",");return o=o.map(e=>parseFloat(e)),{type:n,values:o,colorSpace:r}}const Xo=(e,t)=>{try{return(e=>{const t=Zo(e);return t.values.slice(0,3).map((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e).join(" ")})(e)}catch(t){return e}};function Yo(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function ei(e){e=Zo(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])),Yo({type:s,values:l})}function ti(e){let t="hsl"===(e=Zo(e)).type||"hsla"===e.type?Zo(ei(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))}function ni(e,t){return e=Zo(e),t=Qo(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,Yo(e)}function ri(e,t,n){try{return ni(e,t)}catch(t){return e}}function oi(e,t){if(e=Zo(e),t=Qo(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Yo(e)}function ii(e,t,n){try{return oi(e,t)}catch(t){return e}}function ai(e,t){if(e=Zo(e),t=Qo(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Yo(e)}function si(e,t,n){try{return ai(e,t)}catch(t){return e}}function li(e,t,n){try{return function(e,t=.15){return ti(e)>.5?oi(e,t):ai(e,t)}(e,t)}catch(t){return e}}const ci=e.createContext(null);function ui(){return e.useContext(ci)}var di="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function fi(t){const{children:n,theme:r}=t,o=ui(),i=e.useMemo(()=>{const e=null===o?{...r}:function(e,t){if("function"==typeof t)return t(e);return{...e,...t}}(o,r);return null!=e&&(e[di]=null!==o),e},[r,o]);return or.jsx(ci.Provider,{value:i,children:n})}const pi=e.createContext();function hi({value:e,...t}){return or.jsx(pi.Provider,{value:e??!0,...t})}const mi=e.createContext(void 0);function gi({value:e,children:t}){return or.jsx(mi.Provider,{value:e,children:t})}function bi({props:t,name:n}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Ko(o.defaultProps,r,t.components.mergeClassNameAndStyle):o.styleOverrides||o.variants?r:Ko(o,r,t.components.mergeClassNameAndStyle)}({props:t,name:n,theme:{components:e.useContext(mi)}})}let yi=0;const vi={...e}.useId;function Si(t){if(void 0!==vi){return vi()}return function(t){const[n,r]=e.useState(t),o=t||n;return e.useEffect(()=>{null==n&&(yi+=1,r(`mui-${yi}`))},[n]),o}(t)}const wi={};function ki(t,n,r,o=!1){return e.useMemo(()=>{const e=t&&n[t]||n;if("function"==typeof r){const i=r(e),a=t?{...n,[t]:i}:i;return o?()=>a:a}return t?{...n,[t]:r}:{...n,...r}},[t,n,r,o])}function xi(e){const{children:t,theme:n,themeId:r}=e,o=Ro(wi),i=ui()||wi,a=ki(r,o,n),s=ki(r,i,n,!0),l="rtl"===(r?a[r]:a).direction,c=function(e){const t=Ro(),n=Si()||"",{modularCssLayers:r}=e;let o="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return o=r&&null===t?"string"==typeof r?r.replace(/mui(?!\.)/g,o):`@layer ${o};`:"",Jo(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(o){if(t&&t.hasAttribute?.("data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===n)return;const r=document.createElement("style");r.setAttribute("data-mui-layer-order",n),r.textContent=o,e.prepend(r)}else e.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[o,n]),o?or.jsx(Io,{styles:o}):null}(a);return or.jsx(fi,{theme:s,children:or.jsx(y.Provider,{value:a,children:or.jsx(hi,{value:l,children:or.jsxs(gi,{value:r?a[r].components:a.components,children:[c,t]})})})})}const Ci={theme:void 0};const Ei="mode",Li="color-scheme",Ri="data-color-scheme";function Ti(){}const qi=({key:e,storageWindow:t})=>(t||"undefined"==typeof window||(t=window),{get(n){if("undefined"==typeof window)return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return Ti;const r=t=>{const r=t.newValue;t.key===e&&n(r)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function Pi(){}function Ii(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia&&"system"===e){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}}function _i(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function Oi(t){const{defaultMode:n="light",defaultLightColorScheme:r,defaultDarkColorScheme:o,supportedColorSchemes:i=[],modeStorageKey:a=Ei,colorSchemeStorageKey:s=Li,storageWindow:l=("undefined"==typeof window?void 0:window),storageManager:c=qi,noSsr:u=!1}=t,d=i.join(","),f=i.length>1,p=e.useMemo(()=>c?.({key:a,storageWindow:l}),[c,a,l]),h=e.useMemo(()=>c?.({key:`${s}-light`,storageWindow:l}),[c,s,l]),m=e.useMemo(()=>c?.({key:`${s}-dark`,storageWindow:l}),[c,s,l]),[g,b]=e.useState(()=>{const e=p?.get(n)||n,t=h?.get(r)||r,i=m?.get(o)||o;return{mode:e,systemMode:Ii(e),lightColorScheme:t,darkColorScheme:i}}),[y,v]=e.useState(u||!f);e.useEffect(()=>{v(!0)},[]);const S=function(e){return _i(e,t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0)}(g),w=e.useCallback(e=>{b(t=>{if(e===t.mode)return t;const r=e??n;return p?.set(r),{...t,mode:r,systemMode:Ii(r)}})},[p,n]),k=e.useCallback(e=>{e?"string"==typeof e?e&&!d.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):b(t=>{const n={...t};return _i(t,t=>{"light"===t&&(h?.set(e),n.lightColorScheme=e),"dark"===t&&(m?.set(e),n.darkColorScheme=e)}),n}):b(t=>{const n={...t},i=null===e.light?r:e.light,a=null===e.dark?o:e.dark;return i&&(d.includes(i)?(n.lightColorScheme=i,h?.set(i)):console.error(`\`${i}\` does not exist in \`theme.colorSchemes\`.`)),a&&(d.includes(a)?(n.darkColorScheme=a,m?.set(a)):console.error(`\`${a}\` does not exist in \`theme.colorSchemes\`.`)),n}):b(e=>(h?.set(r),m?.set(o),{...e,lightColorScheme:r,darkColorScheme:o}))},[d,h,m,r,o]),x=e.useCallback(e=>{"system"===g.mode&&b(t=>{const n=e?.matches?"dark":"light";return t.systemMode===n?t:{...t,systemMode:n}})},[g.mode]),C=e.useRef(x);return C.current=x,e.useEffect(()=>{if("function"!=typeof window.matchMedia||!f)return;const e=(...e)=>C.current(...e),t=window.matchMedia("(prefers-color-scheme: dark)");return t.addListener(e),e(t),()=>{t.removeListener(e)}},[f]),e.useEffect(()=>{if(f){const e=p?.subscribe(e=>{e&&!["light","dark","system"].includes(e)||w(e||n)})||Pi,t=h?.subscribe(e=>{e&&!d.match(e)||k({light:e})})||Pi,r=m?.subscribe(e=>{e&&!d.match(e)||k({dark:e})})||Pi;return()=>{e(),t(),r()}}},[k,w,d,n,l,f,p,h,m]),{...g,mode:y?g.mode:void 0,systemMode:y?g.systemMode:void 0,colorScheme:y?S:void 0,setMode:w,setColorScheme:k}}function Di(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}const Ai=(e,t,n,r=[])=>{let o=e;t.forEach((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"==typeof o&&(o[e]=n):o&&"object"==typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])})};function Ni(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(o,{[r]:l}),Ai(i,e,`var(${r})`,s),Ai(a,e,`var(${r}, ${l})`,s)}},l=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach(([t,o])=>{(!l||l&&!l([...n,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...n,t],Array.isArray(o)?[...r,t]:r):s([...n,t],o,r))})}(e),{css:o,vars:i,varsWithDefaults:a}}const ji={black:"#000",white:"#fff"},Mi={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"},$i="#f3e5f5",zi="#ce93d8",Fi="#ba68c8",Bi="#ab47bc",Ui="#9c27b0",Wi="#7b1fa2",Hi="#e57373",Vi="#ef5350",Gi="#f44336",Ki="#d32f2f",Ji="#c62828",Qi="#ffb74d",Zi="#ffa726",Xi="#ff9800",Yi="#f57c00",ea="#e65100",ta="#e3f2fd",na="#90caf9",ra="#42a5f5",oa="#1976d2",ia="#1565c0",aa="#4fc3f7",sa="#29b6f6",la="#03a9f4",ca="#0288d1",ua="#01579b",da="#81c784",fa="#66bb6a",pa="#4caf50",ha="#388e3c",ma="#2e7d32",ga="#1b5e20";function ba(){return{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:ji.white,default:ji.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}}}const ya=ba();function va(){return{text:{primary:ji.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:ji.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}}}const Sa=va();function wa(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=ai(e.main,o):"dark"===t&&(e.dark=oi(e.main,i)))}function ka(e,t,n,r,o){const i=o.light||o,a=o.dark||1.5*o;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:"light"===n?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(100*i).toFixed(0)}%)`:"dark"===n&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(100*a).toFixed(0)}%)`))}function xa(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:o,...i}=e,a=e.primary||function(e="light"){return"dark"===e?{main:na,light:ta,dark:ra}:{main:oa,light:ra,dark:ia}}(t),s=e.secondary||function(e="light"){return"dark"===e?{main:zi,light:$i,dark:Bi}:{main:Ui,light:Fi,dark:Wi}}(t),l=e.error||function(e="light"){return"dark"===e?{main:Gi,light:Hi,dark:Ki}:{main:Ki,light:Vi,dark:Ji}}(t),c=e.info||function(e="light"){return"dark"===e?{main:sa,light:aa,dark:ca}:{main:ca,light:la,dark:ua}}(t),u=e.success||function(e="light"){return"dark"===e?{main:fa,light:da,dark:ha}:{main:ma,light:pa,dark:ga}}(t),d=e.warning||function(e="light"){return"dark"===e?{main:Zi,light:Qi,dark:Yi}:{main:"#ed6c02",light:Xi,dark:ea}}(t);function f(e){if(o)return function(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}(e);const t=function(e,t){const n=ti(e),r=ti(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}(e,Sa.text.primary)>=n?Sa.text.primary:ya.text.primary;return t}const p=({color:e,name:t,mainShade:n=500,lightShade:i=300,darkShade:a=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(Mt(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(Mt(12,t?` (${t})`:"",JSON.stringify(e.main)));return o?(ka(o,e,"light",i,r),ka(o,e,"dark",a,r)):(wa(e,"light",i,r),wa(e,"dark",a,r)),e.contrastText||(e.contrastText=f(e.main)),e};let h;"light"===t?h=ba():"dark"===t&&(h=va());return wr({common:{...ji},mode:t,primary:p({color:a,name:"primary"}),secondary:p({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:l,name:"error"}),warning:p({color:d,name:"warning"}),info:p({color:c,name:"info"}),success:p({color:u,name:"success"}),grey:Mi,contrastThreshold:n,getContrastText:f,augmentColor:p,tonalOffset:r,...h},i)}function Ca(e){const t={};return Object.entries(e).forEach(e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)}),t}const Ea={textTransform:"uppercase"},La='"Roboto", "Helvetica", "Arial", sans-serif';function Ra(e,t){const{fontFamily:n=La,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}="function"==typeof t?t(e):t,f=r/14,p=u||(e=>e/l*f+"rem"),h=(e,t,r,o,i)=>{return{fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===La?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},...i,...c};var a},m={h1:h(o,96,1.167,-1.5),h2:h(o,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,Ea),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,Ea),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return wr({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...m},d,{clone:!1})}function Ta(...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(",")}const qa=["none",Ta(0,2,1,-1,0,1,1,0,0,1,3,0),Ta(0,3,1,-2,0,2,2,0,0,1,5,0),Ta(0,3,3,-2,0,3,4,0,0,1,8,0),Ta(0,2,4,-1,0,4,5,0,0,1,10,0),Ta(0,3,5,-1,0,5,8,0,0,1,14,0),Ta(0,3,5,-1,0,6,10,0,0,1,18,0),Ta(0,4,5,-2,0,7,10,1,0,2,16,1),Ta(0,5,5,-3,0,8,10,1,0,3,14,2),Ta(0,5,6,-3,0,9,12,1,0,3,16,2),Ta(0,6,6,-3,0,10,14,1,0,4,18,3),Ta(0,6,7,-4,0,11,15,1,0,4,20,3),Ta(0,7,8,-4,0,12,17,2,0,5,22,4),Ta(0,7,8,-4,0,13,19,2,0,5,24,4),Ta(0,7,9,-4,0,14,21,2,0,5,26,4),Ta(0,8,9,-5,0,15,22,2,0,6,28,5),Ta(0,8,10,-5,0,16,24,2,0,6,30,5),Ta(0,8,11,-5,0,17,26,2,0,6,32,5),Ta(0,9,11,-5,0,18,28,2,0,7,34,6),Ta(0,9,12,-6,0,19,29,2,0,7,36,6),Ta(0,10,13,-6,0,20,31,3,0,8,38,7),Ta(0,10,13,-6,0,21,33,3,0,8,40,7),Ta(0,10,14,-6,0,22,35,3,0,8,42,7),Ta(0,11,14,-7,0,23,36,3,0,9,44,8),Ta(0,11,15,-7,0,24,38,3,0,9,46,8)],Pa={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)"},Ia={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function _a(e){return`${Math.round(e)}ms`}function Oa(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function Da(e){const t={...Pa,...e.easing},n={...Ia,...e.duration};return{getAutoHeightDuration:Oa,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0,...s}=r;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof o?o:_a(o)} ${i} ${"string"==typeof a?a:_a(a)}`).join(",")},...e,easing:t,duration:n}}const Aa={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Na(e){return vr(e)||void 0===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)}function ja(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let r=0;r<n.length;r++){const[o,i]=n[r];!Na(i)||o.startsWith("unstable_")?delete t[o]:vr(i)&&(t[o]={...i},e(t[o]))}}(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(t,null,2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`}function Ma(e){return"number"==typeof e?`${(100*e).toFixed(0)}%`:`calc((${e}) * 100%)`}function $a(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${"string"==typeof n?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${"string"==typeof n?`calc(${n})`:n})`:ni(t,(e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let e=0;e<t.length;e+=1)n+=+t[e];return n})(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${Ma(n)})`:ai(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${Ma(n)})`:oi(t,n)}})}function za(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,colorSpace:c,...u}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error(Mt(20));const d=xa({...i,colorSpace:c}),f=Lo(e);let p=wr(f,{mixins:(h=f.breakpoints,m=r,{toolbar:{minHeight:56,[h.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[h.up("sm")]:{minHeight:64}},...m}),palette:d,shadows:qa.slice(),typography:Ra(d,s),transitions:Da(a),zIndex:{...Aa}});var h,m;return p=wr(p,u),p=t.reduce((e,t)=>wr(e,t),p),p.unstable_sxConfig={...xo,...u?.unstable_sxConfig},p.unstable_sx=function(e){return Co({sx:e,theme:this})},p.toRuntimeSource=ja,$a(p),p}const Fa=[...Array(25)].map((e,t)=>{if(0===t)return"none";const n=function(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function Ba(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function Ua(e){return"dark"===e?Fa:[]}function Wa(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var Ha=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return(a=e.cssVarPrefix,[...[...Array(25)].map((e,t)=>`--${a?`${a}-`:""}overlays-${t}`),`--${a?`${a}-`:""}palette-AppBar-darkBg`,`--${a?`${a}-`:""}palette-AppBar-darkColor`]).forEach(e=>{o[e]=n[e],delete n[e]}),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}var a;return r};function Va(e,t,n){!e[t]&&n&&(e[t]=n)}function Ga(e){return"string"==typeof e&&e.startsWith("hsl")?ei(e):e}function Ka(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Xo(Ga(e[t])))}const Ja=e=>{try{return e()}catch(e){}};function Qa(e,t,n,r,o){if(!n)return;n=!0===n?{}:n;const i="dark"===o?"dark":"light";if(!r)return void(t[o]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:o,...i}=e,a=xa({...t,colorSpace:o});return{palette:a,opacity:{...Ba(a.mode),...n},overlays:r||Ua(a.mode),...i}}({...n,palette:{mode:i,...n?.palette},colorSpace:e}));const{palette:a,...s}=za({...r,palette:{mode:i,...n?.palette},colorSpace:e});return t[o]={...n,palette:a,opacity:{...Ba(i),...n?.opacity},overlays:n?.overlays||Ua(i)},s}function Za(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",nativeColor:a=!1,shouldSkipGeneratingVar:s=Wa,colorSchemeSelector:l=(n.light&&n.dark?"media":void 0),rootSelector:c=":root",...u}=e,d=Object.keys(n)[0],f=r||(n.light&&"light"!==d?"light":d),p=((e="mui")=>Di(e))(i),{[f]:h,light:m,dark:g,...b}=n,y={...b};let v,S=h;if(("dark"===f&&!("dark"in n)||"light"===f&&!("light"in n))&&(S=!0),!S)throw new Error(Mt(21,f));a&&(v="oklch");const w=Qa(v,y,S,u,f);m&&!y.light&&Qa(v,y,m,void 0,"light"),g&&!y.dark&&Qa(v,y,g,void 0,"dark");let k={defaultColorScheme:f,...w,cssVarPrefix:i,colorSchemeSelector:l,rootSelector:c,getCssVar:p,colorSchemes:y,font:{...Ca(w.typography),...w.font},spacing:(x=u.spacing,"number"==typeof x?`${x}px`:"string"==typeof x||"function"==typeof x||Array.isArray(x)?x:"8px")};var x;Object.keys(k.colorSchemes).forEach(e=>{const t=k.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return p(e,t[r][o])};function r(e,t,n){if(v){let r;return e===ri&&(r=`transparent ${(100*(1-n)).toFixed(0)}%`),e===ii&&(r=`#000 ${(100*n).toFixed(0)}%`),e===si&&(r=`#fff ${(100*n).toFixed(0)}%`),`color-mix(in ${v}, ${t}, ${r})`}return e(t,n)}var o;if("light"===t.mode&&(Va(t.common,"background","#fff"),Va(t.common,"onBackground","#000")),"dark"===t.mode&&(Va(t.common,"background","#000"),Va(t.common,"onBackground","#fff")),o=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach(e=>{o[e]||(o[e]={})}),"light"===t.mode){Va(t.Alert,"errorColor",r(ii,a?p("palette-error-light"):t.error.light,.6)),Va(t.Alert,"infoColor",r(ii,a?p("palette-info-light"):t.info.light,.6)),Va(t.Alert,"successColor",r(ii,a?p("palette-success-light"):t.success.light,.6)),Va(t.Alert,"warningColor",r(ii,a?p("palette-warning-light"):t.warning.light,.6)),Va(t.Alert,"errorFilledBg",n("palette-error-main")),Va(t.Alert,"infoFilledBg",n("palette-info-main")),Va(t.Alert,"successFilledBg",n("palette-success-main")),Va(t.Alert,"warningFilledBg",n("palette-warning-main")),Va(t.Alert,"errorFilledColor",Ja(()=>t.getContrastText(t.error.main))),Va(t.Alert,"infoFilledColor",Ja(()=>t.getContrastText(t.info.main))),Va(t.Alert,"successFilledColor",Ja(()=>t.getContrastText(t.success.main))),Va(t.Alert,"warningFilledColor",Ja(()=>t.getContrastText(t.warning.main))),Va(t.Alert,"errorStandardBg",r(si,a?p("palette-error-light"):t.error.light,.9)),Va(t.Alert,"infoStandardBg",r(si,a?p("palette-info-light"):t.info.light,.9)),Va(t.Alert,"successStandardBg",r(si,a?p("palette-success-light"):t.success.light,.9)),Va(t.Alert,"warningStandardBg",r(si,a?p("palette-warning-light"):t.warning.light,.9)),Va(t.Alert,"errorIconColor",n("palette-error-main")),Va(t.Alert,"infoIconColor",n("palette-info-main")),Va(t.Alert,"successIconColor",n("palette-success-main")),Va(t.Alert,"warningIconColor",n("palette-warning-main")),Va(t.AppBar,"defaultBg",n("palette-grey-100")),Va(t.Avatar,"defaultBg",n("palette-grey-400")),Va(t.Button,"inheritContainedBg",n("palette-grey-300")),Va(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),Va(t.Chip,"defaultBorder",n("palette-grey-400")),Va(t.Chip,"defaultAvatarColor",n("palette-grey-700")),Va(t.Chip,"defaultIconColor",n("palette-grey-700")),Va(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Va(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Va(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Va(t.LinearProgress,"primaryBg",r(si,a?p("palette-primary-main"):t.primary.main,.62)),Va(t.LinearProgress,"secondaryBg",r(si,a?p("palette-secondary-main"):t.secondary.main,.62)),Va(t.LinearProgress,"errorBg",r(si,a?p("palette-error-main"):t.error.main,.62)),Va(t.LinearProgress,"infoBg",r(si,a?p("palette-info-main"):t.info.main,.62)),Va(t.LinearProgress,"successBg",r(si,a?p("palette-success-main"):t.success.main,.62)),Va(t.LinearProgress,"warningBg",r(si,a?p("palette-warning-light"):t.warning.main,.62)),Va(t.Skeleton,"bg",v?r(ri,a?p("palette-text-primary"):t.text.primary,.11):`rgba(${n("palette-text-primaryChannel")} / 0.11)`),Va(t.Slider,"primaryTrack",r(si,a?p("palette-primary-main"):t.primary.main,.62)),Va(t.Slider,"secondaryTrack",r(si,a?p("palette-secondary-main"):t.secondary.main,.62)),Va(t.Slider,"errorTrack",r(si,a?p("palette-error-main"):t.error.main,.62)),Va(t.Slider,"infoTrack",r(si,a?p("palette-info-main"):t.info.main,.62)),Va(t.Slider,"successTrack",r(si,a?p("palette-success-main"):t.success.main,.62)),Va(t.Slider,"warningTrack",r(si,a?p("palette-warning-main"):t.warning.main,.62));const e=v?r(ii,a?p("palette-background-default"):t.background.default,.6825):li(t.background.default,.8);Va(t.SnackbarContent,"bg",e),Va(t.SnackbarContent,"color",Ja(()=>v?Sa.text.primary:t.getContrastText(e))),Va(t.SpeedDialAction,"fabHoverBg",li(t.background.paper,.15)),Va(t.StepConnector,"border",n("palette-grey-400")),Va(t.StepContent,"border",n("palette-grey-400")),Va(t.Switch,"defaultColor",n("palette-common-white")),Va(t.Switch,"defaultDisabledColor",n("palette-grey-100")),Va(t.Switch,"primaryDisabledColor",r(si,a?p("palette-primary-main"):t.primary.main,.62)),Va(t.Switch,"secondaryDisabledColor",r(si,a?p("palette-secondary-main"):t.secondary.main,.62)),Va(t.Switch,"errorDisabledColor",r(si,a?p("palette-error-main"):t.error.main,.62)),Va(t.Switch,"infoDisabledColor",r(si,a?p("palette-info-main"):t.info.main,.62)),Va(t.Switch,"successDisabledColor",r(si,a?p("palette-success-main"):t.success.main,.62)),Va(t.Switch,"warningDisabledColor",r(si,a?p("palette-warning-main"):t.warning.main,.62)),Va(t.TableCell,"border",r(si,ri(a?p("palette-divider"):t.divider,1),.88)),Va(t.Tooltip,"bg",r(ri,a?p("palette-grey-700"):t.grey[700],.92))}if("dark"===t.mode){Va(t.Alert,"errorColor",r(si,a?p("palette-error-light"):t.error.light,.6)),Va(t.Alert,"infoColor",r(si,a?p("palette-info-light"):t.info.light,.6)),Va(t.Alert,"successColor",r(si,a?p("palette-success-light"):t.success.light,.6)),Va(t.Alert,"warningColor",r(si,a?p("palette-warning-light"):t.warning.light,.6)),Va(t.Alert,"errorFilledBg",n("palette-error-dark")),Va(t.Alert,"infoFilledBg",n("palette-info-dark")),Va(t.Alert,"successFilledBg",n("palette-success-dark")),Va(t.Alert,"warningFilledBg",n("palette-warning-dark")),Va(t.Alert,"errorFilledColor",Ja(()=>t.getContrastText(t.error.dark))),Va(t.Alert,"infoFilledColor",Ja(()=>t.getContrastText(t.info.dark))),Va(t.Alert,"successFilledColor",Ja(()=>t.getContrastText(t.success.dark))),Va(t.Alert,"warningFilledColor",Ja(()=>t.getContrastText(t.warning.dark))),Va(t.Alert,"errorStandardBg",r(ii,a?p("palette-error-light"):t.error.light,.9)),Va(t.Alert,"infoStandardBg",r(ii,a?p("palette-info-light"):t.info.light,.9)),Va(t.Alert,"successStandardBg",r(ii,a?p("palette-success-light"):t.success.light,.9)),Va(t.Alert,"warningStandardBg",r(ii,a?p("palette-warning-light"):t.warning.light,.9)),Va(t.Alert,"errorIconColor",n("palette-error-main")),Va(t.Alert,"infoIconColor",n("palette-info-main")),Va(t.Alert,"successIconColor",n("palette-success-main")),Va(t.Alert,"warningIconColor",n("palette-warning-main")),Va(t.AppBar,"defaultBg",n("palette-grey-900")),Va(t.AppBar,"darkBg",n("palette-background-paper")),Va(t.AppBar,"darkColor",n("palette-text-primary")),Va(t.Avatar,"defaultBg",n("palette-grey-600")),Va(t.Button,"inheritContainedBg",n("palette-grey-800")),Va(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),Va(t.Chip,"defaultBorder",n("palette-grey-700")),Va(t.Chip,"defaultAvatarColor",n("palette-grey-300")),Va(t.Chip,"defaultIconColor",n("palette-grey-300")),Va(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Va(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Va(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Va(t.LinearProgress,"primaryBg",r(ii,a?p("palette-primary-main"):t.primary.main,.5)),Va(t.LinearProgress,"secondaryBg",r(ii,a?p("palette-secondary-main"):t.secondary.main,.5)),Va(t.LinearProgress,"errorBg",r(ii,a?p("palette-error-main"):t.error.main,.5)),Va(t.LinearProgress,"infoBg",r(ii,a?p("palette-info-main"):t.info.main,.5)),Va(t.LinearProgress,"successBg",r(ii,a?p("palette-success-main"):t.success.main,.5)),Va(t.LinearProgress,"warningBg",r(ii,a?p("palette-warning-main"):t.warning.main,.5)),Va(t.Skeleton,"bg",v?r(ri,a?p("palette-text-primary"):t.text.primary,.13):`rgba(${n("palette-text-primaryChannel")} / 0.13)`),Va(t.Slider,"primaryTrack",r(ii,a?p("palette-primary-main"):t.primary.main,.5)),Va(t.Slider,"secondaryTrack",r(ii,a?p("palette-secondary-main"):t.secondary.main,.5)),Va(t.Slider,"errorTrack",r(ii,a?p("palette-error-main"):t.error.main,.5)),Va(t.Slider,"infoTrack",r(ii,a?p("palette-info-main"):t.info.main,.5)),Va(t.Slider,"successTrack",r(ii,a?p("palette-success-main"):t.success.main,.5)),Va(t.Slider,"warningTrack",r(ii,a?p("palette-warning-light"):t.warning.main,.5));const e=v?r(si,a?p("palette-background-default"):t.background.default,.985):li(t.background.default,.98);Va(t.SnackbarContent,"bg",e),Va(t.SnackbarContent,"color",Ja(()=>v?ya.text.primary:t.getContrastText(e))),Va(t.SpeedDialAction,"fabHoverBg",li(t.background.paper,.15)),Va(t.StepConnector,"border",n("palette-grey-600")),Va(t.StepContent,"border",n("palette-grey-600")),Va(t.Switch,"defaultColor",n("palette-grey-300")),Va(t.Switch,"defaultDisabledColor",n("palette-grey-600")),Va(t.Switch,"primaryDisabledColor",r(ii,a?p("palette-primary-main"):t.primary.main,.55)),Va(t.Switch,"secondaryDisabledColor",r(ii,a?p("palette-secondary-main"):t.secondary.main,.55)),Va(t.Switch,"errorDisabledColor",r(ii,a?p("palette-error-main"):t.error.main,.55)),Va(t.Switch,"infoDisabledColor",r(ii,a?p("palette-info-main"):t.info.main,.55)),Va(t.Switch,"successDisabledColor",r(ii,a?p("palette-success-main"):t.success.main,.55)),Va(t.Switch,"warningDisabledColor",r(ii,a?p("palette-warning-light"):t.warning.main,.55)),Va(t.TableCell,"border",r(ii,ri(a?p("palette-divider"):t.divider,1),.68)),Va(t.Tooltip,"bg",r(ri,a?p("palette-grey-700"):t.grey[700],.92))}a||(Ka(t.background,"default"),Ka(t.background,"paper"),Ka(t.common,"background"),Ka(t.common,"onBackground"),Ka(t,"divider")),Object.keys(t).forEach(e=>{const n=t[e];"tonalOffset"!==e&&!a&&n&&"object"==typeof n&&(n.main&&Va(t[e],"mainChannel",Xo(Ga(n.main))),n.light&&Va(t[e],"lightChannel",Xo(Ga(n.light))),n.dark&&Va(t[e],"darkChannel",Xo(Ga(n.dark))),n.contrastText&&Va(t[e],"contrastTextChannel",Xo(Ga(n.contrastText))),"text"===e&&(Ka(t[e],"primary"),Ka(t[e],"secondary")),"action"===e&&(n.active&&Ka(t[e],"active"),n.selected&&Ka(t[e],"selected")))})}),k=t.reduce((e,t)=>wr(e,t),k);const C={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:s,getSelector:Ha(k),enableContrastVars:a},{vars:E,generateThemeVars:L,generateStyleSheets:R}=function(e,t={}){const{getSelector:n=b,disableCssColorScheme:r,colorSchemeSelector:o,enableContrastVars:i}=t,{colorSchemes:a={},components:s,defaultColorScheme:l="light",...c}=e,{vars:u,css:d,varsWithDefaults:f}=Ni(c,t);let p=f;const h={},{[l]:m,...g}=a;if(Object.entries(g||{}).forEach(([e,n])=>{const{vars:r,css:o,varsWithDefaults:i}=Ni(n,t);p=wr(p,i),h[e]={css:o,vars:r}}),m){const{css:e,vars:n,varsWithDefaults:r}=Ni(m,t);p=wr(p,r),h[l]={css:e,vars:n}}function b(t,n){let r=o;if("class"===o&&(r=".%s"),"data"===o&&(r="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(r=`[${o}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=a[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:p,generateThemeVars:()=>{let e={...u};return Object.entries(h).forEach(([,{vars:t}])=>{e=wr(e,t)}),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function s(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}s(n(void 0,{...d}),d);const{[o]:l,...c}=h;if(l){const{css:e}=l,t=a[o]?.palette?.mode,i=!r&&t?{colorScheme:t,...e}:{...e};s(n(o,{...i}),i)}return Object.entries(c).forEach(([e,{css:t}])=>{const o=a[e]?.palette?.mode,i=!r&&o?{colorScheme:o,...t}:{...t};s(n(e,{...i}),i)}),i&&t.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),t}}}(k,C);return k.vars=E,Object.entries(k.colorSchemes[k.defaultColorScheme]).forEach(([e,t])=>{k[e]=t}),k.generateThemeVars=L,k.generateStyleSheets=R,k.generateSpacing=function(){return Kr(u.spacing,Br(this))},k.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(l),k.spacing=k.generateSpacing(),k.shouldSkipGeneratingVar=s,k.unstable_sxConfig={...xo,...u?.unstable_sxConfig},k.unstable_sx=function(e){return Co({sx:e,theme:this})},k.toRuntimeSource=ja,k}function Xa(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:xa({...!0===n?{}:n.palette,mode:t})})}function Ya(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=(n?void 0:{light:!0}),defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],c={...o,...n?{[s]:{..."boolean"!=typeof l&&l,palette:n}}:void 0};if(!1===r){if(!("colorSchemes"in e))return za(e,...t);let r=n;"palette"in e||c[s]&&(!0!==c[s]?r=c[s].palette:"dark"===s&&(r={mode:"dark"}));const o=za({...e,palette:r},...t);return o.defaultColorScheme=s,o.colorSchemes=c,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==c.light&&c.light,palette:o.palette},Xa(o,"dark",c.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==c.dark&&c.dark,palette:o.palette},Xa(o,"light",c.light)),o}return n||"light"in c||"light"!==s||(c.light=!0),Za({...a,colorSchemes:c,defaultColorScheme:s,..."boolean"!=typeof r&&r},...t)}const es=Ya();function ts(){const e=qo(es);return e[$t]||e}const ns=function(e={}){const{themeId:t,defaultTheme:n=zo,rootShouldForwardProp:r=Fo,slotShouldForwardProp:o=Fo}=e;function i(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}(e,e=>e.filter(e=>e!==Co));const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=Uo(Go(a)),...u}=t,d=n&&n.startsWith("Mui")||a?"components":"custom",f=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,p=l||!1;let h=Fo;"Root"===a||"root"===a?h=r:a?h=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(h=void 0);const m=function(e,t){return v(e,t)}(e,{shouldForwardProp:h,label:Vo(),...u}),g=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return Wo(t,e,t.theme.modularCssLayers?d:void 0)};if(vr(e)){const t=$o(e);return function(e){return t.variants?Wo(e,t,e.theme.modularCssLayers?d:void 0):e.theme.modularCssLayers?Bo(t.style,d):t.style}}return e},b=(...t)=>{const r=[],o=t.map(g),a=[];if(r.push(i),n&&c&&a.push(function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=Wo(e,r[t],e.theme.modularCssLayers?"theme":void 0);return c(e,o)}),n&&!f&&a.push(function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?Ho(e,r,[],e.theme.modularCssLayers?"theme":void 0):null}),p||a.push(Co),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(a.length).fill("");let i;i=[...t,...e,...n],i.raw=[...t,...e.raw,...n],r.unshift(i)}const s=[...r,...o,...a],l=m(...s);return e.muiName&&(l.muiName=e.muiName),l};return m.withConfig&&(b.withConfig=m.withConfig),b}}({themeId:$t,defaultTheme:es,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e});function rs({theme:e,...t}){const n=$t in e?e[$t]:void 0;return or.jsx(xi,{...t,themeId:n?$t:void 0,theme:n||e})}const os="mui-color-scheme",is="light",as="dark",ss="mui-mode",{CssVarsProvider:ls}=function(t){const{themeId:n,theme:r={},modeStorageKey:o=Ei,colorSchemeStorageKey:i=Li,disableTransitionOnChange:a=!1,defaultColorScheme:s,resolveTheme:l}=t,c={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},u=e.createContext(void 0),d={},f={},p="string"==typeof s?s:s.light,h="string"==typeof s?s:s.dark;return{CssVarsProvider:function(t){const{children:c,theme:p,modeStorageKey:h=o,colorSchemeStorageKey:m=i,disableTransitionOnChange:g=a,storageManager:b,storageWindow:y=("undefined"==typeof window?void 0:window),documentNode:v=("undefined"==typeof document?void 0:document),colorSchemeNode:S=("undefined"==typeof document?void 0:document.documentElement),disableNestedContext:w=!1,disableStyleSheetGeneration:k=!1,defaultMode:x="system",forceThemeRerender:C=!1,noSsr:E}=t,L=e.useRef(!1),R=ui(),T=e.useContext(u),q=!!T&&!w,P=e.useMemo(()=>p||("function"==typeof r?r():r),[p]),I=P[n],_=I||P,{colorSchemes:O=d,components:D=f,cssVarPrefix:A}=_,N=Object.keys(O).filter(e=>!!O[e]).join(","),j=e.useMemo(()=>N.split(","),[N]),M="string"==typeof s?s:s.light,$="string"==typeof s?s:s.dark,z=O[M]&&O[$]?x:O[_.defaultColorScheme]?.palette?.mode||_.palette?.mode,{mode:F,setMode:B,systemMode:U,lightColorScheme:W,darkColorScheme:H,colorScheme:V,setColorScheme:G}=Oi({supportedColorSchemes:j,defaultLightColorScheme:M,defaultDarkColorScheme:$,modeStorageKey:h,colorSchemeStorageKey:m,defaultMode:z,storageManager:b,storageWindow:y,noSsr:E});let K=F,J=V;q&&(K=T.mode,J=T.colorScheme);let Q=J||_.defaultColorScheme;_.vars&&!C&&(Q=_.defaultColorScheme);const Z=e.useMemo(()=>{const e=_.generateThemeVars?.()||_.vars,t={..._,components:D,colorSchemes:O,cssVarPrefix:A,vars:e};if("function"==typeof t.generateSpacing&&(t.spacing=t.generateSpacing()),Q){const e=O[Q];e&&"object"==typeof e&&Object.keys(e).forEach(n=>{e[n]&&"object"==typeof e[n]?t[n]={...t[n],...e[n]}:t[n]=e[n]})}return l?l(t):t},[_,Q,D,O,A]),X=_.colorSchemeSelector;Jo(()=>{if(J&&S&&X&&"media"!==X){const e=X;let t=X;if("class"===e&&(t=".%s"),"data"===e&&(t="[data-%s]"),e?.startsWith("data-")&&!e.includes("%s")&&(t=`[${e}="%s"]`),t.startsWith("."))S.classList.remove(...j.map(e=>t.substring(1).replace("%s",e))),S.classList.add(t.substring(1).replace("%s",J));else{const e=t.replace("%s",J).match(/\[([^\]]+)\]/);if(e){const[t,n]=e[1].split("=");n||j.forEach(e=>{S.removeAttribute(t.replace(J,e))}),S.setAttribute(t,n?n.replace(/"|'/g,""):"")}else S.setAttribute(t,J)}}},[J,X,S,j]),e.useEffect(()=>{let e;if(g&&L.current&&v){const t=v.createElement("style");t.appendChild(v.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[J,g,v]),e.useEffect(()=>(L.current=!0,()=>{L.current=!1}),[]);const Y=e.useMemo(()=>({allColorSchemes:j,colorScheme:J,darkColorScheme:H,lightColorScheme:W,mode:K,setColorScheme:G,setMode:B,systemMode:U}),[j,J,H,W,K,G,B,U,Z.colorSchemeSelector]);let ee=!0;(k||!1===_.cssVariables||q&&R?.cssVarPrefix===A)&&(ee=!1);const te=or.jsxs(e.Fragment,{children:[or.jsx(xi,{themeId:I?n:void 0,theme:Z,children:c}),ee&&or.jsx(cr,{styles:Z.generateStyleSheets?.()||[]})]});return q?te:or.jsx(u.Provider,{value:Y,children:te})},useColorScheme:()=>e.useContext(u)||c,getInitColorSchemeScript:e=>function(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=Ei,colorSchemeStorageKey:i=Li,attribute:a=Ri,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if("class"===a&&(u=".%s"),"data"===a&&(u="[data-%s]"),u.startsWith(".")){const e=u.substring(1);c+=`${s}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));\n ${s}.classList.add('${e}'.replace('%s', colorScheme));`}const d=u.match(/\[([^[\]]+)\]/);if(d){const[e,t]=d[1].split("=");t||(c+=`${s}.removeAttribute('${e}'.replace('%s', light));\n ${s}.removeAttribute('${e}'.replace('%s', dark));`),c+=`\n ${s}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else".%s"!==u&&(c+=`${s}.setAttribute('${u}', colorScheme);`);return or.jsx("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?l:"",dangerouslySetInnerHTML:{__html:`(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${o}') || '${t}';\n const dark = localStorage.getItem('${i}-dark') || '${r}';\n const light = localStorage.getItem('${i}-light') || '${n}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${c}\n }\n} catch(e){}})();`}},"mui-color-scheme-init")}({colorSchemeStorageKey:i,defaultLightColorScheme:p,defaultDarkColorScheme:h,modeStorageKey:o,...e})}}({themeId:$t,theme:()=>Ya({cssVariables:!0}),colorSchemeStorageKey:os,modeStorageKey:ss,defaultColorScheme:{light:is,dark:as},resolveTheme:e=>{const t={...e,typography:Ra(e.palette,e.typography)};return t.unstable_sx=function(e){return Co({sx:e,theme:this})},t}}),cs=ls;function us({theme:t,...n}){const r=e.useMemo(()=>{if("function"==typeof t)return t;const e=$t in t?t[$t]:t;return"colorSchemes"in e?null:"vars"in e?t:{...t,vars:null}},[t]);return r?or.jsx(rs,{theme:r,...n}):or.jsx(cs,{theme:t,...n})}const ds=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(Ci.theme=r.theme,o=$o(e(Ci)),t=o,n=r.theme),o}};function fs(e){return jo("MuiSvgIcon",e)}Mo("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ps=ns("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${Ir(n.color)}`],t[`fontSize${Ir(n.fontSize)}`]]}})(ds(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),hs=e.forwardRef(function(t,n){const r=bi({props:t,name:"MuiSvgIcon"});const{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,h=e.isValidElement(o)&&"svg"===o.type,m={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h},g={};u||(g.viewBox=f);const b=(e=>{const{color:t,fontSize:n,classes:r}=e;return function(e,t,n){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=(!0===s?"":" ")+t(r),s=!1,n&&n[r]&&(a+=" "+n[r]))}r[o]=a}return r}({root:["root","inherit"!==t&&`color${Ir(t)}`,`fontSize${Ir(n)}`]},fs,r)})(m);return or.jsxs(ps,{as:s,className:Ao(b.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:n,...g,...p,...h&&o.props,ownerState:m,children:[h?o.props.children:o,d?or.jsx("title",{children:d}):null]})});function ms(){return ms=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ms.apply(null,arguments)}function gs(e,t){return gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gs(e,t)}function bs(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gs(e,t)}function ys(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}hs.muiName="SvgIcon";const vs=Mo("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]);var Ss={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)"]};const ws={green:"#00873D",blue:"#3F8AB3",blueDark:"#005DB9",grey100:"#ffffff",grey98:"#FBFBFB",grey95:"#F2F2F2",grey90:"#E6E6E6",grey45:"#737373",grey25:"#404040",grey20:"#333333",grey15:"#262626",grey10:"#1A1A1A",grey0:"#000000"},ks={mode:"light",palette:{primary:{main:ws.grey25,contrastText:ws.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:ws.grey25,secondary:"rgba(0, 0, 0, 0.55)",disabled:"rgba(0, 0, 0, 0.3)",light:ws.grey100,dark:ws.grey0},action:{active:"#545454",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:ws.grey100,default:ws.grey100,lightest:ws.grey100,lighter:ws.grey98,darker:ws.grey95,darkest:ws.grey90},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:ws.blueDark,focusBorder:ws.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(255, 255, 255, 1)",disabledBackground:ws.grey45,disabledContrastText:ws.grey100},selected:{main:ws.green,alternative:"#E4E4E4",excluded:"#BEBEBE",selectedExcluded:"#BEBEBE",possible:ws.grey100,selectedContrastText:ws.grey100,mainContrastText:ws.grey100,alternativeContrastText:ws.grey25,excludedContrastText:ws.grey25,selectedExcludedContrastText:ws.grey100,possibleContrastText:ws.grey0},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)"}}},xs={mode:"dark",palette:{primary:{main:ws.grey20,contrastText:ws.grey100},secondary:{light:"#0AAF54",main:"#009845",dark:"#006937"},text:{primary:ws.grey100,secondary:"rgba(255, 255, 255, 0.6)",disabled:"rgba(255, 255, 255, 0.3)",light:ws.grey100,dark:ws.grey0},action:{active:ws.grey100,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:ws.grey25,lighter:ws.grey20,darker:ws.grey15,darkest:ws.grey10},custom:{whiteBorder:"rgb(255, 255, 255)",newFocusBorder:ws.blueDark,focusBorder:ws.blue,focusOutline:"rgba(70, 157, 205, 0.3)",inputBackground:"rgba(0, 0, 0, 0.2)",disabledBackground:ws.grey45,disabledContrastText:ws.grey100},selected:{main:ws.green,alternative:ws.grey20,excluded:ws.grey10,selectedExcluded:ws.grey10,possible:ws.grey80,selectedContrastText:ws.grey100,mainContrastText:ws.grey100,alternativeContrastText:ws.grey100,excludedContrastText:ws.grey100,selectedExcludedContrastText:ws.grey100,possibleContrastText:ws.grey0},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)"}}},Cs={},Es=e=>({MuiCheckbox:{defaultProps:{color:"secondary"}},MuiRadio:{defaultProps:{color:"secondary"}},MuiTabs:{defaultProps:{indicatorColor:"secondary"}},MuiTypography:{styleOverrides:{root:{color:e.palette.text.primary}}},MuiGrid:{styleOverrides:{variants:[{props:{alignItems:"center"},style:{"align-items":"center"}}]}},MuiButtonBase:{defaultProps:{disableRipple:!0,disableTouchRipple:!0,focusRipple:!1},styleOverrides:{root:{borderRadius:2,border:"1px solid transparent","&.Mui-focused":{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`}}}},MuiIconButton:{styleOverrides:{root:{padding:7,borderRadius:2,border:"1px solid transparent","&:hover":{backgroundColor:e.palette.btn.hover},"&.Mui-focusVisible":{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`},"&.Mui-active":{borderColor:"transparent",boxShadow:"none",backgroundColor:e.palette.btn.active},"&:not(.Mui-active):not(.Mui-focusVisible)":{borderColor:"transparent",boxShadow:"none"}}}},MuiOutlinedInput:{styleOverrides:{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:{styleOverrides:{outlined:{padding:"3px 11px",[`&.${vs.focusVisible}`]:{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`}},contained:{color:e.palette.text.primary,padding:"3px 11px",border:`1px solid ${e.palette.btn.border}`,backgroundColor:e.palette.btn.normal,boxShadow:"none",[`&.${vs.focusVisible}`]:{borderColor:e.palette.custom.focusBorder,boxShadow:`0 0 0 2px ${e.palette.custom.focusOutline}`},"&:hover":{backgroundColor:e.palette.btn.hover,borderColor:e.palette.btn.borderHover,boxShadow:"none",[`&.${vs.disabled}`]:{backgroundColor:e.palette.btn.disabled}},"&.Mui-active":{boxShadow:"none",backgroundColor:e.palette.btn.active},[`&.${vs.disabled}`]:{backgroundColor:e.palette.btn.disabled}}}},MuiAccordionSummary:{styleOverrides:{content:{margin:"8px 0"}}}});function Ls(e){let t=ks,n="";"string"==typeof e&&(n=e,"light"!==e&&"dark"!==e?console.warn(`Invalid theme: '${e}'`):"dark"===e&&(t=xs));const r=JSON.stringify(t);if(Cs[r])return Cs[r];const o={palette:Z(Z({type:t.mode},Ss.palette),t.palette),typography:Z({},Ss.typography),shadows:Ss.shadows,shape:Z({},Ss.shape)},i=Z(Z({},o),{},{components:Es(o)});return Cs[r]=Ya(i),Cs[r].name=n,Cs[r]}Oo.configure(e=>`njs-1c83-${e.replace("Mui","")}`);var Rs=t.createContext({language:null,theme:null,translator:null,constraints:{},interactions:{},themeApi:null,modelStore:{},selectionStore:{},hostConfig:null,queryParams:null});const Ts={active:!0,select:!0,passive:!0,edit:!1};function qs(e){const t={},n={},r=function(e){const{constraints:t={},interactions:n={}}=e;if(Object.keys(n).length>0)return n;const r={};return Object.keys(t).forEach(e=>{r[e]=!t[e]}),r}(e);Object.keys(Ts).forEach(e=>{void 0!==r[e]?(t[e]=r[e],n[e]=!r[e]):(t[e]=Ts[e],n[e]=!Ts[e])}),e.constraints=n,e.interactions=t}var Ps=(e={},t=()=>{})=>{const o=e,i=[],a={},s={get:e=>o[e],set:(e,n)=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);return o[e]=n,a[e]=t({type:"SET",value:n}),n},clear:e=>{if(void 0===e||"object"==typeof e)throw new Error(`Invalid key: ${JSON.stringify(e)}`);o[e]=null},dispatch:e=>{i.forEach(t=>t(e?{}:o))},destroy:()=>{Object.keys(a).forEach(e=>{a[e]&&a[e]()})}};return[()=>{const[,e]=n(o);return r(()=>(i.push(e),()=>{const t=i.indexOf(e);i.splice(t,1)}),[e]),[s]},s]};const Is=o(({initialContext:e,renderCallback:t,modelStore:o,selectionStore:s},l)=>{const[c,u]=n(e),[d,f]=n(),{theme:p}=i(()=>({theme:Ls(d)}),[d]),[h,m]=n([]);return r(()=>{t&&t()},[]),a(l,()=>({setComps(e){m([...e])},setMuiThemeName:f,setContext:e=>u(t=>JSON.stringify(t)!==JSON.stringify(e)?e:t)}),[]),c&&(c.modelStore=o,c.selectionStore=s),or.jsx(lr,{injectFirst:!0,children:or.jsx(us,{theme:p,children:or.jsx(Rs.Provider,{value:c,children:h})})})});function _s({app:e,context:n}){let r,o=!1;const i=new Promise(e=>{r=e}),a=t.createRef(),s=document.createElement("div");s.style.display="none",s.setAttribute("data-nebulajs-version","7.4.0"),s.setAttribute("data-app-id",e.id),document.body.appendChild(s),n&&qs(n);const l=function(e){const[t,n]=Ps({}),[r,o]=Ps({}),[i,a]=Ps({}),[s,l]=Ps({}),[c,u]=Ps({}),[,d]=Ps({}),f=({type:e,value:t})=>{const r=d.get(t.id);d.set(t.id,{});const i=()=>{o.clear(t.id),u.set(t.id,{}),u.dispatch(!0)},s=()=>{t.removeListener("closed",s),t.removeListener("changed",i),n.clear(t.id),o.clear(t.id),a.clear(t.id),l.clear(t.id),u.clear(t.id),d.clear(t.id)};return"SET"===e&&(r||(t.on("changed",i),t.once("closed",s))),s},[p,h]=Ps({},f);return{subscribe:e=>{const t=f({type:"SET",value:e});return()=>{t(),h.clear(e.id)}},destroy:()=>{h.destroy()},useModelStore:p,modelStore:h,useModelChangedStore:c,useRpcResultStore:t,rpcResultStore:n,useRpcRequestStore:r,rpcRequestStore:o,useRpcRequestModelStore:s,rpcRequestModelStore:l,useRpcRequestSessionModelStore:i,rpcRequestSessionModelStore:a,modelChangedStore:u,appId:e}}(e.id),c=function(e){const[t,n]=Ps({}),[r,o]=Ps({}),[i,a]=Ps({});return{useAppSelectionsStore:t,useAppModalStore:r,appSelectionsStore:n,appModalStore:o,useModalObjectStore:i,modalObjectStore:a,appId:e}}(e.id),u=jt.createRoot(s);u.render(or.jsx(Is,{ref:a,initialContext:n,renderCallback:r,modelStore:l,selectionStore:c}));const d={},f=[],p=[];return[{toggleFocusOfCells(e){Object.keys(d).forEach(t=>{var n;null===(n=d[t].current)||void 0===n||n.toggleFocus(t===e)})},cells:d,addCell(e,t){d[e]=t},removeCell(e){delete d[e]},add:(e,t)=>(async n=>{await i,p.push(e),f.push(t),null==a||null===(n=a.current)||void 0===n||n.setComps(p)})(),remove(e){o||(async t=>{await i;const n=p.indexOf(e);var r;-1!==n&&(null===(r=f[n])||void 0===r||r.call(f),p.splice(n,1),f.splice(n,1));null==a||null===(t=a.current)||void 0===t||t.setComps(p)})()},setMuiThemeName(e){(async t=>{await i,null==a||null===(t=a.current)||void 0===t||t.setMuiThemeName(e)})()},context(e){(async t=>{await i,e&&qs(e),null==a||null===(t=a.current)||void 0===t||t.setContext(e)})()},destroy(){o=!0,f.forEach(e=>{e&&e()}),l.destroy(),u.unmount(),document.body.removeChild(s)}},l,c,a,i]}function Os(){const{useModelStore:e}=s(Rs).modelStore;return e()}function Ds(e,t,...o){const i=t?`${t.id}/${JSON.stringify(e)}`:null,[a]=Os(),[l]=function(){const{useRpcRequestSessionModelStore:e}=s(Rs).modelStore;return e()}(),[c,u]=n();return r(()=>{if(!t)return;(async()=>{let n=l.get(i);n||(n=t.createSessionObject(e),l.set(i,n));const r=await n;a.set(i,r),u(r)})()},[t,...o]),[c]}const As={qInfo:{qType:"current-selections"},qSelectionObjectDef:{qStateName:"$"},alternateStates:[]};function Ns(e){return Ds(As,e)}const js=(e,t)=>{const{rpcResultStore:n,key:r,method:o}=t;let i;switch(t.type){case"INVALID":i=Z(Z({},e),{},{valid:!1,invalid:!0,validating:!0,canCancel:!0,canRetry:!1,rpcRetry:!1});break;case"VALID":i={result:Z({},t.result),invalid:!1,valid:!0,validating:!1,canCancel:!1,canRetry:!1,rpcRetry:!1};break;case"CANCELLED":i=Z(Z({},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 Ms(e,t){const n=e?`${e.id}`:null,[o]=function(){const{useRpcResultStore:e}=s(Rs).modelStore;return e()}(),[i,a]=l(js,n?o.get(n):null),[c]=function(){const{useModelChangedStore:e}=s(Rs).modelStore;return e()}(),[u]=function(){const{useRpcRequestStore:e}=s(Rs).modelStore;return e()}();let d;n&&(d=u.get(n),d||(d={},u.set(n,d)));const f=async r=>{let i=d[t];if(!i||i&&i.rpcRetry){i={rpc:e[t](),rpcRetry:!1},d[t]=i,a({type:"INVALID",method:t,key:n,model:e,rpcResultStore:o,canCancel:!0})}try{await(s=0,new Promise(e=>{setTimeout(e,s)}));const r=await i.rpc;a({type:"VALID",result:r,key:n,method:t,model:e,rpcResultStore:o})}catch(e){15!==e.code||r||(i.rpcRetry||(i.rpcRetry=!0),f(!0))}var s},p={cancel:async()=>{const r=e.session.getObjectApi({handle:-1});await r.cancelRequest(d[t].rpc.requestId),a({type:"CANCELLED",key:n,method:t,model:e,rpcResultStore:o})},retry:()=>{d[t].rpcRetry=!0,f()}};return r(()=>{e&&f()},[e,c.get(e&&e.id),n,t]),[i&&i.result,{validating:i&&i.validating,canCancel:i&&i.canCancel,canRetry:i&&i.canRetry},p]}function $s(e){const[t,{validating:n,canCancel:r,canRetry:o},i]=Ms(e,"getLayout");return null!=e&&e.pureLayout&&t?[e.pureLayout,{validating:n,canCancel:r,canRetry:o},i]:[t,{validating:n,canCancel:r,canRetry:o},i]}function zs(e){return Ms(e,"getAppLayout")}function Fs(){const[e,t]=n(),[r,o]=n(),i=c(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 u(()=>{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]}const Bs="singlepublic-pinnedItems",Us=e=>{var t;const[o]=(e=>{const[t,o]=n(null),[i,a]=n(null),[s]=Os();return r(()=>{let t=!0,n=()=>{};if(e)return async function(){try{const r=`${e.id}-${Bs}`;let i=s.get(r);if(!i){if(i=await(async(e,t)=>{var n;const r=!(null===(n=(await e.getLayout()).permissions)||void 0===n||!n.createMasterobject);let o=null;try{o=r?await e.getOrCreateObject({qInfo:{qType:"singlepublic",qId:t}}):await e.getObject(t)}catch(e){}return o})(e,Bs),!t)return;if(i){s.set(r,i);const e=()=>{s.clear(r)};i.once("closed",e),n=()=>{i.removeListener("closed",e)}}}t&&(a(null),o(i))}catch(e){t&&(a(e instanceof Error?e:new Error(String(e))),o(null))}}(),()=>{t=!1,n()}},[e,s]),[t,i]})(e),[i]=Ms(o,"getLayout");return[null!==(t=null==i?void 0:i.pinnedItems)&&void 0!==t?t:[]]},Ws=(e,t,o)=>{const[i,a]=n(void 0),[s,l]=n(void 0),[c]=Os();return r(()=>{let n=!0,r=()=>{};if("function"==typeof(null==e?void 0:e.getObject))return async function(){try{const i=`${e.id}-${t}`;let s=c.get(i);if(!s){try{s=await e.getObject(t)}catch(t){if(2!==t.code||"Object not found"!==t.message||!o)throw t;s=await e.createSessionObject(o)}if(!n)return;c.set(i,s);const a=()=>{c.clear(i)};s.once("closed",a),r=()=>{s.removeListener("closed",a)}}n&&(l(void 0),a(s))}catch(e){n&&(l(e instanceof Error?e:new Error(String(e))),a(void 0))}}(),()=>{n=!1,r()}},[e,t,c]),[i,s]},Hs={qInfo:{qId:"FieldList",qType:"FieldList"},qFieldListDef:{qShowSystem:!1,qShowHidden:!1,qShowSrcTables:!0,qShowSemantic:!0,qShowDerivedFields:!0}},Vs={qInfo:{qId:"DimensionList",qType:"DimensionList"},qDimensionListDef:{qType:"dimension",qData:{title:"/qMetaDef/title",tags:"/qMetaDef/tags",grouping:"/qDim/qGrouping",info:"/qDimInfos",labelExpression:"/qDim/qLabelExpression"}}},Gs="qField",Ks="id",Js=(e,t)=>{const n=e.selections[0],r=t.selections[0],o=!!n.qOneAndOnlyOne;return o===!!r.qOneAndOnlyOne?n.qSortIndex-r.qSortIndex:o?-1:1},Qs=(e,t,n,r)=>{if(!e||!r)return n;if(0===e.length||0===t.length&&0===n.length)return[];const o=((e,t,n)=>n.filter(n=>Gs in n&&n[Gs]?e.some(e=>e.qName===n[Gs]):!(!(Ks in n)||!n[Ks])&&t.some(e=>{var t,r;return(null===(t=e.qInfo)||void 0===t?void 0:t.qId)===n[Ks]&&"N"===(null===(r=e.qData)||void 0===r?void 0:r.grouping)})))(e,r,t),i=[],a=[...n];for(let e=0;e<o.length;e++){var s;const t=o[e],n=!(!(Ks in t)||!t[Ks]),l=n?r.find(e=>{var n;return(null===(n=e.qInfo)||void 0===n?void 0:n.qId)===t[Ks]}):null,c=n?null==l||null===(s=l.qData)||void 0===s||null===(s=s.info[0])||void 0===s?void 0:s.qName:t[Gs],u=a.findIndex(e=>{var r;return n&&(null===(r=e.selections[0].qDimensionReferences)||void 0===r||null===(r=r[0])||void 0===r?void 0:r.qId)===t[Ks]||!n&&(e.selections[0].qField===c||e.selections[0].qReadableName===c)});if(!(-1!==i.findIndex(e=>{var t;return(null===(t=e.selections)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.qField)===c&&!e.isPinned})))if(-1===u){const t=Z(Z({},o[e]),{},{isPinned:!0,states:["$"]});n&&l&&(t.qField=c,t.qName=l.qData.labelExpression||l.qData.title||c),i.push(t)}else i.push(a[u]),a.splice(u,1)}return[...i,...a]};function Zs(e){return"large"===e?"20px":"small"===e?"12px":"16px"}function Xs({size:e,style:t={},viewBox:n="0 0 16 16",shapes:r=[]}){const o=Z({fontSize:Zs(e),display:"inline-block",fontStyle:"normal",lineHeight:"0",textAlign:"center",textTransform:"none",verticalAlign:"-.125em",textRendering:"optimizeLegibility",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"},t);return or.jsx("i",{style:o,children:or.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:n,fill:"currentColor",children:r.map(({type:e,attrs:t},n)=>or.jsx(e,Z({},t),n))})})}var Ys=e=>Xs((e=>Z(Z({},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 el=e=>Xs((e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M8 10a1 1 0 0 1 .5 1.866v.634a.5.5 0 0 1-1 0v-.634A1 1 0 0 1 8 10ZM3.625 7.035A2 2 0 0 0 2 9v5a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9a2 2 0 0 0-1.625-1.965V5.383a4.375 4.375 0 0 0-8.75 0v1.652ZM3 9a1 1 0 0 1 .931-.998h8.138A1 1 0 0 1 13 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9Zm8.375-3.617V7h-6.75V5.383a3.375 3.375 0 0 1 6.75 0Z"}}]}))(e));const tl=e=>Z(Z({},e),{},{viewBox:"0 0 12 16",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"}}]});var nl=e=>Xs(tl(e));var 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=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},il=function(){function e(){var t,n,r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);for(var o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return n=r=ol(this,(t=e.__proto__||Object.getPrototypeOf(e)).call.apply(t,[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},ol(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)}(e,d),rl(e,[{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 f=a[0]-1;if(t(f))break;a[0]=f}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)}}]),e}();const al=["S","XS"],sl=e=>e.reduce((e,t)=>e.concat(t));function ll(e){if(!e||!e.length)return[];const t=e.map(e=>{const t=e.qMatrix.map(e=>{const[t]=e;return n=t.qState,!!al.includes(n)&&t.qElemNumber;var n});return t.filter(e=>!1!==e)});return sl(t)}async function cl({selections:e,elemNumbers:t,toggle:n,isSingleSelect:r}){if(0===t.length)return!1;let o=!1;if(!t.some(e=>Number.isNaN(e))){const i=t;try{o=!1!==await e.select({method:"selectListObjectValues",params:["/qListObjectDef",i,n]})}catch(e){o=!1}o||(r?e.cancel():e.clear())}return o}const ul="RowColumn",dl={row:`${ul}-row`,rowBorderBottom:`${ul}-rowBorderBottom`,column:`${ul}-column`,fieldRoot:`${ul}-fieldRoot`,cell:`${ul}-cell`,labelText:`${ul}-labelText`,labelDense:`${ul}-labelDense`,highlighted:`${ul}-highlighted`,checkboxLabel:`${ul}-checkboxLabel`,icon:`${ul}-icon`,S:`${ul}-S`,XS:`${ul}-XS`,A:`${ul}-A`,X:`${ul}-X`,frequencyCount:`${ul}-frequencyCount`,barContainer:`${ul}-barContainer`,bar:`${ul}-bar`,barSelected:`${ul}-barSelected`,barWithCheckbox:`${ul}-barWithCheckbox`,barSelectedWithCheckbox:`${ul}-barSelectedWithCheckbox`,excludedTextWithCheckbox:`${ul}-excludedTextWithCheckbox`},fl=`.${dl.fieldRoot}`,pl=e=>!(null!=e&&e.metaKey||null!=e&&e.ctrlKey);function hl({selectionState:e,selections:t,checkboxes:n=!1,doc:o=document,loaderRef:i}){var a;const s=f({startElemNumber:void 0,elemNumbers:[],isRange:!1,toggle:!1,active:!1,touchElemNumbers:[],touchRangeSmall:!1});r(()=>{var e;if(null===(e=i.current)||void 0===e||null===(e=e._listRef)||void 0===e||!e._outerRef)return;const t=e=>e.preventDefault(),n=e=>e.preventDefault(),r=e=>e.preventDefault(),o=i.current._listRef._outerRef;return o.addEventListener("gesturestart",t),o.addEventListener("gesturechange",n),o.addEventListener("gestureend",r),()=>{o.removeEventListener("gesturestart",t),o.removeEventListener("gesturechange",n),o.removeEventListener("gestureend",r)}},[null===(a=i.current)||void 0===a||null===(a=a._listRef)||void 0===a?void 0:a._outerRef]);const l=async()=>{var n;return(null===(n=e.selectDisabled)||void 0===n||!n.call(e))&&(e.setSelectableValuesUpdating(),cl({selections:t,elemNumbers:s.current.elemNumbers,isSingleSelect:e.isSingleSelect,toggle:s.current.toggle}))},u=(t,n)=>{const r=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 sl(t)}(e.enginePages);return function(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)}([t,n],r)},d=t=>{const{startElemNumber:n}=s.current;if(n===t)return;const r=u(s.current.startElemNumber,t);e.updateItems(r,!0,s.current.elemNumbers)},p=c(t=>{if(e.selectDisabled())return;const n=+t.target.getAttribute("data-n"),r=!e.isSingleSelect&&pl(t.nativeEvent);s.current.elemNumbers=[n],s.current.toggle=r,r||e.clearItemStates(!0),e.updateItem(n),s.current.active=!1,l()},[]),h=c(t=>{if(0!==t.button||e.selectDisabled())return;const n=+t.currentTarget.getAttribute("data-n"),r=!e.isSingleSelect&&pl(t);s.current.isRange=!1,s.current.startElemNumber=n,s.current.elemNumbers=[n],s.current.toggle=r,s.current.active=!0,r||e.clearItemStates(!0),e.updateItem(n),e.isSingleSelect&&(s.current.active=!1,l()),((e,t)=>{(e.ctrlKey||e.metaKey)&&(t.focus(),e.preventDefault())})(t,t.currentTarget)},[]),m=c(e=>{if(0===e.button&&s.current.active){if(s.current.active=!1,s.current.isRange){const t=+e.currentTarget.getAttribute("data-n");d(t)}l()}},[]),g=c(e=>{0===e.button&&s.current.active&&(s.current.active=!1,l())},[]),b=c(t=>{if(!s.current.active)return;s.current.isRange||(s.current.isRange=!0,e.isSelected(s.current.startElemNumber)||(e.updateItem(s.current.startElemNumber,!0),s.current.elemNumbers=[]));const n=+t.currentTarget.getAttribute("data-n");d(n)},[]),y=c(t=>{var n,r;if(s.current.active||s.current.isRange||e.isSingleSelect||t.touches.length<=1)return;if(t.touches.length>2)return void l();const o=Number(null===(n=t.touches[0].target)||void 0===n||null===(n=n.closest(fl))||void 0===n?void 0:n.getAttribute("data-n")),i=Number(null===(r=t.touches[1].target)||void 0===r||null===(r=r.closest(fl))||void 0===r?void 0:r.getAttribute("data-n"));if(Number.isNaN(o)||Number.isNaN(o))return void l();s.current.active=!0;u(o,i).length<7&&(s.current.touchRangeSmall=!0),s.current.elemNumbers=[],s.current.touchElemNumbers=[o,i]},[]),v=c(()=>{if(2!==s.current.touchElemNumbers.length)return;if(s.current.touchRangeSmall)return s.current.touchRangeSmall=!1,s.current.touchElemNumbers=[],void(s.current.active=!1);const[e,t]=s.current.touchElemNumbers;s.current.startElemNumber=e,d(t),s.current.touchElemNumbers=[],s.current.active=!1,s.current.toggle=!0,l()},[]);r(()=>(o.addEventListener("mouseup",g),()=>{o.removeEventListener("mouseup",g)}),[g]),r(()=>{const n=()=>{e.clearItemStates(!1)},r=()=>{e.clearItemStates(!0),e.triggerStateChanged()};return t.on("clearItemStates",n),t.on("deactivated",n),t.on("cleared",r),()=>{t.removeListener("clearItemStates",n),t.removeListener("deactivated",n),t.removeListener("cleared",r)}},[t]);const S={};return n?Object.assign(S,{onChange:p}):Object.assign(S,{onMouseUp:m,onMouseDown:h,onMouseEnter:b,onTouchStart:y,onTouchEnd:v}),{interactionEvents:S,select:async(n=[],r=!1,o=void 0)=>{var i;if(null!==(i=e.selectDisabled)&&void 0!==i&&i.call(e))return!1;const a=!e.isSingleSelect&&pl(null==o?void 0:o.nativeEvent);a||e.clearItemStates(!0);const s=[];return e.updateItems(n,r,s),e.setSelectableValuesUpdating(),cl({selections:t,elemNumbers:r?s:n,isSingleSelect:e.isSingleSelect,toggle:a})}}}const ml=e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M6,10 L13,3 L15,5 L8,12 L6,14 L1,9 L3,7 L6,10 Z"}}]});var gl=e=>Xs(ml(e));const bl=e=>e?"X"===e.qState||"XS"===e.qState||"XL"===e.qState:null,yl=({cell:e,checkboxes:t})=>((e=>e?"A"===e.qState:null)(e)||bl(e))&&t;const vl=({column:e,histogram:t,cell:n,showGray:r})=>{if(!n)return[];const o=[e?dl.column:dl.row];t||o.push(dl.rowBorderBottom);const i=function({cell:e,showGray:t}){let n;switch(e.qState){case"XS":n=t?dl.XS:dl.S;break;case"S":case"L":n=dl.S;break;case"A":n=!!t&&dl.A;break;case"X":case"XL":n=!!t&&dl.X;break;default:n=!1}return n}({cell:n,showGray:r});return i&&o.push(i),o},Sl=e=>e.filter(e=>!!e).join(" ").trim(),wl=e=>e||"-",kl=["backgroundColor"],xl=({sizes:e,frequencyMode:t,isGridMode:n,freqHitsValue:r})=>{if("P"===t)return`${e.freqMinWidth}px`;return n&&!r?"max-content":"25%"},Cl=({sizes:e,frequencyMode:t,isGridMode:n})=>n?"max-content":"P"===t?e.freqMinWidth:e.freqMaxWidth,El=({checkboxes:e,styles:t,selectionState:n})=>{if(e)return"selected"===n?{[`& .${dl.labelText}`]:{color:t.selections.selected}}:{};const r=t.selections,o=r[n],i=r[`${n}Contrast`];return{background:o,color:i,"& $cell":{paddingRight:0},[`& .${dl.labelText}`]:{color:i},[`& .${dl.icon}`]:{color:i}}},Ll={width:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},Rl=ns("div",{shouldForwardProp:e=>!["checkboxes","isGridMode","isGridCol","dense","direction","sizes","frequencyMode","freqHitsValue","layout","styles"].includes(e)})(({theme:e,checkboxes:t,isGridMode:n,isGridCol:r,dense:o,direction:i,sizes:a,frequencyMode:s,freqHitsValue:l,styles:c})=>{const u=c.content,{backgroundColor:d}=u,f=X(u,kl),p=El({styles:c,checkboxes:t,selectionState:"selected"}),h=El({styles:c,checkboxes:t,selectionState:"excluded"}),m={height:"100%",transition:"width 0.2s",border:"1px solid",borderColor:"#D9D9D9",backgroundColor:"#FAFAFA"},g={opacity:"30%"};return{"& .value":{"&:focus-visible":{boxShadow:`inset 0 0 0 2px ${e.palette.custom.newFocusBorder} !important`,borderRadius:"4px",outline:"none"}},[`& .${dl.row}`]:Z({flexWrap:"nowrap"},c.content),[`& .${dl.rowBorderBottom}`]:{borderBottom:r?"none":`1px solid ${e.palette.divider}`,borderLeft:r?`1px solid ${e.palette.divider}`:"none"},[`& .${dl.column}`]:Z({flexWrap:"nowrap",borderRight:`1px solid ${e.palette.divider}`},c.content),[`& .${dl.cell}`]:{zIndex:2,display:"flex",alignItems:"center",flexGrow:1,minWidth:t?"52px":"26px",flexBasis:t?"auto":"max-content",paddingLeft:"9px",paddingRight:0},[`& .${dl.labelText}`]:Z(Z({lineHeight:"24px",userSelect:"none",paddingRight:"1px"},Ll),f),[`& .${dl.labelDense}`]:{lineHeight:"18px"},[`& .${dl.highlighted}`]:{backgroundColor:"#FFC72A"},[`& .${dl.checkboxLabel}`]:{margin:0,width:"100%",height:"100%",overflow:"hidden","& > span:nth-of-type(1)":{paddingRight:"8px"},"& > span:nth-of-type(2)":Z(Z({},Ll),{},{display:"flex",alignItems:"center",paddingLeft:0,paddingRight:"2px"})},[`& .${dl.icon}`]:{display:"flex",justifyContent:"center",width:24,minWidth:24,maxWidth:24,color:f.color},[`& .${dl.S}`]:Z(Z({},p),{},{"&:focus-visible":{boxShadow:`inset 0 0 0 2px ${e.palette.custom.newFocusBorder}, inset 0 0 0 4px ${e.palette.custom.whiteBorder} !important`,borderRadius:"4px",outline:"none"},border:n?"none":void 0}),[`& .${dl.XS}`]:Z(Z({},El({styles:c,checkboxes:t,selectionState:"selectedExcluded"})),{},{border:n?"none":void 0}),[`& .${dl.A}`]:Z(Z({},El({styles:c,checkboxes:t,selectionState:"alternative"})),{},{border:n?"none":void 0}),[`& .${dl.X}`]:Z(Z({},h),{},{border:n?"none":void 0}),[`& .${dl.X}, & .${dl.XS}`]:{border:n?"none":void 0,[`& .${dl.barSelected} .bar-filled`]:Z({},m)},[`& .${dl.frequencyCount}`]:Z(Z({zIndex:3,justifyContent:"flex-end"},Ll),{},{flex:`0 0 ${xl({sizes:a,frequencyMode:s,isGridMode:n,freqHitsValue:l})}`,minWidth:!n&&"P"!==s&&l?a.freqMinWidth:"max-content",maxWidth:Cl({sizes:a,frequencyMode:s,isGridMode:n}),textAlign:"rtl"===i?"left":"right",paddingLeft:"rtl"!==i?"8px":0}),[`&.${dl.barContainer}`]:{height:"100%",display:"flex",alignItems:"center"},[`& .${dl.bar}`]:{height:o?"16px":"20px",position:"absolute",zIndex:1,alignSelf:"center",left:4,width:"calc(100% - 8px)",display:"flex",alignItems:"center","& .bar-filled":Z({},m)},[`& .${dl.barSelected}`]:{"& .bar-filled":Z({},g)},[`& .${dl.barWithCheckbox}`]:{left:"rtl"===i?4:29,width:"calc(100% - 33px)"},[`& .${dl.barSelectedWithCheckbox}`]:{"& .bar-filled":Z(Z({},g),{},{backgroundColor:c.selections.selected||"#BFE5D0",borderColor:c.selections.selected})},[`& .${dl.excludedTextWithCheckbox}`]:{color:c.content.color,fontStyle:"italic"}}});var Tl=t.memo(Rl);const ql="ListBoxCheckbox",Pl={cbIcon:`${ql}-cbIcon`,cbIconChecked:`${ql}-cbIconChecked`,cbIconExcluded:`${ql}-cbIconExcluded`,cbIconAlternative:`${ql}-cbIconAlternative`,checkbox:`${ql}-checkbox`,dense:`${ql}-dense`},Il=ns(S,{shouldForwardProp:e=>"styles"!==e})(({styles:e})=>({[`& .${Pl.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"},[`& .${Pl.cbIconChecked}`]:{borderRadius:3,backgroundColor:e.selections.selected,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:'""'}},[`& .${Pl.cbIconExcluded}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.excluded},[`& .${Pl.cbIconAlternative}`]:{borderRadius:2,width:12,height:12,backgroundColor:e.selections.alternative},[`&.${Pl.checkbox}`]:{margin:0,"&:hover":{backgroundColor:"inherit !important"}},[`&.${Pl.dense}`]:{padding:"4px 8px"}})),_l=(e,t=!0,n=!1)=>or.jsx("span",{className:e.cbIcon,children:n&&or.jsx("span",{className:t&&n?e.cbIconExcluded:""})});function Ol({onChange:e,checked:t,label:n,dense:r,excluded:o,styles:i,showGray:a=!0,dataN:s}){return or.jsx(Il,{edge:"start",onChange:e,checked:t,disableRipple:!0,className:[Pl.checkbox,r&&Pl.dense].filter(Boolean).join(" "),inputProps:{"aria-labelledby":n,"data-n":s},name:n,icon:_l(Pl,a,o),checkedIcon:or.jsx("span",{className:Pl.cbIconChecked}),styles:i})}const Dl={radioButton:"ListBoxRadioButton-radioButton"},Al=ns(w,{shouldForwardProp:e=>!["dense","styles"].includes(e)})(({checked:e,styles:t,dense:n})=>({[`&.${Dl.radioButton}`]:{right:"5px",color:e?t.selections.selected:t.content.color,padding:n?"0px 0px 0px 12px":void 0,backgroundColor:"transparent"}}));function Nl({onChange:e,checked:t,label:n,dense:r,dataN:o,styles:i}){return or.jsx(Al,{checked:t,onChange:e,value:n,name:n,className:Dl.radioButton,inputProps:{"data-n":o},disableRipple:!0,size:r?"small":"medium",dense:r,styles:i})}function jl({label:e,dense:t,showGray:n=!0,checkboxes:r,cell:o,valueTextAlign:i}){return or.jsx(k,{component:"span",variant:"body2",className:Sl([dl.labelText,t&&dl.labelDense,n&&yl({cell:o,checkboxes:r})&&dl.excludedTextWithCheckbox]),align:i,dir:"auto",children:or.jsx("span",{children:e})})}function Ml({label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}){return"string"==typeof e?or.jsx(jl,{label:e,color:t,dense:n,showGray:r,checkboxes:o,cell:i,valueTextAlign:a}):e}function $l({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}){const f=or.jsx(Ol,{onChange:e,label:t,checked:r,dense:o,excluded:bl(i),isGridCol:a,showGray:s,dataN:n,styles:d}),p=or.jsx(Nl,{onChange:e,label:t,checked:r,dense:o,dataN:n,styles:d});return or.jsx(x,{control:l?p:f,className:dl.checkboxLabel,label:or.jsx(Ml,{label:t,dense:o,showGray:s,checkboxes:c,cell:i,valueTextAlign:u})},n)}function zl({labels:e,dense:t,showGray:n,checkboxes:r}){const o=e.map(([e,t],n)=>or.jsx("span",{id:n,className:t?dl.highlighted:"",children:e}));return or.jsx(jl,{label:o,dense:t,showGray:n,checkboxes:r})}function Fl({onChange:e,labels:t,checkboxes:n,dense:r,showGray:o,qElemNumber:i,isSelected:a,cell:s,isGridCol:l,isSingleSelect:c,valueTextAlign:u,styles:d}){const f=or.jsx(zl,{labels:t,dense:r,showGray:o,checkboxes:n});return n?or.jsx($l,{onChange:e,label:f,qElemNumber:i,isSelected:a,dense:r,cell:s,isGridCol:l,showGray:o,isSingleSelect:c,checkboxes:n,valueTextAlign:u,styles:d}):f}var Bl=t.memo(function({onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}){return c?or.jsx($l,{onChange:e,label:t,qElemNumber:n,isSelected:r,dense:o,cell:i,isGridCol:a,showGray:s,isSingleSelect:l,checkboxes:c,valueTextAlign:u,styles:d}):or.jsx(jl,{label:t,dense:o,showGray:!0,checkboxes:c,cell:i,valueTextAlign:u})});function Ul({qFrequency:e,histogram:t,checkboxes:n,isSelected:r,frequencyMax:o}){if(!(e&&t&&"-"!==wl(e)))return;const i=(({qFrequency:e,frequencyMax:t})=>{const n=String(e),r="%"===n.substring(n.length-1),o=parseFloat(r?n:e);return`${r?o:o/t*100}%`})({qFrequency:e,frequencyMax:o});return or.jsx(C,{className:Sl([dl.bar,n&&dl.barWithCheckbox,r&&(n?dl.barSelectedWithCheckbox:dl.barSelected)]),children:or.jsx(C,{className:"bar-filled",width:i})})}function Wl({cell:e,checkboxes:t,dense:n,showGray:r}){const o=wl(null==e?void 0:e.qFrequency);return or.jsx(E,{style:{display:"flex",alignItems:"center"},className:dl.frequencyCount,"aria-label":o,title:o,children:or.jsx(k,{noWrap:!0,color:"inherit",variant:"body2",className:Sl([n&&dl.labelDense,dl.labelText,r&&yl({cell:e,checkboxes:t})&&dl.excludedTextWithCheckbox]),children:o})})}function Hl({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:r}){if("singleColumn"===e)return{height:"100%",width:"100%"};switch(t){case"row":case"column":return{height:r?"100%":`calc(100% - ${n}px)`,width:`calc(100% - ${2*n}px)`,position:"absolute",left:4};default:return{}}}const Vl=ns(E,{shouldForwardProp:e=>!["dataLayout","layoutOrder","itemPadding","cellPaddingRight","direction","fillHeight"].includes(e)})(({dataLayout:e,layoutOrder:t,itemPadding:n,cellPaddingRight:r,direction:o,fillHeight:i})=>{const a="padding"+("rtl"===o?"Left":"Right");return{[`&.${dl.fieldRoot}`]:Z(Z({},Hl({dataLayout:e,layoutOrder:t,itemPadding:n,fillHeight:i})),{},{[a]:r?"8px":void 0})}});const Gl=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===Gl.ARROW_UP||e===Gl.ARROW_DOWN||e===Gl.ARROW_LEFT||e===Gl.ARROW_RIGHT});function Kl(e){null==e||e.querySelectorAll(".last-focused").forEach(e=>{e.classList.remove("last-focused")})}function Jl(e){return(null==e?void 0:e.closest(".njs-cell"))||(null==e?void 0:e.closest(".qv-gridcell"))||(null==e?void 0:e.closest(".qv-gs-listbox"))}function Ql({containerRef:e,enabled:t}){const[r,o]=n(!1),i={enabled:t,active:r,innerTabStops:!t||r,blur(n){var r;if(!t)return;o(!1);const i=Jl(e.current)||(null===(r=e.current)||void 0===r?void 0:r.parentElement);var a;null==(a=e.current)||a.querySelectorAll('[tabIndex="0"]').forEach(e=>{e.setAttribute("tabIndex",-1)}),Kl(e.current),n&&i&&(i.setAttribute("tabIndex",0),e.current.setAttribute("tabIndex",-1),i.focus())},focus(){if(!t)return;o(!0);const n=e.current,r=null==n?void 0:n.querySelector(".search input"),i=null==n?void 0:n.querySelector(".value.last-focused"),a=null==n?void 0:n.querySelector(".value.selector, .value"),s=null==n?void 0:n.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm"),l=null==n?void 0:n.querySelector("#listbox-unlock-button"),c=(null==n?void 0:n.querySelector(".listbox-cyclic-button"))||r||i||a||l||s;null==c||c.setAttribute("tabIndex",0),null==c||c.focus()},focusSelection(){const e=document.querySelector("#listbox-unlock-button"),t=document.querySelector(".actions-toolbar-default-actions .actions-toolbar-confirm:not(:disabled)"),n=e||t;return null==n||n.setAttribute("tabIndex",0),null==n||n.focus(),n}};return i}const Zl=e=>+e.getAttribute("data-n"),Xl=e=>{const t=null==e?void 0:e.querySelector(".search input");return null==t||t.focus(),t},Yl=e=>{const t=null==e?void 0:e.querySelector(".value.last-focused"),n=null==e?void 0:e.querySelector(".value.selector"),r=null==e?void 0:e.querySelector(".value"),o=t||n||r;return null==o||o.setAttribute("tabIndex",0),null==o||o.focus(),Kl(e),o},ec=e=>{const t=null==e?void 0:e.querySelector(".listbox-cyclic-button:not(:disabled)");return null==t||t.setAttribute("tabIndex",0),null==t||t.focus(),t},tc=(e,t)=>{if(!t.enabled)return;const{currentTarget:n,target:r}=e,o=r.classList.contains("listbox-container"),i=n.closest(".listbox-container"),a=Jl(i),s=1===(null==a?void 0:a.querySelectorAll(".listbox-container").length);if(o||s)t.blur(!0);else{Kl(i),n.classList.add("last-focused"),t.blur();const e=n.closest(".listbox-container");e.setAttribute("tabIndex",-1),null==e||e.focus()}};function nc({select:e,selectAll:t,onCtrlF:n,confirm:r,cancel:o,setScrollPosition:i,focusListItems:a,keyboard:s,isModal:l,rowCount:c,columnCount:u,rowIndex:d,columnIndex:f,layoutOrder:p}){const h=(e,t,n=!1)=>{if(e===Gl.ARROW_LEFT||e===Gl.ARROW_RIGHT||"number"!=typeof d||"number"!=typeof f){const e=null==t?void 0:t.parentElement[n?"nextElementSibling":"previousElementSibling"];return null==e?void 0:e.querySelector("[role]")}const r=null==t?void 0:t.parentElement.parentElement,o=null==r?void 0:r.childElementCount;if(o){const n=(({rowIndex:e,columnIndex:t,rowCount:n,columnCount:r,layoutOrder:o,keyCode:i,numCells:a})=>{const s=e=>{let t;return"row"===o?(t=a%r,e<t?n:n-1):(t=a%n,e<r-1?n:t)};let l=e,c=t;if(i===Gl.ARROW_DOWN)if(e>=s(t)-1){if(t===r-1)return-1;l=0,c=t+1}else l=e+1;else if(0===e){if(0===t)return-1;l=s(t-1)-1,c=t-1}else l=e-1;if("row"===o)return l*r+c;const u=a%n;return 0===u||l<u?l*r+c:(l-u)*(r-1)+c+u*r})({rowIndex:d,columnIndex:f,rowCount:c,columnCount:u,layoutOrder:p,keyCode:e,numCells:o}),r=null==t?void 0:t.parentElement.parentElement.children[n];return null==r?void 0:r.querySelector("[role]")}};let m=!1;const g=e=>{m=e};return c=>{let u;const{currentTarget:d,nativeEvent:f}=c,{keyCode:p,shiftKey:b=!1,ctrlKey:y=!1,metaKey:v=!1}=f;switch(p){case Gl.TAB:{const e=d.closest(".listbox-container"),t=void 0!==l?l():void 0;d.classList.add("last-focused");if(!(null!=s&&s.enabled)){if(!t)return;return s.focusSelection(),c.preventDefault(),void c.stopPropagation()}if(b){Xl(e)||ec(e)||(t?s.focusSelection():tc(c,s));break}s.focusSelection()||ec(e)||Xl(e)||(d.blur(),tc(c,s));break}case Gl.SHIFT:g(!0);break;case Gl.SPACE:e([Zl(d)],!1,c);break;case Gl.ARROW_DOWN:case Gl.ARROW_RIGHT:u=h(p,d,!0),b&&u&&(m&&(e([Zl(d)],!0),g(!1)),e([Zl(u)],!0));break;case Gl.ARROW_UP:case Gl.ARROW_LEFT:u=h(p,d,!1),b&&u&&(m&&(e([Zl(d)],!0),g(!1)),e([Zl(u)],!0));break;case Gl.ENTER:if(r(),void 0===l)return;break;case Gl.ESCAPE:if(void 0===l)return void o();if(!l())return;o();break;case Gl.HOME:if(a.setFirst(!0),y){null==i||i("overflowStart");break}null==i||i("start");break;case Gl.END:if(a.setLast(!0),y){null==i||i("overflowEnd");break}null==i||i("end");break;case Gl.A:if(y||v){t();break}return;case Gl.F:if(y||v){n();break}return;default:return}u&&u.focus(),c.preventDefault(),c.stopPropagation()}}const rc={S:"Object.Listbox.Selected",A:"Object.Listbox.Alternative",O:"Object.Listbox.Optional",XS:"Object.Listbox.SelectedExcluded",L:"Object.Listbox.Locked",X:"Object.Listbox.Excluded",XL:"Object.Listbox.ExcludedLock"};function oc({index:e,rowIndex:t,columnIndex:o,style:a,data:s}){var l,u;const{onChange:d,onClick:f,onMouseDown:p,onMouseUp:h,onMouseEnter:m,onTouchStart:g,onTouchEnd:b,pages:y,isLocked:v,column:S=!1,checkboxes:w=!1,textAlign:k,direction:x,layoutOptions:C={},freqIsAllowed:L,isSingleSelect:R,actions:T,frequencyMax:q="",histogram:P=!1,keyboard:I,showGray:_=!0,showTick:O=!0,columnCount:D=1,rowCount:A=1,dataOffset:N,deducedFrequencyMode:j,focusListItems:M,listCount:$,sizes:z,translator:F,showSearch:B,isModal:U,contentFontStyle:W,styles:H,fillHeight:V}=s,{dense:G=!1,dataLayout:K="singleColumn",layoutOrder:J}=C,{itemPadding:Q}=z;let X,Y;const ee={max:null,currentIndex:null};if("number"==typeof t&&"number"==typeof o){"row"===J?(X=t*D+o,ee.max=A,ee.currentIndex=t):(X=o*A+t,ee.max=D,ee.currentIndex=o);const e=0;Y=Z(Z({},a),{},{height:V?"100%":a.height,left:e+(0===o?a.left:Number(a.left)+o*e),top:0===t?a.top:Number(a.top)+t*e})}else X=e,ee.max=$,ee.currentIndex=e,Y=Z({},a);X+=N;const[te,ne]=n(null);r(()=>{null!==te&&(0===ee.currentIndex&&M.first&&(te.focus(),M.setFirst(!1)),ee.currentIndex===ee.max-1&&M.last&&(te.focus(),M.setLast(!1)))},[te,M.first,M.last]);const re=c(nc(Z(Z({},T),{},{focusListItems:M,keyboard:I,isModal:U,rowCount:A,columnCount:D,rowIndex:t,columnIndex:o,layoutOrder:J})),[T,null==I?void 0:I.innerTabStops,A,D,t,o,J]),oe=i(()=>function({pages:e,cellIndex:t}){let n;const r=e.filter(e=>e.qArea.qTop<=t&&t<e.qArea.qTop+e.qArea.qHeight)[0];if(r){const e=r.qArea;t>=e.qTop&&t<e.qTop+e.qHeight&&([n]=r.qMatrix[t-e.qTop])}return n}({pages:y,cellIndex:X}),[y,X]),ie="S"===(null==oe?void 0:oe.qState)||"XS"===(null==oe?void 0:oe.qState)||"L"===(null==oe?void 0:oe.qState)||"XL"===(null==oe?void 0:oe.qState),ae=i(()=>vl({column:S,histogram:P,cell:oe,showGray:_}),[null==oe?void 0:oe.qState,P,G]),se=c(e=>{e.preventDefault()},[w]),le=i(()=>oe&&function({direction:e,cell:t,textAlign:n}){const r=!["NaN",void 0].includes(null==t?void 0:t.qNum);let o;return o=!n||n.auto?r?"rtl"===e?"left":"right":{rtl:"right",ltr:"left"}[e]:(null==n?void 0:n.align)||"left",["left","center","right"].includes(o)?o:"left"}({direction:x,cell:oe,textAlign:k}),[x,oe,k]);if(!oe)return null;const ce="grid"===K&&"column"===J,ue=null!==(l=null==oe?void 0:oe.qText)&&void 0!==l?l:"";let de;if(null!==(u=oe.qHighlightRanges)&&void 0!==u&&null!==(u=u.qRanges)&&void 0!==u&&u.length){const e=oe.qHighlightRanges.qRanges.sort((e,t)=>e.qCharPos-t.qCharPos)||[];de=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,n=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}(ue,e)}const fe={alignItems:"center",display:"flex",fontSize:"8px"},pe="rtl"===x,he={display:"flex",alignItems:"center",flexGrow:1,paddingLeft:pe?8:w?0:void 0,paddingRight:w?0:pe?8:0,justifyContent:le,textAlign:le},me=0===e,ge=ie&&v,be=!w&&ie&&!v,ye=!w&&O,ve=w||!O,Se=function({translator:e,label:t,qState:n,isSelected:r,currentIndex:o,maxIndex:i,showSearch:a}){const s=rc[n],l=e.get(s),c=[];if(r){const t=a?"Listbox.ScreenReader.SearchThenSelectionsMenu.WithAccSelMenu":"Listbox.ScreenReader.SelectionMenu.WithAccSelMenu",n=e.get(t);c.push(n)}const u=`${t} ${l}`,d=e.get("CurrentSelections.Of",[o+1,i+1]);return c.unshift(u,d),c.join(". ").trim()}({translator:F,label:ue,qState:oe.qState,currentIndex:ee.currentIndex,maxIndex:ee.max,showSearch:B}),we=!pe&&"right"===le||pe&&"left"===le;return or.jsx(Tl,{className:dl.barContainer,checkboxes:w,style:Y,styles:H,isGridCol:ce,isGridMode:"grid"===K,dense:G,direction:x,sizes:z,frequencyMode:j,freqHitsValue:we,contentFontStyle:W,"data-testid":"listbox.item",children:or.jsxs(Vl,{role:"row","aria-label":Se,"aria-selected":ie,"aria-setsize":ee.max,"aria-rowindex":ee.currentIndex,ref:ne,container:!0,dataLayout:K,cellPaddingRight:ve,layoutOrder:J,itemPadding:Q,gap:0,className:Sl(["value",dl.fieldRoot,...ae]),onClick:f,onMouseDown:p,onMouseUp:h,onMouseEnter:m,onKeyDown:re,onTouchStart:g,onTouchEnd:b,onContextMenu:se,tabIndex:me&&I.innerTabStops?0:-1,"data-n":null==oe?void 0:oe.qElemNumber,direction:x,fillHeight:V,children:[(null==oe?void 0:oe.qFrequency)&&or.jsx(Ul,{qFrequency:null==oe?void 0:oe.qFrequency,histogram:P,checkboxes:w,isSelected:ie,frequencyMax:q}),or.jsx(E,{style:he,className:Sl([dl.cell,dl.selectedCell]),title:`${ue}`,children:de?or.jsx(Fl,{onChange:d,labels:de,checkboxes:w,dense:G,showGray:_,qElemNumber:oe.qElemNumber,isSelected:ie,cell:oe,isGridCol:ce,isSingleSelect:R,valueTextAlign:le,styles:H}):or.jsx(Bl,{onChange:d,label:ue,qElemNumber:oe.qElemNumber,isSelected:ie,dense:G,cell:oe,isGridCol:ce,showGray:_,isSingleSelect:R,checkboxes:w,valueTextAlign:le,styles:H})}),L&&or.jsx(Wl,{cell:oe,checkboxes:w,dense:G,showGray:_}),ye&&or.jsxs(E,{className:dl.icon,children:[ge&&or.jsx(el,{style:fe,size:"small"}),be&&or.jsx(gl,{style:fe,size:"small"})]})]})})}var ic=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ac(e,t){return e===t||!(!ic(e)||!ic(t))}function sc(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ac(e[n],t[n]))return!1;return!0}function lc(e,t){var n;void 0===t&&(t=sc);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 cc="object"==typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function uc(e){cancelAnimationFrame(e.id)}function dc(e,t){var n=cc();var r={id:requestAnimationFrame(function o(){cc()-n>=t?e.call(null):r.id=requestAnimationFrame(o)})};return r}var fc=-1;function pc(e){if(void 0===e&&(e=!1),-1===fc||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),fc=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return fc}var hc=null;function mc(e){if(void 0===e&&(e=!1),null===hc||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?hc="positive-descending":(t.scrollLeft=1,hc=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),hc}return hc}var gc=function(e){var t=e.columnIndex;return e.data,e.rowIndex+":"+t};function bc(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,u=e.getRowHeight,f=e.getRowOffset,h=e.getRowStartIndexForOffset,m=e.getRowStopIndexForStartIndex,g=e.initInstanceProps,b=e.shouldResetStyleCacheOnItemSizeChange,y=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=g(r.props,ys(r)),r._resetIsScrollingTimeoutId=null,r._outerRef=void 0,r.state={instance:ys(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=lc(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=lc(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,d=r._getItemStyleCache(b&&s,b&&l,b&&c),p=e+":"+t;if(d.hasOwnProperty(p))o=d[p];else{var h=n(r.props,t,r._instanceProps),m="rtl"===l;d[p]=o={position:"absolute",left:m?void 0:h,right:m?h:void 0,top:f(r.props,e,r._instanceProps),height:u(r.props,e,r._instanceProps),width:i(r.props,t,r._instanceProps)}}return o},r._getItemStyleCache=void 0,r._getItemStyleCache=lc(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(mc()){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&&uc(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=dc(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1)})},r}bs(t,e),t.getDerivedStateFromProps=function(e,t){return yc(e,t),y(e),null};var d=t.prototype;return d.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)},d.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,f=i.rowCount,p=i.width,h=this.state,m=h.scrollLeft,g=h.scrollTop,b=pc();void 0!==r&&(r=Math.max(0,Math.min(r,u-1))),void 0!==o&&(o=Math.max(0,Math.min(o,f-1)));var y=a(this.props,this._instanceProps),v=s(this.props,this._instanceProps)>p?b:0,S=y>d?b:0;this.scrollTo({scrollLeft:void 0!==r?l(this.props,r,n,m,this._instanceProps,S):m,scrollTop:void 0!==o?c(this.props,o,n,g,this._instanceProps,v):g})},d.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()},d.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(mc()){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()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&uc(this._resetIsScrollingTimeoutId)},d.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,d=e.itemData,f=e.itemKey,h=void 0===f?gc:f,m=e.outerElementType,g=e.outerTagName,b=e.rowCount,y=e.style,v=e.useIsScrolling,S=e.width,w=this.state.isScrolling,k=this._getHorizontalRangeToRender(),x=k[0],C=k[1],E=this._getVerticalRangeToRender(),L=E[0],R=E[1],T=[];if(r>0&&b)for(var q=L;q<=R;q++)for(var P=x;P<=C;P++)T.push(p(t,{columnIndex:P,data:d,isScrolling:v?w:void 0,key:h({columnIndex:P,data:d,rowIndex:q}),rowIndex:q,style:this._getItemStyle(q,P)}));var I=a(this.props,this._instanceProps),_=s(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:this._onScroll,ref:this._outerRefSetter,style:ms({position:"relative",height:i,width:S,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},y)},p(c||u||"div",{children:T,ref:l,style:{height:I,pointerEvents:w?"none":void 0,width:_}}))},d._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],f=u[1],p=u[2],h=u[3];this._callOnItemsRendered(a,s,d,f,l,c,p,h)}if("function"==typeof r){var m=this.state,g=m.horizontalScrollDirection,b=m.scrollLeft,y=m.scrollTop,v=m.scrollUpdateWasRequested,S=m.verticalScrollDirection;this._callOnScroll(b,y,g,S,v)}},d._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,f=n||i||a||1;if(0===t||0===s)return[0,0,0,0];var p=r(this.props,d,this._instanceProps),h=o(this.props,p,d,this._instanceProps),m=u&&"backward"!==c?1:Math.max(1,f),g=u&&"forward"!==c?1:Math.max(1,f);return[Math.max(0,p-m),Math.max(0,Math.min(t-1,h+g)),p,h]},d._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=h(this.props,c,this._instanceProps),f=m(this.props,d,c,this._instanceProps),p=s&&"backward"!==l?1:Math.max(1,u),g=s&&"forward"!==l?1:Math.max(1,u);return[Math.max(0,d-p),Math.max(0,Math.min(i-1,f+g)),d,f]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,useIsScrolling:!1},t}var yc=function(e,t){e.children,e.direction,e.height,e.innerTagName,e.outerTagName,e.overscanColumnsCount,e.overscanCount,e.overscanRowsCount,e.width,t.instance},vc=function(e,t){return e};function Sc(e){var t,n=e.getItemOffset,r=e.getEstimatedTotalSize,o=e.getItemSize,i=e.getOffsetForIndexAndAlignment,a=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,l=e.initInstanceProps,c=e.shouldResetStyleCacheOnItemSizeChange,u=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=l(r.props,ys(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:ys(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=lc(function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})}),r._callOnScroll=void 0,r._callOnScroll=lc(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),f=o(r.props,e,r._instanceProps),p="horizontal"===a||"horizontal"===l,h="rtl"===a,m=p?d:0;u[e]=t={position:"absolute",left:h?void 0:m,right:h?m:void 0,top:p?0:d,height:p?"100%":f,width:p?f:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=lc(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(mc()){case"negative":a=-o;break;case"positive-descending":a=i-n-o}return a=Math.max(0,Math.min(a,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffset<a?"forward":"backward",scrollOffset:a,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._onScrollVertical=function(e){var t=e.currentTarget,n=t.clientHeight,o=t.scrollHeight,i=t.scrollTop;r.setState(function(e){if(e.scrollOffset===i)return null;var t=Math.max(0,Math.min(i,o-n));return{isScrolling:!0,scrollDirection:e.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!1}},r._resetIsScrollingDebounced)},r._outerRefSetter=function(e){var t=r.props.outerRef;r._outerRef=e,"function"==typeof t?t(e):null!=t&&"object"==typeof t&&t.hasOwnProperty("current")&&(t.current=e)},r._resetIsScrollingDebounced=function(){null!==r._resetIsScrollingTimeoutId&&uc(r._resetIsScrollingTimeoutId),r._resetIsScrollingTimeoutId=dc(r._resetIsScrolling,150)},r._resetIsScrolling=function(){r._resetIsScrollingTimeoutId=null,r.setState({isScrolling:!1},function(){r._getItemStyleCache(-1,null)})},r}bs(t,e),t.getDerivedStateFromProps=function(e,t){return wc(e,t),u(e),null};var d=t.prototype;return d.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)},d.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?pc():0:l.scrollHeight>l.clientHeight?pc():0}this.scrollTo(i(this.props,e,t,a,this._instanceProps,s))},d.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()},d.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(mc()){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()},d.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&uc(this._resetIsScrollingTimeoutId)},d.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,d=e.itemKey,f=void 0===d?vc:d,h=e.layout,m=e.outerElementType,g=e.outerTagName,b=e.style,y=e.useIsScrolling,v=e.width,S=this.state.isScrolling,w="horizontal"===o||"horizontal"===h,k=w?this._onScrollHorizontal:this._onScrollVertical,x=this._getRangeToRender(),C=x[0],E=x[1],L=[];if(c>0)for(var R=C;R<=E;R++)L.push(p(t,{data:u,key:f(R,u),index:R,isScrolling:y?S:void 0,style:this._getItemStyle(R)}));var T=r(this.props,this._instanceProps);return p(m||g||"div",{className:n,onScroll:k,ref:this._outerRefSetter,style:ms({position:"relative",height:i,width:v,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},b)},p(s||l||"div",{children:L,ref:a,style:{height:w?"100%":T,pointerEvents:S?"none":void 0,width:w?T:"100%"}}))},d._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)}},d._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),f=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,c-d),Math.max(0,Math.min(t-1,u+f)),c,u]},t}(d),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var wc=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},kc=bc({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 f=Math.round(d+(u-d)/2);return f<Math.ceil(l/2)?0:f>c+Math.floor(l/2)?c:f;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 f=Math.round(d+(u-d)/2);return f<Math.ceil(s/2)?0:f>c+Math.floor(s/2)?c:f;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}}),xc=Sc({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,f="horizontal"===a||"horizontal"===u?d:s,p=Math.max(0,l*c-f),h=Math.min(p,t*c),m=Math.max(0,t*c-f+c+i);switch("smart"===n&&(n=r>=m-f&&r<=h+f?"auto":"center"),n){case"start":return h;case"end":return m;case"center":var g=Math.round(m+(h-m)/2);return g<Math.ceil(f/2)?0:g>p+Math.floor(f/2)?p:g;default:return r>=m&&r<=h?r:r<m?m:h}},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 Cc="#BBB",Ec="#f1f1f1",Lc={styledScrollbars:"ListBox-styledScrollbars"};function Rc({renderProps:e,layoutOptions:t,maxCount:n,columnCount:r,rowCount:o,overflowDisclaimer:i,qCardinal:a,dataOffset:s}){const l="column"===(null==t?void 0:t.layoutOrder)&&"singleColumn"!==t.dataLayout,c=((e,t)=>void 0!==(null==e?void 0:e.visibleRowStopIndex)||void 0!==e.visibleColumnStopIndex?t?e.visibleColumnStopIndex:e.visibleRowStopIndex:e.visibleStopIndex)(e,l),u=l?n.column:n.row,d=(l?r:o)>=u,f=((e,t,n,r)=>e===t*n+r+n)(a,c,l?o:r,s),p=!!s&&((e,t)=>void 0!==(null==e?void 0:e.visibleRowStartIndex)||void 0!==e.visibleColumnStartIndex?t?0===e.visibleColumnStartIndex:0===e.visibleRowStartIndex:0===e.visibleStartIndex)(e,l),h=d&&!f&&c>=u-1||p||i.state.show;i.set(h)}const{StyledFixedSizeList:Tc,StyledFixedSizeGrid:qc}=function(){const e=e=>({scrollbarColor:`${Cc} ${Ec}`,overflow:e?"hidden !important":void 0,"&::-webkit-scrollbar":{width:10,height:10},"&::-webkit-scrollbar-track":{backgroundColor:Ec},"&::-webkit-scrollbar-thumb":{backgroundColor:Cc,borderRadius:"1rem"},"&::-webkit-scrollbar-thumb:hover":{backgroundColor:"#555"}});return{StyledFixedSizeList:v(xc,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${Lc.styledScrollbars}`]:e(t)})),StyledFixedSizeGrid:v(kc,{shouldForwardProp:e=>"scrollDisabled"!==e})(({scrollDisabled:t})=>({[`&.${Lc.styledScrollbars}`]:e(t)}))}}();const Pc=(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));const r=n.measureText(e);return Math.ceil(r.width||0)},Ic=e=>{const t=i(()=>"text"in e?e:{},[e]);return i(()=>Pc(t.text,t.font||"12px Source Sans Pro"),[t.text,t.font])};function _c(e){if(!e)return"";const t="number"==typeof e?e:e.qListObject.qDimensionInfo.qApprMaxGlyphCount;return Array(t).fill("M").join("")}function Oc({isGridMode:e,dense:t}){let n=t?20:e?32:29;return e&&(n+=4),n}function Dc({layout:e,width:t,height:n,listCount:r,count:o,freqIsAllowed:i,checkboxes:a,styles:s}){const{layoutOptions:l={}}=e||{},{layoutOrder:c,maxVisibleRows:u={},maxVisibleColumns:d,dense:f,dataLayout:p}=l,{fontSize:h="12px",fontFamily:m="Source sans pro"}=(null==s?void 0:s.content)||{},g=`${h} ${m}`,b=Ic({text:_c(e),font:g}),y=Ic({text:_c(5),font:g}),v=Ic({text:_c(8),font:g}),S=i?y:0,w=a?20:0;let k=56+S+w;!a&&k>=80&&(k+=20);let x,C,E,L,R=b+18+S+w;!a&&R>=80&&(R+=20),R=Math.min(150,Math.max(R,k));const T=Oc({isGridMode:"grid"===p,dense:f}),q=null!=n?n:8*T;if(c){let e=t;"row"===c?(x={overflowX:"hidden"},e+=8,({rowCount:L,columnWidth:E,columnCount:C}=function({maxVisibleColumns:e,listCount:t,containerWidth:n,columnAutoWidth:r,itemMinWidth:o}){const i=(null==e?void 0:e.maxColumns)||3,a=n-10;let s;const l=Math.min(t,Math.max(1,Math.round(a/Math.max(o,r))));s=!1!==(null==e?void 0:e.auto)?l:Math.min(t,i,l),s=Math.max(s,1);const c=a/s;return{rowCount:Math.ceil(t/s),columnWidth:c,columnCount:s}}({maxVisibleColumns:d,listCount:r,containerWidth:e,columnAutoWidth:R,itemMinWidth:k}))):(x={overflowY:"hidden"},({rowCount:L,columnWidth:E,columnCount:C}=function({maxVisibleRows:e,itemHeight:t,listCount:n,listHeight:r,columnAutoWidth:o,containerWidth:i,itemMinWidth:a}){let s;const l=(null==e?void 0:e.maxRows)||3,c=Math.floor(r/t);s=!1!==e.auto?c:Math.min(n,l,c),s=Math.max(s,1);const u=Math.ceil(n/s);return{columnWidth:Math.max(o,i/u,a),columnCount:u,rowCount:s}}({maxVisibleRows:u,itemHeight:T,listCount:r,listHeight:q,columnAutoWidth:R,containerWidth:e,itemMinWidth:k})))}C=("singleColumn"===p?1:C)||1,L=("singleColumn"===p?o:L)||r;const P=l.dense?838e3:577e3;L=Math.min(L,P);const I=Math.floor(3355e4/E);C=Math.min(C,I)||1;const _=L*C;return{columnCount:C,columnWidth:E,rowCount:L,overflowStyling:x,itemHeight:T,listHeight:q,listWidth:t,scrollBarWidth:10,count:o,listCount:Math.min(r,_),maxCount:{row:P,column:I},itemPadding:4,textWidth:b,freqMinWidth:y,freqMaxWidth:v}}function Ac({pages:e,minimumBatchSize:t,count:n,calculatePagesHeight:r=!1}){const o=null!=e&&e.length&&r?(({pages:e=[],minimumBatchSize:t,count:n})=>{const r=e.some(e=>e.qArea.qHeight<t),o=Math.max(...e.map(e=>e.qArea.qTop+e.qArea.qHeight));return r?o:n})({pages:e,minimumBatchSize:t,count:n}):n;return o||0}const[Nc]=Ps({});function jc(e){const t=`${e.id}`,[n]=Nc();return{setStoreValue:(e,r)=>n.set(`${t}/${e}`,r),getStoreValue:e=>n.get(`${t}/${e}`)}}const Mc=ns(k,{shouldForwardProp:e=>!["width","dense"].includes(e)})(({width:e,dense:t})=>Z({minWidth:`${e}px`,textAlign:"center",fontSize:""+(t?"12px":"14px"),whiteSpace:"normal"},t&&{textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",width:e}));function $c({width:e,text:t,dense:n,tooltip:r}){const{translator:o}=s(Rs);return or.jsx(L,{title:r?o.get(t):"",children:or.jsx(Mc,{width:e,dense:n,component:"div",variant:"body1",py:"12px",children:o.get(t)})})}var zc=function(t){function n(e,n){return or.jsx(hs,{"data-testid":void 0,ref:n,...e,children:t})}return n.muiName=hs.muiName,e.memo(e.forwardRef(n))}(or.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}));const Fc=ns(R)(({theme:e,left:t})=>({position:"absolute",bottom:"12px",display:"flex",border:`1px solid ${e.palette.divider}`,width:"calc(100% - 11px)",left:t})),Bc=ns("div")(()=>({paddingLeft:"6px",flexGrow:1})),Uc=ns("div")(({dense:e})=>({display:"flex",alignItems:""+(e?"center":"flex-start")})),Wc=ns(zc)(()=>({fontSize:"14px"}));function Hc({text:e,dismiss:t,dense:n,parentWidth:r=0}){const o="function"==typeof t,i=n?370:282,a=Math.max(r/2-i/2,0),s=Math.min(i,r)-42,l=n&&r<i;return or.jsxs(Fc,{left:a,style:{maxWidth:i},children:[or.jsx(Bc,{children:or.jsx($c,{text:e,dense:n,width:s,tooltip:l})}),or.jsx(Uc,{dense:n,children:o&&or.jsx(T,{"aria-label":"close",onClick:()=>t(),children:or.jsx(Wc,{})})})]})}function Vc({itemWidth:e,layout:t,frequencyMode:n}){const r=e>80,{frequencyEnabled:o=!1}=(null==t?void 0:t.qListObject)||{},i=!["N",void 0].includes(n);return!(!r||!i&&!o)}const Gc=e=>e&&"]"!==e?/^[A-Za-z][A-Za-z0-9_]*$/.test(e)?e:`[${e.replace(/\]/g,"]]")}]`:e,Kc=e=>{const t=Gc(e);return`Max(AGGR(Count(${t}), ${t}))`},Jc=(e,t)=>{const o=(e=>"fetch"===(null==e?void 0:e.frequencyMax))(t),[i,a]=n(),[s,l]=n(o);return r(()=>{if(!o)return;(async()=>{const n=await(async(e,t)=>{const n=e.qListObject.qDimensionInfo,r=n.qGroupFieldDefs[n.qGroupPos],o=Kc(r);return(await t.evaluateEx(o)).qNumber})(t,e);a(n),l(!1)})()},[o&&t]),{frequencyMax:o?i:null==t?void 0:t.frequencyMax,awaitingFrequencyMax:s}};const Qc=["isLoadingData"],Zc=q("div")(()=>({"& .screenReaderOnly":{position:"absolute",height:0,width:0,overflow:"hidden"}}));function Xc({model:e,app:t,constraints:o,layout:i,selections:a,selectionState:l,direction:u,checkboxes:d,height:p,width:h,frequencyMode:m,update:g,fetchStart:b,postProcessPages:y,calculatePagesHeight:v=!1,keyboard:S={},showGray:w=!0,scrollState:k,keyScroll:x={state:{},reset:()=>{}},currentScrollIndex:C={set:()=>{}},renderedCallback:E,onCtrlF:L,showSearch:R,isModal:T,styles:q}){var P,I;const{translator:_}=s(Rs),[O,D]=n(!1),A=!(!i||!i.qListObject.qDimensionInfo.qIsOneAndOnlyOne),{checkboxes:N=d,histogram:j}=null!=i?i:{},M=f(null),$=f({queue:[],validPages:!1,dataOffset:0}),z=f({pages:[]}),{frequencyMax:F,awaitingFrequencyMax:B}=Jc(t,i),U=function({local:e,loaderRef:t,model:r,fetchStart:o,scrollTimeout:i,postProcessPages:a,listData:s}){const[l,c]=n(!1),[u,d]=n([]);let[f]=n(0);const p=(n,l)=>{const u=e.current.dataOffset;e.current.queue.push({start:n+u,stop:l+u});const p=!!t.current&&t.current._listRef&&t.current._listRef.state.isScrolling;return e.current.queue.length>10&&e.current.queue.shift(),clearTimeout(e.current.timeout),c(!0),new Promise(t=>{e.current.timeout=setTimeout(()=>{const n=e.current.queue.slice(-1)[0];if(!n)return c(!1),void t();const i=r.getListObjectData("/qListObjectDef",[{qTop:n.start>f?n.start-f:0,qHeight:f,qLeft:0,qWidth:1},{qTop:n.start,qHeight:f,qLeft:0,qWidth:1}]).then(n=>{const r=a?a(n):n;e.current.validPages=!0,s.current.pages=r,d(r),c(!1),t()});o&&o(i)},p?i:0)})};return{loadMoreItems:{with:({minimumBatchSize:e})=>(e&&(f=e),p)},pages:u,isLoading:l}}({local:$,loaderRef:M,model:e,fetchStart:b,scrollTimeout:0,postProcessPages:y,listData:z}),{isLoadingData:W}=U,H=X(U,Qc),{getStoreValue:V,setStoreValue:G}=jc(e),K=c(H.loadMoreItems,[i]),[J,Q]=n({show:!1,dismissed:!1}),[Y,ee]=n([]);null!=H&&H.pages&&l.update({setPages:ee,pages:H.pages,isSingleSelect:A,layout:i});const te=null==i?void 0:i.qListObject.qDimensionInfo.qCardinal;(null!=H&&H.pages.length&&!B||0===te)&&(null==E||E());const ne=c(e=>{if(null==Y||!Y.length||!$.current.validPages)return!1;$.current.checkIdx=e;const t=t=>t.qArea.qTop<=e&&e<t.qArea.qTop+t.qArea.qHeight,n=Y.filter(e=>t(e))[0];return n&&t(n)},[i,Y]),{interactionEvents:re,select:oe}=hl({selectionState:l,selections:a,checkboxes:N,doc:document,loaderRef:M}),{layoutOptions:ie={}}=i||{};let ae=!0;ie.dataLayout&&(ae="singleColumn"===ie.dataLayout||"row"===(null==ie?void 0:ie.layoutOrder));const se="grid"===(null==ie?void 0:ie.dataLayout),le=e=>{const t=Z({},ae?{rowIndex:e}:{columnIndex:e}),n=se?t:e;M.current._listRef.scrollToItem(n)},ce=()=>{if($.current.queue=[],$.current.validPages=!1,M.current){M.current.resetloadMoreItemsCache(!0);const e="overflowEnd"===x.state.scrollPosition;if(i&&i.qSelectionInfo.qInSelections||e)return void(e&&x.reset());$.current.dataOffset=0,le(0)}};g&&g.call(null,ce),r(()=>{k&&!O&&M.current&&(M.current._listRef.scrollToItem(k.initScrollPos),D(!0))},[M.current]),r(()=>{ce()},[i,$.current.dataOffset]);let ue=100;const de="grid"!==ie.dataLayout,fe=null==i||null===(P=i.qListObject.qSize)||void 0===P?void 0:P.qcy,pe=Ac({pages:Y,minimumBatchSize:ue,count:fe,calculatePagesHeight:v});let he=Vc({itemWidth:h,layout:i,frequencyMode:m});const me=function(e){return e.some(({qMatrix:e})=>e.some(([e])=>{var t;return!(null===(t=e.qFrequency)||void 0===t||!t.match("%"))}))?"P":"-"}(Y),ge=Dc({layout:i,width:h,height:p,listCount:pe,count:fe,freqIsAllowed:he,checkboxes:N,styles:q});ge.columnWidth&&(he=Vc({itemWidth:ge.columnWidth,layout:i,frequencyMode:m}));const{listCount:be}=ge;G("listCount",be);const ye=V("inputText"),ve=function({layout:e,searchInputText:t,listCount:n}){const{translator:r}=s(Rs),o=[];if(null!=t&&t.length){const e=function(e){let t;switch(e){case 0:t="Listbox.NoMatchesForYourTerms";break;case 1:t="ScreenReader.OneSearchResult";break;default:t="ScreenReader.ManySearchResults"}return t}(n),t=r.get(e,[n]);o.push(t)}const i=function({layout:e,translatorDynamic:t}){var n;const{qStateCounts:r={}}=(null==e||null===(n=e.qListObject)||void 0===n?void 0:n.qDimensionInfo)||{},o=r.qSelected+r.qSelectedExcluded+r.qLocked+r.qLockedExcluded;let i;switch(o){case 0:i="ScreenReader.ZeroSelected";break;case 1:i="ScreenReader.OneSelected";break;default:i="ScreenReader.ManySelected"}return t.get(i,[o])}({layout:e,translatorDynamic:r});o.push(i);const a=o.filter(e=>!(null==e||!e.length)).join(". ");return a}({layout:i,searchInputText:ye,listCount:be}),Se=e=>{const{scrollIndex:t,offset:n,triggerRerender:r}=function({position:e,isRow:t,sizes:n,layout:r,offset:o}){let i,a=!1,s=null!=o?o:0;switch(e){case"start":i=0;break;case"end":i=t?n.rowCount:n.columnCount;break;case"overflowStart":s=0,i=0,a=!0;break;case"overflowEnd":s=((e,t)=>e.qListObject.qDimensionInfo.qCardinal-t)(r,n.listCount),i=r.qListObject.qDimensionInfo.qCardinal,a=!0}return{scrollIndex:i,offset:s,triggerRerender:a}}({position:e,isRow:ae,sizes:ge,layout:i,offset:$.current.dataOffset});$.current.dataOffset=n,r&&l.triggerStateChanged(),le(t)};r(()=>{const e=x.state;e.up?le(C.state.start-e.up):e.down?le(C.state.stop+e.down):e.scrollPosition&&Se(e.scrollPosition),"overflowEnd"!==e.scrollPosition&&x.reset()},[x.state.up,x.state.down,x.state.scrollPosition]);const{textAlign:we}=(null==i?void 0:i.qListObject.qDimensionInfo)||{},[ke,xe]=n({first:!1,last:!1}),{List:Ce,Grid:Ee}=function({layout:e,width:t,checkboxes:n,local:r,isVertical:o,pages:i,selectionState:a,interactionEvents:s,deducedFrequencyMode:l,histogram:c,isSingleSelect:u,select:d,selectAll:f,onCtrlF:p,textAlign:h,selections:m,keyboard:g,showGray:b,scrollState:y,direction:v,sizes:S,listCount:w,overflowDisclaimer:k,setScrollPosition:x,focusListItems:C,setCurrentScrollIndex:E,constraints:L,frequencyMax:R,freqIsAllowed:T,translator:q,showSearch:P,isModal:I,styles:_}){const{layoutOptions:O={}}=e||{},{columnWidth:D,listHeight:A,itemHeight:N,rowCount:j,columnCount:M}=S||{},$=("grid"===O.dataLayout?D:t)>80,z={direction:"rtl"===v?"rtl":"ltr",useIsScrolling:!0,className:Lc.styledScrollbars},F=null==e?void 0:e.qListObject.qDimensionInfo.qLocked,B=A<=N,U=Z(Z({isLocked:F,column:!o,pages:i},F||a.selectDisabled()?{}:s),{},{checkboxes:n,layoutOptions:O,deducedFrequencyMode:l,freqIsAllowed:T,isSingleSelect:u,textAlign:h,sizes:S,actions:{select:d,confirm:()=>null==m?void 0:m.confirm.call(m),cancel:()=>null==m?void 0:m.cancel.call(m),setScrollPosition:x,selectAll:f,onCtrlF:p},frequencyMax:R,histogram:c,keyboard:g,showGray:b,showTick:$,dataOffset:r.current.dataOffset,focusListItems:C,direction:v,translator:q,showSearch:P,isModal:I,styles:_,fillHeight:B});return{List:({onItemsRendered:n,ref:o})=>(r.current.listRef=o,or.jsx(Tc,Z(Z({},z),{},{dataTestid:"fixed-size-list",scrollDisabled:null==L?void 0:L.active,height:A,width:t,itemCount:w,itemData:Z(Z({},U),{},{listCount:w}),itemSize:N,onItemsRendered:t=>{var o;E({start:t.visibleStartIndex,stop:t.visibleStopIndex}),y&&y.setScrollPos(t.visibleStopIndex),Rc({renderProps:t,layoutOptions:O,maxCount:S.maxCount,columnCount:M,rowCount:j,overflowDisclaimer:k,qCardinal:null==e||null===(o=e.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qCardinal,dataOffset:r.current.dataOffset}),n(Z({},t))},ref:o,children:oc}))),Grid:({onItemsRendered:n,ref:o})=>{const{overflowStyling:i,scrollBarWidth:a}=S,{layoutOrder:s}=O||{},l=Math.min(A,j*N+a);return r.current.listRef=o,or.jsx(qc,Z(Z({},z),{},{dataTestid:"fixed-size-grid",scrollDisabled:null==L?void 0:L.active,height:l,width:t,columnCount:M,columnWidth:D,rowCount:j,rowHeight:N,style:Z({},i),itemData:Z(Z({},U),{},{column:void 0,columnCount:M,rowCount:j}),onItemsRendered:t=>{var o;const i="row"===s;E({start:i?t.visibleRowStartIndex:t.visibleColumnStartIndex,stop:i?t.visibleRowStopIndex:t.visibleColumnStopIndex});const a=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,f,p,h;return n&&n.setScrollPos(u),"column"===r?(d=l*o,f=a,p=c*o,h=s):(d=l,f=a*i,p=c,h=s*i),{visibleStartIndex:d+f,visibleStopIndex:p+h}}({renderProps:t,scrollState:y,layoutOrder:s,rowCount:j,columnCount:M});Rc({renderProps:t,layoutOptions:O,maxCount:S.maxCount,columnCount:M,rowCount:j,overflowDisclaimer:k,qCardinal:null==e||null===(o=e.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qCardinal,dataOffset:r.current.dataOffset}),n(a)},ref:o,children:oc}))}}}({direction:u,layout:i,width:h,checkboxes:N,deducedFrequencyMode:me,histogram:j,keyboard:S,showGray:w,interactionEvents:re,select:oe,selectAll:()=>{l.clearItemStates(!1),e.selectListObjectAll("/qListObjectDef")},onCtrlF:L,textAlign:we,isVertical:de,pages:Y,selectionState:l,isSingleSelect:A,selections:a,scrollState:k,local:$,sizes:ge,listCount:be,overflowDisclaimer:{state:J,set:e=>Q(t=>Z(Z({},t),{},{show:e}))},setScrollPosition:Se,focusListItems:{first:ke.first,setFirst:e=>xe(t=>Z(Z({},t),{},{first:e})),last:ke.last,setLast:e=>xe(t=>Z(Z({},t),{},{last:e}))},setCurrentScrollIndex:C.set,constraints:o,frequencyMax:F,freqIsAllowed:he,translator:_,showSearch:R,isModal:T,styles:q}),{columnWidth:Le,listHeight:Re,itemHeight:Te}=ge||{};return de||(ue=function({width:e,columnWidth:t,listHeight:n,itemHeight:r}){return Math.ceil(e/t)*Math.ceil(n/r)*2}({width:h,columnWidth:Le,listHeight:Re,itemHeight:Te})),or.jsxs(Zc,{children:[or.jsx("div",{className:"screenReaderOnly","aria-live":"assertive","aria-atomic":"true",children:ve}),!be&&te>0&&or.jsx($c,{width:h,text:"Listbox.NoMatchesForYourTerms"}),or.jsx(il,{isItemLoaded:ne,itemCount:be||1,loadMoreItems:K.with({minimumBatchSize:ue}),threshold:0,minimumBatchSize:ue,ref:M,role:"grid",children:de?Ce:Ee}),J.show&&!J.dismissed&&or.jsx(Hc,{text:"Listbox.ItemsOverflow",dismiss:()=>Q(e=>Z(Z({},e),{},{dismissed:!0})),parentWidth:null==M||null===(I=M.current)||void 0===I||null===(I=I._listRef)||void 0===I||null===(I=I.props)||void 0===I?void 0:I.width,dense:null==ie?void 0:ie.dense})]})}const Yc=e=>Z(Z({},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"}}]}),eu=e=>Z(Z({},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"}}]}),tu=e=>Z(Z({},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"}}]}),nu=e=>Z(Z({},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 ru=({layout:e,model:t,translator:n,selectionState:r,isDirectQuery:o=!1,selections:i})=>{if(e.qListObject.qDimensionInfo.qIsOneAndOnlyOne)return[];const a="/qListObjectDef",s=()=>{i.isActive()||i.begin(a)};return[{key:"selectAll",type:"menu-icon-button",label:n.get("Selection.SelectAll"),getSvgIconShape:Yc,enabled:()=>["qOption","qAlternative","qExcluded","qDeselected"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectAll(a)}},{key:"selectPossible",type:"menu-icon-button",label:n.get("Selection.SelectPossible"),getSvgIconShape:tu,enabled:()=>["qOption"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectPossible(a)}},!o&&{key:"selectAlternative",type:"menu-icon-button",label:n.get("Selection.SelectAlternative"),getSvgIconShape:eu,enabled:()=>["qAlternative"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectAlternative(a)}},!o&&{key:"selectExcluded",type:"menu-icon-button",label:n.get("Selection.SelectExcluded"),getSvgIconShape:nu,enabled:()=>["qAlternative","qExcluded"].some(t=>e.qListObject.qDimensionInfo.qStateCounts[t]>0),action:()=>{s(),r.clearItemStates(!1),t.selectListObjectExcluded(a)}}].filter(Boolean)};const ou=e=>Z(Z({},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 iu(e){const t=ts(),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 au={className:"njs-cell-action"},su=t.forwardRef(({item:e,addAnchor:t=!1},n)=>{const r=ts(),{hidden:o,disabled:i,style:a,hasSvgIconShape:s}=iu(e);if(o)return null;const l=Number.parseInt(r.spacing(.5),10),c=e.keyboardAction||e.action,u=c?e=>["Enter"].includes(e.key)&&c():null,d=c?e=>[" ","Spacebar"].includes(e.key)&&c():null,f=`actions-toolbar-${e.key}`,p=e.ref||(t?null:n);return or.jsxs(T,{ref:p,title:e.label,onClick:e.action,onKeyDown:u,onKeyUp:d,disabled:i,style:a,className:[au.className,f].join(" "),size:"large",disableRipple:!0,"aria-label":e.label,"data-testid":f,children:[s&&Xs(e.getSvgIconShape()),t&&or.jsx("div",{ref:n,style:{bottom:-l,right:0,position:"absolute",width:"100%",height:0}})]})}),lu=e=>Z(Z({},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"}}]});var cu=e=>Xs(lu(e));const uu=e=>Z(Z({},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 du=e=>Xs(uu(e));const fu="njs-action-toolbar-more",pu={icon:"More-icon"},hu=ns(P)(({theme:e})=>({pointerEvents:"none",[`& .${pu.icon} *`]:{color:e.palette.text.primary}}));function mu({item:e,autoFocus:t,onActionClick:n=()=>{}}){const{hidden:r,disabled:o,hasSvgIconShape:i}=iu(e);return r?null:or.jsxs(_,{autoFocus:t,title:e.label,onClick:()=>{e.action(),n()},disabled:o,tabindex:"0",children:[i&&or.jsx(O,{className:pu.icon,children:Xs(e.getSvgIconShape())}),or.jsx(k,{noWrap:!0,children:e.label})]})}const gu=t.forwardRef(({actions:e=[],show:t=!0,alignTo:n,popoverProps:r={},popoverPaperStyle:o={},onCloseOrActionClick:i=()=>{},disablePortal:a=!0},s)=>{const l=e.length>0,c=e.findIndex(e=>!e.disabled);return l&&or.jsx(hu,Z(Z({},r),{},{onClose:i,ref:s,open:t,anchorEl:n.current,getContentAnchorEl:a?null:void 0,container:a?n.current:void 0,disablePortal:a,hideBackdrop:!0,transitionDuration:0,slotProps:{root:{className:fu},paper:{style:Z({pointerEvents:"auto",maxWidth:"250px"},o)}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:or.jsx(I,{id:"moreMenuList",children:e.map((e,t)=>or.jsx(mu,{item:e,autoFocus:t===c,onActionClick:i},t))})}))});function bu({keyboardNavigation:e,focusHandler:t,getEnabledButton:n,selections:r,isRtl:o}){return i=>{const{target:a,nativeEvent:s}=i,{keyCode:l}=s;switch(l){case Gl.ARROW_LEFT:case Gl.ARROW_DOWN:case Gl.ARROW_RIGHT:case Gl.ARROW_UP:if(a.classList.contains("njs-cell-action")){const e=(e=>{const t=e.closest("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");return Array.from(n).indexOf(e)})(a);let t=[Gl.ARROW_LEFT,Gl.ARROW_DOWN].includes(l);t=o?!t:t,(e=>{const t=document.querySelector("#actions-toolbar"),n=null==t?void 0:t.querySelectorAll(".njs-cell-action");if(!n.length)return;n[Math.min(Math.max(0,e),n.length-1)].focus()})(t?e-1:e+1)}i.stopPropagation(),i.preventDefault();break;case Gl.SPACE:i.preventDefault();break;case Gl.TAB:if(e&&null!=t&&t.refocusContent){(i.shiftKey&&n(!1)===i.target||!i.shiftKey&&n(!0)===i.target)&&(i.preventDefault(),i.stopPropagation(),t.refocusContent())}break;case Gl.ESCAPE:r&&(r.onCancel(),r.api.cancel(),i.preventDefault(),i.stopPropagation())}}}const yu="ActionsToolbar",vu={item:`${yu}-item`,itemSpacing:`${yu}-itemSpacing`},Su=ns(P)(({theme:e})=>({[`& .${vu.itemSpacing}`]:{padding:e.spacing(0,.25)}})),wu="njs-action-toolbar-popover",ku=t.forwardRef(({className:e,actions:t=[],addAnchor:n=!1,isRtl:r=!1},o)=>t.length>0?or.jsx(E,{container:!0,gap:0,flexDirection:r?"row-reverse":"row",wrap:"nowrap",className:e,children:t.map((e,t)=>or.jsx(E,{className:`${vu.itemSpacing} ${vu.item}`,children:or.jsx(su,{item:e,ref:0===t?o:null,addAnchor:n},e.key)},e.key))}):null),xu={pointerEvents:"none"};function Cu({show:e=!0,actions:t=[],maxItems:o=3,selections:a={show:!1,api:null,onConfirm:()=>{},onCancel:()=>{}},extraItems:l,more:c={enabled:!1,actions:[],alignTo:null,popoverProps:{},popoverPaperStyle:{},disablePortal:!0},popover:u={show:!1,anchorEl:null},focusHandler:d=null,actionsRefMock:p=null,isRtl:h,autoConfirm:m=!1,layout:g}){var b,y;const v=function({api:e,layout:t,onConfirm:n=()=>{},onCancel:r=()=>{},onKeyDeactivate:o=()=>{}}){const{translator:i}=s(Rs);return[{key:"clear",type:"icon-button",label:i.get("Selection.Clear"),enabled:()=>e.canClear(t),action:()=>e.clear(),getSvgIconShape:uu},{key:"cancel",type:"icon-button",label:i.get("Selection.Cancel"),enabled:()=>e.canCancel(t),action:()=>{r(),e.cancel()},keyboardAction:()=>{o(),r(),e.cancel()},getSvgIconShape:lu},{key:"confirm",type:"icon-button",label:i.get("Selection.Confirm"),enabled:()=>e.canConfirm(t),action:()=>{n(),e.confirm()},keyboardAction:()=>{o(),n(),e.confirm()},getSvgIconShape:ml}]}(Z(Z({},a),{},{layout:g})),{translator:S,keyboardNavigation:w}=s(Rs),[k,x]=n(!1),C={vertical:12,horizontal:h?0:(null!==(b=null===(y=u.anchorEl)||void 0===y?void 0:y.clientWidth)&&void 0!==b?b:0)-7},L={vertical:"bottom",horizontal:h?-7:"right"},R=f(),T=f(),q=ts(),P=i(()=>({margin:q.spacing(.5,0)})),I=e=>{const t=R.current||p;if(!t)return null;const n=t.querySelectorAll("button:not(.Mui-disabled)");return n[e?n.length-1:0]},_=i(()=>bu({keyboardNavigation:w,focusHandler:d,getEnabledButton:I,selections:a,isRtl:h}),[w,d,I,a,h]);if(r(()=>()=>{x(!1)},[u.show,e,a.show]),r(()=>{if(!d)return;d.on("focus_toolbar_first",()=>{const e=I(!1);null==e||e.focus()}),d.on("focus_toolbar_last",()=>{const e=I(!0);null==e||e.focus()})},[]),m)return;let O=c.enabled,A=c.actions;const N=c.alignTo||T,j=t.filter(e=>!e.hidden);if(j.length>o){const e=j.splice(-(j.length-o)-1);O=!0,A=[...e,...c.actions]}if(!a.show&&0===j.length&&!O)return null;const M={key:"more",label:S.get("Menu.More"),getSvgIconShape:ou,hidden:!1,active:k,enabled:()=>O,action:()=>x(!k)},$=j.length>0,z=A.length>0,F=$&&a.show||z&&a.show,B=or.jsxs(E,{ref:R,onKeyDown:_,container:!0,gap:0,wrap:"nowrap",id:"actions-toolbar","data-testid":"actions-toolbar",sx:{flexDirection:h?"row-reverse":"row"},children:[(null==l?void 0:l.length)&&or.jsx(ku,{className:"actions-toolbar-extra-actions",actions:l,isRtl:h}),$&&or.jsx(ku,{actions:j}),z&&or.jsx(ku,{id:"actions-toolbar-show-more","data-testid":"actions-toolbar-show-more",ref:T,actions:[M],addAnchor:!0}),F&&or.jsx(E,{className:vu.itemSpacing,style:P,children:or.jsx(D,{orientation:"vertical"})}),a.show&&or.jsx(ku,{className:"actions-toolbar-default-actions",actions:v,isRtl:h}),k&&or.jsx(gu,{show:k,actions:A,alignTo:N,popoverProps:c.popoverProps,popoverPaperStyle:c.popoverPaperStyle,onCloseOrActionClick:()=>{x(!1)},disablePortal:c.disablePortal})]});return u.show?or.jsx(Su,{disableEnforceFocus:!0,disableAutoFocus:!0,disableRestoreFocus:!0,open:u.show,anchorEl:u.anchorEl,anchorOrigin:C,transformOrigin:L,hideBackdrop:!0,style:xu,onMouseDown:e=>{e.stopPropagation()},slotProps:{paper:{id:"njs-action-toolbar-popover","data-testid":"njs-action-toolbar-popover",className:wu,style:{pointerEvents:"auto",padding:q.spacing(.5,.25)}}},children:B}):e&&B}var Eu=e=>Xs((e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M8.588 11.415a6 6 0 1 1 2.828-2.829l4.101 4a1.5 1.5 0 0 1 .014 2.134l-.707.707a1.5 1.5 0 0 1-2.108.014l-4.128-4.026ZM11 6A5 5 0 1 0 1 6a5 5 0 0 0 10 0Zm-1.52 4.888 3.934 3.837a.5.5 0 0 0 .703-.005l.707-.707a.5.5 0 0 0-.005-.711l-3.926-3.829a6.034 6.034 0 0 1-1.413 1.415Z"}}]}))(e));const Lu="/qListObjectDef",Ru=e=>null==e?void 0:e.substring(0,64e3),Tu=ns(A,{shouldForwardProp:e=>!["styles","dense","isRtl"].includes(e)})(({styles:e,dense:t,isRtl:n})=>{let r={};return t&&(r={fontSize:12,"& input":{paddingTop:"5px",paddingBottom:"5px",color:e.search.color,textAlign:n?"right":"left"}}),Z({display:"flex",border:"none",fontSize:14,borderRadius:0,backgroundColor:e.search.backgroundColor,backdropFilter:e.background.backgroundImage?e.search.backdropFilter:void 0,paddingLeft:0,paddingRight:0,flexDirection:n?"row-reverse":"row","& fieldset":{borderColor:`${e.search.borderColor}`,borderWidth:"1px 0 1px 0",borderRadius:0},"&.Mui-focused fieldset":{borderColor:`${e.search.highlightBorderColor} !important`},"& .MuiInputBase-root":Z({},e.search),"& *":{color:e.search.color},"& input":{color:e.search.color,textAlign:n?"right":"left"}},r)}),qu=ns(T)(()=>({border:0,padding:"8px",cursor:"pointer",lineHeight:"12px","&:hover":{backgroundColor:"transparent"},":focus-visible":{borderRadius:"4px",boxShadow:"inset 0 0 0 2px rgb(2, 117, 217)"}}));var Pu=o(function({popoverOpen:e,selections:t,selectionState:o,model:i,keyboard:l,dense:c=!1,visible:u=!0,autoFocus:d=!0,beginSelectionOnFocus:p=!0,wildCardSearch:h=!1,searchEnabled:m,direction:g,hide:b,styles:y},v){const{translator:S}=s(Rs),[w,k]=n(""),[x,C]=n(!1),E=f(),L=f(),R=S.get("Listbox.Clear.Search"),{getStoreValue:T,setStoreValue:q}=jc(i),P="rtl"===g,I=async()=>{try{await i.abortListObjectSearch(Lu)}finally{k("")}};r(()=>u?()=>I():()=>{},[u]),r(()=>(t.on("deactivated",I),()=>{t.removeListener&&t.removeListener("deactivated",I)}),[]),r(()=>{if(x&&E.current){const e=w.length-1;E.current.setSelectionRange(e,e),C(!1)}},[x,E.current]),r(()=>{q("inputText",w)},[w]);const _=async()=>{let e;const n=Ru(w),r=await i.searchListObjectFor(Lu,n);return o.selectDisabled()?r:(r&&n.length&&T("listCount")>0&&(e=i.acceptListObjectSearch(Lu,!0),t.selectionsMade=!0,o.clearItemStates(!1),k("")),e)},O=()=>{var e;null===(e=E.current)||void 0===e||e.focus()},D=()=>{I(),O()};return a(v,()=>({focus(){O()}})),u&&!1!==m?or.jsxs(or.Fragment,{children:[or.jsx(Tu,{styles:y,dense:c,isRtl:P,startAdornment:or.jsx(N,{position:"start",sx:{marginLeft:c?"8px":"9px"},children:or.jsx(Eu,{size:c?"small":"normal"})}),endAdornment:or.jsx(N,{position:"end",sx:{marginLeft:0},children:""!==w&&or.jsx(qu,{tabIndex:0,ref:L,title:R,"aria-label":R,onClick:D,onKeyDown:e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.key){case"Enter":D();break;case"Tab":e.shiftKey?O():Yl(t);break;default:return}e.preventDefault(),e.stopPropagation()},children:or.jsx(cu,{size:c?"small":"normal"})})}),className:"search",inputRef:E,size:"small",fullWidth:!0,placeholder:S.get("Listbox.Search"),value:w,onFocus:()=>{h&&(k("**"),C(!0)),p&&!o.selectDisabled()&&!t.isModal()&&t.begin("/qListObjectDef")},onChange:async e=>{const t=Ru(e.target.value);return k(t),t.length?i.searchListObjectFor(Lu,t):I()},onKeyDown:async n=>{const{currentTarget:r}=n,o=r.closest(".listbox-container");switch(n.key){case"Enter":_();break;case"Escape":if(Yl(o),t.cancel(),e)return;break;case"Tab":n.shiftKey?ec(o)||l.focusSelection():L.current?L.current.focus():Yl(o);break;case"f":case"F":if(!n.ctrlKey&&!n.metaKey)return;b&&(b(),Yl(o));break;default:return}n.preventDefault(),n.stopPropagation()},autoFocus:d,inputProps:{tabIndex:l.innerTabStops?0:-1,"data-testid":"search-input-field","aria-label":S.get("Listbox.Search"),"aria-describedby":"listbox-search-instructions"}}),or.jsx("span",{id:"listbox-search-instructions",style:{position:"absolute",height:0,width:0,overflow:"hidden"},children:S.get("Listbox.Search.ScreenReaderInstructions")})]}):null});function Iu(e){if(!e.session)return[];const{selectionStore:t}=s(Rs),[n]=t.useAppSelectionsStore(),o=e?e.id:null;let i=n.get(o);return r(()=>{e&&!i&&(i=function({app:e,selectionStore:t}){const n=`${e.id}`,{modalObjectStore:r,appModalStore:o}=t,i=async(e=!0)=>{const{model:t,objectSelections:o}=r.get(n)||{};t&&(await t.endSelections(e),r.clear(n),o.emit("deactivated"))},a={begin:async({model:t,paths:o,accept:a=!0,objectSelections:s})=>{var l;if(s===(null===(l=r.get(n))||void 0===l?void 0:l.objectSelections))return;i(a),r.set(n,{model:t,objectSelections:s});const c=Array.isArray(o)?o:[o],u=async o=>{try{await t.beginSelections(c),r.set(n,{model:t,objectSelections:s})}catch(t){6003!==t.code||o?r.clear(n):(await e.abortModal(a),u(!0))}};await u()},end:i};o.set(n,a);const s={model:e,isInModal:()=>!!r.get(n),isModal(e){var t;return e?(null===(t=r.get(n))||void 0===t?void 0:t.objectSelections)===e:!!r.get(n)},forward:()=>a.end().then(()=>e.forward()),back:()=>a.end().then(()=>e.back()),clear:()=>a.end().then(()=>e.clearAll()),clearField:(t,n="$")=>a.end().then(()=>e.getField(t,n).then(e=>e.clear()))};return s}({app:e,selectionStore:t}),n.set(o,i),n.dispatch(!0))},[e]),[i]}function _u(e){return Object.keys(pe.prototype).forEach(t=>{e[t]=pe.prototype[t]}),pe.init(e),e}const Ou=({appSelections:e,appModal:t,model:n})=>{let r,o=!1,i=!1;const a={id:n.id,setLayout(e){r=e},begin(e){const r=(()=>{let e=!1;return{isPrevented:()=>e,preventDefault:()=>{e=!0}}})();return this.emit("activate",r),r.isPrevented()?Promise.resolve():(o=!0,this.emit("activated"),t.begin({model:n,paths:e,accept:!0,objectSelections:a}))},clear(){return i=!1,this.emit("cleared"),r.qListObject?n.clearSelections("/qListObjectDef"):n.resetMadeSelections()},confirm(){return i=!1,o=!1,this.emit("confirmed"),this.emit("deactivated"),t.end(!0)},cancel(){return i=!1,o=!1,this.emit("canceled"),this.emit("deactivated"),t.end(!1)},async select(t){const r=this.begin([t.params[0]]);if(!e.isModal())return!1;await r;const o=await n[t.method](...t.params);return i="resetMadeSelections"!==t.method,!!o||(n.resetMadeSelections(),!1)},canClear:()=>r&&r.qListObject&&r.qListObject.qDimensionInfo?!r.qListObject.qDimensionInfo.qLocked&&!r.qListObject.qDimensionInfo.qIsOneAndOnlyOne:i,canConfirm:()=>r&&r.qListObject&&r.qListObject.qDimensionInfo?!r.qListObject.qDimensionInfo.qLocked:i,canCancel:()=>!(r&&r.qListObject&&r.qListObject.qDimensionInfo)||!r.qListObject.qDimensionInfo.qLocked,isActive:()=>o,isModal:()=>e.isModal(a),goModal:e=>t.begin({model:n,paths:e,accept:!1,objectSelections:a}),noModal:(e=!1)=>t.end(e)};return _u(a),a},Du=({elements:e,objectSelections:t,options:n={}})=>{const r=function({elements:e,handleClickOutside:t}){return n=>{if(!document.contains(n.target))return;const r=e.map(e=>"string"==typeof e?document.querySelector(e):null==e?void 0:e.current).filter(e=>!!e&&!!document.contains(e));r.length&&!r.some(e=>e.contains(n.target))&&t(n)}}({elements:e,handleClickOutside:()=>t.confirm.call(t)});return{activateClickOut(){var e;document.addEventListener("mousedown",r),null==n||null===(e=n.onSelectionActivated)||void 0===e||e.call(n)},deactivateClickOut(){var e;document.removeEventListener("mousedown",r),null==n||null===(e=n.onSelectionDeactivated)||void 0===e||e.call(n)}}};function Au(e,t,o,i){const a=Array.isArray(o)?o:[o],[l]=Iu(e),[c]=$s(t),{appModalStore:u}=s(Rs).selectionStore,d=u.get(e.id),[f,p]=n();return r(()=>{l&&t&&!f&&p(Ou({appSelections:l,appModal:d,model:t}))},[l,t]),r(()=>{if(!f)return()=>{};const{activateClickOut:e,deactivateClickOut:t}=Du({elements:a,objectSelections:f,options:i});return f.addListener("activated",e),f.addListener("deactivated",t),()=>{f.isActive()&&f.confirm(),f.removeListener("activated",e),f.removeListener("deactivated",t)}},[f]),r(()=>{f&&f.setLayout(c)},[f,c]),[f]}function Nu(e={}){const t=Z(Z({itemStates:{},ignoreSelectionState:!1,selectedInEngine:[],enginePages:[],setPages:void 0,lastRowCount:void 0,lastApprMaxGlyphCount:void 0,selectDisabled:void 0},e),{},{update({setPages:e,pages:n,isSingleSelect:r,selectDisabled:o,layout:i}){var a,s;this.setPages=e;const l=this.lastRowCount===i.qListObject.qSize.qcy,c=this.lastApprMaxGlyphCount===i.qListObject.qDimensionInfo.qApprMaxGlyphCount;l&&c||(this.lastRowCount=i.qListObject.qSize.qcy,this.lastApprMaxGlyphCount=i.qListObject.qDimensionInfo.qApprMaxGlyphCount,this.clearItemStates(!1)),t.enginePages!==n&&void 0!==n&&(t.enginePages=null!=n?n:[],t.selectedInEngine=ll(n),t.selectableValuesUpdating=!1,t.triggerStateChanged()),t.isSingleSelect=r,t.selectDisabled=o||t.selectDisabled,t.isDimCalculated=null!==(a=null==i||null===(s=i.qListObject)||void 0===s||null===(s=s.qDimensionInfo)||void 0===s?void 0:s.qIsCalculated)&&void 0!==a&&a},allowedToSelect:()=>!t.selectDisabled()&&!(t.isDimCalculated&&t.selectableValuesUpdating),setSelectableValuesUpdating(){t.selectableValuesUpdating=!0},useClientItemState:e=>t.ignoreSelectionState||e in t.itemStates,isSelected:e=>t.useClientItemState(e)?!!t.itemStates[e]:t.selectedInEngine.includes(e),getState(e){const{qElemNumber:n,qState:r}=e;return t.useClientItemState(n)?t.itemStates[n]?"XS"===r?"XS":"S":"S"===r||"XS"===r?"A":r:r},updateItemNoEvents(e,n,r){const o=t.isSelected(e);o&&!n?t.itemStates[e]=!1:o||(null==r||r.push(e),t.itemStates[e]=!0)},triggerStateChanged(){if(this.setPages){const e=t.applySelectionsOnPages(t.enginePages);this.setPages(e)}},applySelectionsOnPages(e){const n=e.map(e=>{const n=e.qMatrix.map(e=>{const[n]=e,r=t.getState(n);return[Z(Z({},n),{},{qState:r}),...e.slice(1)]});return Z(Z({},e),{},{qMatrix:n})});return n},updateItem(e,n,r){t.updateItemNoEvents(e,n,r),t.triggerStateChanged()},updateItems(e,n,r){e.forEach(e=>{t.updateItemNoEvents(e,n,r)}),t.triggerStateChanged()},clearItemStates(e){t.itemStates={},t.ignoreSelectionState=e}});return t}const ju=(e,t,n=void 0)=>{var r;return null!==(r=null==e?void 0:e[t])&&void 0!==r?r:n};function Mu(e){const t=(null==e?void 0:e.qListObject.qDimensionInfo.qStateCounts)||{};return ju(t,"qSelected",0)+ju(t,"qSelectedExcluded",0)+ju(t,"qLocked",0)+ju(t,"qLockedExcluded",0)>0}function $u(e){return null!==e&&"object"==typeof e&&"r"in e&&"number"==typeof e.r&&"g"in e&&"number"==typeof e.g&&"b"in e&&"number"==typeof e.b&&("number"==typeof e.a||void 0===e.a)}function zu(e){if("object"==typeof e&&$u(e))return(e.r<<16)+(e.g<<8)+e.b;let t=0,n=0,r=0;if("string"==typeof e){let o;(o=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(e))?(t=parseInt(o[1],10),n=parseInt(o[2],10),r=parseInt(o[3],10)):(o=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(e))?(t=parseInt(o[1],16),n=parseInt(o[2],16),r=parseInt(o[3],16)):(o=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(e))&&(t=parseInt(o[1]+o[1],16),n=parseInt(o[2]+o[2],16),r=parseInt(o[3]+o[3],16))}return(t<<16)+(n<<8)+r}const Fu={aliceblue:{r:240,g:248,b:255},antiquewhite:{r:250,g:235,b:215},aqua:{r:0,g:255,b:255},aquamarine:{r:127,g:255,b:212},azure:{r:240,g:255,b:255},beige:{r:245,g:245,b:220},bisque:{r:255,g:228,b:196},black:{r:0,g:0,b:0},blanchedalmond:{r:255,g:235,b:205},blue:{r:0,g:0,b:255},blueviolet:{r:138,g:43,b:226},brown:{r:165,g:42,b:42},burlywood:{r:222,g:184,b:135},cadetblue:{r:95,g:158,b:160},chartreuse:{r:127,g:255,b:0},chocolate:{r:210,g:105,b:30},coral:{r:255,g:127,b:80},cornflowerblue:{r:100,g:149,b:237},cornsilk:{r:255,g:248,b:220},crimson:{r:220,g:20,b:60},cyan:{r:0,g:255,b:255},darkblue:{r:0,g:0,b:139},darkcyan:{r:0,g:139,b:139},darkgoldenrod:{r:184,g:134,b:11},darkgray:{r:169,g:169,b:169},darkgreen:{r:0,g:100,b:0},darkgrey:{r:169,g:169,b:169},darkkhaki:{r:189,g:183,b:107},darkmagenta:{r:139,g:0,b:139},darkolivegreen:{r:85,g:107,b:47},darkorange:{r:255,g:140,b:0},darkorchid:{r:153,g:50,b:204},darkred:{r:139,g:0,b:0},darksalmon:{r:233,g:150,b:122},darkseagreen:{r:143,g:188,b:143},darkslateblue:{r:72,g:61,b:139},darkslategray:{r:47,g:79,b:79},darkslategrey:{r:47,g:79,b:79},darkturquoise:{r:0,g:206,b:209},darkviolet:{r:148,g:0,b:211},deeppink:{r:255,g:20,b:147},deepskyblue:{r:0,g:191,b:255},dimgray:{r:105,g:105,b:105},dimgrey:{r:105,g:105,b:105},dodgerblue:{r:30,g:144,b:255},firebrick:{r:178,g:34,b:34},floralwhite:{r:255,g:250,b:240},forestgreen:{r:34,g:139,b:34},fuchsia:{r:255,g:0,b:255},gainsboro:{r:220,g:220,b:220},ghostwhite:{r:248,g:248,b:255},gold:{r:255,g:215,b:0},goldenrod:{r:218,g:165,b:32},gray:{r:128,g:128,b:128},green:{r:0,g:128,b:0},greenyellow:{r:173,g:255,b:47},grey:{r:128,g:128,b:128},honeydew:{r:240,g:255,b:240},hotpink:{r:255,g:105,b:180},indianred:{r:205,g:92,b:92},indigo:{r:75,g:0,b:130},ivory:{r:255,g:255,b:240},khaki:{r:240,g:230,b:140},lavender:{r:230,g:230,b:250},lavenderblush:{r:255,g:240,b:245},lawngreen:{r:124,g:252,b:0},lemonchiffon:{r:255,g:250,b:205},lightblue:{r:173,g:216,b:230},lightcoral:{r:240,g:128,b:128},lightcyan:{r:224,g:255,b:255},lightgoldenrodyellow:{r:250,g:250,b:210},lightgray:{r:211,g:211,b:211},lightgreen:{r:144,g:238,b:144},lightgrey:{r:211,g:211,b:211},lightpink:{r:255,g:182,b:193},lightsalmon:{r:255,g:160,b:122},lightseagreen:{r:32,g:178,b:170},lightskyblue:{r:135,g:206,b:250},lightslategray:{r:119,g:136,b:153},lightslategrey:{r:119,g:136,b:153},lightsteelblue:{r:176,g:196,b:222},lightyellow:{r:255,g:255,b:224},lime:{r:0,g:255,b:0},limegreen:{r:50,g:205,b:50},linen:{r:250,g:240,b:230},magenta:{r:255,g:0,b:255},maroon:{r:128,g:0,b:0},mediumaquamarine:{r:102,g:205,b:170},mediumblue:{r:0,g:0,b:205},mediumorchid:{r:186,g:85,b:211},mediumpurple:{r:147,g:112,b:219},mediumseagreen:{r:60,g:179,b:113},mediumslateblue:{r:123,g:104,b:238},mediumspringgreen:{r:0,g:250,b:154},mediumturquoise:{r:72,g:209,b:204},mediumvioletred:{r:199,g:21,b:133},midnightblue:{r:25,g:25,b:112},mintcream:{r:245,g:255,b:250},mistyrose:{r:255,g:228,b:225},moccasin:{r:255,g:228,b:181},navajowhite:{r:255,g:222,b:173},navy:{r:0,g:0,b:128},oldlace:{r:253,g:245,b:230},olive:{r:128,g:128,b:0},olivedrab:{r:107,g:142,b:35},orange:{r:255,g:165,b:0},orangered:{r:255,g:69,b:0},orchid:{r:218,g:112,b:214},palegoldenrod:{r:238,g:232,b:170},palegreen:{r:152,g:251,b:152},paleturquoise:{r:175,g:238,b:238},palevioletred:{r:219,g:112,b:147},papayawhip:{r:255,g:239,b:213},peachpuff:{r:255,g:218,b:185},peru:{r:205,g:133,b:63},pink:{r:255,g:192,b:203},plum:{r:221,g:160,b:221},powderblue:{r:176,g:224,b:230},purple:{r:128,g:0,b:128},red:{r:255,g:0,b:0},rosybrown:{r:188,g:143,b:143},royalblue:{r:65,g:105,b:225},saddlebrown:{r:139,g:69,b:19},salmon:{r:250,g:128,b:114},sandybrown:{r:244,g:164,b:96},seagreen:{r:46,g:139,b:87},seashell:{r:255,g:245,b:238},sienna:{r:160,g:82,b:45},silver:{r:192,g:192,b:192},skyblue:{r:135,g:206,b:235},slateblue:{r:106,g:90,b:205},slategray:{r:112,g:128,b:144},slategrey:{r:112,g:128,b:144},snow:{r:255,g:250,b:250},springgreen:{r:0,g:255,b:127},steelblue:{r:70,g:130,b:180},tan:{r:210,g:180,b:140},teal:{r:0,g:128,b:128},thistle:{r:216,g:191,b:216},tomato:{r:255,g:99,b:71},transparent:{r:0,g:0,b:0,a:0},turquoise:{r:64,g:224,b:208},violet:{r:238,g:130,b:238},wheat:{r:245,g:222,b:179},white:{r:255,g:255,b:255},whitesmoke:{r:245,g:245,b:245},yellow:{r:255,g:255,b:0},yellowgreen:{r:154,g:205,b:50}},Bu="qcm-color";function Uu(...e){const t={type:Bu,r:0,g:0,b:0,a:1,invalid:!1,spaces:{}};let n=0,r=0,o=0,i=1;if(null!==(a=e[0])&&"object"==typeof a&&"type"in a&&a.type===Bu)({r:n,g:r,b:o,a:i}=e[0]),t.invalid=e[0].invalid,t.spaces={...e[0].spaces};else if($u(e[0]))({r:n,g:r,b:o}=e[0]),"a"in e[0]&&({a:i}=e[0]);else if(e.length<3)if("string"==typeof e[0]){const a=e[0];let s;if(s=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10);else if(s=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a))n=parseInt(s[1],10),r=parseInt(s[2],10),o=parseInt(s[3],10),i=parseFloat(s[4]);else if(s=/^ARGB\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i.exec(a))i=parseInt(s[1],10)/255,n=parseInt(s[2],10),r=parseInt(s[3],10),o=parseInt(s[4],10);else if(s=/^#([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})([A-Fa-f0-9]{2})$/i.exec(a))n=parseInt(s[1],16),r=parseInt(s[2],16),o=parseInt(s[3],16),i=1;else if(s=/^#([A-Fa-f0-9])([A-Fa-f0-9])([A-Fa-f0-9])$/i.exec(a))n=parseInt(s[1]+s[1],16),r=parseInt(s[2]+s[2],16),o=parseInt(s[3]+s[3],16),i=1;else if(s=/^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const f=a-.5*l;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else if(s=/^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d(\.\d+)?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);i=parseFloat(s[7]),e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a<=.5?2*a*t:(2-2*a)*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const f=a-.5*l;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o)}else if(s=/^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(a)){let e=parseFloat(s[1]),t=parseFloat(s[3]),a=parseFloat(s[5]);e%=360,t/=100,a/=100,e=e<0?0:e>360?360:e,t=t<0?0:t>1?1:t,a=a<0?0:a>1?1:a;const l=a*t;let c=e/60;const u=l*(1-Math.abs(c%2-1));let d=[];switch(c=Math.floor(c),c){case 0:d=[l,u,0];break;case 1:d=[u,l,0];break;case 2:d=[0,l,u];break;case 3:d=[0,u,l];break;case 4:d=[u,0,l];break;case 5:d=[l,0,u];break;default:d=[0,0,0]}const f=a-l;n=d[0]+f,r=d[1]+f,o=d[2]+f,n=Math.round(255*n),r=Math.round(255*r),o=Math.round(255*o),i=1}else{const e=a.toLowerCase();if(function(e){return e in Fu}(e)){const t=Fu[e];({r:n,g:r,b:o}=t),i="a"in t?t.a:1}else t.invalid=!0}}else"number"==typeof e[0]&&e[0]>=0&&"argb"===e[1]?(i=(4278190080&e[0])>>>24,i/=255,n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):"number"==typeof e[0]&&e[0]>=0?(n=(16711680&e[0])>>16,r=(65280&e[0])>>8,o=255&e[0]):t.invalid=!0;else 3===e.length||4===e.length?(n=e[0],r=e[1],o=e[2],i=4===e.length?e[3]:1):t.invalid=!0;var a;return Number.isNaN(+n+r+o+i)&&(t.invalid=!0),t.r=Math.floor(n),t.g=Math.floor(r),t.b=Math.floor(o),t.a=i,t}function Wu(e){let t,n,r;if($u(e))return t=e.r.toString(16),n=e.g.toString(16),r=e.b.toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${[t,n,r].join("")}`;const o="string"==typeof e?zu(e):e;return t=((16711680&o)>>16).toString(16),n=((65280&o)>>8).toString(16),r=(255&o).toString(16),1===t.length&&(t=`0${t}`),1===n.length&&(n=`0${n}`),1===r.length&&(r=`0${r}`),`#${t}${n}${r}`}function Hu(e){let t,n,r=0;const o="string"==typeof e?Uu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,{a:l}=o,c=Math.max(i,a,s),u=Math.min(i,a,s),d=(c+u)/2;if(c===u)t=0,r=0;else{switch(n=c-u,t=d>.5?n/(2-c-u):n/(c+u),c){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r,s:100*t,l:100*d,a:l}}function Vu(e){let t,n,r=0;const o="string"==typeof e?Uu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=l;if(l===c)t=0,r=0;else{switch(n=l-c,t=0===n?0:n/u,l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return{h:360*r%360,s:100*t,v:100*u}}function Gu(e){if($u(e))return`rgb(${e.r}, ${e.g}, ${e.b})`;const t="string"==typeof e?zu(e):e;return`rgb(${(16711680&t)>>16}, ${(65280&t)>>8}, ${255&t})`}function Ku(e,t){return $u(e)?`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`:Ku(Uu(e))}function Ju(e){return $u(e)?1===e.a?Gu(e):Ku(e):Ju(Uu(e))}const Qu=e=>{const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};function Zu(e){return.2126*Qu(e.r)+.7152*Qu(e.g)+.0722*Qu(e.b)}function Xu(...e){const t=Uu(...e),n={type:t.type,r:t.r,g:t.g,b:t.b,a:t.a,invalid:t.invalid,spaces:t.spaces},r=()=>(n.spaces.hslaObject||(n.spaces.hslaObject=Hu(n)),n.spaces.hslaObject),o=e=>{const t=r(),{h:n,s:o,l:i,a:a}=t;return`hsla(${n}, ${o}, ${Math.max(0,Math.min(i+e,100))}, ${a})`};return{get type(){return n.type},isInvalid:()=>n.invalid,get r(){return n.r},get g(){return n.g},get b(){return n.b},get a(){return n.a},getR:()=>n.r,getG:()=>n.g,getB:()=>n.b,getAlpha:()=>n.a,setAlpha:e=>{n.a=e,n.spaces={}},isEqualTo:e=>{let t;if("string"==typeof e)t=Uu(e);else{if(e.type!==n.type)return!1;t=e}return t.r===n.r&&t.g===n.g&&t.b===n.b&&t.a===n.a},isDark:()=>function(...e){const t=Uu(...e);return t.invalid||Zu(t)<.4}(n),getRGB:()=>(n.spaces.rgb||(n.spaces.rgb=Gu(n)),n.spaces.rgb),getRGBA:()=>(n.spaces.rgba||(n.spaces.rgba=Ku(n)),n.spaces.rgba),getString:()=>(n.spaces.string||(n.spaces.string=Ju(n)),n.spaces.string),getHex:()=>(n.spaces.hex||(n.spaces.hex=Wu(n)),n.spaces.hex),getHSL:()=>(n.spaces.hsl||(n.spaces.hsl=function(e){let t,n,r=0;const o="string"==typeof e?Uu(e):e,i=o.r/255,a=o.g/255,s=o.b/255,l=Math.max(i,a,s),c=Math.min(i,a,s),u=(l+c)/2;if(l===c)t=0,r=0;else{switch(n=l-c,t=u>.5?n/(2-l-c):n/(l+c),l){case i:r=(a-s)/n+(a<s?6:0);break;case a:r=(s-i)/n+2;break;case s:r=(i-a)/n+4}r/=6}return`hsl(${360*r}, ${100*t}, ${100*u})`}(n)),n.spaces.hsl),getHSLA:()=>(n.spaces.hsla||(n.spaces.hsla=function(e){const{h:t,s:n,l:r,a:o}=Hu(e);return`hsla(${t}, ${n}, ${r}, ${o})`}(n)),n.spaces.hsla),getHSLAObject:r,getShiftedHSLA:o,getHSV:()=>(n.spaces.hsv||(n.spaces.hsv=function(e){const{h:t,s:n,v:r}=Vu(e);return`hsv(${t}, ${n}, ${r})`}(n)),n.spaces.hsv),getHSVObject:()=>(n.spaces.hsvObject||(n.spaces.hsvObject=Vu(n)),n.spaces.hsvObject),blend:(e,t)=>`rgba(${Math.floor(n.r+(e.r-n.r)*t)}, ${Math.floor(n.g+(e.g-n.g)*t)}, ${Math.floor(n.b+(e.b-n.b)*t)}, ${Math.floor(n.a+(e.getAlpha()-n.a)*t)})`,getBrightenedColor:(e=1)=>Xu(o(18*e)),getDarkenedColor:(e=1)=>Xu(o(18*-e))}}function Yu(e,t){if(!e||!t)return;const n=Zu(e),r=Zu(t);return n>r?(n+.05)/(r+.05):(r+.05)/(n+.05)}const ed="#FFFFFF";function td(e,t){const n=Xu(ed),r=Xu(e),o=Xu(t);if(r.isInvalid()||o.isInvalid()||r.getAlpha()<1||o.getAlpha()<1)return t;const i=Yu(n,r),a=Yu(o,r),s=i>a||i>4.5;return!s&&a>3?o.getHex():s?ed:"#000000"}function nd(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rd,od,id,ad="top",sd="top-right",ld="right",cd="bottom-right",ud="bottom",dd="bottom-left",fd="left",pd="top-left";nd(nd(nd(nd(nd(nd(nd(nd(nd(nd(rd={},"equal-equal",[ad,ud]),"equal-higher",[ud,cd]),"equal-lower",[ad,sd]),"equal-void",[ad,ud]),"higher-equal",[fd,dd,ad,sd]),"higher-higher-acute",[ud,dd,fd,sd]),"higher-higher-obtuse",[ud,ad]),"higher-lower-negative",[ad,sd,ld]),"higher-lower-positive",[ud,dd,fd]),"higher-void",[ad]),nd(nd(nd(nd(nd(nd(nd(nd(nd(nd(rd,"lower-equal",[ad]),"lower-higher-negative",[ad,pd]),"lower-higher-positive",[cd]),"lower-lower-acute",[ad,pd,fd,sd,ld]),"lower-lower-obtuse",[ad,ud]),"lower-void",[ad]),"void-equal",[ad]),"void-higher",[ad,ud]),"void-lower",[ad,ud,fd]),"void-void",[ad]),nd(rd,"unclassified",[ad,ud,ld,fd,sd,cd,dd,pd]);var hd=function(){if(id)return od;id=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return od=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},od}();function md(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gd(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function bd(){}!function(e){e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")&&e.default}(hd);var yd=.7,vd=1/yd,Sd="\\s*([+-]?\\d+)\\s*",wd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",kd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xd=/^#([0-9a-f]{3,8})$/,Cd=new RegExp(`^rgb\\(${Sd},${Sd},${Sd}\\)$`),Ed=new RegExp(`^rgb\\(${kd},${kd},${kd}\\)$`),Ld=new RegExp(`^rgba\\(${Sd},${Sd},${Sd},${wd}\\)$`),Rd=new RegExp(`^rgba\\(${kd},${kd},${kd},${wd}\\)$`),Td=new RegExp(`^hsl\\(${wd},${kd},${kd}\\)$`),qd=new RegExp(`^hsla\\(${wd},${kd},${kd},${wd}\\)$`),Pd={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Id(){return this.rgb().formatHex()}function _d(){return this.rgb().formatRgb()}function Od(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=xd.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Dd(t):3===n?new Md(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Ad(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Ad(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Cd.exec(e))?new Md(t[1],t[2],t[3],1):(t=Ed.exec(e))?new Md(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Ld.exec(e))?Ad(t[1],t[2],t[3],t[4]):(t=Rd.exec(e))?Ad(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Td.exec(e))?Wd(t[1],t[2]/100,t[3]/100,1):(t=qd.exec(e))?Wd(t[1],t[2]/100,t[3]/100,t[4]):Pd.hasOwnProperty(e)?Dd(Pd[e]):"transparent"===e?new Md(NaN,NaN,NaN,0):null}function Dd(e){return new Md(e>>16&255,e>>8&255,255&e,1)}function Ad(e,t,n,r){return r<=0&&(e=t=n=NaN),new Md(e,t,n,r)}function Nd(e){return e instanceof bd||(e=Od(e)),e?new Md((e=e.rgb()).r,e.g,e.b,e.opacity):new Md}function jd(e,t,n,r){return 1===arguments.length?Nd(e):new Md(e,t,n,null==r?1:r)}function Md(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function $d(){return`#${Ud(this.r)}${Ud(this.g)}${Ud(this.b)}`}function zd(){const e=Fd(this.opacity);return`${1===e?"rgb(":"rgba("}${Bd(this.r)}, ${Bd(this.g)}, ${Bd(this.b)}${1===e?")":`, ${e})`}`}function Fd(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Bd(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ud(e){return((e=Bd(e))<16?"0":"")+e.toString(16)}function Wd(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Vd(e,t,n,r)}function Hd(e){if(e instanceof Vd)return new Vd(e.h,e.s,e.l,e.opacity);if(e instanceof bd||(e=Od(e)),!e)return new Vd;if(e instanceof Vd)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new Vd(a,s,l,e.opacity)}function Vd(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Gd(e){return(e=(e||0)%360)<0?e+360:e}function Kd(e){return Math.max(0,Math.min(1,e||0))}function Jd(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}md(bd,Od,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Id,formatHex:Id,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Hd(this).formatHsl()},formatRgb:_d,toString:_d}),md(Md,jd,gd(bd,{brighter(e){return e=null==e?vd:Math.pow(vd,e),new Md(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?yd:Math.pow(yd,e),new Md(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Md(Bd(this.r),Bd(this.g),Bd(this.b),Fd(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$d,formatHex:$d,formatHex8:function(){return`#${Ud(this.r)}${Ud(this.g)}${Ud(this.b)}${Ud(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:zd,toString:zd})),md(Vd,function(e,t,n,r){return 1===arguments.length?Hd(e):new Vd(e,t,n,null==r?1:r)},gd(bd,{brighter(e){return e=null==e?vd:Math.pow(vd,e),new Vd(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?yd:Math.pow(yd,e),new Vd(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Md(Jd(e>=240?e-240:e+120,o,r),Jd(e,o,r),Jd(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Vd(Gd(this.h),Kd(this.s),Kd(this.l),Fd(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Fd(this.opacity);return`${1===e?"hsl(":"hsla("}${Gd(this.h)}, ${100*Kd(this.s)}%, ${100*Kd(this.l)}%${1===e?")":`, ${e})`}`}}));const Qd=Math.PI/180,Zd=180/Math.PI,Xd=.96422,Yd=.82521,ef=4/29,tf=6/29,nf=3*tf*tf,rf=tf*tf*tf;function of(e){if(e instanceof af)return new af(e.l,e.a,e.b,e.opacity);if(e instanceof df)return ff(e);e instanceof Md||(e=Nd(e));var t,n,r=uf(e.r),o=uf(e.g),i=uf(e.b),a=sf((.2225045*r+.7168786*o+.0606169*i)/1);return r===o&&o===i?t=n=a:(t=sf((.4360747*r+.3850649*o+.1430804*i)/Xd),n=sf((.0139322*r+.0971045*o+.7141733*i)/Yd)),new af(116*a-16,500*(t-a),200*(a-n),e.opacity)}function af(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function sf(e){return e>rf?Math.pow(e,1/3):e/nf+ef}function lf(e){return e>tf?e*e*e:nf*(e-ef)}function cf(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function uf(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function df(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function ff(e){if(isNaN(e.h))return new af(e.l,0,0,e.opacity);var t=e.h*Qd;return new af(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}md(af,function(e,t,n,r){return 1===arguments.length?of(e):new af(e,t,n,null==r?1:r)},gd(bd,{brighter(e){return new af(this.l+18*(null==e?1:e),this.a,this.b,this.opacity)},darker(e){return new af(this.l-18*(null==e?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return new Md(cf(3.1338561*(t=Xd*lf(t))-1.6168667*(e=1*lf(e))-.4906146*(n=Yd*lf(n))),cf(-.9787684*t+1.9161415*e+.033454*n),cf(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),md(df,function(e,t,n,r){return 1===arguments.length?function(e){if(e instanceof df)return new df(e.h,e.c,e.l,e.opacity);if(e instanceof af||(e=of(e)),0===e.a&&0===e.b)return new df(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Zd;return new df(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}(e):new df(e,t,n,null==r?1:r)},gd(bd,{brighter(e){return new df(this.h,this.c,this.l+18*(null==e?1:e),this.opacity)},darker(e){return new df(this.h,this.c,this.l-18*(null==e?1:e),this.opacity)},rgb(){return ff(this).rgb()}}));var pf=e=>()=>e;function hf(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):pf(isNaN(e)?t:e)}!function e(t){var n=function(e){return 1===(e=+e)?hf:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):pf(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=jd(e)).r,(t=jd(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=hf(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);var mf,gf="center",bf="bottom";function yf(e){var t=0,n=e.children,r=n&&n.length;if(r)for(;--r>=0;)t+=n[r].value;else t=1;e.value=t}function vf(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=wf)):void 0===t&&(t=Sf);for(var n,r,o,i,a,s=new Cf(e),l=[s];n=l.pop();)if((o=t(n.data))&&(a=(o=Array.from(o)).length))for(n.children=o,i=a-1;i>=0;--i)l.push(r=o[i]=new Cf(o[i])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(xf)}function Sf(e){return e.children}function wf(e){return Array.isArray(e)?e[1]:null}function kf(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function xf(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function Cf(e){this.data=e,this.depth=this.height=0,this.parent=null}[{key:"NoDataExist",alignment:gf,condition:function(e){var t=e.layoutService;if(!t)return!1;var n=t.meta.size;return n.x*n.y===0}},{key:"OnlyNanDataMeasure",translationKey:"OnlyNanData",alignment:gf,condition:function(e){var t=e.layoutService;return!!t&&t.getHyperCubeValue("qMeasureInfo").every(function(e){return"NaN"===e.qMin&&"NaN"===e.qMax})}},{key:"OnlyNanDataDimensionContinuous",translationKey:"OnlyNanData",alignment:gf,condition:function(e){var t=e.layoutService;if(!t)return!1;if(!t.meta.isContinuous)return!1;var n=t.getHyperCubeValue("qDimensionInfo.0");return n&&(n.qMax<n.qMin||"NaN"===n.qMax)}},{key:"OnlyNegativeOrZeroValues",alignment:gf},{key:"DataRangeIncludingZero",alignment:bf},{key:"LimitedData",alignment:bf},{key:"NegativeOrZeroValues",alignment:bf}].reduce(function(e,t){return e[t.key]=t,e},{}),Cf.prototype=vf.prototype={constructor:Cf,count:function(){return this.eachAfter(yf)},each:function(e,t){let n=-1;for(const r of this)e.call(t,r,++n,this);return this},eachAfter:function(e,t){for(var n,r,o,i=this,a=[i],s=[],l=-1;i=a.pop();)if(s.push(i),n=i.children)for(r=0,o=n.length;r<o;++r)a.push(n[r]);for(;i=s.pop();)e.call(t,i,++l,this);return this},eachBefore:function(e,t){for(var n,r,o=this,i=[o],a=-1;o=i.pop();)if(e.call(t,o,++a,this),n=o.children)for(r=n.length-1;r>=0;--r)i.push(n[r]);return this},find:function(e,t){let n=-1;for(const r of this)if(e.call(t,r,++n,this))return r},sum:function(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,o=r&&r.length;--o>=0;)n+=r[o].value;t.value=n})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,n=function(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),o=null;for(e=n.pop(),t=r.pop();e===t;)o=e,e=n.pop(),t=r.pop();return o}(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var o=r.length;e!==n;)r.splice(o,0,e),e=e.parent;return r},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t},copy:function(){return vf(this).eachBefore(kf)},[Symbol.iterator]:function*(){var e,t,n,r,o=this,i=[o];do{for(e=i.reverse(),i=[];o=e.pop();)if(yield o,t=o.children)for(n=0,r=t.length;n<r;++n)i.push(t[n])}while(i.length)}},mf=function(e){
24
24
  /*! javascript-number-formatter - v1.1.11 - http://mottie.github.com/javascript-number-formatter/ * © ecava */
25
25
  e.exports=function(e,t){if(!e||isNaN(+t))return t;var n,r,o,i,a,s,l,c,u,d,f=e.length,p=e.search(/[0-9\-\+#]/),h=p>0?e.substring(0,p):"",m=e.split("").reverse().join(""),g=m.search(/[0-9\-\+#]/),b=f-g,y=e.substring(b,b+1),v=b+("."===y||","===y?1:0),S=g>0?e.substring(v,f):"";if(n=(t="-"===(e=e.substring(p,v)).charAt(0)?-t:+t)<0?t=-t:0,o=(r=e.match(/[^\d\-\+#]/g))&&r[r.length-1]||".",i=r&&r[1]&&r[0]||",",e=e.split(o),t=+(t=t.toFixed(e[1]&&e[1].length))+"",s=e[1]&&e[1].lastIndexOf("0"),(!(c=t.split("."))[1]||c[1]&&c[1].length<=s)&&(t=(+t).toFixed(s+1)),u=e[0].split(i),e[0]=u.join(""),(a=e[0]&&e[0].indexOf("0"))>-1)for(;c[0].length<e[0].length-a;)c[0]="0"+c[0];else 0===+c[0]&&(c[0]="");if((t=t.split("."))[0]=c[0],l=u[1]&&u[u.length-1].length){for(m="",b=(d=t[0]).length%l,f=d.length,v=0;v<f;v++)m+=d.charAt(v),!((v-b+1)%l)&&v<f-l&&(m+=i);t[0]=m}return t[1]=e[1]&&t[1]?o+t[1]:"","0"!==(r=t.join(""))&&""!==r||(n=!1),h+(n?"-":"")+r+S}},mf({exports:{}});const Ef=/,(?![^(]*\))/,Lf=/\s(?![^(]*\))/,Rf=/^[0-9]+[a-zA-Z%]+?$/,Tf=["none","inset","initial","inherit"],qf=e=>{if(!e)return;const t=e.split(Lf).filter(e=>!Tf.includes(e.toLowerCase())).at(-1),n=!t||(e=>"0"===e||Rf.test(e))(t)||Tf.includes(t.toLowerCase())?void 0:t;return n},Pf=e=>e?e.split(Ef).map(e=>e.trim()):[];function If(e,t,n,r){return n&&r?n.getStyle(`object.${r}`,e,t):n?n.getStyle("",e,t):void 0}function _f(e,t,n,r,o){return e&&r?"none"!==e.color?r.getColorPickerColor(e):void 0:If(t,n,r,o)}const Of={originalSize:"auto auto",alwaysFit:"contain",fitWidth:"100% auto",fitHeight:"auto 100%",stretchFit:"100% 100%",alwaysFill:"cover"},Df={"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 Af(e,t,n){if(t)return n?n+t:function(e){var t;let n,r,o,i;if(null!=e&&null!==(t=e.session)&&void 0!==t&&t.config){n=e.session.config,r=new URL(n.url),i="wss:"===r.protocol,o=i?"https://":"http://";const t="/"===r.pathname?"":r.pathname.replace(/\/app\/.*$/,"");return o+r.host+t}return""}(e)+t}function Nf(e,t,n,r){const o=null==e?void 0:e.bgImage;if(o){let i="";if("media"===o.mode||"media"===e.useImage){let e;const a=null==o?void 0:o.mediaUrl,{qUrl:s}=(null==a?void 0:a.qStaticContentUrl)||{};i=s?decodeURIComponent(s):void 0,i=Af(t,i,r),n&&(e=Object.entries(n).map(([e,t])=>`&${e}=${encodeURIComponent(t)}`).join("&"),i=`${i}?${e}`)}"expression"===o.mode&&(i=o.expressionUrl?decodeURIComponent(o.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=Df[e.bgImage.position]),n}(e),s=function(e){var t;let n=Of.originalSize;const r=null==e||null===(t=e.bgImage)||void 0===t?void 0:t.sizing;return r&&(n=Of[r]),n}(e);return i?{url:i,pos:a,size:s}:void 0}}function jf(e,t,n){const r=null==e?void 0:e.bgColor;return r&&t&&(r.useExpression||r.useColorExpression)?t.validateColor(r.colorExpression):_f(null==r?void 0:r.color,"","backgroundColor",t,n)}function Mf(e,t,n){var r,o;const i=If("shadow","boxShadow",t,n);return((e,t,n)=>{if(e&&Tf.includes(e.toLowerCase()))return e.toLowerCase();const r=Pf(e);if(1!==r.length)return e;let o=n;if(!o){const n=Pf(t);if(1!==n.length)return e;o=qf(n[0])}if(!o)return e;const i=qf(r[0]);return i?e.replace(i,o):`${e} ${o}`})((null==e||null===(r=e.shadow)||void 0===r?void 0:r.boxShadow)||i,i,_f(null==e||null===(o=e.shadow)||void 0===o?void 0:o.boxShadowColor,"shadow","boxShadowColor",t,n))}function $f(e,t,n,r){var o;const i=(null==e||null===(o=e.title)||void 0===o?void 0:o[t])||{},a=function(e,t){return e&&Array.isArray(e)?e:"main"===t?["bold"]:[]}(i.fontStyle,t);return{fontFamily:i.fontFamily||n.getStyle(`object.${r}`,`title.${t}`,"fontFamily"),fontSize:i.fontSize||n.getStyle(`object.${r}`,`title.${t}`,"fontSize"),color:i.color&&"none"!==i.color.color?n.getColorPickerColor(i.color):n.getStyle(`object.${r}`,`title.${t}`,"color"),backgroundColor:i.backgroundColor||n.getStyle(`object.${r}`,`title.${t}`,"backgroundColor"),fontWeight:a.includes("bold")?"bold":"normal",fontStyle:a.includes("italic")?"italic":"normal",textDecoration:a.includes("underline")?"underline":"initial"}}const zf={selected:"#00873D",alternative:"#E4E4E4",excluded:"#A9A9A9",selectedExcluded:"#A9A9A9",possible:"#FFFFFF"},Ff=["theme","selections"];function Bf({app:e,themeApi:t,theme:n,queryParams:r,components:o=[],checkboxes:i=!1,hostConfig:a}){var s,l,c,u,d,f,p,h;const m=function(e=[]){const t={};return e.forEach(e=>{const n=null==e?void 0:e.key;Ff.includes(n)&&(t[n]=e)}),t}(o),g=(e,n)=>t.getStyle("object.listBox",e,n),b=e=>(null==e?void 0:e.index)>0||null!=e&&e.color?t.getColorPickerColor(e):void 0,y=function({getColorPickerColor:e,theme:t,getListboxStyle:n,overrides:r,checkboxes:o}){var i,a,s,l,c;const u=null===(i=r.theme)||void 0===i||null===(i=i.content)||void 0===i?void 0:i.fontColor,d=e(u)||n("content","color")||(null===(a=t.palette)||void 0===a?void 0:a.text.primary),f=!o&&(null===(s=null===(l=r.theme)||void 0===l||null===(l=l.content)||void 0===l?void 0:l.useContrastColor)||void 0===s||s),p=(null===(c=r.selections)||void 0===c?void 0:c.colors)||{},h=r=>{var o,i;const a="selected"===r?"main":r,s=`${r}Contrast`,l=e(p[r])||n("",`dataColors.${r}`)||"possible"===r&&n("","backgroundColor")||(null===(o=t.palette)||void 0===o||null===(o=o.selected)||void 0===o?void 0:o[a])||zf[r],c=f?td(l,d):d||(null===(i=t.palette)||void 0===i?void 0:i.selected[`${s}Text}`]);return{[r]:l,[s]:c}};return Z(Z(Z(Z(Z({},h("selected")),h("alternative")),h("excluded")),h("selectedExcluded")),h("possible"))}({getColorPickerColor:b,theme:n,getListboxStyle:g,overrides:m,checkboxes:i}),v=m.theme||{},S=b(null===(s=v.header)||void 0===s?void 0:s.fontColor)||g("title.main","color"),w=function({themeApi:e,themeOverrides:t}){let n;const r=null==t?void 0:t.background;return r?(n=null!=r&&r.useExpression?jf({bgColor:r},e,"listBox"):e.getColorPickerColor(null==r?void 0:r.color),n):n}({themeApi:t,themeOverrides:v}),k=null!==(l=v.background)&&void 0!==l&&l.image?Nf({bgImage:v.background.image},e,r,null==a?void 0:a.host):void 0,x=w||g("","backgroundColor")||n.palette.background.default,C=function(e,t){const n=Xu(t("","backgroundColor"));return n.setAlpha(.7),n.isInvalid()?e:n.getRGBA()}(x,g),E=function(e){return td("#fff",e("content","color"))}(g),L=(null===(c=v.header)||void 0===c?void 0:c.fontStyle)||{},R=(null===(u=v.content)||void 0===u?void 0:u.fontStyle)||{},T=(e,t,n)=>!0===e&&t||!1===e&&n||void 0;return{background:{backgroundColor:x,backgroundImage:null==k||!k.url||null!=k&&k.url.startsWith("url(")?void 0:`url('${k.url}')`,backgroundRepeat:"no-repeat",backgroundSize:null==k?void 0:k.size,backgroundPosition:null==k?void 0:k.pos},header:{color:S,fontSize:(null===(d=v.header)||void 0===d?void 0:d.fontSize)||g("title.main","fontSize"),fontFamily:(null===(f=v.header)||void 0===f?void 0:f.fontFamily)||g("title.main","fontFamily"),fontWeight:T(L.bold,"bold","normal")||g("title.main","fontWeight")||"bold",textDecoration:L.underline?"underline":"initial",fontStyle:T(L.italic,"italic","normal")||g("title.main","fontStyle")||"initial"},content:{backgroundColor:i?void 0:y.possible,color:y.possibleContrast||g("content","color"),fontSize:(null===(p=v.content)||void 0===p?void 0:p.fontSize)||g("content","fontSize"),fontFamily:(null===(h=v.content)||void 0===h?void 0:h.fontFamily)||g("content","fontFamily"),fontWeight:T(R.bold,"bold","normal")||g("content","fontWeight")||"normal",textDecoration:R.underline?"underline":"initial",fontStyle:T(R.italic,"italic","normal")||g("content","fontStyle")||"initial"},search:{color:E,borderColor:n.palette.divider,highlightBorderColor:n.palette.custom.focusBorder,backgroundColor:C,backdropFilter:"blur(8px)"},selections:y}}function Uf({app:e,themeApi:t,theme:n,queryParams:r,components:o,checkboxes:i,hostConfig:a}){return Bf({app:e,themeApi:t,theme:n,queryParams:r,components:o,checkboxes:i,hostConfig:a})}function Wf({alignTo:e,anchorOrigin:t={vertical:"bottom",horizontal:"center"},transformOrigin:o={vertical:"top",horizontal:"center"},show:i,close:a,app:l,fieldName:u,stateName:d="$",autoFocus:p,components:h,checkboxes:m,selectDisabled:g=()=>!1,sortCriteria:b=[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}],direction:y="ltr"}){const v=Boolean(null==u?void 0:u.qLibraryId),S=i&&Boolean(e.current),[w,k]=n(0),x=ts(),C=f(),[L]=Ds({qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:d,qShowAlternatives:!0,qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:b,qFieldDefs:v?void 0:[u]},qLibraryId:v?u.qLibraryId:void 0}},l,u,d),R=c(()=>{L.lock("/qListObjectDef")},[L]),q=c(()=>{L.unlock("/qListObjectDef")},[L]),{translator:I,themeApi:_,keyboardNavigation:O,hostConfig:D}=s(Rs),A=f(),N=f(),[j]=Au(l,L,N),[M]=$s(L),[$]=n(()=>Nu({selectDisabled:g})),z=Ql({containerRef:N,enabled:O}),{checkboxes:F=m}=M||{},B=Uf({themeApi:_,theme:x,hostConfig:D,components:h,checkboxes:F});if(r(()=>{j&&S&&(j.isModal(L)||j.goModal("/qListObjectDef"))},[j,S]),!(L&&M&&I&&B))return null;const U=!0===M.qListObject.qDimensionInfo.qLocked,W=(e,t)=>{const n="escapeKeyDown"!==t;j.noModal(n),a()},H=ru({layout:M,model:L,translator:I,selectionState:$,selections:j}),V=Mu(M);return or.jsx(P,{className:"listbox-container",open:S,onClose:W,anchorEl:e.current,anchorOrigin:t,transformOrigin:o,slotProps:{paper:{style:{minWidth:"250px"}}},onKeyDown:e=>"Enter"===e.key?W():void 0,direction:y,children:or.jsxs(E,{container:!0,direction:"column",gap:0,ref:N,children:[or.jsxs(E,{container:!0,style:{direction:y,padding:x.spacing(1)},children:[or.jsx(E,{children:U?or.jsx(T,{onClick:q,disabled:!U,size:"large","aria-label":I.get("Listbox.Unlock"),title:I.get("Listbox.Unlock"),children:or.jsx(el,{})}):or.jsx(T,{onClick:R,disabled:!V,size:"large","aria-label":I.get("Listbox.Lock"),title:I.get("Listbox.Lock"),children:or.jsx(nl,{})})}),or.jsx(E,{size:"grow"}),or.jsx(E,{children:or.jsx(Cu,{layout:M,more:{enabled:!U,actions:H,alignTo:A,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"}},selections:{show:!0,api:j,onConfirm:W,onCancel:()=>W(0,"escapeKeyDown")}})})]}),or.jsxs(E,{size:"grow",role:"region","aria-label":I.get("Listbox.ResultFilterLabel"),children:[or.jsx("div",{ref:A}),or.jsx(E,{children:or.jsx(Pu,{ref:C,popoverOpen:S,styles:B,visible:!0,model:L,listCount:w,selections:j,selectionState:$,keyboard:{enabled:!1,innerTabStops:!0,focusSelection:z.focusSelection},autoFocus:null==p||p,direction:y})}),or.jsx(Xc,{model:L,app:l,layout:M,selections:j,selectionState:$,direction:y,onSetListCount:e=>k(e),onCtrlF:()=>{C.current.focus()},styles:B,keyboard:z})]})]})})}function Hf({displayName:e}){return or.jsx(k,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600,marginTop:"8px"},children:e})}function Vf({field:e,api:t,stateIx:r=0,skipHandleShowListBoxPopover:o=!1,moreAlignTo:i=null,onClose:a=()=>{}}){const{translator:l}=s(Rs),c=i||f(),u=ts(),[d,p]=n(!1);let h,m=null,g=null,b="";const y=!!e.isPinned,v=()=>{p(!1),a()};if(y)b=e.qName||e.qField,g=or.jsx(Hf,{displayName:b});else{h=e.selections[r],void 0===h.qTotal&&(h.qTotal=0);const n=h.qStateCounts||{qSelected:0,qLocked:0,qExcluded:0,qLockedExcluded:0,qSelectedExcluded:0,qAlternative:0},o=(n.qSelected+n.qLocked)/h.qTotal,a=n.qAlternative/h.qTotal,s=(n.qExcluded+n.qLockedExcluded+n.qSelectedExcluded)/h.qTotal,c=n.qSelected+n.qSelectedExcluded+n.qLocked+n.qLockedExcluded,d=0===c&&0===h.qTotal;let f="";h.qTotal===c&&h.qTotal>1?f=l.get("CurrentSelections.All"):c>1&&h.qTotal?f=l.get("CurrentSelections.Of",[c,h.qTotal]):h.qSelectedFieldSelectionInfo&&(f=h.qSelectedFieldSelectionInfo.map(e=>e.qName).join(", ")),"$"!==e.states[r]&&(f=`${e.states[r]}: ${f}`);const p=[{color:u.palette.selected.main,ratio:o},{color:u.palette.selected.alternative,ratio:a},{color:u.palette.selected.excluded,ratio:s}];p.forEach((e,t)=>{e.offset=t?p[t-1].offset+p[t-1].ratio:0});let m=null,b=null,y=null;i||(m=or.jsxs(E,{sx:{flex:1,minWidth:0,opacity:h.qLocked?"0.3":""},children:[or.jsx(k,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},children:e.label}),or.jsx(k,{noWrap:!0,style:{fontSize:"12px",opacity:.55,lineHeight:"16px"},children:f})]}),h.qLocked?b=or.jsx(E,{children:or.jsx(T,{size:"large",children:or.jsx(el,{})})}):h.qOneAndOnlyOne||(b=or.jsx(E,{children:or.jsx(T,{title:l.get("Selection.Clear"),onClick:n=>{n.stopPropagation(),t.clearField(h.qField,e.states[r])},size:"large",children:or.jsx(Ys,{})})})),y=or.jsx("div",{style:{height:"4px",position:"absolute",bottom:"0",left:"0",width:"100%"},children:!1===d&&p.map(e=>or.jsx("div",{style:{position:"absolute",background:e.color,height:"100%",top:0,width:100*e.ratio+"%",left:100*e.offset+"%"}},e.color))}),g=or.jsxs(or.Fragment,{children:[m,b,y]}))}return m=or.jsxs(E,{container:!0,gap:1,ref:c,"data-testid":y?`pin-item-${b}`:`selection-item-${h.qField}`,sx:{backgroundColor:u.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px",height:"40px","&:hover":{backgroundColor:u.palette.action.hover}},onClick:!1===o&&(e=>{e.currentTarget.contains(e.target)&&p(!d)})||null,children:[g,d&&or.jsx(Wf,{alignTo:c,show:d,close:v,app:t.model,fieldName:y?e.qField:h.qField,stateName:y?void 0:e.states[r]})]}),i?or.jsx(Wf,{alignTo:c,show:!0,close:v,app:t.model,fieldName:y?e.qField:h.qField,stateName:y?void 0:e.states[r]}):m}var Gf=e=>Xs((e=>Z(Z({},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 Kf={item:"MultiState-item"},Jf=ns(E)(({theme:e})=>({[`&.${Kf.item}`]:{backgroundColor:e.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:e.palette.action.hover},height:"100%",alignItems:"center"}}));function Qf({field:e,api:t,moreAlignTo:r=null,onClose:o=()=>{}}){const[i,a]=n(!!r),[l,c]=n(-1),[u,d]=n(r?r.current:null),p=r||f(),{translator:h}=s(Rs),m=h.get("Selection.ClearAllStates"),g=()=>{c(-1),o()};let b=null;r||(b=or.jsxs(or.Fragment,{children:[or.jsx(E,{sx:{minWidth:0,flexGrow:1},children:or.jsx(j,{style:{padding:"0px 8px"},color:"secondary",badgeContent:e.states.length,children:or.jsx(k,{component:"span",noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},children:e.label})})}),or.jsx(E,{children:or.jsx("div",{style:{width:"12px"}})}),or.jsx(E,{children:or.jsx(T,{size:"large",children:or.jsx(Gf,{})})})]}));const y=or.jsxs(M,{dense:!0,children:[or.jsx($,{title:m,onClick:()=>{e.states.forEach(n=>t.clearField(e.name,n))},children:or.jsx(z,{variant:"contained",fullWidth:!0,children:m})}),e.states.map((n,r)=>or.jsx($,{title:e.label,onClick:e=>((e,t)=>{e.stopPropagation(),a(!1),c(t)})(e,r),children:or.jsx(C,{border:1,width:"100%",borderRadius:1,borderColor:"divider",children:or.jsx(Vf,{field:e,api:t,stateIx:r,skipHandleShowListBoxPopover:!0})})},r))]}),v=or.jsx(P,{open:i,onClose:()=>{a(!1),o()},anchorEl:u,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}},children:y}),S=r?v:or.jsxs(Jf,{container:!0,gap:0,className:Kf.item,onClick:e=>{e.currentTarget.contains(e.target)&&(d(e.currentTarget),p.current=e.currentTarget,a(!i))},children:[b,i&&v,l>-1&&or.jsx(Wf,{alignTo:p,show:l>-1,close:g,app:t.model,fieldName:e.selections[l].qField,stateName:e.states[l]})]});return r&&l>-1?or.jsx(Wf,{alignTo:p,show:l>-1,close:g,app:t.model,fieldName:e.selections[l].qField,stateName:e.states[l]}):S}const Zf="More",Xf={item:`${Zf}-item`,badge:`${Zf}-badge`},Yf=ns(E)(({theme:e})=>({[`&.${Xf.item}`]:{backgroundColor:e.palette.background.paper,position:"relative",cursor:"pointer",padding:"4px","&:hover":{backgroundColor:e.palette.action.hover},height:"100%",alignItems:"center"},[`& .${Xf.badge}`]:{padding:e.spacing(0,1)}}));function ep({items:e=[],api:t}){const r=ts(),[o,i]=n(!1),[a,s]=n(-1),[l,c]=n(null),u=f(),d=()=>{s(-1)};let p=null;return a>-1&&(p=e[a].states.length>1?or.jsx(Qf,{field:e[a],api:t,moreAlignTo:u,onClose:d}):or.jsx(Vf,{field:e[a],api:t,skipHandleShowListBoxPopover:!0,moreAlignTo:u,onClose:d})),or.jsxs(Yf,{container:!0,gap:0,className:Xf.item,onClick:e=>{e.currentTarget.contains(e.target)&&(c(e.currentTarget),u.current=e.currentTarget,i(!o))},children:[or.jsx(E,{children:or.jsx(C,{borderRadius:r.shape.borderRadius,style:{padding:"4px 8px 4px 8px",backgroundColor:r.palette.selected.main,color:r.palette.selected.mainContrastText},children:or.jsxs(k,{noWrap:!0,style:{fontSize:"12px",lineHeight:"16px",fontWeight:600},color:"inherit",children:["+",e.length]})})}),or.jsx(E,{children:or.jsx(T,{size:"large",children:or.jsx(Gf,{})})}),o&&or.jsx(P,{open:o,onClose:()=>{i(!1)},anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},PaperProps:{style:{minWidth:"200px",width:"200px",pointerEvents:"auto"}},children:or.jsx(M,{dense:!0,children:e.map((e,n)=>or.jsx($,{title:e.name,onClick:e=>((e,t)=>{e.stopPropagation(),i(!1),s(t)})(e,n),children:or.jsx(C,{border:1,width:"100%",borderRadius:1,borderColor:"divider",children:e.states.length>1?or.jsx(Qf,{field:e,api:t}):or.jsx(Vf,{field:e,api:t})})},n))})}),p]})}function tp({api:e,app:t}){const n=ts(),[r]=Ns(t),[o]=$s(r),[a]=(e=>{var t;const[n]=Ws(e,"FieldList",Hs),[r]=Ms(n,"getLayout"),o=(e=>{if(!e)return;const t=[];for(let n=0;n<e.length;++n){const r=e[n];if(t.push(r),r.qDerivedFieldData)for(let e=0;e<r.qDerivedFieldData.qDerivedFieldLists.length;++e){const n=r.qDerivedFieldData.qDerivedFieldLists[e];for(let e=0;e<n.qFieldDefs.length;++e){const o=n.qFieldDefs[e];t.push({qName:o.qName,qSrcTables:r.qSrcTables,qTags:o.qTags,isDerived:!0,sourceField:r.qName,derivedDefinitionName:n.qDerivedDefinitionName})}}}return t})(null==r||null===(t=r.qFieldList)||void 0===t?void 0:t.qItems);return[o]})(t),[l]=(e=>{var t;const[n]=Ws(e,"DimensionList",Vs),[r]=Ms(n,"getLayout");return[null==r||null===(t=r.qDimensionList)||void 0===t?void 0:t.qItems]})(t),[c]=Us(t),{modalObjectStore:u}=s(Rs).selectionStore,[d,f]=Fs(),p=i(()=>{const e=function(e){if(!e)return[];const t={};function n(e,n){e.qSelections.forEach(e=>{const r=e.qField;let o=t[r];var i;void 0===o&&(o={name:r,label:(null===(i=e.qDimensionReferences)||void 0===i||null===(i=i.find(e=>e.qLabel))||void 0===i?void 0:i.qLabel)||e.qReadableName||r,states:[],selections:[]},t[r]=o),o.states.push(n),o.selections.push(e)})}return e.qSelectionObject&&n(e.qSelectionObject,"$"),e.alternateStates&&e.alternateStates.forEach(e=>n(e.qSelectionObject,e.stateName)),Object.keys(t).map(e=>t[e]).filter(e=>!e.selections.some(e=>e.qIsHidden))}(o).sort(Js);return Qs(a,c,e,l)},[o,a,c,l]),h=(e=>{if(!e)return 0;const{width:t}=e,n=Math.floor(t)-72;return Math.floor(n/120)})(f),{items:m,more:g}=(({currentItems:e,containerRef:t,maxItems:n,isInListboxPopover:r})=>{var o;if(!t)return{items:[],more:[]};const i=[...e],a=null!==(o=t.items)&&void 0!==o?o:[];if(r()&&i.length+1===a.length){const e=a.filter(e=>!1===i.some(t=>e.name===t.name))[0];if(e&&!e.isPinned){const{qField:t}=e.selections[0];e.selections=[{qField:t}];const n=a.indexOf(e);i.splice(n,0,e)}}let s=[];return n<i.length&&(s=i.splice(0,i.length-n)),t.items=i,{items:i,more:s}})({currentItems:p,containerRef:d,maxItems:h,isInListboxPopover:()=>{const{model:e}=u.get(t.id)||{};return"njsListbox"===(null==e?void 0:e.genericType)}});return or.jsxs(E,{ref:d,container:!0,gap:0,wrap:"nowrap",style:{height:"100%"},children:[g.length>0&&or.jsx(E,{style:{position:"relative",maxWidth:"98px",minWidth:"72px",background:n.palette.background.paper,borderRight:`1px solid ${n.palette.divider}`},children:or.jsx(ep,{items:g,api:e})}),m.map((t,r)=>{var o;return or.jsx(E,{style:{position:"relative",maxWidth:"240px",minWidth:"120px",background:n.palette.background.paper,borderRight:`1px solid ${n.palette.divider}`},children:t.states.length>1?or.jsx(Qf,{field:t,api:e}):or.jsx(Vf,{field:t,api:e})},`${t.states.join("::")}::${null!==(o=t.qField)&&void 0!==o?o:t.name}${r}`)})]})}var np=e=>Xs((e=>Z(Z({},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 rp=e=>Xs((e=>Z(Z({},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 op(e){const[t]=Ns(e),[o]=$s(t),[i]=zs(e),[a,s]=n(null);return r(()=>{i&&t&&o&&((e,t,n)=>{const r=[...n.qStateNames||[]].map(e=>({stateName:e,qSelectionObjectDef:{qStateName:e}})),o=(t&&t.alternateStates?t.alternateStates.map(e=>e.stateName):[]).join("::"),i=(n.qStateNames||[]).map(e=>e).join("::");o!==i&&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]}function ip({api:e,app:t}){const{translator:n}=s(Rs),[r]=op(t);return or.jsxs(E,{container:!0,wrap:"nowrap",style:{height:"100%",alignItems:"center",padding:"0 8px"},children:[or.jsx(E,{children:or.jsx(T,{style:{marginRight:"8px"},disabled:!r||!r.canGoBack,title:n.get("Navigate.Back"),onClick:()=>e.back(),size:"large",children:or.jsx(np,{})})}),or.jsx(E,{children:or.jsx(T,{style:{marginRight:"8px"},disabled:!r||!r.canGoForward,title:n.get("Navigate.Forward"),onClick:()=>e.forward(),size:"large",children:or.jsx(rp,{})})}),or.jsx(E,{children:or.jsx(T,{disabled:!r||!r.canClear,title:n.get("Selection.ClearAll"),onClick:()=>e.clear(),size:"large",children:or.jsx(du,{})})})]})}const ap=[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]];function sp([e,t]){return(e+(Math.random()*(t-e)|0)).toString(32)}function lp(){return ap.map(sp).join("")}function cp({app:e}){const t=ts(),[n]=Iu(e);return n?or.jsxs(E,{container:!0,gap:0,wrap:"nowrap",style:{backgroundColor:t.palette.background.paper,minHeight:"40px"},children:[or.jsx(E,{style:{borderRight:`1px solid ${t.palette.divider}`},children:or.jsx(ip,{api:n,app:e})}),or.jsx(E,{size:"grow",style:{backgroundColor:t.palette.background.darker,overflow:"hidden"},children:or.jsx(tp,{api:n,app:e})})]}):null}let up;up="undefined"!=typeof window?window:"undefined"!=typeof self?self:global;let dp=null,fp=null;const pp=up.clearTimeout,hp=up.setTimeout,mp=up.cancelAnimationFrame||up.mozCancelAnimationFrame||up.webkitCancelAnimationFrame,gp=up.requestAnimationFrame||up.mozRequestAnimationFrame||up.webkitRequestAnimationFrame;function bp(e){let t,n,r,o,i,a,s;const l="undefined"!=typeof document&&document.attachEvent;if(!l){a=function(e){const 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)return;const t=this;a(this),this.__resizeRAF__&&dp(this.__resizeRAF__),this.__resizeRAF__=fp(function(){i(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(n){n.call(t,e)}))})};let e=!1,l="";r="animationstart";const c="Webkit Moz O ms".split(" ");let u="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),d="";{const t=document.createElement("fakeelement");if(void 0!==t.style.animationName&&(e=!0),!1===e)for(let n=0;n<c.length;n++)if(void 0!==t.style[c[n]+"AnimationName"]){d=c[n],l="-"+d.toLowerCase()+"-",r=u[n],e=!0;break}}n="resizeanim",t="@"+l+"keyframes "+n+" { from { opacity: 0; } to { opacity: 0; } } ",o=l+"animation: 1ms "+n+"; "}return{addResizeListener:function(i,c){if(l)i.attachEvent("onresize",c);else{if(!i.__resizeTriggers__){const l=i.ownerDocument,c=up.getComputedStyle(i);c&&"static"===c.position&&(i.style.position="relative"),function(n){if(!n.getElementById("detectElementResize")){const 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)}}(l),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=l.createElement("div")).className="resize-triggers";const u=l.createElement("div");u.className="expand-trigger",u.appendChild(l.createElement("div"));const d=l.createElement("div");d.className="contract-trigger",i.__resizeTriggers__.appendChild(u),i.__resizeTriggers__.appendChild(d),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==mp||null==gp?(dp=pp,fp=function(e){return hp(e,20)}):(dp=function([e,t]){mp(e),pp(t)},fp=function(e){const t=gp(function(){pp(n),e()}),n=hp(function(){mp(t),e()},20);return[t,n]});class yp extends h{constructor(...e){super(...e),this.state={height:this.props.defaultHeight||0,scaledHeight:this.props.defaultHeight||0,scaledWidth:this.props.defaultWidth||0,width:this.props.defaultWidth||0},this._autoSizer=null,this._detectElementResize=null,this._parentNode=null,this._resizeObserver=null,this._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:e,disableWidth:t,onResize:n}=this.props;if(this._parentNode){const r=window.getComputedStyle(this._parentNode)||{},o=parseFloat(r.paddingLeft||"0"),i=parseFloat(r.paddingRight||"0"),a=parseFloat(r.paddingTop||"0"),s=parseFloat(r.paddingBottom||"0"),l=this._parentNode.getBoundingClientRect(),c=l.height-a-s,u=l.width-o-i,d=this._parentNode.offsetHeight-a-s,f=this._parentNode.offsetWidth-o-i;(e||this.state.height===d&&this.state.scaledHeight===c)&&(t||this.state.width===f&&this.state.scaledWidth===u)||(this.setState({height:d,width:f,scaledHeight:c,scaledWidth:u}),"function"==typeof n&&n({height:d,scaledHeight:c,scaledWidth:u,width:f}))}},this._setRef=e=>{this._autoSizer=e}}componentDidMount(){const{nonce:e}=this.props,t=this._autoSizer?this._autoSizer.parentNode:null;if(null!=t&&t.ownerDocument&&t.ownerDocument.defaultView&&t instanceof t.ownerDocument.defaultView.HTMLElement){this._parentNode=t;const n=t.ownerDocument.defaultView.ResizeObserver;null!=n?(this._resizeObserver=new n(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(t)):(this._detectElementResize=bp(e),this._detectElementResize.addResizeListener(t,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:e,defaultHeight:t,defaultWidth:n,disableHeight:r=!1,disableWidth:o=!1,doNotBailOutOnEmptyChildren:i=!1,nonce:a,onResize:s,style:l={},tagName:c="div",...u}=this.props,{height:d,scaledHeight:f,scaledWidth:h,width:m}=this.state,g={overflow:"visible"},b={};let y=!1;return r||(0===d&&(y=!0),g.height=0,b.height=d,b.scaledHeight=f),o||(0===m&&(y=!0),g.width=0,b.width=m,b.scaledWidth=h),i&&(y=!1),p(c,{ref:this._setRef,style:{...g,...l},...u},!y&&e(b))}}function vp({keyboard:e,hovering:t,updateKeyScroll:n,currentScrollIndex:r,isModal:o,constraints:i,selections:a}){return{handleKeyDown:t=>{const{keyCode:n,shiftKey:r=!1}=t.nativeEvent,i=()=>{t.stopPropagation(),t.preventDefault()};if(!e.enabled)return;const s=t.currentTarget.closest(".listbox-container"),l=o();switch(n){case Gl.TAB:if(document.activeElement===s||!l&&!s.contains(document.activeElement))return;if(r){Yl(s)||Xl(s)||tc(t,e)}else{if(!(ec(s)||Xl(s)||Yl(s)))break}i();break;case Gl.ENTER:case Gl.SPACE:if(!t.target.classList.contains("listbox-container"))break;e.focus(),i();break;case Gl.ESCAPE:tc(t,e),a.isActive()&&a.cancel()}},handleOnMouseEnter:()=>{t.current=!0},handleOnMouseLeave:()=>{t.current&&(t.current=!1)},globalKeyDown:e=>{if(!t.current||(()=>{const e=(null==i?void 0:i.select)||(null==i?void 0:i.active),t=o();return e||t})())return;const{keyCode:a,ctrlKey:s=!1,shiftKey:l=!1}=e;switch(a){case Gl.ARROW_UP:n({up:1});break;case Gl.ARROW_DOWN:n({down:1});break;case Gl.PAGE_UP:n({up:r.stop-r.start});break;case Gl.PAGE_DOWN:n({down:r.stop-r.start});break;case Gl.HOME:n({scrollPosition:s&&l?"overflowStart":"start"});break;case Gl.END:n({scrollPosition:s&&l?"overflowEnd":"end"});break;default:return}e.preventDefault()}}}const Sp=ns("div")(()=>({display:"flex",width:"100%",height:"100%",alignItems:"center",justifyContent:"center"}));function wp({text:e}){const{translator:t}=s(Rs);return or.jsx(Sp,{children:t.get(e)})}const kp={fontSize:"12px"},xp=ns(F)(({theme:e,isLoading:t})=>({position:"absolute",top:0,left:0,height:48,zIndex:2,background:e.palette.custom.disabledBackground,opacity:1,color:e.palette.custom.disabledContrastText,width:"100%",display:"flex",justifyContent:t?"center":"flex-start",paddingLeft:16,paddingRight:16,borderRadius:0,"& *, & p":{color:e.palette.custom.disabledContrastText},"& i":{padding:"7px"}})),Cp=ns(E,{shouldForwardProp:e=>!["styles","isRtl"].includes(e)})(({styles:e,isRtl:t})=>Z(Z({flexDirection:t?"row-reverse":"row",wrap:"nowrap",minHeight:32,alignContent:"center"},e.header),{},{"& *":{color:e.header.color}})),Ep=ns(k)(({styles:e})=>Z(Z({},e.header),{},{display:"block",alignItems:"center",paddingRight:"1px"})),Lp=t.forwardRef(({translator:e,toggleLock:t,keyboard:n,isLoading:r},o)=>{const i=e.get("SelectionToolbar.ClickToUnlock");return or.jsxs(xp,{ref:o,title:i,tabIndex:n.enabled?0:-1,onClick:t,"data-testid":"listbox-unlock-button",id:"listbox-unlock-button",isLoading:r,children:[r?or.jsx(B,{size:16,variant:"indeterminate",color:"primary"}):or.jsx(el,{disableRipple:!0,style:kp}),!r&&or.jsx(k,{fontSize:"14px",children:i})]})});var Rp=e=>Xs((e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M 6 2 h 10 V 1 H 6 Z m 5 5 h 5 V 6 h -5 Z m 5 5 h -5 v -1 h 5 Z M 5 10 h 1 v 2.663 a 3.5 3.5 0 1 0 -2.922 0.036 l -0.406 0.914 A 4.501 4.501 0 1 1 7.329 13 H 9 v 1 H 5 Z"}}]}))(e));var Tp=e=>Xs((e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M7 4h9v1H7zm2 4h7v1H9zm2 4h5v1h-5zM1 4v3.526a3.5 3.5 0 0 0 3.5 3.5h2.31L5.22 9.402l.715-.7L8.7 11.527 5.935 14.35l-.714-.7 1.59-1.624H4.5a4.5 4.5 0 0 1-4.5-4.5V4z"}}]}))(e));var qp=e=>Xs((e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M1 8a7 7 0 1 1 10 6.326V11h-1v5h5v-1h-3.124A8 8 0 1 0 8 16v-1a7 7 0 0 1-7-7Z"}}]}))(e));const Pp="H",Ip="C";var _p=({dimInfo:e,app:t,selections:n,isPopover:r,active:o,keyboard:i})=>{switch(e.qGrouping){case Pp:return{icon:Tp,tooltip:"Listbox.DrillDown",onClick:void 0};case Ip:{const a=t&&o,s=()=>{r||n.confirm(),t.getDimension(e.qLibraryId).then(e=>{e.stepCycle?e.stepCycle(1):console.log("engine api spec version doesn't have support for function stepCycle")}).catch(()=>null)};return{icon:a?qp:Rp,tooltip:"Listbox.Cyclic",onClick:a?s:void 0,onKeyDown:a?e=>{const t=e.currentTarget.closest(".listbox-container");switch(e.keyCode){case Gl.SPACE:case Gl.ENTER:s();break;case Gl.TAB:{if(!i.enabled)return;let n;n=e.shiftKey?i.focusSelection():Xl(t)||Yl(t),n||tc(e,i)}break;default:return}e.preventDefault(),e.stopPropagation()}:void 0}}default:return}};const Op=q(z)(()=>({borderRadius:4,width:24,height:24,minWidth:22,padding:0}));function Dp({iconData:e,translator:t,iconStyle:n,disabled:r,keyboard:o}){if(!e)return;const{icon:i,tooltip:a,onClick:s,onKeyDown:l}=e,c=i,u=t.get(a);return s?or.jsx(Op,{variant:"outlined",onClick:s,tabIndex:o.innerTabStops?0:-1,title:u,size:"large",disableRipple:!0,disabled:r,onKeyDown:l,className:"listbox-cyclic-button","data-testid":"listbox-cyclic-button",children:or.jsx(c,{style:n})}):or.jsx(c,{title:u,size:"large",style:Z(Z({},n),{},{padding:"7px"})})}let Ap=0;function Np({layout:e,translator:t,styles:o,isRtl:i,showLock:a,showSearchIcon:s,constraints:l,onShowSearch:c,classes:u,containerRect:d,isPopover:p,showToolbar:h,toolbarMode:m="auto",containerRef:g,model:b,selectionState:y,isDirectQuery:v,selections:S,keyboard:w,autoConfirm:k,app:x,title:C,disablePortal:L}){var R,q,P;const I="detach"===m,_=!I&&!("attach"===m),[O,D]=n(I),[A,N]=n(null==e||null===(R=e.qListObject)||void 0===R||null===(R=R.qDimensionInfo)||void 0===R?void 0:R.qLocked),[j,M]=n(!1);r(()=>{var t;N(null==e||null===(t=e.qListObject)||void 0===t||null===(t=t.qDimensionInfo)||void 0===t?void 0:t.qLocked)},[null==e||null===(q=e.qListObject)||void 0===q||null===(q=q.qDimensionInfo)||void 0===q?void 0:q.qLocked]);const $=f(null),z=f(null),F=f(null),B=_p({dimInfo:null==e||null===(P=e.qListObject)||void 0===P?void 0:P.qDimensionInfo,app:x,selections:S,isPopover:p,active:!(null!=l&&l.active),keyboard:w}),U=a&&A,W=!a&&A,H=s||W||B,V=9-(H?7:0),G=i?9-(H?7:0):4,K=(s?28:0)+(W?28:0)+(B?28:0),J=function({isLocked:e,setLocked:t,settingLockedState:n,model:r,setSettingLockedState:o,unlockButtonRef:i,lockButtonRef:a}){return()=>{const s=new Date;if(s-Ap<500)return Promise.resolve();if(n)return()=>{};o(!0),Ap=s;const l=e?r.unlock:r.lock;return t(!e),l.call(r,"/qListObjectDef").catch(()=>{t(e)}).finally(()=>{setTimeout(()=>{var t;o(!1),e?setTimeout(()=>{var e;null===(e=a.current)||void 0===e||e.focus()},0):null===(t=i.current)||void 0===t||t.focus()},0)})}}({isLocked:A,setLocked:N,settingLockedState:j,setSettingLockedState:M,model:b,unlockButtonRef:z,lockButtonRef:F}),Q=ru({layout:e,model:b,translator:t,selectionState:y,isDirectQuery:v,selections:S}),X=A||!a?void 0:[{key:"lock",type:void 0,label:t.get("SelectionToolbar.ClickToLock"),getSvgIconShape:tl,enabled:()=>!j&&!y.selectDisabled()&&Mu(e),action:J,ref:F}],Y=null!=l&&l.active?or.jsx(Eu,{title:t.get("Listbox.Search"),size:"large",style:Z(Z({},kp),{},{padding:"7px"})}):or.jsx(T,{onClick:c,tabIndex:-1,title:t.get("Listbox.Search"),size:"large",disableRipple:!0,"data-testid":"search-toggle-btn",children:or.jsx(Eu,{style:kp})});r(()=>{if(!_)return;if(!$.current||!d)return;const e=function({containerRect:e,titleRef:t,iconsWidth:n,paddingLeft:r,paddingRight:o}){var i,a,s,l;const c=r+o,u=e.width<(null!==(i=null==t||null===(a=t.current)||void 0===a?void 0:a.clientWidth)&&void 0!==i?i:0)+n+c+2+128,d=(null==t||null===(s=t.current)||void 0===s?void 0:s.scrollWidth)>(null==t||null===(l=t.current)||void 0===l?void 0:l.offsetWidth);return!(!u&&!d)}({containerRect:d,titleRef:$,iconsWidth:K,paddingLeft:V,paddingRight:G});D(e)},[_,K,V,G,$.current,null==d?void 0:d.width,null==d?void 0:d.height]);const ee=function({isDetached:e,showToolbar:t,containerRef:n,isLocked:r,listboxSelectionToolbarItems:o,extraItems:i,selections:a,keyboard:s,autoConfirm:l,disablePortal:c}){return{autoConfirm:l,isDetached:e,show:t&&!e,popover:{show:t&&e,anchorEl:n.current},extraItems:i,more:{enabled:!r,actions:o,popoverProps:{elevation:0},popoverPaperStyle:{boxShadow:"0 12px 8px -8px rgba(0, 0, 0, 0.2)",minWidth:"250px"},disablePortal:c},selections:{show:t,api:a,onConfirm:()=>{null==s||s.focus()},onCancel:()=>{null==s||s.focus()}}}}({isDetached:!p&&O,showToolbar:h,containerRef:g,isLocked:A,extraItems:X,listboxSelectionToolbarItems:Q,selections:S,keyboard:w,autoConfirm:k,disablePortal:L}),te=or.jsx(Cu,Z({isRtl:i,layout:e},ee));if(I)return te;const ne=W?or.jsx(el,{size:"large",style:Z(Z({},kp),{},{padding:"7px"})}):void 0;return or.jsxs(Cp,{item:!0,container:!0,styles:o,isRtl:i,marginY:1,paddingLeft:`${V}px`,paddingRight:`${G}px`,className:"header-container",children:[U&&or.jsx(Lp,{isLoading:j,translator:t,toggleLock:J,keyboard:w,ref:z}),H&&or.jsxs(E,{container:!0,alignItems:"center",width:K,className:"header-action-container",children:[ne||s&&Y,or.jsx(Dp,{iconData:B,iconStyle:kp,disabled:S.isActive()&&p,translator:t,keyboard:w})]}),or.jsx(E,{size:"grow",sx:{minWidth:0},justifyContent:i?"flex-end":"flex-start",className:u.listBoxHeader,children:or.jsx(Ep,{variant:"h6",noWrap:!0,ref:$,title:null!=C?C:e.title,styles:o,children:null!=C?C:e.title})}),or.jsx(E,{display:"flex",children:te})]})}const jp=q("div")(({theme:e,width:t,height:n})=>({position:"absolute",pointerEvents:"none",zIndex:1,width:t,height:n,boxShadow:`inset 0 0 0 2px ${e.palette.custom.focusBorder}`}));function Mp({width:e,height:t,disabled:o,childNode:i,containerNode:a}){const[s,l]=n(!1),u=c(()=>{const e=a&&a.contains(document.activeElement),t=i&&i.contains(document.activeElement);l(e&&!t)},[a,i]);r(()=>{if(a)return a.addEventListener("focusin",u),a.addEventListener("focusout",u),u(),()=>{a.removeEventListener("focusin",u),a.removeEventListener("focusout",u)}},[u,a]);return!o&&s?or.jsx(jp,{"aria-hidden":"true",width:e,height:t}):null}const $p="ListBoxInline",zp={listBoxHeader:`${$p}-listBoxHeader`,screenReaderOnly:`${$p}-screenReaderOnly`,listboxWrapper:`${$p}-listboxWrapper`},Fp=ns(E,{shouldForwardProp:e=>!["containerPadding","styles"].includes(e)})(({containerPadding:e,styles:t})=>Z(Z({},t.background),{},{[`& .${zp.listBoxHeader}`]:{alignSelf:"center",display:"flex"},[`& .${zp.screenReaderOnly}`]:{position:"absolute",height:0,width:0,overflow:"hidden"},[`& .${zp.listboxWrapper}`]:{padding:e},"&:focus-visible":{outline:"none"}}));const Bp=t.memo(function({options:e,layout:t}){var o,a,l,u,d;const{app:p,direction:h,frequencyMode:m,checkboxes:g,search:b=!0,focusSearch:y=!1,rangeSelect:v=!0,model:S,selections:w,update:k,fetchStart:x,postProcessPages:C,calculatePagesHeight:L,showGray:R=!0,scrollState:T,renderedCallback:q,toolbar:P=!0,toolbarMode:I="auto",isPopover:_=!1,showLock:O=!1,components:D,selectDisabled:A=()=>!1,disablePortal:N=!0,flags:j}=e,M=ts(),{translator:$,keyboardNavigation:z,themeApi:F,queryParams:B,constraints:U,hostConfig:W}=s(Rs),{checkboxes:H=g}=t||{},V=Uf({app:p,themeApi:F,theme:M,queryParams:B,components:D,checkboxes:H,hostConfig:W}),G=function({appLayout:e}){return!(null==e||!e.qIsDirectQueryMode)}({appLayout:null==p?void 0:p.layout}),K=f(),J=f(),[Q,X,Y]=Fs(),[ee,te]=n(!1),[ne,re]=n(!1),oe=f(!1),[ie,ae]=n({down:0,up:0,scrollPosition:""}),se=e=>ae(t=>Z(Z({},t),e)),[le,ce]=n({start:0,stop:0}),[ue]=Iu(p),[de]=n(()=>Nu({selectDisabled:A})),fe=Ql({containerRef:K,enabled:z}),pe=c(()=>(({app:e,appSelections:t})=>{var n,r;return null!==(n=null===(r=e.isInModalSelection)||void 0===r?void 0:r.call(e))&&void 0!==n?n:t.isInModal()})({app:p,appSelections:ue}),[p,ue]),he=null==t?void 0:t.qListObject.qDimensionInfo.qError,me=he&&U.active?"Visualization.Invalid.Dimension":"Visualization.Incomplete",[,ge]=n(!1),[be,ye]=n(null),ve=c(e=>{ye(e)},[]),{handleKeyDown:Se,handleOnMouseEnter:we,handleOnMouseLeave:ke,globalKeyDown:xe}=i(()=>vp({keyboard:fe,hovering:oe,updateKeyScroll:se,currentScrollIndex:le,constraints:U,isModal:pe,selections:w}),[fe,oe,se,K,le,p,ue,U,pe]);r(()=>(document.addEventListener("keydown",xe),()=>{document.removeEventListener("keydown",xe)}),[xe]),r(()=>{!0===b&&re(!0);const e=()=>{te(!0)},t=()=>{te(!1),"toggle"===b&&re(!1)};return _&&(w.isActive()||(w.on("activated",e),w.on("deactivated",t)),te(_)),P&&w&&(w.isModal()||(w.on("activated",e),w.on("deactivated",t)),te(_||w.isActive())),()=>{w&&w.removeListener&&(w.removeListener("activated",e),w.removeListener("deactivated",t))}},[P,w,_]);const{wildCardSearch:Ce,searchEnabled:Ee,autoConfirm:Le=!1,layoutOptions:Re={}}=null!=t?t:{},Te=null==t||null===(o=t.qListObject)||void 0===o||null===(o=o.qDimensionInfo)||void 0===o?void 0:o.qLocked,qe=!1!==Ee&&"toggle"===b&&!Te,Pe=null==t||null===(a=t.qListObject)||void 0===a?void 0:a.qDimensionInfo,Ie=j.isEnabled("QCB-35224_FILTERPANE_TITLE_IMPROVEMENT")?null!==(l=null==t?void 0:t.title)&&void 0!==l?l:null==Pe?void 0:Pe.qFallbackTitle:null==t?void 0:t.title,_e=(null==Ie?void 0:Ie.length)&&!1!==(null==t?void 0:t.showTitle),Oe=["attach","detach","auto"].includes(I)?I:"auto",De=P||_,Ae=function({toolbarMode:e,canShowTitle:t,isPopover:n}){return"auto"!==e?e:t||n?"attach":"detach"}({toolbarMode:Oe,canShowTitle:_e,isPopover:_}),Ne=De&&"detach"===Ae,je="rtl"===h;if(!(S&&t&&$&&V))return null;const Me=!0===b||"toggle"===b&&ne&&!1!==Ee,$e=null!==(u=Re.dense)&&void 0!==u&&u,ze=()=>{var e;const t=!ne;re(t),t&&null!==(e=K.current)&&void 0!==e&&e.scrollIntoView&&K.current.scrollIntoView({block:"nearest",inline:"nearest",behavior:"instant"})},Fe=()=>{"toggle"===b?ze():J.current.focus()},Be=Me&&("toggle"===b||y),Ue=function({isGridMode:e,dense:t,height:n,layoutOrder:r}){let o;if(e){let i;i=Oc({isGridMode:e,dense:t})>n?"0px":"2px",o="row"===r?`${i} 4px`:`${i} 6px ${i} 4px`}else o=void 0;return o}({isGridMode:"grid"===(null==Re?void 0:Re.dataLayout),dense:$e,height:null===(d=K.current)||void 0===d?void 0:d.clientHeight,layoutOrder:Re.layoutOrder});he&&(null==q||q());const We=De&&!Ne?30:0,He=or.jsx(Np,{app:p,showSearchIcon:qe,onShowSearch:ze,isPopover:_,showToolbar:ee,isDirectQuery:G,autoConfirm:Le,toolbarMode:Ne?"detach":Oe,title:Ie,layout:t,translator:$,styles:V,isRtl:je,showLock:O,constraints:U,classes:zp,containerRect:X,containerRef:K,model:S,selectionState:de,selections:w,keyboard:fe,disablePortal:N});return or.jsxs(or.Fragment,{children:[Ne&&He,or.jsxs(Fp,{className:"listbox-container",container:!0,tabIndex:fe.enabled?-1:void 0,direction:"column",gap:0,containerPadding:Ue,styles:V,style:{height:"100%",width:"100%",flexFlow:"column nowrap"},onKeyDown:Se,onMouseEnter:we,onMouseLeave:ke,ref:e=>{K.current=e,null==Q||Q(e)},"aria-label":fe.active?$.get("Listbox.ScreenReaderInstructions"):"",onFocus:()=>ge(!0),onBlur:()=>ge(!1),children:[or.jsx(Mp,{width:null==X?void 0:X.width,height:null==X?void 0:X.height,disabled:pe()||_,childNode:be,containerNode:Y}),De&&!Ne&&He,or.jsxs(E,{container:!0,direction:"column",height:"100%",minHeight:We,role:"region","aria-label":$.get("Listbox.ResultFilterLabel"),ref:ve,children:[or.jsx(E,{children:or.jsx(Pu,{ref:J,selections:w,selectionState:de,model:S,dense:$e,keyboard:fe,visible:Me,search:b,autoFocus:Be,beginSelectionOnFocus:!_,wildCardSearch:Ce,searchEnabled:Ee,direction:h,hide:qe&&ze,styles:V})}),or.jsx(E,{size:"grow",className:zp.listboxWrapper,children:he?or.jsx(wp,{text:me}):or.jsx(yp,{children:({height:e,width:n})=>or.jsx(Xc,{model:S,app:p,constraints:U,layout:t,selections:w,selectionState:de,direction:h,frequencyMode:m,rangeSelect:v,checkboxes:H,height:e,width:n,update:k,fetchStart:x,postProcessPages:C,calculatePagesHeight:L,keyboard:fe,showGray:R,scrollState:T,keyScroll:{state:ie,reset:()=>ae({up:0,down:0,scrollPosition:""})},currentScrollIndex:{state:le,set:ce},renderedCallback:q,onCtrlF:Fe,isModal:pe,styles:V})})})]})]})]})});function Up({options:e={}}){const{model:t}=e,[n]=$s(t);return or.jsx(Bp,{options:e,layout:n})}function Wp({app:e,qId:t,options:o={}}){const[i,a]=n(),[s]=Os(),{sessionModel:l}=o,c=["dense","frequencyMode","checkboxes","histogram","title","stateName","listLayout"],u=Object.keys(o).filter(e=>c.includes(e));if(u.length)throw new Error(`Option "${u.join(", ")}" is not applicable for existing objects.`);return r(()=>{let n=!1,r=()=>{};return async function(){const o=await Promise.resolve(l||async function(t){return s.get(t)||await e.getObject(t)}(t));if(!n){if(!s.get(o.id)){s.set(o.id,o);const e=()=>{s.clear(o.id)};o.once("closed",e),r=()=>{o.removeListener("closed",e)}}a(o)}}(),()=>{n=!0,r()}},[]),i}const Hp={qInfo:{qType:"njsListbox"},qListObjectDef:{qStateName:"",qShowAlternatives:!0,frequencyEnabled:!1,qFrequencyMode:"N",qInitialDataFetch:[{qTop:0,qLeft:0,qWidth:0,qHeight:0}],qDef:{qSortCriterias:[{qSortByState:1,qSortByAscii:1,qSortByNumeric:1,qSortByLoadOrder:1}]}},histogram:!1,frequencyMax:void 0,checkboxes:!1,searchEnabled:!0,showTitle:!0,wildCardSearch:!1,autoConfirm:!1,layoutOptions:{dense:!1,dataLayout:"singleColumn",layoutOrder:"row",maxVisibleColumns:{auto:!0,maxColumns:3},maxVisibleRows:{auto:!0,maxRows:3}},title:""};function Vp(e){let t;switch(!0){case["none","N","NX_FREQUENCY_NONE"].includes(e):t="N";break;case["value","V","NX_FREQUENCY_VALUE","default"].includes(e):t="V";break;case["percent","P","NX_FREQUENCY_PERCENT"].includes(e):t="P";break;case["relative","R","NX_FREQUENCY_RELATIVE"].includes(e):t="R";break;default:t="N"}return t}const Gp=["__DO_NOT_USE__"],Kp=(e={})=>{const{__DO_NOT_USE__:t={}}=e,n={update:void 0,fetchStart:void 0,showGray:!0,focusSearch:!1,sessionModel:void 0,selectionsApi:void 0,selectDisabled:void 0,postProcessPages:void 0,calculatePagesHeight:!1};return Z(Z(Z({},X(e,Gp)),n),t)},Jp=o(({app:e,fieldIdentifier:t,qId:o,stateName:s,element:l,initialOptions:c,renderedCallback:u,flags:d},p)=>{const[h,m]=n(c),{isExistingObject:g,hasExternalSelectionsApi:b}=function({qId:e,options:t}){return{isExistingObject:!(!e&&!t.sessionModel),hasExternalSelectionsApi:!!t.selectionsApi}}({qId:o,options:h});g||Object.assign(h,{frequencyMode:Vp(h.frequencyMode)});const[y,v]=n(0);r(()=>{if(y)throw new Error("Source or selection Api can not change after a listbox has been mounted");v(y+1)},[g,b]);const S=g?Wp({app:e,qId:o,options:h}):function({app:e,fieldIdentifier:t,stateName:o,options:i={}}){var a;const[s,l]=n(""),[c,u]=n(!0),[d,p]=n(),[h,m]=n(),g=null!==(a=i.title)&&void 0!==a?a:h;let{histogram:b=!1,frequencyMode:y="N"}=i;s&&s.failedToFetchFieldDef&&(b=!1,y="N"),r(()=>{const n=b||"N"!==y;t.qLibraryId&&n?async function(){try{const n=await e.getDimension(t.qLibraryId),r=await n.getLayout();m(r.qDim.title),"N"===r.qDim.qGrouping?l(r.qDim.qFieldDefs?r.qDim.qFieldDefs[0]:""):l({multiFieldDim:!0}),u(!1)}catch(e){throw u(!1),l({failedToFetchFieldDef:!0}),new Error(`Disabling frequency count and histogram: ${e&&e.message}`)}}():(u(!1),m(t))},[]);const{dense:v,checkboxes:S,listLayout:w,properties:k={}}=i,x={dense:v};"horizontal"===w&&(x.dataLayout="grid",x.layoutOrder="column",x.maxVisibleColumns={auto:!0},x.maxVisibleRows={auto:!1,maxRows:1});const C=f();C.current||(C.current=lp());const E=Ze(!0,{},Hp,{qInfo:{qId:C.current},qListObjectDef:{qStateName:o,qFrequencyMode:b&&"N"===y?"V":y},histogram:b,checkboxes:S,layoutOptions:x,title:g});let L;if(Ze(!0,E,k),t.qLibraryId?(E.qListObjectDef.qLibraryId=t.qLibraryId,L=t.qLibraryId):(E.qListObjectDef.qDef.qFieldDefs=[t],L=t),"P"!==y&&b)if(null!=s&&s.multiFieldDim)E.frequencyMax="fetch";else{const e=t.qLibraryId?s:L;E.frequencyMax={qValueExpression:Kc(e)}}const[R]=Ds(E,c?null:e,L,o);return r(()=>{R&&p(R)},[R]),d}({app:e,fieldIdentifier:t,stateName:s,options:h}),w=f(l),k=b?h.selectionsApi:Au(e,S,[w,".njs-action-toolbar-more",".njs-action-toolbar-popover"],h)[0],x=i(()=>Z(Z({},h),{},{selections:k,model:S,app:e,renderedCallback:u,flags:d}),[h,k,S,e]);return a(p,()=>({setOptions:e=>m(e)}),[]),k&&S?or.jsx(Up,{options:x}):null});const Qp={show:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}};function Zp({app:e,fieldIdentifier:t,stateName:r,element:o,options:i={}}){const[a,s]=n(!!i.show);return or.jsx(Wf,{show:a,app:e,alignTo:{current:o},anchorOrigin:i.anchorOrigin,transformOrigin:i.transformOrigin,close:()=>{s(!1),i.onPopoverClose&&i.onPopoverClose()},fieldName:t,stateName:r,autoFocus:i.autoFocus,components:i.components,sortCriteria:i.sortCriteria,direction:i.direction})}function Xp(e,t){for(let n=0;n<e.length;++n)e[n]>=0&&e[n]>=t&&++e[n];e.push(t)}function Yp(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 eh({dc:e,def:t,properties:n}){e.qDimensions=e.qDimensions||[],e.qMeasures=e.qMeasures||[],e.qInterColumnSortOrder=e.qInterColumnSortOrder||[],e.qInitialDataFetch=e.qInitialDataFetch||[],e.qColumnOrder=e.qColumnOrder||[],e.qExpansionState=e.qExpansionState||[];const r=n,o={dimensions:()=>e.qDimensions,measures:()=>e.qMeasures,addDimension(n){const i="string"==typeof n?(e=>({qDef:{qFieldDefs:[e]}}))(n):Z(Z({},n),{},{qDef:n.qDef||{}});return i.qDef.cId=i.qDef.cId||lp(),i.qDef.qSortCriterias=i.qDef.qSortCriterias||[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],i.qOtherTotalSpec=i.qOtherTotalSpec||{},i.qAttributeExpressions=i.qAttributeExpressions||[],i.qAttributeDimensions=i.qAttributeDimensions||[],e.qDimensions.length<o.maxDimensions()?(e.qDimensions.push(i),Xp(e.qInterColumnSortOrder,e.qDimensions.length-1),t.dimensions.added(i,r)):(e.qLayoutExclude=e.qLayoutExclude||{},e.qLayoutExclude.qHyperCubeDef=e.qLayoutExclude.qHyperCubeDef||{},e.qLayoutExclude.qHyperCubeDef.qDimensions=e.qLayoutExclude.qHyperCubeDef.qDimensions||[],e.qLayoutExclude.qHyperCubeDef.qMeasures=e.qLayoutExclude.qHyperCubeDef.qMeasures||[],e.qLayoutExclude.qHyperCubeDef.qDimensions.push(i)),i},removeDimension(n){const o=e.qDimensions.splice(n,1)[0];return Yp(e.qInterColumnSortOrder,n),t.dimensions.removed(o,r,n),o},addMeasure(n){const i="string"==typeof n?(e=>({qDef:{qDef:e}}))(n):Z(Z({},n),{},{qDef:n.qDef||{}});i.qDef.cId=i.qDef.cId||lp(),i.qSortBy=i.qSortBy||{qSortByLoadOrder:1,qSortByNumeric:-1},i.qAttributeDimensions=i.qAttributeDimensions||[],i.qAttributeExpressions=i.qAttributeExpressions||[],e.qMeasures.length<o.maxMeasures()?(e.qMeasures.push(i),Xp(e.qInterColumnSortOrder,e.qDimensions.length+e.qMeasures.length-1),t.measures.added(i,r)):(e.qLayoutExclude=e.qLayoutExclude||{},e.qLayoutExclude.qHyperCubeDef=e.qLayoutExclude.qHyperCubeDef||{},e.qLayoutExclude.qHyperCubeDef.qDimensions=e.qLayoutExclude.qHyperCubeDef.qDimensions||[],e.qLayoutExclude.qHyperCubeDef.qMeasures=e.qLayoutExclude.qHyperCubeDef.qMeasures||[],e.qLayoutExclude.qHyperCubeDef.qMeasures.push(i))},removeMeasure(n){const o=e.qMeasures.splice(n,1)[0];Yp(e.qInterColumnSortOrder,e.qDimensions.length+n),t.measures.removed(o,r,n)},maxDimensions:()=>t.dimensions.max(e.qMeasures.length),maxMeasures:()=>t.measures.max(e.qDimensions.length),canAddDimension:()=>e.qDimensions.length<o.maxDimensions(),canAddMeasure:()=>e.qMeasures.length<o.maxMeasures()};return o}function th({dc:e,def:t,properties:n}){e.qInitialDataFetch=e.qInitialDataFetch||[];const r=n,o={dimensions:()=>e.qLibraryId||e.qDef&&e.qDef.qFieldDefs&&0!==e.qDef.qFieldDefs.length?[e]:[],measures:()=>[],addDimension(n){const o="string"==typeof n?(e=>({qDef:{qFieldDefs:[e]}}))(n):Z(Z({},n),{},{qDef:n.qDef||{}});return o.qDef.cId=o.qDef.cId||lp(),o.qDef.qSortCriterias=e.qDef.qSortCriterias||[{qSortByState:1,qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],Object.keys(o).forEach(t=>{e[t]=o[t]}),t.dimensions.added(o,r),o},removeDimension(n){const o=e;return delete e.qDef,delete e.qLibraryId,t.dimensions.removed(o,r,n),o},addMeasure(){},removeMeasure(){},maxDimensions:()=>1,maxMeasures:()=>0,canAddDimension:()=>0===o.dimensions().length,canAddMeasure:()=>!1};return o}const nh=e=>({qDef:{qFieldDefs:[e]}});function rh({children:e,halo:t}){const n={async addDimension(n){const r=(e=>{let t;return t="string"==typeof e?Ze(!0,{},Hp,{qListObjectDef:nh(e)}):e.qListObjectDef?Ze(!0,{},Hp,e):Ze(!0,{},Hp,{qListObjectDef:e}),t})(n),o=r.qListObjectDef;if(o.qDef.cId=o.qDef.cId||lp(),!r.title)if(t.public.galaxy.flags.isEnabled("QCB-35224_FILTERPANE_TITLE_IMPROVEMENT"))r.title=void 0;else if(o.qLibraryId){const e=await t.app.getDimension(o.qLibraryId),n=await e.getProperties();n.qDim.qLabelExpression?r.title={qStringExpression:{qExpr:n.qDim.qLabelExpression}}:r.title=n.qDim.title}else{var i,a;r.title=o.qDef.title||(null===(i=o.qDef.qFieldLabels)||void 0===i?void 0:i[0])||(null===(a=o.qDef.qFieldDefs)||void 0===a?void 0:a[0])}e.push({qProperty:r,qChildren:[]})},addMeasure(){}};return n}function oh(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"}async function ih({sn:e,properties:t,fields:n,children:r},o){if(!n.length)return;const i=e.qae.data.targets[0];if(!i)return;const{propertyPath:a}=i,s=a.split("/");let l=t;for(let e=0;e<s.length;e++){const t=s[e];l=t?l[t]:l}const c=function(e){return e.match("/qListObjectDef")?th:e.match("/qChildListDef")?rh:eh}(a),u=c({dc:l,def:i,properties:t,children:r,halo:o});for(let e=0;e<n.length;++e){const t=n[e];"measure"===oh(t)?await u.addMeasure(t):await u.addDimension(t)}}const ah=e=>"__proto__"!==e&&"constructor"!==e&&"prototype"!==e;var sh={getValue:(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},setValue:(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];if(!ah(t))return;void 0!==i[t]&&null!==i[t]||(i[t]=Number.isNaN(+r[e+1])?{}:[]),i=i[t]}ah(o)&&(void 0!==n?i[o]=n:delete i[o])},isEmpty:e=>0===Object.keys(e).length&&e.constructor===Object};var lh={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},move:function(e,t,n){if(n<0)throw Error("newIndex cannot be a negative value!");if(n>=e.length){let t=n-e.length+1;for(;t;)e.push(void 0),t--}const r=e.at(t);e.splice(t,1),e.splice(n,0,r)}};const ch=2**53-1;function uh(e){return-1!==["qMetaDef","descriptionExpression","labelExpression"].indexOf(e)}function dh(e,t){const n=Ze(!0,{},t,e);return sh.getValue(n,"qOtherTotalSpec.qOtherCounted")||sh.setValue(n,"qOtherTotalSpec.qOtherCounted",{qv:"10"}),sh.getValue(n,"qOtherTotalSpec.qOtherLimit")||sh.setValue(n,"qOtherTotalSpec.qOtherLimit",{qv:"0"}),n.hasOwnProperty("othersLabel")||(n.othersLabel="Others"),n}function fh(e,t){return Ze(!0,{},t,e)}function ph(e,t,n){return"function"==typeof e?e(t):Number.isNaN(+e)?n:e}var hh={restoreChangedProperties:function(e){Object.keys(e.qLayoutExclude.changed).forEach(t=>{e.qLayoutExclude.changed[t].to===sh.getValue(e,t)&&sh.setValue(e,t,e.qLayoutExclude.changed[t].from)})},isMasterItemProperty:uh,importCommonProperties:function(e,t,n){const r="masterobject"===sh.getValue(t,"properties.qInfo.qType")?"masterobject":sh.getValue(n,"qInfo.qType");sh.setValue(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:dh,createDefaultMeasure:fh,resolveValue:ph,getHypercubePath:function(e){const t=sh.getValue(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({exportFormat:e,newHyperCubeDef:t}){const n=e.data[0],r=t.qDimensions.length+t.qMeasures.length;t.qInterColumnSortOrder=n.interColumnSortOrder.concat();let o=t.qInterColumnSortOrder.length;if(o!==r)for(t.qLayoutExclude&&(t.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder=n.interColumnSortOrder.concat());o!==r;)o<r?(lh.indexAdded(t.qInterColumnSortOrder,o),++o):(--o,lh.indexRemoved(t.qInterColumnSortOrder,o))},createNewProperties:function({exportFormat:e,initialProperties:t,hypercubePath:n}){let r={qLayoutExclude:{disabled:{},quarantine:{}}};return Object.keys(e.properties).forEach(o=>{"qLayoutExclude"===o?e.properties[o].quarantine&&(r.qLayoutExclude.quarantine=Ze(!0,{},e.properties[o].quarantine)):"qHyperCubeDef"===o&&n?sh.setValue(r,`${n}.qHyperCubeDef`,e.properties.qHyperCubeDef):t.hasOwnProperty(o)||uh(o)?r[o]=e.properties[o]:r.qLayoutExclude.disabled[o]=e.properties[o]}),r=Ze(!0,{},t,r),null===r.components&&(r.components=[]),r},getMaxMinDimensionMeasure:function({exportFormat:e,dataDefinition:t={}}){const n=e.data[0],r=t.dimensions||{max:0},o=t.measures||{max:0},i=ph(o.max,n.dimensions.length,ch),a=ph(o.min,n.dimensions.length,0);return{maxDimensions:ph(r.max,i,ch),minDimensions:ph(r.min,a,0),maxMeasures:i,minMeasures:a}},shouldInitLayoutExclude:function({exportFormat:e,maxDimensions:t,minDimensions:n,maxMeasures:r,minMeasures:o}){const i=e.data[0];return i.dimensions.length>t&&t>0||i.measures.length>r&&r>0||i.excludedDimensions.length>0&&i.dimensions.length+i.excludedDimensions.length>n||i.excludedMeasures.length>0&&i.measures.length+i.excludedMeasures.length>o||!r&&i.measures.length>0||!t&&i.dimensions.length>0},initLayoutExclude:function({exportFormat:e,maxDimensions:t,minDimensions:n,maxMeasures:r,minMeasures:o,newHyperCubeDef:i}){const a=e.data[0];i.qLayoutExclude||(i.qLayoutExclude={}),i.qLayoutExclude.qHyperCubeDef||(i.qLayoutExclude.qHyperCubeDef={}),(a.dimensions.length>t&&t>0||a.excludedDimensions&&a.excludedDimensions.length&&a.dimensions.length+a.excludedDimensions.length>n)&&(i.qLayoutExclude.qHyperCubeDef.qDimensions||(i.qLayoutExclude.qHyperCubeDef.qDimensions=[])),(a.measures.length>r&&r>0||a.excludedMeasures&&a.excludedMeasures.length&&a.measures.length+a.excludedMeasures.length>o)&&(i.qLayoutExclude.qHyperCubeDef.qMeasures||(i.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!r&&a.measures.length&&(i.qLayoutExclude.qHyperCubeDef.qMeasures||(i.qLayoutExclude.qHyperCubeDef.qMeasures=[])),!t&&a.dimensions.length&&(i.qLayoutExclude.qHyperCubeDef.qDimensions||(i.qLayoutExclude.qHyperCubeDef.qDimensions=[]))},addDefaultDimensions:function({exportFormat:e,maxDimensions:t,minDimensions:n,newHyperCubeDef:r,defaultDimension:o}){const i=e.data[0];let a;if(t>0)for(a=0;a<i.dimensions.length;++a)r.qDimensions.length<t?r.qDimensions.push(dh(i.dimensions[a],o)):r.qLayoutExclude.qHyperCubeDef.qDimensions.push(dh(i.dimensions[a],o));else if(i.dimensions.length)for(a=0;a<i.dimensions.length;++a)r.qLayoutExclude.qHyperCubeDef.qDimensions.push(dh(i.dimensions[a],o));if(i.excludedDimensions.length)for(a=0;a<i.excludedDimensions.length;++a)r.qDimensions.length<n?r.qDimensions.push(dh(i.excludedDimensions[a],o)):r.qLayoutExclude.qHyperCubeDef.qDimensions.push(dh(i.excludedDimensions[a],o))},addDefaultMeasures:function({exportFormat:e,maxMeasures:t,minMeasures:n,newHyperCubeDef:r,defaultMeasure:o}){const i=e.data[0];let a;if(t>0)for(a=0;a<i.measures.length;++a)r.qMeasures.length<t?r.qMeasures.push(fh(i.measures[a],o)):r.qLayoutExclude.qHyperCubeDef.qMeasures.push(fh(i.measures[a],o));else if(i.measures.length)for(a=0;a<i.measures.length;++a)r.qLayoutExclude.qHyperCubeDef.qMeasures.push(fh(i.measures[a],o));if(i.excludedMeasures.length)for(a=0;a<i.excludedMeasures.length;++a)r.qMeasures.length<n?r.qMeasures.push(fh(i.excludedMeasures[a],o)):r.qLayoutExclude.qHyperCubeDef.qMeasures.push(fh(i.excludedMeasures[a],o))},updateDimensionsOnAdded:function({newProperties:e,dataDefinition:t,hypercubePath:n}){if(t.dimensions&&"function"==typeof t.dimensions.added){const r=sh.getValue(e,n||"").qHyperCubeDef,o=[...r.qDimensions];r.qDimensions=[],o.forEach(n=>{r.qDimensions.push(n),t.dimensions.added(n,e)})}},updateMeasuresOnAdded:function({newProperties:e,dataDefinition:t,hypercubePath:n}){if(t.measures&&"function"==typeof t.measures.added){const r=sh.getValue(e,n||"").qHyperCubeDef,o=[...r.qMeasures];r.qMeasures=[],o.forEach(n=>{r.qMeasures.push(n),t.measures.added(n,e)})}}};var mh={exportProperties:e=>function({propertyTree:e,hypercubePath:t}){const n=function(e=1){const t={data:[],properties:{}};for(let n=0;n<e;++n)t.data.push({dimensions:[],measures:[],excludedDimensions:[],excludedMeasures:[],interColumnSortOrder:[]});return t}(),r=e.qProperty,o=sh.getValue(r,t||""),i=o.qHyperCubeDef,a=n.data[0];if(i.qInterColumnSortOrder||(i.qInterColumnSortOrder=[]),a.dimensions.push(...i.qDimensions),i.qLayoutExclude&&i.qLayoutExclude.qHyperCubeDef&&i.qLayoutExclude.qHyperCubeDef.qDimensions&&a.excludedDimensions.push(...i.qLayoutExclude.qHyperCubeDef.qDimensions),a.measures.push(...i.qMeasures),i.qLayoutExclude&&i.qLayoutExclude.qHyperCubeDef&&i.qLayoutExclude.qHyperCubeDef.qMeasures&&a.excludedMeasures.push(...i.qLayoutExclude.qHyperCubeDef.qMeasures),a.interColumnSortOrder=i.qInterColumnSortOrder.concat(),i.qLayoutExclude&&i.qLayoutExclude.qHyperCubeDef&&i.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder){const e=i.qLayoutExclude.qHyperCubeDef.qInterColumnSortOrder.concat();lh.isOrderedSubset(e,a.interColumnSortOrder)&&(a.interColumnSortOrder=e)}return delete i.qLayoutExclude,Object.keys(r).forEach(e=>{n.properties[e]=r[e]}),t&&(n.properties.qHyperCubeDef=o.qHyperCubeDef,delete o.qHyperCubeDef),r.qLayoutExclude||(r.qLayoutExclude={}),r.qLayoutExclude.disabled&&(Object.keys(r.qLayoutExclude.disabled).forEach(e=>{n.properties.hasOwnProperty(e)||(n.properties[e]=r.qLayoutExclude.disabled[e])}),delete r.qLayoutExclude.disabled),r.qLayoutExclude.changed&&(hh.restoreChangedProperties(r),delete r.qLayoutExclude.changed),r.qLayoutExclude.quarantine&&!sh.isEmpty(r.qLayoutExclude.quarantine)||delete r.qLayoutExclude,n}(e),importProperties:e=>function({exportFormat:e,initialProperties:t={},dataDefinition:n={},defaultPropertyValues:r={},hypercubePath:o}){const i={qChildren:[]},a=hh.createNewProperties({exportFormat:e,initialProperties:t,hypercubePath:o}),s=sh.getValue(t,o||"").qHyperCubeDef,l=sh.getValue(a,o||"").qHyperCubeDef,{maxDimensions:c,minDimensions:u,maxMeasures:d,minMeasures:f}=hh.getMaxMinDimensionMeasure({exportFormat:e,dataDefinition:n}),{defaultDimension:p=hh.getDefaultDimension(),defaultMeasure:h=hh.getDefaultMeasure()}=r;return l.qDimensions.length=0,l.qMeasures.length=0,hh.shouldInitLayoutExclude({exportFormat:e,maxDimensions:c,minDimensions:u,maxMeasures:d,minMeasures:f})&&hh.initLayoutExclude({exportFormat:e,maxDimensions:c,minDimensions:u,maxMeasures:d,minMeasures:f,newHyperCubeDef:l}),hh.addDefaultDimensions({exportFormat:e,maxDimensions:c,minDimensions:u,newHyperCubeDef:l,defaultDimension:p}),hh.addDefaultMeasures({exportFormat:e,maxMeasures:d,minMeasures:f,newHyperCubeDef:l,defaultMeasure:h}),hh.setInterColumnSortOrder({exportFormat:e,newHyperCubeDef:l}),hh.copyPropertyIfExist("qMaxStackedCells",s,l),hh.copyPropertyIfExist("qNoOfLeftDims",s,l),hh.copyPropertyOrSetDefault("qInitialDataFetch",s,l,[{qTop:0,qLeft:0,qWidth:0,qHeight:0}]),hh.copyPropertyOrSetDefault("qMode",s,l,"S"),hh.copyPropertyOrSetDefault("qReductionMode",s,l,"N"),hh.copyPropertyOrSetDefault("qSortbyYValue",s,l),hh.copyPropertyOrSetDefault("qIndentMode",s,l),hh.copyPropertyOrSetDefault("qShowTotalsAbove",s,l),hh.importCommonProperties(a,e,t),hh.updateDimensionsOnAdded({newProperties:a,dataDefinition:n,hypercubePath:o}),hh.updateMeasuresOnAdded({newProperties:a,dataDefinition:n,hypercubePath:o}),i.qProperty=a,i}(e)};const gh=e=>sh.getValue(e,"data.targets.0.propertyPath"),bh=e=>{if(e.exportProperties)return e.exportProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return mh.exportProperties})(gh(e))},yh=e=>{if(e.importProperties)return e.importProperties;return(e=>{if(e.split("/").indexOf("qHyperCubeDef")>-1)return mh.importProperties})(gh(e))},vh=async({halo:e,model:t,cellRef:n,newType:r,properties:o,viewDataMode:i=!1})=>{const a=o?{qProperty:o}:await t.getFullPropertyTree(),s=n.current.getQae(),l=bh(s);if(!l)throw new Error("Source chart does not support conversion");const c=await(async({halo:e,name:t,version:n})=>{const{types:r}=e;return await r.get({name:t,version:n}).supernova()})({halo:e,name:r}),u=c.qae,d=yh(u);if(!d)throw new Error("Target chart does not support conversion");return d({exportFormat:l({propertyTree:a,hypercubePath:hh.getHypercubePath(s),viewDataMode:i}),initialProperties:Z({qInfo:{qType:r},visualization:r},sh.getValue(u,"properties.initial",{})),dataDefinition:sh.getValue(u,"data.targets.0.",{}),hypercubePath:hh.getHypercubePath(u),viewDataMode:i})},Sh={hypercube:mh},wh=Ze.bind(null,!0),kh={},{isArray:xh}=Array;function Ch(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Eh(e){return void 0===e}function Lh(e,t){return function(e){return"function"==typeof e}(e[t])||"$$"===t.substring(0,2)||"_"===t.substring(0,1)}function Rh(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e}function Th(e,t){let n;return t.substring(1).split("/").slice(0,-1).forEach(t=>{if(!Rh(t))throw new Error(`Unsafe key in path: ${t}`);n=+t;const r=isNaN(n)?{}:[];e[n||t]=Eh(e[n||t])?r:e[t],e=e[n||t]}),e}function qh(e,t){let n=!0;if(Ch(e)&&Ch(t))return Object.keys(e).length===Object.keys(t).length&&(Object.keys(e).forEach(r=>{qh(e[r],t[r])||(n=!1)}),n);if(xh(e)&&xh(t)){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n+=1)if(!qh(e[n],t[n]))return!1;return!0}return e===t}kh.generate=function(e,t,n){n=n||"";let r=[];return Object.keys(t).forEach(o=>{const i=function(e){return e?wh({},{val:e}).val:e}(t[o]),a=e[o],s=`${n}/${o}`;qh(i,a)||Lh(t,o)||(Eh(a)?r.push({op:"add",path:s,value:i}):Ch(i)&&Ch(a)?r=r.concat(kh.generate(a,i,s)):xh(i)&&xh(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]&&Eh(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(qh(t,o))return r;if(!Eh(t[0])&&Eh(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:`${n}/${e}`}),o.splice(e,1)):r=r.concat(kh.generate(o[e],t[i],`${n}/${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:`${n}/${e}`,value:t[e]}),o.splice(e,0,t[e])):i!==e&&(r.push({op:"move",path:`${n}/${e}`,from:`${n}/${i}`}),o.splice(e,0,o.splice(i,1)[0]));return r}(a,i,s)):r.push({op:"replace",path:`${n}/${o}`,value:i}))}),Object.keys(e).forEach(o=>{Eh(t[o])&&!Lh(e,o)&&r.push({op:"remove",path:`${n}/${o}`})}),r},kh.apply=function(e,t){t.forEach(t=>{let n=Th(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(!Rh(r)||null!==i&&!Rh(i)){const e=Rh(r)?i:r;throw new Error(`Unsafe key in patch path: ${e}`)}if("/"===t.path&&(n=null,o=e),"add"===t.op||"replace"===t.op)if(xh(n))"-"===r&&(r=n.length),n.splice(+r,"add"===t.op?0:1,t.value);else if(xh(o)&&xh(t.value)){const e=t.value.slice();o.length=0,o.push(...e)}else if(Ch(o)&&Ch(t.value))a=o,Object.keys(a).forEach(e=>{Object.getOwnPropertyDescriptor(a,e).configurable&&!Lh(a,e)&&Rh(e)&&delete a[e]}),wh(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=Th(e,t.from);xh(n)?n.splice(+r,0,o.splice(+i,1)[0]):(n[r]=o[i],delete o[i])}else"remove"===t.op&&(xh(n)?n.splice(+r,1):delete n[r]);var a})},kh.clone=function(e){return wh({},e)},kh.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},kh.updateObject=function(e,t){Object.keys(e).length?kh.apply(e,kh.generate(e,t)):wh(e,t)};const Ph=e=>t=>{const n=(r=Z(Z({},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(pe.prototype).forEach(e=>{r[e]=pe.prototype[e]}),pe.init(r),r);var r;return n};let Ih,_h;function Oh(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 Dh(e,{explicitResize:t=!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},contraintsWarning:!0}}function Ah(e){jh(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 Nh(e){if(e.__hooks.obsolete)return Promise.resolve();_h=-1,Ih=e,Ih.__hooks.initiated&&Ih.__hooks.list.length;try{Ih.fn.call(null)}catch(e){console.error(e)}Ih.__hooks.initiated=!0;const t=Ih.__hooks;return Fh(Ih),_h=void 0,Ih=void 0,t.chain.promise||(t.chain.promise=new Promise(e=>{t.chain.resolve=e})),function(e){jh(e.pendingLayoutEffects)}(t),function(e){if(e.macro)return;e.macro=requestAnimationFrame(()=>{!function(e){jh(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 jh(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 Mh(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 $h(e,t,n,r){try{return Promise.all(e.__hooks.menus.map(e=>Promise.resolve(e.fn(t,n,r)))).then(e=>e[e.length-1])}catch(e){console.error(e)}return Promise.resolve()}function zh(e){return e.__hooks.imperativeHandle}function Fh(e){e.__actionsDispatch&&e.__hooks.actions.changed&&(e.__actionsDispatch(e.__hooks.actions.list.slice()),e.__hooks.actions.changed=!1)}function Bh(e,t){e.__actionsDispatch=t,e.__hooks&&(e.__hooks.actions.changed=!0,Fh(e))}function Uh(e){if(void 0===Ih)throw new Error("Invalid stardust hook call. Hooks can only be called inside a visualization component.");const t=Ih.__hooks;return e>=t.list.length&&t.list.push({}),t.list[e]}function Wh(e){Uh(++_h);return Ih.context[e]}function Hh(e){e.__hooks&&(e.__hooks.resizer.update=!0)}function Vh(e){return{__hooked:!0,fn:e,initiate:Dh,run:Nh,teardown:Ah,runSnaps:Mh,runMenu:$h,focus:Cm,blur:Em,observeActions:Bh,getImperativeHandle:zh,updateRectOnNextRun:Hh}}function Gh(e){const t=Uh(++_h);if(!t.value){t.component=Ih;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,Nh(r)},0)))};t.value=["function"==typeof e?e():e,n]}return t.value}function Kh(e,t){const n=Uh(++_h);Oh(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],-1===Ih.__hooks.pendingEffects.indexOf(n)&&Ih.__hooks.pendingEffects.push(n))}function Jh(e,t){const n=Uh(++_h);Oh(n.value?n.value[1]:void 0,t)&&(n.value=[e,t],Ih.__hooks.pendingLayoutEffects.push(n))}function Qh(e,t){const n=Uh(++_h);return Oh(n.value?n.value[0]:void 0,t)&&(n.value=[t,e()]),n.value[1]}function Zh(e){return Qh(()=>({current:e}),[])}function Xh(e,t){const[n,r]=Gh(()=>({resolved:void 0,rejected:void 0,state:"pending"})),o=Uh(++_h);return o.component||(o.component=Ih),Jh(()=>{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 Yh(){return Wh("element")}function em(){const e=Yh(),t=Ih.__hooks.resizer,[n,r]=Gh(()=>{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()),Jh(()=>{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 tm(){return Wh("layout")}function nm(){const e=Wh("layout"),[t]=Gh({current:e});return e.qSelectionInfo&&e.qSelectionInfo.qInSelections||(t.current=e),t.current}function rm(){return Wh("appLayout")}function om(){const e=Wh("model");return e&&e.session?e:void 0}function im(){const e=Wh("app");return e&&e.session?e:void 0}function am(){const e=Wh("global");return e&&e.session?e:void 0}function sm(){return Wh("selections")}function lm(){return Wh("theme")}function cm(){return Wh("nebbie")}function um(){return Wh("translator")}function dm(){return Wh("deviceType")}function fm(){return Wh("navigation")}function pm(){return Wh("plugins")}function hm(e,t){const[n]=Gh({action(){n._config.action.call(null)}});return n.component||(n.component=Ih,Ih.__hooks.actions.list.push(n)),Qh(()=>{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 mm(){return Wh("constraints")}function gm(){return Wh("interactions")}function bm(){return Wh("options")}function ym(e,t){const n=Uh(++_h);if(n.imperative||(n.imperative=!0),Oh(n.value?n.value[0]:void 0,t)){const r=e();n.value=[t,r],Ih.__hooks.imperativeHandle=r}}function vm(e){const t=Uh(++_h);t.value||(t.value=1,Ih.__hooks.snaps.push(t)),t.fn=e}function Sm(e){const t=Uh(++_h);t.value||(t.value=1,Ih.__hooks.menus.push(t)),t.fn=e}function wm(){Uh(++_h);const e=Ih.__hooks;return{pending:()=>{e.waitForData=!0},restore:()=>{e.waitForData=!1}}}function km(){return Wh("emitter")}function xm(){const e=Wh("keyboardNavigation"),t=Wh("focusHandler");if(!Ih.__hooks.accessibility.exitFunction){const e=function(e=!1){const n=this.__hooks.accessibility;n&&n.enabled&&n.active&&(Em(this),t&&t.blurCallback&&t.blurCallback(e))}.bind(Ih);Ih.__hooks.accessibility.exitFunction=e;const n=function(){const e=this.__hooks.accessibility;e&&e.enabled&&!e.active&&(t&&t.blurCallback&&t.blurCallback(!1),Cm(this))}.bind(Ih);Ih.__hooks.accessibility.focusFunction=n;const r=function(e=!1){const n=this.__hooks.accessibility;n&&n.enabled&&t&&t.focusToolbarButton&&t.focusToolbarButton(e)}.bind(Ih);Ih.__hooks.accessibility.focusSelectionFunction=r}const n=Ih.__hooks.accessibility.focusFunction,r=Ih.__hooks.accessibility.exitFunction,o=Ih.__hooks.accessibility.focusSelectionFunction,[i,a]=Gh({active:!1,enabled:e,blur:r,focus:n,focusSelection:o});return Ih.__hooks.accessibility.setter=a,Ih.__hooks.accessibility.enabled=e,Kh(()=>a({active:!1,enabled:e,blur:r,focus:n,focusSelection:o}),[e]),i}function Cm(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 Em(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 Lm={app:null,model:null,actions:null,selections:null,created:()=>{},mounted:()=>{},render:()=>{},resize:()=>{},willUnmount:()=>{},destroy:()=>{},emit:()=>{},getViewState:()=>{},observeActions(){},setSnapshotData:e=>Promise.resolve(e)},Rm=Object.keys(Lm);function Tm(e,t){const n=Z({},Lm);var r;r=n,Object.keys(pe.prototype).forEach(e=>{r[e]=pe.prototype[e]}),pe.init(r);const o={emit(...e){n.emit(...e)}};Object.keys(e.component||{}).forEach(t=>{-1!==Rm.indexOf(t)?n[t]=e.component[t].bind(o):o[t]=e.component[t]});const i=function({sn:e,component:t}){const n={},r=[],o=Ph(t);return((e.definition.selectionToolbar||{}).items||[]).forEach(e=>{const t=o(e);n[e.key]=t,r.push(t)}),(e.definition.actions||[]).forEach(e=>{const t=o(e);n[e.key]=t}),{actions:n,selectionToolbarItems:r,destroy(){r.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 qm(e,t,n){"function"==typeof e.component&&(e.component=Vh(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","interactions"],s={},l={};t.model&&t.model.session||(s.select=!0,s.edit=!0,l.select=!1,l.edit=!1);const c={context:{model:t.model,app:t.app,global:r,selections:t.selections,nebbie:t.nebbie,element:void 0,emitter:t.emitter,deviceType:n.deviceType,theme:void 0,translator:n.translator,navigation:t.navigation,layout:{},appLayout:{},keyboardNavigation:t.keyboardNavigation,externalFocusManagement:t.externalFocusManagement||!1,focusHandler:t.focusHandler,constraints:s,interactions:l,options:{},plugins:[]},fn:e.component.fn,created(){},mounted(n){this.context.element=n,e.component.initiate(c,{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(Z(Z({},r[e]),s))),"interactions"===e&&(t=JSON.stringify(Z(Z({},r[e]),l))),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=c.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,r){return e.component.runMenu(this,t,n,r)},focus(){const t=e.component.getImperativeHandle(this);t&&"function"==typeof t.focus?t.focus():e.component.focus(this)},blur(){e.component.blur(this)},getImperativeHandle(){return e.component.getImperativeHandle(this)},destroy(){},observeActions(t){e.component.observeActions(this,t)},isHooked:!0};return a.forEach(e=>{i[e]=JSON.stringify(c.context[e])}),i.themeName=c.context.theme?c.context.theme.name():void 0,i.language=c.context.translator?c.context.translator.language():void 0,Object.assign(c,{selections:t.selections}),[c,null]}(e,t,n):Tm(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(...n){try{e.qae.properties.onChange.call({model:t.model},...n)}catch(e){}return t.model.__snInterceptor.setProperties.call(this,...n)},t.model.applyPatches=function(n,r){const o=r?"getEffectiveProperties":"getProperties";return t.model[o]().then(o=>{const i=kh.clone(o),a=n.map(e=>({op:e.qOp,value:JSON.parse(e.qValue),path:e.qPath}));kh.apply(o,a);try{e.qae.properties.onChange.call({model:t.model},o)}catch(e){}const s=kh.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.__snInterceptor&&(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 Pm=1e3,Im=1e3,_m=[{qSortByLoadOrder:1,qSortByNumeric:1,qSortByAscii:1}],Om=()=>[[10,31],[0,31],[0,31],[0,31],[0,31],[0,31]].map(([e,t])=>e+(Math.random()*(t-e)|0).toString(32)).join(""),Dm=(e,t)=>e&&e.find(e=>{var n;return(null===(n=e.qDef)||void 0===n?void 0:n.cId)===t})||null,Am=e=>{var t,n;return Z(Z({},e),{},{qDef:Z(Z({},e.qDef),{},{cId:null!==(t=null===(n=e.qDef)||void 0===n?void 0:n.cId)&&void 0!==t?t:Om()})})},Nm=e=>{var t;return Z(Z({},Am(e)),{},{qOtherTotalSpec:null!==(t=e.qOtherTotalSpec)&&void 0!==t?t:{}})},jm=(e,t,n)=>{const r=t;e.forEach((e,t)=>{const o=e.qTags,i={qSortByLoadOrder:1};"function"==typeof n.dimensionDefinition.autoSort?n.dimensionDefinition.autoSort(r,n.properties,o,i,n):(i.qSortByNumeric=1,i.qSortByAscii=1),r.qDef.qSortCriterias?r.qDef.qSortCriterias[t]=i:r.qDef.qSortCriterias=[i]})},Mm=new Error("Not supported in this object, need to implement in subclass."),$m=e=>{if(!e)return[];return[...e].map(e=>{var t;return null!==(t=e.qDef)&&void 0!==t&&t.autoSort&&void 0!==e.autoSort?Z(Z({},e),{},{qDef:Z(Z({},e.qDef),{},{autoSort:e.autoSort}),autoSort:void 0}):e})},zm=(e,t)=>{if(e)return t&&sh.getValue(e,t)?sh.getValue(e,t).qHyperCube:e.qHyperCube};function Fm(e,t){return e.filter((e,n)=>t.includes(n))}function Bm(e,t,n=void 0){const r=e.getAlternativeDimensions(),o=null!=n?n:r.length;return r.splice(o,0,t),Promise.resolve(t)}function Um(e,t,n){lh.indexAdded(e.hcProperties.qInterColumnSortOrder,null!=n?n:t.length-1)}function Wm(e,t){return"function"==typeof e.dimensionDefinition.move?Promise.resolve(e.dimensionDefinition.move.call(e,t,e.properties,e)).then(()=>t):Promise.resolve(t)}function Hm(e,t){return e.getAlternativeDimensions().length+t.length>=Pm}function Vm(e,t){const n=e.getAlternativeDimensions();return t||e.maxDimensions()<=n.length&&n.length<Pm}async function Gm(e,t,n,r,o,i){await e.autoSortDimension(t),lh.indexAdded(e.hcProperties.qInterColumnSortOrder,n+i),r.push(t),o.push(t),"function"==typeof e.dimensionDefinition.add&&e.dimensionDefinition.add.call(e,t,e.properties,e)}function Km(e,t,n=void 0){const r=e.getAlternativeMeasures(),o=null!=n?n:r.length;return r.splice(o,0,t),Promise.resolve(t)}function Jm(e,t){lh.indexAdded(e.hcProperties.qInterColumnSortOrder,e.getDimensions().length+t.length-1)}function Qm(e,t){const n=e.getMeasures();return t||e.maxMeasures()<=n.length&&n.length<Im}function Zm(e,t,n,r){const o=e-n.length;let[i]=n.splice(n.length-1,1);return r.splice(0,0,i),[i]=r.splice(o+1,1),n.splice(t,0,i),Promise.resolve(i)}class Xm{constructor(e){var t,n;const r=e||{};this.dimensionDefinition=r.dimensionDefinition||{max:0},this.measureDefinition=r.measureDefinition||{max:0},this.dimensionProperties=null!==(t=r.dimensionProperties)&&void 0!==t?t:{},this.measureProperties=null!==(n=r.measureProperties)&&void 0!==n?n:{},this.globalChangeListeners=r.globalChangeListeners,this.app=r.app}setProperties(e){var t;this.properties=e,this.isAnalysisType=null===(t=this.properties)||void 0===t||null===(t=t.metaData)||void 0===t?void 0:t.isAnalysisType}setGlobalChangeListeners(e){this.globalChangeListeners=e}setLayout(e){this.layout=e}type(){throw new Error("Must override this method")}getDimensions(){return[]}getDimension(e){var t;const n=this.getDimensions(),r=this.getAlternativeDimensions();return null!==(t=Dm(n,e))&&void 0!==t?t:Dm(r,e)}getAlternativeDimensions(){throw new Error("Method not implemented.")}addDimension(){throw Mm}addDimensions(){throw Mm}removeDimension(){throw Mm}removeDimensions(){throw Mm}autoSortDimension(){throw Mm}replaceDimension(){throw Mm}getSorting(){throw Mm}createLibraryDimension(e,t){let n=Ze(!0,{},this.dimensionProperties||{},t||{});return n=Nm(n),n.qLibraryId=e,n.qDef.autoSort=!0,n.qDef.qSortCriterias=_m,delete n.qDef.qFieldDefs,delete n.qDef.qFieldLabels,n}createFieldDimension(e,t,n){let r=Ze(!0,{},this.dimensionProperties||{},n||{});return r=Nm(r),e||(r.qDef.qFieldDefs=[],r.qDef.qFieldLabels=[],r.qDef.qSortCriterias=[]),r.qDef.qFieldDefs=[e],r.qDef.qFieldLabels=t?[t]:[""],r.qDef.qSortCriterias=_m,r.qDef.autoSort=!0,r}addFieldDimension(e,t,n){const r=this.createFieldDimension(e,t,n);return this.addDimension(r)}addFieldDimensions(e){const t=e.map(({field:e,label:t,defaults:n})=>this.createFieldDimension(e,t,n));return this.addDimensions(t)}addLibraryDimension(e,t){const n=this.createLibraryDimension(e,t);return this.addDimension(n)}addLibraryDimensions(e){const t=e.map(({id:e,defaults:t})=>this.createLibraryDimension(e,t));return this.addDimensions(t)}async addAltLibraryDimensions(e){const t=e.map(({id:e})=>this.createLibraryDimension(e));return this.addDimensions(t,!0)}async addAltFieldDimensions(e){const t=e.map(({field:e})=>this.createFieldDimension(e));return this.addDimensions(t,!0)}addAlternativeFieldDimension(e){const t=this.createFieldDimension(e);return this.addDimension(t,!0)}addAlternativeLibraryDimension(e,t){const n=this.createLibraryDimension(e,t);return this.addDimension(n,!0)}minDimensions(){return"function"==typeof this.dimensionDefinition.min?this.dimensionDefinition.min.call(null,this.properties,this):this.dimensionDefinition.min||0}maxDimensions(e=0){const t=this.getMeasures().length-e;if("function"==typeof this.dimensionDefinition.max){var n;const e=[t];return null===(n=this.dimensionDefinition.max)||void 0===n?void 0:n.apply(null,e)}return Number.isNaN(+this.dimensionDefinition.max)?1e4:this.dimensionDefinition.max}canAddDimension(){return this.getDimensions().length<this.maxDimensions()}getMeasures(){return[]}getAlternativeMeasures(){throw new Error("Method not implemented.")}addMeasure(){throw Mm}addMeasures(){throw Mm}removeMeasure(){throw Mm}removeMeasures(){throw Mm}autoSortMeasure(){throw Mm}replaceMeasure(){throw Mm}getMeasure(e){var t;const n=this.getMeasures(),r=this.getAlternativeMeasures();return null!==(t=Dm(n,e))&&void 0!==t?t:Dm(r,e)}createExpressionMeasure(e,t,n){var r,o;const i=Ze(!0,{},this.measureProperties||{},n||{});return i.qDef=null!==(r=i.qDef)&&void 0!==r?r:{},i.qDef.qNumFormat=null!==(o=i.qDef.qNumFormat)&&void 0!==o?o:{},i.qDef.qDef=e,i.qDef.qLabel=t,i.qDef.autoSort=!0,i}addExpressionMeasure(e,t,n){const r=this.createExpressionMeasure(e,t,n);return this.addMeasure(r)}addExpressionMeasures(e){const t=e.map(({expression:e,label:t,defaults:n})=>this.createExpressionMeasure(e,t,n));return this.addMeasures(t,!1)}createLibraryMeasure(e,t){var n,r;const o=Ze(!0,{},this.measureProperties||{},t||{});return o.qDef=null!==(n=o.qDef)&&void 0!==n?n:{},o.qDef.qNumFormat=null!==(r=o.qDef.qNumFormat)&&void 0!==r?r:{},(e=>{const t=e;t.quarantine={qNumFormat:t.qNumFormat||{},isCustomFormatted:t.isCustomFormatted||!1},t.qNumFormat=null,t.isCustomFormatted=void 0})(o.qDef),o.qLibraryId=e,o.qDef.autoSort=!0,delete o.qDef.qDef,delete o.qDef.qLabel,o}addLibraryMeasure(e,t){const n=this.createLibraryMeasure(e,t);return this.addMeasure(n)}addLibraryMeasures(e){const t=e.map(({id:e,defaults:t})=>this.createLibraryMeasure(e,t));return this.addMeasures(t,!1)}addAltLibraryMeasures(e){const t=e.map(({id:e,defaults:t})=>this.createLibraryMeasure(e,t));return this.addMeasures(t,!0)}addAltExpressionMeasures(e){const t=e.map(({expression:e})=>this.createExpressionMeasure({expression:e}));return this.addMeasures(t,!0)}addAlternativeExpressionMeasure(e,t,n){const r=this.createExpressionMeasure(e,t,n);return this.addMeasure(r,!0)}addAlternativeLibraryMeasure(e,t){const n=this.createLibraryMeasure(e,t);return this.addMeasure(n,!0)}minMeasures(){return"function"==typeof this.measureDefinition.min?this.measureDefinition.min.call(null,this.properties,this):this.measureDefinition.min||0}maxMeasures(e=0){if("function"==typeof this.measureDefinition.max){const t=[this.getDimensions().length-e];return this.measureDefinition.max.apply(null,t)}return Number.isNaN(+this.measureDefinition.max)?1e4:this.measureDefinition.max}canAddMeasure(){return this.getMeasures().length<this.maxMeasures()}updateGlobalChangeListeners(e){this.globalChangeListeners&&(this.globalChangeListeners||[]).forEach(t=>{t&&"function"==typeof t&&t(this.properties,this,{layout:e})})}}function Ym(e,t,n){const r=e.getDimensions();return r.splice(n,0,t),e.autoSortDimension(t).then(async()=>(Um(e,r,n),await function(e,t){return t&&"function"==typeof e.dimensionDefinition.add?Promise.resolve(e.dimensionDefinition.add.call(null,t,e.properties,e)).then(()=>t):Promise.resolve(t)}(e,t),t))}function eg(e,t,n){const r=e.getMeasures(),o=null!=n?n:r.length;return r.length<e.maxMeasures()?(r.splice(o,0,t),e.autoSortMeasure(t).then(()=>(Jm(e,r),function(e,t){return t&&"function"==typeof e.measureDefinition.add?Promise.resolve(e.measureDefinition.add.call(null,t,e.properties,e)):Promise.resolve()}(e,t).then(()=>t),t))):Promise.resolve()}async function tg(e,t){!function(e,t){lh.indexRemoved(e.hcProperties.qInterColumnSortOrder,t)}(e,t),await function(e,t){const[n]=e.getDimensions().splice(t,1);return n&&"function"==typeof e.dimensionDefinition.remove?Promise.resolve(e.dimensionDefinition.remove.call(null,n,e.properties,e,t)):Promise.resolve()}(e,t)}async function ng(e,t){!function(e,t){lh.indexRemoved(e.hcProperties.qInterColumnSortOrder,e.getDimensions().length+t)}(e,t),await function(e,t){const[n]=e.getMeasures().splice(t,1);return n&&"function"==typeof e.measureDefinition.remove?Promise.resolve(e.measureDefinition.remove.call(null,n,e.properties,e,t)):Promise.resolve()}(e,t)}function rg(e,t){const[n]=e.getAlternativeDimensions().splice(t,1);if(n&&"function"==typeof e.dimensionDefinition.remove)return n.isAlternative=!0,Promise.resolve(e.dimensionDefinition.remove.call(null,n,e.properties,e,t)).then(()=>{delete n.isAlternative})}function og(e,t,n){const r=e.getMeasures(),o=null!=n?n:r.length;return r.length<e.maxMeasures()?(r.splice(o,0,t),Jm(e,r),function(e,t){return"function"==typeof e.measureDefinition.move?Promise.resolve(e.measureDefinition.move.call(null,t,e.properties,e,!0)).then(()=>t):Promise.resolve(t)}(e,t)):Promise.resolve(t)}class ig extends Xm{constructor(e){super(e),this.path=e.path}setProperties(e){e&&(super.setProperties(e),this.hcProperties=this.path?sh.getValue(e,`${this.path}.qHyperCubeDef`):e.qHyperCubeDef,this.hcProperties&&(!function(e){var t,n,r,o,i,a,s;const l=e;l.hcProperties.qDimensions=null!==(t=l.getDimensions())&&void 0!==t?t:[],l.hcProperties.qMeasures=null!==(n=l.getMeasures())&&void 0!==n?n:[],l.hcProperties.qInterColumnSortOrder=null!==(r=l.hcProperties.qInterColumnSortOrder)&&void 0!==r?r:[],l.hcProperties.qLayoutExclude=null!==(o=l.hcProperties.qLayoutExclude)&&void 0!==o?o:{qHyperCubeDef:{qDimensions:[],qMeasures:[]}},l.hcProperties.qLayoutExclude.qHyperCubeDef=null!==(i=l.hcProperties.qLayoutExclude.qHyperCubeDef)&&void 0!==i?i:{qDimensions:[],qMeasures:[]},l.hcProperties.qLayoutExclude.qHyperCubeDef.qDimensions=null!==(a=l.getAlternativeDimensions())&&void 0!==a?a:[],l.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures=null!==(s=l.getAlternativeMeasures())&&void 0!==s?s:[]}(this),function(e){const t=e;t.hcProperties.isHCEnabled&&0===t.hcProperties.qDynamicScript.length&&"S"===t.hcProperties.qMode&&(t.hcProperties.qDynamicScript=[])}(this),this.hcProperties.qDimensions=$m(this.hcProperties.qDimensions),this.hcProperties.qMeasures=$m(this.hcProperties.qMeasures)))}getDimensions(){return this.hcProperties?this.hcProperties.qDimensions:[]}getAlternativeDimensions(){var e,t;return null!==(e=null===(t=this.hcProperties)||void 0===t||null===(t=t.qLayoutExclude)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qDimensions)&&void 0!==e?e:[]}getDimensionLayout(e){return this.getDimensionLayouts().filter(t=>e===t.cId)[0]}getDimensionLayouts(){const e=zm(this.layout,this.path);return e?e.qDimensionInfo:[]}addDimension(e,t,n){const r=Nm(e);return Vm(this,t)?Bm(this,r,n):function(e,t,n){const r=e.getDimensions(),o=null!=n?n:r.length;return r.length<e.maxDimensions()?Ym(e,t,o):Promise.resolve(t)}(this,r,n)}async addDimensions(e,t=!1){const n=this.getDimensions(),r=n.length,o=[];let i=0;var a,s=!1,l=!1;try{for(var c,u=G(e);s=!(c=await u.next()).done;s=!1){const e=c.value;{if(Hm(this,n))return o;const a=Nm(e);if(Vm(this,t)){const e=await Bm(this,a);o.push(e)}else n.length<this.maxDimensions()&&(await Gm(this,a,r,n,o,i),i++)}}}catch(e){l=!0,a=e}finally{try{s&&null!=u.return&&await u.return()}finally{if(l)throw a}}return o}removeDimension(e,t){return t?rg(this,e):tg(this,e)}async removeDimensions(e,t){const n=this.getAlternativeDimensions(),r=this.getDimensions();if(0===e.length)return[];let o=[];const i=[...e].sort((e,t)=>t-e);if(t&&n.length>0){o=Fm(n,e);var a,s=!1,l=!1;try{for(var c,u=G(i);s=!(c=await u.next()).done;s=!1){const e=c.value;await rg(this,e)}}catch(e){l=!0,a=e}finally{try{s&&null!=u.return&&await u.return()}finally{if(l)throw a}}}else if(r.length>0){o=Fm(r,e);var d,f=!1,p=!1;try{for(var h,m=G(i);f=!(h=await m.next()).done;f=!1){const e=h.value;await tg(this,e)}}catch(e){p=!0,d=e}finally{try{f&&null!=m.return&&await m.return()}finally{if(p)throw d}}}return o}replaceDimension(e,t){return this.autoSortDimension(t).then(()=>function(e,t,n){if(!n)return;const r=e.getDimensions(),o=r[t],i=Z(Z({},n),{},{qDef:Z(Z({},n.qDef),{},{cId:Om()})});return r[t]=i,i&&"function"==typeof e.dimensionDefinition.replace&&e.dimensionDefinition.replace.call(null,i,o,t,e.properties,e),i}(this,e,t))}reinsertDimension(e,t,n){const r=Am(e);return Vm(this,t)?Bm(this,r,n).then(()=>{Wm(this,r)}):function(e,t,n){const r=e.getDimensions(),o=null!=n?n:r.length;return r.length<e.maxDimensions()?(r.splice(o,0,t),Um(e,r),Wm(e,t)):Promise.resolve(t)}(this,r,n)}moveDimension(e,t){const n=this.getDimensions(),r=this.getAlternativeDimensions();return e<n.length&&t<n.length?Promise.resolve(lh.move(n,e,t)):e<n.length&&t>=n.length?function(e,t,n,r){const o=t-n.length;let[i]=r.splice(0,1);return n.push(i),[i]=n.splice(e,1),r.splice(o,0,i),Promise.resolve(i)}(e,t,n,r):e>=n.length&&t<n.length?Promise.resolve(Zm(e,t,n,r)):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;lh.move(r,o,i)}(e,t,n,r))}autoSortDimension(e){return e.qLibraryId?function(e,t){return e.app.getDimensionList().then(n=>{const r=(null==t?void 0:t.qLibraryId)&&(o=t.qLibraryId,(i=n)&&i.find(e=>e.qInfo.qId===o)||null);var o,i;return r&&jm(r.qData.info,t,e),t})}(this,e):function(e,t){return e.app.getFieldList().then(n=>{var r;const o=(null==t||null===(r=t.qDef)||void 0===r?void 0:r.qFieldDefs)&&((e,t)=>{const n=(e=>{const t=[];return e.forEach(e=>{t.push((e=>{const t=e;return t.isDateField=(e=>{var t,n;return(null==e?void 0:e.qDerivedFieldData)&&((null==e||null===(t=e.qTags)||void 0===t?void 0:t.indexOf("$date"))>-1||(null==e||null===(n=e.qTags)||void 0===n?void 0:n.indexOf("$timestamp"))>-1)})(t),t.isGeoField=(e=>e.qTags.indexOf("$geoname")>-1)(t),t})(e));const n=(e=>{const t=[];return e.qDerivedFieldData?(e.qDerivedFieldData.qDerivedFieldLists.forEach(n=>{n.qFieldDefs.forEach(r=>{var o;t.push({qName:r.qName,displayName:(o=r.qName,o?o.split(".autoCalendar").join(""):""),qSrcTables:e.qSrcTables,qTags:r.qTags,isDerived:!0,isDerivedFromDate:e.isDateField,sourceField:e.qName,derivedDefinitionName:n.qDerivedDefinitionName})})}),t):t})(e);t.push(...n)}),t})(t.slice(0)),r=(e=>{let t=e;t=t.trim(),"="===t.charAt(0)&&(t=t.substring(1),t=t.trim());const n=t.length-1;return"["===t.charAt(0)&&"]"===t.charAt(n)&&(t=t.substring(1,n),t=t.trim()),t})(e);return n&&((e,t)=>t&&t.find(t=>t.qName===e)||null)(r,n)||null})(t.qDef.qFieldDefs[0],n);return o&&jm([o],t,e),t})}(this,e)}getMeasures(){return this.hcProperties?this.hcProperties.qMeasures:[]}getAlternativeMeasures(){var e,t;return null!==(e=null===(t=this.hcProperties)||void 0===t||null===(t=t.qLayoutExclude)||void 0===t||null===(t=t.qHyperCubeDef)||void 0===t?void 0:t.qMeasures)&&void 0!==e?e:[]}getMeasureLayouts(){const e=zm(this.layout,this.path);return e?e.qMeasureInfo:[]}getMeasureLayout(e){return this.getMeasureLayouts().filter(t=>e===t.cId)[0]}addMeasure(e,t,n){const r=Am(e);return Qm(this,t)?Km(this,r,n):eg(this,r,n)}autoSortMeasure(e){const t=e;return t.qSortBy={qSortByLoadOrder:1,qSortByNumeric:-1},Promise.resolve(t)}addMeasures(e,t=!1){const n=this.getMeasures(),r=[];let o=0;return e.forEach(async e=>{if(function(e,t){return e.getAlternativeMeasures().length+t.length>=Im}(this,n))return!1;const i=Am(e);return Qm(this,t||!1)?(Km(this,i),r.push(i)):n.length<this.maxMeasures()&&(await function(e,t,n,r,o){const i=e.getDimensions(),a=Z({},t);return a.qSortBy={qSortByLoadOrder:1,qSortByNumeric:-1},lh.indexAdded(e.hcProperties.qInterColumnSortOrder,i.length+n.length+o),n.push(a),r.push(a),"function"==typeof e.measureDefinition.add&&e.measureDefinition.add.call(null,a,e.properties,e),Promise.resolve(r)}(this,i,n,r,o),o++),!0}),r}removeMeasure(e,t){return t?function(e,t){return e.getAlternativeMeasures().splice(t,1)}(this,e):ng(this,e)}async removeMeasures(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures();let o=[];if(0===e.length)return o;if(t&&r.length>0)o=Fm(r,e),function(e,t){const n=e,r=function(e,t){return e.filter((e,n)=>!t.includes(n))}(n.getAlternativeMeasures(),t);n.hcProperties.qLayoutExclude.qHyperCubeDef.qMeasures=r}(this,e);else if(n.length>0){o=Fm(n,e);const t=[...e].sort((e,t)=>t-e);var i,a=!1,s=!1;try{for(var l,c=G(t);a=!(l=await c.next()).done;a=!1){const e=l.value;await ng(this,e)}}catch(e){s=!0,i=e}finally{try{a&&null!=c.return&&await c.return()}finally{if(s)throw i}}}return o}replaceMeasure(e,t){return this.autoSortMeasure(t).then(()=>function(e,t,n){const r=e.getMeasures(),o=r[t],i=Z(Z({},n),{},{qDef:Z(Z({},n.qDef),{},{cId:Om()})});return r[t]=i,i&&"function"==typeof e.measureDefinition.replace&&e.dimensionDefinition.replace.call(null,i,o,t,e.properties,e),i}(this,e,t))}reinsertMeasure(e,t,n){const r=Am(e);return Qm(this,t)?Km(this,r,n):og(this,r,n)}moveMeasure(e,t){const n=this.getMeasures(),r=this.getAlternativeMeasures();return e<n.length&&t<n.length?Promise.resolve(lh.move(n,e,t)):e<n.length&&t>=n.length?function(e,t,n,r){const o=t-n.length;let[i]=r.splice(0,1);return n.push(i),[i]=n.splice(e,1),r.splice(o,0,i),Promise.resolve(i)}(e,t,n,r):e>=n.length&&t<n.length?Zm(e,t,n,r):Promise.resolve(function(e,t,n,r){const o=e-n.length,i=t-n.length;lh.move(r,o,i)}(e,t,n,r))}setSorting(e){e&&e.length===this.hcProperties.qInterColumnSortOrder.length&&(this.hcProperties.qInterColumnSortOrder=e)}getSorting(){return this.hcProperties.qInterColumnSortOrder}changeSorting(e,t){sh.move(this.hcProperties.qInterColumnSortOrder,e,t)}IsHCInStraightMode(){return"S"===this.hcProperties.qMode}setHCEnabled(e){this.hcProperties&&(this.hcProperties.isHCEnabled=e)}getDynamicScripts(){var e;return(null===(e=this.hcProperties)||void 0===e?void 0:e.qDynamicScript)||[]}}const ag=()=>{};function sg(e,t){return void 0===e?()=>t:()=>e}function lg(e){const t=e||{};return{min:"function"==typeof t.min?t.min:sg(t.min,0),max:"function"==typeof t.max?t.max:sg(t.max,1e3),added:t.added||t.add||ag,description:t.description||ag,moved:t.moved||t.move||ag,removed:t.removed||t.remove||ag,replaced:t.replaced||t.replace||ag,isDefined:()=>!!e}}function cg(e){const t=e.path||"/qHyperCubeDef",n=t.slice(0,-3);if(!1===/\/(qHyperCube|qListObject|qChildList)$/.test(n)){const e=n.includes("/qHyperCube")?"qHyperCubeDef":"qListObjectDef";throw new Error(`Incorrect definition for ${e} at ${t}. Valid paths include /qHyperCubeDef, /qListObjectDef, or /qChildListDef, 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:lg(e.dimensions),measures:lg(e.measures)}}function ug(e={}){let t,n=e.properties||{};e.properties&&(e.properties.initial||e.properties.onChange)&&(n=e.properties.initial,t=e.properties.onChange);return{properties:{initial:n,onChange:t},data:{targets:((e.data||{}).targets||[]).map(cg)},exportProperties:e.exportProperties,importProperties:e.importProperties}}function dg(e,t){var n,r;let o;o="function"==typeof e?e(t):e;const i={qae:ug(o.qae),component:o.component||{},create:e=>qm(i,e,t),definition:t.flags.isEnabled("NEBULA_DATA_HANDLERS")?{dataHandler:null!==(n=null===(r=o)||void 0===r?void 0:r.dataHandler)&&void 0!==n?n:e=>new ig(e)}:{}};return Object.keys(o).forEach(e=>{i[e]||(i.definition[e]=o[e])}),i}var fg=e=>Xs((e=>Z(Z({},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 pg({d:e}){const t=ts();let n="inherit",r=t.palette.success.main;e.missing?r=t.palette.warning.main:e.error&&(n="error",r=t.palette.error.main);const o={color:r},i=or.jsx(k,{style:{lineHeight:"30px",paddingRight:t.spacing(1)},children:or.jsx(U,{children:e.missing||e.error?or.jsx(fg,{style:o}):or.jsx(gl,{style:o})})});return or.jsxs(E,{container:!0,alignItems:"center",wrap:"nowrap",children:[or.jsx(E,{children:i}),or.jsx(E,{container:!0,sx:{minWidth:0},wrap:"nowrap",children:or.jsxs(k,{noWrap:!0,component:"p",children:[or.jsx(k,{component:"span",variant:"subtitle2",color:n,children:e.description}),or.jsx(k,{component:"span",children:" "}),or.jsx(k,{component:"span",variant:"subtitle2",color:e.error?"error":"inherit",style:{fontWeight:400},children:e.label})]})})]})}function hg({data:e}){const t=ts();return or.jsx(E,{container:!0,style:{maxWidth:"300px",overflow:"hidden"},children:e.map((e,n)=>{const r=e.descriptions.map((e,t)=>or.jsx(pg,{d:e},t));return r.length>0&&or.jsxs(E,{container:!0,direction:"column",style:{paddingBottom:t.spacing(2)},children:[or.jsx(k,{noWrap:!0,variant:"subtitle1",align:"left",color:"textSecondary",children:e.title},n),r]},n)})})}function mg({title:e="Error",message:t="",data:n=[]}){const[r,o]=Fs(),[i,a]=Fs(),[s,l]=Fs(),c=n.some(e=>e.descriptions&&e.descriptions.length>0),u=!!o&&!!a&&!!l&&a.height+l.height>o.height,d=!!o&&!!a&&!!l&&a.width+l.width<=o.width,f=c&&(!!o&&!!a&&!!l)&&(!u||d);return or.jsxs(E,{ref:r,container:!0,direction:"column",wrap:"wrap",alignItems:"center",justifyContent:"center",style:{position:"relative",height:"100%",width:"100%"},children:[or.jsxs(E,{ref:i,container:!0,direction:"column",alignItems:"center",wrap:"nowrap",children:[or.jsx(E,{children:or.jsx(fg,{style:{fontSize:"38px"}})}),or.jsx(E,{children:or.jsx(k,{variant:"h6",align:"center","data-tid":"error-title",children:e})}),or.jsx(E,{children:or.jsx(k,{variant:"subtitle1",align:"center","data-tid":"error-message",children:t})})]}),f?or.jsx(hg,{data:n}):null,c?or.jsx(E,{ref:s,"aria-hidden":!0,style:{position:"absolute",visibility:"hidden",pointerEvents:"none",left:0,top:0},children:or.jsx(hg,{data:n})}):null]})}const gg=["size"],bg="Progress",yg={root:`${bg}-root`,front:`${bg}-front`,back:`${bg}-back`},vg=ns("div")(({theme:e})=>({[`&.${yg.root}`]:{position:"relative",display:"inline-block"},[`& .${yg.front}`]:{color:e.palette.secondary.main,animationDuration:"1500ms",position:"absolute",left:0},[`& .${yg.back}`]:{color:e.palette.divider}})),Sg={small:16,medium:32,large:64,xlarge:128};function wg(e){let{size:t="medium"}=e,n=X(e,gg);const r=Sg[t];return or.jsxs(vg,{className:yg.root,children:[or.jsx(B,Z({variant:"determinate",value:100,className:yg.back,size:r,thickness:3},n)),or.jsx(B,Z({variant:"indeterminate",disableShrink:!0,className:yg.front,size:r,thickness:3},n))]})}const kg=["cancel","translator"],xg=["retry","translator"],Cg={stripes:"LongRunningQuery-stripes"},Eg=ns(E)(()=>({[`& .${Cg.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 Lg(e){let{cancel:t,translator:n}=e,r=X(e,kg);return or.jsxs(or.Fragment,{children:[or.jsxs(Eg,{container:!0,direction:"column",alignItems:"center",gap:2,children:[or.jsx(E,{children:or.jsx(wg,{})}),or.jsx(E,{children:or.jsx(k,{variant:"h6",align:"center","data-tid":"update-active",children:n.get("Object.Update.Active")})})]}),or.jsx(E,Z(Z({},r),{},{children:or.jsx(z,{variant:"contained",onClick:t,children:n.get("Cancel")})}))]})}function Rg(e){let{retry:t,translator:n}=e,r=X(e,xg);return or.jsxs(or.Fragment,{children:[or.jsx(E,{children:or.jsx(fg,{style:{fontSize:"38px"}})}),or.jsx(E,{children:or.jsx(k,{variant:"h6",align:"center","data-tid":"update-cancelled",children:n.get("Object.Update.Cancelled")})}),or.jsx(E,{children:or.jsx(z,Z(Z({variant:"contained",onClick:t},r),{},{children:n.get("Retry")}))})]})}function Tg({canCancel:e,canRetry:t,api:n}){const{translator:r}=s(Rs);return or.jsxs(E,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",className:Cg.stripes,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2,children:[e&&or.jsx(Lg,{cancel:n.cancel,translator:r,className:Cg.cancel}),t&&or.jsx(Rg,{retry:n.retry,translator:r,className:Cg.retry})]})}function qg(){return or.jsx(E,{container:!0,direction:"column",alignItems:"center",justifyContent:"center",style:{position:"absolute",width:"100%",height:"100%",left:0,top:0},gap:2,children:or.jsx(wg,{size:"large"})})}const Pg={width:0,height:0},Ig="Header",_g={containerStyle:`${Ig}-containerStyle`,containerTitleStyle:`${Ig}-containerTitleStyle`},Og=ns(E)(({theme:e})=>({[`&.${_g.containerStyle}`]:{flexGrow:0},[`&.${_g.containerTitleStyle}`]:{paddingBottom:e.spacing(1)}})),Dg="njs-cell-title",Ag="njs-cell-sub-title";function Ng({id:e,layout:t,sn:o,anchorEl:i,hovering:a,focusHandler:s,titleStyles:l={},isRtl:c,translator:u}){const d=t.showTitles&&!!t.title,f=t.showTitles&&!!t.subtitle,p=t.qSelectionInfo&&t.qSelectionInfo.qInSelections,[h,m]=n([]);r(()=>{o&&o.component&&o.component.isHooked&&o.component.observeActions(e=>{m([...e,...o&&o.selectionToolbar&&o.selectionToolbar.items||[]])})},[o]);const g=[_g.containerStyle,...d||f?[_g.containerTitleStyle]:[]],b=a||p,y=or.jsx(Cu,{show:!1,selections:{show:p,api:o.component.selections,onKeyDeactivate:s.refocusContent},actions:h,popover:{show:b,anchorEl:i},focusHandler:s,layout:t,isRtl:c});return or.jsxs(Og,{container:!0,wrap:"nowrap",className:g.join(" "),children:[or.jsx(E,{size:"grow",sx:{minWidth:0},dir:c?"rtl":"ltr",children:or.jsxs(E,{container:!0,wrap:"nowrap",direction:"column",children:[d?or.jsx(L,{title:t.title,children:or.jsx(k,{id:`${e}_title`,variant:"h6",noWrap:!0,className:Dg,style:l.main,children:t.title})}):or.jsx("div",{id:`${e}_title`,style:Pg,"aria-label":u.get("Accessibility.Object.NoTitle")}),f&&or.jsx(L,{title:t.subtitle,children:or.jsx(k,{variant:"body2",noWrap:!0,className:Ag,style:l.subTitle,children:t.subtitle})})]})}),or.jsx(E,{children:y})]})}const jg="condition",Mg="search",$g="clear_selection",zg="matches_exactly",Fg="starts_with",Bg="ends_with",Ug="beginning_of_word",Wg="general",Hg="fixed_value",Vg=(e,t)=>{if(!Array.isArray(e))return[];const n=t.get("Object.FilterLabel.Exclude"),r=e.filter(e=>!1!==e.showInFooter);return r.map(e=>{var r;let o="";switch(e.type){case Mg:o+=(e=>{var t,n,r;let o="",i="";switch(null===(t=e.options)||void 0===t?void 0:t.mode){case Ug:o="*^",i="*";break;case Bg:o="*";break;case Fg:i="*";break;case zg:break;default:o="*",i="*"}const a=null!==(n=null===(r=e.options.values)||void 0===r?void 0:r[0])&&void 0!==n?n:"";return""!==a?`"${o}${a}${i}"`:""})(e);break;case jg:o+=(e=>{var t,n,r,o,i,a,s;const{options:l}=e,c=(null==l?void 0:l.mode)===Wg,u=(null==l||null===(t=l.modifier)||void 0===t?void 0:t.type)===Hg,d=null!=l&&null!==(n=l.modifier)&&void 0!==n&&n.operator?l.modifier.operator.split(" "):[];if(0===d.length||!u&&(null===(r=l.firstValue)||void 0===r||!r.aggregator||null===(o=l.firstValue)||void 0===o||!o.field)||u&&(null===(i=l.firstValue)||void 0===i||!i.fixedValue)||c&&(null===(a=l.conditionField)||void 0===a||!a.aggregator||null===(s=l.conditionField)||void 0===s||!s.field))return"";let f,p,h="=";var m,g,b;if(c&&u)f=`${null===(m=l.conditionField)||void 0===m?void 0:m.aggregator}(${Gc(null===(g=l.conditionField)||void 0===g?void 0:g.field)})`,p=`${null===(b=l.firstValue)||void 0===b?void 0:b.fixedValue}`;else if(!c&&u){var y;f="",p=`${null===(y=l.firstValue)||void 0===y?void 0:y.fixedValue}`,h=""}else if(c||u){var v,S,w,k;f=`${null===(v=l.conditionField)||void 0===v?void 0:v.aggregator}(${Gc(null===(S=l.conditionField)||void 0===S?void 0:S.field)})`,p=`${null===(w=l.firstValue)||void 0===w?void 0:w.aggregator}(${Gc(null===(k=l.firstValue)||void 0===k?void 0:k.field)})`}else{var x,C;f=`${Gc(e.field)}`,p=`${null===(x=l.firstValue)||void 0===x?void 0:x.aggregator}(total ${Gc(null===(C=l.firstValue)||void 0===C?void 0:C.field)})`}const E=`${h}${f}${d[0]}${p}`;let L="";if(d.length>1){var R,T,q;if(!u&&(null===(R=l.secondValue)||void 0===R||!R.aggregator||null===(T=l.secondValue)||void 0===T||!T.field)||u&&(null===(q=l.secondValue)||void 0===q||!q.fixedValue))return"";let e,t;var P;if(c&&u)e=`${null===(P=l.secondValue)||void 0===P?void 0:P.fixedValue}`,t=` and ${f}`;else if(!c&&u){var I;e=`${null===(I=l.secondValue)||void 0===I?void 0:I.fixedValue}`,t=""}else if(c||u){var _,O;e=`${null===(_=l.secondValue)||void 0===_?void 0:_.aggregator}(${Gc(null===(O=l.secondValue)||void 0===O?void 0:O.field)})`,t=` and ${f}`}else{var D,A;e=`${null===(D=l.secondValue)||void 0===D?void 0:D.aggregator}(total ${Gc(null===(A=l.secondValue)||void 0===A?void 0:A.field)})`,t=` and ${f}`}L=`${t}${d[1]}${e}`}return`"${E}${L}"`})(e);break;case $g:o+=t.get("Object.FilterLabel.All");break;default:o+=null!==(r=e.options)&&void 0!==r&&r.values?e.options.values.join(", "):t.get("Object.FilterLabel.Unknown")}return""!==o&&(o=o.replace(/^"|"$/g,""),e.exclude&&(o=`${n} ${o}`)),{field:e.field,label:o}}).filter(e=>""!==e.label)},Gg=(e,t)=>Vg(e,t).map(e=>`${e.field}: ${e.label}`).join("; ");var Kg=e=>Xs((e=>Z(Z({},e),{},{shapes:[{type:"path",attrs:{d:"M14.07 0a1 1 0 0 1 .816 1.577L10 8.5v4.398a1 1 0 0 1-.532.884l-2.734 1.445A.5.5 0 0 1 6 14.785V8.5L1.112 1.577A1 1 0 0 1 1.93 0zm0 1H1.93L7 8.183v5.772l2-1.057V8.183z"}}]}))(e));function Jg({styles:e,children:t}){return or.jsx(k,{noWrap:!0,variant:"body2",style:Z(Z({},e),{},{fontStyle:"italic"}),children:t})}function Qg({layout:e,translator:t,filtersFootnoteString:n,footerStyle:r,isRtl:o}){var i;const a=Vg(null!==(i=null==e?void 0:e.filters)&&void 0!==i?i:[],t),s={color:null==r?void 0:r.color,fontFamily:null==r?void 0:r.fontFamily,fontSize:null==r?void 0:r.fontSize,fontWeight:null==r?void 0:r.fontWeight};return or.jsx(L,{title:n,children:or.jsxs(E,{container:!0,wrap:"nowrap",sx:{backgroundColor:null==r?void 0:r.backgroundColor,padding:null==r?void 0:r.padding,borderTop:null==r?void 0:r.borderTop},"data-testid":"filters-footnote",justifyContent:o?"flex-end":"flex-start",children:[or.jsxs(E,{sx:{display:"flex"},children:[or.jsx(Kg,{style:{fontSize:"12px",color:r.color,margin:"auto"}}),or.jsxs(Jg,{styles:Z(Z({},s),{},{marginLeft:"2px"}),children:[t.get("Object.FiltersApplied"),"  "]})]}),or.jsx(E,{sx:{display:"flex"},children:a.map(e=>or.jsxs(E,{container:!0,wrap:"nowrap",children:[or.jsx(Jg,{styles:Z(Z({},s),{},{fontWeight:"bold"}),children:`${e.field}:`}),or.jsxs(Jg,{styles:s,children:["   ",e.label,"  "]})]},`${e.field}-${e.label}`))})]})})}const Zg={itemStyle:"Footer-itemStyle"},Xg=ns(E)(()=>({[`& .${Zg.itemStyle}`]:{minWidth:0,width:"100%"}})),Yg="njs-cell-footer";function eb({layout:e,titleStyles:t={},translator:n,flags:r,isCardTheme:o,isRtl:i}){var a,s,l;const c=t.footer,u=(null==e||null===(a=e.filters)||void 0===a?void 0:a.length)>0&&(null==e||null===(s=e.qHyperCube)||void 0===s||null===(s=s.qMeasureInfo)||void 0===s?void 0:s.length)>0,d=Gg(null!==(l=null==e?void 0:e.filters)&&void 0!==l?l:[],n),f=!(null!=e&&e.footnote)&&u&&d,p=null==r?void 0:r.isEnabled("VNA-13_CELLPADDING_FROM_THEME"),h=o?"1px":"6px";return e&&e.showTitles&&(e.footnote||f)?or.jsx(Xg,{container:!0,children:or.jsxs(E,{className:Zg.itemStyle,"data-testid":Yg,sx:{paddingTop:e=>p?h:e.spacing(1)},children:[e.footnote&&or.jsx(L,{title:e.footnote,children:or.jsx(k,{noWrap:!0,variant:"body2",className:Yg,style:c,align:i?"right":"left",children:e.footnote})}),f&&or.jsx(Qg,{layout:e,translator:n,filtersFootnoteString:d,footerStyle:c,isRtl:i})]})}):null}class tb{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 nb="njs-viz";function rb({sn:e,snOptions:t,snPlugins:o,layout:i,appLayout:a,halo:l,cellId:u}){const{component:d}=e,{theme:f,language:p,constraints:h,interactions:m,keyboardNavigation:g}=s(Rs),[b]=n(()=>new tb),[y,v]=n(!1),[S,w]=n(0),[k,x,C]=Fs(),[E,L]=n(null),R=c(e=>{e&&L(e)},[]);return r(()=>{if(E)return d.created({options:t}),d.mounted(E),v(!0),()=>{b.stop(),d.willUnmount()}},[E,d]),r(()=>{y&&E&&x&&(!d.isHooked&&i&&i.qSelectionInfo&&i.qSelectionInfo.qInSelections||b.schedule(()=>{const n=[];return h.passive||n.push("passive"),h.active||n.push("interact"),h.select||n.push("select"),h.edit||n.push("edit"),l.app&&l.app.session&&n.push("fetch"),Promise.resolve(d.render({layout:i,options:t,plugins:o,embed:l.public.nebbie,context:Z({constraints:h,interactions:m,theme:l.public.theme,appLayout:a,keyboardNavigation:g},d.isHooked?{}:{logicalSize:e.logicalSize({layout:i}),localeInfo:(a||{}).qLocaleInfo,permissions:n})})).then(e=>{!1!==e&&(0===S&&"function"==typeof t.onInitialRender&&t.onInitialRender.call(null),w(S+1))})}))},[x,t,o,E,C,i,a,f,p,h,m,y,g]),or.jsx("div",{ref:k,"data-render-count":S,style:{position:"relative",height:"100%"},className:nb,children:or.jsx("div",{ref:R,id:`${u}_content`,style:{position:"absolute",width:"100%",height:"100%"}})})}const ob={linechart:"lineChart",barchart:"barChart",combochart:"comboChart",scatterplot:"scatterPlot",piechart:"pieChart",straightable:"straightTable",pivottable:"pivotTable",table:"straightTable","pivot-table":"pivotTable",listbox:"listBox",referenceline:"referenceLine",datacolors:"dataColors","text-image":"textImage",boxplot:"boxPlot",map:"mapChart",mapchart:"mapChart",bulletchart:"bulletChart","sn-table":"straightTableV2",waterfallchart:"waterfallChart","sn-tabbed-container":"tabContainer","sn-slider":"slider"},ib=({layout:e,theme:t,app:n,themeName:r,disableThemeBorder:o,queryParams:a})=>{const{hostConfig:l}=s(Rs),c=i(()=>{if(e&&t){const i=e.components?e.components.find(e=>"general"===e.key):null,s=(r=e.visualization,ob[r.toLowerCase()]?ob[r.toLowerCase()]:r),c={main:$f(i,"main",t,s),footer:$f(i,"footer",t,s),subTitle:$f(i,"subTitle",t,s)},u=jf(i,t,s),d=Nf(i,n,a,null==l?void 0:l.host),f=function(e,t,n,r){const o=_f(null==e?void 0:e.borderColor,"","borderColor",t,n);let i=null==e?void 0:e.borderWidth;return!i&&!r&&(i=If("","borderWidth",t,n)),i&&o?`${i} solid ${o}`:void 0}(i,t,s,o),p=function(e,t,n){return(null==e?void 0:e.borderRadius)||If("","borderRadius",t,n)}(i,t,s);return{titleStyles:c,bgColor:u,bgImage:d,border:f,borderRadius:p,boxShadow:Mf(i,t,s)}}var r;return{}},[e,t,n,r,o]);return c};class ab extends Error{constructor(e,t){super(e),this.originalError=t,this.name="RenderError"}}const sb=["action-button","sn-nav-menu","filterpane","sn-shape"],lb=[...sb,"pivot-table","table","sn-table","sn-pivot-table","kpi","sn-calendar","sn-filter-pane","sn-layout-container","sn-tabbed-container"],cb=e=>-1===sb.indexOf(e),ub=e=>cb(e)?"10px 10px 0":"10px 0 0",db=({layout:e,isError:t,isCardTheme:n,titleStyles:r,translator:o})=>{if(n){var i,a,s;const n=(null==e?void 0:e.showTitles)&&!(null==e||!e.title),l=(null==e?void 0:e.showTitles)&&!(null==e||!e.subtitle),c=(null==e||null===(i=e.filters)||void 0===i?void 0:i.length)>0&&(null==e||null===(a=e.qHyperCube)||void 0===a||null===(a=a.qMeasureInfo)||void 0===a?void 0:a.length)>0,u=null==e?void 0:e.visualization,d=Gg(null!==(s=null==e?void 0:e.filters)&&void 0!==s?s:[],o),f=!(null!=e&&e.footnote)&&c&&d,p=(null==e?void 0:e.showTitles)&&(!(null==e||!e.footnote)||f);let h;return n&&(r.main.padding=ub(u)),l&&(r.subTitle.padding=((e,t)=>{const n=cb(e);return t?n?"0 10px":"0":ub(e)})(u,n)),p&&(-1===sb.indexOf(u)&&(r.footer.borderTop="1px solid #d9d9d9"),r.footer.padding="6px 10px"),(t||-1===lb.indexOf(u))&&(h=`${n||l?"0":"10px"} 10px ${p?"0":"5px"}`),h}},fb=new Map;[["auto-chart","Object.AutoChart"],["dummy-chart","Dummy"],["barchart","Object.BarChart"],["combochart","Object.ComboChart"],["container","Object.Container"],["distributionplot","Object.DistributionPlot"],["boxplot","Object.BoxPlot"],["filterpane","Object.FilterPane"],["gauge","Object.Gauge"],["histogram","Object.Histogram"],["kpi","Object.Kpi"],["linechart","Object.LineChart"],["listbox","Object.Listbox"],["piechart","Object.PieChart"],["pivot-table","Object.PivotTable"],["map","Object.Map"],["scatterplot","Object.ScatterPlot"],["sn-table","Object.StraightTable"],["text-image","Object.TextImage"],["treemap","Object.Treemap"],["waterfallchart","Object.WaterfallChart"],["mekkochart","Object.MekkoChart"],["action-button","Object.ActionButton"],["sn-nav-menu","Object.NavMenu"],["bulletchart","Object.BulletChart"],["sn-nlg-chart","Object.NlgChart"],["sn-analysis-autochart","Common.AnalysisTypes"],["sn-tabbed-container","Object.TabContainer"],["qlik-sankey-chart-ext","Object.SankeyChart"],["qlik-radar-chart","Object.RadarChart"],["qlik-funnel-chart-ext","Object.FunnelChart"],["sn-grid-chart","Object.GridChart"],["sn-layout-container","Object.LayoutContainer"]].forEach(([e,t])=>{fb.set(e,t)});const pb="njs-cell",hb="njs-cell-body";const mb=(e,t)=>{switch(t.type){case"LOADING":return Z(Z({},e),{},{loading:!0});case"LOADED":return Z(Z({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null,sn:t.sn,visualization:t.visualization});case"RENDER":return Z(Z({},e),{},{loaded:!0,loading:!1,longRunningQuery:!1,error:null});case"LONG_RUNNING_QUERY":return Z(Z({},e),{},{longRunningQuery:!0});case"ERROR":return Z(Z({},e),{},{loading:!1,longRunningQuery:!1,error:t.error});default:throw new Error(`Unhandled type: ${t.type}`)}};function gb({delay:e=750}){const[t,o]=n(!1);return r(()=>{const t=setTimeout(()=>o(!0),e);return()=>clearTimeout(t)},[]),t?or.jsx(qg,{}):null}const bb=e=>!e.qError||7005===e.qError.qErrorCode,yb=e=>e&&e.qError&&7005!==e.qError.qErrorCode,vb=(e,t,n,r,o)=>[...Array(Math.max(e,t.length)).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=`${s?r:a?l||o:i&&t[e].qFallbackTitle||""}`,u=n(e);return{description:u?`${u}${c.length?":":""}`:null,label:c,missing:t&&!i&&!s&&e>=t.length||a,error:s}}),Sb=e=>e&&(Array.isArray(e)?e:[e])||[],wb=(e,t,n,r)=>{const o=r.dimensions.min(),i=r.measures.min(),a=r.resolveLayout(t),s=vb(o,Sb(a.qDimensionInfo||a.qItems),e=>r.dimensions.description(n,e,{}),e.get("Visualization.Invalid.Dimension"),e.get("Visualization.UnfulfilledCalculationCondition")),l=vb(i,Sb(a.qMeasureInfo),e=>r.measures.description(n,e,{}),e.get("Visualization.Invalid.Measure"),e.get("Visualization.UnfulfilledCalculationCondition"));return{reqDimErrors:s,reqMeasErrors:l}},kb=async(e,t,{targets:n},r)=>{const{hasUnfulfilledErrors:o,aggMinD:i,aggMinM:a,hasLayoutErrors:s,layoutErrors:l}=((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(),f=u.measures.min(),p=u.resolveLayout(n),h=Sb(p.qDimensionInfo||p.qItems),m=Sb(p.qMeasureInfo),g=h.filter(bb),b=m.filter(bb);if(o+=d,i+=f,(g.length<d||b.length<f)&&(r=!0),r=r||h.some(yb)||m.some(yb),p.qError){a=!0,s=7005===p.qError.qErrorCode;const t=s&&p.qCalcCondMsg?p.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,n,t),c=[],u=[];let d=null;for(let i=0;i<n.length;++i){const a=n[i];if(!s&&o){const n=d||await r.getProperties();d=n;const o=wb(e,t,n,a);c.push(...o.reqDimErrors),u.push(...o.reqMeasErrors)}}const f=c.filter(e=>!(e.missing||e.error)).length,p=e.get("Visualization.Incomplete.Dimensions",[f,i]),h=u.filter(e=>!(e.missing||e.error)).length,m=e.get("Visualization.Incomplete.Measures",[h,a]),g=[{title:p,descriptions:[...c]},{title:m,descriptions:[...u]}],b=s?l:g;return[s||o,{title:s?l[0].title:e.get("Visualization.Incomplete"),data:b}]};function xb(){return new pe}const Cb=o(({halo:e,model:t,initialSnOptions:o,initialSnPlugins:i,initialError:c,onMount:u,currentId:d,emitter:p,navigation:h,onError:m},g)=>{var b,y;const{app:v,types:S}=e,{nebbie:w}=e.public,{theme:k,translator:x,language:C,keyboardNavigation:L,externalFocusManagement:T,disableCellPadding:q=!1,navigation:P,queryParams:I}=s(Rs),[_]=n(p||xb),O=ts(),[D,A,N]=Fs(),[j,M]=l(mb,{loading:!1,loaded:!1,longRunningQuery:!1,error:($=c)?{title:$.message}:null,sn:null,visualization:null});var $;const[z,F]=n(t),[B,{validating:U,canCancel:W,canRetry:H},V]=$s(z),[G]=zs(v),[K,J,Q]=Fs(),[X,Y]=n(o),[ee,te]=n(i),ne=`njs-cell-${d}`,[re]=Au(v,z,[`#${ne}`,".njs-action-toolbar-popover"]),[oe,ie]=n(!1),ae=f({enter:null,leave:null}),{titleStyles:se,bgColor:le,bgImage:ce,border:ue,borderRadius:de,boxShadow:fe}=ib({layout:B,theme:e.public.theme,app:e.app,themeName:k,disableThemeBorder:null==X?void 0:X.disableThemeBorder,queryParams:I}),pe=!("rtl"!==(null==X?void 0:X.direction)),he=f({focusToolbarButton(e){this.emit(e?"focus_toolbar_last":"focus_toolbar_first")}});r(()=>{_u(he.current),he.current.blurCallback=t=>{he.current.onBlurHandler?he.current.onBlurHandler(t):(e.root.toggleFocusOfCells(),t&&Q&&Q.focus())},he.current.refocusContent=()=>{j.sn.component&&"function"==typeof j.sn.component.focus&&j.sn.component.focus()}},[]);r(()=>{if(c)return void u();if(!G||!B)return;if(j.visualization===B.visualization&&j.sn)return void(async e=>{const[t,n]=await kb(x,B,e.generator.qae.data,z);M(t?{type:"ERROR",error:n}:{type:"RENDER"}),(({sn:e,layout:t,model:n})=>{const r=e&&e.component&&e.component.selections;if(r&&r.id&&n.id&&r.id===n.id){if(t&&t.qSelectionInfo&&t.qSelectionInfo.qInSelections&&!r.isModal()){const{targets:t}=e.generator.qae.data,n=t[0].propertyPath;r.goModal(n)}t.qSelectionInfo&&t.qSelectionInfo.qInSelections||r.isModal()&&r.noModal()}})({sn:j.sn,layout:B,model:z})})(j.sn);const e=S.getSupportedVersion(B.visualization,B.version);return(async(e,t)=>{M({type:"LOADING"}),await(async({dispatch:e,types:t,visualization:n,version:r,model:o,app:i,selections:a,nebbie:s,focusHandler:l,emitter:c,onMount:u,navigation:d})=>{try{const f=await(async({types:e,name:t,version:n})=>await e.get({name:t,version:n}).supernova())({types:t,name:n,version:r}),p=f.create({model:o,app:i,selections:a,nebbie:s,focusHandler:l,emitter:c,navigation:d});p&&(e({type:"LOADED",sn:p,visualization:n}),u())}catch(t){e(r?{type:"ERROR",error:{title:t.message,errorObject:t}}:{type:"ERROR",error:{title:`Could not find a version of '${n}' that supports current object version. Did you forget to register ${n}?`}}),u()}})({dispatch:M,types:S,visualization:e,version:t,model:z,app:v,selections:re,nebbie:w,focusHandler:he.current,emitter:_,onMount:u,navigation:null!=h?h:P})})(B.visualization,e),()=>{}},[S,j.sn,z,re,B,G,C]),r(()=>{if(!U)return;const e=setTimeout(()=>M({type:"LONG_RUNNING_QUERY"}),2e3);return()=>clearTimeout(e)},[U]),a(g,()=>({getQae:()=>j.sn.generator.qae,getExtensionDefinition:()=>j.sn.generator.definition.ext,support(e,t,n){if(B&&j.loaded&&!j.error){var r;const o=t||(null===(r=j.sn.generator.definition.ext)||void 0===r?void 0:r.support);if(o)return function(e,t,n){const r=t[e];return"function"==typeof r?r.call(null,n):"boolean"==typeof r&&r}(e,o,n||B)}return!1},toggleFocus(e){"function"==typeof j.sn.component.focus&&(e?j.sn.component.focus():j.sn.component.blur())},setOnBlurHandler(e){he.current.onBlurHandler=e},setSnOptions:Y,setSnPlugins:te,setModel:F,getImperativeHandle(){var e;return null!==(e=j.sn)&&void 0!==e&&e.component&&"function"==typeof j.sn.component.getImperativeHandle?j.sn.component.getImperativeHandle():{}},onContextMenu(...e){var t;return null===(t=j.sn)||void 0===t?void 0:t.component.onContextMenu(...e)},async takeSnapshot(){const{width:e,height:t}=A;let n=JSON.parse(JSON.stringify(B));return"function"==typeof j.sn.component.setSnapshotData&&(n.snapshotData||(n.snapshotData={}),n=await j.sn.component.setSnapshotData(n)||n),{key:String(+Date.now()),meta:{language:x.language(),theme:O.name,appLayout:G,size:{width:Math.round(e),height:Math.round(t)}},layout:n}},async exportImage(){if("function"!=typeof e.config.snapshot.capture)throw new Error("Stardust embed has not been configured with snapshot.capture callback");const t=await this.takeSnapshot();return e.config.snapshot.capture(t)},getHypercubePath(){var e;return null===(e=j.sn.generator.definition.ext)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.hypercubePath}}),[j.sn,J,A,B,O.name,G]);let me=null;if(j.loading&&!j.longRunningQuery)me=or.jsx(gb,{});else if(j.error){if(m){m(j.error.errorObject?j.error.errorObject:new ab(j.error.title))}me=or.jsx(mg,Z({},j.error))}else j.loaded&&(me=or.jsx(rb,{sn:j.sn,halo:e,snOptions:X,snPlugins:ee,layout:B,appLayout:G,cellId:d},B.visualization));const ge=!(null===(b=e.public.theme)||void 0===b||!b.getStyle("","","_cards")),be=null===(y=e.public.galaxy)||void 0===y?void 0:y.flags;let ye,ve;q?(ye=!1,ve=void 0):null!=be&&be.isEnabled("VNA-13_CELLPADDING_FROM_THEME")?(ye=!1,ve=db({layout:B,isError:j.error,isCardTheme:ge,titleStyles:se,translator:x})):(ye=!0,ve=void 0);const Se=fb.get(null==B?void 0:B.visualization),we=x.get(Se);return or.jsxs(R,{style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",backgroundColor:le||"unset",backgroundImage:ce&&ce.url?`url(${ce.url})`:void 0,backgroundRepeat:"no-repeat",backgroundSize:ce&&ce.size,backgroundPosition:ce&&ce.pos,border:ue,borderRadius:de,boxShadow:fe,boxSizing:"border-box"},elevation:0,square:!0,className:pb,ref:D,id:ne,onMouseEnter:()=>{ae.current.leave&&clearTimeout(ae.current.leave),ae.enter||(ae.current.enter=setTimeout(()=>{ie(!0),ae.current.enter=null},250))},onMouseLeave:()=>{ae.current.enter&&clearTimeout(ae.current.enter),ae.current.leave||(ae.current.leave=setTimeout(()=>{ie(!1),ae.current.leave=null},750))},children:[or.jsxs(E,{container:!0,direction:"column",gap:0,style:Z(Z({position:"relative",width:"100%",height:"100%"},ye?{padding:O.spacing(1)}:{}),j.longRunningQuery?{opacity:"0.3"}:{}),"aria-labelledby":`${d}_title ${d}_type ${d}_content`,children:[B&&or.jsx("div",{id:`${d}_type`,style:Pg,"aria-label":null!=we?we:B.visualization}),N&&B&&j.sn&&or.jsx(Ng,{layout:B,sn:j.sn,anchorEl:N,hovering:oe,focusHandler:he.current,titleStyles:se,isRtl:pe,id:d,translator:x,children:" "}),or.jsx(E,{tabIndex:L&&!T?0:-1,onKeyDown:L&&!T?t=>{["Enter"," ","Spacebar"].includes(t.key)&&e.root.toggleFocusOfCells(d)}:null,size:"grow",className:hb,style:Z({height:"100%"},ve?{padding:ve}:{}),ref:K,children:me}),N&&B&&j.sn&&or.jsx(eb,{layout:B,titleStyles:se,translator:x,flags:be,isCardTheme:ge,isRtl:pe})]}),j.longRunningQuery&&or.jsx(Tg,{canCancel:W,canRetry:H,api:V})]})});function Eb(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function Lb(e="/",t,n){const r=[];return Object.keys(t).forEach(o=>{const i=t[o];"object"!=typeof n[o]||"object"!=typeof i||Array.isArray(i)?function(e,t){return Eb(e)&&Eb(t)?JSON.stringify(e)===JSON.stringify(t):!Array.isArray(e)&&!Array.isArray(t)&&e===t}(i,n[o])||r.push({qPath:e+o,qOp:"add",qValue:JSON.stringify(t[o])}):r.push(...Lb(`${e}${o}/`,t[o],n[o]))}),r}function Rb(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 "${e.info.name}" has no "fn" function`)})}const Tb=(e,t,n)=>{if(!e)return Promise.resolve();let r=kh.generate(t,n);return Ze(!0,t,n),r&&r.length?(r=r.map(e=>({qOp:e.op,qValue:JSON.stringify(e.value),qPath:e.path})),e.__snInterceptor?e.__snInterceptor.applyPatches.call(e,r,!0):e.applyPatches(r,!0)):Promise.resolve()},qb=()=>{};function Pb({model:e,halo:n,navigation:r,initialError:o,onDestroy:i=async()=>{},onRender:a=()=>{},onError:s=()=>{}}={}){var l;let c,u,d,f=qb,p=null,h=null,g=null,b=null,y=!1;const v=new Promise(e=>{g=e}),S=new Promise(e=>{b=e}),w=e=>()=>{null==e||e(),b(),a(),y=!0};let k={},x=[];const C=new pe;let E={};null!==(l=n.context)&&void 0!==l&&l.enablePrivateExperimental&&(E={support(e){var t;return!(!h||!y)&&p.current.support(e,null===(t=u)||void 0===t?void 0:t.support,d)},getPropertyPanelDefinition:()=>!(!h||!y)&&(u?u.definition:p.current.getExtensionDefinition().definition),async getHypercubePropertyHandler(){await S;const t=p.current.getExtensionDefinition(),n=t.data,r=await e.getEffectiveProperties();if(n){var o,i;const a={app:e.app,dimensionDefinition:n.dimensions,measureDefinition:n.measures,dimensionProperties:(null===(o=r.qHyperCubeDef)||void 0===o||null===(o=o.qDimensions)||void 0===o?void 0:o[0])||hh.getDefaultDimension(),measureProperties:(null===(i=r.qHyperCubeDef)||void 0===i||null===(i=i.qMeasures)||void 0===i?void 0:i[0])||hh.getDefaultMeasure(),globalChangeListeners:void 0,path:p.current.getHypercubePath()};return"function"==typeof t.propertyHandler?t.propertyHandler(a):new ig(a)}},toggleFocus(e){p.current.toggleFocus(e)},setOnBlurHandler(e){p.current.setOnBlurHandler(e)},onContextMenu:(...e)=>p.current.onContextMenu(...e)});const L=Z(Z({id:e.id,model:e,async destroy(){await i(),f(),f=qb},async convertTo(t,r=!0,o=!1){if(r){if((e=>{var t;return!(!e||e.qHasSoftPatches||e.qExtendsId||!(((null===(t=e.qMeta)||void 0===t?void 0:t.privileges)||[]).indexOf("update")>-1))})(await e.getLayout())&&!o){const r=await vh({halo:n,model:e,cellRef:p,newType:t});return await((e,t)=>e.__snInterceptor?e.__snInterceptor.setProperties.call(e,t):e.setProperties(t))(e,r.qProperty),r}const r=await e.getEffectiveProperties(),i=await vh({halo:n,model:e,cellRef:p,newType:t,properties:r}),a=i.qProperty;return await Tb(e,r,a),i}return await vh({halo:n,model:e,cellRef:p,newType:t})},async toggleDataView(t){let r;if(c||!1===t)c&&!0!==t&&(r=e,await n.app.destroySessionObject(c),c=void 0,u=void 0,d=void 0);else{let t=n.context.dataViewType;const o=await e.getEffectiveProperties();if(!n.types.getSupportedVersion(t)){if(!n.types.getSupportedVersion("table"))throw new Error("No data view type registered");t="table"}const i=await vh({halo:n,model:e,cellRef:p,newType:t,properties:o,viewDataMode:!0});r=await n.app.createSessionObject(i.qProperty),c=r.id,u=p.current.getExtensionDefinition(),d=await e.getLayout()}r&&p.current.setModel(r)},get viewDataToggled(){return void 0!==c},addListener(e,t){C.addListener(e,t)},removeListener(e,t){C.removeListener(e,t)},getImperativeHandle:async()=>(await S,p.current.getImperativeHandle()),takeSnapshot:async()=>(await S,p.current.takeSnapshot())},E),{},{__DO_NOT_USE__:{mount(i){if(h)throw new Error("Already mounted");if(!(i instanceof HTMLElement))throw new Error("Provided element is not a proper HTMLElement");return h=i,[f,p]=function({halo:e,element:n,model:r,initialSnOptions:o,initialSnPlugins:i,onMount:a,emitter:s,initialError:l,navigation:c,onError:u}){const{root:d}=e,f=t.createRef(),p=lp(),h=m.createPortal(or.jsx(Cb,{ref:f,halo:e,model:r,currentId:p,initialSnOptions:o,initialSnPlugins:i,initialError:l,onMount:a,emitter:s,navigation:c,onError:u}),n,p),g=()=>{d.remove(h),r.removeListener("closed",g)};return r.on("closed",g),d.addCell(p,f),(async()=>{try{await d.add(h,g)}catch(e){g(),a(),u(e)}})(),[g,f]}({halo:n,element:i,model:e,initialSnOptions:k,initialSnPlugins:x,initialError:o,onMount:g,emitter:C,navigation:r,onError:s}),v},async applyProperties(t){const n=Lb("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){(async e=>{const t=e.onInitialRender;h?(async()=>{await v,p.current.setSnOptions(Z(Z(Z({},k),e),{onInitialRender:w(t)}))})():k=Z(Z(Z({},k),e),{onInitialRender:w(t)})})(e)},plugins(e){(async e=>{Rb(e),h?(async()=>{await v,p.current.setSnPlugins(e)})():x=e})(e)},exportImage:()=>p.current.exportImage(),takeSnapshot:()=>p.current.takeSnapshot(),getModel:()=>e,convert:{async toType(t){const r=await e.getEffectiveProperties(),o=await vh({halo:n,model:e,cellRef:p,newType:t,properties:r}),i=o.qProperty;return await Tb(e,r,i),o},async revert(){await e.clearSoftPatches()}}}});return L}async function Ib(e,t,n,r,o,i=async()=>{}){const{onRender:a,onError:s}=t,l=Pb({model:e,halo:n,navigation:r,initialError:o,onDestroy:i,onRender:a,onError:s});return l.__DO_NOT_USE__.options(t.options||{}),t.plugins&&l.__DO_NOT_USE__.plugins(t.plugins),t.element&&await l.__DO_NOT_USE__.mount(t.element),l}async function _b({type:e,version:t,fields:n,properties:r,extendProperties:o},i,a,s){let l={};const c=[],{modelStore:u}=s;try{const a=i.types.get({name:e,version:t});l=await a.initialProperties(r,o);const s=await a.supernova();n&&await ih({sn:s,properties:l,fields:n,children:c},i),r&&s&&s.qae.properties.onChange&&s.qae.properties.onChange.call({},l)}catch(t){l=a?null:{qInfo:{qType:e},visualization:e}}if(!a){const e=await i.app.createObject(l);return c.length>0&&await e.setFullPropertyTree({qProperty:l,qChildren:c}),u.set(e.id,e),e}return l}const Ob="njs-sheet";function Db(e,t,n){return e.bounds?e.bounds:{y:e.row/n*100,x:e.col/t*100,width:e.colspan/t*100,height:e.rowspan/n*100}}const Ab=o(({model:e,halo:o,initialSnOptions:l,initialSnPlugins:c,initialError:u,onMount:d,unmount:p,navigation:h,onError:m},g)=>{var b;const{root:y}=o,[v,S]=n(e),[w]=$s(v),{theme:k,modelStore:x}=s(Rs),[C,E]=n([]),[L,R]=n(void 0),[T,q]=n(void 0),[P,I]=n(""),_=f({cellCount:0,cellsRendered:0,initialRender:!1});null==h||null===(b=h.setCurrentSheetId)||void 0===b||b.call(h,v.id),r(()=>{if(w){const e=JSON.stringify(w.cells);if(e===P)return;I(e);const n=async()=>{C.forEach(e=>{y.removeCell(e.currentId)});const e=w.cells;_.cellCount=e.length,_.cellsRendered=0;const n=()=>{_.cellsRendered++,_.cellsRendered!==_.cellCount||_.initialRender||(_.initialRender=!0,l.onInitialRender())},{columns:r,rows:i}=w,a=await Promise.all(e.map(async e=>{let a;const s=new Promise(e=>{a=e}),c=C.find(t=>t.id===e.name);if(c)return c.bounds=Db(e,r,i),delete c.mountedPromise,c;const u=await async function({id:e,options:t,plugins:n,element:r},o,i){const{modelStore:a,rpcRequestModelStore:s}=i,l=`${e}`;let c=s.get(l);c||(c=o.app.getObject(e),s.set(l,c));const u=await c;return a.set(l,u),Ib(u,{options:t,plugins:n,element:r},o)}({id:e.name},o,x);return{model:u.model,id:e.name,bounds:Db(e,r,i),cellRef:t.createRef(),currentId:lp(),mounted:a,mountedPromise:s,options:Z(Z({},l),{onInitialRender:n})}}));a.forEach(e=>y.addCell(e.currentId,e.cellRef)),E(a)};n()}},[w]),r(()=>{const e=()=>{v.removeListener("closed",e),p()};return v.on("closed",e),()=>v.removeListener("closed",e)},[v]);const O=i(()=>C?C.map(e=>function(e,t,n,r,o,i,a,s){var l;const{x:c,y:u,width:d,height:f}=e.bounds,p={left:`${c}%`,top:`${u}%`,width:`${d}%`,height:`${f}%`,position:"absolute"},h=null===(l=t.public.galaxy)||void 0===l?void 0:l.flags;return null!=h&&h.isEnabled("VNA-13_CELLPADDING_FROM_THEME")&&(p.boxSizing="border-box",p.padding="4px"),or.jsx("div",{style:p,children:or.jsx(Cb,{ref:e.cellRef,halo:t,model:e.model,currentId:e.currentId,initialSnOptions:n,initialSnPlugins:r,initialError:o,onMount:i,navigation:a,onError:s})},e.model.id)}(e,o,e.options,c,u,e.mounted,h,m)):[],[C]);r(()=>{const e=null!=w&&w.components?w.components.find(e=>"general"===e.key):null;R(jf(e,o.public.theme)),q(Nf(e,o.app))},[w,o.public.theme,o.app,k]),a(g,()=>({setModel:S}),[]);const D=!w||void 0===w.height||Number.isNaN(w.height)?"100%":`${Number(w.height)}%`,A=C.map(e=>e.mountedPromise),N=A.filter(e=>!!e);return N.length&&Promise.all(A).then(()=>{d()}),or.jsx("div",{className:Ob,style:{width:"100%",height:D,position:"relative",backgroundColor:L,backgroundImage:T&&T.url?`url(${T.url})`:void 0,backgroundRepeat:"no-repeat",backgroundSize:T&&T.size,backgroundPosition:T&&T.pos},children:O})});const Nb=()=>{};function jb({model:e,halo:n,navigation:r,initialError:o,onDestroy:i=async()=>{},onRender:a=()=>{},onError:s=()=>{}}={}){let l=Nb,c=null,u=null,d=null,f=null;const p=new Promise(e=>{d=e}),h=new Promise(e=>{f=e}),g=e=>()=>{null==e||e(),f(),a()};let b={},y=[];const v={id:e.id,model:e,navigation:r,getImperativeHandle:async()=>(await h,c.current.getImperativeHandle()),async destroy(){await i(),l(),l=Nb},__DO_NOT_USE__:{mount(i){if(u)throw new Error("Already mounted");if(!(i instanceof HTMLElement))throw new Error("Provided element is not a proper HTMLElement");return u=i,[l,c]=function({halo:e,element:n,model:r,initialSnOptions:o,initialSnPlugins:i,onMount:a,initialError:s,navigation:l,onError:c}){const{root:u}=e,d=t.createRef();let f;const p=()=>{u.remove(f)};return f=m.createPortal(or.jsx(Ab,{ref:d,halo:e,model:r,initialSnOptions:o,initialSnPlugins:i,initialError:s,onMount:a,unmount:p,navigation:l,onError:c}),n,r.id),l.setSheetRef(d),u.add(f,p),[p,d]}({halo:n,element:i,model:e,initialSnOptions:b,initialSnPlugins:y,initialError:o,onMount:d,navigation:r,onError:s}),p},async applyProperties(t){const n=Lb("/",t,await e.getEffectiveProperties());if(n.length)return e.applyPatches(n,!0)},options(e){(async e=>{const t=e.onInitialRender;u?(async()=>{await p,c.current.setSnOptions(Z(Z(Z({},b),e),{onInitialRender:g(t)}))})():b=Z(Z(Z({},b),e),{onInitialRender:g(t)})})(e)},plugins(e){(async e=>{Rb(e),u?(async()=>{await p,c.current.setSnPlugins(e)})():y=e})(e)},exportImage(){throw new Error("Not implemented")},takeSnapshot(){throw new Error("Not implemented")},getModel:()=>e}};return v}async function Mb({id:e,options:t,plugins:n,element:r,onRender:o,onError:i,navigation:a},s,l){const{modelStore:c,rpcRequestModelStore:u}=l,d=`${e}`;let f=u.get(d);f||(f=s.app.getObject(e),u.set(d,f));const p=await f;c.set(d,p);const h=a||("sheet"===p.genericType?function(e,t,n){var r;const{galaxy:o}=e.public;var i;if(null!==(r=o.anything)&&void 0!==r&&null!==(r=r.sense)&&void 0!==r&&r.navigation)return null===(i=o.anything)||void 0===i||null===(i=i.sense)||void 0===i?void 0:i.navigation;const a={model:n},s={goToSheet:async n=>{var r,o;if(!a.sheetRef)return;const{modelStore:i,rpcRequestModelStore:l}=t,c=`${n}`;let u,d=l.get(c);d||(d=e.app.getObject(n),l.set(c,d));try{if(u=await d,"sheet"!==u.genericType)return}catch(e){return}i.set(c,u),null===(r=a.sheetRef)||void 0===r||null===(r=r.current)||void 0===r||null===(o=r.setModel)||void 0===o||o.call(r,u),a.model=u,s.emit("sheetChanged")},setSheetRef:e=>{a.sheetRef=e},getCurrentSheetId:()=>!!a.model&&a.model.id};return _u(s),s}(s,l,p):void 0);return"sheet"===p.genericType?async function(e,t,n,r,o,i=async()=>{}){const{onRender:a,onError:s}=t,l=jb({model:e,halo:n,navigation:r,initialError:o,onDestroy:i,onRender:a,onError:s});return t.options&&l.__DO_NOT_USE__.options(t.options),t.plugins&&l.__DO_NOT_USE__.plugins(t.plugins),t.element&&await l.__DO_NOT_USE__.mount(t.element),l}(p,{options:t,plugins:n,element:r,onRender:o,onError:i},s,h):Ib(p,{options:t,plugins:n,element:r,onRender:o,onError:i},s,h)}function $b(e={}){return{isEnabled:t=>!0===e[t]}}var zb,Fb,Bb,Ub;function Wb(){if(Ub)return Bb;Ub=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return Bb=n=>n?"object"!=typeof n?e:n:t}var Hb,Vb,Gb,Kb,Jb,Qb,Zb,Xb,Yb,ey,ty,ny,ry,oy,iy,ay,sy,ly,cy,uy,dy,fy,py,hy,my,gy,by,yy,vy,Sy,wy,ky={exports:{}};function xy(){if(Vb)return Hb;Vb=1;const e=Number.MAX_SAFE_INTEGER||9007199254740991;return Hb={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:e,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}}function Cy(){if(Kb)return Gb;Kb=1;const e="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};return Gb=e}function Ey(){return Jb||(Jb=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=xy(),i=Cy(),a=(t=e.exports={}).re=[],s=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const f="[a-zA-Z0-9-]",p=[["\\s",1],["\\d",o],[f,r]],h=(e,t,n)=>{const r=(e=>{for(const[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e})(t),o=d++;i(e,o,t),u[e]=o,l[o]=t,c[o]=r,a[o]=new RegExp(t,n?"g":void 0),s[o]=new RegExp(r,n?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),h("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${f}+`),h("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),h("FULL",`^${l[u.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),h("LOOSE",`^${l[u.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),h("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?`+`(?:${l[u.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",l[u.COERCE],!0),h("COERCERTLFULL",l[u.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ky,ky.exports)),ky.exports}function Ly(){if(Yb)return Xb;Yb=1;const e=Cy(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=xy(),{safeRe:r,t:o}=Ey(),i=Wb(),{compareIdentifiers:a}=function(){if(Zb)return Qb;Zb=1;const e=/^[0-9]+$/,t=(t,n)=>{if("number"==typeof t&&"number"==typeof n)return t===n?0:t<n?-1:1;const r=e.test(t),o=e.test(n);return r&&o&&(t=+t,n=+n),t===n?0:r&&!o?-1:o&&!r?1:t<n?-1:1};return Qb={compareIdentifiers:t,rcompareIdentifiers:(e,n)=>t(n,e)},Qb}();class s{constructor(a,l){if(l=i(l),a instanceof s){if(a.loose===!!l.loose&&a.includePrerelease===!!l.includePrerelease)return a;a=a.version}else if("string"!=typeof a)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof a}".`);if(a.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",a,l),this.options=l,this.loose=!!l.loose,this.includePrerelease=!!l.includePrerelease;const c=a.trim().match(l.loose?r[o.LOOSE]:r[o.FULL]);if(!c)throw new TypeError(`Invalid Version: ${a}`);if(this.raw=a,this.major=+c[1],this.minor=+c[2],this.patch=+c[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");c[4]?this.prerelease=c[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<n)return t}return e}):this.prerelease=[],this.build=c[5]?c[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(t){if(e("SemVer.compare",this.version,this.options,t),!(t instanceof s)){if("string"==typeof t&&t===this.version)return 0;t=new s(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(e){return e instanceof s||(e=new s(e,this.options)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}comparePre(t){if(t instanceof s||(t=new s(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{const r=this.prerelease[n],o=t.prerelease[n];if(e("prerelease compare",n,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 a(r,o)}while(++n)}compareBuild(t){t instanceof s||(t=new s(t,this.options));let n=0;do{const r=this.build[n],o=t.build[n];if(e("build compare",n,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 a(r,o)}while(++n)}inc(e,t,n){if(e.startsWith("pre")){if(!t&&!1===n)throw new Error("invalid increment argument: identifier is empty");if(t){const e=`-${t}`.match(this.options.loose?r[o.PRERELEASELOOSE]:r[o.PRERELEASE]);if(!e||e[1]!==t)throw new Error(`invalid identifier: ${t}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,n),this.inc("pre",t,n);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,n),this.inc("pre",t,n);break;case"release":if(0===this.prerelease.length)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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":{const e=Number(n)?1:0;if(0===this.prerelease.length)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);if(-1===r){if(t===this.prerelease.join(".")&&!1===n)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let r=[t,e];if(!1===n&&(r=[t]),((e,t)=>{const n=t.split(".");if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(0!==a(e[t],n[t]))return!1;return!0})(this.prerelease,t)){const e=this.prerelease[t.split(".").length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Xb=s}function Ry(){if(ty)return ey;ty=1;const e=Ly();return ey=(t,n,r)=>new e(t,r).compare(new e(n,r)),ey}function Ty(){if(my)return hy;my=1;const e=function(){if(ry)return ny;ry=1;const e=Ry();return ny=(t,n,r)=>0===e(t,n,r),ny}(),t=function(){if(iy)return oy;iy=1;const e=Ry();return oy=(t,n,r)=>0!==e(t,n,r),oy}(),n=function(){if(sy)return ay;sy=1;const e=Ry();return ay=(t,n,r)=>e(t,n,r)>0,ay}(),r=function(){if(cy)return ly;cy=1;const e=Ry();return ly=(t,n,r)=>e(t,n,r)>=0,ly}(),o=function(){if(dy)return uy;dy=1;const e=Ry();return uy=(t,n,r)=>e(t,n,r)<0,uy}(),i=function(){if(py)return fy;py=1;const e=Ry();return fy=(t,n,r)=>e(t,n,r)<=0,fy}();return hy=(a,s,l,c)=>{switch(s){case"===":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a===l;case"!==":return"object"==typeof a&&(a=a.version),"object"==typeof l&&(l=l.version),a!==l;case"":case"=":case"==":return e(a,l,c);case"!=":return t(a,l,c);case">":return n(a,l,c);case">=":return r(a,l,c);case"<":return o(a,l,c);case"<=":return i(a,l,c);default:throw new TypeError(`Invalid operator: ${s}`)}},hy}function qy(){if(vy)return yy;vy=1;const e=/\s+/g;class t{constructor(n,i){if(i=r(i),n instanceof t)return n.loose===!!i.loose&&n.includePrerelease===!!i.includePrerelease?n:new t(n.raw,i);if(n instanceof o)return this.raw=n.value,this.set=[[n]],this.formatted=void 0,this;if(this.options=i,this.loose=!!i.loose,this.includePrerelease=!!i.includePrerelease,this.raw=n.trim().replace(e," "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!g(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&b(e[0])){this.set=[e];break}}this.formatted=void 0}get range(){if(void 0===this.formatted){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");const t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=" "),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(m,"");const t=((this.options.includePrerelease&&p)|(this.options.loose&&h))+":"+e,r=n.get(t);if(r)return r;const a=this.options.loose,l=a?s[c.HYPHENRANGELOOSE]:s[c.HYPHENRANGE];e=e.replace(l,q(this.options.includePrerelease)),i("hyphen replace",e),e=e.replace(s[c.COMPARATORTRIM],u),i("comparator trim",e),e=e.replace(s[c.TILDETRIM],d),i("tilde trim",e),e=e.replace(s[c.CARETTRIM],f),i("caret trim",e);let b=e.split(" ").map(e=>v(e,this.options)).join(" ").split(/\s+/).map(e=>T(e,this.options));a&&(b=b.filter(e=>(i("loose invalid filter",e,this.options),!!e.match(s[c.COMPARATORLOOSE])))),i("range list",b);const y=new Map,S=b.map(e=>new o(e,this.options));for(const e of S){if(g(e))return[e];y.set(e.value,e)}y.size>1&&y.has("")&&y.delete("");const w=[...y.values()];return n.set(t,w),w}intersects(e,n){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(t=>y(t,n)&&e.set.some(e=>y(e,n)&&t.every(t=>e.every(e=>t.intersects(e,n)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new a(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(P(this.set[t],e,this.options))return!0;return!1}}yy=t;const n=new(Fb?zb:(Fb=1,zb=class{constructor(){this.max=1e3,this.map=new Map}get(e){const t=this.map.get(e);return void 0===t?void 0:(this.map.delete(e),this.map.set(e,t),t)}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&void 0!==t){if(this.map.size>=this.max){const e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}})),r=Wb(),o=function(){if(by)return gy;by=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(r,o){if(o=n(o),r instanceof t){if(r.loose===!!o.loose)return r;r=r.value}r=r.trim().split(/\s+/).join(" "),a("comparator",r,o),this.options=o,this.loose=!!o.loose,this.parse(r),this.semver===e?this.value="":this.value=this.operator+this.semver.version,a("comp",this)}parse(t){const n=this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR],i=t.match(n);if(!i)throw new TypeError(`Invalid comparator: ${t}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new s(i[2],this.options.loose):this.semver=e}toString(){return this.value}test(t){if(a("Comparator.test",t,this.options.loose),this.semver===e||t===e)return!0;if("string"==typeof t)try{t=new s(t,this.options)}catch(e){return!1}return i(t,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new l(e.value,r).test(this.value):""===e.operator?""===e.value||new l(this.value,r).test(e.semver):!((r=n(r)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(i(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(i(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}gy=t;const n=Wb(),{safeRe:r,t:o}=Ey(),i=Ty(),a=Cy(),s=Ly(),l=qy();return gy}(),i=Cy(),a=Ly(),{safeRe:s,src:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=Ey(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:h}=xy(),m=new RegExp(l[c.BUILD],"g"),g=e=>"<0.0.0-0"===e.value,b=e=>""===e.value,y=(e,t)=>{let n=!0;const r=e.slice();let o=r.pop();for(;n&&r.length;)n=r.every(e=>o.intersects(e,t)),o=r.pop();return n},v=(e,t)=>(e=e.replace(s[c.BUILD],""),i("comp",e,t),e=x(e,t),i("caret",e),e=w(e,t),i("tildes",e),e=E(e,t),i("xrange",e),e=R(e,t),i("stars",e),e),S=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map(e=>k(e,t)).join(" "),k=(e,t)=>{const n=t.loose?s[c.TILDELOOSE]:s[c.TILDE],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,o,a,s)=>{let l;return i("tilde",e,t,n,o,a,s),S(n)?l="":S(o)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:S(a)?l=`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:s?(i("replaceTilde pr",s),l=`>=${n}.${o}.${a}-${s} <${n}.${+o+1}.0-0`):l=`>=${n}.${o}.${a} <${n}.${+o+1}.0-0`,i("tilde return",l),l})},x=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(" "),C=(e,t)=>{i("caret",e,t);const n=t.loose?s[c.CARETLOOSE]:s[c.CARET],r=t.includePrerelease?"-0":"";return e.replace(n,(t,n,o,a,s)=>{let l;return i("caret",e,t,n,o,a,s),S(n)?l="":S(o)?l=`>=${n}.0.0${r} <${+n+1}.0.0-0`:S(a)?l="0"===n?`>=${n}.${o}.0${r} <${n}.${+o+1}.0-0`:`>=${n}.${o}.0${r} <${+n+1}.0.0-0`:s?(i("replaceCaret pr",s),l="0"===n?"0"===o?`>=${n}.${o}.${a}-${s} <${n}.${o}.${+a+1}-0`:`>=${n}.${o}.${a}-${s} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${a}-${s} <${+n+1}.0.0-0`):(i("no pr"),l="0"===n?"0"===o?`>=${n}.${o}.${a} <${n}.${o}.${+a+1}-0`:`>=${n}.${o}.${a} <${n}.${+o+1}.0-0`:`>=${n}.${o}.${a} <${+n+1}.0.0-0`),i("caret return",l),l})},E=(e,t)=>(i("replaceXRanges",e,t),e.split(/\s+/).map(e=>L(e,t)).join(" ")),L=(e,t)=>{e=e.trim();const n=t.loose?s[c.XRANGELOOSE]:s[c.XRANGE];return e.replace(n,(n,r,o,a,s,l)=>{if(i("xRange",e,n,r,o,a,s,l),((e,t,n)=>S(e)&&!S(t)||S(t)&&n&&!S(n))(o,a,s))return e;const c=S(o),u=c||S(a),d=u||S(s),f=d;return"="===r&&f&&(r=""),l=t.includePrerelease?"-0":"",c?n=">"===r||"<"===r?"<0.0.0-0":"*":r&&f?(u&&(a=0),s=0,">"===r?(r=">=",u?(o=+o+1,a=0,s=0):(a=+a+1,s=0)):"<="===r&&(r="<",u?o=+o+1:a=+a+1),"<"===r&&(l="-0"),n=`${r+o}.${a}.${s}${l}`):u?n=`>=${o}.0.0${l} <${+o+1}.0.0-0`:d&&(n=`>=${o}.${a}.0${l} <${o}.${+a+1}.0-0`),i("xRange return",n),n})},R=(e,t)=>(i("replaceStars",e,t),e.trim().replace(s[c.STAR],"")),T=(e,t)=>(i("replaceGTE0",e,t),e.trim().replace(s[t.includePrerelease?c.GTE0PRE:c.GTE0],"")),q=e=>(t,n,r,o,i,a,s,l,c,u,d,f)=>`${n=S(r)?"":S(o)?`>=${r}.0.0${e?"-0":""}`:S(i)?`>=${r}.${o}.0${e?"-0":""}`:a?`>=${n}`:`>=${n}${e?"-0":""}`} ${l=S(c)?"":S(u)?`<${+c+1}.0.0-0`:S(d)?`<${c}.${+u+1}.0-0`:f?`<=${c}.${u}.${d}-${f}`:e?`<${c}.${u}.${+d+1}-0`:`<=${l}`}`.trim(),P=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(i(e[n].semver),e[n].semver!==o.ANY&&e[n].semver.prerelease.length>0){const r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0};return yy}var Py=function(){if(wy)return Sy;wy=1;const e=qy();return Sy=(t,n,r)=>{try{n=new e(n,r)}catch(e){return!1}return n.test(t)},Sy}(),Iy=W(Py);const _y={};function Oy(e,t,n={}){let r,o;const{meta:i}=n,a={name:e.name,version:e.version,supportsPropertiesVersion:e=>!(e&&i&&i.deps&&i.deps.properties)||Iy(e,i.deps.properties),supernova:()=>async function(e,t,{config:n},r){const o=`${e}__${t}`;if(!_y[o]){const i=`${e}${t&&` v${t}`||""}`;if(r&&"function"!=typeof r)throw new Error(`load of visualization '${i}' is not a fuction, wrap load promise in function`);const a=(r||n.load)({name:e,version:t}),s=Promise.resolve(a);_y[o]=s.then(e=>{if(!e)throw new Error(`load() of visualization '${i}' resolved to an invalid object`);return e}).catch(e=>{throw new ab(`Failed to load visualization: '${i}'`,e)})}return _y[o]}(a.name,a.version,t,n.load).then(e=>(r=r||dg(e,t.public.galaxy),o=JSON.stringify(r.qae.properties.initial),r)),initialProperties(e,t=!1){return this.supernova().then(()=>{const n=Z({qInfo:{qType:a.name},visualization:a.name,version:a.version,showTitles:!0},JSON.parse(o));return t?(Ze(!0,n,e),n):Z(Z({},n),e)})}};return a}function Dy(e,t){const n={};let r=null;return{get:e=>n[e],register:(o,i)=>{if(n[o])throw new Error(`Supernova '${e}@${o}' already registered.`);n[o]=Oy({name:e,version:o},t,i),r=null},getMatchingVersionFromProperties:e=>{r||(r=function(e){const t=e.filter(e=>"undefined"===e);return[...t,...e.filter(e=>"undefined"!==e).map(e=>e.split(".").map(e=>parseInt(e,10))).sort((e,t)=>e[0]-t[0]||e[1]-t[1]||e[2]-t[2]).map(e=>e.join("."))]}(Object.keys(n)));for(let t=r.length-1;t>=0;t--){if(n[r[t]].supportsPropertiesVersion(e))return r[t]}return null},versions:n}}function Ay({halo:e,parent:t}){const n={},r=t||{get:()=>{}};return{register:(t,r)=>{n[t.name]||(n[t.name]=Dy(t.name,e)),n[t.name].register(t.version,r)},getSupportedVersion:(e,t)=>{if(n[e])return n[e].getMatchingVersionFromProperties(t)},get(e){const{name:t}=e;let{version:o}=e;if(n[t]){if(!n[t].versions[o]){o=Object.keys(n[t].versions)[0]}}else this.register({name:t,version:o});return n[t].get(o)||r.get(e)},getList:()=>Object.keys(n).map(e=>({name:e,versions:Object.keys(n[e].versions).map(e=>"undefined"===e?void 0:e)})),clearFromCache:e=>{n[e]&&(n[e]=void 0),function(e){Object.keys(_y).forEach(t=>{t.split("__")[0]===e&&(_y[t]=void 0)})}(e)}}}const Ny={context:{},load:()=>{},types:[],themes:[],anything:{},flags:{KPI_REACTCOLORPICKER:!0,CLIENT_IM_3365:!0},snapshot:{get:async e=>{const t=await fetch(`/njs/snapshot/${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())}},jy={theme:"light",language:"en-US",deviceType:"auto",constraints:{},interactions:{},keyboardNavigation:!1,disableCellPadding:!1,dataViewType:"sn-table",navigation:void 0};Ny.context=jy;const My=(e={},t={})=>Z(Z({},e),t),$y=(e=[],t=[])=>[...e,...t].filter((e,t,n)=>n.indexOf(e)===t);var zy=function e(n={}){const r=de(n.context.language);function o(e,i){if(i)return o.createConfiguration(i)(e);let a=Z(Z({},n.context),{},{translator:r.translator,hostConfig:n.hostConfig});const[s,l]=_s({app:e,context:a}),c=function({themes:e=[],loadTheme:t,root:n}={}){const r=Ct();return{setTheme:async o=>{let i=e.filter(e=>e.id===o)[0],a="dark"===o?"dark":"light";if(!i&&t&&(i={load:t}),i&&i.load)try{const e=await Promise.race([i.load(o),Et(5e3,{__timedOut:!0})]);e.__timedOut||(a="dark"===e.type?"dark":"light",r.internalAPI.setTheme(e,o),n.setMuiThemeName(a))}catch(e){}else r.internalAPI.setTheme({type:a},o),n.setMuiThemeName(a)},externalAPI:r.externalAPI}}({themes:n.themes,loadTheme:n.loadTheme,root:s});a.themeApi=c.externalAPI;const u={galaxy:{translator:r.translator,theme:c.externalAPI,flags:$b(n.flags),deviceType:Lt(n.context.deviceType),hostConfig:n.hostConfig,anything:n.anything},theme:c.externalAPI,translator:r.translator,nebbie:null},d={app:e,root:s,config:n,public:u,context:a,types:null},f=Ay({halo:d});n.types.forEach(e=>f.register({name:e.name,version:e.version},{meta:e.meta,load:e.load}));let p=new Promise(e=>{(async()=>{if(await c.setTheme(n.context.theme),n.hostConfig&&ae&&ae.getWebResourceAuthParams){const{queryParams:e}=await ae.getWebResourceAuthParams({hostConfig:n.hostConfig});a.queryParams=e,s.context(a)}})().then(e)}),h=null,g=null;const b={render:async e=>{var t;await p,null===(t=e.signal)||void 0===t||t.throwIfAborted();const n=e.id?Mb(e,d,l):async function({type:e,version:t,fields:n,properties:r,options:o,plugins:i,element:a,extendProperties:s,navigation:l,onRender:c,onError:u},d,f){let p={};const h=[],{modelStore:m,subscribe:g}=f;let b;try{const o=d.types.get({name:e,version:t});p=await o.initialProperties(r,s);const i=await o.supernova();n&&await ih({sn:i,properties:p,fields:n,children:h},d),r&&i&&i.qae.properties.onChange&&i.qae.properties.onChange.call({},p)}catch(t){b=t,p={qInfo:{qType:e},visualization:e}}const y=await d.app.createSessionObject(p);h.length>0&&await y.setFullPropertyTree({qProperty:p,qChildren:h}),m.set(y.id,y);const v=g(y);return Ib(y,{options:o,plugins:i,element:a,onRender:c,onError:u},d,l,b,async()=>{await d.app.destroySessionObject(y.id),v()})}(e,d,l);if(e.signal){const t=()=>{n.then(e=>null==e?void 0:e.destroy()).catch(()=>{})};return e.signal.addEventListener("abort",t,{once:!0}),function(e,t){if(!t)return e;let n;"function"==typeof t.throwIfAborted&&t.throwIfAborted();const r=new Promise((e,t)=>{n=t}),o=()=>{var e;return null===(e=n)||void 0===e?void 0:e(t.reason)};return t.addEventListener("abort",o,{once:!0}),Promise.race([e,r]).finally(()=>{t.removeEventListener("abort",o)})}(n,e.signal).finally(()=>{e.signal.removeEventListener("abort",t)})}return n},destroy:async()=>{s.destroy()},create:async e=>_b(e,d,!1,l),generateProperties:async e=>_b(e,d,!0,l),context:async e=>{let t;["theme","language","constraints","interactions","keyboardNavigation"].forEach(n=>{Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==a[n]&&(t||(t={}),t[n]=e[n])}),t&&(a=Z(Z(Z({},a),t),{},{translator:r.translator}),t.theme&&(await p,p=c.setTheme(t.theme),await p),t.language&&d.public.translator.language(t.language),s.context(a))},selections:async()=>(h||(h={mount(t){g||(g=function({element:e,app:t}){return m.createPortal(or.jsx(cp,{app:t}),e,lp())}({element:t,app:e}),s.add(g))},unmount(){g&&(s.remove(g),g=null)}}),h),field:async n=>{let r;const o="string"==typeof n?n:n.qLibraryId;if(n.qId)r=n.qId;else if(!o)throw new Error("Field identifier or object id must be provided");const i={fieldName:o,async mount(a,l={}){if(!a)throw new Error(`Element for ${o||r} not provided`);if(this._instance)throw new Error(`Field or object ${o||r} already mounted`);const c=()=>i.emit("selectionActivated"),u=()=>i.emit("selectionDeactivated");return new Promise(o=>{[this._instance,this._ref]=function({element:e,app:n,fieldIdentifier:r,qId:o,stateName:i="$",options:a={},renderedCallback:s,flags:l}){const c=t.createRef();return[m.createPortal(or.jsx(Jp,{ref:c,app:n,element:e,fieldIdentifier:r,qId:o,stateName:i,initialOptions:a,renderedCallback:s,flags:l}),e,lp()),c]}({element:a,app:e,fieldIdentifier:n,qId:r,options:Kp(Z({onSelectionActivated:c,onSelectionDeactivated:u},l)),stateName:l.stateName||"$",renderedCallback:o,flags:d.public.galaxy.flags}),s.add(this._instance)})},unmount(){this._instance&&(s.remove(this._instance),this._instance=null,this._ref=null)},__DO_NOT_USE__:{options(e){var t;const n=()=>i.emit("selectionActivated"),r=()=>i.emit("selectionDeactivated");if(null!==(t=i._ref)&&void 0!==t&&t.current){const t=Kp(Z({onSelectionActivated:n,onSelectionDeactivated:r},e));i._ref.current.setOptions(t)}}}};return _u(i),i},getRegisteredTypes:f.getList,__DO_NOT_USE__:{types:f,popover(n,r,o){b._popoverInstance&&(s.remove(b._popoverInstance),b._popoverInstance=null);const i=((e={})=>{const t=Z({},Qp);return Ze(!0,t,e),t})(Z({onPopoverClose:()=>b.emit("fieldPopoverClose")},o));b._popoverInstance=t.createElement(Zp,{element:n,key:lp(),app:e,fieldIdentifier:r,options:i,stateName:o.stateName||"$"}),s.add(b._popoverInstance)}}};return d.public.nebbie=b,d.types=f,_u(b),b}return o.createConfiguration=t=>e(((e,t)=>({context:My(e.context,t.context),load:t.load||e.load,loadTheme:t.loadTheme||e.loadTheme,snapshot:Z({},t.snapshot||e.snapshot),types:$y(e.types,t.types),themes:$y(e.themes,t.themes),flags:My(e.flags,t.flags),hostConfig:t.hostConfig||e.hostConfig,anything:My(e.anything,t.anything)}))(n,t)),o.config=n,o}(Ny);function Fy(){return{getObjectApi:()=>Promise.resolve({id:"sessapi - "+ +Date.now()})}}const By=globalThis.crypto||{getRandomValues:()=>123456};function Uy(e){return t=>{const n=Ze({},t);n.qInfo=n.qInfo||{},n.qInfo.qId=n.qInfo.qId||`mock-${([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^By.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}`;const r=n._mock;let o=n;return r&&(delete n._mock,o=Ze({},n,r)),Promise.resolve({on:()=>{},once:()=>{},getLayout:()=>Promise.resolve(o),getProperties:()=>Promise.resolve(n),getEffectiveProperties:()=>Promise.resolve(n),removeListener:()=>{},id:n.qInfo.qId,properties:n,session:e})}}const Wy=(e,{args:t=[],defaultValue:n}={})=>"function"==typeof e?e(...t):void 0!==e?e:n,Hy=(e,{defaultValue:t,async:n=!0,delay:r=0}={})=>(...o)=>{const i=Wy(e,{defaultValue:t,args:o});return n?new Promise(e=>{setTimeout(()=>e(i),r)}):i},Vy=["id","session"],Gy=["addListener","emit","listeners","on","once","removeAllListeners","removeListener","setMaxListerners"];function Ky(e){return!Gy.includes(e)}function Jy(e){const t=Wy(e.getLayout);return t.qInfo&&t.qInfo.qId}function Qy(e,t){return e.reduce((e,n)=>Z(Z({},e),function(e,t){let n=Jy(e);const{delay:r}=t,{id:o,session:i}=e,a=X(e,Vy);if(o&&n&&o!==n)throw new Error(`Generic object has multiple IDs, qInfo.qId: ${n}, id: ${o}`);n=n||o||"object - "+ +Date.now();const s=Z(Z({id:n,session:Wy(i,{defaultValue:!0}),on:()=>{},once:()=>{},removeListener:()=>{}},Object.entries(a).reduce((e,[t,n])=>Z(Z({},e),{},{[t]:Hy(n,{async:Ky(t),delay:r})}),{})),{},{genericType:e.type});return{[n]:s}}(n,t)),{})}function Zy(e){if(!e.getLayout)throw new Error('Generic object is missing "getLayout"');if(!Jy(e))throw new Error('Generic object is missing "qId" for path "getLayout().qInfo.qId"')}function Xy(e=[],t={}){if(!Array.isArray(e)||0===e.length)return()=>{throw new Error('No "genericObjects" specified')};e.forEach(Zy);const n=Qy(e,t);return async e=>Promise.resolve(n[e])}function Yy(e){return()=>Promise.resolve({id:"app-layout",qLocaleInfo:null==e?void 0:e.appLocaleInfo})}const ev={fromGenericObjects:(e,t={})=>function(e,t={}){const n=new Fy,r=new Uy(n),o=new Xy(e,t),i=new Yy(t),a=Z(Z({},t.appMethods||{}),{},{id:"app - "+ +Date.now(),session:n,createSessionObject:r,destroySessionObject:async()=>{},getObject:o,getAppLayout:i,getListObject:async e=>{var t;return o(null===(t=e.qInfo)||void 0===t?void 0:t.qId)}});return Promise.resolve(a)}(e,t)},tv={generator:dg,hook:Vh,theme:Ct,locale:se};window.__qlikMainPrivateResolvers||(window.__qlikMainPrivateResolvers={}),window.__qlikMainPrivateResolvers.mainUrlPromise||(window.__qlikMainPrivateResolvers.mainUrlPromise=new Promise(e=>{window.__qlikMainPrivateResolvers&&(window.__qlikMainPrivateResolvers.resolveMainJsUrl=t=>{e(t)})})),window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise||(window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise=new Promise(e=>{window.__qlikMainPrivateResolvers&&(window.__qlikMainPrivateResolvers.resolveMainJsUrlAndHostConfig=t=>{e(t)})})),window.__qlikMainPrivateResolvers.qlikMainPromise||(window.__qlikMainPrivateResolvers.qlikMainPromise=(async()=>{if(window.QlikMain)return window.QlikMain;if(!window.__qlikMainPrivateResolvers?.mainJsUrlAndHostConfigPromise||!window.__qlikMainPrivateResolvers.mainUrlPromise)throw new Error("No main url promise found, report this issue");const e=setTimeout(()=>{console.warn("Waiting for a host parameter pointing to a Qlik runtime system")},5e3),{url:t,hostConfig:n}=await Promise.race([window.__qlikMainPrivateResolvers.mainJsUrlAndHostConfigPromise,window.__qlikMainPrivateResolvers.mainUrlPromise.then(e=>({url:e,hostConfig:window.__qlikMainPrivateResolvers?.forwardCompatibleHostConfig}))]);clearTimeout(e);const r=await async function(e,t){if("windowscookie"===t?.authType){if(t.getAccessToken){const n=await async function(e){if("function"==typeof e)return e();if("string"==typeof e){const t=function(e){return globalThis[e]}(e);if("function"!=typeof t)throw new Error(`getAccessToken function "${e}" not found on globalThis. Please make sure it is defined.`);return t()}}(t.getAccessToken);return n&&await fetch(e,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},cache:"no-cache"}),!0}if(t.loginUri&&!(await fetch(e,{method:"GET",mode:"cors",credentials:"include",redirect:"manual"}).catch(()=>({ok:!1}))).ok)return window.location.replace(t.loginUri),new Promise(()=>{})}return!1}(t,n);return new Promise(e=>{if(window.QlikMain)e(window.QlikMain);else{const n=window.document.createElement("script");t&&(n.src=t),r&&(n.crossOrigin="use-credentials"),n.addEventListener("error",()=>{console.error(`Qlik runtime system not found: ${t}`)}),n.addEventListener("load",()=>{window.QlikMain&&e(window.QlikMain)}),window.document.head.appendChild(n)}})})());var nv=Object.freeze({__proto__:null,importRuntimeModule:async function(e,t){return t?.runtimeModuleMocks?.[e]?t.runtimeModuleMocks?.[e]:(function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");const t=function(e){if(!window.__qlikMainPrivateResolvers)throw new Error("No main url resolver found");let t,n=e?.embedRuntimeUrl||e?.url||e?.host;if(n||"noauth"!==e?.authType||(n="https://cdn.qlikcloud.com/qmfe"),n){for(t=n.toLowerCase().startsWith("https://")||n.toLowerCase().startsWith("http://")?n:`https://${n}`;t.endsWith("/");)t=t.slice(0,-1);return`${t}/qlik-embed/main.js`}}(e);t&&window.__qlikMainPrivateResolvers.resolveMainJsUrlAndHostConfig&&window.__qlikMainPrivateResolvers.resolveMainJsUrlAndHostConfig({url:t,hostConfig:e}),t&&window.__qlikMainPrivateResolvers.resolveMainJsUrl&&(window.__qlikMainPrivateResolvers.forwardCompatibleHostConfig=e,window.__qlikMainPrivateResolvers.resolveMainJsUrl(t))}(t),async function(e){if(!window.__qlikMainPrivateResolvers?.qlikMainPromise)throw new Error("No main url resolver found");return(await window.__qlikMainPrivateResolvers.qlikMainPromise).import(e)}(e))}});const rv=["authType","autoRedirect","authRedirectUserConfirmation","embedRuntimeUrl","host","onAuthFailed"],ov=["apikey","oauth2","cookie","windowscookie","reference","anonymous","pfx"],iv={};const av=async({hostConfig:e,noCache:t}={})=>{const n=`${bw(e)}/resources/autogenerated/product-info.json`;try{if(!(n in iv)){const e={};globalThis.QlikMain?.resourceNeedsCredentials(n)&&(e.credentials="include");const t=fetch(n,e).then(async e=>e.ok?{data:await e.json(),status:e.status}:{data:void 0,status:e.status});iv[n]=t}const e=await iv[n];return(e.status>=400||!e.data)&&delete iv[n],e}catch{return delete iv[n],{data:void 0,status:500}}finally{t&&delete iv[n]}},sv=e=>{const t=e.externalUrls;if(!t)return;const n=e.composition?.productName??"Qlik",r=e.composition?.releaseLabel||"-",o="-"===r?n:`${n} (${r})`;return{productId:e.composition?.senseId??"qlik",productLabel:o,version:e.composition?.version,urls:{personalHelpBaseUrl:t.personalHelpBaseUrl,personalUpgradeBase:t.personalUpgradeBase,personalUpgradeUrl:t.personalUpgradeUrl,serverHelpBaseUrl:t.serverHelpBaseUrl,qlikWebPageUrl:t.qlikWebPageUrl}}},lv=e=>({isCloud:!1,isQCS:!1,isQCG:!1,isCloudConsole:!1,isWindows:!1,isQSE:!1,isQSD:!1,isUnknown:!1,...e});function cv(e,t){const n=new Uint8Array(t);globalThis.crypto.getRandomValues(n);let r="";for(let o=0;o<t;o++)r+=e[n[o]%e.length];return r}function uv(e){return cv("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-",e)}const dv={},fv=new Map;function pv(e){const t=ne(e)||{};return t.host&&(t.host=bw(t)),Y()&&bw(t)===window.location.origin&&delete t.host,t.authType&&ov.includes(t.authType)&&delete t.authType,t}function hv(e,t){if("function"!=typeof t)return t}function mv(e){const t=te(pv(_w(e)));return JSON.stringify(t,hv)}const gv=new Map;function bv(e,t){const n=t?.reference||null;if(n&&!gv.has(n))throw new ow(`Host config with reference "${n}" is not registered. Please register it before using it.`);gv.has(e)&&console.warn(`registerHostConfig: Host config with name "${e}" is already registered. Overwriting.`),gv.set(e,t)}function yv(e){return gv.get(e)}function vv(){return yv("default")||{}}const Sv=new Map;function wv(e){const t=mv(e);let n=Sv.get(t);return n||(n={redirectRequestedListeners:new Set,redirectStartedListeners:new Set},Sv.set(t,n)),n}function kv(e){const t=wv(e),n=t.redirectRequestedListeners.size>0||e.authRedirectUserConfirmation;return e.autoRedirect||!n?Promise.resolve():"function"==typeof e.authRedirectUserConfirmation?e.authRedirectUserConfirmation().catch(()=>{}):new Promise(e=>{const n=()=>{for(const e of t.redirectStartedListeners)try{e()}catch(e){console.warn(e)}e()};for(const e of t.redirectRequestedListeners)try{e({proceed:n})}catch(e){console.warn(e)}})}const xv="qlik-qmfe-api";function Cv(e){let t=e.clientId+(e.scope?`_${e.scope}`:"_user_default");return e.subject&&(t+=`_${e.subject}`),e.userId&&(t+=`_${e.userId}`),t}function Ev(e){return`${e.accessCode}_${e.clientId}`}const Lv={};function Rv(e,t,n){localStorage.setItem(`${xv}-${e}-${t}`,n)}function Tv(e,t,n){sessionStorage.setItem(`${xv}-${e}-${t}`,n)}function qv(e,t,n,r){return e.store(`${xv}-${t}-${n}`,r)}function Pv(e,t){return localStorage.getItem(`qlik-qmfe-api-${e}-${t}`)||void 0}function Iv(e,t){return sessionStorage.getItem(`qlik-qmfe-api-${e}-${t}`)||void 0}function _v(e,t,n){return e.get(`${xv}-${t}-${n}`)}function Ov(e,t){t.forEach(t=>localStorage.removeItem(`${xv}-${e}-${t}`))}function Dv(e,t){t.forEach(t=>sessionStorage.removeItem(`${xv}-${e}-${t}`))}function Av(e,t){const n=`${xv}-${e}-${t}`,r=sessionStorage.getItem(n)||void 0;return sessionStorage.removeItem(n),r}function Nv(e){return"object"==typeof e&&null!==e&&"function"==typeof e.store&&"function"==typeof e.get&&"function"==typeof e.delete}async function jv(e,t){if(!e.clientId)throw new ow('A host config with authType set to "oauth2" has to also provide a clientId');return Mv(Cv(e),t,e.noCache,e.accessTokenStorage)}async function Mv(e,t,n,r){return n?t():(Lv[e]=Lv[e]||(async()=>{let n=await async function(e,t){let n,r;if("local"===t?(n=Pv(e,"access-token"),r=Pv(e,"refresh-token")):"session"===t?(n=Iv(e,"access-token"),r=Iv(e,"refresh-token")):Nv(t)&&(n=await _v(t,e,"access-token"),r=await _v(t,e,"refresh-token")),n)return{accessToken:n,refreshToken:r}}(e,r);return n||(n=await t(),"local"===r&&n?(n.accessToken&&Rv(e,"access-token",n.accessToken),n.refreshToken&&Rv(e,"refresh-token",n.refreshToken)):"session"===r&&n?(n.accessToken&&Tv(e,"access-token",n.accessToken),n.refreshToken&&Tv(e,"refresh-token",n.refreshToken)):Nv(r)&&n&&(n.accessToken&&await qv(r,e,"access-token",n.accessToken),n.refreshToken&&await qv(r,e,"refresh-token",n.refreshToken)),n)})(),Lv[e])}function $v(e){const t=Cv(e);delete Lv[t],Y()&&(Ov(t,["access-token","refresh-token"]),Dv(t,["access-token","refresh-token"])),Nv(e.accessTokenStorage)&&function(e,t,n){Promise.all(n.map(n=>e.delete(`${xv}-${t}-${n}`)))}(e.accessTokenStorage,t,["access-token","refresh-token"])}function zv(e){if("string"==typeof e){const t=globalThis[e];if(!t)throw new Error(`No such function: ${e}`);return t}return e}function Fv(e){return globalThis[e]}function Bv(e){if(e.errors)throw new lw(e.errors)}function Uv(e){const t=Object.keys(e);return t.sort(),t.map(t=>`${t}=${e[t]}`).join("&")}async function Wv(e){const t=(new TextEncoder).encode(e),n=await globalThis.crypto.subtle.digest("SHA-256",t);return function(e){let t;if(Y()){const n=String.fromCharCode.apply(null,e);t=btoa(n)}else{if(!ee())throw new Error("Environment not supported for oauth2 authentication");t=Buffer.from(e).toString("base64")}return t}(Array.from(new Uint8Array(n))).replaceAll(/\+/g,"-").replaceAll(/\//g,"_").replace(/=+$/,"")}async function Hv(e){const t=e.clientId||"",n=bw(e),r=uv(128),o=uv(43),i=await Wv(r),a=e.redirectUri||globalThis.location.href,s=Cv(e);$v(e),Tv(s,"state",o),Tv(s,"verifier",r),Tv(s,"href",globalThis.location.href),Tv("","client-in-progress",s);const l=`${n}/oauth/authorize?${Uv({response_type:"code",client_id:t,redirect_uri:a,scope:e.scope||"user_default",state:o,code_challenge:i,code_challenge_method:"S256"})}`;globalThis.location.replace(l)}async function Vv(e,t,n,r){try{const o=await(await fetch(`${bw(e)}/oauth/token`,{method:"POST",credentials:"include",mode:"cors",headers:{"content-type":"application/json"},redirect:"follow",body:JSON.stringify({grant_type:"authorization_code",scope:e.scope||"user_default",...t?{code:t}:{},redirect_uri:r||globalThis.location.href,...n?{code_verifier:n}:{},client_id:e.clientId})})).json();return Bv(o),{accessToken:o.access_token,refreshToken:o.refresh_token,errors:o.errors}}catch(e){return console.error(e),new Promise(()=>{})}}function Gv(e,t,n,r,o){const i={client_id:e,client_secret:t,scope:n};return r?{...i,grant_type:"urn:qlik:oauth:user-impersonation",user_lookup:{field:"subject",value:r}}:o?{...i,grant_type:"urn:qlik:oauth:user-impersonation",user_lookup:{field:"userId",value:o}}:{...i,grant_type:"client_credentials"}}async function Kv(e){const{clientId:t,clientSecret:n,performInteractiveLogin:r}=e;if(!t||!n&&!r)throw new ow('A host config with authType set to "oauth2" has to provide a clientId and a clientSecret or a performInteractiveLogin function');return await jv(e,async()=>{if(e.performInteractiveLogin)return Jv(e);if(!e.clientId||!e.clientSecret)throw new ow('A host config with authType set to "oauth2" has to provide a clientId and a clientSecret');return async function(e,t,n,r="user_default",o,i){const a=await(await fetch(`${e}/oauth/token`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify(Gv(t,n,r,o,i))})).json();return{accessToken:a.access_token,refreshToken:a.refresh_token,errors:a.errors}}(bw(e),e.clientId,e.clientSecret,e.scope,e.subject,e.userId)})}async function Jv(e){if(!e.performInteractiveLogin)return Yv("No performInteractiveLogin function in hostConfig");let t;try{const n=uv(128),r=uv(43),{code:o,state:i}=function(e){if("string"==typeof e){let t;try{t=new URL(e)}catch{t=new URL(e,"http://localhost")}const n=new URLSearchParams(t.search);return{code:n.get("code")||"",state:n.get("state")||""}}return e}(await zv(e.performInteractiveLogin)({getLoginUrl:async({redirectUri:o})=>(t=o,async function(e,t,n,r){const o=e.clientId||"",i=bw(e),a=await Wv(r);return`${i}/oauth/authorize?${Uv({response_type:"code",client_id:o,redirect_uri:t,scope:e.scope||"user_default",state:n,code_challenge:a,code_challenge_method:"S256"})}`}(e,o,r,n))}));return t?r!==i?Yv("State returned by custom interactive login function does not match original"):o?await Vv(e,o,n,t):Yv("No code found in response from custom interactive login function"):Yv("No redirect uri provided")}catch(e){return{accessToken:void 0,refreshToken:void 0,errors:[{code:"",status:401,title:"Could not perform custom interactive login",detail:String(e)}]}}}!function(e,t){const n=globalThis.location?.hostname?.toLowerCase(),r="localhost"===n,o=n?.endsWith(".qlik-stage.com");(r||o)&&globalThis.QlikMain&&(void 0===globalThis.QlikMain.INTERNAL__DO_NOT_USE.qix&&(globalThis.QlikMain.INTERNAL__DO_NOT_USE.qix={}),globalThis.QlikMain.INTERNAL__DO_NOT_USE.qix[e]=t)}("clearAllAccessTokens",()=>{console.log("Clearing tokens",Lv),Object.keys(Lv).forEach(e=>{console.log("Clearing access tokens for",e),Ov(e,["access-token","refresh-token"]),Dv(e,["access-token","refresh-token"])}),function(){for(const e in Lv)delete Lv[e]}()});let Qv=Promise.resolve("");async function Zv(e){if(ee()){const t=await Kv(e);return t?(Bv(t),t.accessToken||""):""}return Y()&&(Qv=Qv.then(async()=>{const t=await async function(e){const{clientId:t}=e;if(!t)throw new ow('A host config with authType set to "oauth2" has to also provide a clientId');const n=await jv(e,async()=>{if(e.getAccessToken)try{return{accessToken:"string"==typeof e.getAccessToken?await Fv(e.getAccessToken)():await e.getAccessToken(),refreshToken:void 0,errors:void 0}}catch{return Yv("Could not fetch access token using custom function")}if(e.performInteractiveLogin)return Jv(e);const t=Cv(e),n=Av(t,"code"),r=Av(t,"verifier");if(n&&r){const t=await Vv(e,n,r,e.redirectUri);if(t)return t}});return n||(e.performInteractiveLogin||(await kv(e),Hv(e)),new Promise(()=>{}))}(e);return t?(Bv(t),t.accessToken||""):""})),Qv}async function Xv(e){const t=await async function(e){return Lv[Cv(e)]}(e);if($v(e),t&&t.refreshToken&&e.clientSecret){const n=await jv(e,async()=>{if(!t||!t.refreshToken||!e.clientSecret)throw new Error("Trying to refresh tokens without refreshToken or clientSecret");return async function(e,t,n){const r=await(await fetch(`${e}/oauth/token`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify({grant_type:"refresh_token",refresh_token:t,client_secret:n})})).json();return{accessToken:r.access_token,refreshToken:r.refresh_token,errors:r.errors}}(bw(e),t.refreshToken,e.clientSecret)});n&&Bv(n)}}function Yv(e){return{accessToken:void 0,refreshToken:void 0,errors:[{code:"",status:401,title:e,detail:""}]}}async function eS(e,t,n){const r=await fetch(`${bw(e)}/oauth/token`,{method:"POST",credentials:"include",mode:"cors",headers:{"content-type":"application/json"},redirect:"follow",body:JSON.stringify({subject_token:t,subject_token_type:"urn:ietf:params:oauth:token-type:access_token",grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",purpose:n,redirect_uri:globalThis.location?.href,client_id:e.clientId})});if(200!==r.status)throw await async function(e){const t=await e.text();try{return new lw(JSON.parse(t).errors)}catch{return new lw([{code:"unknown",status:e.status,detail:t,title:"Unknown authentication error"}])}}(r);return(await r.json()).access_token}async function tS(e,t){try{return await t()}catch(n){const{retry:r}=await oS({hostConfig:e});if(r)return t();throw n}}function nS(){const e=Math.floor(Date.now()/1e3).toString(16);return`${e}${t=40-e.length,cv("0123456789abcdef",t)}`;var t}async function rS(e){const{accessCode:t,clientId:n}=e;if(!t||!n)throw new ow('A host config with authType set to "anonymous" has to provide both an accessCode and clientId');const r=await async function(e,t){if(!e.accessCode)throw new ow('A host config with authType set to "anonymous" has to also provide an accessCode');return Mv(Ev(e),t,!1,void 0)}(e,async()=>{const r=bw(e),o=await async function(e){let t;if(Y()){const n=Ev(e);t=Pv(n,"tracking-code"),t||(t=nS()),Rv(n,"tracking-code",t)}else t=nS();return t}(e);return async function(e,t,n,r){const o=await(await fetch(`${e}/oauth/token/anonymous-embed`,{method:"POST",mode:"cors",headers:{"content-type":"application/json"},body:JSON.stringify({eac:t,client_id:n,grant_type:"urn:qlik:oauth:anonymous-embed",tracking_code:r})})).json();return{accessToken:o.access_token,refreshToken:o.refresh_token,errors:o.errors}}(r,t,n,o)});if(!r)return"";if(r.errors)throw new lw(r.errors);return r.accessToken?r.accessToken:""}async function oS({hostConfig:e}){return function(e){const t=Ev(e);delete Lv[t],Y()&&(Ov(t,["access-token","refresh-token"]),Dv(t,["access-token","refresh-token"]))}(e),{preventDefault:!1,retry:!0}}var iS={requiredProps:["clientId","accessCode"],optionalProps:[],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await rS(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return ee()?{headers:{Authorization:`Bearer ${await rS(e)}`}}:{queryParams:{accessToken:await tS(e,async()=>eS(e,await rS(e),"websocket"))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await tS(e,async()=>eS(e,await rS(e),"websocket"))}}},handleAuthenticationError:oS};var aS={requiredProps:["apiKey"],optionalProps:[],getRestCallAuthParams:function({hostConfig:e}){return Promise.resolve({headers:{Authorization:`Bearer ${e?.apiKey}`},queryParams:{},credentials:"omit"})},getWebSocketAuthParams:async function({hostConfig:e}){if(Y())throw new Error("Not supported in browser environment");return Promise.resolve({headers:{Authorization:`Bearer ${e?.apiKey}`}})},handleAuthenticationError:function(){return Promise.resolve({})}},sS=class extends Error{status;headers;data;constructor(e,t,n,r){super(e),this.status=t,this.headers=n,this.data=r,this.stack=dS(this.stack)}},lS=class extends Error{contentType;data;constructor(e,t,n){super(e),this.contentType=t,this.data=n,this.stack=dS(this.stack)}};const cS=/^.+\/qmfe-api(?:\.js)?:(\d+)(?::\d+)?$/gim,uS=e=>{const t=e.match(cS);return Boolean(t&&t.length>0)};function dS(e){if(!e)return e;const t=[],n=e.split("\n");n.reverse();for(const e of n){if(uS(e))break;t.unshift(e)}return t.join("\n")}function fS(e){return e?Object.entries(e).map(e=>{const[,t]=e;if(void 0!==t)return e.map(e=>encodeURIComponent(decodeURIComponent(e))).join("=")}).filter(Boolean).join("&"):""}const pS={};globalThis.__API_CACHE__DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pS,globalThis.QlikMain?.INTERNAL__DO_NOT_USE&&(globalThis.QlikMain.INTERNAL__DO_NOT_USE.apiCache=pS);function hS(e,t,n){if(e?.noCache)return!1;if(!t||void 0===t.value)return!1;if(e?.useCacheIfAfter)return e.useCacheIfAfter.getTime()<=t.lastPulled;const r=Date.now()-t.lastPulled;return"number"==typeof e?.maxCacheAge?r<=e?.maxCacheAge:r<n}function mS({url:e,query:t,headers:n,serializedHostConfig:r}){let o=e;if(t&&Object.keys(t).length>0){const n=fS(t);o=e.includes("?")?o.concat(`&${n}`):o.concat(`?${n}`)}return n&&Object.keys(n).length>0&&(o=o.concat(`+headers=${JSON.stringify(n)}`)),r&&"{}"!==r&&(o=o.concat(`+host-config=${r}`)),o}function gS(e){const t=[];return pS[e]&&t.push(pS[e]),pS[".global"]&&t.push(pS[".global"]),t}function bS(e,t){const n=yS(t);for(const t in e){const r=yS(t);(n.startsWith(r)||r.startsWith(n))&&delete e[t]}}function yS(e){const t=e.indexOf("?");if(t>=0)return e.substring(0,t);const n=e.indexOf("+headers=");if(n>=0)return e.substring(0,n);const r=e.indexOf("+host-config=");return r>=0?e.substring(0,r):e}function vS(e){return null==e||e&&(e instanceof Blob||e instanceof Object&&"[object Blob]"===e.toString())||e&&e instanceof ReadableStream||"string"==typeof e?e:JSON.parse(JSON.stringify(e))}function SS(e){return e.then(e=>{const t={data:vS(e.data),headers:e.headers,status:e.status};return e.next&&(t.next=e.next),e.prev&&(t.prev=e.prev),t})}function wS(e,t){return"get"!==e&&"GET"!==e&&(!t.endsWith("/api/v1/licenses/allotments")||"post"!==e&&"POST"!==e)}function kS(e){return e instanceof Error?e.cause?e.message?`${e.message} - ${kS(e.cause)}`:kS(e.cause):e.message:String(e)}async function xS(e,t,n,r,o,i,a,s){const{body:l,contentTypeHeader:c,requestOptions:u}=function(e,t){if(!e)return{body:null,contentTypeHeader:{},requestOptions:{}};const n={},r={};let o;switch(t){case"":case"application/json":n["Content-Type"]="application/json",o=JSON.stringify(e);break;case"multipart/form-data":o=function(e){const t="multipart/form-data";if("object"!=typeof e)throw new lS(`Cannot encode ${typeof e} as ${t}, body should be an object.`,t,e);if(Array.isArray(e))throw new lS(`Cannot encode ${typeof e} as ${t}, body should be an object.`,t,e);if(e instanceof FormData)return e;const n=new FormData;return Object.entries(e).forEach(r=>{const[o,i]=r;switch(typeof i){case"boolean":case"number":case"string":n.set(o,`${i}`);break;case"object":if(i instanceof Blob)n.set(o,i);else if(i instanceof Uint8Array){const e=new Blob([i],{type:"application/octet-stream"});n.set(o,e)}else{const e=JSON.stringify(i),t=new Blob([e],{type:"application/json"});n.set(o,t,"")}break;default:throw new lS(`Cannot encode multipart-field "${o}" with value of type ${typeof i}, values must be objects, strings, numbers or boolean.`,t,e)}}),n}(e);break;case"application/octet-stream":n["Content-Type"]=t,r.duplex="half",o=e;break;case"text/plain":if("string"!=typeof e)throw new lS(`Cannot send ${typeof e} as ${t}, body should be a string.`,t,e);n["Content-Type"]=t,o=e;break;default:throw new lS(`Unsupported content-type "${t}", supported are: application/json, multipart/form-data, application/octet-stream and text/plain`,t,e)}return{body:o,contentTypeHeader:n,requestOptions:r}}(n,r??""),d={...c,...i,...o?.headers,...TS()};!d["User-Agent"]&&s&&(d["User-Agent"]=s);const f={method:e,credentials:a,mode:"cors",headers:d,redirect:await gw(o?.hostConfig)?"manual":"follow",keepalive:o?.keepalive,progress:o?.progress,body:l,...u};let p,h;if(o?.signal)f.signal=o.signal;else if(o?.timeoutMs&&o.timeoutMs>0){const e=new AbortController;p=setTimeout(()=>{e.abort()},o.timeoutMs),f.signal=e.signal}return h=o?.progress?await async function(e,{method:t,headers:n,credentials:r,keepalive:o,body:i,signal:a,progress:s}){const l=new XMLHttpRequest;let c,u;const d=new Promise((e,t)=>{c=e,u=t});if(l.open(t||"GET",e),"object"!=typeof n)throw Error("malformed headers",n);for(const[e,t]of Object.entries(n))l.setRequestHeader(e,t);o&&l.setRequestHeader("Connection","keep-alive"),a&&a.addEventListener("abort",()=>{l.abort(),u()}),l.withCredentials="include"===r,s?.onUpload&&(l.upload.onprogress=e=>{const{loaded:t,total:n,lengthComputable:r}=e;s.onUpload?.({loaded:t,total:r?n:void 0})}),s?.onDownload&&(l.onprogress=e=>{const{loaded:t,total:n,lengthComputable:r}=e;s.onDownload?.({loaded:t,total:r?n:void 0})}),l.onloadend=()=>{const{status:e}=l,t={};for(const e of l.getAllResponseHeaders().split("\r\n")){const[n,r]=e.split(":",2);n&&r&&(t[n]=r)}l.response?c(new Response(l.response,{status:e,headers:t})):c(new Response(void 0,{status:e,headers:t}))};try{const e=i;l.send(e)}catch(e){return Promise.reject(new sS(kS(e),0,new Headers,{}))}return d}(t,f):await async function(e,t){try{return await fetch(e,t)}catch(e){return Promise.reject(new sS(kS(e),0,new Headers,{}))}}(t,f),p&&clearTimeout(p),await async function(e,t){let n;const r=e.headers.get("content-type")?.split(";")[0],o=e.headers.get("content-disposition")?.split(";");if(o&&"attachment"===o[0]){let t="";for(let e=1;e<o.length;e++){const n=o[e].trim();if(0===n.indexOf("filename")){const e=n.indexOf('"'),r=n.lastIndexOf('"');t=n.slice(e+1,r)}}n=qS(await e.blob(),t)}else switch(r){case"image/png":case"image/jpeg":case"image/x-icon":case"application/offset+octet-stream":case"application/octet-stream":case"application/zip":case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":case"application/pdf":n=qS(await e.blob());break;case"text/event-stream":n=e.body;break;default:{let r;try{r=await e.text()}catch(n){throw new sS(`request to '${t}' failed while reading response body: ${n instanceof Error?n.message:String(n)}`,e.status,e.headers,void 0)}try{n=JSON.parse(r)}catch{n=r}break}}const{status:i,statusText:a,headers:s}=e,l=`request to '${t}' failed with status ${i} ${a}.`;if(i>=300)throw new sS(l,i,s,n);if(0===i)throw new sS(l,302,s,n);return{status:i,headers:s,data:n}}(h,t)}async function CS({method:e,pathTemplate:t,pathVariables:n,query:r,options:o}){const i=bw(o?.hostConfig),{headers:a,queryParams:s,credentials:l}=await kw({hostConfig:o?.hostConfig,method:e}),c=i+function(e,t){let n=e;return t&&Object.keys(t).forEach(e=>{n=n.replace(`{${e}}`,t[e])}),n}(t,n),u=function(e,t){return""!==t?`${e}?${t}`:e}(c,fS({...r,...s})),d=Rw(o?.hostConfig);return{completeUrl:u,authHeaders:a,credentials:l,cacheKey:mS({url:c,query:r,headers:o?.headers,serializedHostConfig:d})}}function ES(e,t){return LS(e,t,async()=>{const{authHeaders:n,credentials:r}=await CS(t);return LS(e,{...t,authHeaders:n,credentials:r,options:{...t.options,noCache:!0}},void 0)})}function LS(e,t,n){const{method:r,completeUrl:o,body:i,options:a,authHeaders:s,credentials:l,cacheKey:c,contentType:u,userAgent:d}=t,f={method:r,completeUrl:o,cacheKey:c,options:a},p=function(e,t){if(t?.options?.noCache)return;const{method:n,completeUrl:r,cacheKey:o}=t,i=gS(e);if(wS(n,r))return;let a;for(const e of i)if(o in e){if(a=e[o],a&&void 0!==a.value&&hS(t?.options,a,6e5))break;a=void 0}if(!a)return;return a.lastHit=new Date,a.hitCount+=1,a.accessedPaths.add(globalThis.location?globalThis.location.pathname:"node"),SS(a.value)}(e,f);if(p)return p;const h=xS(r,o,i,u,a,s,l,d),m=async function(e,t,n,r){try{return await n}catch(n){const o=n,i=o.data;if(401===o.status||403===o.status&&"CSRF-TOKEN-2"===i?.code||function(e,t){const n=new URL(e,"http://dummy"),r=n.pathname.endsWith("/qps/csrftoken")&&n.searchParams.has("xrfkey");return 301===t||302===t||r&&403===t}(t,o.status)&&await gw(e)){if(globalThis.loggingOut)return RS();const{retry:t,preventDefault:n}=await ww({hostConfig:e,status:o.status,headers:o.headers,errorBody:i,canRetry:!!r});if(t&&r)return r();if(n)return RS()}throw n}}(a?.hostConfig,o,h,n);return function(e,t,n){pS[e]||(pS[e]={});const{cacheKey:r}=t;if(wS(t.method,t.completeUrl))return n.then(t=>{const n=gS(e);for(const e of n)bS(e,r);return t});const o=pS[e],i=n.catch(e=>(delete o[r],Promise.reject(e)));return o[r]={lastPulled:Date.now(),value:i,lastHit:null,hitCount:0,accessedPaths:new Set},SS(i)}(e,f,function(e,{method:t,body:n,options:r,authHeaders:o,credentials:i,value:a}){return a.then(a=>{const s=a.data;if(!s)return a;const l=Rw(r?.hostConfig),c=s.links?.prev?.href,u=s.links?.next?.href;return c&&(a.prev=a=>ES(e,{method:t,completeUrl:c,body:n,options:a||r,authHeaders:o,credentials:i,cacheKey:mS({url:c,headers:r?.headers,serializedHostConfig:l})})),u&&(a.next=a=>ES(e,{method:t,completeUrl:u,body:n,options:a||r,authHeaders:o,credentials:i,cacheKey:mS({url:u,headers:r?.headers,serializedHostConfig:l})})),a})}(e,{...t,value:m}))}function RS(){return new Promise(()=>{})}function TS(){if(!Y())return{};const e=localStorage.getItem("qmfe-api-service-overrides-header");return e?{"X-Qlik-Overrides":e}:{}}function qS(e,t){const n=e;return n.download=t?n=>PS(e,n??t):t=>PS(e,t),n}async function PS(e,t){if(Y()){const n=document.createElement("a"),r=window.URL.createObjectURL(e);n.href=r,n.download=t,n.click(),window.URL.revokeObjectURL(r)}else{const{writeFileSync:n}=await Promise.resolve().then(function(){return zw}),r=await e.arrayBuffer();n(t,new Uint8Array(r))}}const IS="qmfe-api/latest";async function _S(e,t,n){return(jw.getInterceptors()||[]).reduce((e,t)=>n=>t(n,e),t=>async function(e,t){if("mock-backend-rest-recorder"===t.options?.hostConfig?.authType)return Promise.resolve(t.options?.hostConfig.recordInvokeFetch(t));if("mock-backend"===t.options?.hostConfig?.authType)return Promise.resolve(t.options?.hostConfig.mockInvokeFetch(t));if(function(e){const t=_w(e);if(mw(t)){if(0===Object.keys(t).length)throw new ow("a host config must be provided when making a cross domain request");if(!t.host)throw new ow("A 'host' property must be set in host config when making a cross domain request")}}(t.options?.hostConfig),"noauth"===t.options?.hostConfig?.authType)return console.info("API call blocked: noauth auth module is configured, no API calls should be made"),{status:204,headers:new Headers,data:null};let n;n=t?.userAgent?t.userAgent:Y()?`${window.navigator.userAgent} ${IS}`:IS;const{completeUrl:r,authHeaders:o,credentials:i,cacheKey:a}=await CS(t);return ES(e,{...t,method:t.method.toUpperCase(),completeUrl:r,authHeaders:o,credentials:i,cacheKey:a,userAgent:n})}(e,t))(t)}function OS(e){!function(e){pS[e]={}}(e)}async function DS(e,t){const n=bw(e);let r;r=await gw(e)?"/qps/csrftoken":"/api/v1/csrf-token";const o=async()=>{try{const n=(await _S("csrf-token",{method:"get",pathTemplate:r,options:{hostConfig:e,maxCacheAge:5e3,noCache:t}})).headers.get("qlik-csrf-token");return n||""}catch(e){if(404===e.status)return"";throw e}};return t?(AS[n]=o(),AS[n]):(AS[n]=AS[n]||o(),AS[n])}const AS={};function NS(e){return!1===e.crossSiteCookies?"same-origin":mw(e)?"include":"same-origin"}async function jS(e){if("function"==typeof e)return e();if("string"==typeof e){const t=function(e){return globalThis[e]}(e);if("function"!=typeof t)throw new Error(`getAccessToken function "${e}" not found on globalThis. Please make sure it is defined.`);return t()}}var MS={requiredProps:[],optionalProps:["webIntegrationId","crossSiteCookies","anonymousMode"],getRestCallAuthParams:async function({hostConfig:e,method:t}){const n={};var r;return"get"!==(r=t)&&"GET"!==r&&(n["qlik-csrf-token"]=await DS(e)),e.webIntegrationId&&(n["qlik-web-integration-id"]=e.webIntegrationId),{headers:n,queryParams:{},credentials:NS(e)}},getWebSocketAuthParams:async function({hostConfig:e}){if(ee()){const t={};return t["qlik-csrf-token"]=await DS(e),e.webIntegrationId&&(t["qlik-web-integration-id"]=e.webIntegrationId),{headers:t}}const t={"qlik-csrf-token":await DS(e,!0)};return e.webIntegrationId&&(t["qlik-web-integration-id"]=e.webIntegrationId),{queryParams:t}},handleAuthenticationError:async function({hostConfig:e,status:t}){if(function(e){const t=bw(e);delete AS[t],OS("csrf-token")}(e),403===t)return{preventDefault:!1,retry:!0};const n=e.webIntegrationId?`qlik-web-integration-id=${e?.webIntegrationId}&`:"",r=bw(e);return await kv(e),globalThis.location.replace(`${r}/login?${n}returnto=${encodeURIComponent(globalThis.location.href)}`),{preventDefault:!0}}};var $S={requiredProps:[],optionalProps:[],getRestCallAuthParams:function(e){return Promise.resolve({headers:{},queryParams:{},credentials:"same-origin"})},getWebSocketAuthParams:function(e){return Promise.resolve({queryParams:{}})},handleAuthenticationError:function(e){return Promise.resolve({})}};var zS={requiredProps:[],optionalProps:[],getRestCallAuthParams:function(){return Promise.resolve({headers:{},queryParams:{},credentials:"same-origin"})},getWebSocketAuthParams:function(){return Promise.resolve({queryParams:{}})},handleAuthenticationError:function(){return Promise.resolve({})}};async function FS(e,t){try{return await t()}catch(n){const{retry:r}=await BS({hostConfig:e});if(r)return t();throw n}}async function BS({hostConfig:e}){return e.getAccessToken?($v(e),{preventDefault:!1,retry:!0}):e.performInteractiveLogin?($v(e),{retry:!0}):Y()?(await kv(e),Hv(e),{preventDefault:!0}):(await Xv(e),{preventDefault:!1,retry:!0})}Y()&&function(){const e=new URLSearchParams(globalThis.location.search),t=e.get("code")||void 0,n=e.get("state")||void 0;if(e.get("error")){const t=document.createElement("pre");t.innerText=`<code>${JSON.stringify({error:e.get("error"),error_code:e.get("error_code"),error_description:e.get("error_description"),error_detail:e.get("error_detail"),error_uri:e.get("error_uri")})}</code>`,document.body.prepend(t)}const r=Av("","client-in-progress");if(r&&t&&n){const e=Av(r,"state"),o=Av(r,"href");e&&e===n&&o&&(Tv(r,"code",t),o!==globalThis.location.href&&globalThis.location.replace(o))}}();var US={requiredProps:["clientId"],optionalProps:["clientSecret","redirectUri","accessTokenStorage","scope","subject","userId","noCache","getAccessToken","performInteractiveLogin"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{Authorization:`Bearer ${await Zv(e)}`},queryParams:{},credentials:"omit"}},getWebSocketAuthParams:async function({hostConfig:e}){return ee()?{headers:{Authorization:`Bearer ${await Zv(e)}`}}:{queryParams:{accessToken:await FS(e,async()=>eS(e,await Zv(e),"websocket"))}}},getWebResourceAuthParams:async function({hostConfig:e}){return{queryParams:{accessToken:await FS(e,async()=>eS(e,await Zv(e),"webresource"))}}},handleAuthenticationError:BS};var WS={requiredProps:["reference"],optionalProps:[],getRestCallAuthParams:function(){throw new Error("getRestCallAuthParams should never be called for reference auth module")},getWebSocketAuthParams:function(){throw new Error("getWebSocketAuthParams should never be called for reference auth module")},handleAuthenticationError:function(){throw new Error("handleAuthenticationError should never be called for reference auth module")}};const HS={};function VS(e){const t=bw(e);return HS[t]=HS[t]||function(){let e="";for(let t=0;t<16;t+=1){const t=Math.floor(62*Math.random());e+=t<10?t:t>9&&t<36?String.fromCharCode(t+55):String.fromCharCode(t+61)}return e}(),HS[t]}var GS={requiredProps:[],optionalProps:["loginUri","crossSiteCookies","getAccessToken"],getRestCallAuthParams:async function({hostConfig:e}){return{headers:{"X-Qlik-XrfKey":VS(e)},queryParams:{xrfkey:VS(e)},credentials:NS(e)}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{xrfkey:VS(e),"qlik-csrf-token":await DS(e,!0)}}},handleAuthenticationError:async function({hostConfig:e}){if(e.loginUri)return await kv(e),globalThis.location.replace(e.loginUri.replace("{location}",encodeURIComponent(globalThis.location.href))),{preventDefault:!0};if(e.getAccessToken){const t=await jS(e.getAccessToken);if(t)return await fetch(`${bw(e)}/qlik-embed/main.js`,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},cache:"no-cache"}),{retry:!0}}return{}}};const KS=new Map;async function JS(e){let t=function(e){const t=Rw(e);return KS.get(t)}(e);if(!t){const n=await jS(e.getAccessToken);if(!n)throw new Error("Failed to acquire access token");t=(await fetch(`${bw(e)}/qlik-embed/main.js`,{method:"GET",mode:"cors",credentials:"include",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`}})).headers.get("Set-Cookie")||void 0,t&&function(e,t){const n=Rw(e);KS.set(n,t)}(e,t)}if(!t)throw new Error("Failed to exchange access token for cookie");return t}var QS={requiredProps:[],optionalProps:["loginUri","crossSiteCookies","getAccessToken"],validateHostConfig:e=>{if("function"==typeof e.getAccessToken)return!0;if("string"==typeof e.getAccessToken){if(!globalThis[e.getAccessToken])throw new ow('The "getAccessToken" function name provided does not exist on globalThis.');return!0}throw new ow('The "getAccessToken" property must be a function or the name of a globally defined function.')},getRestCallAuthParams:async function({hostConfig:e}){return{queryParams:{xrfkey:VS(e)},headers:{Cookie:await JS(e),"X-Qlik-XrfKey":VS(e)},credentials:NS(e)}},getWebSocketAuthParams:async function({hostConfig:e}){return{queryParams:{"qlik-csrf-token":await DS(e,!0)},headers:{Cookie:await JS(e)}}},handleAuthenticationError:async function({hostConfig:e}){return function(e){const t=Rw(e);KS.delete(t)}(e),{retry:!0}}};var ZS={requiredProps:["pfx"],optionalProps:["passphrase","userHeader"],getRestCallAuthParams:function({hostConfig:e}){return Promise.resolve({headers:{},queryParams:{},credentials:"omit",pfxOptions:{pfx:e?.pfx,passphrase:e?.passphrase}})},getWebSocketAuthParams:async function({hostConfig:e}){if(Y())throw new Error("Not supported in browser environment");const t=e?.userHeader||"UserDirectory=INTERNAL; UserId=sa_engine";return Promise.resolve({headers:{"X-Qlik-User":t},pfxOptions:{pfx:e?.pfx,passphrase:e?.passphrase||""}})},handleAuthenticationError:function(){return Promise.resolve({})}};const XS={};let YS=Promise.resolve(),ew=!1;function tw(e,t){XS[e.toLowerCase()]=t}async function nw(e){const t=_w(e),n=await rw(t);YS&&await YS;let r=function(e){return XS[e.toLowerCase()]}(n);if(r||(YS=(async()=>{r=await async function(e){const t=globalThis[e];if(t){let n;if(n="function"==typeof t?await t():t,n&&n.getRestCallAuthParams&&n.getWebSocketAuthParams&&n.handleAuthenticationError)return n;throw console.error("Not a valid auth module",n),new aw(e)}return Promise.resolve(void 0)}(n),r&&tw(n,r)})(),await YS),!r)throw new aw(n);return r.validateHostConfig?r.validateHostConfig({authType:n,...t}):function(e,{requiredProps:t,optionalProps:n}){const r=[];for(const n of t)e[n]||r.push(n);if(r.length>0)throw new ow(`missing required properties in host config; '${r.join("', '")}'`);const o=[...rv,...t,...n],i=[];Object.keys(e).forEach(e=>{o.includes(e)||i.push(e)}),i.length>0&&console.warn(`WARNING: unknown properties in host config; '${i.join("', '")}'`)}({authType:n,...t},{requiredProps:r.requiredProps||[],optionalProps:r.optionalProps||[]}),r}async function rw(e){return e.authType?e.authType:e.apiKey?"apikey":e.accessCode?"anonymous":e.clientId?"oauth2":e.webIntegrationId?"cookie":e.reference?"reference":e.pfx?"pfx":await gw(e)?"windowscookie":"cookie"}ew||(tw("apikey",aS),tw("cookie",MS),tw("none",zS),tw("noauth",$S),tw("oauth2",US),tw("anonymous",iS),tw("pfx",ZS),Y()?tw("windowscookie",GS):tw("windowscookie",QS),tw("reference",WS),ew=!0);var ow=class extends Error{constructor(e){super(`Invalid host config: ${e}`),this.name="InvalidHostConfigError"}},iw=class extends Error{constructor(...e){const t=e.map((e,t)=>0===t?`"${e}"`:`or "${e}"`).join(" ");super(`HostConfig is not properly configured. authType is expected to be ${t}`),this.name="UnexpectedAuthTypeError"}},aw=class extends Error{constructor(e){super(`Not a valid auth type: ${e}, valid auth types are; '${Object.keys(XS).filter(e=>"qmfeembedframerauthmodule"!==e.toLowerCase()).join("', '")}'`),this.name="InvalidAuthTypeError"}};function sw({title:e,detail:t,code:n,status:r}){return t?`${e} - ${t} (Status: ${r}, Code: ${n})`:`${e} (Status: ${r}, Code: ${n})`}var lw=class extends Error{errors;constructor(e){if("object"!=typeof e)return void super("Unknown error");const t=Array.isArray(e)?e:[e];super(t.map(sw).join(", ")),this.errors=t}};const cw=new Map;let uw,dw="";function fw(e){const t=mv(e);let n=cw.get(t);return n||(n={listeners:new Set},cw.set(t,n)),n}function pw(e,t){if(e===uw&&t.message===dw)return;uw=e,dw=t.message;let n=!1;const r=fw(e);for(const e of r.listeners)try{n=!0,e(t)}catch(e){console.warn("Error in auth error listener",e)}if(e.onAuthFailed)try{n=!0,e.onAuthFailed(t)}catch(e){console.warn("Error in onAuthFailed callback",e)}n||console.error(t.message)}function hw(e){return rw(e)}function mw(e){if(!globalThis.location?.origin)return!0;const t=_w(e);if(0===Object.keys(t).length)return!1;try{return new URL(bw(t)).origin!==globalThis.location.origin}catch{}return!1}async function gw(e){const t=_w(e);return"boolean"==typeof t.forceIsWindows?t.forceIsWindows:!(t.host?.endsWith(".qlik-stage.com")||t.host?.endsWith(".qlikcloud.com")||t.host?.endsWith(".qlikcloudgov.com"))&&("cookie"!==t.authType&&("windowscookie"===t.authType||(await(async(e={})=>{const t=_w(e.hostConfig);if("mock-backend-rest-recorder"===t.authType)return t.recordGetPlatform();if("mock-backend"===t?.authType)return t.mockGetPlatform();if("noauth"===t?.authType)return lv({isUnknown:!0});let n=Y()?window.QlikMain?.PRODUCT_INFO:void 0;if(!n){const{data:t,status:r}=await av(e);if(n=t,404===r)return lv({isUnknown:!0});if(!n||r<=399&&r>=300)return lv({isQSE:!0,isWindows:!0})}const r=(n.composition?.deploymentType||"").toLowerCase();return"qliksenseserver"===r?lv({isQSE:!0,isWindows:!0,meta:sv(n)}):"qliksensedesktop"===r?lv({isQSD:!0,isWindows:!0,meta:sv(n)}):"qliksensemobile"===r?lv({isQSE:!0,isWindows:!0,meta:sv(n)}):"cloud-console"===r?lv({isCloud:!0,isCloudConsole:!0,meta:sv(n)}):"fedramp"===n.composition?.provider?lv({isCloud:!0,isQCG:!0,meta:sv(n)}):lv({isCloud:!0,isQCS:!0,meta:sv(n)})})({hostConfig:e})).isWindows))}function bw(e){const t=_w(e)?.host?.trim();let n;for(n=t?t.toLowerCase().startsWith("https://")||t.toLowerCase().startsWith("http://")?t:`https://${t}`:"";"/"===n[n.length-1];)n=n.substring(0,n.length-1);return n}function yw(e){const t=_w(e)?.host;let n;for(n=t?t.toLowerCase().startsWith("https://")||t.toLowerCase().startsWith("http://")?t:`https://${t}`:globalThis.location.origin;"/"===n[n.length-1];)n=n.substring(0,n.length-1);return n.replace(Pw,"ws")}async function vw(e){const t=_w(e.hostConfig);try{return await(await nw(t)).getWebSocketAuthParams({...e,hostConfig:t})}catch(e){throw pw(t,Iw(e)),e}}async function Sw(e){const t=_w(e.hostConfig);try{return await((await nw(t)).getWebResourceAuthParams?.({...e,hostConfig:t}))||{queryParams:{}}}catch(e){throw pw(t,Iw(e)),e}}async function ww(e){const t=_w(e.hostConfig),n=await(await nw(t)).handleAuthenticationError({...e,hostConfig:t}),r=e.canRetry&&n.retry,o=n.preventDefault;if(!r&&!o){const{status:n,errorBody:r}=e;pw(t,function({errorBody:e,status:t}){const n=e;return"object"==typeof n?.errors?{message:new lw(n?.errors).message}:{message:`HTTP ${t}`}}({status:n,errorBody:r}))}return n}async function kw(e){const t=_w(e.hostConfig);try{return await(await nw(t)).getRestCallAuthParams({...e,hostConfig:t})}catch(e){throw pw(t,Iw(e)),e}}function xw(e,t){tw(e,t)}function Cw(e){!function(e){bv("default",e||{})}(e)}function Ew(e,t){bv(e,t)}function Lw(e){!function(e){gv.has(e)?gv.delete(e):console.warn(`unregisterHostConfig: Host config with name "${e}" not found.`)}(e)}function Rw(e){return mv(e)}function Tw(e){return function(e){const t=e||dv,n=mv(t);let r=fv.get(n);return r||(r=pv(_w(t)),fv.set(n,r)),r}(e)}globalThis.loggingOut=!1;const qw=()=>{globalThis.loggingOut=!0,globalThis.location.href="/logout"},Pw=/^http/;function Iw(e){return{message:e.message||"Unknown error"}}function _w(e){if(e?.reference){const t=yv(e.reference);if(!t)throw new ow(`Host config with name "${e.reference}" not found.`);return t}return e&&Object.keys(e).length>0?e:vv()}function Ow(){return vv()}function Dw(e,t){return function(e,t){const n=fw(e);return n.listeners.add(t),()=>{n.listeners.delete(t)}}(e,t)}function Aw(e,t){return function(e,t){const n=wv(e);return n.redirectRequestedListeners.add(t),()=>{n.redirectRequestedListeners.delete(t)}}(e,t)}function Nw(e,t){return function(e,t){const n=wv(e);return n.redirectStartedListeners.add(t),()=>{n.redirectStartedListeners.delete(t)}}(e,t)}let jw;jw=function(){const e=[...jw?.getInterceptors()||[]];return{addInterceptor:t=>(e.push(t),t),removeInterceptor:t=>{const n=e.indexOf(t);let r;return-1!==n&&(r=e.splice(n,1)[0]),r||null},getInterceptors:()=>e}}();const Mw={determineAuthType:hw,getDefaultHostConfig:Ow,getRestCallAuthParams:kw,getWebResourceAuthParams:Sw,getWebSocketAuthParams:vw,handleAuthenticationError:ww,isHostCrossOrigin:mw,isWindows:gw,logout:qw,registerAuthModule:xw,registerHostConfig:Ew,serializeHostConfig:Rw,setDefaultHostConfig:Cw,toValidLocationUrl:bw,toValidWebsocketLocationUrl:yw,unregisterHostConfig:Lw,normalizeHostConfig:Tw,onFatalAuthError:Dw,onPageRedirectRequested:Aw,onPageRedirectStarted:Nw};var $w=Object.freeze({__proto__:null,AuthorizationError:lw,InvalidAuthTypeError:aw,InvalidHostConfigError:ow,UnexpectedAuthTypeError:iw,default:Mw,determineAuthType:hw,getAccessToken:async function(e){const t=(await kw({method:"GET",...e})).headers?.Authorization;if(0===t.indexOf("Bearer "))return t.substring(7);throw new Error("Unknown format of authorization header returned by remote auth module")},getDefaultHostConfig:Ow,getRestCallAuthParams:kw,getWebResourceAuthParams:Sw,getWebSocketAuthParams:vw,handleAuthenticationError:ww,isHostCrossOrigin:mw,isWindows:gw,logout:qw,normalizeHostConfig:Tw,onFatalAuthError:Dw,onPageRedirectRequested:Aw,onPageRedirectStarted:Nw,registerAuthModule:xw,registerHostConfig:Ew,serializeHostConfig:Rw,setDefaultHostConfig:Cw,toValidLocationUrl:bw,toValidWebsocketLocationUrl:yw,unregisterHostConfig:Lw}),zw=Object.freeze({__proto__:null});export{Xm as DataPropertyHandler,ev as EnigmaMocker,ig as HyperCubeHandler,tv as __DO_NOT_USE__,Sh as conversion,zy as embed,Sm as onContextMenu,vm as onTakeSnapshot,hm as useAction,im as useApp,rm as useAppLayout,mm as useConstraints,dm as useDeviceType,Kh as useEffect,Yh as useElement,cm as useEmbed,km as useEmitter,am as useGlobal,ym as useImperativeHandle,gm as useInteractionState,xm as useKeyboard,tm as useLayout,Qh as useMemo,om as useModel,fm as useNavigation,bm as useOptions,pm as usePlugins,Xh as usePromise,em as useRect,Zh as useRef,wm as useRenderState,sm as useSelections,nm as useStaleLayout,Gh as useState,lm as useTheme,um as useTranslator};
26
26
  //# sourceMappingURL=index.js.map